public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5] usb: ehci: mxs: Add board-specific callbacks
@ 2014-04-28  1:38 Marek Vasut
  2014-04-28  1:38 ` [U-Boot] [PATCH 2/5] arm: mxs: Wait when disabling VDDMEM current limiter Marek Vasut
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Marek Vasut @ 2014-04-28  1:38 UTC (permalink / raw)
  To: u-boot

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>
---
 drivers/usb/host/ehci-mxs.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

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;
 }
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-09-29  7:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28  1:38 [U-Boot] [PATCH 1/5] usb: ehci: mxs: Add board-specific callbacks Marek Vasut
2014-04-28  1:38 ` [U-Boot] [PATCH 2/5] arm: mxs: Wait when disabling VDDMEM current limiter Marek Vasut
2014-04-28  1:38 ` [U-Boot] [PATCH 3/5] arm: mxs: Wait for DRAM to start Marek Vasut
2014-04-28  1:38 ` [U-Boot] [PATCH 4/5] arm: mxs: olinuxino: Enable USB only when needed Marek Vasut
2014-04-28  1:38 ` [U-Boot] [PATCH 5/5] arm: mxs: olinuxino: Fine-tune DRAM configuration Marek Vasut
2014-06-12 22:03 ` [U-Boot] [PATCH 1/5] usb: ehci: mxs: Add board-specific callbacks Marek Vasut
2014-09-24 10:53 ` Marek Vasut
2014-09-25  8:25   ` Stefano Babic
2014-09-29  7:03 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox