From bfbb7247b6ab7027eaaabc6109655d7ba7eb880a Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:20 -0400 Subject: keystone2: Move CONFIG_AEMIF_CNTRL_BASE out of CONFIG namespace This is only used in the aemif driver that is otherwise currently keystone2 centric. Moving forward, if this is applicable to some other platform then such base addresses should be able to be obtained via the device tree. Use KS2_AEMIF_CNTRL_BASE directly now rather than indirectly. Signed-off-by: Tom Rini --- include/configs/ti_armv7_keystone2.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 690ef0e1447..aa7b6ca9b80 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -108,8 +108,6 @@ #define CONFIG_KSNET_SERDES_SGMII2_BASE KS2_SGMII_SERDES2_BASE #define CONFIG_KSNET_SERDES_LANES_PER_SGMII KS2_LANES_PER_SGMII_SERDES -#define CONFIG_AEMIF_CNTRL_BASE KS2_AEMIF_CNTRL_BASE - /* I2C Configuration */ #define CONFIG_SYS_DAVINCI_I2C_SPEED 100000 #define CONFIG_SYS_DAVINCI_I2C_SLAVE 0x10 /* SMBus host address */ -- cgit v1.3.1 From 2c8419feb2faf40ddada3f52df6559bf5877230d Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:21 -0400 Subject: usb: phy: ti: Remove non-DM PHY code At this point in time, all platforms that had previously used drivers/usb/phy/omap_usb_phy.c have been migrated to DM and related options. Remove this now unused code and some related unused defines. Signed-off-by: Tom Rini --- configs/am43xx_evm_defconfig | 1 - configs/am43xx_evm_qspiboot_defconfig | 1 - configs/am43xx_evm_rtconly_defconfig | 1 - configs/am43xx_evm_usbhost_boot_defconfig | 1 - configs/am43xx_hs_evm_defconfig | 1 - configs/cm_t43_defconfig | 1 - drivers/usb/phy/Kconfig | 3 - drivers/usb/phy/Makefile | 1 - drivers/usb/phy/omap_usb_phy.c | 267 ------------------------------ include/configs/am43xx_evm.h | 2 - include/configs/am57xx_evm.h | 2 - include/configs/cm_t43.h | 1 - include/configs/dra7xx_evm.h | 2 - 13 files changed, 284 deletions(-) delete mode 100644 drivers/usb/phy/omap_usb_phy.c (limited to 'include') diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig index 4960ec2168f..d7b12f2c7b9 100644 --- a/configs/am43xx_evm_defconfig +++ b/configs/am43xx_evm_defconfig @@ -82,7 +82,6 @@ CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_DWC3_PHY_OMAP=y -CONFIG_OMAP_USB_PHY=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig index ebb46d412f2..6e593ef8f0c 100644 --- a/configs/am43xx_evm_qspiboot_defconfig +++ b/configs/am43xx_evm_qspiboot_defconfig @@ -60,7 +60,6 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_PHY_OMAP=y -CONFIG_OMAP_USB_PHY=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig index 5a170455878..8b1792bd302 100644 --- a/configs/am43xx_evm_rtconly_defconfig +++ b/configs/am43xx_evm_rtconly_defconfig @@ -63,7 +63,6 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_PHY_OMAP=y -CONFIG_OMAP_USB_PHY=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig index 14148b20940..8ee16a2572b 100644 --- a/configs/am43xx_evm_usbhost_boot_defconfig +++ b/configs/am43xx_evm_usbhost_boot_defconfig @@ -83,7 +83,6 @@ CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_DWC3_PHY_OMAP=y -CONFIG_OMAP_USB_PHY=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig index 820fc075470..7e4bb34a0a4 100644 --- a/configs/am43xx_hs_evm_defconfig +++ b/configs/am43xx_hs_evm_defconfig @@ -87,7 +87,6 @@ CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_DWC3_PHY_OMAP=y -CONFIG_OMAP_USB_PHY=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig index 18fbcf0e582..eea9a74d348 100644 --- a/configs/cm_t43_defconfig +++ b/configs/cm_t43_defconfig @@ -91,4 +91,3 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y -CONFIG_OMAP_USB_PHY=y diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 8741553d09b..c505862f1e1 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -8,8 +8,5 @@ comment "USB Phy" config TWL4030_USB bool "TWL4030 PHY" -config OMAP_USB_PHY - bool "OMAP PHY" - config ROCKCHIP_USB2_PHY bool "Rockchip USB2 PHY" diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile index 20f7edf48d7..b67a70bbe8e 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile @@ -4,5 +4,4 @@ # Tom Rix obj-$(CONFIG_TWL4030_USB) += twl4030.o -obj-$(CONFIG_OMAP_USB_PHY) += omap_usb_phy.o obj-$(CONFIG_ROCKCHIP_USB2_PHY) += rockchip_usb2_phy.o diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c deleted file mode 100644 index be733f39b23..00000000000 --- a/drivers/usb/phy/omap_usb_phy.c +++ /dev/null @@ -1,267 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * OMAP USB PHY Support - * - * (C) Copyright 2013 - * Texas Instruments, - * - * Author: Dan Murphy - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#ifdef CONFIG_OMAP_USB3PHY1_HOST -struct usb3_dpll_params { - u16 m; - u8 n; - u8 freq:3; - u8 sd; - u32 mf; -}; - -struct usb3_dpll_map { - unsigned long rate; - struct usb3_dpll_params params; - struct usb3_dpll_map *dpll_map; -}; - -static struct usb3_dpll_map dpll_map_usb[] = { - {12000000, {1250, 5, 4, 20, 0} }, /* 12 MHz */ - {16800000, {3125, 20, 4, 20, 0} }, /* 16.8 MHz */ - {19200000, {1172, 8, 4, 20, 65537} }, /* 19.2 MHz */ - {20000000, {1000, 7, 4, 10, 0} }, /* 20 MHz */ - {26000000, {1250, 12, 4, 20, 0} }, /* 26 MHz */ - {38400000, {3125, 47, 4, 20, 92843} }, /* 38.4 MHz */ - { }, /* Terminator */ -}; - -static struct usb3_dpll_params *omap_usb3_get_dpll_params(void) -{ - unsigned long rate; - struct usb3_dpll_map *dpll_map = dpll_map_usb; - - rate = get_sys_clk_freq(); - - for (; dpll_map->rate; dpll_map++) { - if (rate == dpll_map->rate) - return &dpll_map->params; - } - - dev_err(phy->dev, "No DPLL configuration for %lu Hz SYS CLK\n", rate); - - return NULL; -} - -static void omap_usb_dpll_relock(struct omap_usb3_phy *phy_regs) -{ - u32 val; - - writel(SET_PLL_GO, &phy_regs->pll_go); - do { - val = readl(&phy_regs->pll_status); - if (val & PLL_LOCK) - break; - } while (1); -} - -static void omap_usb_dpll_lock(struct omap_usb3_phy *phy_regs) -{ - struct usb3_dpll_params *dpll_params; - u32 val; - - dpll_params = omap_usb3_get_dpll_params(); - if (!dpll_params) - return; - - val = readl(&phy_regs->pll_config_1); - val &= ~PLL_REGN_MASK; - val |= dpll_params->n << PLL_REGN_SHIFT; - writel(val, &phy_regs->pll_config_1); - - val = readl(&phy_regs->pll_config_2); - val &= ~PLL_SELFREQDCO_MASK; - val |= dpll_params->freq << PLL_SELFREQDCO_SHIFT; - writel(val, &phy_regs->pll_config_2); - - val = readl(&phy_regs->pll_config_1); - val &= ~PLL_REGM_MASK; - val |= dpll_params->m << PLL_REGM_SHIFT; - writel(val, &phy_regs->pll_config_1); - - val = readl(&phy_regs->pll_config_4); - val &= ~PLL_REGM_F_MASK; - val |= dpll_params->mf << PLL_REGM_F_SHIFT; - writel(val, &phy_regs->pll_config_4); - - val = readl(&phy_regs->pll_config_3); - val &= ~PLL_SD_MASK; - val |= dpll_params->sd << PLL_SD_SHIFT; - writel(val, &phy_regs->pll_config_3); - - omap_usb_dpll_relock(phy_regs); -} - -static void usb3_phy_partial_powerup(struct omap_usb3_phy *phy_regs) -{ - u32 rate = get_sys_clk_freq()/1000000; - u32 val; - - val = readl((*ctrl)->control_phy_power_usb); - val &= ~(USB3_PWRCTL_CLK_CMD_MASK | USB3_PWRCTL_CLK_FREQ_MASK); - val |= (USB3_PHY_PARTIAL_RX_POWERON | USB3_PHY_TX_RX_POWERON); - val |= rate << USB3_PWRCTL_CLK_FREQ_SHIFT; - - writel(val, (*ctrl)->control_phy_power_usb); -} - -void usb_phy_power(int on) -{ - u32 val; - - val = readl((*ctrl)->control_phy_power_usb); - if (on) { - val &= ~USB3_PWRCTL_CLK_CMD_MASK; - val |= USB3_PHY_TX_RX_POWERON; - } else { - val &= (~USB3_PWRCTL_CLK_CMD_MASK & ~USB3_PHY_TX_RX_POWERON); - } - - writel(val, (*ctrl)->control_phy_power_usb); -} - -void omap_usb3_phy_init(struct omap_usb3_phy *phy_regs) -{ - omap_usb_dpll_lock(phy_regs); - usb3_phy_partial_powerup(phy_regs); - /* - * Give enough time for the PHY to partially power-up before - * powering it up completely. delay value suggested by the HW - * team. - */ - mdelay(100); -} - -static void omap_enable_usb3_phy(struct omap_xhci *omap) -{ - u32 val; - - val = (USBOTGSS_DMADISABLE | - USBOTGSS_STANDBYMODE_SMRT_WKUP | - USBOTGSS_IDLEMODE_NOIDLE); - writel(val, &omap->otg_wrapper->sysconfig); - - /* Clear the utmi OTG status */ - val = readl(&omap->otg_wrapper->utmi_otg_status); - writel(val, &omap->otg_wrapper->utmi_otg_status); - - /* Enable interrupts */ - writel(USBOTGSS_COREIRQ_EN, &omap->otg_wrapper->irqenable_set_0); - val = (USBOTGSS_IRQ_SET_1_IDPULLUP_FALL_EN | - USBOTGSS_IRQ_SET_1_DISCHRGVBUS_FALL_EN | - USBOTGSS_IRQ_SET_1_CHRGVBUS_FALL_EN | - USBOTGSS_IRQ_SET_1_DRVVBUS_FALL_EN | - USBOTGSS_IRQ_SET_1_IDPULLUP_RISE_EN | - USBOTGSS_IRQ_SET_1_DISCHRGVBUS_RISE_EN | - USBOTGSS_IRQ_SET_1_CHRGVBUS_RISE_EN | - USBOTGSS_IRQ_SET_1_DRVVBUS_RISE_EN | - USBOTGSS_IRQ_SET_1_OEVT_EN); - writel(val, &omap->otg_wrapper->irqenable_set_1); - - /* Clear the IRQ status */ - val = readl(&omap->otg_wrapper->irqstatus_1); - writel(val, &omap->otg_wrapper->irqstatus_1); - val = readl(&omap->otg_wrapper->irqstatus_0); - writel(val, &omap->otg_wrapper->irqstatus_0); -}; -#endif /* CONFIG_OMAP_USB3PHY1_HOST */ - -#ifdef CONFIG_OMAP_USB2PHY2_HOST -static void omap_enable_usb2_phy2(struct omap_xhci *omap) -{ - u32 reg, val; - - val = (~USB2PHY_AUTORESUME_EN & USB2PHY_DISCHGDET); - writel(val, (*ctrl)->control_srcomp_north_side); - - setbits_le32((*prcm)->cm_coreaon_usb_phy2_core_clkctrl, - USBPHY_CORE_CLKCTRL_OPTFCLKEN_CLK32K); - - setbits_le32((*prcm)->cm_l3init_hsusbhost_clkctrl, - (USBPHY_CORE_CLKCTRL_OPTFCLKEN_CLK32K | - OTG_SS_CLKCTRL_MODULEMODE_HW)); - - /* This is an undocumented Reserved register */ - reg = 0x4a0086c0; - val = readl(reg); - val |= 0x100; - setbits_le32(reg, val); -} - -void usb_phy_power(int on) -{ - return; -} -#endif /* CONFIG_OMAP_USB2PHY2_HOST */ - -#ifdef CONFIG_AM437X_USB2PHY2_HOST -static void am437x_enable_usb2_phy2(struct omap_xhci *omap) -{ - const u32 usb_otg_ss_clk_val = (USBOTGSSX_CLKCTRL_MODULE_EN | - USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960); - - writel(usb_otg_ss_clk_val, PRM_PER_USB_OTG_SS0_CLKCTRL); - writel(usb_otg_ss_clk_val, PRM_PER_USB_OTG_SS1_CLKCTRL); - - writel(USBPHYOCPSCP_MODULE_EN, PRM_PER_USBPHYOCP2SCP0_CLKCTRL); - writel(USBPHYOCPSCP_MODULE_EN, PRM_PER_USBPHYOCP2SCP1_CLKCTRL); -} - -void usb_phy_power(int on) -{ - u32 val; - - /* USB1_CTRL */ - val = readl(USB1_CTRL); - if (on) { - /* - * these bits are re-used on AM437x to power up/down the USB - * CM and OTG PHYs, if we don't toggle them, USB will not be - * functional on newer silicon revisions - */ - val &= ~(USB1_CTRL_CM_PWRDN | USB1_CTRL_OTG_PWRDN); - } else { - val |= USB1_CTRL_CM_PWRDN | USB1_CTRL_OTG_PWRDN; - } - - writel(val, USB1_CTRL); -} -#endif /* CONFIG_AM437X_USB2PHY2_HOST */ - -void omap_enable_phy(struct omap_xhci *omap) -{ -#ifdef CONFIG_OMAP_USB2PHY2_HOST - omap_enable_usb2_phy2(omap); -#endif - -#ifdef CONFIG_AM437X_USB2PHY2_HOST - am437x_enable_usb2_phy2(omap); -#endif - -#ifdef CONFIG_OMAP_USB3PHY1_HOST - omap_enable_usb3_phy(omap); - omap_usb3_phy_init(omap->usb3_phy); -#endif -} diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index ff1949e7e00..a52b476976f 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -55,8 +55,6 @@ #if defined(CONFIG_SPL_USB_HOST) || !defined(CONFIG_SPL_BUILD) #define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1 #define CONFIG_USB_XHCI_OMAP - -#define CONFIG_AM437X_USB2PHY2_HOST #endif #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USB_GADGET) diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 5396586d87b..b8099995d74 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -51,8 +51,6 @@ /* USB xHCI HOST */ #define CONFIG_USB_XHCI_OMAP -#define CONFIG_OMAP_USB3PHY1_HOST - /* SATA */ #define CONFIG_SCSI_AHCI_PLAT #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index a290cf0cbcc..cd21c8de1f2 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h @@ -47,7 +47,6 @@ /* USB support */ #define CONFIG_USB_XHCI_OMAP -#define CONFIG_AM437X_USB2PHY2_HOST /* Power */ #define CONFIG_POWER_TPS65218 diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 46138348a30..42583e75761 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -77,8 +77,6 @@ /* USB xHCI HOST */ #define CONFIG_USB_XHCI_OMAP -#define CONFIG_OMAP_USB2PHY2_HOST - /* SATA */ #define CONFIG_SCSI_AHCI_PLAT -- cgit v1.3.1 From 8d8d7e93619b8aef77843cb718f973b0e3d00224 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:22 -0400 Subject: Convert CONFIG_USB_XHCI_OMAP to Kconfig This converts the following to Kconfig: CONFIG_USB_XHCI_OMAP Signed-off-by: Tom Rini --- configs/am43xx_evm_defconfig | 1 + configs/am43xx_evm_qspiboot_defconfig | 1 + configs/am43xx_evm_rtconly_defconfig | 1 + configs/am43xx_evm_usbhost_boot_defconfig | 1 + configs/am43xx_hs_evm_defconfig | 1 + configs/am57xx_evm_defconfig | 1 + configs/am57xx_hs_evm_defconfig | 1 + configs/am57xx_hs_evm_usb_defconfig | 1 + configs/cm_t43_defconfig | 1 + configs/dra7xx_evm_defconfig | 1 + configs/dra7xx_hs_evm_defconfig | 1 + configs/dra7xx_hs_evm_usb_defconfig | 1 + drivers/usb/host/Kconfig | 10 ++++++++++ include/configs/am43xx_evm.h | 1 - include/configs/am57xx_evm.h | 3 --- include/configs/cm_t43.h | 3 --- include/configs/dra7xx_evm.h | 3 --- 17 files changed, 22 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig index d7b12f2c7b9..b60090d4c3c 100644 --- a/configs/am43xx_evm_defconfig +++ b/configs/am43xx_evm_defconfig @@ -78,6 +78,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig index 6e593ef8f0c..31b564b7ba9 100644 --- a/configs/am43xx_evm_qspiboot_defconfig +++ b/configs/am43xx_evm_qspiboot_defconfig @@ -57,6 +57,7 @@ CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_PHY_OMAP=y diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig index 8b1792bd302..a4450cc0d90 100644 --- a/configs/am43xx_evm_rtconly_defconfig +++ b/configs/am43xx_evm_rtconly_defconfig @@ -60,6 +60,7 @@ CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_PHY_OMAP=y diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig index 8ee16a2572b..9efeccc1e55 100644 --- a/configs/am43xx_evm_usbhost_boot_defconfig +++ b/configs/am43xx_evm_usbhost_boot_defconfig @@ -79,6 +79,7 @@ CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig index 7e4bb34a0a4..f34013053fe 100644 --- a/configs/am43xx_hs_evm_defconfig +++ b/configs/am43xx_hs_evm_defconfig @@ -83,6 +83,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index 09751825684..9a038a6bc69 100644 --- a/configs/am57xx_evm_defconfig +++ b/configs/am57xx_evm_defconfig @@ -108,6 +108,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_GADGET=y diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index e07f6cfe1a2..0a99df487e1 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -104,6 +104,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_GADGET=y diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig index 6cb8d0ea0f0..dbbe18d51b8 100644 --- a/configs/am57xx_hs_evm_usb_defconfig +++ b/configs/am57xx_hs_evm_usb_defconfig @@ -112,6 +112,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_GADGET=y diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig index eea9a74d348..45b41d3fcaf 100644 --- a/configs/cm_t43_defconfig +++ b/configs/cm_t43_defconfig @@ -91,3 +91,4 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 53e4d82795e..11dc022b6cc 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -124,6 +124,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 59d5a912cde..c231991ea58 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -127,6 +127,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_GENERIC=y diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig index 1e3a82511e4..09aa07379a8 100644 --- a/configs/dra7xx_hs_evm_usb_defconfig +++ b/configs/dra7xx_hs_evm_usb_defconfig @@ -121,6 +121,7 @@ CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_XHCI_OMAP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_GADGET=y diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8957bb56a6b..e04cf9411ae 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -57,6 +57,16 @@ config USB_XHCI_OCTEON family SoCs. This is a driver for the dwc3 to provide the glue logic to configure the controller. +config USB_XHCI_OMAP + bool "Support for TI OMAP family xHCI USB controller" + depends on ARCH_OMAP2PLUS + help + Enables support for the on-chip xHCI controller found on some TI SoC + families. Note that some families have multiple contollers while + others only have something such as DesignWare-based controllers. + Consult the SoC documentation to determine if this option applies + to your hardware. + config USB_XHCI_PCI bool "Support for PCI-based xHCI USB controller" depends on DM_USB diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index a52b476976f..00426597ee5 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -54,7 +54,6 @@ #if defined(CONFIG_SPL_USB_HOST) || !defined(CONFIG_SPL_BUILD) #define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1 -#define CONFIG_USB_XHCI_OMAP #endif #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USB_GADGET) diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index b8099995d74..956844414f8 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -48,9 +48,6 @@ #define CONFIG_NET_RETRY_COUNT 10 #define PHY_ANEG_TIMEOUT 8000 /* PHY needs longer aneg time at 1G */ -/* USB xHCI HOST */ -#define CONFIG_USB_XHCI_OMAP - /* SATA */ #define CONFIG_SCSI_AHCI_PLAT #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index cd21c8de1f2..fb6d8cfbf31 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h @@ -45,9 +45,6 @@ /* CPSW Ethernet support */ #define CONFIG_SYS_RX_ETH_BUFFER 64 -/* USB support */ -#define CONFIG_USB_XHCI_OMAP - /* Power */ #define CONFIG_POWER_TPS65218 diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 42583e75761..361ee9663db 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -74,9 +74,6 @@ /* SPI SPL */ -/* USB xHCI HOST */ -#define CONFIG_USB_XHCI_OMAP - /* SATA */ #define CONFIG_SCSI_AHCI_PLAT -- cgit v1.3.1 From bdeedc16e140bdb9d85af9dfd224e66b1f60385f Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:23 -0400 Subject: compulab: Clean up some unused symbols Since cm_t35 was removed, CONFIG_CM_T3X does not exist. This lets us simplify the code in board/compulab/common/eeprom.c a bit. Cc: Igor Grinberg Cc: Nikita Kiryanov Signed-off-by: Tom Rini --- board/compulab/common/eeprom.c | 43 ------------------------------------------ include/configs/cm_t335.h | 2 -- include/configs/cm_t43.h | 1 - 3 files changed, 46 deletions(-) (limited to 'include') diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c index 05ce33e8d68..c4b257f851d 100644 --- a/board/compulab/common/eeprom.c +++ b/board/compulab/common/eeprom.c @@ -385,43 +385,8 @@ int eeprom_field_update_date(struct eeprom_field *field, char *value) #define LAYOUT_VERSION_VER2 3 #define LAYOUT_VERSION_VER3 4 -extern struct eeprom_field layout_unknown[1]; - #define DEFINE_PRINT_UPDATE(x) eeprom_field_print_##x, eeprom_field_update_##x -#ifdef CONFIG_CM_T3X -struct eeprom_field layout_legacy[5] = { - { "MAC address", 6, NULL, DEFINE_PRINT_UPDATE(mac) }, - { "Board Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin) }, - { "Serial Number", 8, NULL, DEFINE_PRINT_UPDATE(bin) }, - { "Board Configuration", 64, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { RESERVED_FIELDS, 176, NULL, eeprom_field_print_reserved, - eeprom_field_update_ascii }, -}; -#else -#define layout_legacy layout_unknown -#endif - -#if defined(CONFIG_CM_T3X) -struct eeprom_field layout_v1[12] = { - { "Major Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, - { "Minor Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, - { "1st MAC Address", 6, NULL, DEFINE_PRINT_UPDATE(mac) }, - { "2nd MAC Address", 6, NULL, DEFINE_PRINT_UPDATE(mac) }, - { "Production Date", 4, NULL, DEFINE_PRINT_UPDATE(date) }, - { "Serial Number", 12, NULL, DEFINE_PRINT_UPDATE(bin_rev) }, - { RESERVED_FIELDS, 96, NULL, DEFINE_PRINT_UPDATE(reserved) }, - { "Product Name", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { "Product Options #1", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { "Product Options #2", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { "Product Options #3", 16, NULL, DEFINE_PRINT_UPDATE(ascii) }, - { RESERVED_FIELDS, 64, NULL, eeprom_field_print_reserved, - eeprom_field_update_ascii }, -}; -#else -#define layout_v1 layout_unknown -#endif - struct eeprom_field layout_v2[15] = { { "Major Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, { "Minor Revision", 2, NULL, DEFINE_PRINT_UPDATE(bin_ver) }, @@ -464,14 +429,6 @@ struct eeprom_field layout_v3[16] = { void eeprom_layout_assign(struct eeprom_layout *layout, int layout_version) { switch (layout->layout_version) { - case LAYOUT_VERSION_LEGACY: - layout->fields = layout_legacy; - layout->num_of_fields = ARRAY_SIZE(layout_legacy); - break; - case LAYOUT_VERSION_VER1: - layout->fields = layout_v1; - layout->num_of_fields = ARRAY_SIZE(layout_v1); - break; case LAYOUT_VERSION_VER2: layout->fields = layout_v2; layout->num_of_fields = ARRAY_SIZE(layout_v2); diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h index 4ca4f35eb3f..38e421ebc4a 100644 --- a/include/configs/cm_t335.h +++ b/include/configs/cm_t335.h @@ -10,8 +10,6 @@ #ifndef __CONFIG_CM_T335_H #define __CONFIG_CM_T335_H -#define CONFIG_CM_T335 - #include #undef CONFIG_MAX_RAM_BANK_SIZE diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index fb6d8cfbf31..6e5c26edc93 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h @@ -8,7 +8,6 @@ #ifndef __CONFIG_CM_T43_H #define __CONFIG_CM_T43_H -#define CONFIG_CM_T43 #define CONFIG_MAX_RAM_BANK_SIZE (2048 << 20) /* 2GB */ #define CONFIG_SYS_TIMERBASE 0x48040000 /* Use Timer2 */ -- cgit v1.3.1 From c8c934b91061817757560b7bf9e195d5ddcbd3b3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:24 -0400 Subject: ti: keystone: Clean up or migrate some NAND related options. The COFNIG_KEYSTONE_RBL_NAND option is always enabled for the driver on keystone platforms, but not older davinci platforms. Use def_bool for the symbol. For CONFIG_KEYSTONE_NAND_MAX_RBL_PAGE, it's only used within the driver and derived from another symbol, so remove CONFIG from the name. Finally, CONFIG_KEYSTONE_NAND_MAX_RBL_SIZE is a bit more fixed. For now, use the value directly. Long term, as part of DM'ifying NAND, this should come from the device tree. Signed-off-by: Tom Rini --- drivers/mtd/nand/raw/Kconfig | 4 ++++ drivers/mtd/nand/raw/davinci_nand.c | 12 ++++++------ include/configs/ti_armv7_keystone2.h | 2 -- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index f7b1334ddb4..bb8cffcabce 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -105,6 +105,10 @@ config NAND_DAVINCI Enable this driver for NAND flash controllers available in TI Davinci and Keystone2 platforms +config KEYSTONE_RBL_NAND + depends on ARCH_KEYSTONE + def_bool y + config NAND_DENALI bool select SYS_NAND_SELF_INIT diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index 9ad3a57690e..ef8e85a0021 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -347,9 +347,9 @@ static struct nand_ecclayout nand_keystone_rbl_4bit_layout_oobfirst = { }; #ifdef CONFIG_SYS_NAND_PAGE_2K -#define CONFIG_KEYSTONE_NAND_MAX_RBL_PAGE CONFIG_KEYSTONE_NAND_MAX_RBL_SIZE >> 11 +#define KEYSTONE_NAND_MAX_RBL_PAGE (0x100000 >> 11) #elif defined(CONFIG_SYS_NAND_PAGE_4K) -#define CONFIG_KEYSTONE_NAND_MAX_RBL_PAGE CONFIG_KEYSTONE_NAND_MAX_RBL_SIZE >> 12 +#define KEYSTONE_NAND_MAX_RBL_PAGE (0x100000 >> 12) #endif /** @@ -371,7 +371,7 @@ static int nand_davinci_write_page(struct mtd_info *mtd, struct nand_chip *chip, struct nand_ecclayout *saved_ecc_layout; /* save current ECC layout and assign Keystone RBL ECC layout */ - if (page < CONFIG_KEYSTONE_NAND_MAX_RBL_PAGE) { + if (page < KEYSTONE_NAND_MAX_RBL_PAGE) { saved_ecc_layout = chip->ecc.layout; chip->ecc.layout = &nand_keystone_rbl_4bit_layout_oobfirst; mtd->oobavail = chip->ecc.layout->oobavail; @@ -402,7 +402,7 @@ static int nand_davinci_write_page(struct mtd_info *mtd, struct nand_chip *chip, err: /* restore ECC layout */ - if (page < CONFIG_KEYSTONE_NAND_MAX_RBL_PAGE) { + if (page < KEYSTONE_NAND_MAX_RBL_PAGE) { chip->ecc.layout = saved_ecc_layout; mtd->oobavail = saved_ecc_layout->oobavail; } @@ -433,7 +433,7 @@ static int nand_davinci_read_page_hwecc(struct mtd_info *mtd, struct nand_chip * struct nand_ecclayout *saved_ecc_layout = chip->ecc.layout; /* save current ECC layout and assign Keystone RBL ECC layout */ - if (page < CONFIG_KEYSTONE_NAND_MAX_RBL_PAGE) { + if (page < KEYSTONE_NAND_MAX_RBL_PAGE) { chip->ecc.layout = &nand_keystone_rbl_4bit_layout_oobfirst; mtd->oobavail = chip->ecc.layout->oobavail; } @@ -463,7 +463,7 @@ static int nand_davinci_read_page_hwecc(struct mtd_info *mtd, struct nand_chip * } /* restore ECC layout */ - if (page < CONFIG_KEYSTONE_NAND_MAX_RBL_PAGE) { + if (page < KEYSTONE_NAND_MAX_RBL_PAGE) { chip->ecc.layout = saved_ecc_layout; mtd->oobavail = saved_ecc_layout->oobavail; } diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index aa7b6ca9b80..512be7d328e 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -119,8 +119,6 @@ /* EEPROM definitions */ /* NAND Configuration */ -#define CONFIG_KEYSTONE_RBL_NAND -#define CONFIG_KEYSTONE_NAND_MAX_RBL_SIZE CONFIG_ENV_OFFSET #define CONFIG_SYS_NAND_MASK_CLE 0x4000 #define CONFIG_SYS_NAND_MASK_ALE 0x2000 #define CONFIG_SYS_NAND_CS 2 -- cgit v1.3.1 From 2043f9c4c1740577d0cb18f2395dddcbe9d7af83 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:25 -0400 Subject: ti: keystone: dma: Migrate to Kconfig Move the main option for handling drivers/dma/keystone_nav* to Kconfig, and enable it by default. All of the sub-symbols are not configurable, so remove them from the CONFIG namespace. Signed-off-by: Tom Rini --- drivers/dma/Kconfig | 8 ++++++++ drivers/dma/keystone_nav.c | 30 +++++++++++++++--------------- drivers/dma/keystone_nav_cfg.c | 24 +++++++++++------------- include/configs/ti_armv7_keystone2.h | 31 ------------------------------- 4 files changed, 34 insertions(+), 59 deletions(-) (limited to 'include') diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index bbeec794df9..9cacea88d0c 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -53,6 +53,14 @@ config TI_EDMA3 This driver support data transfer between memory regions. +config TI_KSNAV + bool "TI Keystone Navigator DMA driver" + depends on ARCH_KEYSTONE + default y + select DMA_LEGACY + help + Enable the Keystone Navigator driver for Keystone 2 platforms. + config APBH_DMA bool "Support APBH DMA" depends on MX23 || MX28 || MX6 || MX7 || IMX8 || IMX8M diff --git a/drivers/dma/keystone_nav.c b/drivers/dma/keystone_nav.c index 443e4b23669..9a5ba79f3fe 100644 --- a/drivers/dma/keystone_nav.c +++ b/drivers/dma/keystone_nav.c @@ -11,20 +11,20 @@ #include struct qm_config qm_memmap = { - .stat_cfg = CONFIG_KSNAV_QM_QUEUE_STATUS_BASE, - .queue = (void *)CONFIG_KSNAV_QM_MANAGER_QUEUES_BASE, - .mngr_vbusm = CONFIG_KSNAV_QM_BASE_ADDRESS, - .i_lram = CONFIG_KSNAV_QM_LINK_RAM_BASE, - .proxy = (void *)CONFIG_KSNAV_QM_MANAGER_Q_PROXY_BASE, - .status_ram = CONFIG_KSNAV_QM_STATUS_RAM_BASE, - .mngr_cfg = (void *)CONFIG_KSNAV_QM_CONF_BASE, - .intd_cfg = CONFIG_KSNAV_QM_INTD_CONF_BASE, - .desc_mem = (void *)CONFIG_KSNAV_QM_DESC_SETUP_BASE, - .region_num = CONFIG_KSNAV_QM_REGION_NUM, - .pdsp_cmd = CONFIG_KSNAV_QM_PDSP1_CMD_BASE, - .pdsp_ctl = CONFIG_KSNAV_QM_PDSP1_CTRL_BASE, - .pdsp_iram = CONFIG_KSNAV_QM_PDSP1_IRAM_BASE, - .qpool_num = CONFIG_KSNAV_QM_QPOOL_NUM, + .stat_cfg = KS2_QM_QUEUE_STATUS_BASE, + .queue = (void *)KS2_QM_MANAGER_QUEUES_BASE, + .mngr_vbusm = KS2_QM_BASE_ADDRESS, + .i_lram = KS2_QM_LINK_RAM_BASE, + .proxy = (void *)KS2_QM_MANAGER_Q_PROXY_BASE, + .status_ram = KS2_QM_STATUS_RAM_BASE, + .mngr_cfg = (void *)KS2_QM_CONF_BASE, + .intd_cfg = KS2_QM_INTD_CONF_BASE, + .desc_mem = (void *)KS2_QM_DESC_SETUP_BASE, + .region_num = KS2_QM_REGION_NUM, + .pdsp_cmd = KS2_QM_PDSP1_CMD_BASE, + .pdsp_ctl = KS2_QM_PDSP1_CTRL_BASE, + .pdsp_iram = KS2_QM_PDSP1_IRAM_BASE, + .qpool_num = KS2_QM_QPOOL_NUM, }; /* @@ -252,7 +252,7 @@ int ksnav_init(struct pktdma_cfg *pktdma, struct rx_buff_desc *rx_buffers) writel(0, &pktdma->global->emulation_control); /* Set QM base address, only for K2x devices */ - writel(CONFIG_KSNAV_QM_BASE_ADDRESS, &pktdma->global->qm_base_addr[0]); + writel(KS2_QM_BASE_ADDRESS, &pktdma->global->qm_base_addr[0]); /* Enable all channels. The current state isn't important */ for (j = 0; j < pktdma->tx_ch_num; j++) { diff --git a/drivers/dma/keystone_nav_cfg.c b/drivers/dma/keystone_nav_cfg.c index 9a64801cf9b..301419b6fda 100644 --- a/drivers/dma/keystone_nav_cfg.c +++ b/drivers/dma/keystone_nav_cfg.c @@ -8,19 +8,17 @@ #include -#ifdef CONFIG_KSNAV_PKTDMA_NETCP /* NETCP Pktdma */ struct pktdma_cfg netcp_pktdma = { - .global = (void *)CONFIG_KSNAV_NETCP_PDMA_CTRL_BASE, - .tx_ch = (void *)CONFIG_KSNAV_NETCP_PDMA_TX_BASE, - .tx_ch_num = CONFIG_KSNAV_NETCP_PDMA_TX_CH_NUM, - .rx_ch = (void *)CONFIG_KSNAV_NETCP_PDMA_RX_BASE, - .rx_ch_num = CONFIG_KSNAV_NETCP_PDMA_RX_CH_NUM, - .tx_sched = (u32 *)CONFIG_KSNAV_NETCP_PDMA_SCHED_BASE, - .rx_flows = (void *)CONFIG_KSNAV_NETCP_PDMA_RX_FLOW_BASE, - .rx_flow_num = CONFIG_KSNAV_NETCP_PDMA_RX_FLOW_NUM, - .rx_free_q = CONFIG_KSNAV_NETCP_PDMA_RX_FREE_QUEUE, - .rx_rcv_q = CONFIG_KSNAV_NETCP_PDMA_RX_RCV_QUEUE, - .tx_snd_q = CONFIG_KSNAV_NETCP_PDMA_TX_SND_QUEUE, + .global = (void *)KS2_NETCP_PDMA_CTRL_BASE, + .tx_ch = (void *)KS2_NETCP_PDMA_TX_BASE, + .tx_ch_num = KS2_NETCP_PDMA_TX_CH_NUM, + .rx_ch = (void *)KS2_NETCP_PDMA_RX_BASE, + .rx_ch_num = KS2_NETCP_PDMA_RX_CH_NUM, + .tx_sched = (u32 *)KS2_NETCP_PDMA_SCHED_BASE, + .rx_flows = (void *)KS2_NETCP_PDMA_RX_FLOW_BASE, + .rx_flow_num = KS2_NETCP_PDMA_RX_FLOW_NUM, + .rx_free_q = KS2_NETCP_PDMA_RX_FREE_QUEUE, + .rx_rcv_q = KS2_NETCP_PDMA_RX_RCV_QUEUE, + .tx_snd_q = KS2_NETCP_PDMA_TX_SND_QUEUE, }; -#endif diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 512be7d328e..e8d99600def 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -70,37 +70,6 @@ #define CONFIG_SYS_SGMII_LINERATE_MHZ 1250 #define CONFIG_SYS_SGMII_RATESCALE 2 -/* Keyston Navigator Configuration */ -#define CONFIG_TI_KSNAV -#define CONFIG_KSNAV_QM_BASE_ADDRESS KS2_QM_BASE_ADDRESS -#define CONFIG_KSNAV_QM_CONF_BASE KS2_QM_CONF_BASE -#define CONFIG_KSNAV_QM_DESC_SETUP_BASE KS2_QM_DESC_SETUP_BASE -#define CONFIG_KSNAV_QM_STATUS_RAM_BASE KS2_QM_STATUS_RAM_BASE -#define CONFIG_KSNAV_QM_INTD_CONF_BASE KS2_QM_INTD_CONF_BASE -#define CONFIG_KSNAV_QM_PDSP1_CMD_BASE KS2_QM_PDSP1_CMD_BASE -#define CONFIG_KSNAV_QM_PDSP1_CTRL_BASE KS2_QM_PDSP1_CTRL_BASE -#define CONFIG_KSNAV_QM_PDSP1_IRAM_BASE KS2_QM_PDSP1_IRAM_BASE -#define CONFIG_KSNAV_QM_MANAGER_QUEUES_BASE KS2_QM_MANAGER_QUEUES_BASE -#define CONFIG_KSNAV_QM_MANAGER_Q_PROXY_BASE KS2_QM_MANAGER_Q_PROXY_BASE -#define CONFIG_KSNAV_QM_QUEUE_STATUS_BASE KS2_QM_QUEUE_STATUS_BASE -#define CONFIG_KSNAV_QM_LINK_RAM_BASE KS2_QM_LINK_RAM_BASE -#define CONFIG_KSNAV_QM_REGION_NUM KS2_QM_REGION_NUM -#define CONFIG_KSNAV_QM_QPOOL_NUM KS2_QM_QPOOL_NUM - -/* NETCP pktdma */ -#define CONFIG_KSNAV_PKTDMA_NETCP -#define CONFIG_KSNAV_NETCP_PDMA_CTRL_BASE KS2_NETCP_PDMA_CTRL_BASE -#define CONFIG_KSNAV_NETCP_PDMA_TX_BASE KS2_NETCP_PDMA_TX_BASE -#define CONFIG_KSNAV_NETCP_PDMA_TX_CH_NUM KS2_NETCP_PDMA_TX_CH_NUM -#define CONFIG_KSNAV_NETCP_PDMA_RX_BASE KS2_NETCP_PDMA_RX_BASE -#define CONFIG_KSNAV_NETCP_PDMA_RX_CH_NUM KS2_NETCP_PDMA_RX_CH_NUM -#define CONFIG_KSNAV_NETCP_PDMA_SCHED_BASE KS2_NETCP_PDMA_SCHED_BASE -#define CONFIG_KSNAV_NETCP_PDMA_RX_FLOW_BASE KS2_NETCP_PDMA_RX_FLOW_BASE -#define CONFIG_KSNAV_NETCP_PDMA_RX_FLOW_NUM KS2_NETCP_PDMA_RX_FLOW_NUM -#define CONFIG_KSNAV_NETCP_PDMA_RX_FREE_QUEUE KS2_NETCP_PDMA_RX_FREE_QUEUE -#define CONFIG_KSNAV_NETCP_PDMA_RX_RCV_QUEUE KS2_NETCP_PDMA_RX_RCV_QUEUE -#define CONFIG_KSNAV_NETCP_PDMA_TX_SND_QUEUE KS2_NETCP_PDMA_TX_SND_QUEUE - /* Keystone net */ #define CONFIG_KSNET_MAC_ID_BASE KS2_MAC_ID_BASE_ADDR #define CONFIG_KSNET_NETCP_BASE KS2_NETCP_BASE -- cgit v1.3.1 From 425c121d7ae784b8ec940bd53001f393a6da09bc Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:26 -0400 Subject: omapl138_lcdk: Stop using CONFIG_MACH_OMAPL138_LCDK We have one places that uses this symbol and CONFIG_TARGET_OMAPL138_LCDK works equally well, switch to that. Signed-off-by: Tom Rini --- board/davinci/da8xxevm/Makefile | 2 +- include/configs/omapl138_lcdk.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/board/davinci/da8xxevm/Makefile b/board/davinci/da8xxevm/Makefile index 3fac615d7b8..8187c8db22e 100644 --- a/board/davinci/da8xxevm/Makefile +++ b/board/davinci/da8xxevm/Makefile @@ -7,4 +7,4 @@ obj-$(CONFIG_MACH_DAVINCI_DA830_EVM) += da830evm.o obj-$(CONFIG_MACH_DAVINCI_DA850_EVM) += da850evm.o -obj-$(CONFIG_MACH_OMAPL138_LCDK) += omapl138_lcdk.o +obj-$(CONFIG_TARGET_OMAPL138_LCDK) += omapl138_lcdk.o diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index f60d15b9db1..d20c9e238c3 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -17,7 +17,6 @@ /* * SoC Configuration */ -#define CONFIG_MACH_OMAPL138_LCDK #define CONFIG_SYS_CLK_FREQ clk_get(DAVINCI_ARM_CLKID) #define CONFIG_SYS_OSCIN_FREQ 24000000 #define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE -- cgit v1.3.1 From 899867a28a86a0c6142337c060a546def16963a3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:28 -0400 Subject: Convert CONFIG_OMAP_EHCI_PHY1_RESET_GPIO et al to Kconfig This converts the following to Kconfig: CONFIG_OMAP_EHCI_PHY1_RESET_GPIO CONFIG_OMAP_EHCI_PHY2_RESET_GPIO CONFIG_OMAP_EHCI_PHY3_RESET_GPIO To do this, we also introduce CONFIG_HAS_CONFIG_OMAP_EHCI_PHYn_RESET_GPIO options to get setting the GPIO number. Signed-off-by: Tom Rini --- configs/am3517_evm_defconfig | 2 ++ configs/omap35_logic_somlv_defconfig | 2 ++ configs/omap3_beagle_defconfig | 2 ++ configs/omap3_logic_somlv_defconfig | 2 ++ configs/omap4_panda_defconfig | 4 ++++ configs/omap5_uevm_defconfig | 4 ++++ drivers/usb/host/Kconfig | 34 ++++++++++++++++++++++++++++++++++ include/configs/am3517_evm.h | 2 -- include/configs/omap3_beagle.h | 3 --- include/configs/omap3_logic.h | 3 --- include/configs/omap4_panda.h | 2 -- include/configs/omap5_uevm.h | 3 --- include/configs/tam3517-common.h | 2 -- 13 files changed, 50 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig index 1234aa2251e..864d16cf01c 100644 --- a/configs/am3517_evm_defconfig +++ b/configs/am3517_evm_defconfig @@ -77,6 +77,8 @@ CONFIG_DM_SPI=y CONFIG_OMAP3_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=57 CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_AM35X=y CONFIG_BCH=y diff --git a/configs/omap35_logic_somlv_defconfig b/configs/omap35_logic_somlv_defconfig index 4e31f77049a..9f3a88f28ec 100644 --- a/configs/omap35_logic_somlv_defconfig +++ b/configs/omap35_logic_somlv_defconfig @@ -82,6 +82,8 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=4 CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_OMAP2PLUS=y CONFIG_TWL4030_USB=y diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig index 89b2bff5925..578e6829ff1 100644 --- a/configs/omap3_beagle_defconfig +++ b/configs/omap3_beagle_defconfig @@ -84,6 +84,8 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=147 CONFIG_USB_OMAP3=y CONFIG_USB_MUSB_GADGET=y CONFIG_USB_MUSB_OMAP2PLUS=y diff --git a/configs/omap3_logic_somlv_defconfig b/configs/omap3_logic_somlv_defconfig index 96f9c6bcaaa..7a78682bf69 100644 --- a/configs/omap3_logic_somlv_defconfig +++ b/configs/omap3_logic_somlv_defconfig @@ -83,6 +83,8 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=4 CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_OMAP2PLUS=y CONFIG_TWL4030_USB=y diff --git a/configs/omap4_panda_defconfig b/configs/omap4_panda_defconfig index 687e3865e77..8c6baaf4fda 100644 --- a/configs/omap4_panda_defconfig +++ b/configs/omap4_panda_defconfig @@ -40,6 +40,10 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=1 +CONFIG_HAS_OMAP_EHCI_PHY2_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY2_RESET_GPIO=62 CONFIG_USB_OMAP3=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig index 0436463e087..0280b4ac8d0 100644 --- a/configs/omap5_uevm_defconfig +++ b/configs/omap5_uevm_defconfig @@ -49,6 +49,10 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY2_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY2_RESET_GPIO=80 +CONFIG_HAS_OMAP_EHCI_PHY3_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY3_RESET_GPIO=79 CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_PHY_OMAP=y diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index e04cf9411ae..10b0479a8a6 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -183,6 +183,40 @@ config USB_EHCI_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later SoCs. +if USB_EHCI_OMAP + +config HAS_OMAP_EHCI_PHY1_RESET_GPIO + bool "PHY #1 requires a GPIO hold to it in RESET while PHY settles" + help + Enable this to be able to configure the GPIO number used to hold the + PHY in RESET for enough time until the PHY is settled and ready. + +config OMAP_EHCI_PHY1_RESET_GPIO + int "GPIO number to hold PHY #1 in RESET" + depends on HAS_OMAP_EHCI_PHY1_RESET_GPIO + +config HAS_OMAP_EHCI_PHY2_RESET_GPIO + bool "PHY #2 requires a GPIO hold to it in RESET while PHY settles" + help + Enable this to be able to configure the GPIO number used to hold the + PHY in RESET for enough time until the PHY is settled and ready. + +config OMAP_EHCI_PHY2_RESET_GPIO + int "GPIO number to hold PHY #2 in RESET" + depends on HAS_OMAP_EHCI_PHY2_RESET_GPIO + +config HAS_OMAP_EHCI_PHY3_RESET_GPIO + bool "PHY #3 requires a GPIO hold to it in RESET while PHY settles" + help + Enable this to be able to configure the GPIO number used to hold the + PHY in RESET for enough time until the PHY is settled and ready. + +config OMAP_EHCI_PHY3_RESET_GPIO + int "GPIO number to hold PHY #3 in RESET" + depends on HAS_OMAP_EHCI_PHY3_RESET_GPIO + +endif + config USB_EHCI_VF bool "Support for Vybrid on-chip EHCI USB controller" depends on ARCH_VF610 diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index edfd890767d..9b56e2101c1 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -23,8 +23,6 @@ */ #ifdef CONFIG_SPL_BUILD #undef CONFIG_USB_EHCI_OMAP -#else -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 57 #endif /* I2C */ diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 5d300b13f34..265b1e2197c 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -41,9 +41,6 @@ #endif /* CONFIG_SPL_OS_BOOT */ #endif /* CONFIG_MTD_RAW_NAND */ -/* USB EHCI */ -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 147 - /* Enable Multi Bus support for I2C */ #define CONFIG_I2C_MULTI_BUS diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index 886f2e9d86f..89ffdef287c 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -27,9 +27,6 @@ #ifdef CONFIG_SPL_BUILD #undef CONFIG_USB_EHCI_OMAP #endif -#ifdef CONFIG_USB_EHCI_OMAP -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 4 -#endif /* Board NAND Info. */ #ifdef CONFIG_MTD_RAW_NAND diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h index 14eb363816a..5320dffe55b 100644 --- a/include/configs/omap4_panda.h +++ b/include/configs/omap4_panda.h @@ -16,8 +16,6 @@ */ /* USB UHH support options */ -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 1 -#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 62 /* USB Networking options */ diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h index a1f1dafad79..188ab0bf365 100644 --- a/include/configs/omap5_uevm.h +++ b/include/configs/omap5_uevm.h @@ -43,9 +43,6 @@ /* USB UHH support options */ #define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 80 -#define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 79 - /* Enabled commands */ /* USB Networking options */ diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 166b8397ada..adbc2ae0c5d 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -43,8 +43,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} -/* EHCI */ -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 25 #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07 -- cgit v1.3.1 From e124b65246ee9df4d0bc14c05c7d40eed0030304 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:29 -0400 Subject: am3517_evm: Remove unused comments/code Clean up the config header file by removing some now irrelevant code / comments. Signed-off-by: Tom Rini --- include/configs/am3517_evm.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include') diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 9b56e2101c1..e54708ccb5a 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -14,19 +14,6 @@ #include -/* Hardware drivers */ - -/* - * USB configuration - * Enable CONFIG_USB_MUSB_HOST for Host functionalities MSC, keyboard - * Enable CONFIG_USB_MUSB_GADGET for Device functionalities. - */ -#ifdef CONFIG_SPL_BUILD -#undef CONFIG_USB_EHCI_OMAP -#endif - -/* I2C */ - /* Ethernet */ #define CONFIG_NET_RETRY_COUNT 10 -- cgit v1.3.1 From 0eeabc63d287f3edeb1d20650813daf2fcbe0131 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:30 -0400 Subject: omap3_logic: Remove unused comments/code Clean up the config header file by removing some now irrelevant code / comments. Signed-off-by: Tom Rini --- include/configs/omap3_logic.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'include') diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index 89ffdef287c..cac35ef0795 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -14,20 +14,6 @@ #include -/* - * We are only ever GP parts and will utilize all of the "downloaded image" - * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in - * order to allow for BCH8 to fit in. - */ - -/* Hardware drivers */ - -/* I2C */ - -#ifdef CONFIG_SPL_BUILD -#undef CONFIG_USB_EHCI_OMAP -#endif - /* Board NAND Info. */ #ifdef CONFIG_MTD_RAW_NAND #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ -- cgit v1.3.1 From b17cc8078137e71c11b25414ab291c8ebe2636b1 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:31 -0400 Subject: omap4_panda: Remove unused comments/code Clean up the config header file by removing some now irrelevant code / comments. Signed-off-by: Tom Rini --- include/configs/omap4_panda.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'include') diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h index 5320dffe55b..69749ab6302 100644 --- a/include/configs/omap4_panda.h +++ b/include/configs/omap4_panda.h @@ -11,20 +11,6 @@ #ifndef __CONFIG_PANDA_H #define __CONFIG_PANDA_H -/* - * High Level Configuration Options - */ - -/* USB UHH support options */ - -/* USB Networking options */ - -#define CONFIG_UBOOT_ENABLE_PADS_ALL - #include -/* GPIO */ - -/* ENV related config options */ - #endif /* __CONFIG_PANDA_H */ -- cgit v1.3.1 From f899cc14320d0929e7730d31c00830b2e0bcbcc0 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:32 -0400 Subject: ti: keystone: Move away from CONFIG_SOC_KEYSTONE We have individual SOC symbols for each keystone 2 platform. Use the existing CONFIG_ARCH_KEYSTONE rather than CONFIG_SOC_KEYSTONE to encompass all of the keystone families. Signed-off-by: Tom Rini --- arch/arm/dts/Makefile | 2 +- cmd/fdt.c | 2 +- common/image-fdt.c | 2 +- drivers/mmc/omap_hsmmc.c | 4 ++-- drivers/serial/ns16550.c | 4 ++-- include/configs/ti_armv7_keystone2.h | 2 -- 6 files changed, 7 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index f322775161d..9e44817a404 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -929,7 +929,7 @@ endif dtb-$(CONFIG_RZA1) += \ r7s72100-gr-peach-u-boot.dtb -dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \ +dtb-$(CONFIG_ARCH_KEYSTONE) += keystone-k2hk-evm.dtb \ keystone-k2l-evm.dtb \ keystone-k2e-evm.dtb \ keystone-k2g-evm.dtb \ diff --git a/cmd/fdt.c b/cmd/fdt.c index c42f1c79d49..2a207bf2b51 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -624,7 +624,7 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) fdt_strerror(err)); return CMD_RET_FAILURE; } -#ifdef CONFIG_SOC_KEYSTONE +#ifdef CONFIG_ARCH_KEYSTONE ft_board_setup_ex(working_fdt, gd->bd); #endif } diff --git a/common/image-fdt.c b/common/image-fdt.c index 9441e63a3d4..b698e961fe7 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -628,7 +628,7 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, if (!ft_verify_fdt(blob)) goto err; -#if defined(CONFIG_SOC_KEYSTONE) +#if defined(CONFIG_ARCH_KEYSTONE) if (IMAGE_OF_BOARD_SETUP) ft_board_setup_ex(blob, gd->bd); #endif diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index d267dc64366..820065800fe 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -42,7 +42,7 @@ #include #include #endif -#if !defined(CONFIG_SOC_KEYSTONE) +#if !defined(CONFIG_ARCH_KEYSTONE) #include #include #endif @@ -1559,7 +1559,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio, priv->base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE; #if (defined(CONFIG_OMAP44XX) || defined(CONFIG_OMAP54XX) || \ defined(CONFIG_DRA7XX) || defined(CONFIG_AM33XX) || \ - defined(CONFIG_AM43XX) || defined(CONFIG_SOC_KEYSTONE)) && \ + defined(CONFIG_AM43XX) || defined(CONFIG_ARCH_KEYSTONE)) && \ defined(CONFIG_HSMMC2_8BIT) /* Enable 8-bit interface for eMMC on OMAP4/5 or DRA7XX */ host_caps_val |= MMC_MODE_8BIT; diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 953c2fbe5c1..796ff1658cd 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -41,7 +41,7 @@ DECLARE_GLOBAL_DATA_PTR; #endif #endif /* !CONFIG_DM_SERIAL */ -#if defined(CONFIG_SOC_KEYSTONE) +#if defined(CONFIG_ARCH_KEYSTONE) #define UART_REG_VAL_PWREMU_MGMT_UART_DISABLE 0 #define UART_REG_VAL_PWREMU_MGMT_UART_ENABLE ((1 << 14) | (1 << 13) | (1 << 0)) #undef UART_MCRVAL @@ -267,7 +267,7 @@ void ns16550_init(struct ns16550 *com_port, int baud_divisor) /* /16 is proper to hit 115200 with 48MHz */ serial_out(0, &com_port->mdr1); #endif -#if defined(CONFIG_SOC_KEYSTONE) +#if defined(CONFIG_ARCH_KEYSTONE) serial_out(UART_REG_VAL_PWREMU_MGMT_UART_ENABLE, &com_port->regC); #endif } diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index e8d99600def..a6d7b8a0739 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -9,8 +9,6 @@ #ifndef __CONFIG_KS2_EVM_H #define __CONFIG_KS2_EVM_H -#define CONFIG_SOC_KEYSTONE - /* U-Boot Build Configuration */ /* SoC Configuration */ -- cgit v1.3.1 From 4b62ba8fa297183e74049d7aca855000134bafc9 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Sep 2021 20:32:33 -0400 Subject: ti: keystone: Migrate CONFIG_SOC_K2* to Kconfig Move the individual keystone 2 SoC symbols to the mach Kconfig file, select them as needed. Signed-off-by: Tom Rini --- arch/arm/mach-keystone/Kconfig | 16 ++++++++++++++++ include/configs/k2e_evm.h | 3 --- include/configs/k2g_evm.h | 3 --- include/configs/k2hk_evm.h | 3 --- include/configs/k2l_evm.h | 3 --- 5 files changed, 16 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig index e06eba5aea1..94e6fe1f228 100644 --- a/arch/arm/mach-keystone/Kconfig +++ b/arch/arm/mach-keystone/Kconfig @@ -6,6 +6,7 @@ choice config TARGET_K2HK_EVM bool "TI Keystone 2 Kepler/Hawking EVM" + select SOC_K2HK select SPL_BOARD_INIT if SPL select CMD_DDR3 imply DM_I2C @@ -14,6 +15,7 @@ config TARGET_K2HK_EVM config TARGET_K2E_EVM bool "TI Keystone 2 Edison EVM" + select SOC_K2E select SPL_BOARD_INIT if SPL select CMD_DDR3 imply DM_I2C @@ -22,6 +24,7 @@ config TARGET_K2E_EVM config TARGET_K2L_EVM bool "TI Keystone 2 Lamar EVM" + select SOC_K2L select SPL_BOARD_INIT if SPL select CMD_DDR3 imply DM_I2C @@ -31,6 +34,7 @@ config TARGET_K2L_EVM config TARGET_K2G_EVM bool "TI Keystone 2 Galileo EVM" select BOARD_LATE_INIT + select SOC_K2G select SPL_BOARD_INIT if SPL select TI_I2C_BOARD_DETECT select CMD_DDR3 @@ -40,6 +44,18 @@ config TARGET_K2G_EVM endchoice +config SOC_K2E + bool + +config SOC_K2G + bool + +config SOC_K2HK + bool + +config SOC_K2L + bool + config SYS_SOC default "keystone" diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h index 35439c02581..9b25c349822 100644 --- a/include/configs/k2e_evm.h +++ b/include/configs/k2e_evm.h @@ -11,9 +11,6 @@ #include -/* Platform type */ -#define CONFIG_SOC_K2E - #ifdef CONFIG_TI_SECURE_DEVICE #define DEFAULT_SEC_BOOT_ENV \ DEFAULT_FIT_TI_ARGS \ diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index 17245ab1586..56dd9c72d94 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -12,9 +12,6 @@ #include #include -/* Platform type */ -#define CONFIG_SOC_K2G - /* U-Boot general configuration */ #define ENV_KS2_BOARD_SETTINGS \ DEFAULT_MMC_TI_ARGS \ diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h index f5a20ce02b0..cfc34c7da6d 100644 --- a/include/configs/k2hk_evm.h +++ b/include/configs/k2hk_evm.h @@ -11,9 +11,6 @@ #include -/* Platform type */ -#define CONFIG_SOC_K2HK - #ifdef CONFIG_TI_SECURE_DEVICE #define DEFAULT_SEC_BOOT_ENV \ DEFAULT_FIT_TI_ARGS \ diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h index 97512c9903d..65988fff06e 100644 --- a/include/configs/k2l_evm.h +++ b/include/configs/k2l_evm.h @@ -11,9 +11,6 @@ #include -/* Platform type */ -#define CONFIG_SOC_K2L - #ifdef CONFIG_TI_SECURE_DEVICE #define DEFAULT_SEC_BOOT_ENV \ DEFAULT_FIT_TI_ARGS \ -- cgit v1.3.1