diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2019-07-22 20:02:00 +0800 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2019-07-29 10:25:27 +0800 |
commit | 6c9a9df9f507986bdcd4cd518f4022c7373292f8 (patch) | |
tree | 84f1863a53af62390e684949d17a82896623d758 /arch/arm/mach-rockchip/rk3128-board.c | |
parent | 283e61a6615b66f2539ebecafe274d9608911be1 (diff) | |
download | u-boot-6c9a9df9f507986bdcd4cd518f4022c7373292f8.zip u-boot-6c9a9df9f507986bdcd4cd518f4022c7373292f8.tar.gz u-boot-6c9a9df9f507986bdcd4cd518f4022c7373292f8.tar.bz2 |
rockchip: clean up board_usb_init() for all SoCs
Use "snps,dwc2" for compatible name and and common variable
names so that we can share the common code for all SoCs.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3128-board.c')
-rw-r--r-- | arch/arm/mach-rockchip/rk3128-board.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-rockchip/rk3128-board.c b/arch/arm/mach-rockchip/rk3128-board.c index 636ee65..cfc4128 100644 --- a/arch/arm/mach-rockchip/rk3128-board.c +++ b/arch/arm/mach-rockchip/rk3128-board.c @@ -66,7 +66,7 @@ void enable_caches(void) #include <usb.h> #include <usb/dwc2_udc.h> -static struct dwc2_plat_otg_data rk3128_otg_data = { +static struct dwc2_plat_otg_data otg_data = { .rx_fifo_sz = 512, .np_tx_fifo_sz = 16, .tx_fifo_sz = 128, @@ -81,7 +81,7 @@ int board_usb_init(int index, enum usb_init_type init) /* find the usb_otg node */ node = fdt_node_offset_by_compatible(blob, -1, - "rockchip,rk3128-usb"); + "snps,dwc2"); while (node > 0) { mode = fdt_getprop(blob, node, "dr_mode", NULL); @@ -91,15 +91,15 @@ int board_usb_init(int index, enum usb_init_type init) } node = fdt_node_offset_by_compatible(blob, node, - "rockchip,rk3128-usb"); + "snps,dwc2"); } if (!matched) { debug("Not found usb_otg device\n"); return -ENODEV; } - rk3128_otg_data.regs_otg = fdtdec_get_addr(blob, node, "reg"); + otg_data.regs_otg = fdtdec_get_addr(blob, node, "reg"); - return dwc2_udc_probe(&rk3128_otg_data); + return dwc2_udc_probe(&otg_data); } int board_usb_cleanup(int index, enum usb_init_type init) |