On 15.12.2010 15:20, I wrote:
In order to read/write to the i.MX OTG viewport register it is necessary to
setup
the PORTSCx register first.
By default i.MX OTG port is configured for USB serial PHY. In order to use a
ULPI PHY
the PORTSCx register needs to be configured properly.
Original code accessed OTG viewport without configuring PORTSCx and this
caused ULPI
read/write to fail.
Tested on a MX31PDK board with a ISP1504 transceiver:
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
mxc-ehci mxc-ehci.0: initializing i.MX USB Controller
ULPI transceiver vendor/product ID 0x04cc/0x1504
Found NXP ISP1504 ULPI transceiver.
ULPI integrity check: passed.
Signed-off-by: Fabio Estevam<fabio.estevam@xxxxxxxxxxxxx>
---
drivers/usb/host/ehci-mxc.c | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index bce8505..febfea0 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
[...]
@@ -125,7 +119,8 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
int irq, ret;
struct ehci_mxc_priv *priv;
struct device *dev =&pdev->dev;
-
+ struct ehci_hcd *ehci;
+
dev_info(&pdev->dev, "initializing i.MX USB Controller\n");
if (!pdata) {
@@ -138,6 +133,8 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
hcd = usb_create_hcd(&ehci_mxc_hc_driver, dev, dev_name(dev));
if (!hcd)
return -ENOMEM;
+
+ ehci = hcd_to_ehci(hcd);
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
@@ -200,6 +197,19 @@ static int ehci_mxc_drv_probe(struct platform_device
*pdev)
ret = mxc_initialize_usb_hw(pdev->id, pdata->flags);
if (ret< 0)
goto err_init;
+
+ ehci = hcd_to_ehci(hcd);
Why do it twice?
Oh, you've already posted v2 without this duplication. Nevermind then. :-)
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html