diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/hisilicon/poplar/MAINTAINERS | 1 | ||||
-rw-r--r-- | board/hisilicon/poplar/poplar.c | 2 | ||||
-rw-r--r-- | board/ti/am43xx/board.c | 22 | ||||
-rw-r--r-- | board/ti/ks2_evm/board.c | 12 |
4 files changed, 37 insertions, 0 deletions
diff --git a/board/hisilicon/poplar/MAINTAINERS b/board/hisilicon/poplar/MAINTAINERS index 0cc01c8321..622e5cb18e 100644 --- a/board/hisilicon/poplar/MAINTAINERS +++ b/board/hisilicon/poplar/MAINTAINERS @@ -1,5 +1,6 @@ Poplar BOARD M: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> +M: Shawn Guo <shawn.guo@linaro.org> S: Maintained F: board/hisilicon/poplar F: include/configs/poplar.h diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 9e8eac7838..8adc750962 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -35,6 +35,7 @@ static struct mm_region poplar_mem_map[] = { struct mm_region *mem_map = poplar_mem_map; +#if !CONFIG_IS_ENABLED(OF_CONTROL) static const struct pl01x_serial_platdata serial_platdata = { .base = REG_BASE_UART0, .type = TYPE_PL010, @@ -45,6 +46,7 @@ U_BOOT_DEVICE(poplar_serial) = { .name = "serial_pl01x", .platdata = &serial_platdata, }; +#endif int checkboard(void) { diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 31bc0f49a4..536c5b88ed 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -705,6 +705,19 @@ int board_init(void) } #ifdef CONFIG_BOARD_LATE_INIT +#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) +static int device_okay(const char *path) +{ + int node; + + node = fdt_path_offset(gd->fdt_blob, path); + if (node < 0) + return 0; + + return fdtdec_get_is_enabled(gd->fdt_blob, node); +} +#endif + int board_late_init(void) { #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG @@ -717,10 +730,18 @@ int board_late_init(void) if (get_device_type() == HS_DEVICE) env_set("boot_fit", "1"); #endif + +#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) + if (device_okay("/ocp/omap_dwc3@48380000")) + enable_usb_clocks(0); + if (device_okay("/ocp/omap_dwc3@483c0000")) + enable_usb_clocks(1); +#endif return 0; } #endif +#if !CONFIG_IS_ENABLED(DM_USB_GADGET) #ifdef CONFIG_USB_DWC3 static struct dwc3_device usb_otg_ss1 = { .maximum_speed = USB_SPEED_HIGH, @@ -823,6 +844,7 @@ int board_usb_cleanup(int index, enum usb_init_type init) return 0; } #endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */ +#endif /* !CONFIG_IS_ENABLED(DM_USB_GADGET) */ #ifdef CONFIG_DRIVER_TI_CPSW diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index 3e06800608..eed62e9cac 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -66,6 +66,18 @@ struct image_header *spl_get_load_buffer(ssize_t offset, size_t size) int board_init(void) { +#if CONFIG_IS_ENABLED(DM_USB) + int rc = psc_enable_module(KS2_LPSC_USB); + + if (rc) + puts("Cannot enable USB0 module"); +#ifdef KS2_LPSC_USB_1 + rc = psc_enable_module(KS2_LPSC_USB_1); + if (rc) + puts("Cannot enable USB1 module"); +#endif +#endif + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; return 0; |