public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/9] USB: MX5: Add MX5 usb post-init callback
Date: Wed,  7 Dec 2011 19:33:13 +0100	[thread overview]
Message-ID: <1323282798-31358-5-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1323282798-31358-1-git-send-email-marek.vasut@gmail.com>

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>
---
 drivers/usb/host/ehci-mx5.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 7b88137..68a673e 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;
 }
 
-- 
1.7.7.1

  parent reply	other threads:[~2011-12-07 18:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 18:33 [U-Boot] [PATCH 0/9] MX5x USB support Marek Vasut
2011-12-07 18:33 ` [U-Boot] [PATCH 1/9] USB: MX5: add helper functions to enable USB clocks Marek Vasut
2011-12-07 18:33 ` [U-Boot] [PATCH 2/9] USB: MX5: add generic USB EHCI support for mx51 and mx53 Marek Vasut
2011-12-07 18:33 ` [U-Boot] [PATCH 3/9] USB: MX5: Abstract out mx51 USB pixmux configuration Marek Vasut
2011-12-07 18:33 ` Marek Vasut [this message]
2011-12-07 18:33 ` [U-Boot] [PATCH 5/9] USB: mx53loco: add end enable USB host support on port 1 Marek Vasut
2011-12-07 18:33 ` [U-Boot] [PATCH 6/9] USB: mx51evk: " Marek Vasut
2011-12-07 18:33 ` [U-Boot] [PATCH 7/9] USB: EHCI: Allow EHCI post-powerup configuration in board files Marek Vasut
2011-12-07 18:33 ` [U-Boot] [PATCH 8/9] USB: Add generic ULPI layer and a viewport Marek Vasut
2011-12-07 18:33 ` [U-Boot] [PATCH 9/9] USB: efikamx: Enable USB on EfikaMX and EfikaSB Marek Vasut
2011-12-07 18:37 ` [U-Boot] [PATCH 0/9] MX5x USB support Marek Vasut
2011-12-10 16:57   ` Remy Bohmer
2011-12-08 18:59 ` Wolfgang Grandegger
2011-12-10 16:46 ` Remy Bohmer
2011-12-10 19:13   ` Marek Vasut
2011-12-10 21:25     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323282798-31358-5-git-send-email-marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox