diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices-imx1.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx1ads.c | 5 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx1.h | 4 |
6 files changed, 19 insertions, 24 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 5af1c22112a7..3f88d4a0b89f 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -16,6 +16,7 @@ config MACH_MXLADS | |||
16 | config ARCH_MX1ADS | 16 | config ARCH_MX1ADS |
17 | bool "MX1ADS platform" | 17 | bool "MX1ADS platform" |
18 | select MACH_MXLADS | 18 | select MACH_MXLADS |
19 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
19 | help | 20 | help |
20 | Say Y here if you are using Motorola MX1ADS/MXLADS boards | 21 | Say Y here if you are using Motorola MX1ADS/MXLADS boards |
21 | 22 | ||
diff --git a/arch/arm/mach-imx/devices-imx1.h b/arch/arm/mach-imx/devices-imx1.h new file mode 100644 index 000000000000..a5cfe046deb4 --- /dev/null +++ b/arch/arm/mach-imx/devices-imx1.h | |||
@@ -0,0 +1,13 @@ | |||
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/mx1.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx1_add_i2c_imx(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX1_I2C_BASE_ADDR, SZ_4K, MX1_INT_I2C, pdata) | ||
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index 3a599e94a65c..a34ad60e8f0a 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -70,25 +70,6 @@ struct platform_device imx1_camera_device = { | |||
70 | .num_resources = ARRAY_SIZE(imx1_camera_resources), | 70 | .num_resources = ARRAY_SIZE(imx1_camera_resources), |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static struct resource imx_i2c_resources[] = { | ||
74 | { | ||
75 | .start = 0x00217000, | ||
76 | .end = 0x00217010, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, { | ||
79 | .start = MX1_I2C_INT, | ||
80 | .end = MX1_I2C_INT, | ||
81 | .flags = IORESOURCE_IRQ, | ||
82 | }, | ||
83 | }; | ||
84 | |||
85 | struct platform_device imx_i2c_device0 = { | ||
86 | .name = "imx-i2c", | ||
87 | .id = 0, | ||
88 | .resource = imx_i2c_resources, | ||
89 | .num_resources = ARRAY_SIZE(imx_i2c_resources), | ||
90 | }; | ||
91 | |||
92 | #define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts) \ | 73 | #define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts) \ |
93 | static struct resource imx1_uart_resources ## n[] = { \ | 74 | static struct resource imx1_uart_resources ## n[] = { \ |
94 | { \ | 75 | { \ |
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h index 4ce7eef943f6..b4eb8a0c6207 100644 --- a/arch/arm/mach-imx/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -1,6 +1,5 @@ | |||
1 | #ifdef CONFIG_ARCH_MX1 | 1 | #ifdef CONFIG_ARCH_MX1 |
2 | extern struct platform_device imx1_camera_device; | 2 | extern struct platform_device imx1_camera_device; |
3 | extern struct platform_device imx_i2c_device0; | ||
4 | extern struct platform_device imx1_uart_device0; | 3 | extern struct platform_device imx1_uart_device0; |
5 | extern struct platform_device imx1_uart_device1; | 4 | extern struct platform_device imx1_uart_device1; |
6 | extern struct platform_device imx_rtc_device; | 5 | extern struct platform_device imx_rtc_device; |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 5d7c85f8aaf5..339d41ad19d5 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <mach/iomux-mx1.h> | 30 | #include <mach/iomux-mx1.h> |
31 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
32 | 32 | ||
33 | #include "devices-imx1.h" | ||
33 | #include "devices.h" | 34 | #include "devices.h" |
34 | 35 | ||
35 | static int mx1ads_pins[] = { | 36 | static int mx1ads_pins[] = { |
@@ -98,7 +99,7 @@ static struct pcf857x_platform_data pcf857x_data[] = { | |||
98 | } | 99 | } |
99 | }; | 100 | }; |
100 | 101 | ||
101 | static struct imxi2c_platform_data mx1ads_i2c_data = { | 102 | static const struct imxi2c_platform_data mx1ads_i2c_data __initconst = { |
102 | .bitrate = 100000, | 103 | .bitrate = 100000, |
103 | }; | 104 | }; |
104 | 105 | ||
@@ -131,7 +132,7 @@ static void __init mx1ads_init(void) | |||
131 | i2c_register_board_info(0, mx1ads_i2c_devices, | 132 | i2c_register_board_info(0, mx1ads_i2c_devices, |
132 | ARRAY_SIZE(mx1ads_i2c_devices)); | 133 | ARRAY_SIZE(mx1ads_i2c_devices)); |
133 | 134 | ||
134 | mxc_register_device(&imx_i2c_device0, &mx1ads_i2c_data); | 135 | imx1_add_i2c_imx(&mx1ads_i2c_data); |
135 | } | 136 | } |
136 | 137 | ||
137 | static void __init mx1ads_timer_init(void) | 138 | static void __init mx1ads_timer_init(void) |
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h index 5eba7e6785de..e99c0b21e092 100644 --- a/arch/arm/plat-mxc/include/mach/mx1.h +++ b/arch/arm/plat-mxc/include/mach/mx1.h | |||
@@ -108,7 +108,7 @@ | |||
108 | #define MX1_PEN_DATA_INT 33 | 108 | #define MX1_PEN_DATA_INT 33 |
109 | #define MX1_PWM_INT 34 | 109 | #define MX1_PWM_INT 34 |
110 | #define MX1_SDHC_INT 35 | 110 | #define MX1_SDHC_INT 35 |
111 | #define MX1_I2C_INT 39 | 111 | #define MX1_INT_I2C 39 |
112 | #define MX1_CSPI_INT 41 | 112 | #define MX1_CSPI_INT 41 |
113 | #define MX1_SSI_TX_INT 42 | 113 | #define MX1_SSI_TX_INT 42 |
114 | #define MX1_SSI_TX_ERR_INT 43 | 114 | #define MX1_SSI_TX_ERR_INT 43 |
@@ -245,7 +245,7 @@ | |||
245 | #define PEN_DATA_INT MX1_PEN_DATA_INT | 245 | #define PEN_DATA_INT MX1_PEN_DATA_INT |
246 | #define PWM_INT MX1_PWM_INT | 246 | #define PWM_INT MX1_PWM_INT |
247 | #define SDHC_INT MX1_SDHC_INT | 247 | #define SDHC_INT MX1_SDHC_INT |
248 | #define I2C_INT MX1_I2C_INT | 248 | #define I2C_INT MX1_INT_I2C |
249 | #define CSPI_INT MX1_CSPI_INT | 249 | #define CSPI_INT MX1_CSPI_INT |
250 | #define SSI_TX_INT MX1_SSI_TX_INT | 250 | #define SSI_TX_INT MX1_SSI_TX_INT |
251 | #define SSI_TX_ERR_INT MX1_SSI_TX_ERR_INT | 251 | #define SSI_TX_ERR_INT MX1_SSI_TX_ERR_INT |