summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJonas Karlman <jonas@kwiboo.se>2023-11-12 17:48:58 +0000
committerKever Yang <kever.yang@rock-chips.com>2024-01-19 10:57:36 +0800
commitbcbd9a6f5c26b7caf043e785657df64c6e385fc0 (patch)
tree81680b3f6aeb52db85848217d434e30e8224ac94 /arch
parente1f83dd59282c71c38e00f18f0dead75e1b9218e (diff)
downloadu-boot-bcbd9a6f5c26b7caf043e785657df64c6e385fc0.tar.gz
u-boot-bcbd9a6f5c26b7caf043e785657df64c6e385fc0.tar.bz2
u-boot-bcbd9a6f5c26b7caf043e785657df64c6e385fc0.zip
rockchip: board: Remove dwc3 usb init and gadget handler functions
Remove board_usb_init() and dm_usb_gadget_handle_interrupts() functions related to dwc3, they use e.g. a hard-coded reg address for RK3399 and are obsolete with use of DM_USB_GADGET. Use of DM_USB_GADGET, USB_DWC3_GENERIC and USB_DWC3_GADGET have replaced same feature provided by the removed functions on RK3399 boards. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/mach-rockchip/board.c30
2 files changed, 2 insertions, 29 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c80d644dd5..efb705375b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1986,6 +1986,7 @@ config ARCH_ROCKCHIP
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select DM_USB_GADGET if USB_DWC3_GADGET
select ENABLE_ARM_SOC_BOOT0_HOOK
select OF_CONTROL
select SPI
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 57f08e0be0..38a2a4b95e 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -208,10 +208,8 @@ void enable_caches(void)
}
#endif
-#if defined(CONFIG_USB_GADGET)
+#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
#include <usb.h>
-
-#if defined(CONFIG_USB_GADGET_DWC2_OTG)
#include <linux/usb/otg.h>
#include <usb/dwc2_udc.h>
@@ -287,32 +285,6 @@ int board_usb_cleanup(int index, enum usb_init_type init)
}
#endif /* CONFIG_USB_GADGET_DWC2_OTG */
-#if defined(CONFIG_USB_DWC3_GADGET) && !defined(CONFIG_DM_USB_GADGET)
-#include <dwc3-uboot.h>
-
-static struct dwc3_device dwc3_device_data = {
- .maximum_speed = USB_SPEED_HIGH,
- .base = 0xfe800000,
- .dr_mode = USB_DR_MODE_PERIPHERAL,
- .index = 0,
- .dis_u2_susphy_quirk = 1,
- .hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW,
-};
-
-int dm_usb_gadget_handle_interrupts(struct udevice *dev)
-{
- dwc3_uboot_handle_interrupt(dev);
- return 0;
-}
-
-int board_usb_init(int index, enum usb_init_type init)
-{
- return dwc3_uboot_init(&dwc3_device_data);
-}
-#endif /* CONFIG_USB_DWC3_GADGET */
-
-#endif /* CONFIG_USB_GADGET */
-
#if IS_ENABLED(CONFIG_FASTBOOT)
int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
{