aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-15 11:14:27 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:33:56 -0400
commit39d1dc068b61a8f36a3c1377fa52ed4901968a4f (patch)
tree3b3b50827b22196f3bd89f6753ea7fd5034a976b /arch/arm
parente48135519bd569eed374e0e17ed5233d4105fa97 (diff)
mx31: Add device definitions for the i.MX3x I2C controllers
The i.MX I2C driver has not yet been merged into mainline but it is near to that and the device defintions don't depend directly on it so we can add the devices now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-mx3/devices.c60
-rw-r--r--arch/arm/mach-mx3/devices.h3
2 files changed, 63 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index f8428800f286..c48a341bccf5 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -180,3 +180,63 @@ struct platform_device mxc_nand_device = {
180 .num_resources = ARRAY_SIZE(mxc_nand_resources), 180 .num_resources = ARRAY_SIZE(mxc_nand_resources),
181 .resource = mxc_nand_resources, 181 .resource = mxc_nand_resources,
182}; 182};
183
184static struct resource mxc_i2c0_resources[] = {
185 {
186 .start = I2C_BASE_ADDR,
187 .end = I2C_BASE_ADDR + SZ_4K - 1,
188 .flags = IORESOURCE_MEM,
189 },
190 {
191 .start = MXC_INT_I2C,
192 .end = MXC_INT_I2C,
193 .flags = IORESOURCE_IRQ,
194 },
195};
196
197struct platform_device mxc_i2c_device0 = {
198 .name = "imx-i2c",
199 .id = 0,
200 .num_resources = ARRAY_SIZE(mxc_i2c0_resources),
201 .resource = mxc_i2c0_resources,
202};
203
204static struct resource mxc_i2c1_resources[] = {
205 {
206 .start = I2C2_BASE_ADDR,
207 .end = I2C2_BASE_ADDR + SZ_4K - 1,
208 .flags = IORESOURCE_MEM,
209 },
210 {
211 .start = MXC_INT_I2C2,
212 .end = MXC_INT_I2C2,
213 .flags = IORESOURCE_IRQ,
214 },
215};
216
217struct platform_device mxc_i2c_device1 = {
218 .name = "imx-i2c",
219 .id = 1,
220 .num_resources = ARRAY_SIZE(mxc_i2c1_resources),
221 .resource = mxc_i2c1_resources,
222};
223
224static struct resource mxc_i2c2_resources[] = {
225 {
226 .start = I2C3_BASE_ADDR,
227 .end = I2C3_BASE_ADDR + SZ_4K - 1,
228 .flags = IORESOURCE_MEM,
229 },
230 {
231 .start = MXC_INT_I2C3,
232 .end = MXC_INT_I2C3,
233 .flags = IORESOURCE_IRQ,
234 },
235};
236
237struct platform_device mxc_i2c_device2 = {
238 .name = "imx-i2c",
239 .id = 2,
240 .num_resources = ARRAY_SIZE(mxc_i2c2_resources),
241 .resource = mxc_i2c2_resources,
242};
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index 9949ef4e0694..077a90226a71 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -6,3 +6,6 @@ extern struct platform_device mxc_uart_device3;
6extern struct platform_device mxc_uart_device4; 6extern struct platform_device mxc_uart_device4;
7extern struct platform_device mxc_w1_master_device; 7extern struct platform_device mxc_w1_master_device;
8extern struct platform_device mxc_nand_device; 8extern struct platform_device mxc_nand_device;
9extern struct platform_device mxc_i2c_device0;
10extern struct platform_device mxc_i2c_device1;
11extern struct platform_device mxc_i2c_device2;