diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-01-28 07:26:56 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-13 05:34:12 -0400 |
commit | c5d4dbff965b77b39c0188e4146892d76c775a98 (patch) | |
tree | c6150e509f28cd0777d51b02378fb791b4061367 /arch/arm/mach-mx2 | |
parent | 824b16e66b70f5df61345f5708c149f6886eef30 (diff) |
[ARM] MX2: Add I2C devices / resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx2')
-rw-r--r-- | arch/arm/mach-mx2/devices.c | 42 | ||||
-rw-r--r-- | arch/arm/mach-mx2/devices.h | 2 |
2 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index bef418e0e60e..7d12c2c4108f 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c | |||
@@ -281,6 +281,48 @@ struct platform_device mxc_fec_device = { | |||
281 | }; | 281 | }; |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | static struct resource mxc_i2c_1_resources[] = { | ||
285 | [0] = { | ||
286 | .start = I2C_BASE_ADDR, | ||
287 | .end = I2C_BASE_ADDR + 0x0fff, | ||
288 | .flags = IORESOURCE_MEM | ||
289 | }, | ||
290 | [1] = { | ||
291 | .start = MXC_INT_I2C, | ||
292 | .end = MXC_INT_I2C, | ||
293 | .flags = IORESOURCE_IRQ | ||
294 | } | ||
295 | }; | ||
296 | |||
297 | struct platform_device mxc_i2c_device0 = { | ||
298 | .name = "imx-i2c", | ||
299 | .id = 0, | ||
300 | .num_resources = ARRAY_SIZE(mxc_i2c_1_resources), | ||
301 | .resource = mxc_i2c_1_resources | ||
302 | }; | ||
303 | |||
304 | #ifdef CONFIG_MACH_MX27 | ||
305 | static struct resource mxc_i2c_2_resources[] = { | ||
306 | [0] = { | ||
307 | .start = I2C2_BASE_ADDR, | ||
308 | .end = I2C2_BASE_ADDR + 0x0fff, | ||
309 | .flags = IORESOURCE_MEM | ||
310 | }, | ||
311 | [1] = { | ||
312 | .start = MXC_INT_I2C2, | ||
313 | .end = MXC_INT_I2C2, | ||
314 | .flags = IORESOURCE_IRQ | ||
315 | } | ||
316 | }; | ||
317 | |||
318 | struct platform_device mxc_i2c_device1 = { | ||
319 | .name = "imx-i2c", | ||
320 | .id = 1, | ||
321 | .num_resources = ARRAY_SIZE(mxc_i2c_2_resources), | ||
322 | .resource = mxc_i2c_2_resources | ||
323 | }; | ||
324 | #endif | ||
325 | |||
284 | static struct resource mxc_pwm_resources[] = { | 326 | static struct resource mxc_pwm_resources[] = { |
285 | [0] = { | 327 | [0] = { |
286 | .start = PWM_BASE_ADDR, | 328 | .start = PWM_BASE_ADDR, |
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index 94a241419af7..271ab1e69826 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h | |||
@@ -16,3 +16,5 @@ extern struct platform_device mxc_nand_device; | |||
16 | extern struct platform_device mxc_fb_device; | 16 | extern struct platform_device mxc_fb_device; |
17 | extern struct platform_device mxc_fec_device; | 17 | extern struct platform_device mxc_fec_device; |
18 | extern struct platform_device mxc_pwm_device; | 18 | extern struct platform_device mxc_pwm_device; |
19 | extern struct platform_device mxc_i2c_device0; | ||
20 | extern struct platform_device mxc_i2c_device1; | ||