aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 15:38:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 15:38:42 -0400
commitae4c42e4e4d76d003f8ca551fe1aef93ff9a4b21 (patch)
tree2bff2e4f4456077e7d7c589c8c28824f12dfa21c /arch/arm/mach-imx
parentdd58ecba48edf14be1a5f70120fcd3002277a74a (diff)
parentab2a0e0d135490729e384c1826d118f92e88cae8 (diff)
Merge branch 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (133 commits) ARM: EXYNOS4: Change devname for FIMD clkdev ARM: S3C64XX: Cleanup mach/regs-fb.h from mach-s3c64xx ARM: S5PV210: Cleanup mach/regs-fb.h from mach-s5pv210 ARM: S5PC100: Cleanup mach/regs-fb.h from mach-s5pc100 ARM: S3C24XX: Use generic s3c_set_platdata for devices ARM: S3C64XX: Use generic s3c_set_platdata for OneNAND ARM: SAMSUNG: Use generic s3c_set_platdata for NAND ARM: SAMSUNG: Use generic s3c_set_platdata for USB OHCI ARM: SAMSUNG: Use generic s3c_set_platdata for HWMON ARM: SAMSUNG: Use generic s3c_set_platdata for FB ARM: SAMSUNG: Use generic s3c_set_platdata for TS ARM: S3C64XX: Add PWM backlight support on SMDK6410 ARM: S5P64X0: Add PWM backlight support on SMDK6450 ARM: S5P64X0: Add PWM backlight support on SMDK6440 ARM: S5PC100: Add PWM backlight support on SMDKC100 ARM: S5PV210: Add PWM backlight support on SMDKV210 ARM: EXYNOS4: Add PWM backlight support on SMDKC210 ARM: EXYNOS4: Add PWM backlight support on SMDKV310 ARM: SAMSUNG: Create a common infrastructure for PWM backlight support clocksource: convert 32-bit down counting clocksource on S5PV210/S5P64X0 ... Fix up trivial conflict in arch/arm/mach-imx/mach-scb9328.c
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/Kconfig5
-rw-r--r--arch/arm/mach-imx/dma-v1.c25
-rw-r--r--arch/arm/mach-imx/eukrea_mbimx27-baseboard.c23
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c15
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c13
-rw-r--r--arch/arm/mach-imx/mach-apf9328.c7
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c2
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c15
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c14
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c2
-rw-r--r--arch/arm/mach-imx/mach-scb9328.c17
-rw-r--r--arch/arm/mach-imx/mx31lite-db.c15
12 files changed, 42 insertions, 111 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 59c97a331136..e8dd22fa7d61 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -167,6 +167,7 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD
167 bool "Eukrea MBIMXSD development board" 167 bool "Eukrea MBIMXSD development board"
168 select IMX_HAVE_PLATFORM_GPIO_KEYS 168 select IMX_HAVE_PLATFORM_GPIO_KEYS
169 select IMX_HAVE_PLATFORM_IMX_SSI 169 select IMX_HAVE_PLATFORM_IMX_SSI
170 select LEDS_GPIO_REGISTER
170 help 171 help
171 This adds board specific devices that can be found on Eukrea's 172 This adds board specific devices that can be found on Eukrea's
172 MBIMXSD evaluation board. 173 MBIMXSD evaluation board.
@@ -265,6 +266,7 @@ config MACH_EUKREA_MBIMX27_BASEBOARD
265 select IMX_HAVE_PLATFORM_IMX_UART 266 select IMX_HAVE_PLATFORM_IMX_UART
266 select IMX_HAVE_PLATFORM_MXC_MMC 267 select IMX_HAVE_PLATFORM_MXC_MMC
267 select IMX_HAVE_PLATFORM_SPI_IMX 268 select IMX_HAVE_PLATFORM_SPI_IMX
269 select LEDS_GPIO_REGISTER
268 help 270 help
269 This adds board specific devices that can be found on Eukrea's 271 This adds board specific devices that can be found on Eukrea's
270 MBIMX27 evaluation board. 272 MBIMX27 evaluation board.
@@ -403,6 +405,7 @@ config MACH_MX31LITE
403 select IMX_HAVE_PLATFORM_MXC_NAND 405 select IMX_HAVE_PLATFORM_MXC_NAND
404 select IMX_HAVE_PLATFORM_MXC_RTC 406 select IMX_HAVE_PLATFORM_MXC_RTC
405 select IMX_HAVE_PLATFORM_SPI_IMX 407 select IMX_HAVE_PLATFORM_SPI_IMX
408 select LEDS_GPIO_REGISTER
406 help 409 help
407 Include support for MX31 LITEKIT platform. This includes specific 410 Include support for MX31 LITEKIT platform. This includes specific
408 configurations for the board and its peripherals. 411 configurations for the board and its peripherals.
@@ -471,6 +474,7 @@ config MACH_MX31MOBOARD
471 select IMX_HAVE_PLATFORM_MXC_EHCI 474 select IMX_HAVE_PLATFORM_MXC_EHCI
472 select IMX_HAVE_PLATFORM_MXC_MMC 475 select IMX_HAVE_PLATFORM_MXC_MMC
473 select IMX_HAVE_PLATFORM_SPI_IMX 476 select IMX_HAVE_PLATFORM_SPI_IMX
477 select LEDS_GPIO_REGISTER
474 select MXC_ULPI if USB_ULPI 478 select MXC_ULPI if USB_ULPI
475 help 479 help
476 Include support for mx31moboard platform. This includes specific 480 Include support for mx31moboard platform. This includes specific
@@ -577,6 +581,7 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD
577 select IMX_HAVE_PLATFORM_GPIO_KEYS 581 select IMX_HAVE_PLATFORM_GPIO_KEYS
578 select IMX_HAVE_PLATFORM_IMX_SSI 582 select IMX_HAVE_PLATFORM_IMX_SSI
579 select IMX_HAVE_PLATFORM_IPU_CORE 583 select IMX_HAVE_PLATFORM_IPU_CORE
584 select LEDS_GPIO_REGISTER
580 help 585 help
581 This adds board specific devices that can be found on Eukrea's 586 This adds board specific devices that can be found on Eukrea's
582 MBIMXSD evaluation board. 587 MBIMXSD evaluation board.
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c
index f8aa5be0eb15..42afc29a7da8 100644
--- a/arch/arm/mach-imx/dma-v1.c
+++ b/arch/arm/mach-imx/dma-v1.c
@@ -476,7 +476,6 @@ void imx_dma_enable(int channel)
476 imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | 476 imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN |
477 CCR_ACRPT, DMA_CCR(channel)); 477 CCR_ACRPT, DMA_CCR(channel));
478 478
479#ifdef CONFIG_ARCH_MX2
480 if ((cpu_is_mx21() || cpu_is_mx27()) && 479 if ((cpu_is_mx21() || cpu_is_mx27()) &&
481 imxdma->sg && imx_dma_hw_chain(imxdma)) { 480 imxdma->sg && imx_dma_hw_chain(imxdma)) {
482 imxdma->sg = sg_next(imxdma->sg); 481 imxdma->sg = sg_next(imxdma->sg);
@@ -488,7 +487,6 @@ void imx_dma_enable(int channel)
488 DMA_CCR(channel)); 487 DMA_CCR(channel));
489 } 488 }
490 } 489 }
491#endif
492 imxdma->in_use = 1; 490 imxdma->in_use = 1;
493 491
494 local_irq_restore(flags); 492 local_irq_restore(flags);
@@ -519,7 +517,6 @@ void imx_dma_disable(int channel)
519} 517}
520EXPORT_SYMBOL(imx_dma_disable); 518EXPORT_SYMBOL(imx_dma_disable);
521 519
522#ifdef CONFIG_ARCH_MX2
523static void imx_dma_watchdog(unsigned long chno) 520static void imx_dma_watchdog(unsigned long chno)
524{ 521{
525 struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; 522 struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
@@ -531,7 +528,6 @@ static void imx_dma_watchdog(unsigned long chno)
531 if (imxdma->err_handler) 528 if (imxdma->err_handler)
532 imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); 529 imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT);
533} 530}
534#endif
535 531
536static irqreturn_t dma_err_handler(int irq, void *dev_id) 532static irqreturn_t dma_err_handler(int irq, void *dev_id)
537{ 533{
@@ -655,10 +651,8 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
655{ 651{
656 int i, disr; 652 int i, disr;
657 653
658#ifdef CONFIG_ARCH_MX2
659 if (cpu_is_mx21() || cpu_is_mx27()) 654 if (cpu_is_mx21() || cpu_is_mx27())
660 dma_err_handler(irq, dev_id); 655 dma_err_handler(irq, dev_id);
661#endif
662 656
663 disr = imx_dmav1_readl(DMA_DISR); 657 disr = imx_dmav1_readl(DMA_DISR);
664 658
@@ -704,7 +698,6 @@ int imx_dma_request(int channel, const char *name)
704 imxdma->name = name; 698 imxdma->name = name;
705 local_irq_restore(flags); /* request_irq() can block */ 699 local_irq_restore(flags); /* request_irq() can block */
706 700
707#ifdef CONFIG_ARCH_MX2
708 if (cpu_is_mx21() || cpu_is_mx27()) { 701 if (cpu_is_mx21() || cpu_is_mx27()) {
709 ret = request_irq(MX2x_INT_DMACH0 + channel, 702 ret = request_irq(MX2x_INT_DMACH0 + channel,
710 dma_irq_handler, 0, "DMA", NULL); 703 dma_irq_handler, 0, "DMA", NULL);
@@ -718,7 +711,6 @@ int imx_dma_request(int channel, const char *name)
718 imxdma->watchdog.function = &imx_dma_watchdog; 711 imxdma->watchdog.function = &imx_dma_watchdog;
719 imxdma->watchdog.data = channel; 712 imxdma->watchdog.data = channel;
720 } 713 }
721#endif
722 714
723 return ret; 715 return ret;
724} 716}
@@ -745,10 +737,8 @@ void imx_dma_free(int channel)
745 imx_dma_disable(channel); 737 imx_dma_disable(channel);
746 imxdma->name = NULL; 738 imxdma->name = NULL;
747 739
748#ifdef CONFIG_ARCH_MX2
749 if (cpu_is_mx21() || cpu_is_mx27()) 740 if (cpu_is_mx21() || cpu_is_mx27())
750 free_irq(MX2x_INT_DMACH0 + channel, NULL); 741 free_irq(MX2x_INT_DMACH0 + channel, NULL);
751#endif
752 742
753 local_irq_restore(flags); 743 local_irq_restore(flags);
754} 744}
@@ -804,21 +794,13 @@ static int __init imx_dma_init(void)
804 int ret = 0; 794 int ret = 0;
805 int i; 795 int i;
806 796
807#ifdef CONFIG_ARCH_MX1
808 if (cpu_is_mx1()) 797 if (cpu_is_mx1())
809 imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); 798 imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR);
810 else 799 else if (cpu_is_mx21())
811#endif
812#ifdef CONFIG_MACH_MX21
813 if (cpu_is_mx21())
814 imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); 800 imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR);
815 else 801 else if (cpu_is_mx27())
816#endif
817#ifdef CONFIG_MACH_MX27
818 if (cpu_is_mx27())
819 imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); 802 imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR);
820 else 803 else
821#endif
822 return 0; 804 return 0;
823 805
824 dma_clk = clk_get(NULL, "dma"); 806 dma_clk = clk_get(NULL, "dma");
@@ -829,7 +811,6 @@ static int __init imx_dma_init(void)
829 /* reset DMA module */ 811 /* reset DMA module */
830 imx_dmav1_writel(DCR_DRST, DMA_DCR); 812 imx_dmav1_writel(DCR_DRST, DMA_DCR);
831 813
832#ifdef CONFIG_ARCH_MX1
833 if (cpu_is_mx1()) { 814 if (cpu_is_mx1()) {
834 ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL); 815 ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL);
835 if (ret) { 816 if (ret) {
@@ -844,7 +825,7 @@ static int __init imx_dma_init(void)
844 return ret; 825 return ret;
845 } 826 }
846 } 827 }
847#endif 828
848 /* enable DMA module */ 829 /* enable DMA module */
849 imx_dmav1_writel(DCR_DEN, DMA_DCR); 830 imx_dmav1_writel(DCR_DEN, DMA_DCR);
850 831
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
index 5911281da5f5..5db3e1463af7 100644
--- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
@@ -112,7 +112,7 @@ eukrea_mbimx27_keymap_data __initconst = {
112 .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), 112 .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap),
113}; 113};
114 114
115static struct gpio_led gpio_leds[] = { 115static const struct gpio_led eukrea_mbimx27_gpio_leds[] __initconst = {
116 { 116 {
117 .name = "led1", 117 .name = "led1",
118 .default_trigger = "heartbeat", 118 .default_trigger = "heartbeat",
@@ -127,17 +127,10 @@ static struct gpio_led gpio_leds[] = {
127 }, 127 },
128}; 128};
129 129
130static struct gpio_led_platform_data gpio_led_info = { 130static const struct gpio_led_platform_data
131 .leds = gpio_leds, 131 eukrea_mbimx27_gpio_led_info __initconst = {
132 .num_leds = ARRAY_SIZE(gpio_leds), 132 .leds = eukrea_mbimx27_gpio_leds,
133}; 133 .num_leds = ARRAY_SIZE(eukrea_mbimx27_gpio_leds),
134
135static struct platform_device leds_gpio = {
136 .name = "leds-gpio",
137 .id = -1,
138 .dev = {
139 .platform_data = &gpio_led_info,
140 },
141}; 134};
142 135
143static struct imx_fb_videomode eukrea_mbimx27_modes[] = { 136static struct imx_fb_videomode eukrea_mbimx27_modes[] = {
@@ -293,10 +286,6 @@ static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
293 }, 286 },
294}; 287};
295 288
296static struct platform_device *platform_devices[] __initdata = {
297 &leds_gpio,
298};
299
300static const struct imxmmc_platform_data sdhc_pdata __initconst = { 289static const struct imxmmc_platform_data sdhc_pdata __initconst = {
301 .dat3_card_detect = 1, 290 .dat3_card_detect = 1,
302}; 291};
@@ -377,5 +366,5 @@ void __init eukrea_mbimx27_baseboard_init(void)
377 366
378 imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); 367 imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);
379 368
380 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 369 gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info);
381} 370}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
index f9ef04acdab1..01ebcb31e482 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
@@ -173,7 +173,7 @@ static struct platform_device eukrea_mbimxsd_lcd_powerdev = {
173 .dev.platform_data = &eukrea_mbimxsd_lcd_power_data, 173 .dev.platform_data = &eukrea_mbimxsd_lcd_power_data,
174}; 174};
175 175
176static struct gpio_led eukrea_mbimxsd_leds[] = { 176static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = {
177 { 177 {
178 .name = "led1", 178 .name = "led1",
179 .default_trigger = "heartbeat", 179 .default_trigger = "heartbeat",
@@ -182,19 +182,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = {
182 }, 182 },
183}; 183};
184 184
185static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { 185static const struct gpio_led_platform_data
186 eukrea_mbimxsd_led_info __initconst = {
186 .leds = eukrea_mbimxsd_leds, 187 .leds = eukrea_mbimxsd_leds,
187 .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), 188 .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds),
188}; 189};
189 190
190static struct platform_device eukrea_mbimxsd_leds_gpio = {
191 .name = "leds-gpio",
192 .id = -1,
193 .dev = {
194 .platform_data = &eukrea_mbimxsd_led_info,
195 },
196};
197
198static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { 191static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
199 { 192 {
200 .gpio = GPIO_SWITCH1, 193 .gpio = GPIO_SWITCH1,
@@ -212,7 +205,6 @@ static const struct gpio_keys_platform_data
212}; 205};
213 206
214static struct platform_device *platform_devices[] __initdata = { 207static struct platform_device *platform_devices[] __initdata = {
215 &eukrea_mbimxsd_leds_gpio,
216 &eukrea_mbimxsd_lcd_powerdev, 208 &eukrea_mbimxsd_lcd_powerdev,
217}; 209};
218 210
@@ -287,5 +279,6 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
287 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); 279 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
288 280
289 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 281 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
282 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
290 imx_add_gpio_keys(&eukrea_mbimxsd_button_data); 283 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
291} 284}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index 4909ea05855a..558eb526ba56 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -193,19 +193,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = {
193 }, 193 },
194}; 194};
195 195
196static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { 196static const struct gpio_led_platform_data
197 eukrea_mbimxsd_led_info __initconst = {
197 .leds = eukrea_mbimxsd_leds, 198 .leds = eukrea_mbimxsd_leds,
198 .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), 199 .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds),
199}; 200};
200 201
201static struct platform_device eukrea_mbimxsd_leds_gpio = {
202 .name = "leds-gpio",
203 .id = -1,
204 .dev = {
205 .platform_data = &eukrea_mbimxsd_led_info,
206 },
207};
208
209static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { 202static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
210 { 203 {
211 .gpio = GPIO_SWITCH1, 204 .gpio = GPIO_SWITCH1,
@@ -223,7 +216,6 @@ static const struct gpio_keys_platform_data
223}; 216};
224 217
225static struct platform_device *platform_devices[] __initdata = { 218static struct platform_device *platform_devices[] __initdata = {
226 &eukrea_mbimxsd_leds_gpio,
227 &eukrea_mbimxsd_lcd_powerdev, 219 &eukrea_mbimxsd_lcd_powerdev,
228}; 220};
229 221
@@ -299,5 +291,6 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
299 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); 291 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
300 292
301 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 293 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
294 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
302 imx_add_gpio_keys(&eukrea_mbimxsd_button_data); 295 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
303} 296}
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
index 59d2a3b137d9..a404c89485ca 100644
--- a/arch/arm/mach-imx/mach-apf9328.c
+++ b/arch/arm/mach-imx/mach-apf9328.c
@@ -99,11 +99,6 @@ static struct platform_device dm9000x_device = {
99 } 99 }
100}; 100};
101 101
102/* --- SERIAL RESSOURCE --- */
103static const struct imxuart_platform_data uart0_pdata __initconst = {
104 .flags = 0,
105};
106
107static const struct imxuart_platform_data uart1_pdata __initconst = { 102static const struct imxuart_platform_data uart1_pdata __initconst = {
108 .flags = IMXUART_HAVE_RTSCTS, 103 .flags = IMXUART_HAVE_RTSCTS,
109}; 104};
@@ -121,7 +116,7 @@ static void __init apf9328_init(void)
121 ARRAY_SIZE(apf9328_pins), 116 ARRAY_SIZE(apf9328_pins),
122 "APF9328"); 117 "APF9328");
123 118
124 imx1_add_imx_uart0(&uart0_pdata); 119 imx1_add_imx_uart0(NULL);
125 imx1_add_imx_uart1(&uart1_pdata); 120 imx1_add_imx_uart1(&uart1_pdata);
126 121
127 platform_add_devices(devices, ARRAY_SIZE(devices)); 122 platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index c6269d60ddbc..6707de0ab716 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -34,7 +34,7 @@
34#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
35#include <asm/mach/time.h> 35#include <asm/mach/time.h>
36#include <mach/common.h> 36#include <mach/common.h>
37#include <mach/iomux.h> 37#include <mach/iomux-mx27.h>
38 38
39#include "devices-imx27.h" 39#include "devices-imx27.h"
40 40
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index eb663102376f..b31d4129e10e 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -47,6 +47,7 @@
47#define SPI2_SS0 IMX_GPIO_NR(4, 21) 47#define SPI2_SS0 IMX_GPIO_NR(4, 21)
48#define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) 48#define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28))
49#define PMIC_INT IMX_GPIO_NR(3, 14) 49#define PMIC_INT IMX_GPIO_NR(3, 14)
50#define SD1_CD IMX_GPIO_NR(2, 26)
50 51
51static const int mx27pdk_pins[] __initconst = { 52static const int mx27pdk_pins[] __initconst = {
52 /* UART1 */ 53 /* UART1 */
@@ -135,13 +136,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = {
135static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, 136static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq,
136 void *data) 137 void *data)
137{ 138{
138 return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING | 139 return request_irq(gpio_to_irq(SD1_CD), detect_irq,
139 IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); 140 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data);
140} 141}
141 142
142static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) 143static void mx27_3ds_sdhc1_exit(struct device *dev, void *data)
143{ 144{
144 free_irq(IRQ_GPIOB(26), data); 145 free_irq(gpio_to_irq(SD1_CD), data);
145} 146}
146 147
147static const struct imxmmc_platform_data sdhc1_pdata __initconst = { 148static const struct imxmmc_platform_data sdhc1_pdata __initconst = {
@@ -261,11 +262,11 @@ static struct mc13xxx_platform_data mc13783_pdata = {
261}; 262};
262 263
263/* SPI */ 264/* SPI */
264static int spi2_internal_chipselect[] = {SPI2_SS0}; 265static int spi2_chipselect[] = {SPI2_SS0};
265 266
266static const struct spi_imx_master spi2_pdata __initconst = { 267static const struct spi_imx_master spi2_pdata __initconst = {
267 .chipselect = spi2_internal_chipselect, 268 .chipselect = spi2_chipselect,
268 .num_chipselect = ARRAY_SIZE(spi2_internal_chipselect), 269 .num_chipselect = ARRAY_SIZE(spi2_chipselect),
269}; 270};
270 271
271static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { 272static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
@@ -275,7 +276,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
275 .bus_num = 1, 276 .bus_num = 1,
276 .chip_select = 0, /* SS0 */ 277 .chip_select = 0, /* SS0 */
277 .platform_data = &mc13783_pdata, 278 .platform_data = &mc13783_pdata,
278 .irq = IRQ_GPIOC(14), 279 .irq = gpio_to_irq(PMIC_INT),
279 .mode = SPI_CS_HIGH, 280 .mode = SPI_CS_HIGH,
280 }, 281 },
281}; 282};
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index a52fd36e2b52..b358383120e7 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -425,7 +425,7 @@ static int __init moboard_usbh2_init(void)
425 return 0; 425 return 0;
426} 426}
427 427
428static struct gpio_led mx31moboard_leds[] = { 428static const struct gpio_led mx31moboard_leds[] __initconst = {
429 { 429 {
430 .name = "coreboard-led-0:red:running", 430 .name = "coreboard-led-0:red:running",
431 .default_trigger = "heartbeat", 431 .default_trigger = "heartbeat",
@@ -442,26 +442,17 @@ static struct gpio_led mx31moboard_leds[] = {
442 }, 442 },
443}; 443};
444 444
445static struct gpio_led_platform_data mx31moboard_led_pdata = { 445static const struct gpio_led_platform_data mx31moboard_led_pdata __initconst = {
446 .num_leds = ARRAY_SIZE(mx31moboard_leds), 446 .num_leds = ARRAY_SIZE(mx31moboard_leds),
447 .leds = mx31moboard_leds, 447 .leds = mx31moboard_leds,
448}; 448};
449 449
450static struct platform_device mx31moboard_leds_device = {
451 .name = "leds-gpio",
452 .id = -1,
453 .dev = {
454 .platform_data = &mx31moboard_led_pdata,
455 },
456};
457
458static const struct ipu_platform_data mx3_ipu_data __initconst = { 450static const struct ipu_platform_data mx3_ipu_data __initconst = {
459 .irq_base = MXC_IPU_IRQ_START, 451 .irq_base = MXC_IPU_IRQ_START,
460}; 452};
461 453
462static struct platform_device *devices[] __initdata = { 454static struct platform_device *devices[] __initdata = {
463 &mx31moboard_flash, 455 &mx31moboard_flash,
464 &mx31moboard_leds_device,
465}; 456};
466 457
467static struct mx3_camera_pdata camera_pdata __initdata = { 458static struct mx3_camera_pdata camera_pdata __initdata = {
@@ -513,6 +504,7 @@ static void __init mx31moboard_init(void)
513 "moboard"); 504 "moboard");
514 505
515 platform_add_devices(devices, ARRAY_SIZE(devices)); 506 platform_add_devices(devices, ARRAY_SIZE(devices));
507 gpio_led_register_device(-1, &mx31moboard_led_pdata);
516 508
517 imx31_add_imx_uart0(&uart0_pdata); 509 imx31_add_imx_uart0(&uart0_pdata);
518 imx31_add_imx_uart4(&uart4_pdata); 510 imx31_add_imx_uart4(&uart4_pdata);
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 48b3c6fd5cf0..b3b9bd8ac2a3 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -43,7 +43,7 @@
43 43
44#include "devices-imx35.h" 44#include "devices-imx35.h"
45 45
46#define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 1) 46#define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 1))
47 47
48static const struct imxuart_platform_data uart_pdata __initconst = { 48static const struct imxuart_platform_data uart_pdata __initconst = {
49 .flags = IMXUART_HAVE_RTSCTS, 49 .flags = IMXUART_HAVE_RTSCTS,
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
index 82805260e19c..db2d60470e15 100644
--- a/arch/arm/mach-imx/mach-scb9328.c
+++ b/arch/arm/mach-imx/mach-scb9328.c
@@ -101,21 +101,7 @@ static const int mxc_uart1_pins[] = {
101 PC12_PF_UART1_RXD, 101 PC12_PF_UART1_RXD,
102}; 102};
103 103
104static int uart1_mxc_init(struct platform_device *pdev)
105{
106 return mxc_gpio_setup_multiple_pins(mxc_uart1_pins,
107 ARRAY_SIZE(mxc_uart1_pins), "UART1");
108}
109
110static void uart1_mxc_exit(struct platform_device *pdev)
111{
112 mxc_gpio_release_multiple_pins(mxc_uart1_pins,
113 ARRAY_SIZE(mxc_uart1_pins));
114}
115
116static const struct imxuart_platform_data uart_pdata __initconst = { 104static const struct imxuart_platform_data uart_pdata __initconst = {
117 .init = uart1_mxc_init,
118 .exit = uart1_mxc_exit,
119 .flags = IMXUART_HAVE_RTSCTS, 105 .flags = IMXUART_HAVE_RTSCTS,
120}; 106};
121 107
@@ -131,6 +117,9 @@ static void __init scb9328_init(void)
131{ 117{
132 imx1_soc_init(); 118 imx1_soc_init();
133 119
120 mxc_gpio_setup_multiple_pins(mxc_uart1_pins,
121 ARRAY_SIZE(mxc_uart1_pins), "UART1");
122
134 imx1_add_imx_uart0(&uart_pdata); 123 imx1_add_imx_uart0(&uart_pdata);
135 124
136 printk(KERN_INFO"Scb9328: Adding devices\n"); 125 printk(KERN_INFO"Scb9328: Adding devices\n");
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c
index 5aa053edc17c..bf0fb87946ba 100644
--- a/arch/arm/mach-imx/mx31lite-db.c
+++ b/arch/arm/mach-imx/mx31lite-db.c
@@ -161,7 +161,7 @@ static const struct spi_imx_master spi0_pdata __initconst = {
161 161
162/* GPIO LEDs */ 162/* GPIO LEDs */
163 163
164static struct gpio_led litekit_leds[] = { 164static const struct gpio_led litekit_leds[] __initconst = {
165 { 165 {
166 .name = "GPIO0", 166 .name = "GPIO0",
167 .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE), 167 .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE),
@@ -176,19 +176,12 @@ static struct gpio_led litekit_leds[] = {
176 } 176 }
177}; 177};
178 178
179static struct gpio_led_platform_data litekit_led_platform_data = { 179static const struct gpio_led_platform_data
180 litekit_led_platform_data __initconst = {
180 .leds = litekit_leds, 181 .leds = litekit_leds,
181 .num_leds = ARRAY_SIZE(litekit_leds), 182 .num_leds = ARRAY_SIZE(litekit_leds),
182}; 183};
183 184
184static struct platform_device litekit_led_device = {
185 .name = "leds-gpio",
186 .id = -1,
187 .dev = {
188 .platform_data = &litekit_led_platform_data,
189 },
190};
191
192void __init mx31lite_db_init(void) 185void __init mx31lite_db_init(void)
193{ 186{
194 mxc_iomux_setup_multiple_pins(litekit_db_board_pins, 187 mxc_iomux_setup_multiple_pins(litekit_db_board_pins,
@@ -197,7 +190,7 @@ void __init mx31lite_db_init(void)
197 imx31_add_imx_uart0(&uart_pdata); 190 imx31_add_imx_uart0(&uart_pdata);
198 imx31_add_mxc_mmc(0, &mmc_pdata); 191 imx31_add_mxc_mmc(0, &mmc_pdata);
199 imx31_add_spi_imx0(&spi0_pdata); 192 imx31_add_spi_imx0(&spi0_pdata);
200 platform_device_register(&litekit_led_device); 193 gpio_led_register_device(-1, &litekit_led_platform_data);
201 imx31_add_imx2_wdt(NULL); 194 imx31_add_imx2_wdt(NULL);
202 imx31_add_mxc_rtc(NULL); 195 imx31_add_mxc_rtc(NULL);
203} 196}