Re: [PATCH v4] EHCI bus glue for on-chip PMC MSP USB controller
From: Matthieu CASTET <hidden>
Date: 2011-02-15 17:44:54
Anoop P.A a écrit :
quoted hunk ↗ jump to hunk
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 <redacted> Tested-by: Shane McDonald <redacted> --- 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_XILINXdiff --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