[PATCH 01/18] Convert CONFIG_E1000_NO_NVM to Kconfig

This converts the following to Kconfig: CONFIG_E1000_NO_NVM
Signed-off-by: Tom Rini trini@konsulko.com --- configs/apalis-tk1_defconfig | 1 + configs/apalis_t30_defconfig | 1 + drivers/net/Kconfig | 4 ++++ include/configs/apalis-tk1.h | 3 --- include/configs/apalis_t30.h | 3 --- 5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig index 2d9c0ae18e37..0915bca64214 100644 --- a/configs/apalis-tk1_defconfig +++ b/configs/apalis-tk1_defconfig @@ -58,6 +58,7 @@ CONFIG_SYS_I2C_TEGRA=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK=y CONFIG_E1000=y +CONFIG_E1000_NO_NVM=y CONFIG_PCI=y CONFIG_PCI_TEGRA=y CONFIG_DM_PMIC=y diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig index 2a8d3c6e0a35..f5d958646fa7 100644 --- a/configs/apalis_t30_defconfig +++ b/configs/apalis_t30_defconfig @@ -50,6 +50,7 @@ CONFIG_TFTP_TSIZE=y CONFIG_SPL_DM=y CONFIG_SYS_I2C_TEGRA=y CONFIG_E1000=y +CONFIG_E1000_NO_NVM=y CONFIG_PCI=y CONFIG_PCI_TEGRA=y CONFIG_SYS_NS16550=y diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 84d859c21eb8..56f9416a48db 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -239,6 +239,10 @@ config E1000
http://support.intel.com/support/network/adapter/pro100/21397.htm
+config E1000_NO_NVM + bool "Intel PRO/1000 has no NVMEM / EEPROM" + depends on E1000 + config E1000_SPI_GENERIC bool "Allow access to the Intel 8257x SPI bus" depends on E1000 diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h index 19e6a1e04eeb..a362282a291e 100644 --- a/include/configs/apalis-tk1.h +++ b/include/configs/apalis-tk1.h @@ -22,9 +22,6 @@ /* PCI host support */ #undef CONFIG_PCI_SCAN_SHOW
-/* PCI networking support */ -#define CONFIG_E1000_NO_NVM - /* * Custom Distro Boot configuration: * 1. 8bit SD port (MMC1) diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 104c4135e284..84bd88f835ae 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -23,9 +23,6 @@ #define CONFIG_TEGRA_ENABLE_UARTA #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-/* PCI networking support */ -#define CONFIG_E1000_NO_NVM - #define UBOOT_UPDATE \ "uboot_hwpart=1\0" \ "uboot_blk=0\0" \

This converts the following to Kconfig: CONFIG_EFLASH_PROTSECTORS
Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/mach-at91/Kconfig | 7 +++++++ arch/arm/mach-at91/arm926ejs/eflash.c | 4 ++-- configs/ethernut5_defconfig | 1 + include/configs/ethernut5.h | 1 - 4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index b87639f8c07b..4fee9772bf1c 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -327,6 +327,13 @@ config AT91_EFLASH Enable the driver for the embedded flash used in the Atmel AT91SAM9XE devices.
+config EFLASH_PROTSECTORS + int "Number of flash sectors to protect from erasing" + depends on AT91_EFLASH + help + If non-zero, this will be the number of sectors of the flash to disallow + U-Boot to ease, starting from the beginning of flash. + config AT91_GPIO_PULLUP bool "Keep pullups on peripheral pins" depends on CPU_ARM926EJS diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c index 23c24936edf0..043f06a82717 100644 --- a/arch/arm/mach-at91/arm926ejs/eflash.c +++ b/arch/arm/mach-at91/arm926ejs/eflash.c @@ -120,7 +120,7 @@ unsigned long flash_init(void) if (i%32 == 0) tmp = readl(&eefc->frr); flash_info[0].protect[i] = (tmp >> (i%32)) & 1; -#if defined(CONFIG_EFLASH_PROTSECTORS) +#if CONFIG_VAL(EFLASH_PROTSECTORS) if (i < CONFIG_EFLASH_PROTSECTORS) flash_info[0].protect[i] = 1; #endif @@ -158,7 +158,7 @@ int flash_real_protect (flash_info_t *info, long sector, int prot)
debug("protect sector=%ld prot=%d\n", sector, prot);
-#if defined(CONFIG_EFLASH_PROTSECTORS) +#if CONFIG_VAL(EFLASH_PROTSECTORS) if (sector < CONFIG_EFLASH_PROTSECTORS) { if (!prot) { printf("eflash: sector %lu cannot be unprotected\n", diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig index da8c0bd9cbe9..256f6520a598 100644 --- a/configs/ethernut5_defconfig +++ b/configs/ethernut5_defconfig @@ -6,6 +6,7 @@ CONFIG_SYS_TEXT_BASE=0x27000000 CONFIG_SYS_MALLOC_LEN=0x121000 CONFIG_TARGET_ETHERNUT5=y CONFIG_AT91_EFLASH=y +CONFIG_EFLASH_PROTSECTORS=1 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x21000 CONFIG_ENV_OFFSET=0x3DE000 diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h index 8e7bfadf64ed..8f9cfd50bc1e 100644 --- a/include/configs/ethernut5.h +++ b/include/configs/ethernut5.h @@ -32,7 +32,6 @@ /* 512kB on-chip NOR flash */ # define CONFIG_SYS_FLASH_BASE 0x00200000 /* AT91SAM9XE_FLASH_BASE */ # define CONFIG_SYS_MAX_FLASH_SECT 32 -# define CONFIG_EFLASH_PROTSECTORS 1
/* bootstrap + u-boot + env + linux in dataflash on CS0 */

This code is not enabled anywhere, drop it.
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/ehci-mxs.c | 77 -------------------------------- include/configs/mx23_olinuxino.h | 1 - include/configs/mx23evk.h | 1 - include/configs/mx28evk.h | 1 - 4 files changed, 80 deletions(-)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 9a614955fc16..147b2fa145d6 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -112,82 +112,6 @@ static int __ehci_hcd_stop(struct ehci_mxs_port *port) return ehci_mxs_toggle_clock(port, 0); }
-#if !CONFIG_IS_ENABLED(DM_USB) -static const struct ehci_mxs_port mxs_port[] = { -#ifdef CONFIG_EHCI_MXS_PORT0 - { - MXS_USBCTRL0_BASE, - (struct mxs_usbphy_regs *)MXS_USBPHY0_BASE, - (struct mxs_register_32 *)(MXS_CLKCTRL_BASE + - offsetof(struct mxs_clkctrl_regs, - hw_clkctrl_pll0ctrl0_reg)), - CLKCTRL_PLL0CTRL0_EN_USB_CLKS | CLKCTRL_PLL0CTRL0_POWER, - CLKCTRL_PLL0CTRL0_EN_USB_CLKS, - HW_DIGCTL_CTRL_USB0_CLKGATE, - }, -#endif -#ifdef CONFIG_EHCI_MXS_PORT1 - { - MXS_USBCTRL1_BASE, - (struct mxs_usbphy_regs *)MXS_USBPHY1_BASE, - (struct mxs_register_32 *)(MXS_CLKCTRL_BASE + - offsetof(struct mxs_clkctrl_regs, - hw_clkctrl_pll1ctrl0_reg)), - CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER, - CLKCTRL_PLL1CTRL0_EN_USB_CLKS, - HW_DIGCTL_CTRL_USB1_CLKGATE, - }, -#endif -}; - -int __weak board_ehci_hcd_init(int port) -{ - return 0; -} - -int __weak board_ehci_hcd_exit(int port) -{ - return 0; -} - -int ehci_hcd_init(int index, enum usb_init_type init, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - - int ret; - const struct ehci_mxs_port *port; - - if ((index < 0) || (index >= ARRAY_SIZE(mxs_port))) { - printf("Invalid port index (index = %d)!\n", index); - return -EINVAL; - } - - ret = board_ehci_hcd_init(index); - if (ret) - return ret; - - port = &mxs_port[index]; - return __ehci_hcd_init(port, init, hccr, hcor); -} - -int ehci_hcd_stop(int index) -{ - int ret; - const struct ehci_mxs_port *port; - - if ((index < 0) || (index >= ARRAY_SIZE(mxs_port))) { - printf("Invalid port index (index = %d)!\n", index); - return -EINVAL; - } - - port = &mxs_port[index]; - - ret = __ehci_hcd_stop(port); - board_ehci_hcd_exit(index); - - return ret; -} -#else /* CONFIG_IS_ENABLED(DM_USB) */ struct ehci_mxs_priv_data { struct ehci_ctrl ctrl; struct usb_ehci *ehci; @@ -367,4 +291,3 @@ U_BOOT_DRIVER(usb_mxs) = { .priv_auto = sizeof(struct ehci_mxs_priv_data), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; -#endif /* !CONFIG_IS_ENABLED(DM_USB) */ diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index ab466b65ac43..06b90e42b4c3 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -16,7 +16,6 @@
/* USB */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_MXS_PORT0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif
diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index 3fb00031075d..94b916dbdb13 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -21,7 +21,6 @@
/* USB */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_MXS_PORT0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index fe096d424c3a..10f48c12565d 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -35,7 +35,6 @@
/* USB */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_MXS_PORT1 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif

This converts the following to Kconfig: CONFIG_EHCI_DESC_BIG_ENDIAN CONFIG_EHCI_MMIO_BIG_ENDIAN
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/Kconfig | 10 ++++++++++ include/configs/bmips_bcm6318.h | 2 -- include/configs/bmips_bcm63268.h | 2 -- include/configs/bmips_bcm6328.h | 2 -- include/configs/bmips_bcm6358.h | 2 -- include/configs/bmips_bcm6362.h | 2 -- include/configs/bmips_bcm6368.h | 2 -- include/configs/tplink_wdr4300.h | 4 ---- 8 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8f77412cc71b..8e0ecc5e41e0 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -116,11 +116,19 @@ config USB_XHCI_BRCM
endif # USB_XHCI_HCD
+config EHCI_DESC_BIG_ENDIAN + bool + +config EHCI_MMIO_BIG_ENDIAN + bool + config USB_EHCI_HCD bool "EHCI HCD (USB 2.0) support" default y if ARCH_MX5 || ARCH_MX6 depends on DM && OF_CONTROL select USB_HOST + select EHCI_DESC_BIG_ENDIAN if SYS_BIG_ENDIAN + select EHCI_MMIO_BIG_ENDIAN if SYS_BIG_ENDIAN ---help--- The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware. @@ -166,6 +174,7 @@ config USB_EHCI_MX5 config USB_EHCI_MX6 bool "Support for i.MX6/i.MX7ULP on-chip EHCI USB controller" depends on ARCH_MX6 || ARCH_MX7ULP || ARCH_IMXRT + select EHCI_HCD_INIT_AFTER_RESET default y ---help--- Enables support for the on-chip EHCI controller on i.MX6 SoCs. @@ -173,6 +182,7 @@ config USB_EHCI_MX6 config USB_EHCI_MX7 bool "Support for i.MX7 on-chip EHCI USB controller" depends on ARCH_MX7 || IMX8M + select EHCI_HCD_INIT_AFTER_RESET if ARCH_MX7 select PHY if IMX8M select NOP_PHY if IMX8M default y diff --git a/include/configs/bmips_bcm6318.h b/include/configs/bmips_bcm6318.h index 412471a4aaa1..ad7781bd3a27 100644 --- a/include/configs/bmips_bcm6318.h +++ b/include/configs/bmips_bcm6318.h @@ -15,8 +15,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000
/* USB */ -#define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 #if defined(CONFIG_USB_OHCI_HCD) diff --git a/include/configs/bmips_bcm63268.h b/include/configs/bmips_bcm63268.h index 8caddf384628..0901f6e88ac4 100644 --- a/include/configs/bmips_bcm63268.h +++ b/include/configs/bmips_bcm63268.h @@ -15,8 +15,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000
/* USB */ -#define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 #if defined(CONFIG_USB_OHCI_HCD) diff --git a/include/configs/bmips_bcm6328.h b/include/configs/bmips_bcm6328.h index 892a3e2c41e0..3f45f1f2550f 100644 --- a/include/configs/bmips_bcm6328.h +++ b/include/configs/bmips_bcm6328.h @@ -15,8 +15,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000
/* USB */ -#define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 #if defined(CONFIG_USB_OHCI_HCD) diff --git a/include/configs/bmips_bcm6358.h b/include/configs/bmips_bcm6358.h index 6cb09492aa89..c15218fc9cb5 100644 --- a/include/configs/bmips_bcm6358.h +++ b/include/configs/bmips_bcm6358.h @@ -15,8 +15,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000
/* USB */ -#define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 #if defined(CONFIG_USB_OHCI_HCD) diff --git a/include/configs/bmips_bcm6362.h b/include/configs/bmips_bcm6362.h index 92ab0ba7a2f0..0c94b2c52543 100644 --- a/include/configs/bmips_bcm6362.h +++ b/include/configs/bmips_bcm6362.h @@ -15,8 +15,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000
/* USB */ -#define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 #if defined(CONFIG_USB_OHCI_HCD) diff --git a/include/configs/bmips_bcm6368.h b/include/configs/bmips_bcm6368.h index 8a22dc1a3c32..6486b7e61107 100644 --- a/include/configs/bmips_bcm6368.h +++ b/include/configs/bmips_bcm6368.h @@ -15,8 +15,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000
/* USB */ -#define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_MMIO_BIG_ENDIAN #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2 #if defined(CONFIG_USB_OHCI_HCD) diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h index 3866a4333291..f5466fd5092d 100644 --- a/include/configs/tplink_wdr4300.h +++ b/include/configs/tplink_wdr4300.h @@ -24,10 +24,6 @@ */ /* Miscellaneous configurable options */
-/* USB, USB storage, USB ethernet */ -#define CONFIG_EHCI_MMIO_BIG_ENDIAN -#define CONFIG_EHCI_DESC_BIG_ENDIAN - /* * Diagnostics */

This converts the following to Kconfig: CONFIG_EHCI_HCD_INIT_AFTER_RESET
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/Kconfig | 5 ++++- include/configs/MPC837XERDB.h | 1 - include/configs/P1010RDB.h | 6 ------ include/configs/P2041RDB.h | 4 ---- include/configs/T102xRDB.h | 4 ---- include/configs/T104xRDB.h | 6 ------ include/configs/T208xQDS.h | 1 - include/configs/T208xRDB.h | 1 - include/configs/T4240RDB.h | 1 - include/configs/apalis_imx6.h | 1 - include/configs/aristainetos2.h | 1 - include/configs/brppt2.h | 1 - include/configs/cl-som-imx7.h | 1 - include/configs/cm_fx6.h | 1 - include/configs/colibri-imx6ull.h | 1 - include/configs/colibri_imx6.h | 1 - include/configs/colibri_imx7.h | 1 - include/configs/colibri_vf.h | 1 - include/configs/corenet_ds.h | 4 ---- include/configs/dart_6ul.h | 1 - include/configs/dh_imx6.h | 1 - include/configs/dragonboard410c.h | 4 ---- include/configs/embestmx6boards.h | 1 - include/configs/ge_b1x5v2.h | 1 - include/configs/gw_ventana.h | 1 - include/configs/imx6_logic.h | 1 - include/configs/imx6dl-mamoj.h | 1 - include/configs/imx6q-bosch-acc.h | 1 - include/configs/imx8mm-cl-iot-gate.h | 1 - include/configs/kontron-sl-mx6ul.h | 1 - include/configs/kontron-sl-mx8mm.h | 1 - include/configs/kp_imx6q_tpc.h | 1 - include/configs/liteboard.h | 1 - include/configs/meerkat96.h | 1 - include/configs/mx6sabreauto.h | 1 - include/configs/mx6sabresd.h | 1 - include/configs/mx6slevk.h | 1 - include/configs/mx6sxsabreauto.h | 1 - include/configs/mx6sxsabresd.h | 1 - include/configs/mx6ul_14x14_evk.h | 1 - include/configs/mys_6ulx.h | 1 - include/configs/nitrogen6x.h | 1 - include/configs/npi_imx6ull.h | 1 - include/configs/omap5_uevm.h | 3 --- include/configs/opos6uldev.h | 1 - include/configs/p1_p2_rdb_pc.h | 6 ------ include/configs/pcl063.h | 1 - include/configs/pcl063_ull.h | 1 - include/configs/pico-imx6ul.h | 1 - include/configs/pico-imx7d.h | 1 - include/configs/somlabs_visionsom_6ull.h | 1 - include/configs/tbs2910.h | 1 - include/configs/tqma6.h | 2 -- include/configs/verdin-imx8mm.h | 1 - include/configs/vining_2000.h | 1 - include/configs/warp.h | 1 - include/configs/xpress.h | 1 - 57 files changed, 4 insertions(+), 87 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8e0ecc5e41e0..5d0855ffcc79 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -260,9 +260,12 @@ config USB_EHCI_GENERIC ---help--- Enables support for generic EHCI controller.
+config EHCI_HCD_INIT_AFTER_RESET + bool + config USB_EHCI_FSL bool "Support for FSL on-chip EHCI USB controller" - select CONFIG_EHCI_HCD_INIT_AFTER_RESET + select EHCI_HCD_INIT_AFTER_RESET ---help--- Enables support for the on-chip EHCI controller on FSL chips. endif # USB_EHCI_HCD diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h index d356ff95944d..01e62668fa52 100644 --- a/include/configs/MPC837XERDB.h +++ b/include/configs/MPC837XERDB.h @@ -307,7 +307,6 @@ */
#define CONFIG_HAS_FSL_DR_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
#define CONFIG_NETDEV "eth1"
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index ce63e640d5c6..3773b125327c 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -492,12 +492,6 @@ extern unsigned long get_sdram_size(void);
#define CONFIG_HAS_FSL_DR_USB
-#if defined(CONFIG_HAS_FSL_DR_USB) -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif -#endif - /* * Environment */ diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index 9cce6cf68daa..dfe92bcea099 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -379,10 +379,6 @@ #define CONFIG_HAS_FSL_DR_USB #define CONFIG_HAS_FSL_MPH_USB
-#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB) -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif - #ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 618b8ed845a1..43cf604fdd5c 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -401,10 +401,6 @@ */ #define CONFIG_HAS_FSL_DR_USB
-#ifdef CONFIG_HAS_FSL_DR_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif - /* * SDHC */ diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 3f4e59fa8ab2..da0a4f206ef5 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -405,12 +405,6 @@ */ #define CONFIG_HAS_FSL_DR_USB
-#ifdef CONFIG_HAS_FSL_DR_USB -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif -#endif - #ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR #endif diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index b4a91eacb9e0..dfe9192df128 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -475,7 +475,6 @@ * USB */ #ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_HAS_FSL_DR_USB #endif
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index 84e5d5df38df..a5a30d8c8555 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -431,7 +431,6 @@ * USB */ #ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_HAS_FSL_DR_USB #endif
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index 2ab1b647a86b..7690bee48459 100644 --- a/include/configs/T4240RDB.h +++ b/include/configs/T4240RDB.h @@ -448,7 +448,6 @@ /* * USB */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_HAS_FSL_DR_USB
#ifdef CONFIG_MMC diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 286440514713..d0e0e65d85f9 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -38,7 +38,6 @@ /* USB Configs */ /* Host */ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 /* Client */ diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h index 026775de7c56..2fd505dffdc0 100644 --- a/include/configs/aristainetos2.h +++ b/include/configs/aristainetos2.h @@ -422,7 +422,6 @@ /* DMA stuff, needed for GPMI/MXS NAND support */
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0
diff --git a/include/configs/brppt2.h b/include/configs/brppt2.h index 7b110f05ca44..19276cc6ecab 100644 --- a/include/configs/brppt2.h +++ b/include/configs/brppt2.h @@ -86,7 +86,6 @@ BUR_COMMON_ENV \ #define CONFIG_FEC_FIXED_SPEED _1000BASET
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
/* SPL */ diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h index b19b3ef541c7..c63c5ebb672e 100644 --- a/include/configs/cl-som-imx7.h +++ b/include/configs/cl-som-imx7.h @@ -102,7 +102,6 @@ #endif
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index cb4cd925d9fd..07ad6fde28d0 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -148,7 +148,6 @@ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
/* SATA */ #define CONFIG_LBA48 diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 0459cb0286e3..da5b8a6f80fa 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -135,7 +135,6 @@ #endif
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h index d7d5c2ddee15..f62a3f6688ed 100644 --- a/include/configs/colibri_imx6.h +++ b/include/configs/colibri_imx6.h @@ -28,7 +28,6 @@ /* USB Configs */ /* Host */ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 /* Client */ diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 180142a64879..d78a27347c56 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -179,7 +179,6 @@ #endif
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index 32e2aabc67c7..664c538f6dcd 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -98,7 +98,6 @@
/* USB Host Support */ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
/* USB DFU */
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 9291b81ac2a6..54e79b16d653 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -377,10 +377,6 @@ #define CONFIG_HAS_FSL_DR_USB #define CONFIG_HAS_FSL_MPH_USB
-#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB) -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif - #ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT diff --git a/include/configs/dart_6ul.h b/include/configs/dart_6ul.h index d502e98deae7..9f27072f12ff 100644 --- a/include/configs/dart_6ul.h +++ b/include/configs/dart_6ul.h @@ -50,7 +50,6 @@ #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h index b495826301e7..298a88c92eda 100644 --- a/include/configs/dh_imx6.h +++ b/include/configs/dh_imx6.h @@ -41,7 +41,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */ diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h index ed46f26628f1..26a714c2886b 100644 --- a/include/configs/dragonboard410c.h +++ b/include/configs/dragonboard410c.h @@ -22,10 +22,6 @@
/* UART */
-/* Fixup - in init code we switch from device to host mode, - * it has to be done after each HCD reset */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET - #define BOOT_TARGET_DEVICES(func) \ func(USB, usb, 0) \ func(MMC, mmc, 1) \ diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h index 00996f5cb784..7526d3b0f515 100644 --- a/include/configs/embestmx6boards.h +++ b/include/configs/embestmx6boards.h @@ -18,7 +18,6 @@ #define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0
diff --git a/include/configs/ge_b1x5v2.h b/include/configs/ge_b1x5v2.h index 252ab5e7473d..61ca5f8b34ab 100644 --- a/include/configs/ge_b1x5v2.h +++ b/include/configs/ge_b1x5v2.h @@ -29,7 +29,6 @@ #endif
/* USB */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */ diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 26d171daae7d..6aa6c6262e3f 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -55,7 +55,6 @@ /* Various command support */
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USBD_HS diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h index 592c62ab8acc..6b1c67867da0 100644 --- a/include/configs/imx6_logic.h +++ b/include/configs/imx6_logic.h @@ -122,7 +122,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */ diff --git a/include/configs/imx6dl-mamoj.h b/include/configs/imx6dl-mamoj.h index c4eebb5aeac0..2707ae644067 100644 --- a/include/configs/imx6dl-mamoj.h +++ b/include/configs/imx6dl-mamoj.h @@ -45,7 +45,6 @@ #define CONFIG_FEC_MXC_PHYADDR 1
/* USB */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/imx6q-bosch-acc.h b/include/configs/imx6q-bosch-acc.h index 785ac7c50148..e904a10b6e86 100644 --- a/include/configs/imx6q-bosch-acc.h +++ b/include/configs/imx6q-bosch-acc.h @@ -111,7 +111,6 @@ #endif #endif
-#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */ diff --git a/include/configs/imx8mm-cl-iot-gate.h b/include/configs/imx8mm-cl-iot-gate.h index 297d56b427f8..c559778c1d32 100644 --- a/include/configs/imx8mm-cl-iot-gate.h +++ b/include/configs/imx8mm-cl-iot-gate.h @@ -144,7 +144,6 @@ #define CONFIG_FEC_MXC_PHYADDR 0
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
diff --git a/include/configs/kontron-sl-mx6ul.h b/include/configs/kontron-sl-mx6ul.h index b6e68f8f41ac..d04684955d3c 100644 --- a/include/configs/kontron-sl-mx6ul.h +++ b/include/configs/kontron-sl-mx6ul.h @@ -29,7 +29,6 @@ #define CONFIG_HOSTNAME "kontron-mx6ul"
#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/kontron-sl-mx8mm.h b/include/configs/kontron-sl-mx8mm.h index 95b836c54702..64bfddde3b00 100644 --- a/include/configs/kontron-sl-mx8mm.h +++ b/include/configs/kontron-sl-mx8mm.h @@ -27,7 +27,6 @@ #define CONFIG_HOSTNAME "kontron-mx8mm"
#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/kp_imx6q_tpc.h b/include/configs/kp_imx6q_tpc.h index 5b25be5c9254..a513213c5980 100644 --- a/include/configs/kp_imx6q_tpc.h +++ b/include/configs/kp_imx6q_tpc.h @@ -21,7 +21,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */ diff --git a/include/configs/liteboard.h b/include/configs/liteboard.h index 3c03368b5c0a..fa178fbe9365 100644 --- a/include/configs/liteboard.h +++ b/include/configs/liteboard.h @@ -98,7 +98,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 diff --git a/include/configs/meerkat96.h b/include/configs/meerkat96.h index 0ccfe7db5a4d..c6ce8837474e 100644 --- a/include/configs/meerkat96.h +++ b/include/configs/meerkat96.h @@ -24,7 +24,6 @@ /* Environment configs */
/* USB configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#endif diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h index d120c7c7a352..d0cf6a2251c3 100644 --- a/include/configs/mx6sabreauto.h +++ b/include/configs/mx6sabreauto.h @@ -17,7 +17,6 @@
/* USB Configs */ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 2f4332a4b19f..18d5d4988cf4 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -36,7 +36,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */ diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index e03226d4180a..837742b8039c 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -94,7 +94,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h index 272492466de9..b3a786da4801 100644 --- a/include/configs/mx6sxsabreauto.h +++ b/include/configs/mx6sxsabreauto.h @@ -97,7 +97,6 @@ #define CONFIG_FEC_MXC_PHYADDR 0x0
#ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h index fda5b03b60f6..a5596d98fe68 100644 --- a/include/configs/mx6sxsabresd.h +++ b/include/configs/mx6sxsabresd.h @@ -124,7 +124,6 @@ #define CONFIG_FEC_MXC_PHYADDR 0x1
#ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index 44e6fd0156fa..7c76290a2aeb 100644 --- a/include/configs/mx6ul_14x14_evk.h +++ b/include/configs/mx6ul_14x14_evk.h @@ -119,7 +119,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/mys_6ulx.h b/include/configs/mys_6ulx.h index fb685ec9631c..d1dc445a9b73 100644 --- a/include/configs/mys_6ulx.h +++ b/include/configs/mys_6ulx.h @@ -34,7 +34,6 @@ #define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 3aa21a28d155..72f2dfb5daca 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -33,7 +33,6 @@
/* USB Configs */ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0
diff --git a/include/configs/npi_imx6ull.h b/include/configs/npi_imx6ull.h index 1fc4b87cab74..b3de41852fed 100644 --- a/include/configs/npi_imx6ull.h +++ b/include/configs/npi_imx6ull.h @@ -35,7 +35,6 @@ #define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h index 75e84c35ee06..cce5556fe266 100644 --- a/include/configs/omap5_uevm.h +++ b/include/configs/omap5_uevm.h @@ -40,9 +40,6 @@ #define CONFIG_SYS_I2C_TCA642X_BUS_NUM 4 #define CONFIG_SYS_I2C_TCA642X_ADDR 0x22
-/* USB UHH support options */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET - /* Enabled commands */
/* USB Networking options */ diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index 8624d24b6eaa..ebfba72d0da4 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -24,7 +24,6 @@
/* USB */ #ifdef CONFIG_USB_EHCI_MX6 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index f74ad628fee7..76b46cab4cd8 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -458,12 +458,6 @@ */ #define CONFIG_HAS_FSL_DR_USB
-#if defined(CONFIG_HAS_FSL_DR_USB) -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#endif -#endif - #if defined(CONFIG_TARGET_P1020RDB_PD) #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif diff --git a/include/configs/pcl063.h b/include/configs/pcl063.h index 659f20e63abb..c6c417b6292a 100644 --- a/include/configs/pcl063.h +++ b/include/configs/pcl063.h @@ -46,7 +46,6 @@ #define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h index 0d099fa14c2d..4c1d24f64fd5 100644 --- a/include/configs/pcl063_ull.h +++ b/include/configs/pcl063_ull.h @@ -48,7 +48,6 @@ #define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h index ea30fbc4cfcc..7e57d7b14222 100644 --- a/include/configs/pico-imx6ul.h +++ b/include/configs/pico-imx6ul.h @@ -30,7 +30,6 @@ #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 5a6f22442014..39705d95692f 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -116,7 +116,6 @@ #define CONFIG_SYS_FSL_USDHC_NUM 2
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/somlabs_visionsom_6ull.h b/include/configs/somlabs_visionsom_6ull.h index 98966cfeb91d..bab4bf3deb34 100644 --- a/include/configs/somlabs_visionsom_6ull.h +++ b/include/configs/somlabs_visionsom_6ull.h @@ -66,7 +66,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 1ebe28b7c1ba..eb63e75cddf5 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -44,7 +44,6 @@
/* USB */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #ifdef CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USBD_HS diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 3290ec021fd9..d60fe51eaf98 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -53,8 +53,6 @@ /* USB Configs */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ -
#if defined(CONFIG_TQMA6X_MMC_BOOT)
diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h index 8f464dd39f0b..a93d94dafe4e 100644 --- a/include/configs/verdin-imx8mm.h +++ b/include/configs/verdin-imx8mm.h @@ -79,7 +79,6 @@ #define CONFIG_FEC_MXC_PHYADDR 7
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h index a447ec8c3446..487ab3d664cc 100644 --- a/include/configs/vining_2000.h +++ b/include/configs/vining_2000.h @@ -41,7 +41,6 @@ /* Network */ #define CONFIG_FEC_MXC_PHYADDR 0x0
-#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/warp.h b/include/configs/warp.h index 74fa03b53d82..5716f8f9a600 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -34,7 +34,6 @@
/* USB Configs */ #ifdef CONFIG_CMD_USB -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Only OTG2 port enabled */ diff --git a/include/configs/xpress.h b/include/configs/xpress.h index 8e36d1c4c3e0..81f8d64067dc 100644 --- a/include/configs/xpress.h +++ b/include/configs/xpress.h @@ -31,7 +31,6 @@ /* Environment is in stored in the eMMC boot partition */
/* USB Configs */ -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2

This converts the following to Kconfig: CONFIG_HAS_FSL_DR_USB
Signed-off-by: Tom Rini trini@konsulko.com --- board/freescale/common/Kconfig | 4 ++++ board/freescale/p1_p2_rdb_pc/Kconfig | 2 ++ include/configs/MPC837XERDB.h | 2 -- include/configs/P1010RDB.h | 2 -- include/configs/P2041RDB.h | 1 - include/configs/T102xRDB.h | 1 - include/configs/T104xRDB.h | 1 - include/configs/T208xQDS.h | 3 --- include/configs/T208xRDB.h | 3 --- include/configs/T4240RDB.h | 1 - include/configs/corenet_ds.h | 1 - include/configs/ids8313.h | 1 - include/configs/p1_p2_rdb_pc.h | 1 - 13 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig index 6553bf63bfd5..c13c865fd1f1 100644 --- a/board/freescale/common/Kconfig +++ b/board/freescale/common/Kconfig @@ -107,3 +107,7 @@ config QIXIS_I2C_ACCESS bool "Access to QIXIS is over i2c" depends on FSL_QIXIS default y + +config HAS_FSL_DR_USB + def_bool y + depends on USB_EHCI_HCD && PPC diff --git a/board/freescale/p1_p2_rdb_pc/Kconfig b/board/freescale/p1_p2_rdb_pc/Kconfig index cd36150f6377..db7b47a4635b 100644 --- a/board/freescale/p1_p2_rdb_pc/Kconfig +++ b/board/freescale/p1_p2_rdb_pc/Kconfig @@ -11,4 +11,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "p1_p2_rdb_pc"
+source "board/freescale/common/Kconfig" + endif diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h index 01e62668fa52..4995bcee856d 100644 --- a/include/configs/MPC837XERDB.h +++ b/include/configs/MPC837XERDB.h @@ -306,8 +306,6 @@ * Environment Configuration */
-#define CONFIG_HAS_FSL_DR_USB - #define CONFIG_NETDEV "eth1"
#define CONFIG_HOSTNAME "mpc837x_rdb" diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index 3773b125327c..d5b8cfaea397 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -490,8 +490,6 @@ extern unsigned long get_sdram_size(void); #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR #endif
-#define CONFIG_HAS_FSL_DR_USB - /* * Environment */ diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index dfe92bcea099..261e9872a7a1 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -376,7 +376,6 @@ /* * USB */ -#define CONFIG_HAS_FSL_DR_USB #define CONFIG_HAS_FSL_MPH_USB
#ifdef CONFIG_MMC diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 43cf604fdd5c..b412438116df 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -399,7 +399,6 @@ /* * USB */ -#define CONFIG_HAS_FSL_DR_USB
/* * SDHC diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index da0a4f206ef5..bb05b2ed7c98 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -403,7 +403,6 @@ /* * USB */ -#define CONFIG_HAS_FSL_DR_USB
#ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index dfe9192df128..e46488b3c0ed 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -474,9 +474,6 @@ /* * USB */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_HAS_FSL_DR_USB -#endif
/* * SDHC diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index a5a30d8c8555..d4bf938ac6f6 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -430,9 +430,6 @@ /* * USB */ -#ifdef CONFIG_USB_EHCI_HCD -#define CONFIG_HAS_FSL_DR_USB -#endif
/* * SDHC diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index 7690bee48459..ebdd47edf952 100644 --- a/include/configs/T4240RDB.h +++ b/include/configs/T4240RDB.h @@ -448,7 +448,6 @@ /* * USB */ -#define CONFIG_HAS_FSL_DR_USB
#ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 54e79b16d653..ce9e51170582 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -374,7 +374,6 @@ /* * USB */ -#define CONFIG_HAS_FSL_DR_USB #define CONFIG_HAS_FSL_MPH_USB
#ifdef CONFIG_MMC diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h index 39a36779bc4a..aa6a471cc254 100644 --- a/include/configs/ids8313.h +++ b/include/configs/ids8313.h @@ -182,7 +182,6 @@ #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600) #define CONFIG_SYS_NS16550_CLK (get_bus_freq(0))
-#define CONFIG_HAS_FSL_DR_USB #define CONFIG_SYS_SCCR_USBDRCM 3
/* diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 76b46cab4cd8..41009cb6a3b8 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -456,7 +456,6 @@ /* * USB */ -#define CONFIG_HAS_FSL_DR_USB
#if defined(CONFIG_TARGET_P1020RDB_PD) #define CONFIG_USB_MAX_CONTROLLER_COUNT 1

This converts the following to Kconfig: CONFIG_USB_XHCI_EXYNOS CONFIG_USB_EHCI_EXYNOS
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/Kconfig | 16 ++++++++++++++++ include/configs/exynos5250-common.h | 5 ----- include/configs/exynos5420-common.h | 2 -- include/configs/odroid.h | 3 --- include/configs/odroid_xu3.h | 3 --- include/configs/smdk5420.h | 1 - 6 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 5d0855ffcc79..413bec0f4a1a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -32,6 +32,14 @@ config USB_XHCI_DWC3_OF_SIMPLE Support USB2/3 functionality in simple SoC integrations with USB controller based on the DesignWare USB3 IP Core.
+config USB_XHCI_EXYNOS + bool "Support for Samsung Exynos5 family on-chip xHCI USB controller" + depends on ARCH_EXYNOS5 + default y + help + Enables support for he on-chip xHCI controller on Samsung Exynos5 + SoCs. + config USB_XHCI_MTK bool "Support for MediaTek on-chip xHCI USB controller" depends on ARCH_MEDIATEK @@ -157,6 +165,14 @@ config USB_EHCI_ATMEL ---help--- Enables support for the on-chip EHCI controller on Atmel chips.
+config USB_EHCI_EXYNOS + bool "Support for Samsung Exynos EHCI USB controller" + depends on ARCH_EXYNOS + default y + ---help--- + Enables support for the on-chip EHCI controller on Samsung Exynos + SoCs. + config USB_EHCI_MARVELL bool "Support for Marvell on-chip EHCI USB controller" depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X diff --git a/include/configs/exynos5250-common.h b/include/configs/exynos5250-common.h index 82cb8aff7b52..8d91a7de5cde 100644 --- a/include/configs/exynos5250-common.h +++ b/include/configs/exynos5250-common.h @@ -13,11 +13,6 @@
#define CONFIG_SYS_SDRAM_BASE 0x40000000
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - -#define CONFIG_USB_XHCI_EXYNOS - /* DRAM Memory Banks */ #define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index 5e1aba7692e0..35bf3c2fb4a7 100644 --- a/include/configs/exynos5420-common.h +++ b/include/configs/exynos5420-common.h @@ -27,6 +27,4 @@ #define CONFIG_LOWPOWER_FLAG 0x02020028 #define CONFIG_LOWPOWER_ADDR 0x0202002C
-#define CONFIG_USB_XHCI_EXYNOS - #endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/odroid.h b/include/configs/odroid.h index dec658dd13a3..11a4a409dbaf 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -149,9 +149,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - /* * Supported Odroid boards: X3, U3 * TODO: Add Odroid X support diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 8d24a03b722d..476bde53572d 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -16,9 +16,6 @@
#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - /* DFU */ #define DFU_DEFAULT_POLL_TIMEOUT 300 #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index f8d2fafd2788..48f6e27006f0 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -20,7 +20,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000
/* USB */ -#define CONFIG_USB_XHCI_EXYNOS
/* DRAM Memory Banks */ #define SDRAM_BANK_SIZE (512UL << 20UL) /* 512 MB */

Hi,
2022년 6월 8일 (수) 21:26, Tom Rini trini@konsulko.com님이 작성:
This converts the following to Kconfig: CONFIG_USB_XHCI_EXYNOS CONFIG_USB_EHCI_EXYNOS
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/Kconfig | 16 ++++++++++++++++ include/configs/exynos5250-common.h | 5 ----- include/configs/exynos5420-common.h | 2 -- include/configs/odroid.h | 3 --- include/configs/odroid_xu3.h | 3 --- include/configs/smdk5420.h | 1 - 6 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 5d0855ffcc79..413bec0f4a1a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -32,6 +32,14 @@ config USB_XHCI_DWC3_OF_SIMPLE Support USB2/3 functionality in simple SoC integrations with USB controller based on the DesignWare USB3 IP Core.
+config USB_XHCI_EXYNOS
bool "Support for Samsung Exynos5 family on-chip xHCI USB
controller"
depends on ARCH_EXYNOS5
default y
help
Enables support for he on-chip xHCI controller on Samsung Exynos5
SoCs.
config USB_XHCI_MTK bool "Support for MediaTek on-chip xHCI USB controller" depends on ARCH_MEDIATEK @@ -157,6 +165,14 @@ config USB_EHCI_ATMEL ---help--- Enables support for the on-chip EHCI controller on Atmel chips.
+config USB_EHCI_EXYNOS
bool "Support for Samsung Exynos EHCI USB controller"
depends on ARCH_EXYNOS
default y
---help---
Enables support for the on-chip EHCI controller on Samsung Exynos
SoCs.
config USB_EHCI_MARVELL bool "Support for Marvell on-chip EHCI USB controller" depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X diff --git a/include/configs/exynos5250-common.h b/include/configs/exynos5250-common.h index 82cb8aff7b52..8d91a7de5cde 100644 --- a/include/configs/exynos5250-common.h +++ b/include/configs/exynos5250-common.h @@ -13,11 +13,6 @@
#define CONFIG_SYS_SDRAM_BASE 0x40000000
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS
-#define CONFIG_USB_XHCI_EXYNOS
/* DRAM Memory Banks */ #define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index 5e1aba7692e0..35bf3c2fb4a7 100644 --- a/include/configs/exynos5420-common.h +++ b/include/configs/exynos5420-common.h @@ -27,6 +27,4 @@ #define CONFIG_LOWPOWER_FLAG 0x02020028 #define CONFIG_LOWPOWER_ADDR 0x0202002C
-#define CONFIG_USB_XHCI_EXYNOS
#endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/odroid.h b/include/configs/odroid.h index dec658dd13a3..11a4a409dbaf 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -149,9 +149,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS
/*
- Supported Odroid boards: X3, U3
- TODO: Add Odroid X support
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 8d24a03b722d..476bde53572d 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -16,9 +16,6 @@
#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS
/* DFU */ #define DFU_DEFAULT_POLL_TIMEOUT 300 #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index f8d2fafd2788..48f6e27006f0 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -20,7 +20,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000
/* USB */
Why don't you delete this line too?
-#define CONFIG_USB_XHCI_EXYNOS
/* DRAM Memory Banks */
#define SDRAM_BANK_SIZE (512UL << 20UL) /* 512 MB */
2.25.1
Thanks.

On Thu, Jun 09, 2022 at 10:12:20AM +0900, Minkyu Kang wrote:
Hi,
2022년 6월 8일 (수) 21:26, Tom Rini trini@konsulko.com님이 작성:
This converts the following to Kconfig: CONFIG_USB_XHCI_EXYNOS CONFIG_USB_EHCI_EXYNOS
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/Kconfig | 16 ++++++++++++++++ include/configs/exynos5250-common.h | 5 ----- include/configs/exynos5420-common.h | 2 -- include/configs/odroid.h | 3 --- include/configs/odroid_xu3.h | 3 --- include/configs/smdk5420.h | 1 - 6 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 5d0855ffcc79..413bec0f4a1a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -32,6 +32,14 @@ config USB_XHCI_DWC3_OF_SIMPLE Support USB2/3 functionality in simple SoC integrations with USB controller based on the DesignWare USB3 IP Core.
+config USB_XHCI_EXYNOS
bool "Support for Samsung Exynos5 family on-chip xHCI USB
controller"
depends on ARCH_EXYNOS5
default y
help
Enables support for he on-chip xHCI controller on Samsung Exynos5
SoCs.
config USB_XHCI_MTK bool "Support for MediaTek on-chip xHCI USB controller" depends on ARCH_MEDIATEK @@ -157,6 +165,14 @@ config USB_EHCI_ATMEL ---help--- Enables support for the on-chip EHCI controller on Atmel chips.
+config USB_EHCI_EXYNOS
bool "Support for Samsung Exynos EHCI USB controller"
depends on ARCH_EXYNOS
default y
---help---
Enables support for the on-chip EHCI controller on Samsung Exynos
SoCs.
config USB_EHCI_MARVELL bool "Support for Marvell on-chip EHCI USB controller" depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X diff --git a/include/configs/exynos5250-common.h b/include/configs/exynos5250-common.h index 82cb8aff7b52..8d91a7de5cde 100644 --- a/include/configs/exynos5250-common.h +++ b/include/configs/exynos5250-common.h @@ -13,11 +13,6 @@
#define CONFIG_SYS_SDRAM_BASE 0x40000000
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS
-#define CONFIG_USB_XHCI_EXYNOS
/* DRAM Memory Banks */ #define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index 5e1aba7692e0..35bf3c2fb4a7 100644 --- a/include/configs/exynos5420-common.h +++ b/include/configs/exynos5420-common.h @@ -27,6 +27,4 @@ #define CONFIG_LOWPOWER_FLAG 0x02020028 #define CONFIG_LOWPOWER_ADDR 0x0202002C
-#define CONFIG_USB_XHCI_EXYNOS
#endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/odroid.h b/include/configs/odroid.h index dec658dd13a3..11a4a409dbaf 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -149,9 +149,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS
/*
- Supported Odroid boards: X3, U3
- TODO: Add Odroid X support
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 8d24a03b722d..476bde53572d 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -16,9 +16,6 @@
#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS
/* DFU */ #define DFU_DEFAULT_POLL_TIMEOUT 300 #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index f8d2fafd2788..48f6e27006f0 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -20,7 +20,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x20000000
/* USB */
Why don't you delete this line too?
Missed that one, thanks.

This converts the following to Kconfig: CONFIG_USB_XHCI_EXYNOS CONFIG_USB_EHCI_EXYNOS
Signed-off-by: Tom Rini trini@konsulko.com --- Changes in v2: - Remove another now useless comment (Minkyu) --- drivers/usb/host/Kconfig | 16 ++++++++++++++++ include/configs/exynos5250-common.h | 5 ----- include/configs/exynos5420-common.h | 2 -- include/configs/odroid.h | 3 --- include/configs/odroid_xu3.h | 3 --- include/configs/smdk5420.h | 3 --- 6 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 5d0855ffcc79..413bec0f4a1a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -32,6 +32,14 @@ config USB_XHCI_DWC3_OF_SIMPLE Support USB2/3 functionality in simple SoC integrations with USB controller based on the DesignWare USB3 IP Core.
+config USB_XHCI_EXYNOS + bool "Support for Samsung Exynos5 family on-chip xHCI USB controller" + depends on ARCH_EXYNOS5 + default y + help + Enables support for he on-chip xHCI controller on Samsung Exynos5 + SoCs. + config USB_XHCI_MTK bool "Support for MediaTek on-chip xHCI USB controller" depends on ARCH_MEDIATEK @@ -157,6 +165,14 @@ config USB_EHCI_ATMEL ---help--- Enables support for the on-chip EHCI controller on Atmel chips.
+config USB_EHCI_EXYNOS + bool "Support for Samsung Exynos EHCI USB controller" + depends on ARCH_EXYNOS + default y + ---help--- + Enables support for the on-chip EHCI controller on Samsung Exynos + SoCs. + config USB_EHCI_MARVELL bool "Support for Marvell on-chip EHCI USB controller" depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X diff --git a/include/configs/exynos5250-common.h b/include/configs/exynos5250-common.h index 82cb8aff7b52..8d91a7de5cde 100644 --- a/include/configs/exynos5250-common.h +++ b/include/configs/exynos5250-common.h @@ -13,11 +13,6 @@
#define CONFIG_SYS_SDRAM_BASE 0x40000000
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - -#define CONFIG_USB_XHCI_EXYNOS - /* DRAM Memory Banks */ #define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index 5e1aba7692e0..35bf3c2fb4a7 100644 --- a/include/configs/exynos5420-common.h +++ b/include/configs/exynos5420-common.h @@ -27,6 +27,4 @@ #define CONFIG_LOWPOWER_FLAG 0x02020028 #define CONFIG_LOWPOWER_ADDR 0x0202002C
-#define CONFIG_USB_XHCI_EXYNOS - #endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/odroid.h b/include/configs/odroid.h index dec658dd13a3..11a4a409dbaf 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -149,9 +149,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - /* * Supported Odroid boards: X3, U3 * TODO: Add Odroid X support diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 8d24a03b722d..476bde53572d 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -16,9 +16,6 @@
#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
-/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - /* DFU */ #define DFU_DEFAULT_POLL_TIMEOUT 300 #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index f8d2fafd2788..254d0d91046c 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -19,9 +19,6 @@
#define CONFIG_SYS_SDRAM_BASE 0x20000000
-/* USB */ -#define CONFIG_USB_XHCI_EXYNOS - /* DRAM Memory Banks */ #define SDRAM_BANK_SIZE (512UL << 20UL) /* 512 MB */

On Fri, Jun 10, 2022 at 11:03:00PM -0400, Tom Rini wrote:
This converts the following to Kconfig: CONFIG_USB_XHCI_EXYNOS CONFIG_USB_EHCI_EXYNOS
Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/next, thanks!

The deadline for DM_USB migration has passed and all users have been migrated. Remove now unused code.
Signed-off-by: Tom Rini trini@konsulko.com --- .../asm/arch-fsl-layerscape/immap_lsch2.h | 1 - arch/arm/include/asm/arch-ls102xa/config.h | 1 - arch/powerpc/cpu/mpc83xx/cpu_init.c | 13 ---- drivers/usb/host/ehci-fsl.c | 71 ------------------- include/usb/ehci-ci.h | 15 ---- 5 files changed, 101 deletions(-)
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h index 61db1738f33a..4b0f554e3363 100644 --- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h +++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h @@ -37,7 +37,6 @@ #define CONFIG_SYS_XHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x01f00000) #define CONFIG_SYS_XHCI_USB2_ADDR (CONFIG_SYS_IMMR + 0x02000000) #define CONFIG_SYS_XHCI_USB3_ADDR (CONFIG_SYS_IMMR + 0x02100000) -#define CONFIG_SYS_EHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x07600000) #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_IMMR + 0x2400000) #define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_IMMR + 0x2500000) #define CONFIG_SYS_PCIE3_ADDR (CONFIG_SYS_IMMR + 0x2600000) diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h index 3b1d9a3f0c40..2f3409e3e876 100644 --- a/arch/arm/include/asm/arch-ls102xa/config.h +++ b/arch/arm/include/asm/arch-ls102xa/config.h @@ -34,7 +34,6 @@ #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x011d0500) #define CONFIG_SYS_DCU_ADDR (CONFIG_SYS_IMMR + 0x01ce0000) #define CONFIG_SYS_XHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x02100000) -#define CONFIG_SYS_EHCI_USB1_ADDR (CONFIG_SYS_IMMR + 0x07600000)
#define CONFIG_SYS_FSL_SEC_OFFSET 0x00700000 #define CONFIG_SYS_FSL_JR0_OFFSET 0x00710000 diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c index e3e1bfd65a50..33835eeec2a8 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c @@ -251,19 +251,6 @@ void cpu_init_f (volatile immap_t * im) im->gpio[1].dat = CONFIG_SYS_GPIO2_DAT; im->gpio[1].dir = CONFIG_SYS_GPIO2_DIR; #endif -#if defined(CONFIG_USB_EHCI_FSL) && defined(CONFIG_ARCH_MPC831X) - uint32_t temp; - struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB1_ADDR; - - /* Configure interface. */ - setbits_be32(&ehci->control, REFSEL_16MHZ | UTMI_PHY_EN); - - /* Wait for clock to stabilize */ - do { - temp = __raw_readl(&ehci->control); - udelay(1000); - } while (!(temp & PHY_CLK_VALID)); -#endif }
int cpu_init_r (void) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index cf1f882441bf..82da339fd505 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -29,22 +29,15 @@ DECLARE_GLOBAL_DATA_PTR; #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 #endif
-#if CONFIG_IS_ENABLED(DM_USB) struct ehci_fsl_priv { struct ehci_ctrl ehci; fdt_addr_t hcd_base; char *phy_type; }; -#endif
static void set_txfifothresh(struct usb_ehci *, u32); -#if CONFIG_IS_ENABLED(DM_USB) static int ehci_fsl_init(struct ehci_fsl_priv *priv, struct usb_ehci *ehci, struct ehci_hccr *hccr, struct ehci_hcor *hcor); -#else -static int ehci_fsl_init(int index, struct usb_ehci *ehci, - struct ehci_hccr *hccr, struct ehci_hcor *hcor); -#endif
/* Check USB PHY clock valid */ static int usb_phy_clk_valid(struct usb_ehci *ehci) @@ -58,7 +51,6 @@ static int usb_phy_clk_valid(struct usb_ehci *ehci) } }
-#if CONFIG_IS_ENABLED(DM_USB) static int ehci_fsl_of_to_plat(struct udevice *dev) { struct ehci_fsl_priv *priv = dev_get_priv(dev); @@ -150,64 +142,11 @@ U_BOOT_DRIVER(ehci_fsl) = { .priv_auto = sizeof(struct ehci_fsl_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; -#else -/* - * Create the appropriate control structures to manage - * a new EHCI host controller. - * - * Excerpts from linux ehci fsl driver. - */ -int ehci_hcd_init(int index, enum usb_init_type init, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - struct ehci_ctrl *ehci_ctrl = container_of(hccr, - struct ehci_ctrl, hccr); - struct usb_ehci *ehci = NULL; - - switch (index) { - case 0: - ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB1_ADDR; - break; - case 1: - ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB2_ADDR; - break; - default: - printf("ERROR: wrong controller index!!\n"); - return -EINVAL; - }; - - *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); - *hcor = (struct ehci_hcor *)((uint32_t) *hccr + - HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); - - ehci_ctrl->has_fsl_erratum_a005275 = has_erratum_a005275(); - - return ehci_fsl_init(index, ehci, *hccr, *hcor); -}
-/* - * Destroy the appropriate control structures corresponding - * the the EHCI host controller. - */ -int ehci_hcd_stop(int index) -{ - return 0; -} -#endif - -#if CONFIG_IS_ENABLED(DM_USB) static int ehci_fsl_init(struct ehci_fsl_priv *priv, struct usb_ehci *ehci, struct ehci_hccr *hccr, struct ehci_hcor *hcor) -#else -static int ehci_fsl_init(int index, struct usb_ehci *ehci, - struct ehci_hccr *hccr, struct ehci_hcor *hcor) -#endif { const char *phy_type = NULL; -#if !CONFIG_IS_ENABLED(DM_USB) - size_t len; - char current_usb_controller[5]; -#endif #ifdef CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY char usb_phy[5];
@@ -230,18 +169,8 @@ static int ehci_fsl_init(int index, struct usb_ehci *ehci, out_be32(&ehci->snoop2, 0x80000000 | SNOOP_SIZE_2GB);
/* Init phy */ -#if CONFIG_IS_ENABLED(DM_USB) if (priv->phy_type) phy_type = priv->phy_type; -#else - memset(current_usb_controller, '\0', 5); - snprintf(current_usb_controller, sizeof(current_usb_controller), - "usb%d", index+1); - - if (hwconfig_sub(current_usb_controller, "phy_type")) - phy_type = hwconfig_subarg(current_usb_controller, - "phy_type", &len); -#endif else phy_type = env_get("usb_phy_type");
diff --git a/include/usb/ehci-ci.h b/include/usb/ehci-ci.h index 2cdb3146e863..bc980934585c 100644 --- a/include/usb/ehci-ci.h +++ b/include/usb/ehci-ci.h @@ -146,21 +146,6 @@ #define MPC83XX_SCCR_USB_DRCM_01 0x00100000 #define MPC83XX_SCCR_USB_DRCM_10 0x00200000
-#if defined(CONFIG_MPC83xx) -#define CONFIG_SYS_FSL_USB1_ADDR CONFIG_SYS_MPC83xx_USB1_ADDR -#if defined(CONFIG_ARCH_MPC834X) -#define CONFIG_SYS_FSL_USB2_ADDR CONFIG_SYS_MPC83xx_USB2_ADDR -#else -#define CONFIG_SYS_FSL_USB2_ADDR 0 -#endif -#elif defined(CONFIG_MPC85xx) -#define CONFIG_SYS_FSL_USB1_ADDR CONFIG_SYS_MPC85xx_USB1_ADDR -#define CONFIG_SYS_FSL_USB2_ADDR CONFIG_SYS_MPC85xx_USB2_ADDR -#elif defined(CONFIG_ARCH_LS1021A) || defined(CONFIG_ARCH_LS1012A) -#define CONFIG_SYS_FSL_USB1_ADDR CONFIG_SYS_EHCI_USB1_ADDR -#define CONFIG_SYS_FSL_USB2_ADDR 0 -#endif - /* * Increasing TX FIFO threshold value from 2 to 4 decreases * data burst rate with which data packets are posted from the TX

This converts the following to Kconfig: CONFIG_USB_EHCI_TXFIFO_THRESH
Signed-off-by: Tom Rini trini@konsulko.com --- README | 3 --- drivers/usb/host/Kconfig | 11 +++++++++++ include/configs/tegra114-common.h | 3 --- include/configs/tegra124-common.h | 3 --- include/configs/tegra20-common.h | 8 -------- include/configs/tegra210-common.h | 3 --- include/configs/tegra30-common.h | 3 --- 7 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/README b/README index 9800359e5dfe..3603a9a46a37 100644 --- a/README +++ b/README @@ -793,9 +793,6 @@ The following options need to be configured: Supported are USB Keyboards and USB Floppy drives (TEAC FD-05PUB).
- CONFIG_USB_EHCI_TXFIFO_THRESH enables setting of the - txfilltuning field in the EHCI controller on reset. - CONFIG_USB_DWC2_REG_ADDR the physical CPU address of the DWC2 HW module registers.
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 413bec0f4a1a..9c9d4dc947e4 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -284,6 +284,17 @@ config USB_EHCI_FSL select EHCI_HCD_INIT_AFTER_RESET ---help--- Enables support for the on-chip EHCI controller on FSL chips. + +config USB_EHCI_TXFIFO_THRESH + hex + depends on USB_EHCI_TEGRA + default 0x10 + help + This parameter affects a TXFILLTUNING field that controls how much + data is sent to the latency fifo before it is sent to the wire. + Without this parameter, the default (2) causes occasional Data Buffer + Errors in OUT packets depending on the buffer address and size. + endif # USB_EHCI_HCD
config USB_OHCI_HCD diff --git a/include/configs/tegra114-common.h b/include/configs/tegra114-common.h index 742083158948..87ec1f5a99d6 100644 --- a/include/configs/tegra114-common.h +++ b/include/configs/tegra114-common.h @@ -55,7 +55,4 @@
/* Defines for SPL */
-/* For USB EHCI controller */ -#define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 - #endif /* _TEGRA114_COMMON_H_ */ diff --git a/include/configs/tegra124-common.h b/include/configs/tegra124-common.h index 314486a1bcbd..f509784a8681 100644 --- a/include/configs/tegra124-common.h +++ b/include/configs/tegra124-common.h @@ -57,9 +57,6 @@
/* Defines for SPL */
-/* For USB EHCI controller */ -#define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 - /* GPU needs setup */ #define CONFIG_TEGRA_GPU
diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h index a2b14d8ead86..71867bb6baac 100644 --- a/include/configs/tegra20-common.h +++ b/include/configs/tegra20-common.h @@ -69,12 +69,4 @@ #define TEGRA_LP0_VEC #endif
-/* - * This parameter affects a TXFILLTUNING field that controls how much data is - * sent to the latency fifo before it is sent to the wire. Without this - * parameter, the default (2) causes occasional Data Buffer Errors in OUT - * packets depending on the buffer address and size. - */ -#define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 - #endif /* _TEGRA20_COMMON_H_ */ diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h index 3ba12bec0eed..e510820786e4 100644 --- a/include/configs/tegra210-common.h +++ b/include/configs/tegra210-common.h @@ -46,9 +46,6 @@ "fdt_addr_r=0x83000000\0" \ "ramdisk_addr_r=0x83420000\0"
-/* For USB EHCI controller */ -#define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 - /* GPU needs setup */ #define CONFIG_TEGRA_GPU
diff --git a/include/configs/tegra30-common.h b/include/configs/tegra30-common.h index a68da5ddfc89..04fcf11ed82d 100644 --- a/include/configs/tegra30-common.h +++ b/include/configs/tegra30-common.h @@ -52,7 +52,4 @@
/* Defines for SPL */
-/* For USB EHCI controller */ -#define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 - #endif /* _TEGRA30_COMMON_H_ */

The deadline for DM_USB migration has passed and all users have been migrated. Remove now unused code.
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/xhci-fsl.c | 47 ------------------------------------ include/linux/usb/xhci-fsl.h | 17 ------------- 2 files changed, 64 deletions(-)
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c index 80871908dc12..e67e09e31e4a 100644 --- a/drivers/usb/host/xhci-fsl.c +++ b/drivers/usb/host/xhci-fsl.c @@ -20,16 +20,11 @@ #include <dm.h>
/* Declare global data pointer */ -#if !CONFIG_IS_ENABLED(DM_USB) -static struct fsl_xhci fsl_xhci; -unsigned long ctr_addr[] = FSL_USB_XHCI_ADDR; -#else struct xhci_fsl_priv { struct xhci_ctrl xhci; fdt_addr_t hcd_base; struct fsl_xhci ctx; }; -#endif
__weak int __board_usb_init(int index, enum usb_init_type init) { @@ -108,7 +103,6 @@ static int fsl_xhci_core_exit(struct fsl_xhci *fsl_xhci) return 0; }
-#if CONFIG_IS_ENABLED(DM_USB) static int xhci_fsl_probe(struct udevice *dev) { struct xhci_fsl_priv *priv = dev_get_priv(dev); @@ -174,44 +168,3 @@ U_BOOT_DRIVER(xhci_fsl) = { .priv_auto = sizeof(struct xhci_fsl_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; -#else -int xhci_hcd_init(int index, struct xhci_hccr **hccr, struct xhci_hcor **hcor) -{ - struct fsl_xhci *ctx = &fsl_xhci; - int ret = 0; - - ctx->hcd = (struct xhci_hccr *)ctr_addr[index]; - ctx->dwc3_reg = (struct dwc3 *)((char *)(ctx->hcd) + DWC3_REG_OFFSET); - - ret = board_usb_init(index, USB_INIT_HOST); - if (ret != 0) { - puts("Failed to initialize board for USB\n"); - return ret; - } - - fsl_apply_xhci_errata(); - - ret = fsl_xhci_core_init(ctx); - if (ret < 0) { - puts("Failed to initialize xhci\n"); - return ret; - } - - *hccr = (struct xhci_hccr *)ctx->hcd; - *hcor = (struct xhci_hcor *)((uintptr_t) *hccr - + HC_LENGTH(xhci_readl(&(*hccr)->cr_capbase))); - - debug("fsl-xhci: init hccr %lx and hcor %lx hc_length %lx\n", - (uintptr_t)*hccr, (uintptr_t)*hcor, - (uintptr_t)HC_LENGTH(xhci_readl(&(*hccr)->cr_capbase))); - - return ret; -} - -void xhci_hcd_stop(int index) -{ - struct fsl_xhci *ctx = &fsl_xhci; - - fsl_xhci_core_exit(ctx); -} -#endif diff --git a/include/linux/usb/xhci-fsl.h b/include/linux/usb/xhci-fsl.h index 1367149c4ba7..40979f72fc68 100644 --- a/include/linux/usb/xhci-fsl.h +++ b/include/linux/usb/xhci-fsl.h @@ -53,21 +53,4 @@ struct fsl_xhci { struct dwc3 *dwc3_reg; };
-#if defined(CONFIG_ARCH_LS1021A) || defined(CONFIG_ARCH_LS1012A) -#define CONFIG_SYS_FSL_XHCI_USB1_ADDR CONFIG_SYS_XHCI_USB1_ADDR -#define CONFIG_SYS_FSL_XHCI_USB2_ADDR 0 -#define CONFIG_SYS_FSL_XHCI_USB3_ADDR 0 -#elif defined(CONFIG_ARCH_LS2080A) || defined(CONFIG_ARCH_LS1088A) -#define CONFIG_SYS_FSL_XHCI_USB1_ADDR CONFIG_SYS_XHCI_USB1_ADDR -#define CONFIG_SYS_FSL_XHCI_USB2_ADDR CONFIG_SYS_XHCI_USB2_ADDR -#define CONFIG_SYS_FSL_XHCI_USB3_ADDR 0 -#elif defined(CONFIG_ARCH_LS1043A) || defined(CONFIG_ARCH_LS1046A) -#define CONFIG_SYS_FSL_XHCI_USB1_ADDR CONFIG_SYS_XHCI_USB1_ADDR -#define CONFIG_SYS_FSL_XHCI_USB2_ADDR CONFIG_SYS_XHCI_USB2_ADDR -#define CONFIG_SYS_FSL_XHCI_USB3_ADDR CONFIG_SYS_XHCI_USB3_ADDR -#endif - -#define FSL_USB_XHCI_ADDR {CONFIG_SYS_FSL_XHCI_USB1_ADDR, \ - CONFIG_SYS_FSL_XHCI_USB2_ADDR, \ - CONFIG_SYS_FSL_XHCI_USB3_ADDR} #endif /* _ASM_ARCH_XHCI_FSL_H_ */

This converts the following to Kconfig: CONFIG_TEGRA_GPU
Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/mach-tegra/Kconfig | 4 ++++ configs/apalis-tk1_defconfig | 1 + configs/cei-tk1-som_defconfig | 1 + configs/jetson-tk1_defconfig | 1 + configs/nyan-big_defconfig | 1 + configs/p2371-0000_defconfig | 1 + configs/p2371-2180_defconfig | 1 + configs/p2571_defconfig | 1 + configs/p3450-0000_defconfig | 1 + configs/venice2_defconfig | 1 + include/configs/tegra124-common.h | 3 --- include/configs/tegra210-common.h | 3 --- 12 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 5309be9cc210..09ad2d6f5aec 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -178,6 +178,10 @@ source "arch/arm/mach-tegra/tegra124/Kconfig" source "arch/arm/mach-tegra/tegra210/Kconfig" source "arch/arm/mach-tegra/tegra186/Kconfig"
+config TEGRA_GPU + bool "Enable setting up the GPU" + depends on TEGRA124 || TEGRA210 + config CMD_ENTERRCM bool "Enable 'enterrcm' command" default y diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig index 0915bca64214..39ee46dbec73 100644 --- a/configs/apalis-tk1_defconfig +++ b/configs/apalis-tk1_defconfig @@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-apalis" CONFIG_SPL_TEXT_BASE=0x80108000 CONFIG_TEGRA124=y CONFIG_TARGET_APALIS_TK1=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_FIT=y CONFIG_FIT_VERBOSE=y diff --git a/configs/cei-tk1-som_defconfig b/configs/cei-tk1-som_defconfig index f55848ab2c0a..35f8d9c78177 100644 --- a/configs/cei-tk1-som_defconfig +++ b/configs/cei-tk1-som_defconfig @@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-cei-tk1-som" CONFIG_SPL_TEXT_BASE=0x80108000 CONFIG_TEGRA124=y CONFIG_TARGET_CEI_TK1_SOM=y +CONFIG_TEGRA_GPU=y CONFIG_ARMV7_PSCI_0_1=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_OF_SYSTEM_SETUP=y diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig index b0c7ea3b994e..515fa23b249c 100644 --- a/configs/jetson-tk1_defconfig +++ b/configs/jetson-tk1_defconfig @@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-jetson-tk1" CONFIG_SPL_TEXT_BASE=0x80108000 CONFIG_TEGRA124=y CONFIG_TARGET_JETSON_TK1=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig index 489ff63595c9..a48920cc99da 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -13,6 +13,7 @@ CONFIG_DEBUG_UART_BASE=0x70006000 CONFIG_DEBUG_UART_CLOCK=408000000 CONFIG_TEGRA124=y CONFIG_TARGET_NYAN_BIG=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x82408000 CONFIG_DEBUG_UART=y CONFIG_FIT=y diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig index d93b355d47d8..dcba51de8e56 100644 --- a/configs/p2371-0000_defconfig +++ b/configs/p2371-0000_defconfig @@ -8,6 +8,7 @@ CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2371-0000" CONFIG_TEGRA210=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x80080000 CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig index 74125c15a876..f8a8407a7f81 100644 --- a/configs/p2371-2180_defconfig +++ b/configs/p2371-2180_defconfig @@ -10,6 +10,7 @@ CONFIG_ENV_OFFSET=0xFFFFE000 CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2371-2180" CONFIG_TEGRA210=y CONFIG_TARGET_P2371_2180=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x80080000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig index b4e14add1d76..031549470f7b 100644 --- a/configs/p2571_defconfig +++ b/configs/p2571_defconfig @@ -9,6 +9,7 @@ CONFIG_ENV_OFFSET=0xFFFFE000 CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2571" CONFIG_TEGRA210=y CONFIG_TARGET_P2571=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x80080000 CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig index fbe4aea1bd38..7604e8a12231 100644 --- a/configs/p3450-0000_defconfig +++ b/configs/p3450-0000_defconfig @@ -11,6 +11,7 @@ CONFIG_ENV_SECT_SIZE=0x1000 CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3450-0000" CONFIG_TEGRA210=y CONFIG_TARGET_P3450_0000=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x80080000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig index 25ee96a1ddff..db455f4d9763 100644 --- a/configs/venice2_defconfig +++ b/configs/venice2_defconfig @@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-venice2" CONFIG_SPL_TEXT_BASE=0x80108000 CONFIG_TEGRA124=y CONFIG_TARGET_VENICE2=y +CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y diff --git a/include/configs/tegra124-common.h b/include/configs/tegra124-common.h index f509784a8681..0485fea6ccb8 100644 --- a/include/configs/tegra124-common.h +++ b/include/configs/tegra124-common.h @@ -57,7 +57,4 @@
/* Defines for SPL */
-/* GPU needs setup */ -#define CONFIG_TEGRA_GPU - #endif /* _TEGRA124_COMMON_H_ */ diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h index e510820786e4..7f361d874af8 100644 --- a/include/configs/tegra210-common.h +++ b/include/configs/tegra210-common.h @@ -46,7 +46,4 @@ "fdt_addr_r=0x83000000\0" \ "ramdisk_addr_r=0x83420000\0"
-/* GPU needs setup */ -#define CONFIG_TEGRA_GPU - #endif /* _TEGRA210_COMMON_H_ */

These particular code paths aren't used anymore, remove.
Signed-off-by: Tom Rini trini@konsulko.com --- arch/powerpc/include/asm/immap_83xx.h | 22 ---------------------- board/freescale/p2041rdb/p2041rdb.c | 2 +- include/configs/P2041RDB.h | 5 ----- include/configs/corenet_ds.h | 5 ----- 4 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/arch/powerpc/include/asm/immap_83xx.h b/arch/powerpc/include/asm/immap_83xx.h index d2443dc90d50..6d1ddbcd27b5 100644 --- a/arch/powerpc/include/asm/immap_83xx.h +++ b/arch/powerpc/include/asm/immap_83xx.h @@ -666,19 +666,6 @@ typedef struct immap { u8 res7[0xC0000]; } immap_t;
-#ifndef CONFIG_ARCH_MPC834X -#ifdef CONFIG_HAS_FSL_MPH_USB -#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0x22000 /* use the MPH controller */ -#define CONFIG_SYS_MPC83xx_USB2_OFFSET 0 -#else -#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0 -#define CONFIG_SYS_MPC83xx_USB2_OFFSET 0x23000 /* use the DR controller */ -#endif -#else -#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0x22000 -#define CONFIG_SYS_MPC83xx_USB2_OFFSET 0x23000 -#endif - #elif defined(CONFIG_ARCH_MPC8313) typedef struct immap { sysconf83xx_t sysconf; /* System configuration */ @@ -944,15 +931,6 @@ struct ccsr_gpio { #define CONFIG_SYS_MPC83xx_ESDHC_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_ESDHC_OFFSET)
-#ifndef CONFIG_SYS_MPC83xx_USB1_OFFSET -#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0x23000 -#endif -#define CONFIG_SYS_MPC83xx_USB1_ADDR \ - (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB1_OFFSET) -#if defined(CONFIG_ARCH_MPC834X) -#define CONFIG_SYS_MPC83xx_USB2_ADDR \ - (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB2_OFFSET) -#endif #define CONFIG_SYS_LBC_ADDR (&((immap_t *)CONFIG_SYS_IMMR)->im_lbc)
#define CONFIG_SYS_TSEC1_OFFSET 0x24000 diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index 5bd2b9950602..2a84e9bdf556 100644 --- a/board/freescale/p2041rdb/p2041rdb.c +++ b/board/freescale/p2041rdb/p2041rdb.c @@ -229,7 +229,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
fdt_fixup_memory(blob, (u64)base, (u64)size);
-#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB) +#if defined(CONFIG_HAS_FSL_DR_USB) fsl_fdt_fixup_dr_usb(blob, bd); #endif
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index 261e9872a7a1..38acb38690d8 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -373,11 +373,6 @@ #define CONFIG_LOADS_ECHO /* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
-/* -* USB -*/ -#define CONFIG_HAS_FSL_MPH_USB - #ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index ce9e51170582..56b56e8a2e2c 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -371,11 +371,6 @@ #define CONFIG_LOADS_ECHO /* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
-/* -* USB -*/ -#define CONFIG_HAS_FSL_MPH_USB - #ifdef CONFIG_MMC #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT

There are no platforms enabling this driver, remove.
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/Makefile | 1 - drivers/usb/host/ehci-mxc.c | 148 ------------------------------------ 2 files changed, 149 deletions(-) delete mode 100644 drivers/usb/host/ehci-mxc.c
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 7785b3744ef7..5fdb8041167a 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -30,7 +30,6 @@ obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o obj-$(CONFIG_USB_EHCI_FARADAY) += ehci-faraday.o obj-$(CONFIG_USB_EHCI_GENERIC) += ehci-generic.o obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o -obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_EHCI_MXS) += ehci-mxs.o obj-$(CONFIG_USB_EHCI_MX5) += ehci-mx5.o obj-$(CONFIG_USB_EHCI_MX6) += ehci-mx6.o diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c deleted file mode 100644 index 1fb685e58d80..000000000000 --- a/drivers/usb/host/ehci-mxc.c +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2009 Daniel Mack daniel@caiaq.de - */ - - -#include <common.h> -#include <usb.h> -#include <asm/io.h> -#include <asm/arch/imx-regs.h> -#include <linux/delay.h> -#include <usb/ehci-ci.h> -#include <errno.h> - -#include "ehci.h" - -#define USBCTRL_OTGBASE_OFFSET 0x600 - -#define MX25_OTG_SIC_SHIFT 29 -#define MX25_OTG_SIC_MASK (0x3 << MX25_OTG_SIC_SHIFT) -#define MX25_OTG_PM_BIT (1 << 24) -#define MX25_OTG_PP_BIT (1 << 11) -#define MX25_OTG_OCPOL_BIT (1 << 3) - -#define MX25_H1_SIC_SHIFT 21 -#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT) -#define MX25_H1_PP_BIT (1 << 18) -#define MX25_H1_PM_BIT (1 << 16) -#define MX25_H1_IPPUE_UP_BIT (1 << 7) -#define MX25_H1_IPPUE_DOWN_BIT (1 << 6) -#define MX25_H1_TLL_BIT (1 << 5) -#define MX25_H1_USBTE_BIT (1 << 4) -#define MX25_H1_OCPOL_BIT (1 << 2) - -#define MX31_OTG_SIC_SHIFT 29 -#define MX31_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT) -#define MX31_OTG_PM_BIT (1 << 24) - -#define MX31_H2_SIC_SHIFT 21 -#define MX31_H2_SIC_MASK (0x3 << MX31_H2_SIC_SHIFT) -#define MX31_H2_PM_BIT (1 << 16) -#define MX31_H2_DT_BIT (1 << 5) - -#define MX31_H1_SIC_SHIFT 13 -#define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT) -#define MX31_H1_PM_BIT (1 << 8) -#define MX31_H1_DT_BIT (1 << 4) - -#define MX35_OTG_SIC_SHIFT 29 -#define MX35_OTG_SIC_MASK (0x3 << MX35_OTG_SIC_SHIFT) -#define MX35_OTG_PM_BIT (1 << 24) -#define MX35_OTG_PP_BIT (1 << 11) -#define MX35_OTG_OCPOL_BIT (1 << 3) - -#define MX35_H1_SIC_SHIFT 21 -#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) -#define MX35_H1_PP_BIT (1 << 18) -#define MX35_H1_PM_BIT (1 << 16) -#define MX35_H1_IPPUE_UP_BIT (1 << 7) -#define MX35_H1_IPPUE_DOWN_BIT (1 << 6) -#define MX35_H1_TLL_BIT (1 << 5) -#define MX35_H1_USBTE_BIT (1 << 4) -#define MX35_H1_OCPOL_BIT (1 << 2) - -static int mxc_set_usbcontrol(int port, unsigned int flags) -{ - unsigned int v; - - v = readl(IMX_USB_BASE + USBCTRL_OTGBASE_OFFSET); -#if defined(CONFIG_MX31) - switch (port) { - case 0: /* OTG port */ - v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT); - v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_OTG_SIC_SHIFT; - - if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) - v |= MX31_OTG_PM_BIT; - - break; - case 1: /* H1 port */ - v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT | MX31_H1_DT_BIT); - v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_H1_SIC_SHIFT; - - if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) - v |= MX31_H1_PM_BIT; - - if (!(flags & MXC_EHCI_TTL_ENABLED)) - v |= MX31_H1_DT_BIT; - - break; - case 2: /* H2 port */ - v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT | MX31_H2_DT_BIT); - v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX31_H2_SIC_SHIFT; - - if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) - v |= MX31_H2_PM_BIT; - - if (!(flags & MXC_EHCI_TTL_ENABLED)) - v |= MX31_H2_DT_BIT; - - break; - default: - return -EINVAL; - } -#else -#error MXC EHCI USB driver not supported on this platform -#endif - writel(v, IMX_USB_BASE + USBCTRL_OTGBASE_OFFSET); - - return 0; -} - -int ehci_hcd_init(int index, enum usb_init_type init, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - struct usb_ehci *ehci; -#ifdef CONFIG_MX31 - struct clock_control_regs *sc_regs = - (struct clock_control_regs *)CCM_BASE; - - __raw_readl(&sc_regs->ccmr); - __raw_writel(__raw_readl(&sc_regs->ccmr) | (1 << 9), &sc_regs->ccmr) ; -#endif - - udelay(80); - - ehci = (struct usb_ehci *)(IMX_USB_BASE + - IMX_USB_PORT_OFFSET * CONFIG_MXC_USB_PORT); - *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); - *hcor = (struct ehci_hcor *)((uint32_t) *hccr + - HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); - setbits_le32(&ehci->usbmode, CM_HOST); - __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); - mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); - - udelay(10000); - - return 0; -} - -/* - * Destroy the appropriate control structures corresponding - * the the EHCI host controller. - */ -int ehci_hcd_stop(int index) -{ - return 0; -}

The deadline for DM_USB migration has passed and all users have been migrated. Remove now unused code.
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/ehci-mx5.c | 47 ------------------------------------- 1 file changed, 47 deletions(-)
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c index ab863f41b24e..964a53bb7c0e 100644 --- a/drivers/usb/host/ehci-mx5.c +++ b/drivers/usb/host/ehci-mx5.c @@ -228,52 +228,6 @@ __weak void mx5_ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg, mdelay(50); }
-#if !CONFIG_IS_ENABLED(DM_USB) -static const struct ehci_ops mx5_ehci_ops = { - .powerup_fixup = mx5_ehci_powerup_fixup, -}; - -int ehci_hcd_init(int index, enum usb_init_type init, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - struct usb_ehci *ehci; - - /* The only user for this is efikamx-usb */ - ehci_set_controller_priv(index, NULL, &mx5_ehci_ops); - set_usboh3_clk(); - enable_usboh3_clk(true); - set_usb_phy_clk(); - enable_usb_phy1_clk(true); - enable_usb_phy2_clk(true); - mdelay(1); - - /* Do board specific initialization */ - board_ehci_hcd_init(CONFIG_MXC_USB_PORT); - - ehci = (struct usb_ehci *)(OTG_BASE_ADDR + - (0x200 * CONFIG_MXC_USB_PORT)); - *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); - *hcor = (struct ehci_hcor *)((uint32_t)*hccr + - HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); - setbits_le32(&ehci->usbmode, CM_HOST); - - __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); - setbits_le32(&ehci->portsc, USB_EN); - - mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); - mdelay(10); - - /* Do board specific post-initialization */ - board_ehci_hcd_postinit(ehci, CONFIG_MXC_USB_PORT); - - return 0; -} - -int ehci_hcd_stop(int index) -{ - return 0; -} -#else /* CONFIG_IS_ENABLED(DM_USB) */ struct ehci_mx5_priv_data { struct ehci_ctrl ctrl; struct usb_ehci *ehci; @@ -372,4 +326,3 @@ U_BOOT_DRIVER(usb_mx5) = { .priv_auto = sizeof(struct ehci_mx5_priv_data), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; -#endif /* !CONFIG_IS_ENABLED(DM_USB) */

We want to keep all of the default values for SPL_LDSCRIPT in the same place both for overall clarity as well as not polluting unrelated config files.
Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/Kconfig | 10 ---------- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 3 --- arch/arm/mach-at91/Kconfig | 4 ---- arch/arm/mach-davinci/Kconfig | 3 --- arch/arm/mach-exynos/Kconfig | 3 --- arch/arm/mach-omap2/Kconfig | 3 --- arch/arm/mach-rockchip/rk3368/Kconfig | 3 --- arch/arm/mach-sunxi/Kconfig | 4 ---- arch/arm/mach-zynq/Kconfig | 3 --- board/ti/am64x/Kconfig | 3 --- board/ti/am65x/Kconfig | 3 --- board/ti/j721e/Kconfig | 6 ------ board/ti/j721s2/Kconfig | 3 --- common/spl/Kconfig | 12 ++++++++++++ 14 files changed, 12 insertions(+), 51 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9898c7d68e1b..fa113e443ad2 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -991,11 +991,6 @@ config ARCH_MX6 imply SYS_THUMB_BUILD imply SPL_SEPARATE_BSS
-if ARCH_MX6 -config SPL_LDSCRIPT - default "arch/arm/mach-omap2/u-boot-spl.lds" -endif - config ARCH_MX5 bool "Freescale MX5" select BOARD_EARLY_INIT_F @@ -2348,8 +2343,3 @@ source "board/xen/xenguest_arm64/Kconfig" source "arch/arm/Kconfig.debug"
endmenu - -config SPL_LDSCRIPT - default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK - default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136 - default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64 diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 80a1642447d6..5a809b46118c 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -701,9 +701,6 @@ config SYS_FSL_HAS_RGMII bool depends on SYS_FSL_EC1 || SYS_FSL_EC2
-config SPL_LDSCRIPT - default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A - config HAS_FSL_XHCI_USB bool help diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 4fee9772bf1c..11bfd5afe745 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -377,8 +377,4 @@ source "board/siemens/corvus/Kconfig" source "board/siemens/taurus/Kconfig" source "board/siemens/smartweb/Kconfig"
-config SPL_LDSCRIPT - default "arch/arm/mach-at91/arm926ejs/u-boot-spl.lds" if CPU_ARM926EJS - default "arch/arm/mach-at91/armv7/u-boot-spl.lds" if CPU_V7A - endif diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 6eca8db6d5ff..25c5db49915b 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -134,7 +134,4 @@ endif source "board/davinci/da8xxevm/Kconfig" source "board/lego/ev3/Kconfig"
-config SPL_LDSCRIPT - default "board/davinci/da8xxevm/u-boot-spl-da850evm.lds" - endif diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index f73dbbb507d1..77fb9d1775bb 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -201,7 +201,4 @@ source "board/samsung/smdk5420/Kconfig" source "board/samsung/espresso7420/Kconfig" source "board/samsung/axy17lte/Kconfig"
-config SPL_LDSCRIPT - default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4 - endif diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index e1b9180a3bb3..51d1db4a87b0 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -190,7 +190,4 @@ source "board/compulab/cm_t335/Kconfig" source "board/compulab/cm_t43/Kconfig" source "board/phytec/phycore_am335x_r2/Kconfig"
-config SPL_LDSCRIPT - default "arch/arm/mach-omap2/u-boot-spl.lds" - endif diff --git a/arch/arm/mach-rockchip/rk3368/Kconfig b/arch/arm/mach-rockchip/rk3368/Kconfig index 25afd3cb6077..c3249a7be457 100644 --- a/arch/arm/mach-rockchip/rk3368/Kconfig +++ b/arch/arm/mach-rockchip/rk3368/Kconfig @@ -65,9 +65,6 @@ source "board/rockchip/sheep_rk3368/Kconfig" source "board/geekbuying/geekbox/Kconfig" source "board/rockchip/evb_px5/Kconfig"
-config SPL_LDSCRIPT - default "arch/arm/cpu/armv8/u-boot-spl.lds" - config SPL_STACK_R_ADDR default 0x04000000
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index e712a8953408..71a7f8dcee06 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -1,9 +1,5 @@ if ARCH_SUNXI
-config SPL_LDSCRIPT - default "arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds" if MACH_SUNIV - default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if !ARM64 - config IDENT_STRING default " Allwinner Technology"
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index cf2e727916ba..b4c439b4cd6d 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig @@ -1,8 +1,5 @@ if ARCH_ZYNQ
-config SPL_LDSCRIPT - default "arch/arm/mach-zynq/u-boot-spl.lds" - config SPL_FS_FAT default y
diff --git a/board/ti/am64x/Kconfig b/board/ti/am64x/Kconfig index d4ec759d7f97..8036947e3450 100644 --- a/board/ti/am64x/Kconfig +++ b/board/ti/am64x/Kconfig @@ -54,9 +54,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "am64x_evm"
-config SPL_LDSCRIPT - default "arch/arm/mach-omap2/u-boot-spl.lds" - source "board/ti/common/Kconfig"
endif diff --git a/board/ti/am65x/Kconfig b/board/ti/am65x/Kconfig index 47b41cd6afe4..16a7476d9c4b 100644 --- a/board/ti/am65x/Kconfig +++ b/board/ti/am65x/Kconfig @@ -53,9 +53,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "am65x_evm"
-config SPL_LDSCRIPT - default "arch/arm/mach-omap2/u-boot-spl.lds" - source "board/ti/common/Kconfig"
endif diff --git a/board/ti/j721e/Kconfig b/board/ti/j721e/Kconfig index c28752a658b3..d19d30d59ef7 100644 --- a/board/ti/j721e/Kconfig +++ b/board/ti/j721e/Kconfig @@ -75,9 +75,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "j721e_evm"
-config SPL_LDSCRIPT - default "arch/arm/mach-omap2/u-boot-spl.lds" - source "board/ti/common/Kconfig"
endif @@ -108,9 +105,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "j721e_evm"
-config SPL_LDSCRIPT - default "arch/arm/mach-omap2/u-boot-spl.lds" - source "board/ti/common/Kconfig"
endif diff --git a/board/ti/j721s2/Kconfig b/board/ti/j721s2/Kconfig index 2e115f14171d..6141798333c0 100644 --- a/board/ti/j721s2/Kconfig +++ b/board/ti/j721s2/Kconfig @@ -55,9 +55,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "j721s2_evm"
-config SPL_LDSCRIPT - default "arch/arm/mach-omap2/u-boot-spl.lds" - source "board/ti/common/Kconfig"
endif diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2ad2351c6eb3..42f2c95228a6 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -221,6 +221,18 @@ config SPL_HANDOFF
config SPL_LDSCRIPT string "Linker script for the SPL stage" + default "arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds" if MACH_SUNIV + default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if ARCH_SUNXI && !MACH_SUNIV && !ARM64 + default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK + default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136 + default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A + default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64 + default "arch/arm/mach-at91/arm926ejs/u-boot-spl.lds" if ARCH_AT91 && CPU_ARM926EJS + default "arch/arm/mach-at91/armv7/u-boot-spl.lds" if ARCH_AT91 && CPU_V7A + default "arch/arm/mach-omap2/u-boot-spl.lds" if ARCH_MX6 || ARCH_OMAP2PLUS || (ARCH_K3 && !ARM64) + default "arch/arm/mach-zynq/u-boot-spl.lds" if ARCH_ZYNQ + default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4 + default "board/davinci/da8xxevm/u-boot-spl-da850evm.lds" if ARCH_DAVINCI default "arch/$(ARCH)/cpu/u-boot-spl.lds" help The SPL stage will usually require a different linker-script

Tighten up symbol dependencies in a number of places. Ensure that a SPL specific option has at least a direct dependency on SPL. In places where it's clear that we depend on something more specific, use that dependency instead. This means in a very small number of places we can drop redundant dependencies.
Reported-by: Pali Rohár pali@kernel.org Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/Kconfig | 1 - arch/x86/Kconfig | 1 + boot/Kconfig | 2 +- common/Kconfig | 3 ++- configs/at91sam9n12ek_nandflash_defconfig | 4 +--- configs/at91sam9x5ek_dataflash_defconfig | 4 +--- configs/at91sam9x5ek_nandflash_defconfig | 4 +--- configs/sama5d36ek_cmp_nandflash_defconfig | 4 +--- configs/socfpga_secu1_defconfig | 1 + drivers/firmware/Kconfig | 2 +- drivers/gpio/Kconfig | 4 ++-- drivers/i2c/muxes/Kconfig | 2 +- drivers/led/Kconfig | 4 ++-- drivers/mmc/Kconfig | 6 +++++- drivers/mtd/nand/raw/Kconfig | 6 ++++-- drivers/mtd/spi/Kconfig | 2 +- drivers/power/Kconfig | 1 + drivers/power/acpi_pmc/Kconfig | 1 + drivers/power/regulator/Kconfig | 12 ++++++------ fs/cbfs/Kconfig | 1 + lib/Kconfig | 8 +++++++- lib/crypto/Kconfig | 4 ++-- lib/ecdsa/Kconfig | 1 + lib/rsa/Kconfig | 1 + test/Kconfig | 1 + 25 files changed, 46 insertions(+), 34 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fa113e443ad2..da661ce30b03 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1111,7 +1111,6 @@ config ARCH_SOCFPGA select SPL_DM_SERIAL select SPL_LIBCOMMON_SUPPORT select SPL_LIBGENERIC_SUPPORT - select SPL_NAND_SUPPORT if SPL_NAND_DENALI select SPL_OF_CONTROL select SPL_SEPARATE_BSS if TARGET_SOCFPGA_SOC64 select SPL_SERIAL diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7cbfd6c97208..6b3765c997da 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -945,6 +945,7 @@ config ACPI_GPE
config SPL_ACPI_GPE bool "Support ACPI general-purpose events in SPL" + depends on SPL help Enable a driver for ACPI GPEs to allow peripherals to send interrupts via ACPI to the OS. In U-Boot this is only used when U-Boot itself diff --git a/boot/Kconfig b/boot/Kconfig index 08451c65a56b..1aee2de8f302 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -613,7 +613,7 @@ config BOOTSTAGE
config SPL_BOOTSTAGE bool "Boot timing and reported in SPL" - depends on BOOTSTAGE + depends on BOOTSTAGE && SPL help Enable recording of boot time in SPL. To make this visible to U-Boot proper, enable BOOTSTAGE_STASH as well. This will stash the timing diff --git a/common/Kconfig b/common/Kconfig index 84db2e43f155..079670ddd12f 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -83,6 +83,7 @@ config LOGLEVEL
config SPL_LOGLEVEL int + depends on SPL default LOGLEVEL
config TPL_LOGLEVEL @@ -365,7 +366,7 @@ config LOG_SYSLOG
config SPL_LOG bool "Enable logging support in SPL" - depends on LOG + depends on LOG && SPL help This enables support for logging of status and debug messages. These can be displayed on the console, recorded in a memory buffer, or diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig index 3697d86015d7..cffa5b309c9a 100644 --- a/configs/at91sam9n12ek_nandflash_defconfig +++ b/configs/at91sam9n12ek_nandflash_defconfig @@ -48,9 +48,7 @@ CONFIG_AT91_GPIO=y CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_NAND_ATMEL=y -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig index 6bdf18099dc6..7a428fba191b 100644 --- a/configs/at91sam9x5ek_dataflash_defconfig +++ b/configs/at91sam9x5ek_dataflash_defconfig @@ -55,9 +55,7 @@ CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_MTD_RAW_NAND=y CONFIG_NAND_ATMEL=y -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig index 9b5842cbd363..813bd15ecf22 100644 --- a/configs/at91sam9x5ek_nandflash_defconfig +++ b/configs/at91sam9x5ek_nandflash_defconfig @@ -54,9 +54,7 @@ CONFIG_AT91_GPIO=y CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_NAND_ATMEL=y -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig index 1b8038898eb6..a75784d24c29 100644 --- a/configs/sama5d36ek_cmp_nandflash_defconfig +++ b/configs/sama5d36ek_cmp_nandflash_defconfig @@ -53,11 +53,9 @@ CONFIG_AT91_GPIO=y CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_NAND_ATMEL=y +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_PMECC_CAP=4 -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SYS_NAND_ONFI_DETECTION=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/socfpga_secu1_defconfig b/configs/socfpga_secu1_defconfig index 72cf0d1bc88b..4a244e17bc48 100644 --- a/configs/socfpga_secu1_defconfig +++ b/configs/socfpga_secu1_defconfig @@ -42,6 +42,7 @@ CONFIG_SPL_STACK=0x0 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x1 # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE is not set CONFIG_SPL_MTD_SUPPORT=y +CONFIG_SPL_NAND_SUPPORT=y CONFIG_SYS_MAXARGS=32 CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index ef958b3a7a4e..c897c1fbf7a1 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -3,7 +3,7 @@ config FIRMWARE
config SPL_FIRMWARE bool "Enable Firmware driver support in SPL" - depends on FIRMWARE + depends on FIRMWARE && SPL
config SPL_ARM_PSCI_FW bool diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 149a62ffe611..8ab22ed81735 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -89,7 +89,7 @@ config DM_GPIO_LOOKUP_LABEL
config SPL_DM_GPIO_LOOKUP_LABEL bool "Enable searching for gpio labelnames" - depends on DM_GPIO && SPL_DM && SPL_GPIO + depends on SPL_DM_GPIO help This option enables searching for gpio names in the defined gpio labels, if the search for the @@ -490,7 +490,7 @@ config DM_PCA953X
config SPL_DM_PCA953X bool "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports in SPL" - depends on DM_GPIO + depends on SPL_DM_GPIO help Say yes here to provide access to several register-oriented SMBus I/O expanders, made mostly by NXP or TI. Compatible diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index 39683fc43b49..323c4fbe9ccc 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig @@ -9,7 +9,7 @@ config I2C_MUX
config SPL_I2C_MUX bool "Support I2C multiplexers on SPL" - depends on I2C_MUX + depends on SPL && I2C_MUX help This enables I2C buses to be multiplexed, so that you can select one of several buses using some sort of control mechanism. The diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig index 418ed215c57b..ccdd7d7395c8 100644 --- a/drivers/led/Kconfig +++ b/drivers/led/Kconfig @@ -67,7 +67,7 @@ config LED_BLINK
config SPL_LED bool "Enable LED support in SPL" - depends on SPL && SPL_DM + depends on SPL_DM help The LED subsystem adds a small amount of overhead to the image. If this is acceptable and you have a need to use LEDs in SPL, @@ -85,7 +85,7 @@ config LED_GPIO
config SPL_LED_GPIO bool "LED support for GPIO-connected LEDs in SPL" - depends on SPL_LED && DM_GPIO + depends on SPL_LED && SPL_DM_GPIO help This option is an SPL-variant of the LED_GPIO option. See the help of LED_GPIO for details. diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index c8f9709d2d49..082352f1f27c 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -123,6 +123,7 @@ config MMC_IO_VOLTAGE
config SPL_MMC_IO_VOLTAGE bool "Support IO voltage configuration in SPL" + depends on SPL_MMC help IO voltage configuration allows selecting the voltage level of the IO lines (not the level of main supply). This is required for UHS @@ -153,6 +154,7 @@ config MMC_HS400_ES_SUPPORT
config SPL_MMC_HS400_ES_SUPPORT bool "enable HS400 Enhanced Strobe support in SPL" + depends on SPL_MMC help The HS400 Enhanced Strobe mode is support by some eMMC. The bus frequency is up to 200MHz. This mode does not tune the IO. @@ -166,6 +168,7 @@ config MMC_HS400_SUPPORT
config SPL_MMC_HS400_SUPPORT bool "enable HS400 support in SPL" + depends on SPL_MMC select SPL_MMC_HS200_SUPPORT help The HS400 mode is support by some eMMC. The bus frequency is up to @@ -179,6 +182,7 @@ config MMC_HS200_SUPPORT
config SPL_MMC_HS200_SUPPORT bool "enable HS200 support in SPL" + depends on SPL_MMC help The HS200 mode is support by some eMMC. The bus frequency is up to 200MHz. This mode requires tuning the IO. @@ -478,7 +482,7 @@ config MMC_SDHCI_ADMA
config SPL_MMC_SDHCI_ADMA bool "Support SDHCI ADMA2 in SPL" - depends on MMC_SDHCI + depends on SPL_MMC && MMC_SDHCI select MMC_SDHCI_ADMA_HELPERS help This enables support for the ADMA (Advanced DMA) defined diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 4129a33866bf..190300fc1790 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -73,6 +73,7 @@ config PMECC_SECTOR_SIZE
config SPL_GENERATE_ATMEL_PMECC_HEADER bool "Atmel PMECC Header Generation" + depends on SPL select ATMEL_NAND_HWECC select ATMEL_NAND_HW_PMECC help @@ -647,7 +648,7 @@ config SYS_NAND_U_BOOT_OFFS_REDUND
config SPL_NAND_AM33XX_BCH bool "Enables SPL-NAND driver which supports ELM based" - depends on NAND_OMAP_GPMC && !OMAP34XX + depends on SPL_NAND_SUPPORT && NAND_OMAP_GPMC && !OMAP34XX default y help Hardware ECC correction. This is useful for platforms which have ELM @@ -658,6 +659,7 @@ config SPL_NAND_AM33XX_BCH
config SPL_NAND_DENALI bool "Support Denali NAND controller for SPL" + depends on SPL_NAND_SUPPORT help This is a small implementation of the Denali NAND controller for use on SPL. @@ -673,7 +675,7 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
config SPL_NAND_SIMPLE bool "Use simple SPL NAND driver" - depends on !SPL_NAND_AM33XX_BCH + depends on !SPL_NAND_AM33XX_BCH && SPL_NAND_SUPPORT help Support for NAND boot using simple NAND drivers that expose the cmd_ctrl() interface. diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index f350c7e5dc21..f83876c57613 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -248,7 +248,7 @@ config SPI_FLASH_MTD
config SPL_SPI_FLASH_MTD bool "SPI flash MTD support for SPL" - depends on SPI_FLASH + depends on SPI_FLASH && SPL help Enable the MTD support for the SPI flash layer in SPL.
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 2c20dc7c8318..0af53a6c67fe 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -29,6 +29,7 @@ config POWER_LEGACY
config SPL_POWER_LEGACY bool "Legacy power support in SPL" + depends on SPL && !SPL_DM_PMIC default y if POWER_LEGACY help Note: This is a legacy option. Use SPL_DM_PMIC instead. diff --git a/drivers/power/acpi_pmc/Kconfig b/drivers/power/acpi_pmc/Kconfig index fcd50e36cad4..8b712abc41e9 100644 --- a/drivers/power/acpi_pmc/Kconfig +++ b/drivers/power/acpi_pmc/Kconfig @@ -8,6 +8,7 @@ config ACPI_PMC
config SPL_ACPI_PMC bool "Power Manager (x86 PMC) support in SPL" + depends on SPL default y if ACPI_PMC help Enable support for an x86-style power-management controller which diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig index d6cea8ec6667..c519e066ef02 100644 --- a/drivers/power/regulator/Kconfig +++ b/drivers/power/regulator/Kconfig @@ -55,7 +55,7 @@ config DM_REGULATOR_BD71837
config SPL_DM_REGULATOR_BD71837 bool "Enable Driver Model for ROHM BD71837/BD71847 regulators in SPL" - depends on DM_REGULATOR_BD71837 + depends on DM_REGULATOR_BD71837 && SPL help This config enables implementation of driver-model regulator uclass features for regulators on ROHM BD71837 and BD71847 in SPL. @@ -70,7 +70,7 @@ config DM_REGULATOR_PCA9450
config SPL_DM_REGULATOR_PCA9450 bool "Enable Driver Model for NXP PCA9450 regulators in SPL" - depends on DM_REGULATOR_PCA9450 + depends on DM_REGULATOR_PCA9450 && SPL help This config enables implementation of driver-model regulator uclass features for regulators on ROHM PCA9450 in SPL. @@ -115,7 +115,7 @@ config REGULATOR_PWM
config SPL_REGULATOR_PWM bool "Enable Driver for PWM regulators in SPL" - depends on REGULATOR_PWM + depends on REGULATOR_PWM && SPL help This config enables implementation of driver-model regulator uclass features for PWM regulators in SPL. @@ -163,7 +163,7 @@ config DM_REGULATOR_FIXED
config SPL_DM_REGULATOR_FIXED bool "Enable Driver Model for REGULATOR Fixed value in SPL" - depends on DM_REGULATOR_FIXED + depends on DM_REGULATOR_FIXED && SPL select SPL_DM_REGULATOR_COMMON ---help--- This config enables implementation of driver-model regulator uclass @@ -345,7 +345,7 @@ config SPL_DM_REGULATOR_STPMIC1
config SPL_DM_REGULATOR_PALMAS bool "Enable driver for PALMAS PMIC regulators" - depends on SPL_PMIC_PALMAS + depends on SPL_PMIC_PALMAS help This enables implementation of driver-model regulator uclass features for REGULATOR PALMAS and the family of PALMAS PMICs. @@ -353,7 +353,7 @@ config SPL_DM_REGULATOR_PALMAS
config SPL_DM_REGULATOR_LP87565 bool "Enable driver for LP87565 PMIC regulators" - depends on SPL_PMIC_LP87565 + depends on SPL_PMIC_LP87565 help This enables implementation of driver-model regulator uclass features for REGULATOR LP87565 and the family of LP87565 PMICs. diff --git a/fs/cbfs/Kconfig b/fs/cbfs/Kconfig index 03980d830d30..b6639928f4af 100644 --- a/fs/cbfs/Kconfig +++ b/fs/cbfs/Kconfig @@ -9,6 +9,7 @@ config FS_CBFS
config SPL_FS_CBFS bool "Enable CBFS (Coreboot Filesystem) in SPL" + depends on SPL help Define this to enable support for reading from a Coreboot filesystem. This is a ROM-based filesystem used for accessing files diff --git a/lib/Kconfig b/lib/Kconfig index 884569f9b154..40db6d5ba922 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -239,6 +239,7 @@ config GENERATE_ACPI_TABLE
config SPL_TINY_MEMSET bool "Use a very small memset() in SPL" + depends on SPL help The faster memset() is the arch-specific one (if available) enabled by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get @@ -556,6 +557,7 @@ config MD5
config SPL_MD5 bool "Support MD5 algorithm in SPL" + depends on SPL help This option enables MD5 support in SPL. MD5 is an algorithm designed in 1991 that produces a 16-byte digest (or checksum) from its input @@ -642,6 +644,7 @@ config ZSTD
config SPL_LZ4 bool "Enable LZ4 decompression support in SPL" + depends on SPL help This enables support for the LZ4 decompression algorithm in SPL. LZ4 is a lossless data compression algorithm that is focused on @@ -650,6 +653,7 @@ config SPL_LZ4
config SPL_LZMA bool "Enable LZMA decompression support for SPL build" + depends on SPL help This enables support for LZMA compression algorithm for SPL boot.
@@ -661,6 +665,7 @@ config VPL_LZMA
config SPL_LZO bool "Enable LZO decompression support in SPL" + depends on SPL help This enables support for LZO compression algorithm in the SPL.
@@ -677,6 +682,7 @@ config SPL_ZLIB
config SPL_ZSTD bool "Enable Zstandard decompression support in SPL" + depends on SPL select XXHASH help This enables Zstandard decompression library in the SPL. @@ -749,7 +755,7 @@ config SPL_OF_LIBFDT
config SPL_OF_LIBFDT_ASSUME_MASK hex "Mask of conditions to assume for libfdt" - depends on SPL_OF_LIBFDT || FIT + depends on SPL_OF_LIBFDT || (FIT && SPL) default 0xff help Use this to change the assumptions made by libfdt in SPL about the diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 1c04a7ec5f48..152eb2a9cacf 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -28,7 +28,7 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
config SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE bool "Asymmetric public-key crypto algorithm subtype within SPL" - depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE + depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE && SPL help This option provides support for asymmetric public key type handling in the SPL. If signature generation and/or verification are to be used, @@ -48,7 +48,7 @@ config RSA_PUBLIC_KEY_PARSER
config SPL_RSA_PUBLIC_KEY_PARSER bool "RSA public key parser within SPL" - depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE + depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE && SPL select SPL_ASN1_DECODER select ASN1_COMPILER select SPL_OID_REGISTRY diff --git a/lib/ecdsa/Kconfig b/lib/ecdsa/Kconfig index a95c4ff581f0..5c3d67d8144b 100644 --- a/lib/ecdsa/Kconfig +++ b/lib/ecdsa/Kconfig @@ -17,6 +17,7 @@ config ECDSA_VERIFY
config SPL_ECDSA_VERIFY bool "Enable ECDSA verification support in SPL" + depends on SPL help Allow ECDSA signatures to be recognized and verified in SPL.
diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig index b773f17c261e..9033384e60a3 100644 --- a/lib/rsa/Kconfig +++ b/lib/rsa/Kconfig @@ -18,6 +18,7 @@ if RSA
config SPL_RSA bool "Use RSA Library within SPL" + depends on SPL
config SPL_RSA_VERIFY bool diff --git a/test/Kconfig b/test/Kconfig index 7f3447ae5acd..9b283a57ba93 100644 --- a/test/Kconfig +++ b/test/Kconfig @@ -8,6 +8,7 @@ menuconfig UNIT_TEST
config SPL_UNIT_TEST bool "Unit tests in SPL" + depends on SPL # We need to be able to unbind devices for tests to work select SPL_DM_DEVICE_REMOVE help

Tighten up symbol dependencies in a number of places. Ensure that a SPL specific option has at least a direct dependency on SPL. In places where it's clear that we depend on something more specific, use that dependency instead. This means in a very small number of places we can drop redundant dependencies.
Reported-by: Pali Rohár pali@kernel.org Signed-off-by: Tom Rini trini@konsulko.com --- Changes in v2: - Add the symbols in arch/arm/cpu/armv8/Kconfig from Pali's original patch --- arch/arm/Kconfig | 1 - arch/arm/cpu/armv8/Kconfig | 2 ++ arch/arm/mach-imx/imx8/Kconfig | 4 ++-- arch/x86/Kconfig | 1 + boot/Kconfig | 2 +- common/Kconfig | 3 ++- configs/at91sam9n12ek_nandflash_defconfig | 4 +--- configs/at91sam9x5ek_dataflash_defconfig | 4 +--- configs/at91sam9x5ek_nandflash_defconfig | 4 +--- configs/sama5d36ek_cmp_nandflash_defconfig | 4 +--- configs/socfpga_secu1_defconfig | 1 + drivers/firmware/Kconfig | 2 +- drivers/gpio/Kconfig | 4 ++-- drivers/i2c/muxes/Kconfig | 2 +- drivers/led/Kconfig | 4 ++-- drivers/mmc/Kconfig | 6 +++++- drivers/mtd/nand/raw/Kconfig | 6 ++++-- drivers/mtd/spi/Kconfig | 2 +- drivers/power/Kconfig | 1 + drivers/power/acpi_pmc/Kconfig | 1 + drivers/power/regulator/Kconfig | 12 ++++++------ fs/cbfs/Kconfig | 1 + lib/Kconfig | 8 +++++++- lib/crypto/Kconfig | 4 ++-- lib/ecdsa/Kconfig | 1 + lib/rsa/Kconfig | 1 + test/Kconfig | 1 + 27 files changed, 50 insertions(+), 36 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fa113e443ad2..da661ce30b03 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1111,7 +1111,6 @@ config ARCH_SOCFPGA select SPL_DM_SERIAL select SPL_LIBCOMMON_SUPPORT select SPL_LIBGENERIC_SUPPORT - select SPL_NAND_SUPPORT if SPL_NAND_DENALI select SPL_OF_CONTROL select SPL_SEPARATE_BSS if TARGET_SOCFPGA_SOC64 select SPL_SERIAL diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index 09f3f50fa22f..0476446bc5ba 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -76,6 +76,7 @@ config ARMV8_SEC_FIRMWARE_SUPPORT
config SPL_ARMV8_SEC_FIRMWARE_SUPPORT bool "Enable ARMv8 secure monitor firmware framework support for SPL" + depends on SPL select SPL_FIT select SPL_OF_LIBFDT help @@ -83,6 +84,7 @@ config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
config SPL_RECOVER_DATA_SECTION bool "save/restore SPL data section" + depends on SPL help Say Y here to save SPL data section for cold boot, and restore at warm boot in SPL phase. diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 5e1b20a42297..51c3f21b6e76 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -20,13 +20,13 @@ config MU_BASE_SPL config IMX8QM select IMX8 select SUPPORT_SPL - select SPL_RECOVER_DATA_SECTION + select SPL_RECOVER_DATA_SECTION if SPL bool
config IMX8QXP select IMX8 select SUPPORT_SPL - select SPL_RECOVER_DATA_SECTION + select SPL_RECOVER_DATA_SECTION if SPL bool
config SYS_SOC diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7cbfd6c97208..6b3765c997da 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -945,6 +945,7 @@ config ACPI_GPE
config SPL_ACPI_GPE bool "Support ACPI general-purpose events in SPL" + depends on SPL help Enable a driver for ACPI GPEs to allow peripherals to send interrupts via ACPI to the OS. In U-Boot this is only used when U-Boot itself diff --git a/boot/Kconfig b/boot/Kconfig index 08451c65a56b..1aee2de8f302 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -613,7 +613,7 @@ config BOOTSTAGE
config SPL_BOOTSTAGE bool "Boot timing and reported in SPL" - depends on BOOTSTAGE + depends on BOOTSTAGE && SPL help Enable recording of boot time in SPL. To make this visible to U-Boot proper, enable BOOTSTAGE_STASH as well. This will stash the timing diff --git a/common/Kconfig b/common/Kconfig index 84db2e43f155..079670ddd12f 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -83,6 +83,7 @@ config LOGLEVEL
config SPL_LOGLEVEL int + depends on SPL default LOGLEVEL
config TPL_LOGLEVEL @@ -365,7 +366,7 @@ config LOG_SYSLOG
config SPL_LOG bool "Enable logging support in SPL" - depends on LOG + depends on LOG && SPL help This enables support for logging of status and debug messages. These can be displayed on the console, recorded in a memory buffer, or diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig index 3697d86015d7..cffa5b309c9a 100644 --- a/configs/at91sam9n12ek_nandflash_defconfig +++ b/configs/at91sam9n12ek_nandflash_defconfig @@ -48,9 +48,7 @@ CONFIG_AT91_GPIO=y CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_NAND_ATMEL=y -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig index 6bdf18099dc6..7a428fba191b 100644 --- a/configs/at91sam9x5ek_dataflash_defconfig +++ b/configs/at91sam9x5ek_dataflash_defconfig @@ -55,9 +55,7 @@ CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_MTD_RAW_NAND=y CONFIG_NAND_ATMEL=y -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig index 9b5842cbd363..813bd15ecf22 100644 --- a/configs/at91sam9x5ek_nandflash_defconfig +++ b/configs/at91sam9x5ek_nandflash_defconfig @@ -54,9 +54,7 @@ CONFIG_AT91_GPIO=y CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_NAND_ATMEL=y -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig index 1b8038898eb6..a75784d24c29 100644 --- a/configs/sama5d36ek_cmp_nandflash_defconfig +++ b/configs/sama5d36ek_cmp_nandflash_defconfig @@ -53,11 +53,9 @@ CONFIG_AT91_GPIO=y CONFIG_GENERIC_ATMEL_MCI=y CONFIG_MTD=y CONFIG_NAND_ATMEL=y +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_PMECC_CAP=4 -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SYS_NAND_ONFI_DETECTION=y -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/socfpga_secu1_defconfig b/configs/socfpga_secu1_defconfig index 72cf0d1bc88b..4a244e17bc48 100644 --- a/configs/socfpga_secu1_defconfig +++ b/configs/socfpga_secu1_defconfig @@ -42,6 +42,7 @@ CONFIG_SPL_STACK=0x0 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x1 # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE is not set CONFIG_SPL_MTD_SUPPORT=y +CONFIG_SPL_NAND_SUPPORT=y CONFIG_SYS_MAXARGS=32 CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index ef958b3a7a4e..c897c1fbf7a1 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -3,7 +3,7 @@ config FIRMWARE
config SPL_FIRMWARE bool "Enable Firmware driver support in SPL" - depends on FIRMWARE + depends on FIRMWARE && SPL
config SPL_ARM_PSCI_FW bool diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 149a62ffe611..8ab22ed81735 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -89,7 +89,7 @@ config DM_GPIO_LOOKUP_LABEL
config SPL_DM_GPIO_LOOKUP_LABEL bool "Enable searching for gpio labelnames" - depends on DM_GPIO && SPL_DM && SPL_GPIO + depends on SPL_DM_GPIO help This option enables searching for gpio names in the defined gpio labels, if the search for the @@ -490,7 +490,7 @@ config DM_PCA953X
config SPL_DM_PCA953X bool "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports in SPL" - depends on DM_GPIO + depends on SPL_DM_GPIO help Say yes here to provide access to several register-oriented SMBus I/O expanders, made mostly by NXP or TI. Compatible diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index 39683fc43b49..323c4fbe9ccc 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig @@ -9,7 +9,7 @@ config I2C_MUX
config SPL_I2C_MUX bool "Support I2C multiplexers on SPL" - depends on I2C_MUX + depends on SPL && I2C_MUX help This enables I2C buses to be multiplexed, so that you can select one of several buses using some sort of control mechanism. The diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig index 418ed215c57b..ccdd7d7395c8 100644 --- a/drivers/led/Kconfig +++ b/drivers/led/Kconfig @@ -67,7 +67,7 @@ config LED_BLINK
config SPL_LED bool "Enable LED support in SPL" - depends on SPL && SPL_DM + depends on SPL_DM help The LED subsystem adds a small amount of overhead to the image. If this is acceptable and you have a need to use LEDs in SPL, @@ -85,7 +85,7 @@ config LED_GPIO
config SPL_LED_GPIO bool "LED support for GPIO-connected LEDs in SPL" - depends on SPL_LED && DM_GPIO + depends on SPL_LED && SPL_DM_GPIO help This option is an SPL-variant of the LED_GPIO option. See the help of LED_GPIO for details. diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index c8f9709d2d49..082352f1f27c 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -123,6 +123,7 @@ config MMC_IO_VOLTAGE
config SPL_MMC_IO_VOLTAGE bool "Support IO voltage configuration in SPL" + depends on SPL_MMC help IO voltage configuration allows selecting the voltage level of the IO lines (not the level of main supply). This is required for UHS @@ -153,6 +154,7 @@ config MMC_HS400_ES_SUPPORT
config SPL_MMC_HS400_ES_SUPPORT bool "enable HS400 Enhanced Strobe support in SPL" + depends on SPL_MMC help The HS400 Enhanced Strobe mode is support by some eMMC. The bus frequency is up to 200MHz. This mode does not tune the IO. @@ -166,6 +168,7 @@ config MMC_HS400_SUPPORT
config SPL_MMC_HS400_SUPPORT bool "enable HS400 support in SPL" + depends on SPL_MMC select SPL_MMC_HS200_SUPPORT help The HS400 mode is support by some eMMC. The bus frequency is up to @@ -179,6 +182,7 @@ config MMC_HS200_SUPPORT
config SPL_MMC_HS200_SUPPORT bool "enable HS200 support in SPL" + depends on SPL_MMC help The HS200 mode is support by some eMMC. The bus frequency is up to 200MHz. This mode requires tuning the IO. @@ -478,7 +482,7 @@ config MMC_SDHCI_ADMA
config SPL_MMC_SDHCI_ADMA bool "Support SDHCI ADMA2 in SPL" - depends on MMC_SDHCI + depends on SPL_MMC && MMC_SDHCI select MMC_SDHCI_ADMA_HELPERS help This enables support for the ADMA (Advanced DMA) defined diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 4129a33866bf..190300fc1790 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -73,6 +73,7 @@ config PMECC_SECTOR_SIZE
config SPL_GENERATE_ATMEL_PMECC_HEADER bool "Atmel PMECC Header Generation" + depends on SPL select ATMEL_NAND_HWECC select ATMEL_NAND_HW_PMECC help @@ -647,7 +648,7 @@ config SYS_NAND_U_BOOT_OFFS_REDUND
config SPL_NAND_AM33XX_BCH bool "Enables SPL-NAND driver which supports ELM based" - depends on NAND_OMAP_GPMC && !OMAP34XX + depends on SPL_NAND_SUPPORT && NAND_OMAP_GPMC && !OMAP34XX default y help Hardware ECC correction. This is useful for platforms which have ELM @@ -658,6 +659,7 @@ config SPL_NAND_AM33XX_BCH
config SPL_NAND_DENALI bool "Support Denali NAND controller for SPL" + depends on SPL_NAND_SUPPORT help This is a small implementation of the Denali NAND controller for use on SPL. @@ -673,7 +675,7 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
config SPL_NAND_SIMPLE bool "Use simple SPL NAND driver" - depends on !SPL_NAND_AM33XX_BCH + depends on !SPL_NAND_AM33XX_BCH && SPL_NAND_SUPPORT help Support for NAND boot using simple NAND drivers that expose the cmd_ctrl() interface. diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index f350c7e5dc21..f83876c57613 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -248,7 +248,7 @@ config SPI_FLASH_MTD
config SPL_SPI_FLASH_MTD bool "SPI flash MTD support for SPL" - depends on SPI_FLASH + depends on SPI_FLASH && SPL help Enable the MTD support for the SPI flash layer in SPL.
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 2c20dc7c8318..0af53a6c67fe 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -29,6 +29,7 @@ config POWER_LEGACY
config SPL_POWER_LEGACY bool "Legacy power support in SPL" + depends on SPL && !SPL_DM_PMIC default y if POWER_LEGACY help Note: This is a legacy option. Use SPL_DM_PMIC instead. diff --git a/drivers/power/acpi_pmc/Kconfig b/drivers/power/acpi_pmc/Kconfig index fcd50e36cad4..8b712abc41e9 100644 --- a/drivers/power/acpi_pmc/Kconfig +++ b/drivers/power/acpi_pmc/Kconfig @@ -8,6 +8,7 @@ config ACPI_PMC
config SPL_ACPI_PMC bool "Power Manager (x86 PMC) support in SPL" + depends on SPL default y if ACPI_PMC help Enable support for an x86-style power-management controller which diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig index d6cea8ec6667..c519e066ef02 100644 --- a/drivers/power/regulator/Kconfig +++ b/drivers/power/regulator/Kconfig @@ -55,7 +55,7 @@ config DM_REGULATOR_BD71837
config SPL_DM_REGULATOR_BD71837 bool "Enable Driver Model for ROHM BD71837/BD71847 regulators in SPL" - depends on DM_REGULATOR_BD71837 + depends on DM_REGULATOR_BD71837 && SPL help This config enables implementation of driver-model regulator uclass features for regulators on ROHM BD71837 and BD71847 in SPL. @@ -70,7 +70,7 @@ config DM_REGULATOR_PCA9450
config SPL_DM_REGULATOR_PCA9450 bool "Enable Driver Model for NXP PCA9450 regulators in SPL" - depends on DM_REGULATOR_PCA9450 + depends on DM_REGULATOR_PCA9450 && SPL help This config enables implementation of driver-model regulator uclass features for regulators on ROHM PCA9450 in SPL. @@ -115,7 +115,7 @@ config REGULATOR_PWM
config SPL_REGULATOR_PWM bool "Enable Driver for PWM regulators in SPL" - depends on REGULATOR_PWM + depends on REGULATOR_PWM && SPL help This config enables implementation of driver-model regulator uclass features for PWM regulators in SPL. @@ -163,7 +163,7 @@ config DM_REGULATOR_FIXED
config SPL_DM_REGULATOR_FIXED bool "Enable Driver Model for REGULATOR Fixed value in SPL" - depends on DM_REGULATOR_FIXED + depends on DM_REGULATOR_FIXED && SPL select SPL_DM_REGULATOR_COMMON ---help--- This config enables implementation of driver-model regulator uclass @@ -345,7 +345,7 @@ config SPL_DM_REGULATOR_STPMIC1
config SPL_DM_REGULATOR_PALMAS bool "Enable driver for PALMAS PMIC regulators" - depends on SPL_PMIC_PALMAS + depends on SPL_PMIC_PALMAS help This enables implementation of driver-model regulator uclass features for REGULATOR PALMAS and the family of PALMAS PMICs. @@ -353,7 +353,7 @@ config SPL_DM_REGULATOR_PALMAS
config SPL_DM_REGULATOR_LP87565 bool "Enable driver for LP87565 PMIC regulators" - depends on SPL_PMIC_LP87565 + depends on SPL_PMIC_LP87565 help This enables implementation of driver-model regulator uclass features for REGULATOR LP87565 and the family of LP87565 PMICs. diff --git a/fs/cbfs/Kconfig b/fs/cbfs/Kconfig index 03980d830d30..b6639928f4af 100644 --- a/fs/cbfs/Kconfig +++ b/fs/cbfs/Kconfig @@ -9,6 +9,7 @@ config FS_CBFS
config SPL_FS_CBFS bool "Enable CBFS (Coreboot Filesystem) in SPL" + depends on SPL help Define this to enable support for reading from a Coreboot filesystem. This is a ROM-based filesystem used for accessing files diff --git a/lib/Kconfig b/lib/Kconfig index 884569f9b154..40db6d5ba922 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -239,6 +239,7 @@ config GENERATE_ACPI_TABLE
config SPL_TINY_MEMSET bool "Use a very small memset() in SPL" + depends on SPL help The faster memset() is the arch-specific one (if available) enabled by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get @@ -556,6 +557,7 @@ config MD5
config SPL_MD5 bool "Support MD5 algorithm in SPL" + depends on SPL help This option enables MD5 support in SPL. MD5 is an algorithm designed in 1991 that produces a 16-byte digest (or checksum) from its input @@ -642,6 +644,7 @@ config ZSTD
config SPL_LZ4 bool "Enable LZ4 decompression support in SPL" + depends on SPL help This enables support for the LZ4 decompression algorithm in SPL. LZ4 is a lossless data compression algorithm that is focused on @@ -650,6 +653,7 @@ config SPL_LZ4
config SPL_LZMA bool "Enable LZMA decompression support for SPL build" + depends on SPL help This enables support for LZMA compression algorithm for SPL boot.
@@ -661,6 +665,7 @@ config VPL_LZMA
config SPL_LZO bool "Enable LZO decompression support in SPL" + depends on SPL help This enables support for LZO compression algorithm in the SPL.
@@ -677,6 +682,7 @@ config SPL_ZLIB
config SPL_ZSTD bool "Enable Zstandard decompression support in SPL" + depends on SPL select XXHASH help This enables Zstandard decompression library in the SPL. @@ -749,7 +755,7 @@ config SPL_OF_LIBFDT
config SPL_OF_LIBFDT_ASSUME_MASK hex "Mask of conditions to assume for libfdt" - depends on SPL_OF_LIBFDT || FIT + depends on SPL_OF_LIBFDT || (FIT && SPL) default 0xff help Use this to change the assumptions made by libfdt in SPL about the diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 1c04a7ec5f48..152eb2a9cacf 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -28,7 +28,7 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
config SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE bool "Asymmetric public-key crypto algorithm subtype within SPL" - depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE + depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE && SPL help This option provides support for asymmetric public key type handling in the SPL. If signature generation and/or verification are to be used, @@ -48,7 +48,7 @@ config RSA_PUBLIC_KEY_PARSER
config SPL_RSA_PUBLIC_KEY_PARSER bool "RSA public key parser within SPL" - depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE + depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE && SPL select SPL_ASN1_DECODER select ASN1_COMPILER select SPL_OID_REGISTRY diff --git a/lib/ecdsa/Kconfig b/lib/ecdsa/Kconfig index a95c4ff581f0..5c3d67d8144b 100644 --- a/lib/ecdsa/Kconfig +++ b/lib/ecdsa/Kconfig @@ -17,6 +17,7 @@ config ECDSA_VERIFY
config SPL_ECDSA_VERIFY bool "Enable ECDSA verification support in SPL" + depends on SPL help Allow ECDSA signatures to be recognized and verified in SPL.
diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig index b773f17c261e..9033384e60a3 100644 --- a/lib/rsa/Kconfig +++ b/lib/rsa/Kconfig @@ -18,6 +18,7 @@ if RSA
config SPL_RSA bool "Use RSA Library within SPL" + depends on SPL
config SPL_RSA_VERIFY bool diff --git a/test/Kconfig b/test/Kconfig index 7f3447ae5acd..9b283a57ba93 100644 --- a/test/Kconfig +++ b/test/Kconfig @@ -8,6 +8,7 @@ menuconfig UNIT_TEST
config SPL_UNIT_TEST bool "Unit tests in SPL" + depends on SPL # We need to be able to unbind devices for tests to work select SPL_DM_DEVICE_REMOVE help

On Fri, Jun 10, 2022 at 11:03:09PM -0400, Tom Rini wrote:
Tighten up symbol dependencies in a number of places. Ensure that a SPL specific option has at least a direct dependency on SPL. In places where it's clear that we depend on something more specific, use that dependency instead. This means in a very small number of places we can drop redundant dependencies.
Reported-by: Pali Rohár pali@kernel.org Signed-off-by: Tom Rini trini@konsulko.com
Applied to u-boot/next, thanks!

Tighten up symbol dependencies in a number of places. Ensure that a TPL specific option has at least a direct dependency on TPL. In places where it's clear that we depend on something more specific, use that dependency instead.
Reported-by: Pali Rohár pali@kernel.org Signed-off-by: Tom Rini trini@konsulko.com --- arch/x86/Kconfig | 1 + boot/Kconfig | 2 +- common/Kconfig | 3 ++- drivers/core/Kconfig | 2 +- drivers/power/acpi_pmc/Kconfig | 1 + drivers/ram/Kconfig | 2 +- lib/Kconfig | 3 ++- 7 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6b3765c997da..7e86c6a0cd0a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -957,6 +957,7 @@ config SPL_ACPI_GPE
config TPL_ACPI_GPE bool "Support ACPI general-purpose events in TPL" + depends on TPL help Enable a driver for ACPI GPEs to allow peripherals to send interrupts via ACPI to the OS. In U-Boot this is only used when U-Boot itself diff --git a/boot/Kconfig b/boot/Kconfig index 1aee2de8f302..63dacc0d14f4 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -622,7 +622,7 @@ config SPL_BOOTSTAGE
config TPL_BOOTSTAGE bool "Boot timing and reported in TPL" - depends on BOOTSTAGE + depends on BOOTSTAGE && TPL help Enable recording of boot time in SPL. To make this visible to U-Boot proper, enable BOOTSTAGE_STASH as well. This will stash the timing diff --git a/common/Kconfig b/common/Kconfig index 079670ddd12f..ac88d9bf9eab 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -88,6 +88,7 @@ config SPL_LOGLEVEL
config TPL_LOGLEVEL int + depends on TPL default LOGLEVEL
config VPL_LOGLEVEL @@ -409,7 +410,7 @@ endif
config TPL_LOG bool "Enable logging support in TPL" - depends on LOG + depends on LOG && TPL help This enables support for logging of status and debug messages. These can be displayed on the console, recorded in a memory buffer, or diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index 9b9a7148a1a4..d3fe1d4093d9 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -224,7 +224,7 @@ config SPL_SYSCON
config TPL_SYSCON bool "Support system controllers in TPL" - depends on SPL_REGMAP + depends on TPL_REGMAP help Many SoCs have a number of system controllers which are dealt with as a group by a single driver. Some common functionality is provided diff --git a/drivers/power/acpi_pmc/Kconfig b/drivers/power/acpi_pmc/Kconfig index 8b712abc41e9..629acb071427 100644 --- a/drivers/power/acpi_pmc/Kconfig +++ b/drivers/power/acpi_pmc/Kconfig @@ -18,6 +18,7 @@ config SPL_ACPI_PMC
config TPL_ACPI_PMC bool "Power Manager (x86 PMC) support in TPL" + depends on TPL default y if ACPI_PMC help Enable support for an x86-style power-management controller which diff --git a/drivers/ram/Kconfig b/drivers/ram/Kconfig index 709c916a2a11..96e04a98ce17 100644 --- a/drivers/ram/Kconfig +++ b/drivers/ram/Kconfig @@ -19,7 +19,7 @@ config SPL_RAM
config TPL_RAM bool "Enable RAM support in TPL" - depends on RAM + depends on RAM && TPL help The RAM subsystem adds a small amount of overhead to the image. If this is acceptable and you have a need to use RAM drivers in diff --git a/lib/Kconfig b/lib/Kconfig index 40db6d5ba922..fef71606766e 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -249,6 +249,7 @@ config SPL_TINY_MEMSET
config TPL_TINY_MEMSET bool "Use a very small memset() in TPL" + depends on TPL help The faster memset() is the arch-specific one (if available) enabled by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get @@ -777,7 +778,7 @@ config TPL_OF_LIBFDT
config TPL_OF_LIBFDT_ASSUME_MASK hex "Mask of conditions to assume for libfdt" - depends on TPL_OF_LIBFDT || FIT + depends on TPL_OF_LIBFDT || (FIT && TPL) default 0xff help Use this to change the assumptions made by libfdt in TPL about the

Tighten up symbol dependencies in a number of places. Ensure that a VPL specific option has at least a direct dependency on VPL. In places where it's clear that we depend on something more specific, use that dependency instead.
Reported-by: Pali Rohár pali@kernel.org Signed-off-by: Tom Rini trini@konsulko.com --- common/Kconfig | 12 ++---------- dts/Kconfig | 1 + lib/Kconfig | 3 ++- 3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/common/Kconfig b/common/Kconfig index ac88d9bf9eab..e7914ca750a3 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -93,6 +93,7 @@ config TPL_LOGLEVEL
config VPL_LOGLEVEL int "loglevel for VPL" + depends on VPL default LOGLEVEL help All Messages with a loglevel smaller than the console loglevel will @@ -273,15 +274,6 @@ config LOG
if LOG
-config VPL_LOG - bool "Enable logging support in VPL" - depends on LOG - help - This enables support for logging of status and debug messages. These - can be displayed on the console, recorded in a memory buffer, or - discarded if not needed. Logging supports various categories and - levels of severity. - config LOG_MAX_LEVEL int "Maximum log level to record" default 6 @@ -453,7 +445,7 @@ endif
config VPL_LOG bool "Enable logging support in VPL" - depends on LOG + depends on LOG && VPL help This enables support for logging of status and debug messages. These can be displayed on the console, recorded in a memory buffer, or diff --git a/dts/Kconfig b/dts/Kconfig index f1d05cc0803f..bc5f22029ff9 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -534,6 +534,7 @@ endif
config VPL_OF_REAL def_bool y + depends on VPL help Indicates that a real devicetree is available which can be accessed at runtime. This means that dev_read_...() functions can be used to diff --git a/lib/Kconfig b/lib/Kconfig index fef71606766e..7dd777b56a79 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -789,6 +789,7 @@ config TPL_OF_LIBFDT_ASSUME_MASK
config VPL_OF_LIBFDT bool "Enable the FDT library for VPL" + depends on VPL default y if VPL_OF_CONTROL && !VPL_OF_PLATDATA help This enables the FDT library (libfdt). It provides functions for @@ -799,7 +800,7 @@ config VPL_OF_LIBFDT
config VPL_OF_LIBFDT_ASSUME_MASK hex "Mask of conditions to assume for libfdt" - depends on VPL_OF_LIBFDT || FIT + depends on VPL_OF_LIBFDT || (FIT && VPL) default 0xff help Use this to change the assumptions made by libfdt in SPL about the

On Wed, Jun 08, 2022 at 08:24:23AM -0400, Tom Rini wrote:
This converts the following to Kconfig: CONFIG_E1000_NO_NVM
Signed-off-by: Tom Rini trini@konsulko.com
For the series, applied to u-boot/next, thanks!
participants (2)
-
Minkyu Kang
-
Tom Rini