aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-fsl.c
diff options
context:
space:
mode:
authorLi Yang <leoli@freescale.com>2007-05-11 05:09:55 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:29:50 -0400
commitba02978a48f0117b3d0aced97a30615a5d7412e2 (patch)
tree940377b0118e4ab82969b45ce6847e6864db4ad1 /drivers/usb/host/ehci-fsl.c
parent4d68c0be69b65aa260448cea9fb1c555ae90d268 (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/ehci-fsl.c')
-rw-r--r--drivers/usb/host/ehci-fsl.c10
1 files changed, 7 insertions, 3 deletions
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) {