Skip to content
Snippets Groups Projects
Commit 1b80f270 authored by Marek Vasut's avatar Marek Vasut Committed by Remy Bohmer
Browse files

USB: MX5: Add MX5 usb post-init callback


This is useful for USB Transceivers init etc.

Signed-off-by: default avatarMarek 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>
parent 0f8c86b5
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/arch/imx-regs.h> #include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
#include <asm/arch/mx5x_pins.h> #include <asm/arch/mx5x_pins.h>
#include <asm/arch/iomux.h>
#include "ehci.h" #include "ehci.h"
#include "ehci-core.h" #include "ehci-core.h"
...@@ -198,6 +199,13 @@ int mxc_set_usbcontrol(int port, unsigned int flags) ...@@ -198,6 +199,13 @@ int mxc_set_usbcontrol(int port, unsigned int flags)
return ret; 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) int ehci_hcd_init(void)
{ {
struct usb_ehci *ehci; struct usb_ehci *ehci;
...@@ -217,7 +225,7 @@ int ehci_hcd_init(void) ...@@ -217,7 +225,7 @@ int ehci_hcd_init(void)
enable_usb_phy2_clk(1); enable_usb_phy2_clk(1);
mdelay(1); mdelay(1);
/* do board specific initialization */ /* Do board specific initialization */
board_ehci_hcd_init(CONFIG_MXC_USB_PORT); board_ehci_hcd_init(CONFIG_MXC_USB_PORT);
ehci = (struct usb_ehci *)(OTG_BASE_ADDR + ehci = (struct usb_ehci *)(OTG_BASE_ADDR +
...@@ -231,9 +239,11 @@ int ehci_hcd_init(void) ...@@ -231,9 +239,11 @@ int ehci_hcd_init(void)
setbits_le32(&ehci->portsc, USB_EN); setbits_le32(&ehci->portsc, USB_EN);
mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS);
mdelay(10); mdelay(10);
/* Do board specific post-initialization */
board_ehci_hcd_postinit(ehci, CONFIG_MXC_USB_PORT);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment