diff options
Diffstat (limited to 'arch/arm/mach-imx')
47 files changed, 460 insertions, 226 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 59c97a33113..0519dd7f034 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. |
@@ -276,6 +278,7 @@ config MACH_MX27_3DS | |||
276 | select SOC_IMX27 | 278 | select SOC_IMX27 |
277 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 279 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
278 | select IMX_HAVE_PLATFORM_IMX2_WDT | 280 | select IMX_HAVE_PLATFORM_IMX2_WDT |
281 | select IMX_HAVE_PLATFORM_IMX_FB | ||
279 | select IMX_HAVE_PLATFORM_IMX_I2C | 282 | select IMX_HAVE_PLATFORM_IMX_I2C |
280 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 283 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
281 | select IMX_HAVE_PLATFORM_IMX_UART | 284 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -403,6 +406,7 @@ config MACH_MX31LITE | |||
403 | select IMX_HAVE_PLATFORM_MXC_NAND | 406 | select IMX_HAVE_PLATFORM_MXC_NAND |
404 | select IMX_HAVE_PLATFORM_MXC_RTC | 407 | select IMX_HAVE_PLATFORM_MXC_RTC |
405 | select IMX_HAVE_PLATFORM_SPI_IMX | 408 | select IMX_HAVE_PLATFORM_SPI_IMX |
409 | select LEDS_GPIO_REGISTER | ||
406 | help | 410 | help |
407 | Include support for MX31 LITEKIT platform. This includes specific | 411 | Include support for MX31 LITEKIT platform. This includes specific |
408 | configurations for the board and its peripherals. | 412 | configurations for the board and its peripherals. |
@@ -471,6 +475,7 @@ config MACH_MX31MOBOARD | |||
471 | select IMX_HAVE_PLATFORM_MXC_EHCI | 475 | select IMX_HAVE_PLATFORM_MXC_EHCI |
472 | select IMX_HAVE_PLATFORM_MXC_MMC | 476 | select IMX_HAVE_PLATFORM_MXC_MMC |
473 | select IMX_HAVE_PLATFORM_SPI_IMX | 477 | select IMX_HAVE_PLATFORM_SPI_IMX |
478 | select LEDS_GPIO_REGISTER | ||
474 | select MXC_ULPI if USB_ULPI | 479 | select MXC_ULPI if USB_ULPI |
475 | help | 480 | help |
476 | Include support for mx31moboard platform. This includes specific | 481 | Include support for mx31moboard platform. This includes specific |
@@ -577,6 +582,7 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD | |||
577 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 582 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
578 | select IMX_HAVE_PLATFORM_IMX_SSI | 583 | select IMX_HAVE_PLATFORM_IMX_SSI |
579 | select IMX_HAVE_PLATFORM_IPU_CORE | 584 | select IMX_HAVE_PLATFORM_IPU_CORE |
585 | select LEDS_GPIO_REGISTER | ||
580 | help | 586 | help |
581 | This adds board specific devices that can be found on Eukrea's | 587 | This adds board specific devices that can be found on Eukrea's |
582 | MBIMXSD evaluation board. | 588 | MBIMXSD evaluation board. |
diff --git a/arch/arm/mach-imx/clock-imx1.c b/arch/arm/mach-imx/clock-imx1.c index dcc41728fe7..4aabeb24156 100644 --- a/arch/arm/mach-imx/clock-imx1.c +++ b/arch/arm/mach-imx/clock-imx1.c | |||
@@ -587,9 +587,9 @@ static struct clk_lookup lookups[] __initdata = { | |||
587 | _REGISTER_CLOCK(NULL, "mma", mma_clk) | 587 | _REGISTER_CLOCK(NULL, "mma", mma_clk) |
588 | _REGISTER_CLOCK("imx_udc.0", NULL, usbd_clk) | 588 | _REGISTER_CLOCK("imx_udc.0", NULL, usbd_clk) |
589 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | 589 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) |
590 | _REGISTER_CLOCK("imx-uart.0", NULL, uart_clk) | 590 | _REGISTER_CLOCK("imx1-uart.0", NULL, uart_clk) |
591 | _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk) | 591 | _REGISTER_CLOCK("imx1-uart.1", NULL, uart_clk) |
592 | _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk) | 592 | _REGISTER_CLOCK("imx1-uart.2", NULL, uart_clk) |
593 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) | 593 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) |
594 | _REGISTER_CLOCK("imx1-cspi.0", NULL, spi_clk) | 594 | _REGISTER_CLOCK("imx1-cspi.0", NULL, spi_clk) |
595 | _REGISTER_CLOCK("imx1-cspi.1", NULL, spi_clk) | 595 | _REGISTER_CLOCK("imx1-cspi.1", NULL, spi_clk) |
diff --git a/arch/arm/mach-imx/clock-imx21.c b/arch/arm/mach-imx/clock-imx21.c index bf30a8c7ce6..ee15d8c9db0 100644 --- a/arch/arm/mach-imx/clock-imx21.c +++ b/arch/arm/mach-imx/clock-imx21.c | |||
@@ -1162,10 +1162,10 @@ static struct clk_lookup lookups[] = { | |||
1162 | _REGISTER_CLOCK(NULL, "perclk3", per_clk[2]) | 1162 | _REGISTER_CLOCK(NULL, "perclk3", per_clk[2]) |
1163 | _REGISTER_CLOCK(NULL, "perclk4", per_clk[3]) | 1163 | _REGISTER_CLOCK(NULL, "perclk4", per_clk[3]) |
1164 | _REGISTER_CLOCK(NULL, "clko", clko_clk) | 1164 | _REGISTER_CLOCK(NULL, "clko", clko_clk) |
1165 | _REGISTER_CLOCK("imx-uart.0", NULL, uart_clk[0]) | 1165 | _REGISTER_CLOCK("imx21-uart.0", NULL, uart_clk[0]) |
1166 | _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk[1]) | 1166 | _REGISTER_CLOCK("imx21-uart.1", NULL, uart_clk[1]) |
1167 | _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk[2]) | 1167 | _REGISTER_CLOCK("imx21-uart.2", NULL, uart_clk[2]) |
1168 | _REGISTER_CLOCK("imx-uart.3", NULL, uart_clk[3]) | 1168 | _REGISTER_CLOCK("imx21-uart.3", NULL, uart_clk[3]) |
1169 | _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[0]) | 1169 | _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[0]) |
1170 | _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[1]) | 1170 | _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[1]) |
1171 | _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[2]) | 1171 | _REGISTER_CLOCK(NULL, "gpt1", gpt_clk[2]) |
diff --git a/arch/arm/mach-imx/clock-imx25.c b/arch/arm/mach-imx/clock-imx25.c index a65838fc061..e63e23504fe 100644 --- a/arch/arm/mach-imx/clock-imx25.c +++ b/arch/arm/mach-imx/clock-imx25.c | |||
@@ -272,19 +272,21 @@ DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL); | |||
272 | }, | 272 | }, |
273 | 273 | ||
274 | static struct clk_lookup lookups[] = { | 274 | static struct clk_lookup lookups[] = { |
275 | _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) | 275 | /* i.mx25 has the i.mx21 type uart */ |
276 | _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) | 276 | _REGISTER_CLOCK("imx21-uart.0", NULL, uart1_clk) |
277 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | 277 | _REGISTER_CLOCK("imx21-uart.1", NULL, uart2_clk) |
278 | _REGISTER_CLOCK("imx-uart.3", NULL, uart4_clk) | 278 | _REGISTER_CLOCK("imx21-uart.2", NULL, uart3_clk) |
279 | _REGISTER_CLOCK("imx-uart.4", NULL, uart5_clk) | 279 | _REGISTER_CLOCK("imx21-uart.3", NULL, uart4_clk) |
280 | _REGISTER_CLOCK("imx21-uart.4", NULL, uart5_clk) | ||
280 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usbotg_clk) | 281 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usbotg_clk) |
281 | _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) | 282 | _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) |
282 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) | 283 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) |
283 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) | 284 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) |
284 | _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) | 285 | _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) |
285 | _REGISTER_CLOCK("imx25-cspi.0", NULL, cspi1_clk) | 286 | /* i.mx25 has the i.mx35 type cspi */ |
286 | _REGISTER_CLOCK("imx25-cspi.1", NULL, cspi2_clk) | 287 | _REGISTER_CLOCK("imx35-cspi.0", NULL, cspi1_clk) |
287 | _REGISTER_CLOCK("imx25-cspi.2", NULL, cspi3_clk) | 288 | _REGISTER_CLOCK("imx35-cspi.1", NULL, cspi2_clk) |
289 | _REGISTER_CLOCK("imx35-cspi.2", NULL, cspi3_clk) | ||
288 | _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm1_clk) | 290 | _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm1_clk) |
289 | _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk) | 291 | _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk) |
290 | _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk) | 292 | _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk) |
@@ -294,19 +296,20 @@ static struct clk_lookup lookups[] = { | |||
294 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) | 296 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) |
295 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) | 297 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) |
296 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) | 298 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) |
297 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 299 | _REGISTER_CLOCK("imx25-fec.0", NULL, fec_clk) |
298 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) | 300 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) |
299 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 301 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
300 | _REGISTER_CLOCK("imx2-wdt.0", NULL, wdt_clk) | 302 | _REGISTER_CLOCK("imx2-wdt.0", NULL, wdt_clk) |
301 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | 303 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) |
302 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | 304 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) |
303 | _REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk) | 305 | _REGISTER_CLOCK("sdhci-esdhc-imx25.0", NULL, esdhc1_clk) |
304 | _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk) | 306 | _REGISTER_CLOCK("sdhci-esdhc-imx25.1", NULL, esdhc2_clk) |
305 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) | 307 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) |
306 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) | 308 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) |
307 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) | 309 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) |
308 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) | 310 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) |
309 | _REGISTER_CLOCK("imx-sdma", NULL, sdma_clk) | 311 | /* i.mx25 has the i.mx35 type sdma */ |
312 | _REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk) | ||
310 | }; | 313 | }; |
311 | 314 | ||
312 | int __init mx25_clocks_init(void) | 315 | int __init mx25_clocks_init(void) |
@@ -328,6 +331,9 @@ int __init mx25_clocks_init(void) | |||
328 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0), | 331 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0), |
329 | CRM_BASE + 0x64); | 332 | CRM_BASE + 0x64); |
330 | 333 | ||
334 | /* Clock source for gpt is ahb_div */ | ||
335 | __raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64); | ||
336 | |||
331 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 337 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
332 | 338 | ||
333 | return 0; | 339 | return 0; |
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c index 583f2515c1d..6912b821b37 100644 --- a/arch/arm/mach-imx/clock-imx27.c +++ b/arch/arm/mach-imx/clock-imx27.c | |||
@@ -624,12 +624,13 @@ DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, &csi_clk1, &per4_clk); | |||
624 | }, | 624 | }, |
625 | 625 | ||
626 | static struct clk_lookup lookups[] = { | 626 | static struct clk_lookup lookups[] = { |
627 | _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) | 627 | /* i.mx27 has the i.mx21 type uart */ |
628 | _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) | 628 | _REGISTER_CLOCK("imx21-uart.0", NULL, uart1_clk) |
629 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | 629 | _REGISTER_CLOCK("imx21-uart.1", NULL, uart2_clk) |
630 | _REGISTER_CLOCK("imx-uart.3", NULL, uart4_clk) | 630 | _REGISTER_CLOCK("imx21-uart.2", NULL, uart3_clk) |
631 | _REGISTER_CLOCK("imx-uart.4", NULL, uart5_clk) | 631 | _REGISTER_CLOCK("imx21-uart.3", NULL, uart4_clk) |
632 | _REGISTER_CLOCK("imx-uart.5", NULL, uart6_clk) | 632 | _REGISTER_CLOCK("imx21-uart.4", NULL, uart5_clk) |
633 | _REGISTER_CLOCK("imx21-uart.5", NULL, uart6_clk) | ||
633 | _REGISTER_CLOCK(NULL, "gpt1", gpt1_clk) | 634 | _REGISTER_CLOCK(NULL, "gpt1", gpt1_clk) |
634 | _REGISTER_CLOCK(NULL, "gpt2", gpt2_clk) | 635 | _REGISTER_CLOCK(NULL, "gpt2", gpt2_clk) |
635 | _REGISTER_CLOCK(NULL, "gpt3", gpt3_clk) | 636 | _REGISTER_CLOCK(NULL, "gpt3", gpt3_clk) |
@@ -662,7 +663,7 @@ static struct clk_lookup lookups[] = { | |||
662 | _REGISTER_CLOCK(NULL, "brom", brom_clk) | 663 | _REGISTER_CLOCK(NULL, "brom", brom_clk) |
663 | _REGISTER_CLOCK(NULL, "emma", emma_clk) | 664 | _REGISTER_CLOCK(NULL, "emma", emma_clk) |
664 | _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk) | 665 | _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk) |
665 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 666 | _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk) |
666 | _REGISTER_CLOCK(NULL, "emi", emi_clk) | 667 | _REGISTER_CLOCK(NULL, "emi", emi_clk) |
667 | _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk) | 668 | _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk) |
668 | _REGISTER_CLOCK(NULL, "ata", ata_clk) | 669 | _REGISTER_CLOCK(NULL, "ata", ata_clk) |
diff --git a/arch/arm/mach-imx/clock-imx31.c b/arch/arm/mach-imx/clock-imx31.c index 25f343fca2b..d973770b1f9 100644 --- a/arch/arm/mach-imx/clock-imx31.c +++ b/arch/arm/mach-imx/clock-imx31.c | |||
@@ -547,11 +547,12 @@ static struct clk_lookup lookups[] = { | |||
547 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1) | 547 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1) |
548 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2) | 548 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2) |
549 | _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk) | 549 | _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk) |
550 | _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) | 550 | /* i.mx31 has the i.mx21 type uart */ |
551 | _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) | 551 | _REGISTER_CLOCK("imx21-uart.0", NULL, uart1_clk) |
552 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | 552 | _REGISTER_CLOCK("imx21-uart.1", NULL, uart2_clk) |
553 | _REGISTER_CLOCK("imx-uart.3", NULL, uart4_clk) | 553 | _REGISTER_CLOCK("imx21-uart.2", NULL, uart3_clk) |
554 | _REGISTER_CLOCK("imx-uart.4", NULL, uart5_clk) | 554 | _REGISTER_CLOCK("imx21-uart.3", NULL, uart4_clk) |
555 | _REGISTER_CLOCK("imx21-uart.4", NULL, uart5_clk) | ||
555 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) | 556 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) |
556 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) | 557 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) |
557 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c3_clk) | 558 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c3_clk) |
@@ -564,7 +565,7 @@ static struct clk_lookup lookups[] = { | |||
564 | _REGISTER_CLOCK(NULL, "ata", ata_clk) | 565 | _REGISTER_CLOCK(NULL, "ata", ata_clk) |
565 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) | 566 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) |
566 | _REGISTER_CLOCK(NULL, "rng", rng_clk) | 567 | _REGISTER_CLOCK(NULL, "rng", rng_clk) |
567 | _REGISTER_CLOCK("imx-sdma", NULL, sdma_clk1) | 568 | _REGISTER_CLOCK("imx31-sdma", NULL, sdma_clk1) |
568 | _REGISTER_CLOCK(NULL, "sdma_ipg", sdma_clk2) | 569 | _REGISTER_CLOCK(NULL, "sdma_ipg", sdma_clk2) |
569 | _REGISTER_CLOCK(NULL, "mstick", mstick1_clk) | 570 | _REGISTER_CLOCK(NULL, "mstick", mstick1_clk) |
570 | _REGISTER_CLOCK(NULL, "mstick", mstick2_clk) | 571 | _REGISTER_CLOCK(NULL, "mstick", mstick2_clk) |
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c index 5a4cc1ea405..88b62a071ae 100644 --- a/arch/arm/mach-imx/clock-imx35.c +++ b/arch/arm/mach-imx/clock-imx35.c | |||
@@ -458,10 +458,11 @@ static struct clk_lookup lookups[] = { | |||
458 | _REGISTER_CLOCK("imx-epit.0", NULL, epit1_clk) | 458 | _REGISTER_CLOCK("imx-epit.0", NULL, epit1_clk) |
459 | _REGISTER_CLOCK("imx-epit.1", NULL, epit2_clk) | 459 | _REGISTER_CLOCK("imx-epit.1", NULL, epit2_clk) |
460 | _REGISTER_CLOCK(NULL, "esai", esai_clk) | 460 | _REGISTER_CLOCK(NULL, "esai", esai_clk) |
461 | _REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk) | 461 | _REGISTER_CLOCK("sdhci-esdhc-imx35.0", NULL, esdhc1_clk) |
462 | _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk) | 462 | _REGISTER_CLOCK("sdhci-esdhc-imx35.1", NULL, esdhc2_clk) |
463 | _REGISTER_CLOCK("sdhci-esdhc-imx.2", NULL, esdhc3_clk) | 463 | _REGISTER_CLOCK("sdhci-esdhc-imx35.2", NULL, esdhc3_clk) |
464 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 464 | /* i.mx35 has the i.mx27 type fec */ |
465 | _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk) | ||
465 | _REGISTER_CLOCK(NULL, "gpio", gpio1_clk) | 466 | _REGISTER_CLOCK(NULL, "gpio", gpio1_clk) |
466 | _REGISTER_CLOCK(NULL, "gpio", gpio2_clk) | 467 | _REGISTER_CLOCK(NULL, "gpio", gpio2_clk) |
467 | _REGISTER_CLOCK(NULL, "gpio", gpio3_clk) | 468 | _REGISTER_CLOCK(NULL, "gpio", gpio3_clk) |
@@ -481,14 +482,15 @@ static struct clk_lookup lookups[] = { | |||
481 | _REGISTER_CLOCK(NULL, "rtc", rtc_clk) | 482 | _REGISTER_CLOCK(NULL, "rtc", rtc_clk) |
482 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) | 483 | _REGISTER_CLOCK(NULL, "rtic", rtic_clk) |
483 | _REGISTER_CLOCK(NULL, "scc", scc_clk) | 484 | _REGISTER_CLOCK(NULL, "scc", scc_clk) |
484 | _REGISTER_CLOCK("imx-sdma", NULL, sdma_clk) | 485 | _REGISTER_CLOCK("imx35-sdma", NULL, sdma_clk) |
485 | _REGISTER_CLOCK(NULL, "spba", spba_clk) | 486 | _REGISTER_CLOCK(NULL, "spba", spba_clk) |
486 | _REGISTER_CLOCK(NULL, "spdif", spdif_clk) | 487 | _REGISTER_CLOCK(NULL, "spdif", spdif_clk) |
487 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | 488 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) |
488 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | 489 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) |
489 | _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) | 490 | /* i.mx35 has the i.mx21 type uart */ |
490 | _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) | 491 | _REGISTER_CLOCK("imx21-uart.0", NULL, uart1_clk) |
491 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | 492 | _REGISTER_CLOCK("imx21-uart.1", NULL, uart2_clk) |
493 | _REGISTER_CLOCK("imx21-uart.2", NULL, uart3_clk) | ||
492 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usbotg_clk) | 494 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usbotg_clk) |
493 | _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) | 495 | _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) |
494 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) | 496 | _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) |
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c index 236f1495efa..42afc29a7da 100644 --- a/arch/arm/mach-imx/dma-v1.c +++ b/arch/arm/mach-imx/dma-v1.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/err.h> | ||
29 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
30 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
31 | #include <linux/scatterlist.h> | 32 | #include <linux/scatterlist.h> |
@@ -475,7 +476,6 @@ void imx_dma_enable(int channel) | |||
475 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | | 476 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | |
476 | CCR_ACRPT, DMA_CCR(channel)); | 477 | CCR_ACRPT, DMA_CCR(channel)); |
477 | 478 | ||
478 | #ifdef CONFIG_ARCH_MX2 | ||
479 | if ((cpu_is_mx21() || cpu_is_mx27()) && | 479 | if ((cpu_is_mx21() || cpu_is_mx27()) && |
480 | imxdma->sg && imx_dma_hw_chain(imxdma)) { | 480 | imxdma->sg && imx_dma_hw_chain(imxdma)) { |
481 | imxdma->sg = sg_next(imxdma->sg); | 481 | imxdma->sg = sg_next(imxdma->sg); |
@@ -487,7 +487,6 @@ void imx_dma_enable(int channel) | |||
487 | DMA_CCR(channel)); | 487 | DMA_CCR(channel)); |
488 | } | 488 | } |
489 | } | 489 | } |
490 | #endif | ||
491 | imxdma->in_use = 1; | 490 | imxdma->in_use = 1; |
492 | 491 | ||
493 | local_irq_restore(flags); | 492 | local_irq_restore(flags); |
@@ -518,7 +517,6 @@ void imx_dma_disable(int channel) | |||
518 | } | 517 | } |
519 | EXPORT_SYMBOL(imx_dma_disable); | 518 | EXPORT_SYMBOL(imx_dma_disable); |
520 | 519 | ||
521 | #ifdef CONFIG_ARCH_MX2 | ||
522 | static void imx_dma_watchdog(unsigned long chno) | 520 | static void imx_dma_watchdog(unsigned long chno) |
523 | { | 521 | { |
524 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; | 522 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; |
@@ -530,7 +528,6 @@ static void imx_dma_watchdog(unsigned long chno) | |||
530 | if (imxdma->err_handler) | 528 | if (imxdma->err_handler) |
531 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); | 529 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); |
532 | } | 530 | } |
533 | #endif | ||
534 | 531 | ||
535 | static irqreturn_t dma_err_handler(int irq, void *dev_id) | 532 | static irqreturn_t dma_err_handler(int irq, void *dev_id) |
536 | { | 533 | { |
@@ -654,10 +651,8 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id) | |||
654 | { | 651 | { |
655 | int i, disr; | 652 | int i, disr; |
656 | 653 | ||
657 | #ifdef CONFIG_ARCH_MX2 | ||
658 | if (cpu_is_mx21() || cpu_is_mx27()) | 654 | if (cpu_is_mx21() || cpu_is_mx27()) |
659 | dma_err_handler(irq, dev_id); | 655 | dma_err_handler(irq, dev_id); |
660 | #endif | ||
661 | 656 | ||
662 | disr = imx_dmav1_readl(DMA_DISR); | 657 | disr = imx_dmav1_readl(DMA_DISR); |
663 | 658 | ||
@@ -703,7 +698,6 @@ int imx_dma_request(int channel, const char *name) | |||
703 | imxdma->name = name; | 698 | imxdma->name = name; |
704 | local_irq_restore(flags); /* request_irq() can block */ | 699 | local_irq_restore(flags); /* request_irq() can block */ |
705 | 700 | ||
706 | #ifdef CONFIG_ARCH_MX2 | ||
707 | if (cpu_is_mx21() || cpu_is_mx27()) { | 701 | if (cpu_is_mx21() || cpu_is_mx27()) { |
708 | ret = request_irq(MX2x_INT_DMACH0 + channel, | 702 | ret = request_irq(MX2x_INT_DMACH0 + channel, |
709 | dma_irq_handler, 0, "DMA", NULL); | 703 | dma_irq_handler, 0, "DMA", NULL); |
@@ -717,7 +711,6 @@ int imx_dma_request(int channel, const char *name) | |||
717 | imxdma->watchdog.function = &imx_dma_watchdog; | 711 | imxdma->watchdog.function = &imx_dma_watchdog; |
718 | imxdma->watchdog.data = channel; | 712 | imxdma->watchdog.data = channel; |
719 | } | 713 | } |
720 | #endif | ||
721 | 714 | ||
722 | return ret; | 715 | return ret; |
723 | } | 716 | } |
@@ -744,10 +737,8 @@ void imx_dma_free(int channel) | |||
744 | imx_dma_disable(channel); | 737 | imx_dma_disable(channel); |
745 | imxdma->name = NULL; | 738 | imxdma->name = NULL; |
746 | 739 | ||
747 | #ifdef CONFIG_ARCH_MX2 | ||
748 | if (cpu_is_mx21() || cpu_is_mx27()) | 740 | if (cpu_is_mx21() || cpu_is_mx27()) |
749 | free_irq(MX2x_INT_DMACH0 + channel, NULL); | 741 | free_irq(MX2x_INT_DMACH0 + channel, NULL); |
750 | #endif | ||
751 | 742 | ||
752 | local_irq_restore(flags); | 743 | local_irq_restore(flags); |
753 | } | 744 | } |
@@ -803,21 +794,13 @@ static int __init imx_dma_init(void) | |||
803 | int ret = 0; | 794 | int ret = 0; |
804 | int i; | 795 | int i; |
805 | 796 | ||
806 | #ifdef CONFIG_ARCH_MX1 | ||
807 | if (cpu_is_mx1()) | 797 | if (cpu_is_mx1()) |
808 | imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); | 798 | imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); |
809 | else | 799 | else if (cpu_is_mx21()) |
810 | #endif | ||
811 | #ifdef CONFIG_MACH_MX21 | ||
812 | if (cpu_is_mx21()) | ||
813 | imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); | 800 | imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); |
814 | else | 801 | else if (cpu_is_mx27()) |
815 | #endif | ||
816 | #ifdef CONFIG_MACH_MX27 | ||
817 | if (cpu_is_mx27()) | ||
818 | imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); | 802 | imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); |
819 | else | 803 | else |
820 | #endif | ||
821 | return 0; | 804 | return 0; |
822 | 805 | ||
823 | dma_clk = clk_get(NULL, "dma"); | 806 | dma_clk = clk_get(NULL, "dma"); |
@@ -828,7 +811,6 @@ static int __init imx_dma_init(void) | |||
828 | /* reset DMA module */ | 811 | /* reset DMA module */ |
829 | imx_dmav1_writel(DCR_DRST, DMA_DCR); | 812 | imx_dmav1_writel(DCR_DRST, DMA_DCR); |
830 | 813 | ||
831 | #ifdef CONFIG_ARCH_MX1 | ||
832 | if (cpu_is_mx1()) { | 814 | if (cpu_is_mx1()) { |
833 | 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); |
834 | if (ret) { | 816 | if (ret) { |
@@ -843,7 +825,7 @@ static int __init imx_dma_init(void) | |||
843 | return ret; | 825 | return ret; |
844 | } | 826 | } |
845 | } | 827 | } |
846 | #endif | 828 | |
847 | /* enable DMA module */ | 829 | /* enable DMA module */ |
848 | imx_dmav1_writel(DCR_DEN, DMA_DCR); | 830 | imx_dmav1_writel(DCR_DEN, DMA_DCR); |
849 | 831 | ||
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index 5911281da5f..5db3e1463af 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 | ||
115 | static struct gpio_led gpio_leds[] = { | 115 | static 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 | ||
130 | static struct gpio_led_platform_data gpio_led_info = { | 130 | static 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 | |||
135 | static 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 | ||
143 | static struct imx_fb_videomode eukrea_mbimx27_modes[] = { | 136 | static 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 | ||
296 | static struct platform_device *platform_devices[] __initdata = { | ||
297 | &leds_gpio, | ||
298 | }; | ||
299 | |||
300 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { | 289 | static 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 f9ef04acdab..66e8726253f 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 | ||
176 | static struct gpio_led eukrea_mbimxsd_leds[] = { | 176 | static 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 | ||
185 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 185 | static 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 | ||
190 | static 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 | |||
198 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 191 | static 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 | ||
214 | static struct platform_device *platform_devices[] __initdata = { | 207 | static 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 | ||
@@ -233,7 +225,8 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | |||
233 | 225 | ||
234 | static struct esdhc_platform_data sd1_pdata = { | 226 | static struct esdhc_platform_data sd1_pdata = { |
235 | .cd_gpio = GPIO_SD1CD, | 227 | .cd_gpio = GPIO_SD1CD, |
236 | .wp_gpio = -EINVAL, | 228 | .cd_type = ESDHC_CD_GPIO, |
229 | .wp_type = ESDHC_WP_NONE, | ||
237 | }; | 230 | }; |
238 | 231 | ||
239 | /* | 232 | /* |
@@ -287,5 +280,6 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
287 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 280 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
288 | 281 | ||
289 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 282 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
283 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | ||
290 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 284 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
291 | } | 285 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c index 4909ea05855..0f0af02b318 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 | ||
196 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 196 | static 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 | ||
201 | static 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 | |||
209 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 202 | static 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 | ||
225 | static struct platform_device *platform_devices[] __initdata = { | 218 | static 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 | ||
@@ -244,7 +236,8 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | |||
244 | 236 | ||
245 | static struct esdhc_platform_data sd1_pdata = { | 237 | static struct esdhc_platform_data sd1_pdata = { |
246 | .cd_gpio = GPIO_SD1CD, | 238 | .cd_gpio = GPIO_SD1CD, |
247 | .wp_gpio = -EINVAL, | 239 | .cd_type = ESDHC_CD_GPIO, |
240 | .wp_type = ESDHC_WP_NONE, | ||
248 | }; | 241 | }; |
249 | 242 | ||
250 | /* | 243 | /* |
@@ -299,5 +292,6 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
299 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 292 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
300 | 293 | ||
301 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 294 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
295 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | ||
302 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 296 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
303 | } | 297 | } |
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index 15e45c84e37..a404c89485c 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 --- */ | ||
103 | static const struct imxuart_platform_data uart0_pdata __initconst = { | ||
104 | .flags = 0, | ||
105 | }; | ||
106 | |||
107 | static const struct imxuart_platform_data uart1_pdata __initconst = { | 102 | static const struct imxuart_platform_data uart1_pdata __initconst = { |
108 | .flags = IMXUART_HAVE_RTSCTS, | 103 | .flags = IMXUART_HAVE_RTSCTS, |
109 | }; | 104 | }; |
@@ -115,11 +110,13 @@ static struct platform_device *devices[] __initdata = { | |||
115 | 110 | ||
116 | static void __init apf9328_init(void) | 111 | static void __init apf9328_init(void) |
117 | { | 112 | { |
113 | imx1_soc_init(); | ||
114 | |||
118 | mxc_gpio_setup_multiple_pins(apf9328_pins, | 115 | mxc_gpio_setup_multiple_pins(apf9328_pins, |
119 | ARRAY_SIZE(apf9328_pins), | 116 | ARRAY_SIZE(apf9328_pins), |
120 | "APF9328"); | 117 | "APF9328"); |
121 | 118 | ||
122 | imx1_add_imx_uart0(&uart0_pdata); | 119 | imx1_add_imx_uart0(NULL); |
123 | imx1_add_imx_uart1(&uart1_pdata); | 120 | imx1_add_imx_uart1(&uart1_pdata); |
124 | 121 | ||
125 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 122 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index ffb40ff619b..ede2710f8b7 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -490,6 +490,8 @@ static struct platform_device *devices[] __initdata = { | |||
490 | */ | 490 | */ |
491 | static void __init armadillo5x0_init(void) | 491 | static void __init armadillo5x0_init(void) |
492 | { | 492 | { |
493 | imx31_soc_init(); | ||
494 | |||
493 | mxc_iomux_setup_multiple_pins(armadillo5x0_pins, | 495 | mxc_iomux_setup_multiple_pins(armadillo5x0_pins, |
494 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); | 496 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); |
495 | 497 | ||
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c index 42e4f078a19..f49470553bd 100644 --- a/arch/arm/mach-imx/mach-bug.c +++ b/arch/arm/mach-imx/mach-bug.c | |||
@@ -42,6 +42,8 @@ static const unsigned int bug_pins[] __initconst = { | |||
42 | 42 | ||
43 | static void __init bug_board_init(void) | 43 | static void __init bug_board_init(void) |
44 | { | 44 | { |
45 | imx31_soc_init(); | ||
46 | |||
45 | mxc_iomux_setup_multiple_pins(bug_pins, | 47 | mxc_iomux_setup_multiple_pins(bug_pins, |
46 | ARRAY_SIZE(bug_pins), "uart-4"); | 48 | ARRAY_SIZE(bug_pins), "uart-4"); |
47 | imx31_add_imx_uart4(&uart_pdata); | 49 | imx31_add_imx_uart4(&uart_pdata); |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 46a2e41d43d..f851fe90368 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -250,6 +250,8 @@ __setup("otg_mode=", eukrea_cpuimx27_otg_mode); | |||
250 | 250 | ||
251 | static void __init eukrea_cpuimx27_init(void) | 251 | static void __init eukrea_cpuimx27_init(void) |
252 | { | 252 | { |
253 | imx27_soc_init(); | ||
254 | |||
253 | mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins, | 255 | mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins, |
254 | ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27"); | 256 | ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27"); |
255 | 257 | ||
@@ -308,7 +310,7 @@ static struct sys_timer eukrea_cpuimx27_timer = { | |||
308 | .init = eukrea_cpuimx27_timer_init, | 310 | .init = eukrea_cpuimx27_timer_init, |
309 | }; | 311 | }; |
310 | 312 | ||
311 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") | 313 | MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") |
312 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 314 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
313 | .map_io = mx27_map_io, | 315 | .map_io = mx27_map_io, |
314 | .init_early = imx27_init_early, | 316 | .init_early = imx27_init_early, |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 3f8ef825fa6..4bd083ba9af 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -156,6 +156,8 @@ __setup("otg_mode=", eukrea_cpuimx35_otg_mode); | |||
156 | */ | 156 | */ |
157 | static void __init eukrea_cpuimx35_init(void) | 157 | static void __init eukrea_cpuimx35_init(void) |
158 | { | 158 | { |
159 | imx35_soc_init(); | ||
160 | |||
159 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads, | 161 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads, |
160 | ARRAY_SIZE(eukrea_cpuimx35_pads)); | 162 | ARRAY_SIZE(eukrea_cpuimx35_pads)); |
161 | 163 | ||
@@ -190,7 +192,7 @@ struct sys_timer eukrea_cpuimx35_timer = { | |||
190 | .init = eukrea_cpuimx35_timer_init, | 192 | .init = eukrea_cpuimx35_timer_init, |
191 | }; | 193 | }; |
192 | 194 | ||
193 | MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") | 195 | MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") |
194 | /* Maintainer: Eukrea Electromatique */ | 196 | /* Maintainer: Eukrea Electromatique */ |
195 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
196 | .map_io = mx35_map_io, | 198 | .map_io = mx35_map_io, |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index 148cff2819b..2442d5da883 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -125,6 +125,8 @@ __setup("otg_mode=", eukrea_cpuimx25_otg_mode); | |||
125 | 125 | ||
126 | static void __init eukrea_cpuimx25_init(void) | 126 | static void __init eukrea_cpuimx25_init(void) |
127 | { | 127 | { |
128 | imx25_soc_init(); | ||
129 | |||
128 | if (mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads, | 130 | if (mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads, |
129 | ARRAY_SIZE(eukrea_cpuimx25_pads))) | 131 | ARRAY_SIZE(eukrea_cpuimx25_pads))) |
130 | printk(KERN_ERR "error setting cpuimx25 pads !\n"); | 132 | printk(KERN_ERR "error setting cpuimx25 pads !\n"); |
@@ -159,7 +161,7 @@ static struct sys_timer eukrea_cpuimx25_timer = { | |||
159 | .init = eukrea_cpuimx25_timer_init, | 161 | .init = eukrea_cpuimx25_timer_init, |
160 | }; | 162 | }; |
161 | 163 | ||
162 | MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") | 164 | MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") |
163 | /* Maintainer: Eukrea Electromatique */ | 165 | /* Maintainer: Eukrea Electromatique */ |
164 | .boot_params = MX25_PHYS_OFFSET + 0x100, | 166 | .boot_params = MX25_PHYS_OFFSET + 0x100, |
165 | .map_io = mx25_map_io, | 167 | .map_io = mx25_map_io, |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 7ae43b1ec51..6778f8193bc 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -30,11 +30,12 @@ | |||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <sound/tlv320aic32x4.h> | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
36 | #include <mach/common.h> | 37 | #include <mach/common.h> |
37 | #include <mach/iomux.h> | 38 | #include <mach/iomux-mx27.h> |
38 | 39 | ||
39 | #include "devices-imx27.h" | 40 | #include "devices-imx27.h" |
40 | 41 | ||
@@ -196,6 +197,17 @@ static struct pca953x_platform_data visstrim_m10_pca9555_pdata = { | |||
196 | .invert = 0, | 197 | .invert = 0, |
197 | }; | 198 | }; |
198 | 199 | ||
200 | static struct aic32x4_pdata visstrim_m10_aic32x4_pdata = { | ||
201 | .power_cfg = AIC32X4_PWR_MICBIAS_2075_LDOIN | | ||
202 | AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE | | ||
203 | AIC32X4_PWR_AIC32X4_LDO_ENABLE | | ||
204 | AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36 | | ||
205 | AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED, | ||
206 | .micpga_routing = AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K | | ||
207 | AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K, | ||
208 | .swapdacs = false, | ||
209 | }; | ||
210 | |||
199 | static struct i2c_board_info visstrim_m10_i2c_devices[] = { | 211 | static struct i2c_board_info visstrim_m10_i2c_devices[] = { |
200 | { | 212 | { |
201 | I2C_BOARD_INFO("pca9555", 0x20), | 213 | I2C_BOARD_INFO("pca9555", 0x20), |
@@ -203,6 +215,7 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { | |||
203 | }, | 215 | }, |
204 | { | 216 | { |
205 | I2C_BOARD_INFO("tlv320aic32x4", 0x18), | 217 | I2C_BOARD_INFO("tlv320aic32x4", 0x18), |
218 | .platform_data = &visstrim_m10_aic32x4_pdata, | ||
206 | } | 219 | } |
207 | }; | 220 | }; |
208 | 221 | ||
@@ -231,6 +244,8 @@ static void __init visstrim_m10_board_init(void) | |||
231 | { | 244 | { |
232 | int ret; | 245 | int ret; |
233 | 246 | ||
247 | imx27_soc_init(); | ||
248 | |||
234 | ret = mxc_gpio_setup_multiple_pins(visstrim_m10_pins, | 249 | ret = mxc_gpio_setup_multiple_pins(visstrim_m10_pins, |
235 | ARRAY_SIZE(visstrim_m10_pins), "VISSTRIM_M10"); | 250 | ARRAY_SIZE(visstrim_m10_pins), "VISSTRIM_M10"); |
236 | if (ret) | 251 | if (ret) |
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c index 9be6cd6fbf8..272f793e924 100644 --- a/arch/arm/mach-imx/mach-imx27ipcam.c +++ b/arch/arm/mach-imx/mach-imx27ipcam.c | |||
@@ -50,6 +50,8 @@ static const int mx27ipcam_pins[] __initconst = { | |||
50 | 50 | ||
51 | static void __init mx27ipcam_init(void) | 51 | static void __init mx27ipcam_init(void) |
52 | { | 52 | { |
53 | imx27_soc_init(); | ||
54 | |||
53 | mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins), | 55 | mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins), |
54 | "mx27ipcam"); | 56 | "mx27ipcam"); |
55 | 57 | ||
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index 841140516ed..d81a769fe89 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -59,6 +59,8 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
59 | 59 | ||
60 | static void __init mx27lite_init(void) | 60 | static void __init mx27lite_init(void) |
61 | { | 61 | { |
62 | imx27_soc_init(); | ||
63 | |||
62 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), | 64 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), |
63 | "imx27lite"); | 65 | "imx27lite"); |
64 | imx27_add_imx_uart0(&uart_pdata); | 66 | imx27_add_imx_uart0(&uart_pdata); |
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index 1ecae20cf4e..e472a1d8805 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
@@ -223,6 +223,8 @@ static int kzm_pins[] __initdata = { | |||
223 | */ | 223 | */ |
224 | static void __init kzm_board_init(void) | 224 | static void __init kzm_board_init(void) |
225 | { | 225 | { |
226 | imx31_soc_init(); | ||
227 | |||
226 | mxc_iomux_setup_multiple_pins(kzm_pins, | 228 | mxc_iomux_setup_multiple_pins(kzm_pins, |
227 | ARRAY_SIZE(kzm_pins), "kzm"); | 229 | ARRAY_SIZE(kzm_pins), "kzm"); |
228 | kzm_init_ext_uart(); | 230 | kzm_init_ext_uart(); |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 38ec5cbbda9..5cd8bee4696 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -115,6 +115,8 @@ static struct i2c_board_info mx1ads_i2c_devices[] = { | |||
115 | */ | 115 | */ |
116 | static void __init mx1ads_init(void) | 116 | static void __init mx1ads_init(void) |
117 | { | 117 | { |
118 | imx1_soc_init(); | ||
119 | |||
118 | mxc_gpio_setup_multiple_pins(mx1ads_pins, | 120 | mxc_gpio_setup_multiple_pins(mx1ads_pins, |
119 | ARRAY_SIZE(mx1ads_pins), "mx1ads"); | 121 | ARRAY_SIZE(mx1ads_pins), "mx1ads"); |
120 | 122 | ||
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 74ac88978dd..d389ecf9b5a 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -279,6 +279,8 @@ static struct platform_device *platform_devices[] __initdata = { | |||
279 | 279 | ||
280 | static void __init mx21ads_board_init(void) | 280 | static void __init mx21ads_board_init(void) |
281 | { | 281 | { |
282 | imx21_soc_init(); | ||
283 | |||
282 | mxc_gpio_setup_multiple_pins(mx21ads_pins, ARRAY_SIZE(mx21ads_pins), | 284 | mxc_gpio_setup_multiple_pins(mx21ads_pins, ARRAY_SIZE(mx21ads_pins), |
283 | "mx21ads"); | 285 | "mx21ads"); |
284 | 286 | ||
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index 58ea3fdf091..7f66a91df36 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -215,10 +215,14 @@ static const struct imxi2c_platform_data mx25_3ds_i2c0_data __initconst = { | |||
215 | static const struct esdhc_platform_data mx25pdk_esdhc_pdata __initconst = { | 215 | static const struct esdhc_platform_data mx25pdk_esdhc_pdata __initconst = { |
216 | .wp_gpio = SD1_GPIO_WP, | 216 | .wp_gpio = SD1_GPIO_WP, |
217 | .cd_gpio = SD1_GPIO_CD, | 217 | .cd_gpio = SD1_GPIO_CD, |
218 | .wp_type = ESDHC_WP_GPIO, | ||
219 | .cd_type = ESDHC_CD_GPIO, | ||
218 | }; | 220 | }; |
219 | 221 | ||
220 | static void __init mx25pdk_init(void) | 222 | static void __init mx25pdk_init(void) |
221 | { | 223 | { |
224 | imx25_soc_init(); | ||
225 | |||
222 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, | 226 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, |
223 | ARRAY_SIZE(mx25pdk_pads)); | 227 | ARRAY_SIZE(mx25pdk_pads)); |
224 | 228 | ||
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 6e1accf93f8..6fa6934ab15 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/mfd/mc13783.h> | 29 | #include <linux/mfd/mc13783.h> |
30 | #include <linux/spi/spi.h> | 30 | #include <linux/spi/spi.h> |
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/spi/l4f00242t03.h> | ||
32 | 33 | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
@@ -42,10 +43,15 @@ | |||
42 | 43 | ||
43 | #include "devices-imx27.h" | 44 | #include "devices-imx27.h" |
44 | 45 | ||
45 | #define SD1_EN_GPIO (GPIO_PORTB + 25) | 46 | #define SD1_EN_GPIO IMX_GPIO_NR(2, 25) |
46 | #define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23) | 47 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) |
47 | #define SPI2_SS0 (GPIO_PORTD + 21) | 48 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) |
48 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTC + 28) | 49 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) |
50 | #define PMIC_INT IMX_GPIO_NR(3, 14) | ||
51 | #define SPI1_SS0 IMX_GPIO_NR(4, 28) | ||
52 | #define SD1_CD IMX_GPIO_NR(2, 26) | ||
53 | #define LCD_RESET IMX_GPIO_NR(1, 3) | ||
54 | #define LCD_ENABLE IMX_GPIO_NR(1, 31) | ||
49 | 55 | ||
50 | static const int mx27pdk_pins[] __initconst = { | 56 | static const int mx27pdk_pins[] __initconst = { |
51 | /* UART1 */ | 57 | /* UART1 */ |
@@ -94,13 +100,47 @@ static const int mx27pdk_pins[] __initconst = { | |||
94 | PE2_PF_USBOTG_DIR, | 100 | PE2_PF_USBOTG_DIR, |
95 | PE24_PF_USBOTG_CLK, | 101 | PE24_PF_USBOTG_CLK, |
96 | PE25_PF_USBOTG_DATA7, | 102 | PE25_PF_USBOTG_DATA7, |
103 | /* CSPI1 */ | ||
104 | PD31_PF_CSPI1_MOSI, | ||
105 | PD30_PF_CSPI1_MISO, | ||
106 | PD29_PF_CSPI1_SCLK, | ||
107 | PD25_PF_CSPI1_RDY, | ||
108 | SPI1_SS0 | GPIO_GPIO | GPIO_OUT, | ||
97 | /* CSPI2 */ | 109 | /* CSPI2 */ |
98 | PD22_PF_CSPI2_SCLK, | 110 | PD22_PF_CSPI2_SCLK, |
99 | PD23_PF_CSPI2_MISO, | 111 | PD23_PF_CSPI2_MISO, |
100 | PD24_PF_CSPI2_MOSI, | 112 | PD24_PF_CSPI2_MOSI, |
113 | SPI2_SS0 | GPIO_GPIO | GPIO_OUT, | ||
101 | /* I2C1 */ | 114 | /* I2C1 */ |
102 | PD17_PF_I2C_DATA, | 115 | PD17_PF_I2C_DATA, |
103 | PD18_PF_I2C_CLK, | 116 | PD18_PF_I2C_CLK, |
117 | /* PMIC INT */ | ||
118 | PMIC_INT | GPIO_GPIO | GPIO_IN, | ||
119 | /* LCD */ | ||
120 | PA5_PF_LSCLK, | ||
121 | PA6_PF_LD0, | ||
122 | PA7_PF_LD1, | ||
123 | PA8_PF_LD2, | ||
124 | PA9_PF_LD3, | ||
125 | PA10_PF_LD4, | ||
126 | PA11_PF_LD5, | ||
127 | PA12_PF_LD6, | ||
128 | PA13_PF_LD7, | ||
129 | PA14_PF_LD8, | ||
130 | PA15_PF_LD9, | ||
131 | PA16_PF_LD10, | ||
132 | PA17_PF_LD11, | ||
133 | PA18_PF_LD12, | ||
134 | PA19_PF_LD13, | ||
135 | PA20_PF_LD14, | ||
136 | PA21_PF_LD15, | ||
137 | PA22_PF_LD16, | ||
138 | PA23_PF_LD17, | ||
139 | PA28_PF_HSYNC, | ||
140 | PA29_PF_VSYNC, | ||
141 | PA30_PF_CONTRAST, | ||
142 | LCD_ENABLE | GPIO_GPIO | GPIO_OUT, | ||
143 | LCD_RESET | GPIO_GPIO | GPIO_OUT, | ||
104 | }; | 144 | }; |
105 | 145 | ||
106 | static const struct imxuart_platform_data uart_pdata __initconst = { | 146 | static const struct imxuart_platform_data uart_pdata __initconst = { |
@@ -131,13 +171,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = { | |||
131 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 171 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
132 | void *data) | 172 | void *data) |
133 | { | 173 | { |
134 | return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING | | 174 | return request_irq(gpio_to_irq(SD1_CD), detect_irq, |
135 | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); | 175 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); |
136 | } | 176 | } |
137 | 177 | ||
138 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) | 178 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) |
139 | { | 179 | { |
140 | free_irq(IRQ_GPIOB(26), data); | 180 | free_irq(gpio_to_irq(SD1_CD), data); |
141 | } | 181 | } |
142 | 182 | ||
143 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 183 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
@@ -193,6 +233,13 @@ static int __init mx27_3ds_otg_mode(char *options) | |||
193 | __setup("otg_mode=", mx27_3ds_otg_mode); | 233 | __setup("otg_mode=", mx27_3ds_otg_mode); |
194 | 234 | ||
195 | /* Regulators */ | 235 | /* Regulators */ |
236 | static struct regulator_init_data gpo_init = { | ||
237 | .constraints = { | ||
238 | .boot_on = 1, | ||
239 | .always_on = 1, | ||
240 | } | ||
241 | }; | ||
242 | |||
196 | static struct regulator_consumer_supply vmmc1_consumers[] = { | 243 | static struct regulator_consumer_supply vmmc1_consumers[] = { |
197 | REGULATOR_SUPPLY("lcd_2v8", NULL), | 244 | REGULATOR_SUPPLY("lcd_2v8", NULL), |
198 | }; | 245 | }; |
@@ -201,7 +248,9 @@ static struct regulator_init_data vmmc1_init = { | |||
201 | .constraints = { | 248 | .constraints = { |
202 | .min_uV = 2800000, | 249 | .min_uV = 2800000, |
203 | .max_uV = 2800000, | 250 | .max_uV = 2800000, |
204 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | 251 | .apply_uV = 1, |
252 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
253 | REGULATOR_CHANGE_STATUS, | ||
205 | }, | 254 | }, |
206 | .num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers), | 255 | .num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers), |
207 | .consumer_supplies = vmmc1_consumers, | 256 | .consumer_supplies = vmmc1_consumers, |
@@ -228,6 +277,12 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { | |||
228 | }, { | 277 | }, { |
229 | .id = MC13783_REG_VGEN, | 278 | .id = MC13783_REG_VGEN, |
230 | .init_data = &vgen_init, | 279 | .init_data = &vgen_init, |
280 | }, { | ||
281 | .id = MC13783_REG_GPO1, /* Turn on 1.8V */ | ||
282 | .init_data = &gpo_init, | ||
283 | }, { | ||
284 | .id = MC13783_REG_GPO3, /* Turn on 3.3V */ | ||
285 | .init_data = &gpo_init, | ||
231 | }, | 286 | }, |
232 | }; | 287 | }; |
233 | 288 | ||
@@ -238,15 +293,63 @@ static struct mc13xxx_platform_data mc13783_pdata = { | |||
238 | .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), | 293 | .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), |
239 | 294 | ||
240 | }, | 295 | }, |
241 | .flags = MC13783_USE_REGULATOR, | 296 | .flags = MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN | |
297 | MC13783_USE_RTC, | ||
242 | }; | 298 | }; |
243 | 299 | ||
244 | /* SPI */ | 300 | /* SPI */ |
245 | static int spi2_internal_chipselect[] = {SPI2_SS0}; | 301 | static int spi1_chipselect[] = {SPI1_SS0}; |
302 | |||
303 | static const struct spi_imx_master spi1_pdata __initconst = { | ||
304 | .chipselect = spi1_chipselect, | ||
305 | .num_chipselect = ARRAY_SIZE(spi1_chipselect), | ||
306 | }; | ||
307 | |||
308 | static int spi2_chipselect[] = {SPI2_SS0}; | ||
246 | 309 | ||
247 | static const struct spi_imx_master spi2_pdata __initconst = { | 310 | static const struct spi_imx_master spi2_pdata __initconst = { |
248 | .chipselect = spi2_internal_chipselect, | 311 | .chipselect = spi2_chipselect, |
249 | .num_chipselect = ARRAY_SIZE(spi2_internal_chipselect), | 312 | .num_chipselect = ARRAY_SIZE(spi2_chipselect), |
313 | }; | ||
314 | |||
315 | static struct imx_fb_videomode mx27_3ds_modes[] = { | ||
316 | { /* 480x640 @ 60 Hz */ | ||
317 | .mode = { | ||
318 | .name = "Epson-VGA", | ||
319 | .refresh = 60, | ||
320 | .xres = 480, | ||
321 | .yres = 640, | ||
322 | .pixclock = 41701, | ||
323 | .left_margin = 20, | ||
324 | .right_margin = 41, | ||
325 | .upper_margin = 10, | ||
326 | .lower_margin = 5, | ||
327 | .hsync_len = 20, | ||
328 | .vsync_len = 10, | ||
329 | .sync = FB_SYNC_OE_ACT_HIGH | | ||
330 | FB_SYNC_CLK_INVERT, | ||
331 | .vmode = FB_VMODE_NONINTERLACED, | ||
332 | .flag = 0, | ||
333 | }, | ||
334 | .bpp = 16, | ||
335 | .pcr = 0xFAC08B82, | ||
336 | }, | ||
337 | }; | ||
338 | |||
339 | static const struct imx_fb_platform_data mx27_3ds_fb_data __initconst = { | ||
340 | .mode = mx27_3ds_modes, | ||
341 | .num_modes = ARRAY_SIZE(mx27_3ds_modes), | ||
342 | .pwmr = 0x00A903FF, | ||
343 | .lscr1 = 0x00120300, | ||
344 | .dmacr = 0x00020010, | ||
345 | }; | ||
346 | |||
347 | /* LCD */ | ||
348 | static struct l4f00242t03_pdata mx27_3ds_lcd_pdata = { | ||
349 | .reset_gpio = LCD_RESET, | ||
350 | .data_enable_gpio = LCD_ENABLE, | ||
351 | .core_supply = "lcd_2v8", | ||
352 | .io_supply = "vdd_lcdio", | ||
250 | }; | 353 | }; |
251 | 354 | ||
252 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | 355 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { |
@@ -256,8 +359,14 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
256 | .bus_num = 1, | 359 | .bus_num = 1, |
257 | .chip_select = 0, /* SS0 */ | 360 | .chip_select = 0, /* SS0 */ |
258 | .platform_data = &mc13783_pdata, | 361 | .platform_data = &mc13783_pdata, |
259 | .irq = IRQ_GPIOC(14), | 362 | .irq = gpio_to_irq(PMIC_INT), |
260 | .mode = SPI_CS_HIGH, | 363 | .mode = SPI_CS_HIGH, |
364 | }, { | ||
365 | .modalias = "l4f00242t03", | ||
366 | .max_speed_hz = 5000000, | ||
367 | .bus_num = 0, | ||
368 | .chip_select = 0, /* SS0 */ | ||
369 | .platform_data = &mx27_3ds_lcd_pdata, | ||
261 | }, | 370 | }, |
262 | }; | 371 | }; |
263 | 372 | ||
@@ -267,6 +376,8 @@ static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = { | |||
267 | 376 | ||
268 | static void __init mx27pdk_init(void) | 377 | static void __init mx27pdk_init(void) |
269 | { | 378 | { |
379 | imx27_soc_init(); | ||
380 | |||
270 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | 381 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), |
271 | "mx27pdk"); | 382 | "mx27pdk"); |
272 | mx27_3ds_sdhc1_enable_level_translator(); | 383 | mx27_3ds_sdhc1_enable_level_translator(); |
@@ -289,12 +400,14 @@ static void __init mx27pdk_init(void) | |||
289 | imx27_add_fsl_usb2_udc(&otg_device_pdata); | 400 | imx27_add_fsl_usb2_udc(&otg_device_pdata); |
290 | 401 | ||
291 | imx27_add_spi_imx1(&spi2_pdata); | 402 | imx27_add_spi_imx1(&spi2_pdata); |
403 | imx27_add_spi_imx0(&spi1_pdata); | ||
292 | spi_register_board_info(mx27_3ds_spi_devs, | 404 | spi_register_board_info(mx27_3ds_spi_devs, |
293 | ARRAY_SIZE(mx27_3ds_spi_devs)); | 405 | ARRAY_SIZE(mx27_3ds_spi_devs)); |
294 | 406 | ||
295 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 407 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
296 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); | 408 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); |
297 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); | 409 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); |
410 | imx27_add_imx_fb(&mx27_3ds_fb_data); | ||
298 | } | 411 | } |
299 | 412 | ||
300 | static void __init mx27pdk_timer_init(void) | 413 | static void __init mx27pdk_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 1db79506f5e..fc26ed71b9e 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -288,6 +288,8 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
288 | 288 | ||
289 | static void __init mx27ads_board_init(void) | 289 | static void __init mx27ads_board_init(void) |
290 | { | 290 | { |
291 | imx27_soc_init(); | ||
292 | |||
291 | mxc_gpio_setup_multiple_pins(mx27ads_pins, ARRAY_SIZE(mx27ads_pins), | 293 | mxc_gpio_setup_multiple_pins(mx27ads_pins, ARRAY_SIZE(mx27ads_pins), |
292 | "mx27ads"); | 294 | "mx27ads"); |
293 | 295 | ||
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 9b982449cb5..c20be753092 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/dma-mapping.h> | ||
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
@@ -53,11 +54,8 @@ static int mx31_3ds_pins[] = { | |||
53 | MX31_PIN_RXD1__RXD1, | 54 | MX31_PIN_RXD1__RXD1, |
54 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), | 55 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), |
55 | /*SPI0*/ | 56 | /*SPI0*/ |
56 | MX31_PIN_CSPI1_SCLK__SCLK, | 57 | IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_ALT1), |
57 | MX31_PIN_CSPI1_MOSI__MOSI, | 58 | IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_ALT1), |
58 | MX31_PIN_CSPI1_MISO__MISO, | ||
59 | MX31_PIN_CSPI1_SPI_RDY__SPI_RDY, | ||
60 | MX31_PIN_CSPI1_SS2__SS2, /* CS for LCD */ | ||
61 | /* SPI 1 */ | 59 | /* SPI 1 */ |
62 | MX31_PIN_CSPI2_SCLK__SCLK, | 60 | MX31_PIN_CSPI2_SCLK__SCLK, |
63 | MX31_PIN_CSPI2_MOSI__MOSI, | 61 | MX31_PIN_CSPI2_MOSI__MOSI, |
@@ -689,6 +687,11 @@ static void __init mx31_3ds_init(void) | |||
689 | { | 687 | { |
690 | int ret; | 688 | int ret; |
691 | 689 | ||
690 | imx31_soc_init(); | ||
691 | |||
692 | /* Configure SPI1 IOMUX */ | ||
693 | mxc_iomux_set_gpr(MUX_PGP_CSPI_BB, true); | ||
694 | |||
692 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), | 695 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), |
693 | "mx31_3ds"); | 696 | "mx31_3ds"); |
694 | 697 | ||
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index f4dee025463..29ca8907a78 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -468,7 +468,7 @@ static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { | |||
468 | #endif | 468 | #endif |
469 | }; | 469 | }; |
470 | 470 | ||
471 | static void mxc_init_i2c(void) | 471 | static void __init mxc_init_i2c(void) |
472 | { | 472 | { |
473 | i2c_register_board_info(1, mx31ads_i2c1_devices, | 473 | i2c_register_board_info(1, mx31ads_i2c1_devices, |
474 | ARRAY_SIZE(mx31ads_i2c1_devices)); | 474 | ARRAY_SIZE(mx31ads_i2c1_devices)); |
@@ -486,7 +486,7 @@ static unsigned int ssi_pins[] = { | |||
486 | MX31_PIN_STXD5__STXD5, | 486 | MX31_PIN_STXD5__STXD5, |
487 | }; | 487 | }; |
488 | 488 | ||
489 | static void mxc_init_audio(void) | 489 | static void __init mxc_init_audio(void) |
490 | { | 490 | { |
491 | imx31_add_imx_ssi(0, NULL); | 491 | imx31_add_imx_ssi(0, NULL); |
492 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); | 492 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); |
@@ -516,6 +516,8 @@ static void __init mx31ads_init_irq(void) | |||
516 | 516 | ||
517 | static void __init mx31ads_init(void) | 517 | static void __init mx31ads_init(void) |
518 | { | 518 | { |
519 | imx31_soc_init(); | ||
520 | |||
519 | mxc_init_extuart(); | 521 | mxc_init_extuart(); |
520 | mxc_init_imx_uart(); | 522 | mxc_init_imx_uart(); |
521 | mxc_init_i2c(); | 523 | mxc_init_i2c(); |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 410e676ae08..126913ad106 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -192,7 +192,7 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = { | |||
192 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 192 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | static void lilly1131_usb_init(void) | 195 | static void __init lilly1131_usb_init(void) |
196 | { | 196 | { |
197 | imx31_add_mxc_ehci_hs(1, &usbh1_pdata); | 197 | imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
198 | 198 | ||
@@ -243,6 +243,8 @@ core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); | |||
243 | 243 | ||
244 | static void __init mx31lilly_board_init(void) | 244 | static void __init mx31lilly_board_init(void) |
245 | { | 245 | { |
246 | imx31_soc_init(); | ||
247 | |||
246 | switch (mx31lilly_baseboard) { | 248 | switch (mx31lilly_baseboard) { |
247 | case MX31LILLY_NOBOARD: | 249 | case MX31LILLY_NOBOARD: |
248 | break; | 250 | break; |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index ac9b4cad320..4b47fd9fdd8 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -230,6 +230,8 @@ static void __init mx31lite_init(void) | |||
230 | { | 230 | { |
231 | int ret; | 231 | int ret; |
232 | 232 | ||
233 | imx31_soc_init(); | ||
234 | |||
233 | switch (mx31lite_baseboard) { | 235 | switch (mx31lite_baseboard) { |
234 | case MX31LITE_NOBOARD: | 236 | case MX31LITE_NOBOARD: |
235 | break; | 237 | break; |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index eaa51e49ca9..b358383120e 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 | ||
428 | static struct gpio_led mx31moboard_leds[] = { | 428 | static 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 | ||
445 | static struct gpio_led_platform_data mx31moboard_led_pdata = { | 445 | static 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 | ||
450 | static struct platform_device mx31moboard_leds_device = { | ||
451 | .name = "leds-gpio", | ||
452 | .id = -1, | ||
453 | .dev = { | ||
454 | .platform_data = &mx31moboard_led_pdata, | ||
455 | }, | ||
456 | }; | ||
457 | |||
458 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | 450 | static 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 | ||
462 | static struct platform_device *devices[] __initdata = { | 454 | static struct platform_device *devices[] __initdata = { |
463 | &mx31moboard_flash, | 455 | &mx31moboard_flash, |
464 | &mx31moboard_leds_device, | ||
465 | }; | 456 | }; |
466 | 457 | ||
467 | static struct mx3_camera_pdata camera_pdata __initdata = { | 458 | static struct mx3_camera_pdata camera_pdata __initdata = { |
@@ -507,10 +498,13 @@ core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); | |||
507 | */ | 498 | */ |
508 | static void __init mx31moboard_init(void) | 499 | static void __init mx31moboard_init(void) |
509 | { | 500 | { |
501 | imx31_soc_init(); | ||
502 | |||
510 | mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins), | 503 | mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins), |
511 | "moboard"); | 504 | "moboard"); |
512 | 505 | ||
513 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 506 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
507 | gpio_led_register_device(-1, &mx31moboard_led_pdata); | ||
514 | 508 | ||
515 | imx31_add_imx_uart0(&uart0_pdata); | 509 | imx31_add_imx_uart0(&uart0_pdata); |
516 | 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 882880ac1bb..b3b9bd8ac2a 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 | ||
48 | static const struct imxuart_platform_data uart_pdata __initconst = { | 48 | static const struct imxuart_platform_data uart_pdata __initconst = { |
49 | .flags = IMXUART_HAVE_RTSCTS, | 49 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -179,6 +179,8 @@ static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = { | |||
179 | */ | 179 | */ |
180 | static void __init mx35_3ds_init(void) | 180 | static void __init mx35_3ds_init(void) |
181 | { | 181 | { |
182 | imx35_soc_init(); | ||
183 | |||
182 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 184 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
183 | 185 | ||
184 | imx35_add_fec(NULL); | 186 | imx35_add_fec(NULL); |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index 2774541511e..c85876fed66 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -233,6 +233,8 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
233 | 233 | ||
234 | static void __init mxt_td60_board_init(void) | 234 | static void __init mxt_td60_board_init(void) |
235 | { | 235 | { |
236 | imx27_soc_init(); | ||
237 | |||
236 | mxc_gpio_setup_multiple_pins(mxt_td60_pins, ARRAY_SIZE(mxt_td60_pins), | 238 | mxc_gpio_setup_multiple_pins(mxt_td60_pins, ARRAY_SIZE(mxt_td60_pins), |
237 | "MXT_TD60"); | 239 | "MXT_TD60"); |
238 | 240 | ||
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index bbddc5a11c4..71083aa1603 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -357,6 +357,8 @@ static void __init pca100_init(void) | |||
357 | { | 357 | { |
358 | int ret; | 358 | int ret; |
359 | 359 | ||
360 | imx27_soc_init(); | ||
361 | |||
360 | /* SSI unit */ | 362 | /* SSI unit */ |
361 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, | 363 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, |
362 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | 364 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 89c213b8129..f45b7cd72c8 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -576,6 +576,8 @@ static void __init pcm037_init(void) | |||
576 | { | 576 | { |
577 | int ret; | 577 | int ret; |
578 | 578 | ||
579 | imx31_soc_init(); | ||
580 | |||
579 | mxc_iomux_set_gpr(MUX_PGP_UH2, 1); | 581 | mxc_iomux_set_gpr(MUX_PGP_UH2, 1); |
580 | 582 | ||
581 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), | 583 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 853bb871c7e..2d6a64bbac4 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -295,6 +295,8 @@ static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { | |||
295 | 295 | ||
296 | static void __init pcm038_init(void) | 296 | static void __init pcm038_init(void) |
297 | { | 297 | { |
298 | imx27_soc_init(); | ||
299 | |||
298 | mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), | 300 | mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), |
299 | "PCM038"); | 301 | "PCM038"); |
300 | 302 | ||
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 026441628df..660ec3e80cf 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -349,6 +349,8 @@ __setup("otg_mode=", pcm043_otg_mode); | |||
349 | static struct esdhc_platform_data sd1_pdata = { | 349 | static struct esdhc_platform_data sd1_pdata = { |
350 | .wp_gpio = SD1_GPIO_WP, | 350 | .wp_gpio = SD1_GPIO_WP, |
351 | .cd_gpio = SD1_GPIO_CD, | 351 | .cd_gpio = SD1_GPIO_CD, |
352 | .wp_type = ESDHC_WP_GPIO, | ||
353 | .cd_type = ESDHC_CD_GPIO, | ||
352 | }; | 354 | }; |
353 | 355 | ||
354 | /* | 356 | /* |
@@ -356,6 +358,8 @@ static struct esdhc_platform_data sd1_pdata = { | |||
356 | */ | 358 | */ |
357 | static void __init pcm043_init(void) | 359 | static void __init pcm043_init(void) |
358 | { | 360 | { |
361 | imx35_soc_init(); | ||
362 | |||
359 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); | 363 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); |
360 | 364 | ||
361 | mxc_audmux_v2_configure_port(3, | 365 | mxc_audmux_v2_configure_port(3, |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index c1632871593..3626f486498 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
@@ -244,6 +244,8 @@ static void __init qong_init_fpga(void) | |||
244 | */ | 244 | */ |
245 | static void __init qong_init(void) | 245 | static void __init qong_init(void) |
246 | { | 246 | { |
247 | imx31_soc_init(); | ||
248 | |||
247 | mxc_init_imx_uart(); | 249 | mxc_init_imx_uart(); |
248 | qong_init_nor_mtd(); | 250 | qong_init_nor_mtd(); |
249 | qong_init_fpga(); | 251 | qong_init_fpga(); |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index dcaee043628..db2d60470e1 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 | ||
104 | static 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 | |||
110 | static 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 | |||
116 | static const struct imxuart_platform_data uart_pdata __initconst = { | 104 | static 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 | ||
@@ -129,6 +115,11 @@ static struct platform_device *devices[] __initdata = { | |||
129 | */ | 115 | */ |
130 | static void __init scb9328_init(void) | 116 | static void __init scb9328_init(void) |
131 | { | 117 | { |
118 | imx1_soc_init(); | ||
119 | |||
120 | mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
121 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
122 | |||
132 | imx1_add_imx_uart0(&uart_pdata); | 123 | imx1_add_imx_uart0(&uart_pdata); |
133 | 124 | ||
134 | printk(KERN_INFO"Scb9328: Adding devices\n"); | 125 | printk(KERN_INFO"Scb9328: Adding devices\n"); |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index d74e3473d23..7d8e012a633 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -267,6 +267,8 @@ static struct platform_device *devices[] __initdata = { | |||
267 | */ | 267 | */ |
268 | static void __init vpr200_board_init(void) | 268 | static void __init vpr200_board_init(void) |
269 | { | 269 | { |
270 | imx35_soc_init(); | ||
271 | |||
270 | mxc_iomux_v3_setup_multiple_pads(vpr200_pads, ARRAY_SIZE(vpr200_pads)); | 272 | mxc_iomux_v3_setup_multiple_pads(vpr200_pads, ARRAY_SIZE(vpr200_pads)); |
271 | 273 | ||
272 | imx35_add_fec(NULL); | 274 | imx35_add_fec(NULL); |
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c index 2e482ba5a0e..2bded591d5c 100644 --- a/arch/arm/mach-imx/mm-imx1.c +++ b/arch/arm/mach-imx/mm-imx1.c | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #include <mach/common.h> | 24 | #include <mach/common.h> |
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <mach/gpio.h> | ||
27 | #include <mach/irqs.h> | 26 | #include <mach/irqs.h> |
28 | #include <mach/iomux-v1.h> | 27 | #include <mach/iomux-v1.h> |
29 | 28 | ||
@@ -44,15 +43,19 @@ void __init imx1_init_early(void) | |||
44 | MX1_NUM_GPIO_PORT); | 43 | MX1_NUM_GPIO_PORT); |
45 | } | 44 | } |
46 | 45 | ||
47 | static struct mxc_gpio_port imx1_gpio_ports[] = { | ||
48 | DEFINE_IMX_GPIO_PORT_IRQ(MX1, 0, 1, MX1_GPIO_INT_PORTA), | ||
49 | DEFINE_IMX_GPIO_PORT_IRQ(MX1, 1, 2, MX1_GPIO_INT_PORTB), | ||
50 | DEFINE_IMX_GPIO_PORT_IRQ(MX1, 2, 3, MX1_GPIO_INT_PORTC), | ||
51 | DEFINE_IMX_GPIO_PORT_IRQ(MX1, 3, 4, MX1_GPIO_INT_PORTD), | ||
52 | }; | ||
53 | |||
54 | void __init mx1_init_irq(void) | 46 | void __init mx1_init_irq(void) |
55 | { | 47 | { |
56 | mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR)); | 48 | mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR)); |
57 | mxc_gpio_init(imx1_gpio_ports, ARRAY_SIZE(imx1_gpio_ports)); | 49 | } |
50 | |||
51 | void __init imx1_soc_init(void) | ||
52 | { | ||
53 | mxc_register_gpio("imx1-gpio", 0, MX1_GPIO1_BASE_ADDR, SZ_256, | ||
54 | MX1_GPIO_INT_PORTA, 0); | ||
55 | mxc_register_gpio("imx1-gpio", 1, MX1_GPIO2_BASE_ADDR, SZ_256, | ||
56 | MX1_GPIO_INT_PORTB, 0); | ||
57 | mxc_register_gpio("imx1-gpio", 2, MX1_GPIO3_BASE_ADDR, SZ_256, | ||
58 | MX1_GPIO_INT_PORTC, 0); | ||
59 | mxc_register_gpio("imx1-gpio", 3, MX1_GPIO4_BASE_ADDR, SZ_256, | ||
60 | MX1_GPIO_INT_PORTD, 0); | ||
58 | } | 61 | } |
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c index 7a0c500ac2c..3f05dfebacc 100644 --- a/arch/arm/mach-imx/mm-imx21.c +++ b/arch/arm/mach-imx/mm-imx21.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/common.h> | 24 | #include <mach/common.h> |
25 | #include <mach/devices-common.h> | ||
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <mach/gpio.h> | ||
28 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
29 | #include <mach/iomux-v1.h> | 29 | #include <mach/iomux-v1.h> |
30 | 30 | ||
@@ -70,17 +70,19 @@ void __init imx21_init_early(void) | |||
70 | MX21_NUM_GPIO_PORT); | 70 | MX21_NUM_GPIO_PORT); |
71 | } | 71 | } |
72 | 72 | ||
73 | static struct mxc_gpio_port imx21_gpio_ports[] = { | ||
74 | DEFINE_IMX_GPIO_PORT_IRQ(MX21, 0, 1, MX21_INT_GPIO), | ||
75 | DEFINE_IMX_GPIO_PORT(MX21, 1, 2), | ||
76 | DEFINE_IMX_GPIO_PORT(MX21, 2, 3), | ||
77 | DEFINE_IMX_GPIO_PORT(MX21, 3, 4), | ||
78 | DEFINE_IMX_GPIO_PORT(MX21, 4, 5), | ||
79 | DEFINE_IMX_GPIO_PORT(MX21, 5, 6), | ||
80 | }; | ||
81 | |||
82 | void __init mx21_init_irq(void) | 73 | void __init mx21_init_irq(void) |
83 | { | 74 | { |
84 | mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); | 75 | mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); |
85 | mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports)); | 76 | } |
77 | |||
78 | void __init imx21_soc_init(void) | ||
79 | { | ||
80 | mxc_register_gpio("imx21-gpio", 0, MX21_GPIO1_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | ||
81 | mxc_register_gpio("imx21-gpio", 1, MX21_GPIO2_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | ||
82 | mxc_register_gpio("imx21-gpio", 2, MX21_GPIO3_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | ||
83 | mxc_register_gpio("imx21-gpio", 3, MX21_GPIO4_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | ||
84 | mxc_register_gpio("imx21-gpio", 4, MX21_GPIO5_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | ||
85 | mxc_register_gpio("imx21-gpio", 5, MX21_GPIO6_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | ||
86 | |||
87 | imx_add_imx_dma(); | ||
86 | } | 88 | } |
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c index 02f7b5c7fa8..cc4d152bd9b 100644 --- a/arch/arm/mach-imx/mm-imx25.c +++ b/arch/arm/mach-imx/mm-imx25.c | |||
@@ -24,10 +24,10 @@ | |||
24 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
25 | 25 | ||
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/devices-common.h> | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <mach/mx25.h> | 29 | #include <mach/mx25.h> |
29 | #include <mach/iomux-v3.h> | 30 | #include <mach/iomux-v3.h> |
30 | #include <mach/gpio.h> | ||
31 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
32 | 32 | ||
33 | /* | 33 | /* |
@@ -57,16 +57,40 @@ void __init imx25_init_early(void) | |||
57 | mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR)); | 57 | mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR)); |
58 | } | 58 | } |
59 | 59 | ||
60 | static struct mxc_gpio_port imx25_gpio_ports[] = { | ||
61 | DEFINE_IMX_GPIO_PORT_IRQ(MX25, 0, 1, MX25_INT_GPIO1), | ||
62 | DEFINE_IMX_GPIO_PORT_IRQ(MX25, 1, 2, MX25_INT_GPIO2), | ||
63 | DEFINE_IMX_GPIO_PORT_IRQ(MX25, 2, 3, MX25_INT_GPIO3), | ||
64 | DEFINE_IMX_GPIO_PORT_IRQ(MX25, 3, 4, MX25_INT_GPIO4), | ||
65 | }; | ||
66 | |||
67 | void __init mx25_init_irq(void) | 60 | void __init mx25_init_irq(void) |
68 | { | 61 | { |
69 | mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR)); | 62 | mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR)); |
70 | mxc_gpio_init(imx25_gpio_ports, ARRAY_SIZE(imx25_gpio_ports)); | ||
71 | } | 63 | } |
72 | 64 | ||
65 | static struct sdma_script_start_addrs imx25_sdma_script __initdata = { | ||
66 | .ap_2_ap_addr = 729, | ||
67 | .uart_2_mcu_addr = 904, | ||
68 | .per_2_app_addr = 1255, | ||
69 | .mcu_2_app_addr = 834, | ||
70 | .uartsh_2_mcu_addr = 1120, | ||
71 | .per_2_shp_addr = 1329, | ||
72 | .mcu_2_shp_addr = 1048, | ||
73 | .ata_2_mcu_addr = 1560, | ||
74 | .mcu_2_ata_addr = 1479, | ||
75 | .app_2_per_addr = 1189, | ||
76 | .app_2_mcu_addr = 770, | ||
77 | .shp_2_per_addr = 1407, | ||
78 | .shp_2_mcu_addr = 979, | ||
79 | }; | ||
80 | |||
81 | static struct sdma_platform_data imx25_sdma_pdata __initdata = { | ||
82 | .fw_name = "sdma-imx25.bin", | ||
83 | .script_addrs = &imx25_sdma_script, | ||
84 | }; | ||
85 | |||
86 | void __init imx25_soc_init(void) | ||
87 | { | ||
88 | /* i.mx25 has the i.mx31 type gpio */ | ||
89 | mxc_register_gpio("imx31-gpio", 0, MX25_GPIO1_BASE_ADDR, SZ_16K, MX25_INT_GPIO1, 0); | ||
90 | mxc_register_gpio("imx31-gpio", 1, MX25_GPIO2_BASE_ADDR, SZ_16K, MX25_INT_GPIO2, 0); | ||
91 | mxc_register_gpio("imx31-gpio", 2, MX25_GPIO3_BASE_ADDR, SZ_16K, MX25_INT_GPIO3, 0); | ||
92 | mxc_register_gpio("imx31-gpio", 3, MX25_GPIO4_BASE_ADDR, SZ_16K, MX25_INT_GPIO4, 0); | ||
93 | |||
94 | /* i.mx25 has the i.mx35 type sdma */ | ||
95 | imx_add_imx_sdma("imx35-sdma", MX25_SDMA_BASE_ADDR, MX25_INT_SDMA, &imx25_sdma_pdata); | ||
96 | } | ||
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index a6761a39f08..96dd1f5ea7b 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/common.h> | 24 | #include <mach/common.h> |
25 | #include <mach/devices-common.h> | ||
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <mach/gpio.h> | ||
28 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
29 | #include <mach/iomux-v1.h> | 29 | #include <mach/iomux-v1.h> |
30 | 30 | ||
@@ -70,17 +70,20 @@ void __init imx27_init_early(void) | |||
70 | MX27_NUM_GPIO_PORT); | 70 | MX27_NUM_GPIO_PORT); |
71 | } | 71 | } |
72 | 72 | ||
73 | static struct mxc_gpio_port imx27_gpio_ports[] = { | ||
74 | DEFINE_IMX_GPIO_PORT_IRQ(MX27, 0, 1, MX27_INT_GPIO), | ||
75 | DEFINE_IMX_GPIO_PORT(MX27, 1, 2), | ||
76 | DEFINE_IMX_GPIO_PORT(MX27, 2, 3), | ||
77 | DEFINE_IMX_GPIO_PORT(MX27, 3, 4), | ||
78 | DEFINE_IMX_GPIO_PORT(MX27, 4, 5), | ||
79 | DEFINE_IMX_GPIO_PORT(MX27, 5, 6), | ||
80 | }; | ||
81 | |||
82 | void __init mx27_init_irq(void) | 73 | void __init mx27_init_irq(void) |
83 | { | 74 | { |
84 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); | 75 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); |
85 | mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); | 76 | } |
77 | |||
78 | void __init imx27_soc_init(void) | ||
79 | { | ||
80 | /* i.mx27 has the i.mx21 type gpio */ | ||
81 | mxc_register_gpio("imx21-gpio", 0, MX27_GPIO1_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | ||
82 | mxc_register_gpio("imx21-gpio", 1, MX27_GPIO2_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | ||
83 | mxc_register_gpio("imx21-gpio", 2, MX27_GPIO3_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | ||
84 | mxc_register_gpio("imx21-gpio", 3, MX27_GPIO4_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | ||
85 | mxc_register_gpio("imx21-gpio", 4, MX27_GPIO5_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | ||
86 | mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | ||
87 | |||
88 | imx_add_imx_dma(); | ||
86 | } | 89 | } |
diff --git a/arch/arm/mach-imx/mm-imx31.c b/arch/arm/mach-imx/mm-imx31.c index 86b9b45864d..b7c55e7db00 100644 --- a/arch/arm/mach-imx/mm-imx31.c +++ b/arch/arm/mach-imx/mm-imx31.c | |||
@@ -24,9 +24,9 @@ | |||
24 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
25 | 25 | ||
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/devices-common.h> | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <mach/iomux-v3.h> | 29 | #include <mach/iomux-v3.h> |
29 | #include <mach/gpio.h> | ||
30 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
31 | 31 | ||
32 | static struct map_desc mx31_io_desc[] __initdata = { | 32 | static struct map_desc mx31_io_desc[] __initdata = { |
@@ -53,14 +53,39 @@ void __init imx31_init_early(void) | |||
53 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | 53 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); |
54 | } | 54 | } |
55 | 55 | ||
56 | static struct mxc_gpio_port imx31_gpio_ports[] = { | ||
57 | DEFINE_IMX_GPIO_PORT_IRQ(MX31, 0, 1, MX31_INT_GPIO1), | ||
58 | DEFINE_IMX_GPIO_PORT_IRQ(MX31, 1, 2, MX31_INT_GPIO2), | ||
59 | DEFINE_IMX_GPIO_PORT_IRQ(MX31, 2, 3, MX31_INT_GPIO3), | ||
60 | }; | ||
61 | |||
62 | void __init mx31_init_irq(void) | 56 | void __init mx31_init_irq(void) |
63 | { | 57 | { |
64 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); | 58 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); |
65 | mxc_gpio_init(imx31_gpio_ports, ARRAY_SIZE(imx31_gpio_ports)); | 59 | } |
60 | |||
61 | static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = { | ||
62 | .per_2_per_addr = 1677, | ||
63 | }; | ||
64 | |||
65 | static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = { | ||
66 | .ap_2_ap_addr = 423, | ||
67 | .ap_2_bp_addr = 829, | ||
68 | .bp_2_ap_addr = 1029, | ||
69 | }; | ||
70 | |||
71 | static struct sdma_platform_data imx31_sdma_pdata __initdata = { | ||
72 | .fw_name = "sdma-imx31-to2.bin", | ||
73 | .script_addrs = &imx31_to2_sdma_script, | ||
74 | }; | ||
75 | |||
76 | void __init imx31_soc_init(void) | ||
77 | { | ||
78 | int to_version = mx31_revision() >> 4; | ||
79 | |||
80 | mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0); | ||
81 | mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0); | ||
82 | mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0); | ||
83 | |||
84 | if (to_version == 1) { | ||
85 | strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin", | ||
86 | strlen(imx31_sdma_pdata.fw_name)); | ||
87 | imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script; | ||
88 | } | ||
89 | |||
90 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); | ||
66 | } | 91 | } |
diff --git a/arch/arm/mach-imx/mm-imx35.c b/arch/arm/mach-imx/mm-imx35.c index c880e6d1ae5..f49bac7a1ed 100644 --- a/arch/arm/mach-imx/mm-imx35.c +++ b/arch/arm/mach-imx/mm-imx35.c | |||
@@ -25,9 +25,9 @@ | |||
25 | #include <asm/hardware/cache-l2x0.h> | 25 | #include <asm/hardware/cache-l2x0.h> |
26 | 26 | ||
27 | #include <mach/common.h> | 27 | #include <mach/common.h> |
28 | #include <mach/devices-common.h> | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <mach/iomux-v3.h> | 30 | #include <mach/iomux-v3.h> |
30 | #include <mach/gpio.h> | ||
31 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
32 | 32 | ||
33 | static struct map_desc mx35_io_desc[] __initdata = { | 33 | static struct map_desc mx35_io_desc[] __initdata = { |
@@ -50,14 +50,60 @@ void __init imx35_init_early(void) | |||
50 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | 50 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); |
51 | } | 51 | } |
52 | 52 | ||
53 | static struct mxc_gpio_port imx35_gpio_ports[] = { | ||
54 | DEFINE_IMX_GPIO_PORT_IRQ(MX35, 0, 1, MX35_INT_GPIO1), | ||
55 | DEFINE_IMX_GPIO_PORT_IRQ(MX35, 1, 2, MX35_INT_GPIO2), | ||
56 | DEFINE_IMX_GPIO_PORT_IRQ(MX35, 2, 3, MX35_INT_GPIO3), | ||
57 | }; | ||
58 | |||
59 | void __init mx35_init_irq(void) | 53 | void __init mx35_init_irq(void) |
60 | { | 54 | { |
61 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); | 55 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); |
62 | mxc_gpio_init(imx35_gpio_ports, ARRAY_SIZE(imx35_gpio_ports)); | 56 | } |
57 | |||
58 | static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = { | ||
59 | .ap_2_ap_addr = 642, | ||
60 | .uart_2_mcu_addr = 817, | ||
61 | .mcu_2_app_addr = 747, | ||
62 | .uartsh_2_mcu_addr = 1183, | ||
63 | .per_2_shp_addr = 1033, | ||
64 | .mcu_2_shp_addr = 961, | ||
65 | .ata_2_mcu_addr = 1333, | ||
66 | .mcu_2_ata_addr = 1252, | ||
67 | .app_2_mcu_addr = 683, | ||
68 | .shp_2_per_addr = 1111, | ||
69 | .shp_2_mcu_addr = 892, | ||
70 | }; | ||
71 | |||
72 | static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = { | ||
73 | .ap_2_ap_addr = 729, | ||
74 | .uart_2_mcu_addr = 904, | ||
75 | .per_2_app_addr = 1597, | ||
76 | .mcu_2_app_addr = 834, | ||
77 | .uartsh_2_mcu_addr = 1270, | ||
78 | .per_2_shp_addr = 1120, | ||
79 | .mcu_2_shp_addr = 1048, | ||
80 | .ata_2_mcu_addr = 1429, | ||
81 | .mcu_2_ata_addr = 1339, | ||
82 | .app_2_per_addr = 1531, | ||
83 | .app_2_mcu_addr = 770, | ||
84 | .shp_2_per_addr = 1198, | ||
85 | .shp_2_mcu_addr = 979, | ||
86 | }; | ||
87 | |||
88 | static struct sdma_platform_data imx35_sdma_pdata __initdata = { | ||
89 | .fw_name = "sdma-imx35-to2.bin", | ||
90 | .script_addrs = &imx35_to2_sdma_script, | ||
91 | }; | ||
92 | |||
93 | void __init imx35_soc_init(void) | ||
94 | { | ||
95 | int to_version = mx35_revision() >> 4; | ||
96 | |||
97 | /* i.mx35 has the i.mx31 type gpio */ | ||
98 | mxc_register_gpio("imx31-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0); | ||
99 | mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0); | ||
100 | mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0); | ||
101 | |||
102 | if (to_version == 1) { | ||
103 | strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin", | ||
104 | strlen(imx35_sdma_pdata.fw_name)); | ||
105 | imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script; | ||
106 | } | ||
107 | |||
108 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); | ||
63 | } | 109 | } |
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index 5aa053edc17..bf0fb87946b 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 | ||
164 | static struct gpio_led litekit_leds[] = { | 164 | static 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 | ||
179 | static struct gpio_led_platform_data litekit_led_platform_data = { | 179 | static 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 | ||
184 | static 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 | |||
192 | void __init mx31lite_db_init(void) | 185 | void __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 | } |