aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pnx4008
diff options
context:
space:
mode:
authorRoland Stigge <stigge@antcom.de>2012-04-22 05:59:47 -0400
committerRoland Stigge <stigge@antcom.de>2012-04-22 05:59:47 -0400
commit1451ba3a5fa52d874e03a3380d053f3e6a5fcae4 (patch)
treee40a2b10951eabace15836d658eea8848d47564c /arch/arm/mach-pnx4008
parentc4cea7fc1bfd8a36d08f8114efcb11d649d97d5a (diff)
i2c-pnx.c: Use resources in platforms
As a precondition for device tree conversion, the platforms using i2c-pnx.c are converted to using mem and irq resources instead of platform data. Signed-off-by: Roland Stigge <stigge@antcom.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-pnx4008')
-rw-r--r--arch/arm/mach-pnx4008/i2c.c64
1 files changed, 39 insertions, 25 deletions
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c
index 8103f9644e2d..550cfc2a1f2e 100644
--- a/arch/arm/mach-pnx4008/i2c.c
+++ b/arch/arm/mach-pnx4008/i2c.c
@@ -16,48 +16,62 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <mach/platform.h> 17#include <mach/platform.h>
18#include <mach/irqs.h> 18#include <mach/irqs.h>
19#include <mach/i2c.h>
20 19
21static struct i2c_pnx_data i2c0_data = { 20static struct resource i2c0_resources[] = {
22 .name = I2C_CHIP_NAME "0", 21 {
23 .base = PNX4008_I2C1_BASE, 22 .start = PNX4008_I2C1_BASE,
24 .irq = I2C_1_INT, 23 .end = PNX4008_I2C1_BASE + SZ_4K - 1,
24 .flags = IORESOURCE_MEM,
25 }, {
26 .start = I2C_1_INT,
27 .end = I2C_1_INT,
28 .flags = IORESOURCE_IRQ,
29 },
25}; 30};
26 31
27static struct i2c_pnx_data i2c1_data = { 32static struct resource i2c1_resources[] = {
28 .name = I2C_CHIP_NAME "1", 33 {
29 .base = PNX4008_I2C2_BASE, 34 .start = PNX4008_I2C2_BASE,
30 .irq = I2C_2_INT, 35 .end = PNX4008_I2C2_BASE + SZ_4K - 1,
36 .flags = IORESOURCE_MEM,
37 }, {
38 .start = I2C_2_INT,
39 .end = I2C_2_INT,
40 .flags = IORESOURCE_IRQ,
41 },
31}; 42};
32 43
33static struct i2c_pnx_data i2c2_data = { 44static struct resource i2c2_resources[] = {
34 .name = "USB-I2C", 45 {
35 .base = (PNX4008_USB_CONFIG_BASE + 0x300), 46 .start = PNX4008_USB_CONFIG_BASE + 0x300,
36 .irq = USB_I2C_INT, 47 .end = PNX4008_USB_CONFIG_BASE + 0x300 + SZ_4K - 1,
48 .flags = IORESOURCE_MEM,
49 }, {
50 .start = USB_I2C_INT,
51 .end = USB_I2C_INT,
52 .flags = IORESOURCE_IRQ,
53 },
37}; 54};
38 55
39static struct platform_device i2c0_device = { 56static struct platform_device i2c0_device = {
40 .name = "pnx-i2c", 57 .name = "pnx-i2c.0",
41 .id = 0, 58 .id = 0,
42 .dev = { 59 .resource = i2c0_resources,
43 .platform_data = &i2c0_data, 60 .num_resources = ARRAY_SIZE(i2c0_resources),
44 },
45}; 61};
46 62
47static struct platform_device i2c1_device = { 63static struct platform_device i2c1_device = {
48 .name = "pnx-i2c", 64 .name = "pnx-i2c.1",
49 .id = 1, 65 .id = 1,
50 .dev = { 66 .resource = i2c1_resources,
51 .platform_data = &i2c1_data, 67 .num_resources = ARRAY_SIZE(i2c1_resources),
52 },
53}; 68};
54 69
55static struct platform_device i2c2_device = { 70static struct platform_device i2c2_device = {
56 .name = "pnx-i2c", 71 .name = "pnx-i2c.2",
57 .id = 2, 72 .id = 2,
58 .dev = { 73 .resource = i2c2_resources,
59 .platform_data = &i2c2_data, 74 .num_resources = ARRAY_SIZE(i2c2_resources),
60 },
61}; 75};
62 76
63static struct platform_device *devices[] __initdata = { 77static struct platform_device *devices[] __initdata = {