[PATCH 53/133] [Jaunty SRU] ARM.imx51 Freescale:ENGR00111670-4 ehci: move machine specific host2 init
Brad Figg
brad.figg at canonical.com
Thu Jul 9 16:48:43 UTC 2009
From: Dinh Nguyen <Dinh.Nguyen at freescale.com>
Remove machine specific host2 init from ehci driver. Move it to machine
code.
Signed-off-by: Dinh Nguyen <Dinh.Nguyen at freescale.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
arch/arm/mach-mx51/usb_h2.c | 5 +++++
drivers/usb/host/ehci-arc.c | 19 +++----------------
2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-mx51/usb_h2.c b/arch/arm/mach-mx51/usb_h2.c
index 7329e38..d78edaf 100644
--- a/arch/arm/mach-mx51/usb_h2.c
+++ b/arch/arm/mach-mx51/usb_h2.c
@@ -16,6 +16,7 @@
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/fsl_devices.h>
+#include <asm/mach-types.h>
#include <mach/arc_otg.h>
#include "usb.h"
#include "iomux.h"
@@ -76,6 +77,10 @@ static int __init usbh2_init(void)
{
pr_debug("%s: \n", __func__);
+ if (machine_is_mx51_3ds() ||
+ (machine_is_mx51_babbage() && (cpu_is_mx51_rev(CHIP_REV_2_0) >= 1)))
+ return 0;
+
host_pdev_register(usbh2_resources, ARRAY_SIZE(usbh2_resources),
&usbh2_config);
return 0;
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c
index 421fac5..49c5347 100644
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -23,7 +23,6 @@
#include <linux/platform_device.h>
#include <linux/fsl_devices.h>
#include <linux/usb/otg.h>
-#include <asm/mach-types.h>
#include "ehci-fsl.h"
@@ -411,11 +410,7 @@ static int ehci_fsl_drv_probe(struct platform_device *pdev)
if (usb_disabled())
return -ENODEV;
- if (pdata->name[5] == '2') {
- if (!machine_is_mx51_3ds())
- return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev);
- } else
- return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev);
+ return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev);
}
static int ehci_fsl_drv_remove(struct platform_device *pdev)
@@ -423,11 +418,7 @@ static int ehci_fsl_drv_remove(struct platform_device *pdev)
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
struct usb_hcd *hcd = platform_get_drvdata(pdev);
- if (pdata->name[5] == '2') {
- if (!machine_is_mx51_3ds())
- usb_hcd_fsl_remove(hcd, pdev);
- } else
- usb_hcd_fsl_remove(hcd, pdev);
+ usb_hcd_fsl_remove(hcd, pdev);
return 0;
}
@@ -435,11 +426,7 @@ static int ehci_fsl_drv_shutdown(struct platform_device *pdev)
{
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
- if (pdata->name[5] == '2') {
- if (!machine_is_mx51_3ds())
- usb_hcd_platform_shutdown(pdev);
- } else
- usb_hcd_platform_shutdown(pdev);
+ usb_hcd_platform_shutdown(pdev);
}
#ifdef CONFIG_PM
--
1.6.0.4
More information about the kernel-team
mailing list