summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2014-04-28 03:38:39 +0200
committerStefano Babic <sbabic@denx.de>2014-09-29 09:02:16 +0200
commitdd24b57bb78422eba6780f0b6cc4c0b049a82371 (patch)
tree26db6f66727824ea9c9803c99fa86dd6b4eeeffb
parent36c1ca4d46ef11ac7b3c0afb5c42dadb4e8773f3 (diff)
downloadu-boot-imx-dd24b57bb78422eba6780f0b6cc4c0b049a82371.zip
u-boot-imx-dd24b57bb78422eba6780f0b6cc4c0b049a82371.tar.gz
u-boot-imx-dd24b57bb78422eba6780f0b6cc4c0b049a82371.tar.bz2
usb: ehci: mxs: Add board-specific callbacks
Add board-specific callbacks for enabling/disabling port power into the MXS EHCI controller driver. This is in-line with the names of callbacks on other systems. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
-rw-r--r--drivers/usb/host/ehci-mxs.c16
1 files changed, 16 insertions, 0 deletions
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;
}