summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/generic.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 14:26:06 +0200
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 14:26:06 +0200
commitbb9bffcbef6166cf03385fbcde97c27bc1a5e689 (patch)
tree7a76d85912492f50504ba428f4e1c9bdd3725c37 /arch/arm/mach-pxa/generic.c
parent[PATCH] ARM: RTC: allow driver methods to return error (diff)
downloadlinux-bb9bffcbef6166cf03385fbcde97c27bc1a5e689.tar.xz
linux-bb9bffcbef6166cf03385fbcde97c27bc1a5e689.zip
[PATCH] ARM: PXA I2C: add platform device
Add the PXA I2C platform device. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
-rw-r--r--arch/arm/mach-pxa/generic.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index b1575b8dc1cd..a45aaa115a76 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -220,6 +220,30 @@ static struct platform_device stuart_device = {
.id = 2,
};
+static struct resource i2c_resources[] = {
+ {
+ .start = 0x40301680,
+ .end = 0x403016a3,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = IRQ_I2C,
+ .end = IRQ_I2C,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device i2c_device = {
+ .name = "pxa2xx-i2c",
+ .id = 0,
+ .resource = i2c_resources,
+ .num_resources = ARRAY_SIZE(i2c_resources),
+};
+
+void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
+{
+ i2c_device.dev.platform_data = info;
+}
+
static struct platform_device *devices[] __initdata = {
&pxamci_device,
&udc_device,
@@ -227,6 +251,7 @@ static struct platform_device *devices[] __initdata = {
&ffuart_device,
&btuart_device,
&stuart_device,
+ &i2c_device,
};
static int __init pxa_init(void)