summaryrefslogtreecommitdiff
path: root/board/ti/panda/panda.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/ti/panda/panda.c')
-rw-r--r--board/ti/panda/panda.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index fc8c0b4bc6..ca4b8b35eb 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -26,9 +26,16 @@
#include <asm/arch/mmc_host_def.h>
#include <asm/arch/clocks.h>
#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
#include "panda_mux_data.h"
+#ifdef CONFIG_USB_EHCI
+#include <usb.h>
+#include <asm/arch/ehci.h>
+#include <asm/ehci-omap.h>
+#endif
+
#define PANDA_ULPI_PHY_TYPE_GPIO 182
DECLARE_GLOBAL_DATA_PTR;
@@ -177,6 +184,37 @@ int board_mmc_init(bd_t *bis)
}
#endif
+#ifdef CONFIG_USB_EHCI
+
+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(void)
+{
+ 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;
+ sr32((void *)CM_L3INIT_HSUSBHOST_CLKCTRL, 0, 32, utmi_clk);
+
+ ret = omap_ehci_hcd_init(&usbhs_bdata);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
+int ehci_hcd_stop(void)
+{
+ return omap_ehci_hcd_stop();
+}
+#endif
+
/*
* get_board_rev() - get board revision
*/