diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-06-30 06:16:24 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-07-26 08:27:25 -0400 |
commit | 2dcf78c0eeae3bd07082821557014f25f02ca2e9 (patch) | |
tree | 8ca5c4c7f35c9a9ab07fcd9732124c905e609aa1 /arch/arm/mach-mx3 | |
parent | 6b6322676add0fa2713d0ec89a28390fd4d907f5 (diff) | |
parent | 5109a4597f7e758b8d20694392d0361a0b4c43b1 (diff) |
Merge branch 'imx/for-2.6.36' of git://git.pengutronix.de/git/ukl/linux-2.6 into HEAD
There are some more conflicts than detected by git, namely support for
the newly added cpuimx machines needed to be converted to dynamic device
registration.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Conflicts:
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.h
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
arch/arm/mach-mx2/Kconfig
arch/arm/mach-mx25/Makefile
arch/arm/mach-mx25/devices.c
arch/arm/plat-mxc/include/mach/mx25.h
arch/arm/plat-mxc/include/mach/mxc_nand.h
Diffstat (limited to 'arch/arm/mach-mx3')
26 files changed, 372 insertions, 460 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index b09e9a94adf1..a11112afde5e 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -15,6 +15,8 @@ comment "MX3 platforms:" | |||
15 | config MACH_MX31ADS | 15 | config MACH_MX31ADS |
16 | bool "Support MX31ADS platforms" | 16 | bool "Support MX31ADS platforms" |
17 | select ARCH_MX31 | 17 | select ARCH_MX31 |
18 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
19 | select IMX_HAVE_PLATFORM_IMX_UART | ||
18 | default y | 20 | default y |
19 | help | 21 | help |
20 | Include support for MX31ADS platform. This includes specific | 22 | Include support for MX31ADS platform. This includes specific |
@@ -34,6 +36,9 @@ config MACH_MX31ADS_WM1133_EV1 | |||
34 | config MACH_PCM037 | 36 | config MACH_PCM037 |
35 | bool "Support Phytec pcm037 (i.MX31) platforms" | 37 | bool "Support Phytec pcm037 (i.MX31) platforms" |
36 | select ARCH_MX31 | 38 | select ARCH_MX31 |
39 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
40 | select IMX_HAVE_PLATFORM_IMX_UART | ||
41 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
37 | select MXC_ULPI if USB_ULPI | 42 | select MXC_ULPI if USB_ULPI |
38 | help | 43 | help |
39 | Include support for Phytec pcm037 platform. This includes | 44 | Include support for Phytec pcm037 platform. This includes |
@@ -42,6 +47,7 @@ config MACH_PCM037 | |||
42 | config MACH_PCM037_EET | 47 | config MACH_PCM037_EET |
43 | bool "Support pcm037 EET board extensions" | 48 | bool "Support pcm037 EET board extensions" |
44 | depends on MACH_PCM037 | 49 | depends on MACH_PCM037 |
50 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
45 | help | 51 | help |
46 | Add support for PCM037 EET baseboard extensions. If you are using the | 52 | Add support for PCM037 EET baseboard extensions. If you are using the |
47 | OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel | 53 | OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel |
@@ -51,6 +57,9 @@ config MACH_MX31LITE | |||
51 | bool "Support MX31 LITEKIT (LogicPD)" | 57 | bool "Support MX31 LITEKIT (LogicPD)" |
52 | select ARCH_MX31 | 58 | select ARCH_MX31 |
53 | select MXC_ULPI if USB_ULPI | 59 | select MXC_ULPI if USB_ULPI |
60 | select IMX_HAVE_PLATFORM_IMX_UART | ||
61 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
62 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
54 | help | 63 | help |
55 | Include support for MX31 LITEKIT platform. This includes specific | 64 | Include support for MX31 LITEKIT platform. This includes specific |
56 | configurations for the board and its peripherals. | 65 | configurations for the board and its peripherals. |
@@ -58,6 +67,9 @@ config MACH_MX31LITE | |||
58 | config MACH_MX31_3DS | 67 | config MACH_MX31_3DS |
59 | bool "Support MX31PDK (3DS)" | 68 | bool "Support MX31PDK (3DS)" |
60 | select ARCH_MX31 | 69 | select ARCH_MX31 |
70 | select IMX_HAVE_PLATFORM_IMX_UART | ||
71 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
72 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
61 | help | 73 | help |
62 | Include support for MX31PDK (3DS) platform. This includes specific | 74 | Include support for MX31PDK (3DS) platform. This includes specific |
63 | configurations for the board and its peripherals. | 75 | configurations for the board and its peripherals. |
@@ -74,6 +86,9 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT | |||
74 | config MACH_MX31MOBOARD | 86 | config MACH_MX31MOBOARD |
75 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 87 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
76 | select ARCH_MX31 | 88 | select ARCH_MX31 |
89 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
90 | select IMX_HAVE_PLATFORM_IMX_UART | ||
91 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
77 | select MXC_ULPI if USB_ULPI | 92 | select MXC_ULPI if USB_ULPI |
78 | help | 93 | help |
79 | Include support for mx31moboard platform. This includes specific | 94 | Include support for mx31moboard platform. This includes specific |
@@ -82,6 +97,8 @@ config MACH_MX31MOBOARD | |||
82 | config MACH_MX31LILLY | 97 | config MACH_MX31LILLY |
83 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" | 98 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" |
84 | select ARCH_MX31 | 99 | select ARCH_MX31 |
100 | select IMX_HAVE_PLATFORM_IMX_UART | ||
101 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
85 | select MXC_ULPI if USB_ULPI | 102 | select MXC_ULPI if USB_ULPI |
86 | help | 103 | help |
87 | Include support for mx31 based LILLY1131 modules. This includes | 104 | Include support for mx31 based LILLY1131 modules. This includes |
@@ -90,6 +107,7 @@ config MACH_MX31LILLY | |||
90 | config MACH_QONG | 107 | config MACH_QONG |
91 | bool "Support Dave/DENX QongEVB-LITE platform" | 108 | bool "Support Dave/DENX QongEVB-LITE platform" |
92 | select ARCH_MX31 | 109 | select ARCH_MX31 |
110 | select IMX_HAVE_PLATFORM_IMX_UART | ||
93 | help | 111 | help |
94 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 112 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
95 | specific configurations for the board and its peripherals. | 113 | specific configurations for the board and its peripherals. |
@@ -97,6 +115,9 @@ config MACH_QONG | |||
97 | config MACH_PCM043 | 115 | config MACH_PCM043 |
98 | bool "Support Phytec pcm043 (i.MX35) platforms" | 116 | bool "Support Phytec pcm043 (i.MX35) platforms" |
99 | select ARCH_MX35 | 117 | select ARCH_MX35 |
118 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
119 | select IMX_HAVE_PLATFORM_IMX_UART | ||
120 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
100 | select MXC_ULPI if USB_ULPI | 121 | select MXC_ULPI if USB_ULPI |
101 | help | 122 | help |
102 | Include support for Phytec pcm043 platform. This includes | 123 | Include support for Phytec pcm043 platform. This includes |
@@ -105,6 +126,9 @@ config MACH_PCM043 | |||
105 | config MACH_ARMADILLO5X0 | 126 | config MACH_ARMADILLO5X0 |
106 | bool "Support Atmark Armadillo-500 Development Base Board" | 127 | bool "Support Atmark Armadillo-500 Development Base Board" |
107 | select ARCH_MX31 | 128 | select ARCH_MX31 |
129 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
130 | select IMX_HAVE_PLATFORM_IMX_UART | ||
131 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
108 | select MXC_ULPI if USB_ULPI | 132 | select MXC_ULPI if USB_ULPI |
109 | help | 133 | help |
110 | Include support for Atmark Armadillo-500 platform. This includes | 134 | Include support for Atmark Armadillo-500 platform. This includes |
@@ -113,6 +137,7 @@ config MACH_ARMADILLO5X0 | |||
113 | config MACH_MX35_3DS | 137 | config MACH_MX35_3DS |
114 | bool "Support MX35PDK platform" | 138 | bool "Support MX35PDK platform" |
115 | select ARCH_MX35 | 139 | select ARCH_MX35 |
140 | select IMX_HAVE_PLATFORM_IMX_UART | ||
116 | default n | 141 | default n |
117 | help | 142 | help |
118 | Include support for MX35PDK platform. This includes specific | 143 | Include support for MX35PDK platform. This includes specific |
@@ -121,6 +146,7 @@ config MACH_MX35_3DS | |||
121 | config MACH_KZM_ARM11_01 | 146 | config MACH_KZM_ARM11_01 |
122 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" | 147 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" |
123 | select ARCH_MX31 | 148 | select ARCH_MX31 |
149 | select IMX_HAVE_PLATFORM_IMX_UART | ||
124 | help | 150 | help |
125 | Include support for KZM-ARM11-01. This includes specific | 151 | Include support for KZM-ARM11-01. This includes specific |
126 | configurations for the board and its peripherals. | 152 | configurations for the board and its peripherals. |
@@ -128,6 +154,9 @@ config MACH_KZM_ARM11_01 | |||
128 | config MACH_EUKREA_CPUIMX35 | 154 | config MACH_EUKREA_CPUIMX35 |
129 | bool "Support Eukrea CPUIMX35 Platform" | 155 | bool "Support Eukrea CPUIMX35 Platform" |
130 | select ARCH_MX35 | 156 | select ARCH_MX35 |
157 | select IMX_HAVE_PLATFORM_IMX_UART | ||
158 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
159 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
131 | select MXC_ULPI if USB_ULPI | 160 | select MXC_ULPI if USB_ULPI |
132 | help | 161 | help |
133 | Include support for Eukrea CPUIMX35 platform. This includes | 162 | Include support for Eukrea CPUIMX35 platform. This includes |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index ef68ff55a7b6..54bc935acdc6 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -22,7 +22,7 @@ obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \ | |||
22 | obj-$(CONFIG_MACH_QONG) += mach-qong.o | 22 | obj-$(CONFIG_MACH_QONG) += mach-qong.o |
23 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o | 23 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o |
24 | obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o | 24 | obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o |
25 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35pdk.o | 25 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o |
26 | obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o | 26 | obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o |
27 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o | 27 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o |
28 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD_BASEBOARD) += eukrea_mbimxsd-baseboard.o | 28 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD_BASEBOARD) += eukrea_mbimxsd-baseboard.o |
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h new file mode 100644 index 000000000000..3b1a44a20585 --- /dev/null +++ b/arch/arm/mach-mx3/devices-imx31.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx31.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx31_add_imx_i2c0(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX31_I2C1_BASE_ADDR, SZ_4K, MX31_INT_I2C1, pdata) | ||
14 | #define imx31_add_imx_i2c1(pdata) \ | ||
15 | imx_add_imx_i2c(1, MX31_I2C2_BASE_ADDR, SZ_4K, MX31_INT_I2C2, pdata) | ||
16 | #define imx31_add_imx_i2c2(pdata) \ | ||
17 | imx_add_imx_i2c(2, MX31_I2C3_BASE_ADDR, SZ_4K, MX31_INT_I2C3, pdata) | ||
18 | |||
19 | #define imx31_add_imx_uart0(pdata) \ | ||
20 | imx_add_imx_uart_1irq(0, MX31_UART1_BASE_ADDR, SZ_16K, MX31_INT_UART1, pdata) | ||
21 | #define imx31_add_imx_uart1(pdata) \ | ||
22 | imx_add_imx_uart_1irq(1, MX31_UART2_BASE_ADDR, SZ_16K, MX31_INT_UART2, pdata) | ||
23 | #define imx31_add_imx_uart2(pdata) \ | ||
24 | imx_add_imx_uart_1irq(2, MX31_UART3_BASE_ADDR, SZ_16K, MX31_INT_UART3, pdata) | ||
25 | #define imx31_add_imx_uart3(pdata) \ | ||
26 | imx_add_imx_uart_1irq(3, MX31_UART4_BASE_ADDR, SZ_16K, MX31_INT_UART4, pdata) | ||
27 | #define imx31_add_imx_uart4(pdata) \ | ||
28 | imx_add_imx_uart_1irq(4, MX31_UART5_BASE_ADDR, SZ_16K, MX31_INT_UART5, pdata) | ||
29 | |||
30 | #define imx31_add_mxc_nand(pdata) \ | ||
31 | imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata) | ||
32 | |||
33 | #define imx31_add_spi_imx0(pdata) \ | ||
34 | imx_add_spi_imx(0, MX31_CSPI1_BASE_ADDR, SZ_4K, MX31_INT_CSPI1, pdata) | ||
35 | #define imx31_add_spi_imx1(pdata) \ | ||
36 | imx_add_spi_imx(1, MX31_CSPI2_BASE_ADDR, SZ_4K, MX31_INT_CSPI2, pdata) | ||
37 | #define imx31_add_spi_imx2(pdata) \ | ||
38 | imx_add_spi_imx(2, MX31_CSPI3_BASE_ADDR, SZ_4K, MX31_INT_CSPI3, pdata) | ||
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h new file mode 100644 index 000000000000..536d9b9a250b --- /dev/null +++ b/arch/arm/mach-mx3/devices-imx35.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx35.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx35_add_imx_i2c0(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX35_I2C1_BASE_ADDR, SZ_4K, MX35_INT_I2C1, pdata) | ||
14 | #define imx35_add_imx_i2c1(pdata) \ | ||
15 | imx_add_imx_i2c(1, MX35_I2C2_BASE_ADDR, SZ_4K, MX35_INT_I2C2, pdata) | ||
16 | #define imx35_add_imx_i2c2(pdata) \ | ||
17 | imx_add_imx_i2c(2, MX35_I2C3_BASE_ADDR, SZ_4K, MX35_INT_I2C3, pdata) | ||
18 | |||
19 | #define imx35_add_imx_uart0(pdata) \ | ||
20 | imx_add_imx_uart_1irq(0, MX35_UART1_BASE_ADDR, SZ_16K, MX35_INT_UART1, pdata) | ||
21 | #define imx35_add_imx_uart1(pdata) \ | ||
22 | imx_add_imx_uart_1irq(1, MX35_UART2_BASE_ADDR, SZ_16K, MX35_INT_UART2, pdata) | ||
23 | #define imx35_add_imx_uart2(pdata) \ | ||
24 | imx_add_imx_uart_1irq(2, MX35_UART3_BASE_ADDR, SZ_16K, MX35_INT_UART3, pdata) | ||
25 | |||
26 | #define imx35_add_mxc_nand(pdata) \ | ||
27 | imx_add_mxc_nand_v21(MX35_NFC_BASE_ADDR, MX35_INT_NANDFC, pdata) | ||
28 | |||
29 | #define imx35_add_spi_imx0(pdata) \ | ||
30 | imx_add_spi_imx(0, MX35_CSPI1_BASE_ADDR, SZ_4K, MX35_INT_CSPI1, pdata) | ||
31 | #define imx35_add_spi_imx1(pdata) \ | ||
32 | imx_add_spi_imx(1, MX35_CSPI2_BASE_ADDR, SZ_4K, MX35_INT_CSPI2, pdata) | ||
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index db7acd6e9101..a4fd1a26fc91 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -25,108 +25,10 @@ | |||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <mach/irqs.h> | 26 | #include <mach/irqs.h> |
27 | #include <mach/common.h> | 27 | #include <mach/common.h> |
28 | #include <mach/imx-uart.h> | ||
29 | #include <mach/mx3_camera.h> | 28 | #include <mach/mx3_camera.h> |
30 | 29 | ||
31 | #include "devices.h" | 30 | #include "devices.h" |
32 | 31 | ||
33 | static struct resource uart0[] = { | ||
34 | { | ||
35 | .start = UART1_BASE_ADDR, | ||
36 | .end = UART1_BASE_ADDR + 0x0B5, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, { | ||
39 | .start = MXC_INT_UART1, | ||
40 | .end = MXC_INT_UART1, | ||
41 | .flags = IORESOURCE_IRQ, | ||
42 | }, | ||
43 | }; | ||
44 | |||
45 | struct platform_device mxc_uart_device0 = { | ||
46 | .name = "imx-uart", | ||
47 | .id = 0, | ||
48 | .resource = uart0, | ||
49 | .num_resources = ARRAY_SIZE(uart0), | ||
50 | }; | ||
51 | |||
52 | static struct resource uart1[] = { | ||
53 | { | ||
54 | .start = UART2_BASE_ADDR, | ||
55 | .end = UART2_BASE_ADDR + 0x0B5, | ||
56 | .flags = IORESOURCE_MEM, | ||
57 | }, { | ||
58 | .start = MXC_INT_UART2, | ||
59 | .end = MXC_INT_UART2, | ||
60 | .flags = IORESOURCE_IRQ, | ||
61 | }, | ||
62 | }; | ||
63 | |||
64 | struct platform_device mxc_uart_device1 = { | ||
65 | .name = "imx-uart", | ||
66 | .id = 1, | ||
67 | .resource = uart1, | ||
68 | .num_resources = ARRAY_SIZE(uart1), | ||
69 | }; | ||
70 | |||
71 | static struct resource uart2[] = { | ||
72 | { | ||
73 | .start = UART3_BASE_ADDR, | ||
74 | .end = UART3_BASE_ADDR + 0x0B5, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, { | ||
77 | .start = MXC_INT_UART3, | ||
78 | .end = MXC_INT_UART3, | ||
79 | .flags = IORESOURCE_IRQ, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | struct platform_device mxc_uart_device2 = { | ||
84 | .name = "imx-uart", | ||
85 | .id = 2, | ||
86 | .resource = uart2, | ||
87 | .num_resources = ARRAY_SIZE(uart2), | ||
88 | }; | ||
89 | |||
90 | #ifdef CONFIG_ARCH_MX31 | ||
91 | static struct resource uart3[] = { | ||
92 | { | ||
93 | .start = UART4_BASE_ADDR, | ||
94 | .end = UART4_BASE_ADDR + 0x0B5, | ||
95 | .flags = IORESOURCE_MEM, | ||
96 | }, { | ||
97 | .start = MXC_INT_UART4, | ||
98 | .end = MXC_INT_UART4, | ||
99 | .flags = IORESOURCE_IRQ, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | struct platform_device mxc_uart_device3 = { | ||
104 | .name = "imx-uart", | ||
105 | .id = 3, | ||
106 | .resource = uart3, | ||
107 | .num_resources = ARRAY_SIZE(uart3), | ||
108 | }; | ||
109 | |||
110 | static struct resource uart4[] = { | ||
111 | { | ||
112 | .start = UART5_BASE_ADDR, | ||
113 | .end = UART5_BASE_ADDR + 0x0B5, | ||
114 | .flags = IORESOURCE_MEM, | ||
115 | }, { | ||
116 | .start = MXC_INT_UART5, | ||
117 | .end = MXC_INT_UART5, | ||
118 | .flags = IORESOURCE_IRQ, | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | struct platform_device mxc_uart_device4 = { | ||
123 | .name = "imx-uart", | ||
124 | .id = 4, | ||
125 | .resource = uart4, | ||
126 | .num_resources = ARRAY_SIZE(uart4), | ||
127 | }; | ||
128 | #endif /* CONFIG_ARCH_MX31 */ | ||
129 | |||
130 | /* GPIO port description */ | 32 | /* GPIO port description */ |
131 | static struct mxc_gpio_port imx_gpio_ports[] = { | 33 | static struct mxc_gpio_port imx_gpio_ports[] = { |
132 | { | 34 | { |
@@ -147,7 +49,7 @@ static struct mxc_gpio_port imx_gpio_ports[] = { | |||
147 | } | 49 | } |
148 | }; | 50 | }; |
149 | 51 | ||
150 | int __init mxc_register_gpios(void) | 52 | int __init imx3x_register_gpios(void) |
151 | { | 53 | { |
152 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 54 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
153 | } | 55 | } |
@@ -167,82 +69,6 @@ struct platform_device mxc_w1_master_device = { | |||
167 | .resource = mxc_w1_master_resources, | 69 | .resource = mxc_w1_master_resources, |
168 | }; | 70 | }; |
169 | 71 | ||
170 | static struct resource mxc_nand_resources[] = { | ||
171 | { | ||
172 | .start = 0, /* runtime dependent */ | ||
173 | .end = 0, | ||
174 | .flags = IORESOURCE_MEM, | ||
175 | }, { | ||
176 | .start = MXC_INT_NANDFC, | ||
177 | .end = MXC_INT_NANDFC, | ||
178 | .flags = IORESOURCE_IRQ, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | struct platform_device mxc_nand_device = { | ||
183 | .name = "mxc_nand", | ||
184 | .id = 0, | ||
185 | .num_resources = ARRAY_SIZE(mxc_nand_resources), | ||
186 | .resource = mxc_nand_resources, | ||
187 | }; | ||
188 | |||
189 | static struct resource mxc_i2c0_resources[] = { | ||
190 | { | ||
191 | .start = I2C_BASE_ADDR, | ||
192 | .end = I2C_BASE_ADDR + SZ_4K - 1, | ||
193 | .flags = IORESOURCE_MEM, | ||
194 | }, { | ||
195 | .start = MXC_INT_I2C, | ||
196 | .end = MXC_INT_I2C, | ||
197 | .flags = IORESOURCE_IRQ, | ||
198 | }, | ||
199 | }; | ||
200 | |||
201 | struct platform_device mxc_i2c_device0 = { | ||
202 | .name = "imx-i2c", | ||
203 | .id = 0, | ||
204 | .num_resources = ARRAY_SIZE(mxc_i2c0_resources), | ||
205 | .resource = mxc_i2c0_resources, | ||
206 | }; | ||
207 | |||
208 | static struct resource mxc_i2c1_resources[] = { | ||
209 | { | ||
210 | .start = I2C2_BASE_ADDR, | ||
211 | .end = I2C2_BASE_ADDR + SZ_4K - 1, | ||
212 | .flags = IORESOURCE_MEM, | ||
213 | }, { | ||
214 | .start = MXC_INT_I2C2, | ||
215 | .end = MXC_INT_I2C2, | ||
216 | .flags = IORESOURCE_IRQ, | ||
217 | }, | ||
218 | }; | ||
219 | |||
220 | struct platform_device mxc_i2c_device1 = { | ||
221 | .name = "imx-i2c", | ||
222 | .id = 1, | ||
223 | .num_resources = ARRAY_SIZE(mxc_i2c1_resources), | ||
224 | .resource = mxc_i2c1_resources, | ||
225 | }; | ||
226 | |||
227 | static struct resource mxc_i2c2_resources[] = { | ||
228 | { | ||
229 | .start = I2C3_BASE_ADDR, | ||
230 | .end = I2C3_BASE_ADDR + SZ_4K - 1, | ||
231 | .flags = IORESOURCE_MEM, | ||
232 | }, { | ||
233 | .start = MXC_INT_I2C3, | ||
234 | .end = MXC_INT_I2C3, | ||
235 | .flags = IORESOURCE_IRQ, | ||
236 | }, | ||
237 | }; | ||
238 | |||
239 | struct platform_device mxc_i2c_device2 = { | ||
240 | .name = "imx-i2c", | ||
241 | .id = 2, | ||
242 | .num_resources = ARRAY_SIZE(mxc_i2c2_resources), | ||
243 | .resource = mxc_i2c2_resources, | ||
244 | }; | ||
245 | |||
246 | #ifdef CONFIG_ARCH_MX31 | 72 | #ifdef CONFIG_ARCH_MX31 |
247 | static struct resource mxcsdhc0_resources[] = { | 73 | static struct resource mxcsdhc0_resources[] = { |
248 | { | 74 | { |
@@ -455,68 +281,7 @@ struct platform_device mxc_usbh2 = { | |||
455 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), | 281 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), |
456 | }; | 282 | }; |
457 | 283 | ||
458 | /* | 284 | #if defined(CONFIG_ARCH_MX35) |
459 | * SPI master controller | ||
460 | * 3 channels | ||
461 | */ | ||
462 | static struct resource mxc_spi_0_resources[] = { | ||
463 | { | ||
464 | .start = CSPI1_BASE_ADDR, | ||
465 | .end = CSPI1_BASE_ADDR + SZ_4K - 1, | ||
466 | .flags = IORESOURCE_MEM, | ||
467 | }, { | ||
468 | .start = MXC_INT_CSPI1, | ||
469 | .end = MXC_INT_CSPI1, | ||
470 | .flags = IORESOURCE_IRQ, | ||
471 | }, | ||
472 | }; | ||
473 | |||
474 | static struct resource mxc_spi_1_resources[] = { | ||
475 | { | ||
476 | .start = CSPI2_BASE_ADDR, | ||
477 | .end = CSPI2_BASE_ADDR + SZ_4K - 1, | ||
478 | .flags = IORESOURCE_MEM, | ||
479 | }, { | ||
480 | .start = MXC_INT_CSPI2, | ||
481 | .end = MXC_INT_CSPI2, | ||
482 | .flags = IORESOURCE_IRQ, | ||
483 | }, | ||
484 | }; | ||
485 | |||
486 | static struct resource mxc_spi_2_resources[] = { | ||
487 | { | ||
488 | .start = CSPI3_BASE_ADDR, | ||
489 | .end = CSPI3_BASE_ADDR + SZ_4K - 1, | ||
490 | .flags = IORESOURCE_MEM, | ||
491 | }, { | ||
492 | .start = MXC_INT_CSPI3, | ||
493 | .end = MXC_INT_CSPI3, | ||
494 | .flags = IORESOURCE_IRQ, | ||
495 | }, | ||
496 | }; | ||
497 | |||
498 | struct platform_device mxc_spi_device0 = { | ||
499 | .name = "spi_imx", | ||
500 | .id = 0, | ||
501 | .num_resources = ARRAY_SIZE(mxc_spi_0_resources), | ||
502 | .resource = mxc_spi_0_resources, | ||
503 | }; | ||
504 | |||
505 | struct platform_device mxc_spi_device1 = { | ||
506 | .name = "spi_imx", | ||
507 | .id = 1, | ||
508 | .num_resources = ARRAY_SIZE(mxc_spi_1_resources), | ||
509 | .resource = mxc_spi_1_resources, | ||
510 | }; | ||
511 | |||
512 | struct platform_device mxc_spi_device2 = { | ||
513 | .name = "spi_imx", | ||
514 | .id = 2, | ||
515 | .num_resources = ARRAY_SIZE(mxc_spi_2_resources), | ||
516 | .resource = mxc_spi_2_resources, | ||
517 | }; | ||
518 | |||
519 | #ifdef CONFIG_ARCH_MX35 | ||
520 | static struct resource mxc_fec_resources[] = { | 285 | static struct resource mxc_fec_resources[] = { |
521 | { | 286 | { |
522 | .start = MXC_FEC_BASE_ADDR, | 287 | .start = MXC_FEC_BASE_ADDR, |
@@ -628,16 +393,15 @@ struct platform_device imx_kpp_device = { | |||
628 | 393 | ||
629 | static int __init mx3_devices_init(void) | 394 | static int __init mx3_devices_init(void) |
630 | { | 395 | { |
396 | #if defined(CONFIG_ARCH_MX31) | ||
631 | if (cpu_is_mx31()) { | 397 | if (cpu_is_mx31()) { |
632 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; | ||
633 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; | ||
634 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; | 398 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; |
635 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; | 399 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; |
636 | mxc_register_device(&mxc_rnga_device, NULL); | 400 | mxc_register_device(&mxc_rnga_device, NULL); |
637 | } | 401 | } |
402 | #endif | ||
403 | #if defined(CONFIG_ARCH_MX35) | ||
638 | if (cpu_is_mx35()) { | 404 | if (cpu_is_mx35()) { |
639 | mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; | ||
640 | mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0x1fff; | ||
641 | otg_resources[0].start = MX35_OTG_BASE_ADDR; | 405 | otg_resources[0].start = MX35_OTG_BASE_ADDR; |
642 | otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; | 406 | otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; |
643 | otg_resources[1].start = MXC_INT_USBOTG; | 407 | otg_resources[1].start = MXC_INT_USBOTG; |
@@ -653,6 +417,7 @@ static int __init mx3_devices_init(void) | |||
653 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; | 417 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; |
654 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; | 418 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; |
655 | } | 419 | } |
420 | #endif | ||
656 | 421 | ||
657 | return 0; | 422 | return 0; |
658 | } | 423 | } |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 2c3c8646a29e..e5535234839f 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -1,14 +1,4 @@ | |||
1 | |||
2 | extern struct platform_device mxc_uart_device0; | ||
3 | extern struct platform_device mxc_uart_device1; | ||
4 | extern struct platform_device mxc_uart_device2; | ||
5 | extern struct platform_device mxc_uart_device3; | ||
6 | extern struct platform_device mxc_uart_device4; | ||
7 | extern struct platform_device mxc_w1_master_device; | 1 | extern struct platform_device mxc_w1_master_device; |
8 | extern struct platform_device mxc_nand_device; | ||
9 | extern struct platform_device mxc_i2c_device0; | ||
10 | extern struct platform_device mxc_i2c_device1; | ||
11 | extern struct platform_device mxc_i2c_device2; | ||
12 | extern struct platform_device mx3_ipu; | 2 | extern struct platform_device mx3_ipu; |
13 | extern struct platform_device mx3_fb; | 3 | extern struct platform_device mx3_fb; |
14 | extern struct platform_device mx3_camera; | 4 | extern struct platform_device mx3_camera; |
@@ -20,9 +10,6 @@ extern struct platform_device mxc_otg_host; | |||
20 | extern struct platform_device mxc_usbh1; | 10 | extern struct platform_device mxc_usbh1; |
21 | extern struct platform_device mxc_usbh2; | 11 | extern struct platform_device mxc_usbh2; |
22 | extern struct platform_device mxc_rnga_device; | 12 | extern struct platform_device mxc_rnga_device; |
23 | extern struct platform_device mxc_spi_device0; | ||
24 | extern struct platform_device mxc_spi_device1; | ||
25 | extern struct platform_device mxc_spi_device2; | ||
26 | extern struct platform_device imx_ssi_device0; | 13 | extern struct platform_device imx_ssi_device0; |
27 | extern struct platform_device imx_ssi_device1; | 14 | extern struct platform_device imx_ssi_device1; |
28 | extern struct platform_device imx_ssi_device1; | 15 | extern struct platform_device imx_ssi_device1; |
diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c index 678597852443..368a603accfe 100644 --- a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <mach/audmux.h> | 46 | #include <mach/audmux.h> |
47 | #include <mach/ssi.h> | 47 | #include <mach/ssi.h> |
48 | 48 | ||
49 | #include "devices-imx35.h" | ||
49 | #include "devices.h" | 50 | #include "devices.h" |
50 | 51 | ||
51 | static const struct fb_videomode fb_modedb[] = { | 52 | static const struct fb_videomode fb_modedb[] = { |
@@ -196,7 +197,7 @@ static struct platform_device *platform_devices[] __initdata = { | |||
196 | &eukrea_mbimxsd_lcd_powerdev, | 197 | &eukrea_mbimxsd_lcd_powerdev, |
197 | }; | 198 | }; |
198 | 199 | ||
199 | static struct imxuart_platform_data uart_pdata = { | 200 | static const struct imxuart_platform_data uart_pdata __initconst = { |
200 | .flags = IMXUART_HAVE_RTSCTS, | 201 | .flags = IMXUART_HAVE_RTSCTS, |
201 | }; | 202 | }; |
202 | 203 | ||
@@ -238,7 +239,7 @@ void __init eukrea_mbimxsd_baseboard_init(void) | |||
238 | ); | 239 | ); |
239 | #endif | 240 | #endif |
240 | 241 | ||
241 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 242 | imx35_add_imx_uart1(&uart_pdata); |
242 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 243 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
243 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 244 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
244 | 245 | ||
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 5f72ec91af2d..96aadcadb4ff 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -48,16 +48,14 @@ | |||
48 | #include <asm/mach/map.h> | 48 | #include <asm/mach/map.h> |
49 | 49 | ||
50 | #include <mach/common.h> | 50 | #include <mach/common.h> |
51 | #include <mach/imx-uart.h> | ||
52 | #include <mach/iomux-mx3.h> | 51 | #include <mach/iomux-mx3.h> |
53 | #include <mach/board-armadillo5x0.h> | ||
54 | #include <mach/mmc.h> | 52 | #include <mach/mmc.h> |
55 | #include <mach/ipu.h> | 53 | #include <mach/ipu.h> |
56 | #include <mach/mx3fb.h> | 54 | #include <mach/mx3fb.h> |
57 | #include <mach/mxc_nand.h> | ||
58 | #include <mach/mxc_ehci.h> | 55 | #include <mach/mxc_ehci.h> |
59 | #include <mach/ulpi.h> | 56 | #include <mach/ulpi.h> |
60 | 57 | ||
58 | #include "devices-imx31.h" | ||
61 | #include "devices.h" | 59 | #include "devices.h" |
62 | #include "crm_regs.h" | 60 | #include "crm_regs.h" |
63 | 61 | ||
@@ -301,7 +299,8 @@ static struct platform_device armadillo5x0_button_device = { | |||
301 | /* | 299 | /* |
302 | * NAND Flash | 300 | * NAND Flash |
303 | */ | 301 | */ |
304 | static struct mxc_nand_platform_data armadillo5x0_nand_flash_pdata = { | 302 | static const struct mxc_nand_platform_data |
303 | armadillo5x0_nand_board_info __initconst = { | ||
305 | .width = 1, | 304 | .width = 1, |
306 | .hw_ecc = 1, | 305 | .hw_ecc = 1, |
307 | }; | 306 | }; |
@@ -493,13 +492,12 @@ static struct platform_device armadillo5x0_smc911x_device = { | |||
493 | }; | 492 | }; |
494 | 493 | ||
495 | /* UART device data */ | 494 | /* UART device data */ |
496 | static struct imxuart_platform_data uart_pdata = { | 495 | static const struct imxuart_platform_data uart_pdata __initconst = { |
497 | .flags = IMXUART_HAVE_RTSCTS, | 496 | .flags = IMXUART_HAVE_RTSCTS, |
498 | }; | 497 | }; |
499 | 498 | ||
500 | static struct platform_device *devices[] __initdata = { | 499 | static struct platform_device *devices[] __initdata = { |
501 | &armadillo5x0_smc911x_device, | 500 | &armadillo5x0_smc911x_device, |
502 | &mxc_i2c_device1, | ||
503 | &armadillo5x0_button_device, | 501 | &armadillo5x0_button_device, |
504 | }; | 502 | }; |
505 | 503 | ||
@@ -512,10 +510,11 @@ static void __init armadillo5x0_init(void) | |||
512 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); | 510 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); |
513 | 511 | ||
514 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 512 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
513 | imx31_add_imx_i2c1(NULL); | ||
515 | 514 | ||
516 | /* Register UART */ | 515 | /* Register UART */ |
517 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 516 | imx31_add_imx_uart0(&uart_pdata); |
518 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 517 | imx31_add_imx_uart1(&uart_pdata); |
519 | 518 | ||
520 | /* SMSC9118 IRQ pin */ | 519 | /* SMSC9118 IRQ pin */ |
521 | gpio_direction_input(MX31_PIN_GPIO1_0); | 520 | gpio_direction_input(MX31_PIN_GPIO1_0); |
@@ -532,7 +531,7 @@ static void __init armadillo5x0_init(void) | |||
532 | &armadillo5x0_nor_flash_pdata); | 531 | &armadillo5x0_nor_flash_pdata); |
533 | 532 | ||
534 | /* Register NAND Flash */ | 533 | /* Register NAND Flash */ |
535 | mxc_register_device(&mxc_nand_device, &armadillo5x0_nand_flash_pdata); | 534 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); |
536 | 535 | ||
537 | /* set NAND page size to 2k if not configured via boot mode pins */ | 536 | /* set NAND page size to 2k if not configured via boot mode pins */ |
538 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); | 537 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); |
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c index 55caa5cb8bc7..4f6146d31328 100644 --- a/arch/arm/mach-mx3/mach-cpuimx35.c +++ b/arch/arm/mach-mx3/mach-cpuimx35.c | |||
@@ -40,20 +40,20 @@ | |||
40 | #include <mach/board-eukrea_cpuimx35.h> | 40 | #include <mach/board-eukrea_cpuimx35.h> |
41 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
42 | #include <mach/common.h> | 42 | #include <mach/common.h> |
43 | #include <mach/imx-uart.h> | ||
44 | #include <mach/i2c.h> | ||
45 | #include <mach/iomux-mx35.h> | 43 | #include <mach/iomux-mx35.h> |
46 | #include <mach/mxc_nand.h> | 44 | #include <mach/mxc_nand.h> |
47 | #include <mach/mxc_ehci.h> | 45 | #include <mach/mxc_ehci.h> |
48 | #include <mach/ulpi.h> | 46 | #include <mach/ulpi.h> |
49 | 47 | ||
48 | #include "devices-imx35.h" | ||
50 | #include "devices.h" | 49 | #include "devices.h" |
51 | 50 | ||
52 | static struct imxuart_platform_data uart_pdata = { | 51 | static const struct imxuart_platform_data uart_pdata __initconst = { |
53 | .flags = IMXUART_HAVE_RTSCTS, | 52 | .flags = IMXUART_HAVE_RTSCTS, |
54 | }; | 53 | }; |
55 | 54 | ||
56 | static struct imxi2c_platform_data eukrea_cpuimx35_i2c_1_data = { | 55 | static const struct imxi2c_platform_data |
56 | eukrea_cpuimx35_i2c0_data __initconst = { | ||
57 | .bitrate = 50000, | 57 | .bitrate = 50000, |
58 | }; | 58 | }; |
59 | 59 | ||
@@ -134,7 +134,8 @@ static struct pad_desc eukrea_cpuimx35_pads[] = { | |||
134 | MX35_PAD_ATA_DA2__GPIO3_2, | 134 | MX35_PAD_ATA_DA2__GPIO3_2, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | static struct mxc_nand_platform_data pcm037_nand_board_info = { | 137 | static const struct mxc_nand_platform_data |
138 | eukrea_cpuimx35_nand_board_info __initconst = { | ||
138 | .width = 1, | 139 | .width = 1, |
139 | .hw_ecc = 1, | 140 | .hw_ecc = 1, |
140 | .flash_bbt = 1, | 141 | .flash_bbt = 1, |
@@ -181,12 +182,12 @@ static void __init mxc_board_init(void) | |||
181 | 182 | ||
182 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 183 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
183 | 184 | ||
184 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 185 | imx35_add_imx_uart0(&uart_pdata); |
185 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 186 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); |
186 | 187 | ||
187 | i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices, | 188 | i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices, |
188 | ARRAY_SIZE(eukrea_cpuimx35_i2c_devices)); | 189 | ARRAY_SIZE(eukrea_cpuimx35_i2c_devices)); |
189 | mxc_register_device(&mxc_i2c_device0, &eukrea_cpuimx35_i2c_1_data); | 190 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); |
190 | 191 | ||
191 | #if defined(CONFIG_USB_ULPI) | 192 | #if defined(CONFIG_USB_ULPI) |
192 | if (otg_mode_host) { | 193 | if (otg_mode_host) { |
diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c index f085d5d1a6de..5b23e416d6c7 100644 --- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c +++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c | |||
@@ -16,10 +16,6 @@ | |||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. | 18 | * GNU General Public License for more details. |
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | */ | 19 | */ |
24 | 20 | ||
25 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
@@ -37,13 +33,12 @@ | |||
37 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
38 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
39 | 35 | ||
40 | #include <mach/board-kzmarm11.h> | ||
41 | #include <mach/clock.h> | 36 | #include <mach/clock.h> |
42 | #include <mach/common.h> | 37 | #include <mach/common.h> |
43 | #include <mach/imx-uart.h> | ||
44 | #include <mach/iomux-mx3.h> | 38 | #include <mach/iomux-mx3.h> |
45 | #include <mach/memory.h> | 39 | #include <mach/memory.h> |
46 | 40 | ||
41 | #include "devices-imx31.h" | ||
47 | #include "devices.h" | 42 | #include "devices.h" |
48 | 43 | ||
49 | #define KZM_ARM11_IO_ADDRESS(x) ( \ | 44 | #define KZM_ARM11_IO_ADDRESS(x) ( \ |
@@ -51,6 +46,23 @@ | |||
51 | IMX_IO_ADDRESS(x, MX31_CS5) ?: \ | 46 | IMX_IO_ADDRESS(x, MX31_CS5) ?: \ |
52 | MX31_IO_ADDRESS(x)) | 47 | MX31_IO_ADDRESS(x)) |
53 | 48 | ||
49 | /* | ||
50 | * KZM-ARM11-01 Board Control Registers on FPGA | ||
51 | */ | ||
52 | #define KZM_ARM11_CTL1 (MX31_CS4_BASE_ADDR + 0x1000) | ||
53 | #define KZM_ARM11_CTL2 (MX31_CS4_BASE_ADDR + 0x1001) | ||
54 | #define KZM_ARM11_RSW1 (MX31_CS4_BASE_ADDR + 0x1002) | ||
55 | #define KZM_ARM11_BACK_LIGHT (MX31_CS4_BASE_ADDR + 0x1004) | ||
56 | #define KZM_ARM11_FPGA_REV (MX31_CS4_BASE_ADDR + 0x1008) | ||
57 | #define KZM_ARM11_7SEG_LED (MX31_CS4_BASE_ADDR + 0x1010) | ||
58 | #define KZM_ARM11_LEDS (MX31_CS4_BASE_ADDR + 0x1020) | ||
59 | #define KZM_ARM11_DIPSW2 (MX31_CS4_BASE_ADDR + 0x1003) | ||
60 | |||
61 | /* | ||
62 | * External UART for touch panel on FPGA | ||
63 | */ | ||
64 | #define KZM_ARM11_16550 (MX31_CS4_BASE_ADDR + 0x1050) | ||
65 | |||
54 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 66 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
55 | /* | 67 | /* |
56 | * KZM-ARM11-01 has an external UART on FPGA | 68 | * KZM-ARM11-01 has an external UART on FPGA |
@@ -173,15 +185,14 @@ static inline int kzm_init_smsc9118(void) | |||
173 | #endif | 185 | #endif |
174 | 186 | ||
175 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | 187 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) |
176 | static struct imxuart_platform_data uart_pdata = { | 188 | static const struct imxuart_platform_data uart_pdata __initconst = { |
177 | .flags = IMXUART_HAVE_RTSCTS, | 189 | .flags = IMXUART_HAVE_RTSCTS, |
178 | }; | 190 | }; |
179 | 191 | ||
180 | static void __init kzm_init_imx_uart(void) | 192 | static void __init kzm_init_imx_uart(void) |
181 | { | 193 | { |
182 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 194 | imx31_add_imx_uart0(&uart_pdata); |
183 | 195 | imx31_add_imx_uart1(&uart_pdata); | |
184 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
185 | } | 196 | } |
186 | #else | 197 | #else |
187 | static inline void kzm_init_imx_uart(void) | 198 | static inline void kzm_init_imx_uart(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index 7e8d09ab9e6c..d4d9e7a1f735 100644 --- a/arch/arm/mach-mx3/mach-mx31_3ds.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
@@ -37,19 +33,46 @@ | |||
37 | #include <asm/memory.h> | 33 | #include <asm/memory.h> |
38 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
39 | #include <mach/common.h> | 35 | #include <mach/common.h> |
40 | #include <mach/board-mx31_3ds.h> | ||
41 | #include <mach/imx-uart.h> | ||
42 | #include <mach/iomux-mx3.h> | 36 | #include <mach/iomux-mx3.h> |
43 | #include <mach/mxc_nand.h> | 37 | |
44 | #include <mach/spi.h> | 38 | #include "devices-imx31.h" |
45 | #include "devices.h" | 39 | #include "devices.h" |
46 | 40 | ||
47 | /*! | 41 | /* Definitions for components on the Debug board */ |
48 | * @file mx31_3ds.c | 42 | |
49 | * | 43 | /* Base address of CPLD controller on the Debug board */ |
50 | * @brief This file contains the board-specific initialization routines. | 44 | #define DEBUG_BASE_ADDRESS CS5_IO_ADDRESS(MX3x_CS5_BASE_ADDR) |
51 | * | 45 | |
52 | * @ingroup System | 46 | /* LAN9217 ethernet base address */ |
47 | #define LAN9217_BASE_ADDR MX3x_CS5_BASE_ADDR | ||
48 | |||
49 | /* CPLD config and interrupt base address */ | ||
50 | #define CPLD_ADDR (DEBUG_BASE_ADDRESS + 0x20000) | ||
51 | |||
52 | /* status, interrupt */ | ||
53 | #define CPLD_INT_STATUS_REG (CPLD_ADDR + 0x10) | ||
54 | #define CPLD_INT_MASK_REG (CPLD_ADDR + 0x38) | ||
55 | #define CPLD_INT_RESET_REG (CPLD_ADDR + 0x20) | ||
56 | /* magic word for debug CPLD */ | ||
57 | #define CPLD_MAGIC_NUMBER1_REG (CPLD_ADDR + 0x40) | ||
58 | #define CPLD_MAGIC_NUMBER2_REG (CPLD_ADDR + 0x48) | ||
59 | /* CPLD code version */ | ||
60 | #define CPLD_CODE_VER_REG (CPLD_ADDR + 0x50) | ||
61 | /* magic word for debug CPLD */ | ||
62 | #define CPLD_MAGIC_NUMBER3_REG (CPLD_ADDR + 0x58) | ||
63 | |||
64 | /* CPLD IRQ line for external uart, external ethernet etc */ | ||
65 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) | ||
66 | |||
67 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
68 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
69 | |||
70 | #define EXPIO_INT_ENET (MXC_EXP_IO_BASE + 0) | ||
71 | |||
72 | #define MXC_MAX_EXP_IO_LINES 16 | ||
73 | |||
74 | /* | ||
75 | * This file contains the board-specific initialization routines. | ||
53 | */ | 76 | */ |
54 | 77 | ||
55 | static int mx31_3ds_pins[] = { | 78 | static int mx31_3ds_pins[] = { |
@@ -145,7 +168,7 @@ static int spi1_internal_chipselect[] = { | |||
145 | MXC_SPI_CS(2), | 168 | MXC_SPI_CS(2), |
146 | }; | 169 | }; |
147 | 170 | ||
148 | static struct spi_imx_master spi1_pdata = { | 171 | static const struct spi_imx_master spi1_pdata __initconst = { |
149 | .chipselect = spi1_internal_chipselect, | 172 | .chipselect = spi1_internal_chipselect, |
150 | .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), | 173 | .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), |
151 | }; | 174 | }; |
@@ -165,7 +188,8 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
165 | /* | 188 | /* |
166 | * NAND Flash | 189 | * NAND Flash |
167 | */ | 190 | */ |
168 | static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = { | 191 | static const struct mxc_nand_platform_data |
192 | mx31_3ds_nand_board_info __initconst = { | ||
169 | .width = 1, | 193 | .width = 1, |
170 | .hw_ecc = 1, | 194 | .hw_ecc = 1, |
171 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT | 195 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT |
@@ -225,7 +249,7 @@ static struct fsl_usb2_platform_data usbotg_pdata = { | |||
225 | .phy_mode = FSL_USB2_PHY_ULPI, | 249 | .phy_mode = FSL_USB2_PHY_ULPI, |
226 | }; | 250 | }; |
227 | 251 | ||
228 | static struct imxuart_platform_data uart_pdata = { | 252 | static const struct imxuart_platform_data uart_pdata __initconst = { |
229 | .flags = IMXUART_HAVE_RTSCTS, | 253 | .flags = IMXUART_HAVE_RTSCTS, |
230 | }; | 254 | }; |
231 | 255 | ||
@@ -407,10 +431,10 @@ static void __init mxc_board_init(void) | |||
407 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), | 431 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), |
408 | "mx31_3ds"); | 432 | "mx31_3ds"); |
409 | 433 | ||
410 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 434 | imx31_add_imx_uart0(&uart_pdata); |
411 | mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata); | 435 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); |
412 | 436 | ||
413 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 437 | imx31_add_spi_imx0(&spi1_pdata); |
414 | spi_register_board_info(mx31_3ds_spi_devs, | 438 | spi_register_board_info(mx31_3ds_spi_devs, |
415 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 439 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
416 | 440 | ||
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c index b3d1a1895c20..94b3e7c42404 100644 --- a/arch/arm/mach-mx3/mach-mx31ads.c +++ b/arch/arm/mach-mx3/mach-mx31ads.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/types.h> | 17 | #include <linux/types.h> |
@@ -33,8 +29,6 @@ | |||
33 | #include <asm/memory.h> | 29 | #include <asm/memory.h> |
34 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
35 | #include <mach/common.h> | 31 | #include <mach/common.h> |
36 | #include <mach/board-mx31ads.h> | ||
37 | #include <mach/imx-uart.h> | ||
38 | #include <mach/iomux-mx3.h> | 32 | #include <mach/iomux-mx3.h> |
39 | 33 | ||
40 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | 34 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 |
@@ -43,14 +37,45 @@ | |||
43 | #include <linux/mfd/wm8350/pmic.h> | 37 | #include <linux/mfd/wm8350/pmic.h> |
44 | #endif | 38 | #endif |
45 | 39 | ||
40 | #include "devices-imx31.h" | ||
46 | #include "devices.h" | 41 | #include "devices.h" |
47 | 42 | ||
48 | /*! | 43 | /* Base address of PBC controller */ |
49 | * @file mx31ads.c | 44 | #define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT |
50 | * | 45 | /* Offsets for the PBC Controller register */ |
51 | * @brief This file contains the board-specific initialization routines. | 46 | |
52 | * | 47 | /* PBC Board interrupt status register */ |
53 | * @ingroup System | 48 | #define PBC_INTSTATUS 0x000016 |
49 | |||
50 | /* PBC Board interrupt current status register */ | ||
51 | #define PBC_INTCURR_STATUS 0x000018 | ||
52 | |||
53 | /* PBC Interrupt mask register set address */ | ||
54 | #define PBC_INTMASK_SET 0x00001A | ||
55 | |||
56 | /* PBC Interrupt mask register clear address */ | ||
57 | #define PBC_INTMASK_CLEAR 0x00001C | ||
58 | |||
59 | /* External UART A */ | ||
60 | #define PBC_SC16C652_UARTA 0x010000 | ||
61 | |||
62 | /* External UART B */ | ||
63 | #define PBC_SC16C652_UARTB 0x010010 | ||
64 | |||
65 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) | ||
66 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) | ||
67 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | ||
68 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | ||
69 | |||
70 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
71 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
72 | |||
73 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) | ||
74 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) | ||
75 | |||
76 | #define MXC_MAX_EXP_IO_LINES 16 | ||
77 | /* | ||
78 | * This file contains the board-specific initialization routines. | ||
54 | */ | 79 | */ |
55 | 80 | ||
56 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 81 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
@@ -98,7 +123,7 @@ static inline int mxc_init_extuart(void) | |||
98 | #endif | 123 | #endif |
99 | 124 | ||
100 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | 125 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) |
101 | static struct imxuart_platform_data uart_pdata = { | 126 | static const struct imxuart_platform_data uart_pdata __initconst = { |
102 | .flags = IMXUART_HAVE_RTSCTS, | 127 | .flags = IMXUART_HAVE_RTSCTS, |
103 | }; | 128 | }; |
104 | 129 | ||
@@ -112,7 +137,7 @@ static unsigned int uart_pins[] = { | |||
112 | static inline void mxc_init_imx_uart(void) | 137 | static inline void mxc_init_imx_uart(void) |
113 | { | 138 | { |
114 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0"); | 139 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0"); |
115 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 140 | imx31_add_imx_uart0(&uart_pdata); |
116 | } | 141 | } |
117 | #else /* !SERIAL_IMX */ | 142 | #else /* !SERIAL_IMX */ |
118 | static inline void mxc_init_imx_uart(void) | 143 | static inline void mxc_init_imx_uart(void) |
@@ -475,7 +500,7 @@ static void mxc_init_i2c(void) | |||
475 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1)); | 500 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1)); |
476 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1)); | 501 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1)); |
477 | 502 | ||
478 | mxc_register_device(&mxc_i2c_device1, NULL); | 503 | imx31_add_imx_i2c1(NULL); |
479 | } | 504 | } |
480 | #else | 505 | #else |
481 | static void mxc_init_i2c(void) | 506 | static void mxc_init_i2c(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c index 46bf57c44372..84942cf41b63 100644 --- a/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/arch/arm/mach-mx3/mach-mx31lilly.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | 21 | */ |
26 | 22 | ||
27 | #include <linux/types.h> | 23 | #include <linux/types.h> |
@@ -46,10 +42,10 @@ | |||
46 | #include <mach/common.h> | 42 | #include <mach/common.h> |
47 | #include <mach/iomux-mx3.h> | 43 | #include <mach/iomux-mx3.h> |
48 | #include <mach/board-mx31lilly.h> | 44 | #include <mach/board-mx31lilly.h> |
49 | #include <mach/spi.h> | ||
50 | #include <mach/mxc_ehci.h> | 45 | #include <mach/mxc_ehci.h> |
51 | #include <mach/ulpi.h> | 46 | #include <mach/ulpi.h> |
52 | 47 | ||
48 | #include "devices-imx31.h" | ||
53 | #include "devices.h" | 49 | #include "devices.h" |
54 | 50 | ||
55 | /* | 51 | /* |
@@ -257,12 +253,12 @@ static int spi_internal_chipselect[] = { | |||
257 | MXC_SPI_CS(2), | 253 | MXC_SPI_CS(2), |
258 | }; | 254 | }; |
259 | 255 | ||
260 | static struct spi_imx_master spi0_pdata = { | 256 | static const struct spi_imx_master spi0_pdata __initconst = { |
261 | .chipselect = spi_internal_chipselect, | 257 | .chipselect = spi_internal_chipselect, |
262 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 258 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
263 | }; | 259 | }; |
264 | 260 | ||
265 | static struct spi_imx_master spi1_pdata = { | 261 | static const struct spi_imx_master spi1_pdata __initconst = { |
266 | .chipselect = spi_internal_chipselect, | 262 | .chipselect = spi_internal_chipselect, |
267 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 263 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
268 | }; | 264 | }; |
@@ -315,8 +311,8 @@ static void __init mx31lilly_board_init(void) | |||
315 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS1__SS1, "SPI2_SS1"); | 311 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS1__SS1, "SPI2_SS1"); |
316 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS2__SS2, "SPI2_SS2"); | 312 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS2__SS2, "SPI2_SS2"); |
317 | 313 | ||
318 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | 314 | imx31_add_spi_imx0(&spi0_pdata); |
319 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 315 | imx31_add_spi_imx1(&spi1_pdata); |
320 | spi_register_board_info(&mc13783_dev, 1); | 316 | spi_register_board_info(&mc13783_dev, 1); |
321 | 317 | ||
322 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 318 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c index 2b6d11400877..da236c497d2a 100644 --- a/arch/arm/mach-mx3/mach-mx31lite.c +++ b/arch/arm/mach-mx3/mach-mx31lite.c | |||
@@ -13,10 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | 16 | */ |
21 | 17 | ||
22 | #include <linux/types.h> | 18 | #include <linux/types.h> |
@@ -42,14 +38,12 @@ | |||
42 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
43 | #include <mach/common.h> | 39 | #include <mach/common.h> |
44 | #include <mach/board-mx31lite.h> | 40 | #include <mach/board-mx31lite.h> |
45 | #include <mach/imx-uart.h> | ||
46 | #include <mach/iomux-mx3.h> | 41 | #include <mach/iomux-mx3.h> |
47 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
48 | #include <mach/mxc_nand.h> | ||
49 | #include <mach/spi.h> | ||
50 | #include <mach/mxc_ehci.h> | 43 | #include <mach/mxc_ehci.h> |
51 | #include <mach/ulpi.h> | 44 | #include <mach/ulpi.h> |
52 | 45 | ||
46 | #include "devices-imx31.h" | ||
53 | #include "devices.h" | 47 | #include "devices.h" |
54 | 48 | ||
55 | /* | 49 | /* |
@@ -69,7 +63,8 @@ static unsigned int mx31lite_pins[] = { | |||
69 | MX31_PIN_CSPI2_SS2__SS2, | 63 | MX31_PIN_CSPI2_SS2__SS2, |
70 | }; | 64 | }; |
71 | 65 | ||
72 | static struct mxc_nand_platform_data mx31lite_nand_board_info = { | 66 | static const struct mxc_nand_platform_data |
67 | mx31lite_nand_board_info __initconst = { | ||
73 | .width = 1, | 68 | .width = 1, |
74 | .hw_ecc = 1, | 69 | .hw_ecc = 1, |
75 | }; | 70 | }; |
@@ -112,7 +107,7 @@ static int spi_internal_chipselect[] = { | |||
112 | MXC_SPI_CS(0), | 107 | MXC_SPI_CS(0), |
113 | }; | 108 | }; |
114 | 109 | ||
115 | static struct spi_imx_master spi1_pdata = { | 110 | static const struct spi_imx_master spi1_pdata __initconst = { |
116 | .chipselect = spi_internal_chipselect, | 111 | .chipselect = spi_internal_chipselect, |
117 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 112 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
118 | }; | 113 | }; |
@@ -253,9 +248,9 @@ static void __init mxc_board_init(void) | |||
253 | 248 | ||
254 | /* NOR and NAND flash */ | 249 | /* NOR and NAND flash */ |
255 | platform_device_register(&physmap_flash_device); | 250 | platform_device_register(&physmap_flash_device); |
256 | mxc_register_device(&mxc_nand_device, &mx31lite_nand_board_info); | 251 | imx31_add_mxc_nand(&mx31lite_nand_board_info); |
257 | 252 | ||
258 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 253 | imx31_add_spi_imx1(&spi1_pdata); |
259 | spi_register_board_info(&mc13783_spi_dev, 1); | 254 | spi_register_board_info(&mc13783_spi_dev, 1); |
260 | 255 | ||
261 | #if defined(CONFIG_USB_ULPI) | 256 | #if defined(CONFIG_USB_ULPI) |
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index 33a8d35498a7..67776bc61c33 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
@@ -42,16 +38,15 @@ | |||
42 | #include <mach/board-mx31moboard.h> | 38 | #include <mach/board-mx31moboard.h> |
43 | #include <mach/common.h> | 39 | #include <mach/common.h> |
44 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
45 | #include <mach/imx-uart.h> | ||
46 | #include <mach/iomux-mx3.h> | 41 | #include <mach/iomux-mx3.h> |
47 | #include <mach/ipu.h> | 42 | #include <mach/ipu.h> |
48 | #include <mach/i2c.h> | ||
49 | #include <mach/mmc.h> | 43 | #include <mach/mmc.h> |
50 | #include <mach/mxc_ehci.h> | 44 | #include <mach/mxc_ehci.h> |
51 | #include <mach/mx3_camera.h> | 45 | #include <mach/mx3_camera.h> |
52 | #include <mach/spi.h> | 46 | #include <mach/spi.h> |
53 | #include <mach/ulpi.h> | 47 | #include <mach/ulpi.h> |
54 | 48 | ||
49 | #include "devices-imx31.h" | ||
55 | #include "devices.h" | 50 | #include "devices.h" |
56 | 51 | ||
57 | static unsigned int moboard_pins[] = { | 52 | static unsigned int moboard_pins[] = { |
@@ -130,24 +125,36 @@ static struct platform_device mx31moboard_flash = { | |||
130 | 125 | ||
131 | static int moboard_uart0_init(struct platform_device *pdev) | 126 | static int moboard_uart0_init(struct platform_device *pdev) |
132 | { | 127 | { |
133 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); | 128 | int ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); |
134 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); | 129 | if (ret) |
135 | return 0; | 130 | return ret; |
131 | |||
132 | ret = gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); | ||
133 | if (ret) | ||
134 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); | ||
135 | |||
136 | return ret; | ||
137 | } | ||
138 | |||
139 | static void moboard_uart0_exit(struct platform_device *pdev) | ||
140 | { | ||
141 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); | ||
136 | } | 142 | } |
137 | 143 | ||
138 | static struct imxuart_platform_data uart0_pdata = { | 144 | static const struct imxuart_platform_data uart0_pdata __initconst = { |
139 | .init = moboard_uart0_init, | 145 | .init = moboard_uart0_init, |
146 | .exit = moboard_uart0_exit, | ||
140 | }; | 147 | }; |
141 | 148 | ||
142 | static struct imxuart_platform_data uart4_pdata = { | 149 | static const struct imxuart_platform_data uart4_pdata __initconst = { |
143 | .flags = IMXUART_HAVE_RTSCTS, | 150 | .flags = IMXUART_HAVE_RTSCTS, |
144 | }; | 151 | }; |
145 | 152 | ||
146 | static struct imxi2c_platform_data moboard_i2c0_pdata = { | 153 | static const struct imxi2c_platform_data moboard_i2c0_data __initconst = { |
147 | .bitrate = 400000, | 154 | .bitrate = 400000, |
148 | }; | 155 | }; |
149 | 156 | ||
150 | static struct imxi2c_platform_data moboard_i2c1_pdata = { | 157 | static const struct imxi2c_platform_data moboard_i2c1_data __initconst = { |
151 | .bitrate = 100000, | 158 | .bitrate = 100000, |
152 | }; | 159 | }; |
153 | 160 | ||
@@ -156,7 +163,7 @@ static int moboard_spi1_cs[] = { | |||
156 | MXC_SPI_CS(2), | 163 | MXC_SPI_CS(2), |
157 | }; | 164 | }; |
158 | 165 | ||
159 | static struct spi_imx_master moboard_spi1_master = { | 166 | static const struct spi_imx_master moboard_spi1_pdata __initconst = { |
160 | .chipselect = moboard_spi1_cs, | 167 | .chipselect = moboard_spi1_cs, |
161 | .num_chipselect = ARRAY_SIZE(moboard_spi1_cs), | 168 | .num_chipselect = ARRAY_SIZE(moboard_spi1_cs), |
162 | }; | 169 | }; |
@@ -220,11 +227,54 @@ static struct mc13783_regulator_init_data moboard_regulators[] = { | |||
220 | }, | 227 | }, |
221 | }; | 228 | }; |
222 | 229 | ||
230 | static struct mc13783_led_platform_data moboard_led[] = { | ||
231 | { | ||
232 | .id = MC13783_LED_R1, | ||
233 | .name = "coreboard-led-4:red", | ||
234 | .max_current = 2, | ||
235 | }, | ||
236 | { | ||
237 | .id = MC13783_LED_G1, | ||
238 | .name = "coreboard-led-4:green", | ||
239 | .max_current = 2, | ||
240 | }, | ||
241 | { | ||
242 | .id = MC13783_LED_B1, | ||
243 | .name = "coreboard-led-4:blue", | ||
244 | .max_current = 2, | ||
245 | }, | ||
246 | { | ||
247 | .id = MC13783_LED_R2, | ||
248 | .name = "coreboard-led-5:red", | ||
249 | .max_current = 3, | ||
250 | }, | ||
251 | { | ||
252 | .id = MC13783_LED_G2, | ||
253 | .name = "coreboard-led-5:green", | ||
254 | .max_current = 3, | ||
255 | }, | ||
256 | { | ||
257 | .id = MC13783_LED_B2, | ||
258 | .name = "coreboard-led-5:blue", | ||
259 | .max_current = 3, | ||
260 | }, | ||
261 | }; | ||
262 | |||
263 | static struct mc13783_leds_platform_data moboard_leds = { | ||
264 | .num_leds = ARRAY_SIZE(moboard_led), | ||
265 | .led = moboard_led, | ||
266 | .flags = MC13783_LED_SLEWLIMTC, | ||
267 | .abmode = MC13783_LED_AB_DISABLED, | ||
268 | .tc1_period = MC13783_LED_PERIOD_10MS, | ||
269 | .tc2_period = MC13783_LED_PERIOD_10MS, | ||
270 | }; | ||
271 | |||
223 | static struct mc13783_platform_data moboard_pmic = { | 272 | static struct mc13783_platform_data moboard_pmic = { |
224 | .regulators = moboard_regulators, | 273 | .regulators = moboard_regulators, |
225 | .num_regulators = ARRAY_SIZE(moboard_regulators), | 274 | .num_regulators = ARRAY_SIZE(moboard_regulators), |
275 | .leds = &moboard_leds, | ||
226 | .flags = MC13783_USE_REGULATOR | MC13783_USE_RTC | | 276 | .flags = MC13783_USE_REGULATOR | MC13783_USE_RTC | |
227 | MC13783_USE_ADC, | 277 | MC13783_USE_ADC | MC13783_USE_LED, |
228 | }; | 278 | }; |
229 | 279 | ||
230 | static struct spi_board_info moboard_spi_board_info[] __initdata = { | 280 | static struct spi_board_info moboard_spi_board_info[] __initdata = { |
@@ -243,7 +293,7 @@ static int moboard_spi2_cs[] = { | |||
243 | MXC_SPI_CS(1), | 293 | MXC_SPI_CS(1), |
244 | }; | 294 | }; |
245 | 295 | ||
246 | static struct spi_imx_master moboard_spi2_master = { | 296 | static const struct spi_imx_master moboard_spi2_pdata __initconst = { |
247 | .chipselect = moboard_spi2_cs, | 297 | .chipselect = moboard_spi2_cs, |
248 | .num_chipselect = ARRAY_SIZE(moboard_spi2_cs), | 298 | .num_chipselect = ARRAY_SIZE(moboard_spi2_cs), |
249 | }; | 299 | }; |
@@ -456,15 +506,14 @@ static void __init mxc_board_init(void) | |||
456 | 506 | ||
457 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 507 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
458 | 508 | ||
459 | mxc_register_device(&mxc_uart_device0, &uart0_pdata); | 509 | imx31_add_imx_uart0(&uart0_pdata); |
460 | 510 | imx31_add_imx_uart4(&uart4_pdata); | |
461 | mxc_register_device(&mxc_uart_device4, &uart4_pdata); | ||
462 | 511 | ||
463 | mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata); | 512 | imx31_add_imx_i2c0(&moboard_i2c0_data); |
464 | mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata); | 513 | imx31_add_imx_i2c1(&moboard_i2c1_data); |
465 | 514 | ||
466 | mxc_register_device(&mxc_spi_device1, &moboard_spi1_master); | 515 | imx31_add_spi_imx1(&moboard_spi1_pdata); |
467 | mxc_register_device(&mxc_spi_device2, &moboard_spi2_master); | 516 | imx31_add_spi_imx2(&moboard_spi2_pdata); |
468 | 517 | ||
469 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); | 518 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); |
470 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | 519 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); |
diff --git a/arch/arm/mach-mx3/mach-mx35pdk.c b/arch/arm/mach-mx3/mach-mx35_3ds.c index bcac84d4dca4..1c30d7212f17 100644 --- a/arch/arm/mach-mx3/mach-mx35pdk.c +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c | |||
@@ -12,10 +12,12 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | 15 | */ |
16 | * You should have received a copy of the GNU General Public License | 16 | |
17 | * along with this program; if not, write to the Free Software | 17 | /* |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * This machine is known as: |
19 | * - i.MX35 3-Stack Development System | ||
20 | * - i.MX35 Platform Development Kit (i.MX35 PDK) | ||
19 | */ | 21 | */ |
20 | 22 | ||
21 | #include <linux/types.h> | 23 | #include <linux/types.h> |
@@ -32,12 +34,12 @@ | |||
32 | 34 | ||
33 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
34 | #include <mach/common.h> | 36 | #include <mach/common.h> |
35 | #include <mach/imx-uart.h> | ||
36 | #include <mach/iomux-mx35.h> | 37 | #include <mach/iomux-mx35.h> |
37 | 38 | ||
39 | #include "devices-imx35.h" | ||
38 | #include "devices.h" | 40 | #include "devices.h" |
39 | 41 | ||
40 | static struct imxuart_platform_data uart_pdata = { | 42 | static const struct imxuart_platform_data uart_pdata __initconst = { |
41 | .flags = IMXUART_HAVE_RTSCTS, | 43 | .flags = IMXUART_HAVE_RTSCTS, |
42 | }; | 44 | }; |
43 | 45 | ||
@@ -90,7 +92,7 @@ static void __init mxc_board_init(void) | |||
90 | 92 | ||
91 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 93 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
92 | 94 | ||
93 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 95 | imx35_add_imx_uart0(&uart_pdata); |
94 | 96 | ||
95 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 97 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); |
96 | } | 98 | } |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index bb6c056854e9..8a292dd1a714 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -43,20 +39,17 @@ | |||
43 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
44 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
45 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
46 | #include <mach/board-pcm037.h> | ||
47 | #include <mach/common.h> | 42 | #include <mach/common.h> |
48 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
49 | #include <mach/i2c.h> | ||
50 | #include <mach/imx-uart.h> | ||
51 | #include <mach/iomux-mx3.h> | 44 | #include <mach/iomux-mx3.h> |
52 | #include <mach/ipu.h> | 45 | #include <mach/ipu.h> |
53 | #include <mach/mmc.h> | 46 | #include <mach/mmc.h> |
54 | #include <mach/mx3_camera.h> | 47 | #include <mach/mx3_camera.h> |
55 | #include <mach/mx3fb.h> | 48 | #include <mach/mx3fb.h> |
56 | #include <mach/mxc_nand.h> | ||
57 | #include <mach/mxc_ehci.h> | 49 | #include <mach/mxc_ehci.h> |
58 | #include <mach/ulpi.h> | 50 | #include <mach/ulpi.h> |
59 | 51 | ||
52 | #include "devices-imx31.h" | ||
60 | #include "devices.h" | 53 | #include "devices.h" |
61 | #include "pcm037.h" | 54 | #include "pcm037.h" |
62 | 55 | ||
@@ -225,7 +218,7 @@ static struct platform_device pcm037_flash = { | |||
225 | .num_resources = 1, | 218 | .num_resources = 1, |
226 | }; | 219 | }; |
227 | 220 | ||
228 | static struct imxuart_platform_data uart_pdata = { | 221 | static const struct imxuart_platform_data uart_pdata __initconst = { |
229 | .flags = IMXUART_HAVE_RTSCTS, | 222 | .flags = IMXUART_HAVE_RTSCTS, |
230 | }; | 223 | }; |
231 | 224 | ||
@@ -279,16 +272,17 @@ static struct platform_device pcm037_sram_device = { | |||
279 | .resource = &pcm038_sram_resource, | 272 | .resource = &pcm038_sram_resource, |
280 | }; | 273 | }; |
281 | 274 | ||
282 | static struct mxc_nand_platform_data pcm037_nand_board_info = { | 275 | static const struct mxc_nand_platform_data |
276 | pcm037_nand_board_info __initconst = { | ||
283 | .width = 1, | 277 | .width = 1, |
284 | .hw_ecc = 1, | 278 | .hw_ecc = 1, |
285 | }; | 279 | }; |
286 | 280 | ||
287 | static struct imxi2c_platform_data pcm037_i2c_1_data = { | 281 | static const struct imxi2c_platform_data pcm037_i2c1_data __initconst = { |
288 | .bitrate = 100000, | 282 | .bitrate = 100000, |
289 | }; | 283 | }; |
290 | 284 | ||
291 | static struct imxi2c_platform_data pcm037_i2c_2_data = { | 285 | static const struct imxi2c_platform_data pcm037_i2c2_data __initconst = { |
292 | .bitrate = 20000, | 286 | .bitrate = 20000, |
293 | }; | 287 | }; |
294 | 288 | ||
@@ -615,9 +609,10 @@ static void __init mxc_board_init(void) | |||
615 | 609 | ||
616 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 610 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
617 | 611 | ||
618 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 612 | imx31_add_imx_uart0(&uart_pdata); |
619 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 613 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ |
620 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 614 | imx31_add_imx_uart1(&uart_pdata); |
615 | imx31_add_imx_uart2(&uart_pdata); | ||
621 | 616 | ||
622 | mxc_register_device(&mxc_w1_master_device, NULL); | 617 | mxc_register_device(&mxc_w1_master_device, NULL); |
623 | 618 | ||
@@ -635,10 +630,10 @@ static void __init mxc_board_init(void) | |||
635 | i2c_register_board_info(1, pcm037_i2c_devices, | 630 | i2c_register_board_info(1, pcm037_i2c_devices, |
636 | ARRAY_SIZE(pcm037_i2c_devices)); | 631 | ARRAY_SIZE(pcm037_i2c_devices)); |
637 | 632 | ||
638 | mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); | 633 | imx31_add_imx_i2c1(&pcm037_i2c1_data); |
639 | mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); | 634 | imx31_add_imx_i2c2(&pcm037_i2c2_data); |
640 | 635 | ||
641 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 636 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
642 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 637 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); |
643 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 638 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
644 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 639 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
diff --git a/arch/arm/mach-mx3/mach-pcm037_eet.c b/arch/arm/mach-mx3/mach-pcm037_eet.c index 8d386000fc40..c8b98218efee 100644 --- a/arch/arm/mach-mx3/mach-pcm037_eet.c +++ b/arch/arm/mach-mx3/mach-pcm037_eet.c | |||
@@ -13,9 +13,6 @@ | |||
13 | #include <linux/spi/spi.h> | 13 | #include <linux/spi/spi.h> |
14 | 14 | ||
15 | #include <mach/common.h> | 15 | #include <mach/common.h> |
16 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
17 | #include <mach/spi.h> | ||
18 | #endif | ||
19 | #include <mach/iomux-mx3.h> | 16 | #include <mach/iomux-mx3.h> |
20 | 17 | ||
21 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
@@ -64,7 +61,7 @@ static struct spi_board_info pcm037_spi_dev[] = { | |||
64 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 61 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
65 | static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; | 62 | static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; |
66 | 63 | ||
67 | struct spi_imx_master pcm037_spi1_master = { | 64 | static const struct spi_imx_master pcm037_spi1_pdata __initconst = { |
68 | .chipselect = pcm037_spi1_cs, | 65 | .chipselect = pcm037_spi1_cs, |
69 | .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), | 66 | .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), |
70 | }; | 67 | }; |
@@ -184,7 +181,7 @@ static int eet_init_devices(void) | |||
184 | /* SPI */ | 181 | /* SPI */ |
185 | spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); | 182 | spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); |
186 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 183 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
187 | mxc_register_device(&mxc_spi_device0, &pcm037_spi1_master); | 184 | imx35_add_spi_imx0(&pcm037_spi1_pdata); |
188 | #endif | 185 | #endif |
189 | 186 | ||
190 | platform_device_register(&pcm037_gpio_keys_device); | 187 | platform_device_register(&pcm037_gpio_keys_device); |
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index 8071b7281c4b..b92f624c755e 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -40,19 +36,15 @@ | |||
40 | 36 | ||
41 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
42 | #include <mach/common.h> | 38 | #include <mach/common.h> |
43 | #include <mach/imx-uart.h> | ||
44 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | ||
45 | #include <mach/i2c.h> | ||
46 | #endif | ||
47 | #include <mach/iomux-mx35.h> | 39 | #include <mach/iomux-mx35.h> |
48 | #include <mach/ipu.h> | 40 | #include <mach/ipu.h> |
49 | #include <mach/mx3fb.h> | 41 | #include <mach/mx3fb.h> |
50 | #include <mach/mxc_nand.h> | ||
51 | #include <mach/mxc_ehci.h> | 42 | #include <mach/mxc_ehci.h> |
52 | #include <mach/ulpi.h> | 43 | #include <mach/ulpi.h> |
53 | #include <mach/audmux.h> | 44 | #include <mach/audmux.h> |
54 | #include <mach/ssi.h> | 45 | #include <mach/ssi.h> |
55 | 46 | ||
47 | #include "devices-imx35.h" | ||
56 | #include "devices.h" | 48 | #include "devices.h" |
57 | 49 | ||
58 | static const struct fb_videomode fb_modedb[] = { | 50 | static const struct fb_videomode fb_modedb[] = { |
@@ -122,12 +114,12 @@ static struct platform_device pcm043_flash = { | |||
122 | .num_resources = 1, | 114 | .num_resources = 1, |
123 | }; | 115 | }; |
124 | 116 | ||
125 | static struct imxuart_platform_data uart_pdata = { | 117 | static const struct imxuart_platform_data uart_pdata __initconst = { |
126 | .flags = IMXUART_HAVE_RTSCTS, | 118 | .flags = IMXUART_HAVE_RTSCTS, |
127 | }; | 119 | }; |
128 | 120 | ||
129 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | 121 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE |
130 | static struct imxi2c_platform_data pcm043_i2c_1_data = { | 122 | static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = { |
131 | .bitrate = 50000, | 123 | .bitrate = 50000, |
132 | }; | 124 | }; |
133 | 125 | ||
@@ -304,7 +296,8 @@ static struct imx_ssi_platform_data pcm043_ssi_pdata = { | |||
304 | .flags = IMX_SSI_USE_AC97, | 296 | .flags = IMX_SSI_USE_AC97, |
305 | }; | 297 | }; |
306 | 298 | ||
307 | static struct mxc_nand_platform_data pcm037_nand_board_info = { | 299 | static const struct mxc_nand_platform_data |
300 | pcm037_nand_board_info __initconst = { | ||
308 | .width = 1, | 301 | .width = 1, |
309 | .hw_ecc = 1, | 302 | .hw_ecc = 1, |
310 | }; | 303 | }; |
@@ -363,17 +356,17 @@ static void __init mxc_board_init(void) | |||
363 | 356 | ||
364 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 357 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
365 | 358 | ||
366 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 359 | imx35_add_imx_uart0(&uart_pdata); |
367 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 360 | imx35_add_mxc_nand(&pcm037_nand_board_info); |
368 | mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); | 361 | mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); |
369 | 362 | ||
370 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 363 | imx35_add_imx_uart1(&uart_pdata); |
371 | 364 | ||
372 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | 365 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE |
373 | i2c_register_board_info(0, pcm043_i2c_devices, | 366 | i2c_register_board_info(0, pcm043_i2c_devices, |
374 | ARRAY_SIZE(pcm043_i2c_devices)); | 367 | ARRAY_SIZE(pcm043_i2c_devices)); |
375 | 368 | ||
376 | mxc_register_device(&mxc_i2c_device0, &pcm043_i2c_1_data); | 369 | imx35_add_imx_i2c0(&pcm043_i2c0_data); |
377 | #endif | 370 | #endif |
378 | 371 | ||
379 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 372 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
diff --git a/arch/arm/mach-mx3/mach-qong.c b/arch/arm/mach-mx3/mach-qong.c index e5b5b8323a17..d44ac70222a5 100644 --- a/arch/arm/mach-mx3/mach-qong.c +++ b/arch/arm/mach-mx3/mach-qong.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -34,9 +30,9 @@ | |||
34 | #include <mach/common.h> | 30 | #include <mach/common.h> |
35 | #include <asm/page.h> | 31 | #include <asm/page.h> |
36 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
37 | #include <mach/board-qong.h> | ||
38 | #include <mach/imx-uart.h> | ||
39 | #include <mach/iomux-mx3.h> | 33 | #include <mach/iomux-mx3.h> |
34 | |||
35 | #include "devices-imx31.h" | ||
40 | #include "devices.h" | 36 | #include "devices.h" |
41 | 37 | ||
42 | /* FPGA defines */ | 38 | /* FPGA defines */ |
@@ -62,7 +58,7 @@ | |||
62 | * This file contains the board-specific initialization routines. | 58 | * This file contains the board-specific initialization routines. |
63 | */ | 59 | */ |
64 | 60 | ||
65 | static struct imxuart_platform_data uart_pdata = { | 61 | static const struct imxuart_platform_data uart_pdata __initconst = { |
66 | .flags = IMXUART_HAVE_RTSCTS, | 62 | .flags = IMXUART_HAVE_RTSCTS, |
67 | }; | 63 | }; |
68 | 64 | ||
@@ -73,11 +69,11 @@ static int uart_pins[] = { | |||
73 | MX31_PIN_RXD1__RXD1 | 69 | MX31_PIN_RXD1__RXD1 |
74 | }; | 70 | }; |
75 | 71 | ||
76 | static inline void mxc_init_imx_uart(void) | 72 | static inline void __init mxc_init_imx_uart(void) |
77 | { | 73 | { |
78 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), | 74 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), |
79 | "uart-0"); | 75 | "uart-0"); |
80 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 76 | imx31_add_imx_uart0(&uart_pdata); |
81 | } | 77 | } |
82 | 78 | ||
83 | static struct resource dnet_resources[] = { | 79 | static struct resource dnet_resources[] = { |
@@ -116,7 +112,7 @@ static struct physmap_flash_data qong_flash_data = { | |||
116 | 112 | ||
117 | static struct resource qong_flash_resource = { | 113 | static struct resource qong_flash_resource = { |
118 | .start = MX31_CS0_BASE_ADDR, | 114 | .start = MX31_CS0_BASE_ADDR, |
119 | .end = MX31_CS0_BASE_ADDR + QONG_NOR_SIZE - 1, | 115 | .end = MX31_CS0_BASE_ADDR + SZ_128M - 1, |
120 | .flags = IORESOURCE_MEM, | 116 | .flags = IORESOURCE_MEM, |
121 | }; | 117 | }; |
122 | 118 | ||
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index 6858a4f9806c..a378fba49a8b 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
@@ -97,8 +93,11 @@ void __init mx35_map_io(void) | |||
97 | } | 93 | } |
98 | #endif | 94 | #endif |
99 | 95 | ||
96 | int imx3x_register_gpios(void); | ||
97 | |||
100 | void __init mx31_init_irq(void) | 98 | void __init mx31_init_irq(void) |
101 | { | 99 | { |
100 | imx3x_register_gpios(); | ||
102 | mxc_init_irq(IO_ADDRESS(AVIC_BASE_ADDR)); | 101 | mxc_init_irq(IO_ADDRESS(AVIC_BASE_ADDR)); |
103 | } | 102 | } |
104 | 103 | ||
diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c index 7aebd74a12e8..827fd3c80201 100644 --- a/arch/arm/mach-mx3/mx31lilly-db.c +++ b/arch/arm/mach-mx3/mx31lilly-db.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | 21 | */ |
26 | 22 | ||
27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
@@ -36,13 +32,13 @@ | |||
36 | 32 | ||
37 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
38 | #include <mach/common.h> | 34 | #include <mach/common.h> |
39 | #include <mach/imx-uart.h> | ||
40 | #include <mach/iomux-mx3.h> | 35 | #include <mach/iomux-mx3.h> |
41 | #include <mach/board-mx31lilly.h> | 36 | #include <mach/board-mx31lilly.h> |
42 | #include <mach/mmc.h> | 37 | #include <mach/mmc.h> |
43 | #include <mach/mx3fb.h> | 38 | #include <mach/mx3fb.h> |
44 | #include <mach/ipu.h> | 39 | #include <mach/ipu.h> |
45 | 40 | ||
41 | #include "devices-imx31.h" | ||
46 | #include "devices.h" | 42 | #include "devices.h" |
47 | 43 | ||
48 | /* | 44 | /* |
@@ -96,7 +92,7 @@ static unsigned int lilly_db_board_pins[] __initdata = { | |||
96 | }; | 92 | }; |
97 | 93 | ||
98 | /* UART */ | 94 | /* UART */ |
99 | static struct imxuart_platform_data uart_pdata __initdata = { | 95 | static const struct imxuart_platform_data uart_pdata __initconst = { |
100 | .flags = IMXUART_HAVE_RTSCTS, | 96 | .flags = IMXUART_HAVE_RTSCTS, |
101 | }; | 97 | }; |
102 | 98 | ||
@@ -217,9 +213,9 @@ void __init mx31lilly_db_init(void) | |||
217 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, | 213 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, |
218 | ARRAY_SIZE(lilly_db_board_pins), | 214 | ARRAY_SIZE(lilly_db_board_pins), |
219 | "development board pins"); | 215 | "development board pins"); |
220 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 216 | imx31_add_imx_uart0(&uart_pdata); |
221 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 217 | imx31_add_imx_uart1(&uart_pdata); |
222 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 218 | imx31_add_imx_uart2(&uart_pdata); |
223 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 219 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); |
224 | mx31lilly_init_fb(); | 220 | mx31lilly_init_fb(); |
225 | } | 221 | } |
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c index 5f05bfbec380..7b0e74e275ba 100644 --- a/arch/arm/mach-mx3/mx31lite-db.c +++ b/arch/arm/mach-mx3/mx31lite-db.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | 21 | */ |
26 | 22 | ||
27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
@@ -37,12 +33,11 @@ | |||
37 | 33 | ||
38 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
39 | #include <mach/common.h> | 35 | #include <mach/common.h> |
40 | #include <mach/imx-uart.h> | ||
41 | #include <mach/iomux-mx3.h> | 36 | #include <mach/iomux-mx3.h> |
42 | #include <mach/board-mx31lite.h> | 37 | #include <mach/board-mx31lite.h> |
43 | #include <mach/mmc.h> | 38 | #include <mach/mmc.h> |
44 | #include <mach/spi.h> | ||
45 | 39 | ||
40 | #include "devices-imx31.h" | ||
46 | #include "devices.h" | 41 | #include "devices.h" |
47 | 42 | ||
48 | /* | 43 | /* |
@@ -76,7 +71,7 @@ static unsigned int litekit_db_board_pins[] __initdata = { | |||
76 | }; | 71 | }; |
77 | 72 | ||
78 | /* UART */ | 73 | /* UART */ |
79 | static struct imxuart_platform_data uart_pdata __initdata = { | 74 | static const struct imxuart_platform_data uart_pdata __initconst = { |
80 | .flags = IMXUART_HAVE_RTSCTS, | 75 | .flags = IMXUART_HAVE_RTSCTS, |
81 | }; | 76 | }; |
82 | 77 | ||
@@ -161,7 +156,7 @@ static int spi_internal_chipselect[] = { | |||
161 | MXC_SPI_CS(2), | 156 | MXC_SPI_CS(2), |
162 | }; | 157 | }; |
163 | 158 | ||
164 | static struct spi_imx_master spi0_pdata = { | 159 | static const struct spi_imx_master spi0_pdata __initconst = { |
165 | .chipselect = spi_internal_chipselect, | 160 | .chipselect = spi_internal_chipselect, |
166 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 161 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
167 | }; | 162 | }; |
@@ -201,9 +196,9 @@ void __init mx31lite_db_init(void) | |||
201 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, | 196 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, |
202 | ARRAY_SIZE(litekit_db_board_pins), | 197 | ARRAY_SIZE(litekit_db_board_pins), |
203 | "development board pins"); | 198 | "development board pins"); |
204 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 199 | imx31_add_imx_uart0(&uart_pdata); |
205 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 200 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); |
206 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | 201 | imx31_add_spi_imx0(&spi0_pdata); |
207 | platform_device_register(&litekit_led_device); | 202 | platform_device_register(&litekit_led_device); |
208 | mxc_register_device(&imx_wdt_device0, NULL); | 203 | mxc_register_device(&imx_wdt_device0, NULL); |
209 | mxc_register_device(&imx_rtc_device0, NULL); | 204 | mxc_register_device(&imx_rtc_device0, NULL); |
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index 582299cb2c08..fc395a7a8599 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
@@ -27,13 +23,13 @@ | |||
27 | #include <linux/usb/otg.h> | 23 | #include <linux/usb/otg.h> |
28 | 24 | ||
29 | #include <mach/common.h> | 25 | #include <mach/common.h> |
30 | #include <mach/imx-uart.h> | ||
31 | #include <mach/iomux-mx3.h> | 26 | #include <mach/iomux-mx3.h> |
32 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
33 | #include <mach/mmc.h> | 28 | #include <mach/mmc.h> |
34 | #include <mach/mxc_ehci.h> | 29 | #include <mach/mxc_ehci.h> |
35 | #include <mach/ulpi.h> | 30 | #include <mach/ulpi.h> |
36 | 31 | ||
32 | #include "devices-imx31.h" | ||
37 | #include "devices.h" | 33 | #include "devices.h" |
38 | 34 | ||
39 | static unsigned int devboard_pins[] = { | 35 | static unsigned int devboard_pins[] = { |
@@ -56,7 +52,7 @@ static unsigned int devboard_pins[] = { | |||
56 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | 52 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, |
57 | }; | 53 | }; |
58 | 54 | ||
59 | static struct imxuart_platform_data uart_pdata = { | 55 | static const struct imxuart_platform_data uart_pdata __initconst = { |
60 | .flags = IMXUART_HAVE_RTSCTS, | 56 | .flags = IMXUART_HAVE_RTSCTS, |
61 | }; | 57 | }; |
62 | 58 | ||
@@ -230,7 +226,7 @@ void __init mx31moboard_devboard_init(void) | |||
230 | mxc_iomux_setup_multiple_pins(devboard_pins, ARRAY_SIZE(devboard_pins), | 226 | mxc_iomux_setup_multiple_pins(devboard_pins, ARRAY_SIZE(devboard_pins), |
231 | "devboard"); | 227 | "devboard"); |
232 | 228 | ||
233 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 229 | imx31_add_imx_uart1(&uart_pdata); |
234 | 230 | ||
235 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 231 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); |
236 | 232 | ||
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 4930f8c27e66..0551eb39d97e 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c index 293eea6d9d97..40c3e7564cb6 100644 --- a/arch/arm/mach-mx3/mx31moboard-smartbot.c +++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
@@ -30,7 +26,6 @@ | |||
30 | 26 | ||
31 | #include <mach/common.h> | 27 | #include <mach/common.h> |
32 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
33 | #include <mach/imx-uart.h> | ||
34 | #include <mach/iomux-mx3.h> | 29 | #include <mach/iomux-mx3.h> |
35 | #include <mach/board-mx31moboard.h> | 30 | #include <mach/board-mx31moboard.h> |
36 | #include <mach/mxc_ehci.h> | 31 | #include <mach/mxc_ehci.h> |
@@ -38,6 +33,7 @@ | |||
38 | 33 | ||
39 | #include <media/soc_camera.h> | 34 | #include <media/soc_camera.h> |
40 | 35 | ||
36 | #include "devices-imx31.h" | ||
41 | #include "devices.h" | 37 | #include "devices.h" |
42 | 38 | ||
43 | static unsigned int smartbot_pins[] = { | 39 | static unsigned int smartbot_pins[] = { |
@@ -59,7 +55,7 @@ static unsigned int smartbot_pins[] = { | |||
59 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | 55 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, |
60 | }; | 56 | }; |
61 | 57 | ||
62 | static struct imxuart_platform_data uart_pdata = { | 58 | static const struct imxuart_platform_data uart_pdata __initconst = { |
63 | .flags = IMXUART_HAVE_RTSCTS, | 59 | .flags = IMXUART_HAVE_RTSCTS, |
64 | }; | 60 | }; |
65 | 61 | ||
@@ -183,8 +179,7 @@ void __init mx31moboard_smartbot_init(int board) | |||
183 | mxc_iomux_setup_multiple_pins(smartbot_pins, ARRAY_SIZE(smartbot_pins), | 179 | mxc_iomux_setup_multiple_pins(smartbot_pins, ARRAY_SIZE(smartbot_pins), |
184 | "smartbot"); | 180 | "smartbot"); |
185 | 181 | ||
186 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 182 | imx31_add_imx_uart1(&uart_pdata); |
187 | |||
188 | 183 | ||
189 | switch (board) { | 184 | switch (board) { |
190 | case MX31SMARTBOT: | 185 | case MX31SMARTBOT: |