diff options
-rw-r--r-- | arch/arm/mach-mx3/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices-imx31.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-armadillo5x0.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31ads.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-mx31moboard.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm037.c | 9 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx31.h | 4 |
9 files changed, 29 insertions, 14 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 5611b2376f1c..557a20b48830 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -15,6 +15,7 @@ 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 | ||
18 | default y | 19 | default y |
19 | help | 20 | help |
20 | Include support for MX31ADS platform. This includes specific | 21 | Include support for MX31ADS platform. This includes specific |
@@ -34,6 +35,7 @@ config MACH_MX31ADS_WM1133_EV1 | |||
34 | config MACH_PCM037 | 35 | config MACH_PCM037 |
35 | bool "Support Phytec pcm037 (i.MX31) platforms" | 36 | bool "Support Phytec pcm037 (i.MX31) platforms" |
36 | select ARCH_MX31 | 37 | select ARCH_MX31 |
38 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
37 | select IMX_HAVE_PLATFORM_MXC_NAND | 39 | select IMX_HAVE_PLATFORM_MXC_NAND |
38 | select MXC_ULPI if USB_ULPI | 40 | select MXC_ULPI if USB_ULPI |
39 | help | 41 | help |
@@ -77,6 +79,7 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT | |||
77 | config MACH_MX31MOBOARD | 79 | config MACH_MX31MOBOARD |
78 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 80 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
79 | select ARCH_MX31 | 81 | select ARCH_MX31 |
82 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
80 | select MXC_ULPI if USB_ULPI | 83 | select MXC_ULPI if USB_ULPI |
81 | help | 84 | help |
82 | Include support for mx31moboard platform. This includes specific | 85 | Include support for mx31moboard platform. This includes specific |
@@ -109,6 +112,7 @@ config MACH_PCM043 | |||
109 | config MACH_ARMADILLO5X0 | 112 | config MACH_ARMADILLO5X0 |
110 | bool "Support Atmark Armadillo-500 Development Base Board" | 113 | bool "Support Atmark Armadillo-500 Development Base Board" |
111 | select ARCH_MX31 | 114 | select ARCH_MX31 |
115 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
112 | select IMX_HAVE_PLATFORM_MXC_NAND | 116 | select IMX_HAVE_PLATFORM_MXC_NAND |
113 | select MXC_ULPI if USB_ULPI | 117 | select MXC_ULPI if USB_ULPI |
114 | help | 118 | help |
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h index 8bd8b3808cae..56bc1e1ca8d6 100644 --- a/arch/arm/mach-mx3/devices-imx31.h +++ b/arch/arm/mach-mx3/devices-imx31.h | |||
@@ -9,5 +9,12 @@ | |||
9 | #include <mach/mx31.h> | 9 | #include <mach/mx31.h> |
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | 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 | |||
12 | #define imx31_add_mxc_nand(pdata) \ | 19 | #define imx31_add_mxc_nand(pdata) \ |
13 | imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata) | 20 | imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata) |
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index c8db84942bff..0743214127a9 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -167,6 +167,7 @@ struct platform_device mxc_w1_master_device = { | |||
167 | .resource = mxc_w1_master_resources, | 167 | .resource = mxc_w1_master_resources, |
168 | }; | 168 | }; |
169 | 169 | ||
170 | #if defined(CONFIG_ARCH_MX35) | ||
170 | static struct resource mxc_i2c0_resources[] = { | 171 | static struct resource mxc_i2c0_resources[] = { |
171 | { | 172 | { |
172 | .start = I2C_BASE_ADDR, | 173 | .start = I2C_BASE_ADDR, |
@@ -223,6 +224,7 @@ struct platform_device mxc_i2c_device2 = { | |||
223 | .num_resources = ARRAY_SIZE(mxc_i2c2_resources), | 224 | .num_resources = ARRAY_SIZE(mxc_i2c2_resources), |
224 | .resource = mxc_i2c2_resources, | 225 | .resource = mxc_i2c2_resources, |
225 | }; | 226 | }; |
227 | #endif | ||
226 | 228 | ||
227 | #ifdef CONFIG_ARCH_MX31 | 229 | #ifdef CONFIG_ARCH_MX31 |
228 | static struct resource mxcsdhc0_resources[] = { | 230 | static struct resource mxcsdhc0_resources[] = { |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 4a224e6dc5ee..e108fa3f5d7e 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -5,9 +5,11 @@ extern struct platform_device mxc_uart_device2; | |||
5 | extern struct platform_device mxc_uart_device3; | 5 | extern struct platform_device mxc_uart_device3; |
6 | extern struct platform_device mxc_uart_device4; | 6 | extern struct platform_device mxc_uart_device4; |
7 | extern struct platform_device mxc_w1_master_device; | 7 | extern struct platform_device mxc_w1_master_device; |
8 | #if defined(CONFIG_ARCH_MX35) | ||
8 | extern struct platform_device mxc_i2c_device0; | 9 | extern struct platform_device mxc_i2c_device0; |
9 | extern struct platform_device mxc_i2c_device1; | 10 | extern struct platform_device mxc_i2c_device1; |
10 | extern struct platform_device mxc_i2c_device2; | 11 | extern struct platform_device mxc_i2c_device2; |
12 | #endif | ||
11 | extern struct platform_device mx3_ipu; | 13 | extern struct platform_device mx3_ipu; |
12 | extern struct platform_device mx3_fb; | 14 | extern struct platform_device mx3_fb; |
13 | extern struct platform_device mx3_camera; | 15 | extern struct platform_device mx3_camera; |
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 633107a69acd..423ffe774ead 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -499,7 +499,6 @@ static struct imxuart_platform_data uart_pdata = { | |||
499 | 499 | ||
500 | static struct platform_device *devices[] __initdata = { | 500 | static struct platform_device *devices[] __initdata = { |
501 | &armadillo5x0_smc911x_device, | 501 | &armadillo5x0_smc911x_device, |
502 | &mxc_i2c_device1, | ||
503 | &armadillo5x0_button_device, | 502 | &armadillo5x0_button_device, |
504 | }; | 503 | }; |
505 | 504 | ||
@@ -512,6 +511,7 @@ static void __init armadillo5x0_init(void) | |||
512 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); | 511 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); |
513 | 512 | ||
514 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 513 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
514 | imx31_add_imx_i2c1(NULL); | ||
515 | 515 | ||
516 | /* Register UART */ | 516 | /* Register UART */ |
517 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 517 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c index a68b86826e8a..b6dc6c848b51 100644 --- a/arch/arm/mach-mx3/mach-mx31ads.c +++ b/arch/arm/mach-mx3/mach-mx31ads.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mfd/wm8350/pmic.h> | 38 | #include <linux/mfd/wm8350/pmic.h> |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #include "devices-imx31.h" | ||
41 | #include "devices.h" | 42 | #include "devices.h" |
42 | 43 | ||
43 | /* Base address of PBC controller */ | 44 | /* Base address of PBC controller */ |
@@ -500,7 +501,7 @@ static void mxc_init_i2c(void) | |||
500 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1)); | 501 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1)); |
501 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1)); | 502 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1)); |
502 | 503 | ||
503 | mxc_register_device(&mxc_i2c_device1, NULL); | 504 | imx31_add_imx_i2c1(NULL); |
504 | } | 505 | } |
505 | #else | 506 | #else |
506 | static void mxc_init_i2c(void) | 507 | static void mxc_init_i2c(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index 545cfdd7e4e9..dd51d08f2594 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -41,13 +41,13 @@ | |||
41 | #include <mach/imx-uart.h> | 41 | #include <mach/imx-uart.h> |
42 | #include <mach/iomux-mx3.h> | 42 | #include <mach/iomux-mx3.h> |
43 | #include <mach/ipu.h> | 43 | #include <mach/ipu.h> |
44 | #include <mach/i2c.h> | ||
45 | #include <mach/mmc.h> | 44 | #include <mach/mmc.h> |
46 | #include <mach/mxc_ehci.h> | 45 | #include <mach/mxc_ehci.h> |
47 | #include <mach/mx3_camera.h> | 46 | #include <mach/mx3_camera.h> |
48 | #include <mach/spi.h> | 47 | #include <mach/spi.h> |
49 | #include <mach/ulpi.h> | 48 | #include <mach/ulpi.h> |
50 | 49 | ||
50 | #include "devices-imx31.h" | ||
51 | #include "devices.h" | 51 | #include "devices.h" |
52 | 52 | ||
53 | static unsigned int moboard_pins[] = { | 53 | static unsigned int moboard_pins[] = { |
@@ -139,11 +139,11 @@ static struct imxuart_platform_data uart4_pdata = { | |||
139 | .flags = IMXUART_HAVE_RTSCTS, | 139 | .flags = IMXUART_HAVE_RTSCTS, |
140 | }; | 140 | }; |
141 | 141 | ||
142 | static struct imxi2c_platform_data moboard_i2c0_pdata = { | 142 | static const struct imxi2c_platform_data moboard_i2c0_data __initconst = { |
143 | .bitrate = 400000, | 143 | .bitrate = 400000, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static struct imxi2c_platform_data moboard_i2c1_pdata = { | 146 | static const struct imxi2c_platform_data moboard_i2c1_data __initconst = { |
147 | .bitrate = 100000, | 147 | .bitrate = 100000, |
148 | }; | 148 | }; |
149 | 149 | ||
@@ -499,8 +499,8 @@ static void __init mxc_board_init(void) | |||
499 | 499 | ||
500 | mxc_register_device(&mxc_uart_device4, &uart4_pdata); | 500 | mxc_register_device(&mxc_uart_device4, &uart4_pdata); |
501 | 501 | ||
502 | mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata); | 502 | imx31_add_imx_i2c0(&moboard_i2c0_data); |
503 | mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata); | 503 | imx31_add_imx_i2c1(&moboard_i2c1_data); |
504 | 504 | ||
505 | mxc_register_device(&mxc_spi_device1, &moboard_spi1_master); | 505 | mxc_register_device(&mxc_spi_device1, &moboard_spi1_master); |
506 | mxc_register_device(&mxc_spi_device2, &moboard_spi2_master); | 506 | mxc_register_device(&mxc_spi_device2, &moboard_spi2_master); |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index d7fef469990a..7e3fc470d55d 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
42 | #include <mach/common.h> | 42 | #include <mach/common.h> |
43 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
44 | #include <mach/i2c.h> | ||
45 | #include <mach/imx-uart.h> | 44 | #include <mach/imx-uart.h> |
46 | #include <mach/iomux-mx3.h> | 45 | #include <mach/iomux-mx3.h> |
47 | #include <mach/ipu.h> | 46 | #include <mach/ipu.h> |
@@ -280,11 +279,11 @@ pcm037_nand_board_info __initconst = { | |||
280 | .hw_ecc = 1, | 279 | .hw_ecc = 1, |
281 | }; | 280 | }; |
282 | 281 | ||
283 | static struct imxi2c_platform_data pcm037_i2c_1_data = { | 282 | static const struct imxi2c_platform_data pcm037_i2c1_data __initconst = { |
284 | .bitrate = 100000, | 283 | .bitrate = 100000, |
285 | }; | 284 | }; |
286 | 285 | ||
287 | static struct imxi2c_platform_data pcm037_i2c_2_data = { | 286 | static const struct imxi2c_platform_data pcm037_i2c2_data __initconst = { |
288 | .bitrate = 20000, | 287 | .bitrate = 20000, |
289 | }; | 288 | }; |
290 | 289 | ||
@@ -630,8 +629,8 @@ static void __init mxc_board_init(void) | |||
630 | i2c_register_board_info(1, pcm037_i2c_devices, | 629 | i2c_register_board_info(1, pcm037_i2c_devices, |
631 | ARRAY_SIZE(pcm037_i2c_devices)); | 630 | ARRAY_SIZE(pcm037_i2c_devices)); |
632 | 631 | ||
633 | mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); | 632 | imx31_add_imx_i2c1(&pcm037_i2c1_data); |
634 | mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); | 633 | imx31_add_imx_i2c2(&pcm037_i2c2_data); |
635 | 634 | ||
636 | imx31_add_mxc_nand(&pcm037_nand_board_info); | 635 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
637 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 636 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); |
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h index fb90e119c2b5..afee3ab9d62e 100644 --- a/arch/arm/plat-mxc/include/mach/mx31.h +++ b/arch/arm/plat-mxc/include/mach/mx31.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define MX31_ETB_SLOT4_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x10000) | 23 | #define MX31_ETB_SLOT4_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x10000) |
24 | #define MX31_ETB_SLOT5_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x14000) | 24 | #define MX31_ETB_SLOT5_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x14000) |
25 | #define MX31_ECT_CTIO_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x18000) | 25 | #define MX31_ECT_CTIO_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x18000) |
26 | #define MX31_I2C_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x80000) | 26 | #define MX31_I2C1_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x80000) |
27 | #define MX31_I2C3_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x84000) | 27 | #define MX31_I2C3_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x84000) |
28 | #define MX31_OTG_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x88000) | 28 | #define MX31_OTG_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x88000) |
29 | #define MX31_ATA_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x8c000) | 29 | #define MX31_ATA_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x8c000) |
@@ -145,7 +145,7 @@ static inline void mx31_setup_weimcs(size_t cs, | |||
145 | #define MX31_INT_FIRI 7 | 145 | #define MX31_INT_FIRI 7 |
146 | #define MX31_INT_MMC_SDHC2 8 | 146 | #define MX31_INT_MMC_SDHC2 8 |
147 | #define MX31_INT_MMC_SDHC1 9 | 147 | #define MX31_INT_MMC_SDHC1 9 |
148 | #define MX31_INT_I2C 10 | 148 | #define MX31_INT_I2C1 10 |
149 | #define MX31_INT_SSI2 11 | 149 | #define MX31_INT_SSI2 11 |
150 | #define MX31_INT_SSI1 12 | 150 | #define MX31_INT_SSI1 12 |
151 | #define MX31_INT_CSPI2 13 | 151 | #define MX31_INT_CSPI2 13 |