aboutsummaryrefslogtreecommitdiffstats
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 08:26:06 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-30 08:26:06 -0400
commitbb9bffcbef6166cf03385fbcde97c27bc1a5e689 (patch)
tree7a76d85912492f50504ba428f4e1c9bdd3725c37 /arch/arm/mach-pxa/generic.c
parentd5aa207e46ff7ee838683a7d95ecf46fe42a9a56 (diff)
[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 = {
220 .id = 2, 220 .id = 2,
221}; 221};
222 222
223static struct resource i2c_resources[] = {
224 {
225 .start = 0x40301680,
226 .end = 0x403016a3,
227 .flags = IORESOURCE_MEM,
228 }, {
229 .start = IRQ_I2C,
230 .end = IRQ_I2C,
231 .flags = IORESOURCE_IRQ,
232 },
233};
234
235static struct platform_device i2c_device = {
236 .name = "pxa2xx-i2c",
237 .id = 0,
238 .resource = i2c_resources,
239 .num_resources = ARRAY_SIZE(i2c_resources),
240};
241
242void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
243{
244 i2c_device.dev.platform_data = info;
245}
246
223static struct platform_device *devices[] __initdata = { 247static struct platform_device *devices[] __initdata = {
224 &pxamci_device, 248 &pxamci_device,
225 &udc_device, 249 &udc_device,
@@ -227,6 +251,7 @@ static struct platform_device *devices[] __initdata = {
227 &ffuart_device, 251 &ffuart_device,
228 &btuart_device, 252 &btuart_device,
229 &stuart_device, 253 &stuart_device,
254 &i2c_device,
230}; 255};
231 256
232static int __init pxa_init(void) 257static int __init pxa_init(void)