Merge branch 'imx-for-2.6.38' of git://git.pengutronix.de/git/ukl/linux-2.6 into...
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 24 Nov 2010 07:24:29 +0000 (08:24 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Wed, 24 Nov 2010 07:24:29 +0000 (08:24 +0100)
1  2 
arch/arm/mach-mx3/mach-pcm037.c
arch/arm/mach-mx3/mx31moboard-marxbot.c
arch/arm/mach-mx3/mx31moboard-smartbot.c

index 2ff3f661a48e1dd02c6c608d57f87a473ea2bf5e,cb657692b80526cc18de7f053cbf07eb500389e2..b752f6bc20a2ea6574f7caa6e2850696f26e1759
@@@ -27,7 -27,6 +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>
  #include <mach/hardware.h>
  #include <mach/iomux-mx3.h>
  #include <mach/ipu.h>
- #include <mach/mmc.h>
  #include <mach/mx3_camera.h>
  #include <mach/mx3fb.h>
- #include <mach/mxc_ehci.h>
  #include <mach/ulpi.h>
  
  #include "devices-imx31.h"
@@@ -311,6 -308,7 +308,6 @@@ static struct soc_camera_link iclink_mt
        .bus_id         = 0,            /* Must match with the camera ID */
        .board_info     = &pcm037_i2c_camera[1],
        .i2c_adapter_id = 2,
 -      .module_name    = "mt9v022",
  };
  
  static struct soc_camera_link iclink_mt9t031 = {
        .power          = pcm037_camera_power,
        .board_info     = &pcm037_i2c_camera[0],
        .i2c_adapter_id = 2,
 -      .module_name    = "mt9t031",
  };
  
  static struct i2c_board_info pcm037_i2c_devices[] = {
@@@ -399,7 -398,7 +396,7 @@@ static void pcm970_sdhc1_exit(struct de
        gpio_free(SDHC1_GPIO_WP);
  }
  
- static struct imxmmc_platform_data sdhc_pdata = {
+ static const struct imxmmc_platform_data sdhc_pdata __initconst = {
  #ifdef PCM970_SDHC_RW_SWITCH
        .get_ro = pcm970_sdhc1_get_ro,
  #endif
@@@ -441,7 -440,6 +438,6 @@@ static int __init pcm037_camera_alloc_d
  static struct platform_device *devices[] __initdata = {
        &pcm037_flash,
        &pcm037_sram_device,
-       &imx_wdt_device0,
        &pcm037_mt9t031,
        &pcm037_mt9v022,
  };
@@@ -538,18 -536,18 +534,18 @@@ static struct platform_device pcm970_sj
  };
  
  #if defined(CONFIG_USB_ULPI)
- static struct mxc_usbh_platform_data otg_pdata = {
+ static struct mxc_usbh_platform_data otg_pdata __initdata = {
        .portsc = MXC_EHCI_MODE_ULPI,
        .flags  = MXC_EHCI_INTERFACE_DIFF_UNI,
  };
  
- static struct mxc_usbh_platform_data usbh2_pdata = {
+ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
        .portsc = MXC_EHCI_MODE_ULPI,
        .flags  = MXC_EHCI_INTERFACE_DIFF_UNI,
  };
  #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,
  };
@@@ -607,12 -605,13 +603,13 @@@ static void __init mxc_board_init(void
  
        platform_add_devices(devices, ARRAY_SIZE(devices));
  
+       imx31_add_imx2_wdt(NULL);
        imx31_add_imx_uart0(&uart_pdata);
        /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */
        imx31_add_imx_uart1(&uart_pdata);
        imx31_add_imx_uart2(&uart_pdata);
  
-       mxc_register_device(&mxc_w1_master_device, NULL);
+       imx31_add_mxc_w1(NULL);
  
        /* LAN9217 IRQ pin */
        ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq");
        imx31_add_imx_i2c2(&pcm037_i2c2_data);
  
        imx31_add_mxc_nand(&pcm037_nand_board_info);
-       mxc_register_device(&mxcsdhc_device0, &sdhc_pdata);
+       imx31_add_mxc_mmc(0, &sdhc_pdata);
        mxc_register_device(&mx3_ipu, &mx3_ipu_data);
        mxc_register_device(&mx3_fb, &mx3fb_pdata);
  
                otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
                                ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
  
-               mxc_register_device(&mxc_otg_host, &otg_pdata);
+               imx31_add_mxc_ehci_otg(&otg_pdata);
        }
  
        usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
                                ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
  
-       mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+       imx31_add_mxc_ehci_hs(2, &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 18069cb7d068c2a2a6cc1ea5300fbbab71abfaa1,a35e8c9a0a02edc38769e56d397bd0d6ac9b30aa..f449a97ae1a22293e3e5bc61881aa551a2b211eb
@@@ -21,7 -21,6 +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>
  
  #include <mach/hardware.h>
  #include <mach/imx-uart.h>
  #include <mach/iomux-mx3.h>
- #include <mach/mmc.h>
- #include <mach/mxc_ehci.h>
  #include <mach/ulpi.h>
  
  #include <media/soc_camera.h>
  
+ #include "devices-imx31.h"
  #include "devices.h"
  
  static unsigned int marxbot_pins[] = {
@@@ -116,7 -114,7 +114,7 @@@ static void marxbot_sdhc2_exit(struct d
        gpio_free(SDHC2_CD);
  }
  
- static struct imxmmc_platform_data sdhc2_pdata = {
+ static const struct imxmmc_platform_data sdhc2_pdata __initconst = {
        .get_ro = marxbot_sdhc2_get_ro,
        .init   = marxbot_sdhc2_init,
        .exit   = marxbot_sdhc2_exit,
@@@ -179,6 -177,7 +177,6 @@@ static struct soc_camera_link base_icli
        .reset          = marxbot_basecam_reset,
        .board_info     = &marxbot_i2c_devices[0],
        .i2c_adapter_id = 0,
 -      .module_name    = "mt9t031",
  };
  
  static struct platform_device marxbot_camera[] = {
@@@ -302,7 -301,7 +300,7 @@@ static int marxbot_isp1105_set_vbus(str
        return 0;
  }
  
- static struct mxc_usbh_platform_data usbh1_pdata = {
+ static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
        .init   = marxbot_usbh1_hw_init,
        .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
        .flags  = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
  static int __init marxbot_usbh1_init(void)
  {
        struct otg_transceiver *otg;
+       struct platform_device *pdev;
  
        otg = kzalloc(sizeof(*otg), GFP_KERNEL);
        if (!otg)
  
        usbh1_pdata.otg = otg;
  
-       return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
+       pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
+       if (IS_ERR(pdev))
+               return PTR_ERR(pdev);
+       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,
  };
@@@ -344,7 -348,7 +347,7 @@@ void __init mx31moboard_marxbot_init(vo
  
        dspics_resets_init();
  
-       mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata);
+       imx31_add_mxc_mmc(1, &sdhc2_pdata);
  
        spi_register_board_info(marxbot_spi_board_info,
                ARRAY_SIZE(marxbot_spi_board_info));
        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 04760a53005ac002ff26392b668e56c031e88de7,8e989e5b3af6469bec2bd17af5277d8eda3989bb..bbec3c82264ac727ce4a64e425c99b3018cc817c
@@@ -19,7 -19,6 +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>
@@@ -28,7 -27,6 +27,6 @@@
  #include <mach/hardware.h>
  #include <mach/iomux-mx3.h>
  #include <mach/board-mx31moboard.h>
- #include <mach/mxc_ehci.h>
  #include <mach/ulpi.h>
  
  #include <media/soc_camera.h>
@@@ -88,6 -86,7 +86,6 @@@ static struct soc_camera_link base_icli
        .reset          = smartbot_cam_reset,
        .board_info     = &smartbot_i2c_devices[0],
        .i2c_adapter_id = 0,
 -      .module_name    = "mt9t031",
  };
  
  static struct platform_device smartbot_camera[] = {
@@@ -118,24 -117,30 +116,30 @@@ static int __init smartbot_cam_init(voi
        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,
  };
  
  #if defined(CONFIG_USB_ULPI)
  
- static struct mxc_usbh_platform_data otg_host_pdata = {
+ static struct mxc_usbh_platform_data otg_host_pdata __initdata = {
        .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
        .flags  = MXC_EHCI_POWER_PINS_ENABLED,
  };
  
  static int __init smartbot_otg_host_init(void)
  {
+       struct platform_device *pdev;
        otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
                        ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
  
-       return mxc_register_device(&mxc_otg_host, &otg_host_pdata);
+       pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
+       if (IS_ERR(pdev))
+               return PTR_ERR(pdev);
+       return 0;
  }
  #else
  static inline int smartbot_otg_host_init(void) { return 0; }
@@@ -182,7 -187,7 +186,7 @@@ void __init mx31moboard_smartbot_init(i
  
        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();