diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-09 16:33:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-09 16:33:05 -0400 |
commit | c97f68145e8067b3ac4b126a6faebf90f9ffc302 (patch) | |
tree | eb2060681552a00e9efa98224b95f69a3dc84390 /arch/arm/mach-davinci/devices.c | |
parent | b1add0480a95b6ceaece5caf6c50614771eae9b2 (diff) | |
parent | 7bff3c4ce44ea48f50dc47a5994454984bd08c59 (diff) |
Merge branch 'for-rmk' of git://source.mvista.com/git/linux-davinci-2.6.git
Merge branch 'davinci' into devel
Diffstat (limited to 'arch/arm/mach-davinci/devices.c')
-rw-r--r-- | arch/arm/mach-davinci/devices.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c new file mode 100644 index 000000000000..3d4b1de8f898 --- /dev/null +++ b/arch/arm/mach-davinci/devices.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * mach-davinci/devices.c | ||
3 | * | ||
4 | * DaVinci platform device setup/initialization | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/dma-mapping.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <asm/mach/map.h> | ||
20 | |||
21 | #include <mach/hardware.h> | ||
22 | #include <mach/i2c.h> | ||
23 | |||
24 | static struct resource i2c_resources[] = { | ||
25 | { | ||
26 | .start = DAVINCI_I2C_BASE, | ||
27 | .end = DAVINCI_I2C_BASE + 0x40, | ||
28 | .flags = IORESOURCE_MEM, | ||
29 | }, | ||
30 | { | ||
31 | .start = IRQ_I2C, | ||
32 | .flags = IORESOURCE_IRQ, | ||
33 | }, | ||
34 | }; | ||
35 | |||
36 | static struct platform_device davinci_i2c_device = { | ||
37 | .name = "i2c_davinci", | ||
38 | .id = 1, | ||
39 | .num_resources = ARRAY_SIZE(i2c_resources), | ||
40 | .resource = i2c_resources, | ||
41 | }; | ||
42 | |||
43 | void __init davinci_init_i2c(struct davinci_i2c_platform_data *pdata) | ||
44 | { | ||
45 | davinci_i2c_device.dev.platform_data = pdata; | ||
46 | (void) platform_device_register(&davinci_i2c_device); | ||
47 | } | ||
48 | |||