diff options
Diffstat (limited to 'arch/arm/mach-imx')
23 files changed, 394 insertions, 205 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c5c0369bb481..197f9e241cff 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -122,6 +122,7 @@ config MACH_CPUIMX27 | |||
122 | select IMX_HAVE_PLATFORM_IMX_I2C | 122 | select IMX_HAVE_PLATFORM_IMX_I2C |
123 | select IMX_HAVE_PLATFORM_IMX_UART | 123 | select IMX_HAVE_PLATFORM_IMX_UART |
124 | select IMX_HAVE_PLATFORM_MXC_NAND | 124 | select IMX_HAVE_PLATFORM_MXC_NAND |
125 | select MXC_ULPI if USB_ULPI | ||
125 | help | 126 | help |
126 | Include support for Eukrea CPUIMX27 platform. This includes | 127 | Include support for Eukrea CPUIMX27 platform. This includes |
127 | specific configurations for the module and its peripherals. | 128 | specific configurations for the module and its peripherals. |
@@ -146,8 +147,8 @@ choice | |||
146 | default MACH_EUKREA_MBIMX27_BASEBOARD | 147 | default MACH_EUKREA_MBIMX27_BASEBOARD |
147 | 148 | ||
148 | config MACH_EUKREA_MBIMX27_BASEBOARD | 149 | config MACH_EUKREA_MBIMX27_BASEBOARD |
149 | prompt "Eukrea MBIMX27 development board" | 150 | bool "Eukrea MBIMX27 development board" |
150 | bool | 151 | select IMX_HAVE_PLATFORM_IMX_SSI |
151 | select IMX_HAVE_PLATFORM_IMX_UART | 152 | select IMX_HAVE_PLATFORM_IMX_UART |
152 | select IMX_HAVE_PLATFORM_SPI_IMX | 153 | select IMX_HAVE_PLATFORM_SPI_IMX |
153 | help | 154 | help |
@@ -163,6 +164,15 @@ config MACH_MX27_3DS | |||
163 | Include support for MX27PDK platform. This includes specific | 164 | Include support for MX27PDK platform. This includes specific |
164 | configurations for the board and its peripherals. | 165 | configurations for the board and its peripherals. |
165 | 166 | ||
167 | config MACH_IMX27_VISSTRIM_M10 | ||
168 | bool "Vista Silicon i.MX27 Visstrim_m10" | ||
169 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
170 | select IMX_HAVE_PLATFORM_IMX_UART | ||
171 | help | ||
172 | Include support for Visstrim_m10 platform and its different variants. | ||
173 | This includes specific configurations for the board and its | ||
174 | peripherals. | ||
175 | |||
166 | config MACH_IMX27LITE | 176 | config MACH_IMX27LITE |
167 | bool "LogicPD MX27 LITEKIT platform" | 177 | bool "LogicPD MX27 LITEKIT platform" |
168 | select IMX_HAVE_PLATFORM_IMX_UART | 178 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -173,6 +183,7 @@ config MACH_IMX27LITE | |||
173 | config MACH_PCA100 | 183 | config MACH_PCA100 |
174 | bool "Phytec phyCARD-s (pca100)" | 184 | bool "Phytec phyCARD-s (pca100)" |
175 | select IMX_HAVE_PLATFORM_IMX_I2C | 185 | select IMX_HAVE_PLATFORM_IMX_I2C |
186 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
176 | select IMX_HAVE_PLATFORM_IMX_UART | 187 | select IMX_HAVE_PLATFORM_IMX_UART |
177 | select IMX_HAVE_PLATFORM_MXC_NAND | 188 | select IMX_HAVE_PLATFORM_MXC_NAND |
178 | select IMX_HAVE_PLATFORM_SPI_IMX | 189 | select IMX_HAVE_PLATFORM_SPI_IMX |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 46a9fdfbbd15..5582692bb176 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -27,6 +27,7 @@ obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o | |||
27 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o | 27 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o |
28 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o | 28 | obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o |
29 | obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o | 29 | obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o |
30 | obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o | ||
30 | obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o | 31 | obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o |
31 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o | 32 | obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o |
32 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o | 33 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o |
diff --git a/arch/arm/mach-imx/clock-imx1.c b/arch/arm/mach-imx/clock-imx1.c index c05096c38301..daca30b2d5b1 100644 --- a/arch/arm/mach-imx/clock-imx1.c +++ b/arch/arm/mach-imx/clock-imx1.c | |||
@@ -592,7 +592,7 @@ static struct clk_lookup lookups[] __initdata = { | |||
592 | _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk) | 592 | _REGISTER_CLOCK("imx-uart.1", NULL, uart_clk) |
593 | _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk) | 593 | _REGISTER_CLOCK("imx-uart.2", NULL, uart_clk) |
594 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) | 594 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) |
595 | _REGISTER_CLOCK("spi_imx.0", NULL, spi_clk) | 595 | _REGISTER_CLOCK("imx1-cspi.0", NULL, spi_clk) |
596 | _REGISTER_CLOCK("imx-mmc.0", NULL, sdhc_clk) | 596 | _REGISTER_CLOCK("imx-mmc.0", NULL, sdhc_clk) |
597 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 597 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
598 | _REGISTER_CLOCK(NULL, "mshc", mshc_clk) | 598 | _REGISTER_CLOCK(NULL, "mshc", mshc_clk) |
diff --git a/arch/arm/mach-imx/clock-imx21.c b/arch/arm/mach-imx/clock-imx21.c index bb419ef4d133..cf15ea516a72 100644 --- a/arch/arm/mach-imx/clock-imx21.c +++ b/arch/arm/mach-imx/clock-imx21.c | |||
@@ -1172,9 +1172,9 @@ static struct clk_lookup lookups[] = { | |||
1172 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk[0]) | 1172 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk[0]) |
1173 | _REGISTER_CLOCK(NULL, "sdhc1", sdhc_clk[0]) | 1173 | _REGISTER_CLOCK(NULL, "sdhc1", sdhc_clk[0]) |
1174 | _REGISTER_CLOCK(NULL, "sdhc2", sdhc_clk[1]) | 1174 | _REGISTER_CLOCK(NULL, "sdhc2", sdhc_clk[1]) |
1175 | _REGISTER_CLOCK(NULL, "cspi1", cspi_clk[0]) | 1175 | _REGISTER_CLOCK("imx21-cspi.0", NULL, cspi_clk[0]) |
1176 | _REGISTER_CLOCK(NULL, "cspi2", cspi_clk[1]) | 1176 | _REGISTER_CLOCK("imx21-cspi.1", NULL, cspi_clk[1]) |
1177 | _REGISTER_CLOCK(NULL, "cspi3", cspi_clk[2]) | 1177 | _REGISTER_CLOCK("imx21-cspi.2", NULL, cspi_clk[2]) |
1178 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0]) | 1178 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0]) |
1179 | _REGISTER_CLOCK(NULL, "csi", csi_clk[0]) | 1179 | _REGISTER_CLOCK(NULL, "csi", csi_clk[0]) |
1180 | _REGISTER_CLOCK("imx21-hcd.0", NULL, usb_clk[0]) | 1180 | _REGISTER_CLOCK("imx21-hcd.0", NULL, usb_clk[0]) |
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c index 5a1aa15c8a16..98a25bada783 100644 --- a/arch/arm/mach-imx/clock-imx27.c +++ b/arch/arm/mach-imx/clock-imx27.c | |||
@@ -594,27 +594,27 @@ DEFINE_CLOCK(uart2_clk1, 0, PCCR1, 30, NULL, NULL, &ipg_clk); | |||
594 | DEFINE_CLOCK(uart1_clk1, 0, PCCR1, 31, NULL, NULL, &ipg_clk); | 594 | DEFINE_CLOCK(uart1_clk1, 0, PCCR1, 31, NULL, NULL, &ipg_clk); |
595 | 595 | ||
596 | /* Clocks we cannot directly gate, but drivers need their rates */ | 596 | /* Clocks we cannot directly gate, but drivers need their rates */ |
597 | DEFINE_CLOCK(cspi1_clk, 0, 0, 0, NULL, &cspi1_clk1, &per2_clk); | 597 | DEFINE_CLOCK(cspi1_clk, 0, NULL, 0, NULL, &cspi1_clk1, &per2_clk); |
598 | DEFINE_CLOCK(cspi2_clk, 1, 0, 0, NULL, &cspi2_clk1, &per2_clk); | 598 | DEFINE_CLOCK(cspi2_clk, 1, NULL, 0, NULL, &cspi2_clk1, &per2_clk); |
599 | DEFINE_CLOCK(cspi3_clk, 2, 0, 0, NULL, &cspi13_clk1, &per2_clk); | 599 | DEFINE_CLOCK(cspi3_clk, 2, NULL, 0, NULL, &cspi13_clk1, &per2_clk); |
600 | DEFINE_CLOCK(sdhc1_clk, 0, 0, 0, NULL, &sdhc1_clk1, &per2_clk); | 600 | DEFINE_CLOCK(sdhc1_clk, 0, NULL, 0, NULL, &sdhc1_clk1, &per2_clk); |
601 | DEFINE_CLOCK(sdhc2_clk, 1, 0, 0, NULL, &sdhc2_clk1, &per2_clk); | 601 | DEFINE_CLOCK(sdhc2_clk, 1, NULL, 0, NULL, &sdhc2_clk1, &per2_clk); |
602 | DEFINE_CLOCK(sdhc3_clk, 2, 0, 0, NULL, &sdhc3_clk1, &per2_clk); | 602 | DEFINE_CLOCK(sdhc3_clk, 2, NULL, 0, NULL, &sdhc3_clk1, &per2_clk); |
603 | DEFINE_CLOCK(pwm_clk, 0, 0, 0, NULL, &pwm_clk1, &per1_clk); | 603 | DEFINE_CLOCK(pwm_clk, 0, NULL, 0, NULL, &pwm_clk1, &per1_clk); |
604 | DEFINE_CLOCK(gpt1_clk, 0, 0, 0, NULL, &gpt1_clk1, &per1_clk); | 604 | DEFINE_CLOCK(gpt1_clk, 0, NULL, 0, NULL, &gpt1_clk1, &per1_clk); |
605 | DEFINE_CLOCK(gpt2_clk, 1, 0, 0, NULL, &gpt2_clk1, &per1_clk); | 605 | DEFINE_CLOCK(gpt2_clk, 1, NULL, 0, NULL, &gpt2_clk1, &per1_clk); |
606 | DEFINE_CLOCK(gpt3_clk, 2, 0, 0, NULL, &gpt3_clk1, &per1_clk); | 606 | DEFINE_CLOCK(gpt3_clk, 2, NULL, 0, NULL, &gpt3_clk1, &per1_clk); |
607 | DEFINE_CLOCK(gpt4_clk, 3, 0, 0, NULL, &gpt4_clk1, &per1_clk); | 607 | DEFINE_CLOCK(gpt4_clk, 3, NULL, 0, NULL, &gpt4_clk1, &per1_clk); |
608 | DEFINE_CLOCK(gpt5_clk, 4, 0, 0, NULL, &gpt5_clk1, &per1_clk); | 608 | DEFINE_CLOCK(gpt5_clk, 4, NULL, 0, NULL, &gpt5_clk1, &per1_clk); |
609 | DEFINE_CLOCK(gpt6_clk, 5, 0, 0, NULL, &gpt6_clk1, &per1_clk); | 609 | DEFINE_CLOCK(gpt6_clk, 5, NULL, 0, NULL, &gpt6_clk1, &per1_clk); |
610 | DEFINE_CLOCK(uart1_clk, 0, 0, 0, NULL, &uart1_clk1, &per1_clk); | 610 | DEFINE_CLOCK(uart1_clk, 0, NULL, 0, NULL, &uart1_clk1, &per1_clk); |
611 | DEFINE_CLOCK(uart2_clk, 1, 0, 0, NULL, &uart2_clk1, &per1_clk); | 611 | DEFINE_CLOCK(uart2_clk, 1, NULL, 0, NULL, &uart2_clk1, &per1_clk); |
612 | DEFINE_CLOCK(uart3_clk, 2, 0, 0, NULL, &uart3_clk1, &per1_clk); | 612 | DEFINE_CLOCK(uart3_clk, 2, NULL, 0, NULL, &uart3_clk1, &per1_clk); |
613 | DEFINE_CLOCK(uart4_clk, 3, 0, 0, NULL, &uart4_clk1, &per1_clk); | 613 | DEFINE_CLOCK(uart4_clk, 3, NULL, 0, NULL, &uart4_clk1, &per1_clk); |
614 | DEFINE_CLOCK(uart5_clk, 4, 0, 0, NULL, &uart5_clk1, &per1_clk); | 614 | DEFINE_CLOCK(uart5_clk, 4, NULL, 0, NULL, &uart5_clk1, &per1_clk); |
615 | DEFINE_CLOCK(uart6_clk, 5, 0, 0, NULL, &uart6_clk1, &per1_clk); | 615 | DEFINE_CLOCK(uart6_clk, 5, NULL, 0, NULL, &uart6_clk1, &per1_clk); |
616 | DEFINE_CLOCK1(lcdc_clk, 0, 0, 0, parent, &lcdc_clk1, &per3_clk); | 616 | DEFINE_CLOCK1(lcdc_clk, 0, NULL, 0, parent, &lcdc_clk1, &per3_clk); |
617 | DEFINE_CLOCK1(csi_clk, 0, 0, 0, parent, &csi_clk1, &per4_clk); | 617 | DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, &csi_clk1, &per4_clk); |
618 | 618 | ||
619 | #define _REGISTER_CLOCK(d, n, c) \ | 619 | #define _REGISTER_CLOCK(d, n, c) \ |
620 | { \ | 620 | { \ |
@@ -640,9 +640,9 @@ static struct clk_lookup lookups[] = { | |||
640 | _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) | 640 | _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) |
641 | _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) | 641 | _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) |
642 | _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) | 642 | _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) |
643 | _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) | 643 | _REGISTER_CLOCK("imx27-cspi.0", NULL, cspi1_clk) |
644 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) | 644 | _REGISTER_CLOCK("imx27-cspi.1", NULL, cspi2_clk) |
645 | _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) | 645 | _REGISTER_CLOCK("imx27-cspi.2", NULL, cspi3_clk) |
646 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 646 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
647 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) | 647 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) |
648 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) | 648 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) |
diff --git a/arch/arm/mach-imx/devices-imx1.h b/arch/arm/mach-imx/devices-imx1.h index a8d94f078196..81979486218e 100644 --- a/arch/arm/mach-imx/devices-imx1.h +++ b/arch/arm/mach-imx/devices-imx1.h | |||
@@ -9,10 +9,12 @@ | |||
9 | #include <mach/mx1.h> | 9 | #include <mach/mx1.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx1_add_i2c_imx(pdata) \ | 12 | extern const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst; |
13 | imx_add_imx_i2c(0, MX1_I2C_BASE_ADDR, SZ_4K, MX1_INT_I2C, pdata) | 13 | #define imx1_add_imx_i2c(pdata) \ |
14 | imx_add_imx_i2c(&imx1_imx_i2c_data, pdata) | ||
14 | 15 | ||
15 | #define imx1_add_imx_uart0(pdata) \ | 16 | extern const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst; |
16 | imx_add_imx_uart_3irq(0, MX1_UART1_BASE_ADDR, 0xd0, MX1_INT_UART1RX, MX1_INT_UART1TX, MX1_INT_UART1RTS, pdata) | 17 | #define imx1_add_imx_uart(id, pdata) \ |
17 | #define imx1_add_imx_uart1(pdata) \ | 18 | imx_add_imx_uart_3irq(&imx1_imx_uart_data[id], pdata) |
18 | imx_add_imx_uart_3irq(0, MX1_UART2_BASE_ADDR, 0xd0, MX1_INT_UART2RX, MX1_INT_UART2TX, MX1_INT_UART2RTS, pdata) | 19 | #define imx1_add_imx_uart0(pdata) imx1_add_imx_uart(0, pdata) |
20 | #define imx1_add_imx_uart1(pdata) imx1_add_imx_uart(1, pdata) | ||
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h index 42788e99d127..d189039749b0 100644 --- a/arch/arm/mach-imx/devices-imx21.h +++ b/arch/arm/mach-imx/devices-imx21.h | |||
@@ -9,22 +9,28 @@ | |||
9 | #include <mach/mx21.h> | 9 | #include <mach/mx21.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx21_add_i2c_imx(pdata) \ | 12 | extern const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst; |
13 | imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata) | 13 | #define imx21_add_imx_i2c(pdata) \ |
14 | imx_add_imx_i2c(&imx21_imx_i2c_data, pdata) | ||
14 | 15 | ||
15 | #define imx21_add_imx_uart0(pdata) \ | 16 | extern const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst; |
16 | imx_add_imx_uart_1irq(0, MX21_UART1_BASE_ADDR, SZ_4K, MX21_INT_UART1, pdata) | 17 | #define imx21_add_imx_ssi(id, pdata) \ |
17 | #define imx21_add_imx_uart1(pdata) \ | 18 | imx_add_imx_ssi(&imx21_imx_ssi_data[id], pdata) |
18 | imx_add_imx_uart_1irq(1, MX21_UART2_BASE_ADDR, SZ_4K, MX21_INT_UART2, pdata) | ||
19 | #define imx21_add_imx_uart2(pdata) \ | ||
20 | imx_add_imx_uart_1irq(2, MX21_UART3_BASE_ADDR, SZ_4K, MX21_INT_UART3, pdata) | ||
21 | #define imx21_add_imx_uart3(pdata) \ | ||
22 | imx_add_imx_uart_1irq(3, MX21_UART4_BASE_ADDR, SZ_4K, MX21_INT_UART4, pdata) | ||
23 | 19 | ||
20 | extern const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst; | ||
21 | #define imx21_add_imx_uart(id, pdata) \ | ||
22 | imx_add_imx_uart_1irq(&imx21_imx_uart_data[id], pdata) | ||
23 | #define imx21_add_imx_uart0(pdata) imx21_add_imx_uart(0, pdata) | ||
24 | #define imx21_add_imx_uart1(pdata) imx21_add_imx_uart(1, pdata) | ||
25 | #define imx21_add_imx_uart2(pdata) imx21_add_imx_uart(2, pdata) | ||
26 | #define imx21_add_imx_uart3(pdata) imx21_add_imx_uart(3, pdata) | ||
27 | |||
28 | extern const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst; | ||
24 | #define imx21_add_mxc_nand(pdata) \ | 29 | #define imx21_add_mxc_nand(pdata) \ |
25 | imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) | 30 | imx_add_mxc_nand(&imx21_mxc_nand_data, pdata) |
26 | 31 | ||
27 | #define imx21_add_spi_imx0(pdata) \ | 32 | extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; |
28 | imx_add_spi_imx(0, MX21_CSPI1_BASE_ADDR, SZ_4K, MX21_INT_CSPI1, pdata) | 33 | #define imx21_add_cspi(id, pdata) \ |
29 | #define imx21_add_spi_imx1(pdata) \ | 34 | imx_add_spi_imx(&imx21_cspi_data[id], pdata) |
30 | imx_add_spi_imx(1, MX21_CSPI2_BASE_ADDR, SZ_4K, MX21_INT_CSPI2, pdata) | 35 | #define imx21_add_spi_imx0(pdata) imx21_add_cspi(0, pdata) |
36 | #define imx21_add_spi_imx1(pdata) imx21_add_cspi(1, pdata) | ||
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 65e7bb7ec2e8..7011690364f2 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -9,30 +9,35 @@ | |||
9 | #include <mach/mx27.h> | 9 | #include <mach/mx27.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 11 | ||
12 | #define imx27_add_i2c_imx0(pdata) \ | 12 | extern const struct imx_fec_data imx27_fec_data __initconst; |
13 | imx_add_imx_i2c(0, MX27_I2C1_BASE_ADDR, SZ_4K, MX27_INT_I2C1, pdata) | 13 | #define imx27_add_fec(pdata) \ |
14 | #define imx27_add_i2c_imx1(pdata) \ | 14 | imx_add_fec(&imx27_fec_data, pdata) |
15 | imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata) | ||
16 | 15 | ||
17 | #define imx27_add_imx_uart0(pdata) \ | 16 | extern const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst; |
18 | imx_add_imx_uart_1irq(0, MX27_UART1_BASE_ADDR, SZ_4K, MX27_INT_UART1, pdata) | 17 | #define imx27_add_imx_i2c(id, pdata) \ |
19 | #define imx27_add_imx_uart1(pdata) \ | 18 | imx_add_imx_i2c(&imx27_imx_i2c_data[id], pdata) |
20 | imx_add_imx_uart_1irq(1, MX27_UART2_BASE_ADDR, SZ_4K, MX27_INT_UART2, pdata) | ||
21 | #define imx27_add_imx_uart2(pdata) \ | ||
22 | imx_add_imx_uart_1irq(2, MX27_UART3_BASE_ADDR, SZ_4K, MX27_INT_UART3, pdata) | ||
23 | #define imx27_add_imx_uart3(pdata) \ | ||
24 | imx_add_imx_uart_1irq(3, MX27_UART4_BASE_ADDR, SZ_4K, MX27_INT_UART4, pdata) | ||
25 | #define imx27_add_imx_uart4(pdata) \ | ||
26 | imx_add_imx_uart_1irq(4, MX27_UART5_BASE_ADDR, SZ_4K, MX27_INT_UART5, pdata) | ||
27 | #define imx27_add_imx_uart5(pdata) \ | ||
28 | imx_add_imx_uart_1irq(5, MX27_UART6_BASE_ADDR, SZ_4K, MX27_INT_UART6, pdata) | ||
29 | 19 | ||
20 | extern const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst; | ||
21 | #define imx27_add_imx_ssi(id, pdata) \ | ||
22 | imx_add_imx_ssi(&imx27_imx_ssi_data[id], pdata) | ||
23 | |||
24 | extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst; | ||
25 | #define imx27_add_imx_uart(id, pdata) \ | ||
26 | imx_add_imx_uart_1irq(&imx27_imx_uart_data[id], pdata) | ||
27 | #define imx27_add_imx_uart0(pdata) imx27_add_imx_uart(0, pdata) | ||
28 | #define imx27_add_imx_uart1(pdata) imx27_add_imx_uart(1, pdata) | ||
29 | #define imx27_add_imx_uart2(pdata) imx27_add_imx_uart(2, pdata) | ||
30 | #define imx27_add_imx_uart3(pdata) imx27_add_imx_uart(3, pdata) | ||
31 | #define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata) | ||
32 | #define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata) | ||
33 | |||
34 | extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst; | ||
30 | #define imx27_add_mxc_nand(pdata) \ | 35 | #define imx27_add_mxc_nand(pdata) \ |
31 | imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata) | 36 | imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) |
32 | 37 | ||
33 | #define imx27_add_spi_imx0(pdata) \ | 38 | extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst; |
34 | imx_add_spi_imx(0, MX27_CSPI1_BASE_ADDR, SZ_4K, MX27_INT_CSPI1, pdata) | 39 | #define imx27_add_cspi(id, pdata) \ |
35 | #define imx27_add_spi_imx1(pdata) \ | 40 | imx_add_spi_imx(&imx27_cspi_data[id], pdata) |
36 | imx_add_spi_imx(1, MX27_CSPI2_BASE_ADDR, SZ_4K, MX27_INT_CSPI2, pdata) | 41 | #define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata) |
37 | #define imx27_add_spi_imx2(pdata) \ | 42 | #define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata) |
38 | imx_add_spi_imx(2, MX27_CSPI3_BASE_ADDR, SZ_4K, MX27_INT_CSPI3, pdata) | 43 | #define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata) |
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index 9c271a752b84..fba5047de8b1 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -314,27 +314,6 @@ struct platform_device mxc_fb_device = { | |||
314 | }, | 314 | }, |
315 | }; | 315 | }; |
316 | 316 | ||
317 | #ifdef CONFIG_MACH_MX27 | ||
318 | static struct resource mxc_fec_resources[] = { | ||
319 | { | ||
320 | .start = MX27_FEC_BASE_ADDR, | ||
321 | .end = MX27_FEC_BASE_ADDR + SZ_4K - 1, | ||
322 | .flags = IORESOURCE_MEM, | ||
323 | }, { | ||
324 | .start = MX27_INT_FEC, | ||
325 | .end = MX27_INT_FEC, | ||
326 | .flags = IORESOURCE_IRQ, | ||
327 | }, | ||
328 | }; | ||
329 | |||
330 | struct platform_device mxc_fec_device = { | ||
331 | .name = "fec", | ||
332 | .id = 0, | ||
333 | .num_resources = ARRAY_SIZE(mxc_fec_resources), | ||
334 | .resource = mxc_fec_resources, | ||
335 | }; | ||
336 | #endif | ||
337 | |||
338 | static struct resource mxc_pwm_resources[] = { | 317 | static struct resource mxc_pwm_resources[] = { |
339 | { | 318 | { |
340 | .start = MX2x_PWM_BASE_ADDR, | 319 | .start = MX2x_PWM_BASE_ADDR, |
@@ -480,41 +459,6 @@ struct platform_device mxc_usbh2 = { | |||
480 | }; | 459 | }; |
481 | #endif | 460 | #endif |
482 | 461 | ||
483 | #define DEFINE_IMX_SSI_DMARES(_name, ssin, suffix) \ | ||
484 | { \ | ||
485 | .name = _name, \ | ||
486 | .start = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ | ||
487 | .end = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ | ||
488 | .flags = IORESOURCE_DMA, \ | ||
489 | } | ||
490 | |||
491 | #define DEFINE_IMX_SSI_DEVICE(n, ssin, baseaddr, irq) \ | ||
492 | static struct resource imx_ssi_resources ## n[] = { \ | ||
493 | { \ | ||
494 | .start = MX2x_SSI ## ssin ## _BASE_ADDR, \ | ||
495 | .end = MX2x_SSI ## ssin ## _BASE_ADDR + 0x6f, \ | ||
496 | .flags = IORESOURCE_MEM, \ | ||
497 | }, { \ | ||
498 | .start = MX2x_INT_SSI1, \ | ||
499 | .end = MX2x_INT_SSI1, \ | ||
500 | .flags = IORESOURCE_IRQ, \ | ||
501 | }, \ | ||
502 | DEFINE_IMX_SSI_DMARES("tx0", ssin, TX0), \ | ||
503 | DEFINE_IMX_SSI_DMARES("rx0", ssin, RX0), \ | ||
504 | DEFINE_IMX_SSI_DMARES("tx1", ssin, TX1), \ | ||
505 | DEFINE_IMX_SSI_DMARES("rx1", ssin, RX1), \ | ||
506 | }; \ | ||
507 | \ | ||
508 | struct platform_device imx_ssi_device ## n = { \ | ||
509 | .name = "imx-ssi", \ | ||
510 | .id = n, \ | ||
511 | .num_resources = ARRAY_SIZE(imx_ssi_resources ## n), \ | ||
512 | .resource = imx_ssi_resources ## n, \ | ||
513 | } | ||
514 | |||
515 | DEFINE_IMX_SSI_DEVICE(0, 1, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); | ||
516 | DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); | ||
517 | |||
518 | /* GPIO port description */ | 462 | /* GPIO port description */ |
519 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ | 463 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ |
520 | { \ | 464 | { \ |
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h index efd4527506a5..807f02a031c9 100644 --- a/arch/arm/mach-imx/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -16,7 +16,6 @@ extern struct platform_device mxc_gpt5; | |||
16 | extern struct platform_device mxc_wdt; | 16 | extern struct platform_device mxc_wdt; |
17 | extern struct platform_device mxc_w1_master_device; | 17 | extern struct platform_device mxc_w1_master_device; |
18 | extern struct platform_device mxc_fb_device; | 18 | extern struct platform_device mxc_fb_device; |
19 | extern struct platform_device mxc_fec_device; | ||
20 | extern struct platform_device mxc_pwm_device; | 19 | extern struct platform_device mxc_pwm_device; |
21 | extern struct platform_device mxc_sdhc_device0; | 20 | extern struct platform_device mxc_sdhc_device0; |
22 | extern struct platform_device mxc_sdhc_device1; | 21 | extern struct platform_device mxc_sdhc_device1; |
@@ -26,7 +25,5 @@ extern struct platform_device mxc_otg_host; | |||
26 | extern struct platform_device mxc_usbh1; | 25 | extern struct platform_device mxc_usbh1; |
27 | extern struct platform_device mxc_usbh2; | 26 | extern struct platform_device mxc_usbh2; |
28 | extern struct platform_device mx21_usbhc_device; | 27 | extern struct platform_device mx21_usbhc_device; |
29 | extern struct platform_device imx_ssi_device0; | ||
30 | extern struct platform_device imx_ssi_device1; | ||
31 | extern struct platform_device imx_kpp_device; | 28 | extern struct platform_device imx_kpp_device; |
32 | #endif | 29 | #endif |
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index 4edc5f439201..026263c665ca 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -36,13 +36,12 @@ | |||
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <mach/mmc.h> | 37 | #include <mach/mmc.h> |
38 | #include <mach/spi.h> | 38 | #include <mach/spi.h> |
39 | #include <mach/ssi.h> | ||
40 | #include <mach/audmux.h> | 39 | #include <mach/audmux.h> |
41 | 40 | ||
42 | #include "devices-imx27.h" | 41 | #include "devices-imx27.h" |
43 | #include "devices.h" | 42 | #include "devices.h" |
44 | 43 | ||
45 | static int eukrea_mbimx27_pins[] = { | 44 | static const int eukrea_mbimx27_pins[] __initconst = { |
46 | /* UART2 */ | 45 | /* UART2 */ |
47 | PE3_PF_UART2_CTS, | 46 | PE3_PF_UART2_CTS, |
48 | PE4_PF_UART2_RTS, | 47 | PE4_PF_UART2_RTS, |
@@ -311,7 +310,8 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
311 | .dat3_card_detect = 1, | 310 | .dat3_card_detect = 1, |
312 | }; | 311 | }; |
313 | 312 | ||
314 | struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata = { | 313 | static const |
314 | struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata __initconst = { | ||
315 | .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE, | 315 | .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE, |
316 | }; | 316 | }; |
317 | 317 | ||
@@ -357,7 +357,7 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
357 | i2c_register_board_info(0, eukrea_mbimx27_i2c_devices, | 357 | i2c_register_board_info(0, eukrea_mbimx27_i2c_devices, |
358 | ARRAY_SIZE(eukrea_mbimx27_i2c_devices)); | 358 | ARRAY_SIZE(eukrea_mbimx27_i2c_devices)); |
359 | 359 | ||
360 | mxc_register_device(&imx_ssi_device0, &eukrea_mbimx27_ssi_pdata); | 360 | imx27_add_imx_ssi(0, &eukrea_mbimx27_ssi_pdata); |
361 | 361 | ||
362 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) \ | 362 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) \ |
363 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 363 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 339150ab0ea5..745ee60fb068 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "devices-imx27.h" | 46 | #include "devices-imx27.h" |
47 | #include "devices.h" | 47 | #include "devices.h" |
48 | 48 | ||
49 | static int eukrea_cpuimx27_pins[] = { | 49 | static const int eukrea_cpuimx27_pins[] __initconst = { |
50 | /* UART1 */ | 50 | /* UART1 */ |
51 | PE12_PF_UART1_TXD, | 51 | PE12_PF_UART1_TXD, |
52 | PE13_PF_UART1_RXD, | 52 | PE13_PF_UART1_RXD, |
@@ -157,7 +157,6 @@ cpuimx27_nand_board_info __initconst = { | |||
157 | 157 | ||
158 | static struct platform_device *platform_devices[] __initdata = { | 158 | static struct platform_device *platform_devices[] __initdata = { |
159 | &eukrea_cpuimx27_nor_mtd_device, | 159 | &eukrea_cpuimx27_nor_mtd_device, |
160 | &mxc_fec_device, | ||
161 | &mxc_wdt, | 160 | &mxc_wdt, |
162 | &mxc_w1_master_device, | 161 | &mxc_w1_master_device, |
163 | }; | 162 | }; |
@@ -259,8 +258,9 @@ static void __init eukrea_cpuimx27_init(void) | |||
259 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, | 258 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, |
260 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); | 259 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); |
261 | 260 | ||
262 | imx27_add_i2c_imx1(&cpuimx27_i2c1_data); | 261 | imx27_add_imx_i2c(0, &cpuimx27_i2c1_data); |
263 | 262 | ||
263 | imx27_add_fec(NULL); | ||
264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
265 | 265 | ||
266 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) | 266 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) |
@@ -307,8 +307,6 @@ static struct sys_timer eukrea_cpuimx27_timer = { | |||
307 | }; | 307 | }; |
308 | 308 | ||
309 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") | 309 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") |
310 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
311 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
312 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 310 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
313 | .map_io = mx27_map_io, | 311 | .map_io = mx27_map_io, |
314 | .init_irq = mx27_init_irq, | 312 | .init_irq = mx27_init_irq, |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c new file mode 100644 index 000000000000..59716fab586d --- /dev/null +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -0,0 +1,261 @@ | |||
1 | /* | ||
2 | * mach-imx27_visstrim_m10.c | ||
3 | * | ||
4 | * Copyright 2010 Javier Martin <javier.martin@vista-silicon.com> | ||
5 | * | ||
6 | * Based on mach-pcm038.c, mach-pca100.c, mach-mx27ads.c and others. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
21 | * MA 02110-1301, USA. | ||
22 | */ | ||
23 | |||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/mtd/physmap.h> | ||
28 | #include <linux/i2c.h> | ||
29 | #include <linux/i2c/pca953x.h> | ||
30 | #include <linux/gpio_keys.h> | ||
31 | #include <linux/input.h> | ||
32 | #include <linux/gpio.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/time.h> | ||
36 | #include <mach/common.h> | ||
37 | #include <mach/mmc.h> | ||
38 | #include <mach/iomux.h> | ||
39 | #include <mach/mxc_ehci.h> | ||
40 | |||
41 | #include "devices-imx27.h" | ||
42 | #include "devices.h" | ||
43 | |||
44 | #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17) | ||
45 | #define SDHC1_IRQ IRQ_GPIOB(25) | ||
46 | |||
47 | static const int visstrim_m10_pins[] __initconst = { | ||
48 | /* UART1 (console) */ | ||
49 | PE12_PF_UART1_TXD, | ||
50 | PE13_PF_UART1_RXD, | ||
51 | PE14_PF_UART1_CTS, | ||
52 | PE15_PF_UART1_RTS, | ||
53 | /* FEC */ | ||
54 | PD0_AIN_FEC_TXD0, | ||
55 | PD1_AIN_FEC_TXD1, | ||
56 | PD2_AIN_FEC_TXD2, | ||
57 | PD3_AIN_FEC_TXD3, | ||
58 | PD4_AOUT_FEC_RX_ER, | ||
59 | PD5_AOUT_FEC_RXD1, | ||
60 | PD6_AOUT_FEC_RXD2, | ||
61 | PD7_AOUT_FEC_RXD3, | ||
62 | PD8_AF_FEC_MDIO, | ||
63 | PD9_AIN_FEC_MDC, | ||
64 | PD10_AOUT_FEC_CRS, | ||
65 | PD11_AOUT_FEC_TX_CLK, | ||
66 | PD12_AOUT_FEC_RXD0, | ||
67 | PD13_AOUT_FEC_RX_DV, | ||
68 | PD14_AOUT_FEC_RX_CLK, | ||
69 | PD15_AOUT_FEC_COL, | ||
70 | PD16_AIN_FEC_TX_ER, | ||
71 | PF23_AIN_FEC_TX_EN, | ||
72 | /* SDHC1 */ | ||
73 | PE18_PF_SD1_D0, | ||
74 | PE19_PF_SD1_D1, | ||
75 | PE20_PF_SD1_D2, | ||
76 | PE21_PF_SD1_D3, | ||
77 | PE22_PF_SD1_CMD, | ||
78 | PE23_PF_SD1_CLK, | ||
79 | /* Both I2Cs */ | ||
80 | PD17_PF_I2C_DATA, | ||
81 | PD18_PF_I2C_CLK, | ||
82 | PC5_PF_I2C2_SDA, | ||
83 | PC6_PF_I2C2_SCL, | ||
84 | /* USB OTG */ | ||
85 | OTG_PHY_CS_GPIO | GPIO_GPIO | GPIO_OUT, | ||
86 | PC9_PF_USBOTG_DATA0, | ||
87 | PC11_PF_USBOTG_DATA1, | ||
88 | PC10_PF_USBOTG_DATA2, | ||
89 | PC13_PF_USBOTG_DATA3, | ||
90 | PC12_PF_USBOTG_DATA4, | ||
91 | PC7_PF_USBOTG_DATA5, | ||
92 | PC8_PF_USBOTG_DATA6, | ||
93 | PE25_PF_USBOTG_DATA7, | ||
94 | PE24_PF_USBOTG_CLK, | ||
95 | PE2_PF_USBOTG_DIR, | ||
96 | PE0_PF_USBOTG_NXT, | ||
97 | PE1_PF_USBOTG_STP, | ||
98 | PB23_PF_USB_PWR, | ||
99 | PB24_PF_USB_OC, | ||
100 | }; | ||
101 | |||
102 | /* GPIOs used as events for applications */ | ||
103 | static struct gpio_keys_button visstrim_gpio_keys[] = { | ||
104 | { | ||
105 | .type = EV_KEY, | ||
106 | .code = KEY_RESTART, | ||
107 | .gpio = (GPIO_PORTC + 15), | ||
108 | .desc = "Default config", | ||
109 | .active_low = 0, | ||
110 | .wakeup = 1, | ||
111 | }, | ||
112 | { | ||
113 | .type = EV_KEY, | ||
114 | .code = KEY_RECORD, | ||
115 | .gpio = (GPIO_PORTF + 14), | ||
116 | .desc = "Record", | ||
117 | .active_low = 0, | ||
118 | .wakeup = 1, | ||
119 | }, | ||
120 | { | ||
121 | .type = EV_KEY, | ||
122 | .code = KEY_STOP, | ||
123 | .gpio = (GPIO_PORTF + 13), | ||
124 | .desc = "Stop", | ||
125 | .active_low = 0, | ||
126 | .wakeup = 1, | ||
127 | } | ||
128 | }; | ||
129 | |||
130 | static struct gpio_keys_platform_data visstrim_gpio_keys_platform_data = { | ||
131 | .buttons = visstrim_gpio_keys, | ||
132 | .nbuttons = ARRAY_SIZE(visstrim_gpio_keys), | ||
133 | }; | ||
134 | |||
135 | static struct platform_device visstrim_gpio_keys_device = { | ||
136 | .name = "gpio-keys", | ||
137 | .id = -1, | ||
138 | .dev = { | ||
139 | .platform_data = &visstrim_gpio_keys_platform_data, | ||
140 | }, | ||
141 | }; | ||
142 | |||
143 | /* Visstrim_SM10 has a microSD slot connected to sdhc1 */ | ||
144 | static int visstrim_m10_sdhc1_init(struct device *dev, | ||
145 | irq_handler_t detect_irq, void *data) | ||
146 | { | ||
147 | int ret; | ||
148 | |||
149 | ret = request_irq(SDHC1_IRQ, detect_irq, IRQF_TRIGGER_FALLING, | ||
150 | "mmc-detect", data); | ||
151 | return ret; | ||
152 | } | ||
153 | |||
154 | static void visstrim_m10_sdhc1_exit(struct device *dev, void *data) | ||
155 | { | ||
156 | free_irq(SDHC1_IRQ, data); | ||
157 | } | ||
158 | |||
159 | static struct imxmmc_platform_data visstrim_m10_sdhc_pdata = { | ||
160 | .init = visstrim_m10_sdhc1_init, | ||
161 | .exit = visstrim_m10_sdhc1_exit, | ||
162 | }; | ||
163 | |||
164 | /* Visstrim_SM10 NOR flash */ | ||
165 | static struct physmap_flash_data visstrim_m10_flash_data = { | ||
166 | .width = 2, | ||
167 | }; | ||
168 | |||
169 | static struct resource visstrim_m10_flash_resource = { | ||
170 | .start = 0xc0000000, | ||
171 | .end = 0xc0000000 + SZ_64M - 1, | ||
172 | .flags = IORESOURCE_MEM, | ||
173 | }; | ||
174 | |||
175 | static struct platform_device visstrim_m10_nor_mtd_device = { | ||
176 | .name = "physmap-flash", | ||
177 | .id = 0, | ||
178 | .dev = { | ||
179 | .platform_data = &visstrim_m10_flash_data, | ||
180 | }, | ||
181 | .num_resources = 1, | ||
182 | .resource = &visstrim_m10_flash_resource, | ||
183 | }; | ||
184 | |||
185 | static struct platform_device *platform_devices[] __initdata = { | ||
186 | &visstrim_gpio_keys_device, | ||
187 | &visstrim_m10_nor_mtd_device, | ||
188 | }; | ||
189 | |||
190 | /* Visstrim_M10 uses UART0 as console */ | ||
191 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
192 | .flags = IMXUART_HAVE_RTSCTS, | ||
193 | }; | ||
194 | |||
195 | /* I2C */ | ||
196 | static const struct imxi2c_platform_data visstrim_m10_i2c_data __initconst = { | ||
197 | .bitrate = 100000, | ||
198 | }; | ||
199 | |||
200 | static struct pca953x_platform_data visstrim_m10_pca9555_pdata = { | ||
201 | .gpio_base = 240, /* After MX27 internal GPIOs */ | ||
202 | .invert = 0, | ||
203 | }; | ||
204 | |||
205 | static struct i2c_board_info visstrim_m10_i2c_devices[] = { | ||
206 | { | ||
207 | I2C_BOARD_INFO("pca9555", 0x20), | ||
208 | .platform_data = &visstrim_m10_pca9555_pdata, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | /* USB OTG */ | ||
213 | static int otg_phy_init(struct platform_device *pdev) | ||
214 | { | ||
215 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | static struct mxc_usbh_platform_data visstrim_m10_usbotg_pdata = { | ||
220 | .init = otg_phy_init, | ||
221 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | ||
222 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | ||
223 | }; | ||
224 | |||
225 | static void __init visstrim_m10_board_init(void) | ||
226 | { | ||
227 | int ret; | ||
228 | |||
229 | ret = mxc_gpio_setup_multiple_pins(visstrim_m10_pins, | ||
230 | ARRAY_SIZE(visstrim_m10_pins), "VISSTRIM_M10"); | ||
231 | if (ret) | ||
232 | pr_err("Failed to setup pins (%d)\n", ret); | ||
233 | |||
234 | imx27_add_imx_uart0(&uart_pdata); | ||
235 | |||
236 | i2c_register_board_info(0, visstrim_m10_i2c_devices, | ||
237 | ARRAY_SIZE(visstrim_m10_i2c_devices)); | ||
238 | imx27_add_imx_i2c(0, &visstrim_m10_i2c_data); | ||
239 | imx27_add_imx_i2c(1, &visstrim_m10_i2c_data); | ||
240 | mxc_register_device(&mxc_sdhc_device0, &visstrim_m10_sdhc_pdata); | ||
241 | mxc_register_device(&mxc_otg_host, &visstrim_m10_usbotg_pdata); | ||
242 | imx27_add_fec(NULL); | ||
243 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
244 | } | ||
245 | |||
246 | static void __init visstrim_m10_timer_init(void) | ||
247 | { | ||
248 | mx27_clocks_init((unsigned long)25000000); | ||
249 | } | ||
250 | |||
251 | static struct sys_timer visstrim_m10_timer = { | ||
252 | .init = visstrim_m10_timer_init, | ||
253 | }; | ||
254 | |||
255 | MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") | ||
256 | .boot_params = MX27_PHYS_OFFSET + 0x100, | ||
257 | .map_io = mx27_map_io, | ||
258 | .init_irq = mx27_init_irq, | ||
259 | .init_machine = visstrim_m10_board_init, | ||
260 | .timer = &visstrim_m10_timer, | ||
261 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index 22a2b5d91213..bbdbc75127d3 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "devices-imx27.h" | 27 | #include "devices-imx27.h" |
28 | #include "devices.h" | 28 | #include "devices.h" |
29 | 29 | ||
30 | static unsigned int mx27lite_pins[] = { | 30 | static const int mx27lite_pins[] __initconst = { |
31 | /* UART1 */ | 31 | /* UART1 */ |
32 | PE12_PF_UART1_TXD, | 32 | PE12_PF_UART1_TXD, |
33 | PE13_PF_UART1_RXD, | 33 | PE13_PF_UART1_RXD, |
@@ -58,16 +58,12 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
58 | .flags = IMXUART_HAVE_RTSCTS, | 58 | .flags = IMXUART_HAVE_RTSCTS, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct platform_device *platform_devices[] __initdata = { | ||
62 | &mxc_fec_device, | ||
63 | }; | ||
64 | |||
65 | static void __init mx27lite_init(void) | 61 | static void __init mx27lite_init(void) |
66 | { | 62 | { |
67 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), | 63 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), |
68 | "imx27lite"); | 64 | "imx27lite"); |
69 | imx27_add_imx_uart0(&uart_pdata); | 65 | imx27_add_imx_uart0(&uart_pdata); |
70 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 66 | imx27_add_fec(NULL); |
71 | } | 67 | } |
72 | 68 | ||
73 | static void __init mx27lite_timer_init(void) | 69 | static void __init mx27lite_timer_init(void) |
@@ -80,8 +76,6 @@ static struct sys_timer mx27lite_timer = { | |||
80 | }; | 76 | }; |
81 | 77 | ||
82 | MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") | 78 | MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") |
83 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
84 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
85 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 79 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
86 | .map_io = mx27_map_io, | 80 | .map_io = mx27_map_io, |
87 | .init_irq = mx27_init_irq, | 81 | .init_irq = mx27_init_irq, |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 77a760cfadc0..6187ce9ba7d5 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "devices-imx1.h" | 32 | #include "devices-imx1.h" |
33 | #include "devices.h" | 33 | #include "devices.h" |
34 | 34 | ||
35 | static int mx1ads_pins[] = { | 35 | static const int mx1ads_pins[] __initconst = { |
36 | /* UART1 */ | 36 | /* UART1 */ |
37 | PC9_PF_UART1_CTS, | 37 | PC9_PF_UART1_CTS, |
38 | PC10_PF_UART1_RTS, | 38 | PC10_PF_UART1_RTS, |
@@ -131,7 +131,7 @@ static void __init mx1ads_init(void) | |||
131 | i2c_register_board_info(0, mx1ads_i2c_devices, | 131 | i2c_register_board_info(0, mx1ads_i2c_devices, |
132 | ARRAY_SIZE(mx1ads_i2c_devices)); | 132 | ARRAY_SIZE(mx1ads_i2c_devices)); |
133 | 133 | ||
134 | imx1_add_i2c_imx(&mx1ads_i2c_data); | 134 | imx1_add_imx_i2c(&mx1ads_i2c_data); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void __init mx1ads_timer_init(void) | 137 | static void __init mx1ads_timer_init(void) |
@@ -145,8 +145,6 @@ struct sys_timer mx1ads_timer = { | |||
145 | 145 | ||
146 | MACHINE_START(MX1ADS, "Freescale MX1ADS") | 146 | MACHINE_START(MX1ADS, "Freescale MX1ADS") |
147 | /* Maintainer: Sascha Hauer, Pengutronix */ | 147 | /* Maintainer: Sascha Hauer, Pengutronix */ |
148 | .phys_io = MX1_IO_BASE_ADDR, | ||
149 | .io_pg_offst = (MX1_IO_BASE_ADDR_VIRT >> 18) & 0xfffc, | ||
150 | .boot_params = MX1_PHYS_OFFSET + 0x100, | 148 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
151 | .map_io = mx1_map_io, | 149 | .map_io = mx1_map_io, |
152 | .init_irq = mx1_init_irq, | 150 | .init_irq = mx1_init_irq, |
@@ -155,8 +153,6 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") | |||
155 | MACHINE_END | 153 | MACHINE_END |
156 | 154 | ||
157 | MACHINE_START(MXLADS, "Freescale MXLADS") | 155 | MACHINE_START(MXLADS, "Freescale MXLADS") |
158 | .phys_io = MX1_IO_BASE_ADDR, | ||
159 | .io_pg_offst = (MX1_IO_BASE_ADDR_VIRT >> 18) & 0xfffc, | ||
160 | .boot_params = MX1_PHYS_OFFSET + 0x100, | 156 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
161 | .map_io = mx1_map_io, | 157 | .map_io = mx1_map_io, |
162 | .init_irq = mx1_init_irq, | 158 | .init_irq = mx1_init_irq, |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 96d7f8189f32..e1282e9f50ff 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -67,7 +67,7 @@ | |||
67 | #define MX21ADS_IO_LED4_ON 0x4000 | 67 | #define MX21ADS_IO_LED4_ON 0x4000 |
68 | #define MX21ADS_IO_LED3_ON 0x8000 | 68 | #define MX21ADS_IO_LED3_ON 0x8000 |
69 | 69 | ||
70 | static unsigned int mx21ads_pins[] = { | 70 | static const int mx21ads_pins[] __initconst = { |
71 | 71 | ||
72 | /* CS8900A */ | 72 | /* CS8900A */ |
73 | (GPIO_PORTE | GPIO_GPIO | GPIO_IN | 11), | 73 | (GPIO_PORTE | GPIO_GPIO | GPIO_IN | 11), |
@@ -314,8 +314,6 @@ static struct sys_timer mx21ads_timer = { | |||
314 | 314 | ||
315 | MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | 315 | MACHINE_START(MX21ADS, "Freescale i.MX21ADS") |
316 | /* maintainer: Freescale Semiconductor, Inc. */ | 316 | /* maintainer: Freescale Semiconductor, Inc. */ |
317 | .phys_io = MX21_AIPI_BASE_ADDR, | ||
318 | .io_pg_offst = ((MX21_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
319 | .boot_params = MX21_PHYS_OFFSET + 0x100, | 317 | .boot_params = MX21_PHYS_OFFSET + 0x100, |
320 | .map_io = mx21ads_map_io, | 318 | .map_io = mx21ads_map_io, |
321 | .init_irq = mx21_init_irq, | 319 | .init_irq = mx21_init_irq, |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index e66ffaa1c26c..b8bbd31aa850 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "devices-imx27.h" | 33 | #include "devices-imx27.h" |
34 | #include "devices.h" | 34 | #include "devices.h" |
35 | 35 | ||
36 | static unsigned int mx27pdk_pins[] = { | 36 | static const int mx27pdk_pins[] __initconst = { |
37 | /* UART1 */ | 37 | /* UART1 */ |
38 | PE12_PF_UART1_TXD, | 38 | PE12_PF_UART1_TXD, |
39 | PE13_PF_UART1_RXD, | 39 | PE13_PF_UART1_RXD, |
@@ -64,10 +64,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
64 | .flags = IMXUART_HAVE_RTSCTS, | 64 | .flags = IMXUART_HAVE_RTSCTS, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | static struct platform_device *platform_devices[] __initdata = { | ||
68 | &mxc_fec_device, | ||
69 | }; | ||
70 | |||
71 | /* | 67 | /* |
72 | * Matrix keyboard | 68 | * Matrix keyboard |
73 | */ | 69 | */ |
@@ -94,7 +90,7 @@ static void __init mx27pdk_init(void) | |||
94 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | 90 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), |
95 | "mx27pdk"); | 91 | "mx27pdk"); |
96 | imx27_add_imx_uart0(&uart_pdata); | 92 | imx27_add_imx_uart0(&uart_pdata); |
97 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 93 | imx27_add_fec(NULL); |
98 | mxc_register_device(&imx_kpp_device, &mx27_3ds_keymap_data); | 94 | mxc_register_device(&imx_kpp_device, &mx27_3ds_keymap_data); |
99 | } | 95 | } |
100 | 96 | ||
@@ -109,8 +105,6 @@ static struct sys_timer mx27pdk_timer = { | |||
109 | 105 | ||
110 | MACHINE_START(MX27_3DS, "Freescale MX27PDK") | 106 | MACHINE_START(MX27_3DS, "Freescale MX27PDK") |
111 | /* maintainer: Freescale Semiconductor, Inc. */ | 107 | /* maintainer: Freescale Semiconductor, Inc. */ |
112 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
113 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
114 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 108 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
115 | .map_io = mx27_map_io, | 109 | .map_io = mx27_map_io, |
116 | .init_irq = mx27_init_irq, | 110 | .init_irq = mx27_init_irq, |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 9c77da98a10e..a1e4bc573afc 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -66,7 +66,7 @@ | |||
66 | /* to determine the correct external crystal reference */ | 66 | /* to determine the correct external crystal reference */ |
67 | #define CKIH_27MHZ_BIT_SET (1 << 3) | 67 | #define CKIH_27MHZ_BIT_SET (1 << 3) |
68 | 68 | ||
69 | static unsigned int mx27ads_pins[] = { | 69 | static const int mx27ads_pins[] __initconst = { |
70 | /* UART0 */ | 70 | /* UART0 */ |
71 | PE12_PF_UART1_TXD, | 71 | PE12_PF_UART1_TXD, |
72 | PE13_PF_UART1_RXD, | 72 | PE13_PF_UART1_RXD, |
@@ -284,7 +284,6 @@ static struct imxmmc_platform_data sdhc2_pdata = { | |||
284 | 284 | ||
285 | static struct platform_device *platform_devices[] __initdata = { | 285 | static struct platform_device *platform_devices[] __initdata = { |
286 | &mx27ads_nor_mtd_device, | 286 | &mx27ads_nor_mtd_device, |
287 | &mxc_fec_device, | ||
288 | &mxc_w1_master_device, | 287 | &mxc_w1_master_device, |
289 | }; | 288 | }; |
290 | 289 | ||
@@ -308,11 +307,12 @@ static void __init mx27ads_board_init(void) | |||
308 | /* only the i2c master 1 is used on this CPU card */ | 307 | /* only the i2c master 1 is used on this CPU card */ |
309 | i2c_register_board_info(1, mx27ads_i2c_devices, | 308 | i2c_register_board_info(1, mx27ads_i2c_devices, |
310 | ARRAY_SIZE(mx27ads_i2c_devices)); | 309 | ARRAY_SIZE(mx27ads_i2c_devices)); |
311 | imx27_add_i2c_imx1(&mx27ads_i2c1_data); | 310 | imx27_add_imx_i2c(1, &mx27ads_i2c1_data); |
312 | mxc_register_device(&mxc_fb_device, &mx27ads_fb_data); | 311 | mxc_register_device(&mxc_fb_device, &mx27ads_fb_data); |
313 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | 312 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); |
314 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); | 313 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); |
315 | 314 | ||
315 | imx27_add_fec(NULL); | ||
316 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 316 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
317 | } | 317 | } |
318 | 318 | ||
@@ -347,8 +347,6 @@ static void __init mx27ads_map_io(void) | |||
347 | 347 | ||
348 | MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | 348 | MACHINE_START(MX27ADS, "Freescale i.MX27ADS") |
349 | /* maintainer: Freescale Semiconductor, Inc. */ | 349 | /* maintainer: Freescale Semiconductor, Inc. */ |
350 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
351 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
352 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 350 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
353 | .map_io = mx27ads_map_io, | 351 | .map_io = mx27ads_map_io, |
354 | .init_irq = mx27_init_irq, | 352 | .init_irq = mx27_init_irq, |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index a3a1e452d4c5..38d3a4ae17c7 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "devices-imx27.h" | 37 | #include "devices-imx27.h" |
38 | #include "devices.h" | 38 | #include "devices.h" |
39 | 39 | ||
40 | static unsigned int mxt_td60_pins[] __initdata = { | 40 | static const int mxt_td60_pins[] __initconst = { |
41 | /* UART0 */ | 41 | /* UART0 */ |
42 | PE12_PF_UART1_TXD, | 42 | PE12_PF_UART1_TXD, |
43 | PE13_PF_UART1_RXD, | 43 | PE13_PF_UART1_RXD, |
@@ -231,10 +231,6 @@ static struct imxmmc_platform_data sdhc1_pdata = { | |||
231 | .exit = mxt_td60_sdhc1_exit, | 231 | .exit = mxt_td60_sdhc1_exit, |
232 | }; | 232 | }; |
233 | 233 | ||
234 | static struct platform_device *platform_devices[] __initdata = { | ||
235 | &mxc_fec_device, | ||
236 | }; | ||
237 | |||
238 | static const struct imxuart_platform_data uart_pdata __initconst = { | 234 | static const struct imxuart_platform_data uart_pdata __initconst = { |
239 | .flags = IMXUART_HAVE_RTSCTS, | 235 | .flags = IMXUART_HAVE_RTSCTS, |
240 | }; | 236 | }; |
@@ -255,12 +251,11 @@ static void __init mxt_td60_board_init(void) | |||
255 | i2c_register_board_info(1, mxt_td60_i2c2_devices, | 251 | i2c_register_board_info(1, mxt_td60_i2c2_devices, |
256 | ARRAY_SIZE(mxt_td60_i2c2_devices)); | 252 | ARRAY_SIZE(mxt_td60_i2c2_devices)); |
257 | 253 | ||
258 | imx27_add_i2c_imx0(&mxt_td60_i2c0_data); | 254 | imx27_add_imx_i2c(0, &mxt_td60_i2c0_data); |
259 | imx27_add_i2c_imx1(&mxt_td60_i2c1_data); | 255 | imx27_add_imx_i2c(1, &mxt_td60_i2c1_data); |
260 | mxc_register_device(&mxc_fb_device, &mxt_td60_fb_data); | 256 | mxc_register_device(&mxc_fb_device, &mxt_td60_fb_data); |
261 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | 257 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); |
262 | 258 | imx27_add_fec(NULL); | |
263 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
264 | } | 259 | } |
265 | 260 | ||
266 | static void __init mxt_td60_timer_init(void) | 261 | static void __init mxt_td60_timer_init(void) |
@@ -274,8 +269,6 @@ static struct sys_timer mxt_td60_timer = { | |||
274 | 269 | ||
275 | MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") | 270 | MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") |
276 | /* maintainer: Maxtrack Industrial */ | 271 | /* maintainer: Maxtrack Industrial */ |
277 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
278 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
279 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 272 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
280 | .map_io = mx27_map_io, | 273 | .map_io = mx27_map_io, |
281 | .init_irq = mx27_init_irq, | 274 | .init_irq = mx27_init_irq, |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 23c9e1f37b9c..8c720d44602a 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
39 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
40 | #include <mach/audmux.h> | 40 | #include <mach/audmux.h> |
41 | #include <mach/ssi.h> | ||
42 | #include <mach/mxc_nand.h> | 41 | #include <mach/mxc_nand.h> |
43 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
44 | #include <mach/mmc.h> | 43 | #include <mach/mmc.h> |
@@ -55,7 +54,7 @@ | |||
55 | #define SPI1_SS1 (GPIO_PORTD + 27) | 54 | #define SPI1_SS1 (GPIO_PORTD + 27) |
56 | #define SD2_CD (GPIO_PORTC + 29) | 55 | #define SD2_CD (GPIO_PORTC + 29) |
57 | 56 | ||
58 | static int pca100_pins[] = { | 57 | static const int pca100_pins[] __initconst = { |
59 | /* UART1 */ | 58 | /* UART1 */ |
60 | PE12_PF_UART1_TXD, | 59 | PE12_PF_UART1_TXD, |
61 | PE13_PF_UART1_RXD, | 60 | PE13_PF_UART1_RXD, |
@@ -174,7 +173,6 @@ pca100_nand_board_info __initconst = { | |||
174 | 173 | ||
175 | static struct platform_device *platform_devices[] __initdata = { | 174 | static struct platform_device *platform_devices[] __initdata = { |
176 | &mxc_w1_master_device, | 175 | &mxc_w1_master_device, |
177 | &mxc_fec_device, | ||
178 | &mxc_wdt, | 176 | &mxc_wdt, |
179 | }; | 177 | }; |
180 | 178 | ||
@@ -193,11 +191,9 @@ static struct i2c_board_info pca100_i2c_devices[] = { | |||
193 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ | 191 | I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ |
194 | .platform_data = &board_eeprom, | 192 | .platform_data = &board_eeprom, |
195 | }, { | 193 | }, { |
196 | I2C_BOARD_INFO("rtc-pcf8563", 0x51), | 194 | I2C_BOARD_INFO("pcf8563", 0x51), |
197 | .type = "pcf8563" | ||
198 | }, { | 195 | }, { |
199 | I2C_BOARD_INFO("lm75", 0x4a), | 196 | I2C_BOARD_INFO("lm75", 0x4a), |
200 | .type = "lm75" | ||
201 | } | 197 | } |
202 | }; | 198 | }; |
203 | 199 | ||
@@ -252,7 +248,7 @@ static void pca100_ac97_cold_reset(struct snd_ac97 *ac97) | |||
252 | msleep(2); | 248 | msleep(2); |
253 | } | 249 | } |
254 | 250 | ||
255 | static struct imx_ssi_platform_data pca100_ssi_pdata = { | 251 | static const struct imx_ssi_platform_data pca100_ssi_pdata __initconst = { |
256 | .ac97_reset = pca100_ac97_cold_reset, | 252 | .ac97_reset = pca100_ac97_cold_reset, |
257 | .ac97_warm_reset = pca100_ac97_warm_reset, | 253 | .ac97_warm_reset = pca100_ac97_warm_reset, |
258 | .flags = IMX_SSI_USE_AC97, | 254 | .flags = IMX_SSI_USE_AC97, |
@@ -389,7 +385,7 @@ static void __init pca100_init(void) | |||
389 | if (ret) | 385 | if (ret) |
390 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); | 386 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); |
391 | 387 | ||
392 | mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); | 388 | imx27_add_imx_ssi(0, &pca100_ssi_pdata); |
393 | 389 | ||
394 | imx27_add_imx_uart0(&uart_pdata); | 390 | imx27_add_imx_uart0(&uart_pdata); |
395 | 391 | ||
@@ -401,7 +397,7 @@ static void __init pca100_init(void) | |||
401 | i2c_register_board_info(1, pca100_i2c_devices, | 397 | i2c_register_board_info(1, pca100_i2c_devices, |
402 | ARRAY_SIZE(pca100_i2c_devices)); | 398 | ARRAY_SIZE(pca100_i2c_devices)); |
403 | 399 | ||
404 | imx27_add_i2c_imx1(&pca100_i2c1_data); | 400 | imx27_add_imx_i2c(1, &pca100_i2c1_data); |
405 | 401 | ||
406 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 402 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
407 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN); | 403 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN); |
@@ -436,6 +432,7 @@ static void __init pca100_init(void) | |||
436 | 432 | ||
437 | mxc_register_device(&mxc_fb_device, &pca100_fb_data); | 433 | mxc_register_device(&mxc_fb_device, &pca100_fb_data); |
438 | 434 | ||
435 | imx27_add_fec(NULL); | ||
439 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 436 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
440 | } | 437 | } |
441 | 438 | ||
@@ -449,8 +446,6 @@ static struct sys_timer pca100_timer = { | |||
449 | }; | 446 | }; |
450 | 447 | ||
451 | MACHINE_START(PCA100, "phyCARD-i.MX27") | 448 | MACHINE_START(PCA100, "phyCARD-i.MX27") |
452 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
453 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
454 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 449 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
455 | .map_io = mx27_map_io, | 450 | .map_io = mx27_map_io, |
456 | .init_irq = mx27_init_irq, | 451 | .init_irq = mx27_init_irq, |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 9212e8f37001..49a97ce07426 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include "devices-imx27.h" | 43 | #include "devices-imx27.h" |
44 | #include "devices.h" | 44 | #include "devices.h" |
45 | 45 | ||
46 | static int pcm038_pins[] = { | 46 | static const int pcm038_pins[] __initconst = { |
47 | /* UART1 */ | 47 | /* UART1 */ |
48 | PE12_PF_UART1_TXD, | 48 | PE12_PF_UART1_TXD, |
49 | PE13_PF_UART1_RXD, | 49 | PE13_PF_UART1_RXD, |
@@ -173,7 +173,6 @@ pcm038_nand_board_info __initconst = { | |||
173 | static struct platform_device *platform_devices[] __initdata = { | 173 | static struct platform_device *platform_devices[] __initdata = { |
174 | &pcm038_nor_mtd_device, | 174 | &pcm038_nor_mtd_device, |
175 | &mxc_w1_master_device, | 175 | &mxc_w1_master_device, |
176 | &mxc_fec_device, | ||
177 | &pcm038_sram_mtd_device, | 176 | &pcm038_sram_mtd_device, |
178 | &mxc_wdt, | 177 | &mxc_wdt, |
179 | }; | 178 | }; |
@@ -257,7 +256,7 @@ static struct regulator_init_data cam_data = { | |||
257 | .consumer_supplies = cam_consumers, | 256 | .consumer_supplies = cam_consumers, |
258 | }; | 257 | }; |
259 | 258 | ||
260 | struct mc13783_regulator_init_data pcm038_regulators[] = { | 259 | static struct mc13783_regulator_init_data pcm038_regulators[] = { |
261 | { | 260 | { |
262 | .id = MC13783_REGU_VCAM, | 261 | .id = MC13783_REGU_VCAM, |
263 | .init_data = &cam_data, | 262 | .init_data = &cam_data, |
@@ -309,7 +308,7 @@ static void __init pcm038_init(void) | |||
309 | i2c_register_board_info(1, pcm038_i2c_devices, | 308 | i2c_register_board_info(1, pcm038_i2c_devices, |
310 | ARRAY_SIZE(pcm038_i2c_devices)); | 309 | ARRAY_SIZE(pcm038_i2c_devices)); |
311 | 310 | ||
312 | imx27_add_i2c_imx1(&pcm038_i2c1_data); | 311 | imx27_add_imx_i2c(1, &pcm038_i2c1_data); |
313 | 312 | ||
314 | /* PE18 for user-LED D40 */ | 313 | /* PE18 for user-LED D40 */ |
315 | mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); | 314 | mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); |
@@ -325,6 +324,7 @@ static void __init pcm038_init(void) | |||
325 | 324 | ||
326 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 325 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); |
327 | 326 | ||
327 | imx27_add_fec(NULL); | ||
328 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 328 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
329 | 329 | ||
330 | #ifdef CONFIG_MACH_PCM970_BASEBOARD | 330 | #ifdef CONFIG_MACH_PCM970_BASEBOARD |
@@ -342,8 +342,6 @@ static struct sys_timer pcm038_timer = { | |||
342 | }; | 342 | }; |
343 | 343 | ||
344 | MACHINE_START(PCM038, "phyCORE-i.MX27") | 344 | MACHINE_START(PCM038, "phyCORE-i.MX27") |
345 | .phys_io = MX27_AIPI_BASE_ADDR, | ||
346 | .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
347 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 345 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
348 | .map_io = mx27_map_io, | 346 | .map_io = mx27_map_io, |
349 | .init_irq = mx27_init_irq, | 347 | .init_irq = mx27_init_irq, |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index 88bf0d1e26e6..1fbdd3faa7ab 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -95,7 +95,7 @@ static struct platform_device dm9000x_device = { | |||
95 | } | 95 | } |
96 | }; | 96 | }; |
97 | 97 | ||
98 | static int mxc_uart1_pins[] = { | 98 | static const int mxc_uart1_pins[] = { |
99 | PC9_PF_UART1_CTS, | 99 | PC9_PF_UART1_CTS, |
100 | PC10_PF_UART1_RTS, | 100 | PC10_PF_UART1_RTS, |
101 | PC11_PF_UART1_TXD, | 101 | PC11_PF_UART1_TXD, |
@@ -147,8 +147,6 @@ static struct sys_timer scb9328_timer = { | |||
147 | 147 | ||
148 | MACHINE_START(SCB9328, "Synertronixx scb9328") | 148 | MACHINE_START(SCB9328, "Synertronixx scb9328") |
149 | /* Sascha Hauer */ | 149 | /* Sascha Hauer */ |
150 | .phys_io = 0x00200000, | ||
151 | .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc, | ||
152 | .boot_params = 0x08000100, | 150 | .boot_params = 0x08000100, |
153 | .map_io = mx1_map_io, | 151 | .map_io = mx1_map_io, |
154 | .init_irq = mx1_init_irq, | 152 | .init_irq = mx1_init_irq, |
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c index f490a406d57e..9110d9cca7a2 100644 --- a/arch/arm/mach-imx/pcm970-baseboard.c +++ b/arch/arm/mach-imx/pcm970-baseboard.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | #include "devices.h" | 32 | #include "devices.h" |
33 | 33 | ||
34 | static int pcm970_pins[] = { | 34 | static const int pcm970_pins[] __initconst = { |
35 | /* SDHC */ | 35 | /* SDHC */ |
36 | PB4_PF_SD2_D0, | 36 | PB4_PF_SD2_D0, |
37 | PB5_PF_SD2_D1, | 37 | PB5_PF_SD2_D1, |
@@ -200,7 +200,7 @@ static struct resource pcm970_sja1000_resources[] = { | |||
200 | }, | 200 | }, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | struct sja1000_platform_data pcm970_sja1000_platform_data = { | 203 | static struct sja1000_platform_data pcm970_sja1000_platform_data = { |
204 | .osc_freq = 16000000, | 204 | .osc_freq = 16000000, |
205 | .ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL, | 205 | .ocr = OCR_TX1_PULLDOWN | OCR_TX0_PUSHPULL, |
206 | .cdr = CDR_CBP, | 206 | .cdr = CDR_CBP, |