summaryrefslogtreecommitdiff
path: root/board/ti/panda/panda.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2020-06-16 11:03:06 +0300
committerLokesh Vutla <lokeshvutla@ti.com>2020-06-16 14:30:12 +0300
commit0a453751153cee25e5282fd6ab750dc53463d5d4 (patch)
tree14cf812b22d1d7e7aa364b7ab113aa8cff495918 /board/ti/panda/panda.c
parent00fde6b873207d4d1415bc46560633d6c925f3f3 (diff)
downloadu-boot-0a453751153cee25e5282fd6ab750dc53463d5d4.tar.xz
omap4: panda: convert to device model
Convert omap4 panda to device model. Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'board/ti/panda/panda.c')
-rw-r--r--board/ti/panda/panda.c50
1 files changed, 12 insertions, 38 deletions
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 <init.h>
#include <log.h>
#include <net.h>
+#include <serial.h>
#include <asm/mach-types.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
@@ -19,12 +20,6 @@
#include "panda_mux_data.h"
-#ifdef CONFIG_USB_EHCI_HCD
-#include <usb.h>
-#include <asm/arch/ehci.h>
-#include <asm/ehci-omap.h>
-#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
*/