]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ARM: mx3: dynamically allocate fsl-usb2-udc devices
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 12 Nov 2010 15:40:06 +0000 (16:40 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 19 Nov 2010 20:54:35 +0000 (21:54 +0100)
While adapting the #defines for this I noticed that the offset
used for USB HS on i.MX35 differs from the documented offset.
I kept the working offset and commented that the documentation
differs.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
16 files changed:
arch/arm/mach-mx3/Kconfig
arch/arm/mach-mx3/devices-imx31.h
arch/arm/mach-mx3/devices-imx35.h
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.h
arch/arm/mach-mx3/mach-cpuimx35.c
arch/arm/mach-mx3/mach-mx31_3ds.c
arch/arm/mach-mx3/mach-mx35_3ds.c
arch/arm/mach-mx3/mach-pcm037.c
arch/arm/mach-mx3/mach-pcm043.c
arch/arm/mach-mx3/mx31moboard-devboard.c
arch/arm/mach-mx3/mx31moboard-marxbot.c
arch/arm/mach-mx3/mx31moboard-smartbot.c
arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c
arch/arm/plat-mxc/include/mach/mx31.h
arch/arm/plat-mxc/include/mach/mx35.h

index 17ae7d365729fc0227ac01f213b12521a589c10b..120add4b7bb919dd94f4f9d8c3ce8441b06bf451 100644 (file)
@@ -50,6 +50,7 @@ config MACH_MX31ADS_WM1133_EV1
 config MACH_PCM037
        bool "Support Phytec pcm037 (i.MX31) platforms"
        select SOC_IMX31
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_MXC_MMC
@@ -85,6 +86,7 @@ config MACH_MX31_3DS
        bool "Support MX31PDK (3DS)"
        select SOC_IMX31
        select MXC_DEBUG_BOARD
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_MXC_NAND
        select IMX_HAVE_PLATFORM_SPI_IMX
@@ -104,6 +106,7 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT
 config MACH_MX31MOBOARD
        bool "Support mx31moboard platforms (EPFL Mobots group)"
        select SOC_IMX31
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_MXC_MMC
@@ -135,6 +138,7 @@ config MACH_QONG
 config MACH_PCM043
        bool "Support Phytec pcm043 (i.MX35) platforms"
        select SOC_IMX35
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_SSI
        select IMX_HAVE_PLATFORM_IMX_UART
@@ -162,10 +166,10 @@ config MACH_MX35_3DS
        bool "Support MX35PDK platform"
        select SOC_IMX35
        select MXC_DEBUG_BOARD
+       select IMX_HAVE_PLATFORM_ESDHC
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_MXC_NAND
-       select IMX_HAVE_PLATFORM_ESDHC
-       default n
        help
          Include support for MX35PDK platform. This includes specific
          configurations for the board and its peripherals.
@@ -181,6 +185,7 @@ config MACH_KZM_ARM11_01
 config MACH_EUKREA_CPUIMX35
        bool "Support Eukrea CPUIMX35 Platform"
        select SOC_IMX35
+       select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_MXC_NAND
index 875e26f6cc77c651ba334e5a6b8bbe6f1064d956..0cefaca5d13d6dab5a0e2d3275f6b84989fd74d4 100644 (file)
@@ -9,6 +9,10 @@
 #include <mach/mx31.h>
 #include <mach/devices-common.h>
 
+extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst;
+#define imx31_add_fsl_usb2_udc(pdata)  \
+       imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata)
+
 extern const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst;
 #define imx31_add_imx_i2c(id, pdata)   \
        imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata)
index a71ce68af9a1ff7da2eebc913727ba92865089c4..36561ccdfbd6a1ec3a6ae4e7378c63493bdfb9ab 100644 (file)
@@ -13,6 +13,10 @@ extern const struct imx_fec_data imx35_fec_data __initconst;
 #define imx35_add_fec(pdata)   \
        imx_add_fec(&imx35_fec_data, pdata)
 
+extern const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst;
+#define imx35_add_fsl_usb2_udc(pdata)  \
+       imx_add_fsl_usb2_udc(&imx35_fsl_usb2_udc_data, pdata)
+
 extern const struct imx_flexcan_data imx35_flexcan_data[] __initconst;
 #define imx35_add_flexcan(id, pdata)   \
        imx_add_flexcan(&imx35_flexcan_data[id], pdata)
index 202c06c552b2fa183b5267e3648733df7e3d5c64..3f859ae8b850957f3087c9587bf526db002f7b48 100644 (file)
@@ -97,30 +97,18 @@ struct platform_device mx3_camera = {
 
 static struct resource otg_resources[] = {
        {
-               .start  = MX31_OTG_BASE_ADDR,
-               .end    = MX31_OTG_BASE_ADDR + 0x1ff,
+               .start  = MX31_USB_OTG_BASE_ADDR,
+               .end    = MX31_USB_OTG_BASE_ADDR + 0x1ff,
                .flags  = IORESOURCE_MEM,
        }, {
-               .start  = MX31_INT_USB3,
-               .end    = MX31_INT_USB3,
+               .start  = MX31_INT_USB_OTG,
+               .end    = MX31_INT_USB_OTG,
                .flags  = IORESOURCE_IRQ,
        },
 };
 
 static u64 otg_dmamask = DMA_BIT_MASK(32);
 
-/* OTG gadget device */
-struct platform_device mxc_otg_udc_device = {
-       .name           = "fsl-usb2-udc",
-       .id             = -1,
-       .dev            = {
-               .dma_mask               = &otg_dmamask,
-               .coherent_dma_mask      = DMA_BIT_MASK(32),
-       },
-       .resource       = otg_resources,
-       .num_resources  = ARRAY_SIZE(otg_resources),
-};
-
 /* OTG host */
 struct platform_device mxc_otg_host = {
        .name = "mxc-ehci",
@@ -139,12 +127,12 @@ static u64 usbh1_dmamask = ~(u32)0;
 
 static struct resource mxc_usbh1_resources[] = {
        {
-               .start = MX31_OTG_BASE_ADDR + 0x200,
-               .end = MX31_OTG_BASE_ADDR + 0x3ff,
+               .start = MX31_USB_HS1_BASE_ADDR,
+               .end = MX31_USB_HS1_BASE_ADDR + 0x1ff,
                .flags = IORESOURCE_MEM,
        }, {
-               .start = MX31_INT_USB1,
-               .end = MX31_INT_USB1,
+               .start = MX31_INT_USB_HS1,
+               .end = MX31_INT_USB_HS1,
                .flags = IORESOURCE_IRQ,
        },
 };
@@ -166,12 +154,12 @@ static u64 usbh2_dmamask = ~(u32)0;
 
 static struct resource mxc_usbh2_resources[] = {
        {
-               .start = MX31_OTG_BASE_ADDR + 0x400,
-               .end = MX31_OTG_BASE_ADDR + 0x5ff,
+               .start = MX31_USB_HS2_BASE_ADDR,
+               .end = MX31_USB_HS2_BASE_ADDR + 0x1ff,
                .flags = IORESOURCE_MEM,
        }, {
-               .start = MX31_INT_USB2,
-               .end = MX31_INT_USB2,
+               .start = MX31_INT_USB_HS2,
+               .end = MX31_INT_USB_HS2,
                .flags = IORESOURCE_IRQ,
        },
 };
@@ -249,14 +237,14 @@ static int __init mx3_devices_init(void)
 #endif
 #if defined(CONFIG_ARCH_MX35)
        if (cpu_is_mx35()) {
-               otg_resources[0].start = MX35_OTG_BASE_ADDR;
-               otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff;
-               otg_resources[1].start = MX35_INT_USBOTG;
-               otg_resources[1].end = MX35_INT_USBOTG;
-               mxc_usbh1_resources[0].start = MX35_OTG_BASE_ADDR + 0x400;
-               mxc_usbh1_resources[0].end = MX35_OTG_BASE_ADDR + 0x5ff;
-               mxc_usbh1_resources[1].start = MX35_INT_USBHS;
-               mxc_usbh1_resources[1].end = MX35_INT_USBHS;
+               otg_resources[0].start = MX35_USB_OTG_BASE_ADDR;
+               otg_resources[0].end = MX35_USB_OTG_BASE_ADDR + 0x1ff;
+               otg_resources[1].start = MX35_INT_USB_OTG;
+               otg_resources[1].end = MX35_INT_USB_OTG;
+               mxc_usbh1_resources[0].start = MX35_USB_HS_BASE_ADDR;
+               mxc_usbh1_resources[0].end = MX35_USB_HS_BASE_ADDR + 0x1ff;
+               mxc_usbh1_resources[1].start = MX35_INT_USB_HS;
+               mxc_usbh1_resources[1].end = MX35_INT_USB_HS;
                imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR;
                imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff;
        }
index d472c459238cc138253a554229fcf237e7902dc1..eb3b990f60ff7e7e67069da8c7ee7f59e1009c37 100644 (file)
@@ -1,7 +1,6 @@
 extern struct platform_device mx3_ipu;
 extern struct platform_device mx3_fb;
 extern struct platform_device mx3_camera;
-extern struct platform_device mxc_otg_udc_device;
 extern struct platform_device mxc_otg_host;
 extern struct platform_device mxc_usbh1;
 extern struct platform_device mxc_usbh2;
index 9fde873f5889c6292ae6ea97f5011bd632d54aa4..b8b619a0e07cfb33086d08d3caa9a3b2d2b84f38 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/i2c/tsc2007.h>
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
-#include <linux/fsl_devices.h>
 #include <linux/i2c-gpio.h>
 
 #include <asm/mach-types.h>
@@ -128,7 +127,7 @@ static struct mxc_usbh_platform_data __maybe_unused usbh1_pdata = {
                  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,
        .workaround     = FLS_USB2_WORKAROUND_ENGCM09152,
@@ -170,7 +169,7 @@ static void __init mxc_board_init(void)
        if (otg_mode_host)
                mxc_register_device(&mxc_otg_host, &otg_pdata);
        else
-               mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);
+               imx35_add_fsl_usb2_udc(&otg_device_pdata);
 
        mxc_register_device(&mxc_usbh1, &usbh1_pdata);
 
index 0ad9e78210826a37e0883707df6a1078c2d868ce..1b46f738b310da9f6e280c5ca2224b0a1b149f0c 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/mfd/mc13783.h>
 #include <linux/spi/spi.h>
 #include <linux/regulator/machine.h>
-#include <linux/fsl_devices.h>
 #include <linux/input/matrix_keypad.h>
 
 #include <mach/hardware.h>
@@ -214,7 +213,7 @@ usbotg_free_reset:
        return err;
 }
 
-static struct fsl_usb2_platform_data usbotg_pdata = {
+static const struct fsl_usb2_platform_data usbotg_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_ULPI,
 };
@@ -249,7 +248,7 @@ static void __init mxc_board_init(void)
        mxc_register_device(&imx_kpp_device, &mx31_3ds_keymap_data);
 
        mx31_3ds_usbotg_init();
-       mxc_register_device(&mxc_otg_udc_device, &usbotg_pdata);
+       imx31_add_fsl_usb2_udc(&usbotg_pdata);
 
        if (mxc_expio_init(MX31_CS5_BASE_ADDR, EXPIO_PARENT_INT))
                printk(KERN_WARNING "Init of the debug board failed, all "
index b66a75aa2e88d185de011c28f0fe4a2efd627cfb..6dfdf1746c76af97e93c971b1732f585c9288dfd 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/platform_device.h>
 #include <linux/memory.h>
 #include <linux/gpio.h>
-#include <linux/fsl_devices.h>
 
 #include <linux/mtd/physmap.h>
 
@@ -122,7 +121,7 @@ static struct pad_desc mx35pdk_pads[] = {
 };
 
 /* OTG config */
-static struct fsl_usb2_platform_data usb_otg_pdata = {
+static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_UTMI_WIDE,
 };
@@ -146,7 +145,7 @@ static void __init mxc_board_init(void)
 
        imx35_add_imx_uart0(&uart_pdata);
 
-       mxc_register_device(&mxc_otg_udc_device, &usb_otg_pdata);
+       imx35_add_fsl_usb2_udc(&usb_otg_pdata);
 
        mxc_register_device(&mxc_usbh1, &usb_host_pdata);
 
index 2ba4f2b9480be321dbef8430dfca84c552d46bf4..20f7f9485dc626562686041c142014265da4ca9e 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/delay.h>
 #include <linux/spi/spi.h>
 #include <linux/irq.h>
-#include <linux/fsl_devices.h>
 #include <linux/can/platform/sja1000.h>
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
@@ -550,7 +549,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = {
 };
 #endif
 
-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_ULPI,
 };
@@ -664,7 +663,7 @@ static void __init mxc_board_init(void)
        mxc_register_device(&mxc_usbh2, &usbh2_pdata);
 #endif
        if (!otg_mode_host)
-               mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);
+               imx31_add_fsl_usb2_udc(&otg_device_pdata);
 
 }
 
index 4e1de87995d48da64c76bb558abf3bbab815919f..78159f073a41d62533e6c5fae94a56bb7440a19c 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/i2c/at24.h>
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
-#include <linux/fsl_devices.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -323,7 +322,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = {
 };
 #endif
 
-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,
 };
@@ -392,7 +391,7 @@ static void __init mxc_board_init(void)
        mxc_register_device(&mxc_usbh1, &usbh1_pdata);
 #endif
        if (!otg_mode_host)
-               mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);
+               imx35_add_fsl_usb2_udc(&otg_device_pdata);
 
        imx35_add_flexcan1(NULL);
        imx35_add_esdhc(0, NULL);
index 3b75929f83f0493ba223931434c240b4e03adce3..331b5950c7a0de8e1003df013b70b4e0ecb45754 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/types.h>
-#include <linux/fsl_devices.h>
 
 #include <linux/usb/otg.h>
 
@@ -210,7 +209,7 @@ static int __init devboard_usbh1_init(void)
 }
 
 
-static struct fsl_usb2_platform_data usb_pdata = {
+static const struct fsl_usb2_platform_data usb_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_ULPI,
 };
@@ -231,7 +230,7 @@ void __init mx31moboard_devboard_init(void)
 
        devboard_init_sel_gpios();
 
-       mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+       imx31_add_fsl_usb2_udc(&usb_pdata);
 
        devboard_usbh1_init();
 }
index 075c4fb8e74cd53fd69072590c4a060d1d4f86fe..db79f744c3014a8ff9ad0b1bc8c3b8405e456708 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/types.h>
-#include <linux/fsl_devices.h>
 
 #include <linux/usb/otg.h>
 
@@ -326,7 +325,7 @@ static int __init marxbot_usbh1_init(void)
        return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
 }
 
-static struct fsl_usb2_platform_data usb_pdata = {
+static const struct fsl_usb2_platform_data usb_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_ULPI,
 };
@@ -358,7 +357,7 @@ void __init mx31moboard_marxbot_init(void)
        gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0));
        gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false);
 
-       mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+       imx31_add_fsl_usb2_udc(&usb_pdata);
 
        marxbot_usbh1_init();
 }
index 417757e78c65bef82725bfc135d1e03b5bf29392..68e8ab55f4c75460c93a64bd372b3c283799936f 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/types.h>
-#include <linux/fsl_devices.h>
 
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
@@ -119,7 +118,7 @@ static int __init smartbot_cam_init(void)
        return 0;
 }
 
-static struct fsl_usb2_platform_data usb_pdata = {
+static const struct fsl_usb2_platform_data usb_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_ULPI,
 };
@@ -183,7 +182,7 @@ void __init mx31moboard_smartbot_init(int board)
 
        switch (board) {
        case MX31SMARTBOT:
-               mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+               imx31_add_fsl_usb2_udc(&usb_pdata);
                break;
        case MX31EYEBOT:
                smartbot_otg_host_init();
index 42c3923c41593ccbf7b07506f3b88cdd66d6c1aa..59c33f6e401cd9f1507f6bb31fec6d975f8190af 100644 (file)
@@ -25,6 +25,16 @@ const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
        imx_fsl_usb2_udc_data_entry_single(MX27);
 #endif /* ifdef CONFIG_SOC_IMX27 */
 
+#ifdef CONFIG_SOC_IMX31
+const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst =
+       imx_fsl_usb2_udc_data_entry_single(MX31);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
+       imx_fsl_usb2_udc_data_entry_single(MX35);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
 struct platform_device *__init imx_add_fsl_usb2_udc(
                const struct imx_fsl_usb2_udc_data *data,
                const struct fsl_usb2_platform_data *pdata)
index d024c9c5dd3fa7fea22866064b5fdb914260bca0..092323144e2bc88d9a4830a036203b848ad9b687 100644 (file)
 #define MX31_ECT_CTIO_BASE_ADDR                        (MX31_AIPS1_BASE_ADDR + 0x18000)
 #define MX31_I2C1_BASE_ADDR                    (MX31_AIPS1_BASE_ADDR + 0x80000)
 #define MX31_I2C3_BASE_ADDR                    (MX31_AIPS1_BASE_ADDR + 0x84000)
-#define MX31_OTG_BASE_ADDR                     (MX31_AIPS1_BASE_ADDR + 0x88000)
+#define MX31_USB_BASE_ADDR                     (MX31_AIPS1_BASE_ADDR + 0x88000)
+#define MX31_USB_OTG_BASE_ADDR                 (MX31_USB_BASE_ADDR + 0x0000)
+#define MX31_USB_HS1_BASE_ADDR                 (MX31_USB_BASE_ADDR + 0x0200)
+#define MX31_USB_HS2_BASE_ADDR                 (MX31_USB_BASE_ADDR + 0x0400)
 #define MX31_ATA_BASE_ADDR                     (MX31_AIPS1_BASE_ADDR + 0x8c000)
 #define MX31_UART1_BASE_ADDR                   (MX31_AIPS1_BASE_ADDR + 0x90000)
 #define MX31_UART2_BASE_ADDR                   (MX31_AIPS1_BASE_ADDR + 0x94000)
@@ -161,10 +164,9 @@ static inline void mx31_setup_weimcs(size_t cs,
 #define MX31_INT_UART2         32
 #define MX31_INT_NFC           33
 #define MX31_INT_SDMA          34
-#define MX31_INT_USB1          35
-#define MX31_INT_USB2          36
-#define MX31_INT_USB3          37
-#define MX31_INT_USB4          38
+#define MX31_INT_USB_HS1       35
+#define MX31_INT_USB_HS2       36
+#define MX31_INT_USB_OTG       37
 #define MX31_INT_MSHC1         39
 #define MX31_INT_MSHC2         40
 #define MX31_INT_IPU_ERR       41
index 906722593487ec3e98a546600a44409e17911b12..0fa3f6855349bda9e9a1c1d33e3b0a2236f4eb68 100644 (file)
 #define MX35_CAN2_BASE_ADDR                    (MX35_AIPS2_BASE_ADDR + 0xe8000)
 #define MX35_RTIC_BASE_ADDR                    (MX35_AIPS2_BASE_ADDR + 0xec000)
 #define MX35_IIM_BASE_ADDR                     (MX35_AIPS2_BASE_ADDR + 0xf0000)
-
-#define MX35_OTG_BASE_ADDR             0x53ff4000
+#define MX35_USB_BASE_ADDR                     (MX35_AIPS2_BASE_ADDR + 0xf4000)
+#define MX35_USB_OTG_BASE_ADDR                 (MX35_USB_BASE_ADDR + 0x0000)
+/*
+ * The Reference Manual (IMX35RM, Rev. 2, 3/2009) claims an offset of 0x200 for
+ * HS.  When host support was implemented only a preliminary document was
+ * available, which told 0x400.  This works fine.
+ */
+#define MX35_USB_HS_BASE_ADDR                  (MX35_USB_BASE_ADDR + 0x0400)
 
 #define MX35_ROMP_BASE_ADDR            0x60000000
 #define MX35_ROMP_SIZE                 SZ_1M
 #define MX35_INT_UART2         32
 #define MX35_INT_NFC           33
 #define MX35_INT_SDMA          34
-#define MX35_INT_USBHS         35
-#define MX35_INT_USBOTG                37
+#define MX35_INT_USB_HS                35
+#define MX35_INT_USB_OTG       37
 #define MX35_INT_MSHC1         39
 #define MX35_INT_ESAI          40
 #define MX35_INT_IPU_ERR       41