From 0a453751153cee25e5282fd6ab750dc53463d5d4 Mon Sep 17 00:00:00 2001 From: Tero Kristo Date: Tue, 16 Jun 2020 11:03:06 +0300 Subject: omap4: panda: convert to device model Convert omap4 panda to device model. Signed-off-by: Tero Kristo --- board/ti/panda/panda.c | 50 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) (limited to 'board/ti/panda/panda.c') diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 9ebecfdbf5..232d999a29 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -19,12 +20,6 @@ #include "panda_mux_data.h" -#ifdef CONFIG_USB_EHCI_HCD -#include -#include -#include -#endif - #define PANDA_ULPI_PHY_TYPE_GPIO 182 #define PANDA_BOARD_ID_1_GPIO 101 #define PANDA_ES_BOARD_ID_1_GPIO 48 @@ -55,6 +50,17 @@ int board_init(void) return 0; } +#if defined(CONFIG_SPL_OS_BOOT) +int spl_start_uboot(void) +{ + /* break into full u-boot on 'c' */ + if (serial_tstc() && serial_getc() == 'c') + return 1; + + return 0; +} +#endif /* CONFIG_SPL_OS_BOOT */ + int board_eth_init(bd_t *bis) { return 0; @@ -305,38 +311,6 @@ void board_mmc_power_init(void) #endif #endif -#ifdef CONFIG_USB_EHCI_HCD - -static struct omap_usbhs_board_data usbhs_bdata = { - .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, - .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, - .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, -}; - -int ehci_hcd_init(int index, enum usb_init_type init, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - int ret; - unsigned int utmi_clk; - - /* Now we can enable our port clocks */ - utmi_clk = readl((void *)CM_L3INIT_HSUSBHOST_CLKCTRL); - utmi_clk |= HSUSBHOST_CLKCTRL_CLKSEL_UTMI_P1_MASK; - setbits_le32((void *)CM_L3INIT_HSUSBHOST_CLKCTRL, utmi_clk); - - ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); - if (ret < 0) - return ret; - - return 0; -} - -int ehci_hcd_stop(int index) -{ - return omap_ehci_hcd_stop(); -} -#endif - /* * get_board_rev() - get board revision */ -- cgit v1.2.3