summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-10-08 21:20:49 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-10-08 21:20:49 +0200
commit4b19b7448e63bab8af17abbb30acff00d8f0dc99 (patch)
tree6ba89c10ebffb00cee92656da9a5aad8396390c0 /drivers/usb
parentc19a8bc5711ec63e905ef91f045a1489f0aa3cb0 (diff)
parent5e3a388cddce1685ccd9bc1b58ddb89a191ed88f (diff)
downloadu-boot-imx-4b19b7448e63bab8af17abbb30acff00d8f0dc99.zip
u-boot-imx-4b19b7448e63bab8af17abbb30acff00d8f0dc99.tar.gz
u-boot-imx-4b19b7448e63bab8af17abbb30acff00d8f0dc99.tar.bz2
Merge remote-tracking branch 'u-boot-imx/master'
The single file conflict below is actually trivial. Conflicts: board/boundary/nitrogen6x/nitrogen6x.c
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-mx6.c4
-rw-r--r--drivers/usb/host/ehci-mxs.c16
2 files changed, 18 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index c0a557b..9ec5a0a 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -174,7 +174,7 @@ struct usbnc_regs {
static void usb_oc_config(int index)
{
- struct usbnc_regs *usbnc = (struct usbnc_regs *)(USBOH3_USB_BASE_ADDR +
+ struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR +
USB_OTHERREGS_OFFSET);
void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl[index]);
u32 val;
@@ -207,7 +207,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
struct ehci_hccr **hccr, struct ehci_hcor **hcor)
{
enum usb_init_type type;
- struct usb_ehci *ehci = (struct usb_ehci *)(USBOH3_USB_BASE_ADDR +
+ struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR +
(0x200 * index));
if (index > 3)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 4d652b3..6b8d969 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -77,6 +77,16 @@ static int ehci_mxs_toggle_clock(const struct ehci_mxs_port *port, int enable)
return 0;
}
+int __weak board_ehci_hcd_init(int port)
+{
+ return 0;
+}
+
+int __weak board_ehci_hcd_exit(int port)
+{
+ return 0;
+}
+
int ehci_hcd_init(int index, enum usb_init_type init,
struct ehci_hccr **hccr, struct ehci_hcor **hcor)
{
@@ -90,6 +100,10 @@ int ehci_hcd_init(int index, enum usb_init_type init,
return -EINVAL;
}
+ ret = board_ehci_hcd_init(index);
+ if (ret)
+ return ret;
+
port = &mxs_port[index];
/* Reset the PHY block */
@@ -154,5 +168,7 @@ int ehci_hcd_stop(int index)
/* Disable USB clock */
ret = ehci_mxs_toggle_clock(port, 0);
+ board_ehci_hcd_exit(index);
+
return ret;
}