From 868d0b148ad8683adfdcab43e24bbb8c4f98aa00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 10 Nov 2010 21:50:07 +0100 Subject: [PATCH] --- yaml --- r: 226063 b: refs/heads/master c: 224b8c83641c2f31e3efc9bc5956636cc42cadf7 h: refs/heads/master i: 226061: 76ab4ab3461a4828f168c91cdfaf098243d6b483 226059: fb8c4f0a7fce0b4729709d6c3b531c4a198e590c 226055: 611675edcfd280bb48ba5acf980ee4c3307bc52d 226047: b0d970b4a5f040424313f2c264ce5805f4294ec0 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-mx25/Kconfig | 1 + trunk/arch/arm/mach-mx25/devices-imx25.h | 4 +++ trunk/arch/arm/mach-mx25/devices.c | 26 ------------------- trunk/arch/arm/mach-mx25/devices.h | 1 - trunk/arch/arm/mach-mx25/mach-cpuimx25.c | 5 ++-- .../plat-mxc/devices/platform-fsl-usb2-udc.c | 5 ++++ 7 files changed, 13 insertions(+), 31 deletions(-) diff --git a/[refs] b/[refs] index f1dc4f4e4677..27216f4bef09 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2c20b9f19add2248dc867f1f78dcef1eb0944543 +refs/heads/master: 224b8c83641c2f31e3efc9bc5956636cc42cadf7 diff --git a/trunk/arch/arm/mach-mx25/Kconfig b/trunk/arch/arm/mach-mx25/Kconfig index b55585bf93fd..2944bb71b031 100644 --- a/trunk/arch/arm/mach-mx25/Kconfig +++ b/trunk/arch/arm/mach-mx25/Kconfig @@ -13,6 +13,7 @@ config MACH_EUKREA_CPUIMX25 bool "Support Eukrea CPUIMX25 Platform" select IMX_HAVE_PLATFORM_ESDHC select IMX_HAVE_PLATFORM_FLEXCAN + select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_IMX_I2C select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_MXC_EHCI diff --git a/trunk/arch/arm/mach-mx25/devices-imx25.h b/trunk/arch/arm/mach-mx25/devices-imx25.h index ac343ae7fe43..448939aac02c 100644 --- a/trunk/arch/arm/mach-mx25/devices-imx25.h +++ b/trunk/arch/arm/mach-mx25/devices-imx25.h @@ -19,6 +19,10 @@ extern const struct imx_flexcan_data imx25_flexcan_data[] __initconst; #define imx25_add_flexcan0(pdata) imx25_add_flexcan(0, pdata) #define imx25_add_flexcan1(pdata) imx25_add_flexcan(1, pdata) +extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst; +#define imx25_add_fsl_usb2_udc(pdata) \ + imx_add_fsl_usb2_udc(&imx25_fsl_usb2_udc_data, pdata) + extern const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst; #define imx25_add_imx_i2c(id, pdata) \ imx_add_imx_i2c(&imx25_imx_i2c_data[id], pdata) diff --git a/trunk/arch/arm/mach-mx25/devices.c b/trunk/arch/arm/mach-mx25/devices.c index 4611c763ff17..27d07ce55ee0 100644 --- a/trunk/arch/arm/mach-mx25/devices.c +++ b/trunk/arch/arm/mach-mx25/devices.c @@ -22,32 +22,6 @@ #include #include -static u64 otg_dmamask = DMA_BIT_MASK(32); - -static struct resource mxc_otg_resources[] = { - { - .start = MX25_USB_OTG_BASE_ADDR, - .end = MX25_USB_OTG_BASE_ADDR + 0x1ff, - .flags = IORESOURCE_MEM, - }, { - .start = MX25_INT_USB_OTG, - .end = MX25_INT_USB_OTG, - .flags = IORESOURCE_IRQ, - }, -}; - -/* OTG gadget device */ -struct platform_device otg_udc_device = { - .name = "fsl-usb2-udc", - .id = -1, - .dev = { - .dma_mask = &otg_dmamask, - .coherent_dma_mask = 0xffffffff, - }, - .resource = mxc_otg_resources, - .num_resources = ARRAY_SIZE(mxc_otg_resources), -}; - static struct resource mxc_pwm_resources0[] = { { .start = 0x53fe0000, diff --git a/trunk/arch/arm/mach-mx25/devices.h b/trunk/arch/arm/mach-mx25/devices.h index e6ad64061963..266c305a2ad7 100644 --- a/trunk/arch/arm/mach-mx25/devices.h +++ b/trunk/arch/arm/mach-mx25/devices.h @@ -1,4 +1,3 @@ -extern struct platform_device otg_udc_device; extern struct platform_device mxc_pwm_device0; extern struct platform_device mxc_pwm_device1; extern struct platform_device mxc_pwm_device2; diff --git a/trunk/arch/arm/mach-mx25/mach-cpuimx25.c b/trunk/arch/arm/mach-mx25/mach-cpuimx25.c index 0ee0fe73952d..2094bddb3e47 100644 --- a/trunk/arch/arm/mach-mx25/mach-cpuimx25.c +++ b/trunk/arch/arm/mach-mx25/mach-cpuimx25.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -97,7 +96,7 @@ static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { MXC_EHCI_IPPUE_DOWN, }; -static struct fsl_usb2_platform_data otg_device_pdata = { +static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { .operating_mode = FSL_USB2_DR_DEVICE, .phy_mode = FSL_USB2_PHY_UTMI, }; @@ -135,7 +134,7 @@ static void __init eukrea_cpuimx25_init(void) if (otg_mode_host) imx25_add_mxc_ehci_otg(&otg_pdata); else - mxc_register_device(&otg_udc_device, &otg_device_pdata); + imx25_add_fsl_usb2_udc(&otg_device_pdata); imx25_add_mxc_ehci_hs(&usbh2_pdata); diff --git a/trunk/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c b/trunk/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c index 3116f9ad263f..cb5fb710e850 100644 --- a/trunk/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c +++ b/trunk/arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c @@ -15,6 +15,11 @@ .irq = soc ## _INT_USB_OTG, \ } +#ifdef CONFIG_ARCH_MX25 +const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst = + imx_fsl_usb2_udc_data_entry_single(MX25); +#endif + #ifdef CONFIG_SOC_IMX27 const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = imx_fsl_usb2_udc_data_entry_single(MX27);