diff options
author | Tom Rini | 2022-03-11 23:07:29 -0500 |
---|---|---|
committer | Tom Rini | 2022-03-18 12:48:17 -0400 |
commit | ae3f467e8422d7408f968c6e041f64f9340c745a (patch) | |
tree | a7ffbd27c274bc268e461549fb16703f39f33e09 /arch/arm | |
parent | 08f1d58affa4a3ec1fb68717be088dd3556fe26a (diff) |
Convert CONFIG_AM335X_USB0 et al to Kconfig
This converts the following to Kconfig:
CONFIG_AM335X_USB0
CONFIG_AM335X_USB0_MODE
CONFIG_AM335X_USB1
CONFIG_AM335X_USB1_MODE
We do this by introducing specific options for static configuration of
USB0/USB1 in SPL rather than defining CONFIG_AM335X_USBx_MODE to the
enum value being used. Furthermore, with how the code is used now we do
not need to have OTG mode exposed as an option here, so remove that.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/am33xx/Kconfig | 32 | ||||
-rw-r--r-- | arch/arm/mach-omap2/am33xx/board.c | 8 |
2 files changed, 36 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig index 1402376915e..b8e115dc92b 100644 --- a/arch/arm/mach-omap2/am33xx/Kconfig +++ b/arch/arm/mach-omap2/am33xx/Kconfig @@ -280,3 +280,35 @@ config PUB_ROM_DATA_SIZE image, this area is no longer used, and can be reclaimed for run time use by the boot image. endif + +config AM335X_USB0 + bool "Static mode configuration for USB0 in SPL" + depends on AM33XX && SPL_MUSB_NEW && !SPL_OF_CONTROL + +choice + prompt "USB0 port configuration" + depends on AM335X_USB0 + +config AM335X_USB0_HOST + bool "Port is used in host mode" + +config AM335X_USB0_PERIPHERAL + bool "Port is used in peripheral mode" + +endchoice + +config AM335X_USB1 + bool "Static mode configuration for USB1 in SPL" + depends on AM33XX && SPL_MUSB_NEW && !SPL_OF_CONTROL + +choice + prompt "USB1 port configuration" + depends on AM335X_USB1 + +config AM335X_USB1_HOST + bool "Port is used in host mode" + +config AM335X_USB1_PERIPHERAL + bool "Port is used in peripheral mode" + +endchoice diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index bcc907ce362..5175eb01cbe 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -241,14 +241,14 @@ static struct ti_musb_plat usb1 = { }; U_BOOT_DRVINFOS(am33xx_usbs) = { -#if CONFIG_AM335X_USB0_MODE == MUSB_PERIPHERAL +#ifdef CONFIG_AM335X_USB0_PERIPHERAL { "ti-musb-peripheral", &usb0 }, -#elif CONFIG_AM335X_USB0_MODE == MUSB_HOST +#elif defined(CONFIG_AM335X_USB0_HOST) { "ti-musb-host", &usb0 }, #endif -#if CONFIG_AM335X_USB1_MODE == MUSB_PERIPHERAL +#ifdef CONFIG_AM335X_USB1_PERIPHERAL { "ti-musb-peripheral", &usb1 }, -#elif CONFIG_AM335X_USB1_MODE == MUSB_HOST +#elif defined(CONFIG_AM335X_USB1_HOST) { "ti-musb-host", &usb1 }, #endif }; |