Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ba02978a48f0117b3d0aced97a30615a5d7412e2
Commit:     ba02978a48f0117b3d0aced97a30615a5d7412e2
Parent:     4d68c0be69b65aa260448cea9fb1c555ae90d268
Author:     Li Yang <[EMAIL PROTECTED]>
AuthorDate: Fri May 11 17:09:55 2007 +0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jul 12 16:29:50 2007 -0700

    USB: ehci_fsl update for MPC831x support
    
    For MPC831x support, change the ehci-fsl driver to preserve
    bits set in platform code.  Add a common CONFIG_USB_EHCI_FSL
    to indicate presence of Freescale EHCI SOC.  Add FSL_USB2_DR_OTG
    operating mode support, thus both host and device can work for the
    mini-ab receptacle.  Note: this doesn't enable OTG protocol
    support.
    
    Signed-off-by: Li Yang <[EMAIL PROTECTED]>
    Cc: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/host/Kconfig    |    7 +++++++
 drivers/usb/host/ehci-fsl.c |   10 +++++++---
 drivers/usb/host/ehci-hcd.c |    2 +-
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index a2bcca8..2f52982 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -77,6 +77,13 @@ config USB_EHCI_BIG_ENDIAN_DESC
        depends on USB_EHCI_HCD && 440EPX
        default y
 
+config USB_EHCI_FSL
+       bool
+       select USB_EHCI_ROOT_HUB_TT
+       default y if MPC834x || PPC_MPC831x
+       ---help---
+         Variation of ARC USB block used in some Freescale chips.
+
 config USB_ISP116X_HCD
        tristate "ISP116X HCD support"
        depends on USB
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index c7a7c59..b7b7bfb 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -67,7 +67,8 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
         * in host mode.
         */
        if (!((pdata->operating_mode == FSL_USB2_DR_HOST) ||
-             (pdata->operating_mode == FSL_USB2_MPH_HOST))) {
+             (pdata->operating_mode == FSL_USB2_MPH_HOST) ||
+             (pdata->operating_mode == FSL_USB2_DR_OTG))) {
                dev_err(&pdev->dev,
                        "Non Host Mode configured for %s. Wrong driver 
linked.\n",
                        pdev->dev.bus_id);
@@ -185,12 +186,14 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd)
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
        struct fsl_usb2_platform_data *pdata;
        void __iomem *non_ehci = hcd->regs;
+       u32 temp;
 
        pdata =
            (struct fsl_usb2_platform_data *)hcd->self.controller->
            platform_data;
        /* Enable PHY interface in the control reg. */
-       out_be32(non_ehci + FSL_SOC_USB_CTRL, 0x00000004);
+       temp = in_be32(non_ehci + FSL_SOC_USB_CTRL);
+       out_be32(non_ehci + FSL_SOC_USB_CTRL, temp | 0x00000004);
        out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0000001b);
 
 #if defined(CONFIG_PPC32) && !defined(CONFIG_NOT_COHERENT_CACHE)
@@ -206,7 +209,8 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd)
        out_be32(non_ehci + FSL_SOC_USB_SNOOP2, 0x80000000 | SNOOP_SIZE_2GB);
 #endif
 
-       if (pdata->operating_mode == FSL_USB2_DR_HOST)
+       if ((pdata->operating_mode == FSL_USB2_DR_HOST) ||
+                       (pdata->operating_mode == FSL_USB2_DR_OTG))
                mpc83xx_setup_phy(ehci, pdata->phy_mode, 0);
 
        if (pdata->operating_mode == FSL_USB2_MPH_HOST) {
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f005438..889c202 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -994,7 +994,7 @@ MODULE_LICENSE ("GPL");
 #define        PCI_DRIVER              ehci_pci_driver
 #endif
 
-#ifdef CONFIG_MPC834x
+#ifdef CONFIG_USB_EHCI_FSL
 #include "ehci-fsl.c"
 #define        PLATFORM_DRIVER         ehci_fsl_driver
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to