aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx3/Kconfig5
-rw-r--r--arch/arm/mach-mx3/devices-imx31.h4
-rw-r--r--arch/arm/mach-mx3/devices.c38
-rw-r--r--arch/arm/mach-mx3/devices.h2
-rw-r--r--arch/arm/mach-mx3/mach-armadillo5x0.c5
-rw-r--r--arch/arm/mach-mx3/mach-mx31moboard.c9
-rw-r--r--arch/arm/mach-mx3/mach-pcm037.c5
-rw-r--r--arch/arm/mach-mx3/mx31lilly-db.c5
-rw-r--r--arch/arm/mach-mx3/mx31lite-db.c6
-rw-r--r--arch/arm/mach-mx3/mx31moboard-devboard.c5
-rw-r--r--arch/arm/mach-mx3/mx31moboard-marxbot.c6
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc-mmc.c20
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h1
-rw-r--r--arch/arm/plat-mxc/include/mach/mx31.h10
14 files changed, 48 insertions, 73 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 29ec5adf5bc5..46fffa5b0697 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -52,6 +52,7 @@ config MACH_PCM037
52 select SOC_IMX31 52 select SOC_IMX31
53 select IMX_HAVE_PLATFORM_IMX_I2C 53 select IMX_HAVE_PLATFORM_IMX_I2C
54 select IMX_HAVE_PLATFORM_IMX_UART 54 select IMX_HAVE_PLATFORM_IMX_UART
55 select IMX_HAVE_PLATFORM_MXC_MMC
55 select IMX_HAVE_PLATFORM_MXC_NAND 56 select IMX_HAVE_PLATFORM_MXC_NAND
56 select IMX_HAVE_PLATFORM_MXC_W1 57 select IMX_HAVE_PLATFORM_MXC_W1
57 select MXC_ULPI if USB_ULPI 58 select MXC_ULPI if USB_ULPI
@@ -73,6 +74,7 @@ config MACH_MX31LITE
73 select SOC_IMX31 74 select SOC_IMX31
74 select MXC_ULPI if USB_ULPI 75 select MXC_ULPI if USB_ULPI
75 select IMX_HAVE_PLATFORM_IMX_UART 76 select IMX_HAVE_PLATFORM_IMX_UART
77 select IMX_HAVE_PLATFORM_MXC_MMC
76 select IMX_HAVE_PLATFORM_MXC_NAND 78 select IMX_HAVE_PLATFORM_MXC_NAND
77 select IMX_HAVE_PLATFORM_SPI_IMX 79 select IMX_HAVE_PLATFORM_SPI_IMX
78 help 80 help
@@ -104,6 +106,7 @@ config MACH_MX31MOBOARD
104 select SOC_IMX31 106 select SOC_IMX31
105 select IMX_HAVE_PLATFORM_IMX_I2C 107 select IMX_HAVE_PLATFORM_IMX_I2C
106 select IMX_HAVE_PLATFORM_IMX_UART 108 select IMX_HAVE_PLATFORM_IMX_UART
109 select IMX_HAVE_PLATFORM_MXC_MMC
107 select IMX_HAVE_PLATFORM_SPI_IMX 110 select IMX_HAVE_PLATFORM_SPI_IMX
108 select MXC_ULPI if USB_ULPI 111 select MXC_ULPI if USB_ULPI
109 help 112 help
@@ -114,6 +117,7 @@ config MACH_MX31LILLY
114 bool "Support MX31 LILLY-1131 platforms (INCO startec)" 117 bool "Support MX31 LILLY-1131 platforms (INCO startec)"
115 select SOC_IMX31 118 select SOC_IMX31
116 select IMX_HAVE_PLATFORM_IMX_UART 119 select IMX_HAVE_PLATFORM_IMX_UART
120 select IMX_HAVE_PLATFORM_MXC_MMC
117 select IMX_HAVE_PLATFORM_SPI_IMX 121 select IMX_HAVE_PLATFORM_SPI_IMX
118 select MXC_ULPI if USB_ULPI 122 select MXC_ULPI if USB_ULPI
119 help 123 help
@@ -147,6 +151,7 @@ config MACH_ARMADILLO5X0
147 select SOC_IMX31 151 select SOC_IMX31
148 select IMX_HAVE_PLATFORM_IMX_I2C 152 select IMX_HAVE_PLATFORM_IMX_I2C
149 select IMX_HAVE_PLATFORM_IMX_UART 153 select IMX_HAVE_PLATFORM_IMX_UART
154 select IMX_HAVE_PLATFORM_MXC_MMC
150 select IMX_HAVE_PLATFORM_MXC_NAND 155 select IMX_HAVE_PLATFORM_MXC_NAND
151 select MXC_ULPI if USB_ULPI 156 select MXC_ULPI if USB_ULPI
152 help 157 help
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h
index a88f243ec72f..875e26f6cc77 100644
--- a/arch/arm/mach-mx3/devices-imx31.h
+++ b/arch/arm/mach-mx3/devices-imx31.h
@@ -29,6 +29,10 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst;
29#define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata) 29#define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata)
30#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) 30#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata)
31 31
32extern const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst;
33#define imx31_add_mxc_mmc(id, pdata) \
34 imx_add_mxc_mmc(&imx31_mxc_mmc_data[id], pdata)
35
32extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst; 36extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst;
33#define imx31_add_mxc_nand(pdata) \ 37#define imx31_add_mxc_nand(pdata) \
34 imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) 38 imx_add_mxc_nand(&imx31_mxc_nand_data, pdata)
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index b179f70b057d..079b98e319eb 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -30,44 +30,6 @@
30#include "devices.h" 30#include "devices.h"
31 31
32#ifdef CONFIG_ARCH_MX31 32#ifdef CONFIG_ARCH_MX31
33static struct resource mxcsdhc0_resources[] = {
34 {
35 .start = MX31_MMC_SDHC1_BASE_ADDR,
36 .end = MX31_MMC_SDHC1_BASE_ADDR + SZ_16K - 1,
37 .flags = IORESOURCE_MEM,
38 }, {
39 .start = MX31_INT_MMC_SDHC1,
40 .end = MX31_INT_MMC_SDHC1,
41 .flags = IORESOURCE_IRQ,
42 },
43};
44
45static struct resource mxcsdhc1_resources[] = {
46 {
47 .start = MX31_MMC_SDHC2_BASE_ADDR,
48 .end = MX31_MMC_SDHC2_BASE_ADDR + SZ_16K - 1,
49 .flags = IORESOURCE_MEM,
50 }, {
51 .start = MX31_INT_MMC_SDHC2,
52 .end = MX31_INT_MMC_SDHC2,
53 .flags = IORESOURCE_IRQ,
54 },
55};
56
57struct platform_device mxcsdhc_device0 = {
58 .name = "mxc-mmc",
59 .id = 0,
60 .num_resources = ARRAY_SIZE(mxcsdhc0_resources),
61 .resource = mxcsdhc0_resources,
62};
63
64struct platform_device mxcsdhc_device1 = {
65 .name = "mxc-mmc",
66 .id = 1,
67 .num_resources = ARRAY_SIZE(mxcsdhc1_resources),
68 .resource = mxcsdhc1_resources,
69};
70
71static struct resource rnga_resources[] = { 33static struct resource rnga_resources[] = {
72 { 34 {
73 .start = MX3x_RNGA_BASE_ADDR, 35 .start = MX3x_RNGA_BASE_ADDR,
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index a649772058ef..20204743e8f8 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -1,8 +1,6 @@
1extern struct platform_device mx3_ipu; 1extern struct platform_device mx3_ipu;
2extern struct platform_device mx3_fb; 2extern struct platform_device mx3_fb;
3extern struct platform_device mx3_camera; 3extern struct platform_device mx3_camera;
4extern struct platform_device mxcsdhc_device0;
5extern struct platform_device mxcsdhc_device1;
6extern struct platform_device mxc_otg_udc_device; 4extern struct platform_device mxc_otg_udc_device;
7extern struct platform_device mxc_otg_host; 5extern struct platform_device mxc_otg_host;
8extern struct platform_device mxc_usbh1; 6extern struct platform_device mxc_usbh1;
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c
index aaa30fe18f85..e48072cb9bf6 100644
--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
+++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
@@ -49,7 +49,6 @@
49 49
50#include <mach/common.h> 50#include <mach/common.h>
51#include <mach/iomux-mx3.h> 51#include <mach/iomux-mx3.h>
52#include <mach/mmc.h>
53#include <mach/ipu.h> 52#include <mach/ipu.h>
54#include <mach/mx3fb.h> 53#include <mach/mx3fb.h>
55#include <mach/mxc_ehci.h> 54#include <mach/mxc_ehci.h>
@@ -453,7 +452,7 @@ static void armadillo5x0_sdhc1_exit(struct device *dev, void *data)
453 gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); 452 gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B));
454} 453}
455 454
456static struct imxmmc_platform_data sdhc_pdata = { 455static const struct imxmmc_platform_data sdhc_pdata __initconst = {
457 .get_ro = armadillo5x0_sdhc1_get_ro, 456 .get_ro = armadillo5x0_sdhc1_get_ro,
458 .init = armadillo5x0_sdhc1_init, 457 .init = armadillo5x0_sdhc1_init,
459 .exit = armadillo5x0_sdhc1_exit, 458 .exit = armadillo5x0_sdhc1_exit,
@@ -520,7 +519,7 @@ static void __init armadillo5x0_init(void)
520 gpio_direction_input(MX31_PIN_GPIO1_0); 519 gpio_direction_input(MX31_PIN_GPIO1_0);
521 520
522 /* Register SDHC */ 521 /* Register SDHC */
523 mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); 522 imx31_add_mxc_mmc(0, &sdhc_pdata);
524 523
525 /* Register FB */ 524 /* Register FB */
526 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 525 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index eb5f426df224..5e2ee85aadf9 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -40,7 +40,6 @@
40#include <mach/hardware.h> 40#include <mach/hardware.h>
41#include <mach/iomux-mx3.h> 41#include <mach/iomux-mx3.h>
42#include <mach/ipu.h> 42#include <mach/ipu.h>
43#include <mach/mmc.h>
44#include <mach/mxc_ehci.h> 43#include <mach/mxc_ehci.h>
45#include <mach/mx3_camera.h> 44#include <mach/mx3_camera.h>
46#include <mach/spi.h> 45#include <mach/spi.h>
@@ -170,11 +169,11 @@ static const struct spi_imx_master moboard_spi1_pdata __initconst = {
170 169
171static struct regulator_consumer_supply sdhc_consumers[] = { 170static struct regulator_consumer_supply sdhc_consumers[] = {
172 { 171 {
173 .dev = &mxcsdhc_device0.dev, 172 .dev_name = "mxc-mmc.0",
174 .supply = "sdhc0_vcc", 173 .supply = "sdhc0_vcc",
175 }, 174 },
176 { 175 {
177 .dev = &mxcsdhc_device1.dev, 176 .dev_name = "mxc-mmc.1",
178 .supply = "sdhc1_vcc", 177 .supply = "sdhc1_vcc",
179 }, 178 },
180}; 179};
@@ -345,7 +344,7 @@ static void moboard_sdhc1_exit(struct device *dev, void *data)
345 gpio_free(SDHC1_CD); 344 gpio_free(SDHC1_CD);
346} 345}
347 346
348static struct imxmmc_platform_data sdhc1_pdata = { 347static const struct imxmmc_platform_data sdhc1_pdata __initconst = {
349 .get_ro = moboard_sdhc1_get_ro, 348 .get_ro = moboard_sdhc1_get_ro,
350 .init = moboard_sdhc1_init, 349 .init = moboard_sdhc1_init,
351 .exit = moboard_sdhc1_exit, 350 .exit = moboard_sdhc1_exit,
@@ -520,7 +519,7 @@ static void __init mxc_board_init(void)
520 spi_register_board_info(moboard_spi_board_info, 519 spi_register_board_info(moboard_spi_board_info,
521 ARRAY_SIZE(moboard_spi_board_info)); 520 ARRAY_SIZE(moboard_spi_board_info));
522 521
523 mxc_register_device(&mxcsdhc_device0, &sdhc1_pdata); 522 imx31_add_mxc_mmc(0, &sdhc1_pdata);
524 523
525 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 524 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
526 if (!mx31moboard_cam_alloc_dma(CAMERA_BUF_SIZE)) 525 if (!mx31moboard_cam_alloc_dma(CAMERA_BUF_SIZE))
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index bc5d3a1aa206..2ba4f2b9480b 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -43,7 +43,6 @@
43#include <mach/hardware.h> 43#include <mach/hardware.h>
44#include <mach/iomux-mx3.h> 44#include <mach/iomux-mx3.h>
45#include <mach/ipu.h> 45#include <mach/ipu.h>
46#include <mach/mmc.h>
47#include <mach/mx3_camera.h> 46#include <mach/mx3_camera.h>
48#include <mach/mx3fb.h> 47#include <mach/mx3fb.h>
49#include <mach/mxc_ehci.h> 48#include <mach/mxc_ehci.h>
@@ -401,7 +400,7 @@ static void pcm970_sdhc1_exit(struct device *dev, void *data)
401 gpio_free(SDHC1_GPIO_WP); 400 gpio_free(SDHC1_GPIO_WP);
402} 401}
403 402
404static struct imxmmc_platform_data sdhc_pdata = { 403static const struct imxmmc_platform_data sdhc_pdata __initconst = {
405#ifdef PCM970_SDHC_RW_SWITCH 404#ifdef PCM970_SDHC_RW_SWITCH
406 .get_ro = pcm970_sdhc1_get_ro, 405 .get_ro = pcm970_sdhc1_get_ro,
407#endif 406#endif
@@ -634,7 +633,7 @@ static void __init mxc_board_init(void)
634 imx31_add_imx_i2c2(&pcm037_i2c2_data); 633 imx31_add_imx_i2c2(&pcm037_i2c2_data);
635 634
636 imx31_add_mxc_nand(&pcm037_nand_board_info); 635 imx31_add_mxc_nand(&pcm037_nand_board_info);
637 mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); 636 imx31_add_mxc_mmc(0, &sdhc_pdata);
638 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 637 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
639 mxc_register_device(&mx3_fb, &mx3fb_pdata); 638 mxc_register_device(&mx3_fb, &mx3fb_pdata);
640 639
diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c
index 827fd3c80201..8f1a38ebf5c8 100644
--- a/arch/arm/mach-mx3/mx31lilly-db.c
+++ b/arch/arm/mach-mx3/mx31lilly-db.c
@@ -34,7 +34,6 @@
34#include <mach/common.h> 34#include <mach/common.h>
35#include <mach/iomux-mx3.h> 35#include <mach/iomux-mx3.h>
36#include <mach/board-mx31lilly.h> 36#include <mach/board-mx31lilly.h>
37#include <mach/mmc.h>
38#include <mach/mx3fb.h> 37#include <mach/mx3fb.h>
39#include <mach/ipu.h> 38#include <mach/ipu.h>
40 39
@@ -158,7 +157,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data)
158 free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); 157 free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data);
159} 158}
160 159
161static struct imxmmc_platform_data mmc_pdata = { 160static const struct imxmmc_platform_data mmc_pdata __initconst = {
162 .get_ro = mxc_mmc1_get_ro, 161 .get_ro = mxc_mmc1_get_ro,
163 .init = mxc_mmc1_init, 162 .init = mxc_mmc1_init,
164 .exit = mxc_mmc1_exit, 163 .exit = mxc_mmc1_exit,
@@ -216,7 +215,7 @@ void __init mx31lilly_db_init(void)
216 imx31_add_imx_uart0(&uart_pdata); 215 imx31_add_imx_uart0(&uart_pdata);
217 imx31_add_imx_uart1(&uart_pdata); 216 imx31_add_imx_uart1(&uart_pdata);
218 imx31_add_imx_uart2(&uart_pdata); 217 imx31_add_imx_uart2(&uart_pdata);
219 mxc_register_device(&mxcsdhc_device0, &mmc_pdata); 218 imx31_add_mxc_mmc(0, &mmc_pdata);
220 mx31lilly_init_fb(); 219 mx31lilly_init_fb();
221} 220}
222 221
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c
index 7b0e74e275ba..a06161edba3f 100644
--- a/arch/arm/mach-mx3/mx31lite-db.c
+++ b/arch/arm/mach-mx3/mx31lite-db.c
@@ -35,7 +35,6 @@
35#include <mach/common.h> 35#include <mach/common.h>
36#include <mach/iomux-mx3.h> 36#include <mach/iomux-mx3.h>
37#include <mach/board-mx31lite.h> 37#include <mach/board-mx31lite.h>
38#include <mach/mmc.h>
39 38
40#include "devices-imx31.h" 39#include "devices-imx31.h"
41#include "devices.h" 40#include "devices.h"
@@ -142,7 +141,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data)
142 free_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), data); 141 free_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), data);
143} 142}
144 143
145static struct imxmmc_platform_data mmc_pdata = { 144static const struct imxmmc_platform_data mmc_pdata __initconst = {
146 .get_ro = mxc_mmc1_get_ro, 145 .get_ro = mxc_mmc1_get_ro,
147 .init = mxc_mmc1_init, 146 .init = mxc_mmc1_init,
148 .exit = mxc_mmc1_exit, 147 .exit = mxc_mmc1_exit,
@@ -197,10 +196,9 @@ void __init mx31lite_db_init(void)
197 ARRAY_SIZE(litekit_db_board_pins), 196 ARRAY_SIZE(litekit_db_board_pins),
198 "development board pins"); 197 "development board pins");
199 imx31_add_imx_uart0(&uart_pdata); 198 imx31_add_imx_uart0(&uart_pdata);
200 mxc_register_device(&mxcsdhc_device0, &mmc_pdata); 199 imx31_add_mxc_mmc(0, &mmc_pdata);
201 imx31_add_spi_imx0(&spi0_pdata); 200 imx31_add_spi_imx0(&spi0_pdata);
202 platform_device_register(&litekit_led_device); 201 platform_device_register(&litekit_led_device);
203 mxc_register_device(&imx_wdt_device0, NULL); 202 mxc_register_device(&imx_wdt_device0, NULL);
204 mxc_register_device(&imx_rtc_device0, NULL); 203 mxc_register_device(&imx_rtc_device0, NULL);
205} 204}
206
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c
index fc395a7a8599..3b75929f83f0 100644
--- a/arch/arm/mach-mx3/mx31moboard-devboard.c
+++ b/arch/arm/mach-mx3/mx31moboard-devboard.c
@@ -25,7 +25,6 @@
25#include <mach/common.h> 25#include <mach/common.h>
26#include <mach/iomux-mx3.h> 26#include <mach/iomux-mx3.h>
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <mach/mmc.h>
29#include <mach/mxc_ehci.h> 28#include <mach/mxc_ehci.h>
30#include <mach/ulpi.h> 29#include <mach/ulpi.h>
31 30
@@ -103,7 +102,7 @@ static void devboard_sdhc2_exit(struct device *dev, void *data)
103 gpio_free(SDHC2_CD); 102 gpio_free(SDHC2_CD);
104} 103}
105 104
106static struct imxmmc_platform_data sdhc2_pdata = { 105static const struct imxmmc_platform_data sdhc2_pdata __initconst = {
107 .get_ro = devboard_sdhc2_get_ro, 106 .get_ro = devboard_sdhc2_get_ro,
108 .init = devboard_sdhc2_init, 107 .init = devboard_sdhc2_init,
109 .exit = devboard_sdhc2_exit, 108 .exit = devboard_sdhc2_exit,
@@ -228,7 +227,7 @@ void __init mx31moboard_devboard_init(void)
228 227
229 imx31_add_imx_uart1(&uart_pdata); 228 imx31_add_imx_uart1(&uart_pdata);
230 229
231 mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); 230 imx31_add_mxc_mmc(1, &sdhc2_pdata);
232 231
233 devboard_init_sel_gpios(); 232 devboard_init_sel_gpios();
234 233
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c
index 0551eb39d97e..075c4fb8e74c 100644
--- a/arch/arm/mach-mx3/mx31moboard-marxbot.c
+++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c
@@ -29,12 +29,12 @@
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <mach/imx-uart.h> 30#include <mach/imx-uart.h>
31#include <mach/iomux-mx3.h> 31#include <mach/iomux-mx3.h>
32#include <mach/mmc.h>
33#include <mach/mxc_ehci.h> 32#include <mach/mxc_ehci.h>
34#include <mach/ulpi.h> 33#include <mach/ulpi.h>
35 34
36#include <media/soc_camera.h> 35#include <media/soc_camera.h>
37 36
37#include "devices-imx31.h"
38#include "devices.h" 38#include "devices.h"
39 39
40static unsigned int marxbot_pins[] = { 40static unsigned int marxbot_pins[] = {
@@ -116,7 +116,7 @@ static void marxbot_sdhc2_exit(struct device *dev, void *data)
116 gpio_free(SDHC2_CD); 116 gpio_free(SDHC2_CD);
117} 117}
118 118
119static struct imxmmc_platform_data sdhc2_pdata = { 119static const struct imxmmc_platform_data sdhc2_pdata __initconst = {
120 .get_ro = marxbot_sdhc2_get_ro, 120 .get_ro = marxbot_sdhc2_get_ro,
121 .init = marxbot_sdhc2_init, 121 .init = marxbot_sdhc2_init,
122 .exit = marxbot_sdhc2_exit, 122 .exit = marxbot_sdhc2_exit,
@@ -345,7 +345,7 @@ void __init mx31moboard_marxbot_init(void)
345 345
346 dspics_resets_init(); 346 dspics_resets_init();
347 347
348 mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); 348 imx31_add_mxc_mmc(1, &sdhc2_pdata);
349 349
350 spi_register_board_info(marxbot_spi_board_info, 350 spi_register_board_info(marxbot_spi_board_info,
351 ARRAY_SIZE(marxbot_spi_board_info)); 351 ARRAY_SIZE(marxbot_spi_board_info));
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c b/arch/arm/plat-mxc/devices/platform-mxc-mmc.c
index 953319e4d874..90d762f6f93b 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c
+++ b/arch/arm/plat-mxc/devices/platform-mxc-mmc.c
@@ -9,20 +9,21 @@
9#include <mach/hardware.h> 9#include <mach/hardware.h>
10#include <mach/devices-common.h> 10#include <mach/devices-common.h>
11 11
12#define imx_mxc_mmc_data_entry_single(soc, _id, _hwid) \ 12#define imx_mxc_mmc_data_entry_single(soc, _id, _hwid, _size) \
13 { \ 13 { \
14 .id = _id, \ 14 .id = _id, \
15 .iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR, \ 15 .iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR, \
16 .iosize = _size, \
16 .irq = soc ## _INT_SDHC ## _hwid, \ 17 .irq = soc ## _INT_SDHC ## _hwid, \
17 .dmareq = soc ## _DMA_REQ_SDHC ## _hwid, \ 18 .dmareq = soc ## _DMA_REQ_SDHC ## _hwid, \
18 } 19 }
19#define imx_mxc_mmc_data_entry(soc, _id, _hwid) \ 20#define imx_mxc_mmc_data_entry(soc, _id, _hwid, _size) \
20 [_id] = imx_mxc_mmc_data_entry_single(soc, _id, _hwid) 21 [_id] = imx_mxc_mmc_data_entry_single(soc, _id, _hwid, _size)
21 22
22#ifdef CONFIG_SOC_IMX21 23#ifdef CONFIG_SOC_IMX21
23const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = { 24const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
24#define imx21_mxc_mmc_data_entry(_id, _hwid) \ 25#define imx21_mxc_mmc_data_entry(_id, _hwid) \
25 imx_mxc_mmc_data_entry(MX21, _id, _hwid) 26 imx_mxc_mmc_data_entry(MX21, _id, _hwid, SZ_4K)
26 imx21_mxc_mmc_data_entry(0, 1), 27 imx21_mxc_mmc_data_entry(0, 1),
27 imx21_mxc_mmc_data_entry(1, 2), 28 imx21_mxc_mmc_data_entry(1, 2),
28}; 29};
@@ -31,12 +32,21 @@ const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = {
31#ifdef CONFIG_SOC_IMX27 32#ifdef CONFIG_SOC_IMX27
32const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = { 33const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = {
33#define imx27_mxc_mmc_data_entry(_id, _hwid) \ 34#define imx27_mxc_mmc_data_entry(_id, _hwid) \
34 imx_mxc_mmc_data_entry(MX27, _id, _hwid) 35 imx_mxc_mmc_data_entry(MX27, _id, _hwid, SZ_4K)
35 imx27_mxc_mmc_data_entry(0, 1), 36 imx27_mxc_mmc_data_entry(0, 1),
36 imx27_mxc_mmc_data_entry(1, 2), 37 imx27_mxc_mmc_data_entry(1, 2),
37}; 38};
38#endif /* ifdef CONFIG_SOC_IMX27 */ 39#endif /* ifdef CONFIG_SOC_IMX27 */
39 40
41#ifdef CONFIG_SOC_IMX31
42const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = {
43#define imx31_mxc_mmc_data_entry(_id, _hwid) \
44 imx_mxc_mmc_data_entry(MX31, _id, _hwid, SZ_16K)
45 imx31_mxc_mmc_data_entry(0, 1),
46 imx31_mxc_mmc_data_entry(1, 2),
47};
48#endif /* ifdef CONFIG_SOC_IMX31 */
49
40struct platform_device *__init imx_add_mxc_mmc( 50struct platform_device *__init imx_add_mxc_mmc(
41 const struct imx_mxc_mmc_data *data, 51 const struct imx_mxc_mmc_data *data,
42 const struct imxmmc_platform_data *pdata) 52 const struct imxmmc_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 95331aeb854e..5a62dc479192 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mxc_ehci(
202struct imx_mxc_mmc_data { 202struct imx_mxc_mmc_data {
203 int id; 203 int id;
204 resource_size_t iobase; 204 resource_size_t iobase;
205 resource_size_t iosize;
205 resource_size_t irq; 206 resource_size_t irq;
206 resource_size_t dmareq; 207 resource_size_t dmareq;
207}; 208};
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h
index 6d4b98f48f4b..d024c9c5dd3f 100644
--- a/arch/arm/plat-mxc/include/mach/mx31.h
+++ b/arch/arm/plat-mxc/include/mach/mx31.h
@@ -41,8 +41,8 @@
41 41
42#define MX31_SPBA0_BASE_ADDR 0x50000000 42#define MX31_SPBA0_BASE_ADDR 0x50000000
43#define MX31_SPBA0_SIZE SZ_1M 43#define MX31_SPBA0_SIZE SZ_1M
44#define MX31_MMC_SDHC1_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x04000) 44#define MX31_SDHC1_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x04000)
45#define MX31_MMC_SDHC2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x08000) 45#define MX31_SDHC2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x08000)
46#define MX31_UART3_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x0c000) 46#define MX31_UART3_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x0c000)
47#define MX31_CSPI2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x10000) 47#define MX31_CSPI2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x10000)
48#define MX31_SSI2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x14000) 48#define MX31_SSI2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x14000)
@@ -134,8 +134,8 @@ static inline void mx31_setup_weimcs(size_t cs,
134#define MX31_INT_MPEG4_ENCODER 5 134#define MX31_INT_MPEG4_ENCODER 5
135#define MX31_INT_RTIC 6 135#define MX31_INT_RTIC 6
136#define MX31_INT_FIRI 7 136#define MX31_INT_FIRI 7
137#define MX31_INT_MMC_SDHC2 8 137#define MX31_INT_SDHC2 8
138#define MX31_INT_MMC_SDHC1 9 138#define MX31_INT_SDHC1 9
139#define MX31_INT_I2C1 10 139#define MX31_INT_I2C1 10
140#define MX31_INT_SSI2 11 140#define MX31_INT_SSI2 11
141#define MX31_INT_SSI1 12 141#define MX31_INT_SSI1 12
@@ -188,6 +188,8 @@ static inline void mx31_setup_weimcs(size_t cs,
188#define MX31_INT_EXT_WDOG 62 188#define MX31_INT_EXT_WDOG 62
189#define MX31_INT_EXT_TV 63 189#define MX31_INT_EXT_TV 63
190 190
191#define MX31_DMA_REQ_SDHC1 20
192#define MX31_DMA_REQ_SDHC2 21
191#define MX31_DMA_REQ_SSI2_RX1 22 193#define MX31_DMA_REQ_SSI2_RX1 22
192#define MX31_DMA_REQ_SSI2_TX1 23 194#define MX31_DMA_REQ_SSI2_TX1 23
193#define MX31_DMA_REQ_SSI2_RX0 24 195#define MX31_DMA_REQ_SSI2_RX0 24