diff options
author | Li Yang <leoli@freescale.com> | 2007-05-11 05:09:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:29:50 -0400 |
commit | ba02978a48f0117b3d0aced97a30615a5d7412e2 (patch) | |
tree | 940377b0118e4ab82969b45ce6847e6864db4ad1 /drivers/usb/host | |
parent | 4d68c0be69b65aa260448cea9fb1c555ae90d268 (diff) |
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 <leoli@freescale.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/Kconfig | 7 | ||||
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 10 | ||||
-rw-r--r-- | 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 a2bcca8140c6..2f529828c74d 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -77,6 +77,13 @@ config USB_EHCI_BIG_ENDIAN_DESC | |||
77 | depends on USB_EHCI_HCD && 440EPX | 77 | depends on USB_EHCI_HCD && 440EPX |
78 | default y | 78 | default y |
79 | 79 | ||
80 | config USB_EHCI_FSL | ||
81 | bool | ||
82 | select USB_EHCI_ROOT_HUB_TT | ||
83 | default y if MPC834x || PPC_MPC831x | ||
84 | ---help--- | ||
85 | Variation of ARC USB block used in some Freescale chips. | ||
86 | |||
80 | config USB_ISP116X_HCD | 87 | config USB_ISP116X_HCD |
81 | tristate "ISP116X HCD support" | 88 | tristate "ISP116X HCD support" |
82 | depends on USB | 89 | depends on USB |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index c7a7c590426f..b7b7bfbce527 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, | |||
67 | * in host mode. | 67 | * in host mode. |
68 | */ | 68 | */ |
69 | if (!((pdata->operating_mode == FSL_USB2_DR_HOST) || | 69 | if (!((pdata->operating_mode == FSL_USB2_DR_HOST) || |
70 | (pdata->operating_mode == FSL_USB2_MPH_HOST))) { | 70 | (pdata->operating_mode == FSL_USB2_MPH_HOST) || |
71 | (pdata->operating_mode == FSL_USB2_DR_OTG))) { | ||
71 | dev_err(&pdev->dev, | 72 | dev_err(&pdev->dev, |
72 | "Non Host Mode configured for %s. Wrong driver linked.\n", | 73 | "Non Host Mode configured for %s. Wrong driver linked.\n", |
73 | pdev->dev.bus_id); | 74 | pdev->dev.bus_id); |
@@ -185,12 +186,14 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd) | |||
185 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 186 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
186 | struct fsl_usb2_platform_data *pdata; | 187 | struct fsl_usb2_platform_data *pdata; |
187 | void __iomem *non_ehci = hcd->regs; | 188 | void __iomem *non_ehci = hcd->regs; |
189 | u32 temp; | ||
188 | 190 | ||
189 | pdata = | 191 | pdata = |
190 | (struct fsl_usb2_platform_data *)hcd->self.controller-> | 192 | (struct fsl_usb2_platform_data *)hcd->self.controller-> |
191 | platform_data; | 193 | platform_data; |
192 | /* Enable PHY interface in the control reg. */ | 194 | /* Enable PHY interface in the control reg. */ |
193 | out_be32(non_ehci + FSL_SOC_USB_CTRL, 0x00000004); | 195 | temp = in_be32(non_ehci + FSL_SOC_USB_CTRL); |
196 | out_be32(non_ehci + FSL_SOC_USB_CTRL, temp | 0x00000004); | ||
194 | out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0000001b); | 197 | out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0000001b); |
195 | 198 | ||
196 | #if defined(CONFIG_PPC32) && !defined(CONFIG_NOT_COHERENT_CACHE) | 199 | #if defined(CONFIG_PPC32) && !defined(CONFIG_NOT_COHERENT_CACHE) |
@@ -206,7 +209,8 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd) | |||
206 | out_be32(non_ehci + FSL_SOC_USB_SNOOP2, 0x80000000 | SNOOP_SIZE_2GB); | 209 | out_be32(non_ehci + FSL_SOC_USB_SNOOP2, 0x80000000 | SNOOP_SIZE_2GB); |
207 | #endif | 210 | #endif |
208 | 211 | ||
209 | if (pdata->operating_mode == FSL_USB2_DR_HOST) | 212 | if ((pdata->operating_mode == FSL_USB2_DR_HOST) || |
213 | (pdata->operating_mode == FSL_USB2_DR_OTG)) | ||
210 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); | 214 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); |
211 | 215 | ||
212 | if (pdata->operating_mode == FSL_USB2_MPH_HOST) { | 216 | 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 f005438dedae..889c2027e7f7 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -994,7 +994,7 @@ MODULE_LICENSE ("GPL"); | |||
994 | #define PCI_DRIVER ehci_pci_driver | 994 | #define PCI_DRIVER ehci_pci_driver |
995 | #endif | 995 | #endif |
996 | 996 | ||
997 | #ifdef CONFIG_MPC834x | 997 | #ifdef CONFIG_USB_EHCI_FSL |
998 | #include "ehci-fsl.c" | 998 | #include "ehci-fsl.c" |
999 | #define PLATFORM_DRIVER ehci_fsl_driver | 999 | #define PLATFORM_DRIVER ehci_fsl_driver |
1000 | #endif | 1000 | #endif |