summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx2
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-01-28 13:26:56 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 10:34:12 +0100
commitc5d4dbff965b77b39c0188e4146892d76c775a98 (patch)
treec6150e509f28cd0777d51b02378fb791b4061367 /arch/arm/mach-mx2
parent824b16e66b70f5df61345f5708c149f6886eef30 (diff)
downloadop-kernel-dev-c5d4dbff965b77b39c0188e4146892d76c775a98.zip
op-kernel-dev-c5d4dbff965b77b39c0188e4146892d76c775a98.tar.gz
[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.c42
-rw-r--r--arch/arm/mach-mx2/devices.h2
2 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c
index bef418e..7d12c2c 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 = {
};
#endif
+static struct resource mxc_i2c_1_resources[] = {
+ [0] = {
+ .start = I2C_BASE_ADDR,
+ .end = I2C_BASE_ADDR + 0x0fff,
+ .flags = IORESOURCE_MEM
+ },
+ [1] = {
+ .start = MXC_INT_I2C,
+ .end = MXC_INT_I2C,
+ .flags = IORESOURCE_IRQ
+ }
+};
+
+struct platform_device mxc_i2c_device0 = {
+ .name = "imx-i2c",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(mxc_i2c_1_resources),
+ .resource = mxc_i2c_1_resources
+};
+
+#ifdef CONFIG_MACH_MX27
+static struct resource mxc_i2c_2_resources[] = {
+ [0] = {
+ .start = I2C2_BASE_ADDR,
+ .end = I2C2_BASE_ADDR + 0x0fff,
+ .flags = IORESOURCE_MEM
+ },
+ [1] = {
+ .start = MXC_INT_I2C2,
+ .end = MXC_INT_I2C2,
+ .flags = IORESOURCE_IRQ
+ }
+};
+
+struct platform_device mxc_i2c_device1 = {
+ .name = "imx-i2c",
+ .id = 1,
+ .num_resources = ARRAY_SIZE(mxc_i2c_2_resources),
+ .resource = mxc_i2c_2_resources
+};
+#endif
+
static struct resource mxc_pwm_resources[] = {
[0] = {
.start = PWM_BASE_ADDR,
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h
index 94a2414..271ab1e 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;
extern struct platform_device mxc_fb_device;
extern struct platform_device mxc_fec_device;
extern struct platform_device mxc_pwm_device;
+extern struct platform_device mxc_i2c_device0;
+extern struct platform_device mxc_i2c_device1;
OpenPOWER on IntegriCloud