summaryrefslogtreecommitdiff
path: root/board/ti/beagle
diff options
context:
space:
mode:
authorGovindraj.R <govindraj.raja@ti.com>2012-02-06 03:55:34 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-02-12 10:11:31 +0100
commit43b62393da6dfdd7f503d1b37344463a05ea47b5 (patch)
tree31e528357b55cc7b130c1e9c0d15e46238c49c06 /board/ti/beagle
parent29321c0518d99494ab2a250e5b4f75b3add83b11 (diff)
downloadu-boot-imx-43b62393da6dfdd7f503d1b37344463a05ea47b5.zip
u-boot-imx-43b62393da6dfdd7f503d1b37344463a05ea47b5.tar.gz
u-boot-imx-43b62393da6dfdd7f503d1b37344463a05ea47b5.tar.bz2
ehci-omap: Clean up added ehci-omap.c
Clean up added ehci-omap.c and make it generic for re-use across omap-soc having same ehci ip block. Also pass the modes to be configured from board file and configure the ports accordingly. All usb layers are not cache aligned, till then keep cache off for usb ops as ehci will use internally dma for all usb ops. * Add a generic common header ehci-omap.h having common ip block data and reg shifts. * Rename and modify ehci-omap3 to ehci.h retain only conflicting sysc reg shifts remove others and move to common header file. * pass the board data for beagle/panda accordinly to use ehci ports. Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Diffstat (limited to 'board/ti/beagle')
-rw-r--r--board/ti/beagle/beagle.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 624ff70..8757876 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -45,6 +45,11 @@
#include "beagle.h"
#include <command.h>
+#ifdef CONFIG_USB_EHCI
+#include <usb.h>
+#include <asm/ehci-omap.h>
+#endif
+
#define pr_debug(fmt, args...) debug(fmt, ##args)
#define TWL4030_I2C_BUS 0
@@ -449,6 +454,23 @@ void show_boot_progress(int val)
if(val == 15)
usb_stop();
}
+
+static struct omap_usbhs_board_data usbhs_bdata = {
+ .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
+ .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
+ .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED
+};
+
+int ehci_hcd_init(void)
+{
+ return omap_ehci_hcd_init(&usbhs_bdata);
+}
+
+int ehci_hcd_stop(void)
+{
+ return omap_ehci_hcd_stop();
+}
+
#endif /* CONFIG_USB_EHCI */
#ifndef CONFIG_SPL_BUILD