linux-mips
[Top] [All Lists]

Re: [PATCH v4] EHCI bus glue for on-chip PMC MSP USB controller

To: Anoop P.A <anoop.pa@gmail.com>
Subject: Re: [PATCH v4] EHCI bus glue for on-chip PMC MSP USB controller
From: Matthieu CASTET <matthieu.castet@parrot.com>
Date: Tue, 15 Feb 2011 18:44:05 +0100
Cc: "gregkh@suse.de" <gregkh@suse.de>, "dbrownell@users.sourceforge.net" <dbrownell@users.sourceforge.net>, "stern@rowland.harvard.edu" <stern@rowland.harvard.edu>, "pkondeti@codeaurora.org" <pkondeti@codeaurora.org>, "jacob.jun.pan@intel.com" <jacob.jun.pan@intel.com>, "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "alek.du@intel.com" <alek.du@intel.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "gadiyar@ti.com" <gadiyar@ti.com>, "ralf@linux-mips.org" <ralf@linux-mips.org>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, Greg KH <greg@kroah.com>
In-reply-to: <1297766591-11919-1-git-send-email-anoop.pa@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1296127736-28208-1-git-send-email-anoop.pa@gmail.com> <1297766591-11919-1-git-send-email-anoop.pa@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.24 (X11/20100228)
Anoop P.A a écrit :
From: Anoop <paanoop1@paanoop1-desktop.(none)>

This patch add bus glue for USB controller commonly found in PMC-Sierra MSP71xx 
family of SoC's.
Patch includes a tdi reset quirk as well .

Signed-off-by: Anoop P A <anoop.pa@gmail.com>
Tested-by: Shane McDonald <mcdonald.shane@gmail.com>
---
Changes.
 ehci-pmcmsp.c is based on latest ehci-pci.c.Addressed some stylistic issue 
pointed by Greg.
 Addressed review comments of Matthieu CASTET.

 config XPS_USB_HCD_XILINX
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index cbf451a..913e7df 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -260,6 +260,8 @@ static void tdi_reset (struct ehci_hcd *ehci)
        if (ehci_big_endian_mmio(ehci))
                tmp |= USBMODE_BE;
        ehci_writel(ehci, tmp, reg_ptr);
+       if (ehci->pmc_msp_tdi)
+               usb_hcd_tdi_set_mode(ehci);
 }

> +#ifdef CONFIG_USB_EHCI_HCD_PMC_MSP
> +extern void usb_hcd_tdi_set_mode(struct ehci_hcd *ehci);
> +#else
> +static inline void usb_hcd_tdi_set_mode(struct ehci_hcd *ehci)
> +{ }
> +#endif
> +
>  /* convert between an HCD pointer and the corresponding EHCI_HCD */
>  static inline struct ehci_hcd *hcd_to_ehci (struct usb_hcd *hcd)
>  {
> --

This won't work it you build CONFIG_USB_EHCI_HCD_PMC_MSP and other ehci controller.

A better alternative could something like : http://article.gmane.org/gmane.linux.usb.general/42624




+
+/* host mode */
+#define USB_CTRL_MODE_HOST             0x3
+
+/* big endian */
+#define USB_CTRL_MODE_BIG_ENDIAN       0x4
+
+/* stream disable*/
+#define USB_CTRL_MODE_STREAM_DISABLE   0x10
+
This doesn't seem to be used anymore.


Matthieu

<Prev in Thread] Current Thread [Next in Thread>