summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2011-11-24 05:14:00 +0100
committerRemy Bohmer <linux@bohmer.net>2011-12-11 14:49:43 +0100
commit1b80f2706ea29047b8be42bd8341c99b05bfa20b (patch)
tree6e8a58c12da271f21b903f94fd77af3efdca017d
parent0f8c86b5498d7e61760c7b85ddfeb068b48fc828 (diff)
downloadu-boot-1b80f2706ea29047b8be42bd8341c99b05bfa20b.tar.gz
u-boot-1b80f2706ea29047b8be42bd8341c99b05bfa20b.tar.xz
u-boot-1b80f2706ea29047b8be42bd8341c99b05bfa20b.zip
USB: MX5: Add MX5 usb post-init callback
This is useful for USB Transceivers init etc. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Jason Liu <r64343@freescale.com>
-rw-r--r--drivers/usb/host/ehci-mx5.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 7b881371d8..68a673e721 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -22,6 +22,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/mx5x_pins.h>
+#include <asm/arch/iomux.h>
#include "ehci.h"
#include "ehci-core.h"
@@ -198,6 +199,13 @@ int mxc_set_usbcontrol(int port, unsigned int flags)
return ret;
}
+void __board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
+{
+}
+
+void board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
+ __attribute((weak, alias("__board_ehci_hcd_postinit")));
+
int ehci_hcd_init(void)
{
struct usb_ehci *ehci;
@@ -217,7 +225,7 @@ int ehci_hcd_init(void)
enable_usb_phy2_clk(1);
mdelay(1);
- /* do board specific initialization */
+ /* Do board specific initialization */
board_ehci_hcd_init(CONFIG_MXC_USB_PORT);
ehci = (struct usb_ehci *)(OTG_BASE_ADDR +
@@ -231,9 +239,11 @@ int ehci_hcd_init(void)
setbits_le32(&ehci->portsc, USB_EN);
mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS);
-
mdelay(10);
+ /* Do board specific post-initialization */
+ board_ehci_hcd_postinit(ehci, CONFIG_MXC_USB_PORT);
+
return 0;
}