aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-lpc32xx
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-lpc32xx
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-lpc32xx')
-rw-r--r--arch/arm/mach-lpc32xx/common.c67
1 files changed, 42 insertions, 25 deletions
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c
index bbbf063a74c2..6f255600fc97 100644
--- a/arch/arm/mach-lpc32xx/common.c
+++ b/arch/arm/mach-lpc32xx/common.c
@@ -27,7 +27,6 @@
27 27
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29 29
30#include <mach/i2c.h>
31#include <mach/hardware.h> 30#include <mach/hardware.h>
32#include <mach/platform.h> 31#include <mach/platform.h>
33#include "common.h" 32#include "common.h"
@@ -53,46 +52,64 @@ struct platform_device lpc32xx_watchdog_device = {
53/* 52/*
54 * I2C busses 53 * I2C busses
55 */ 54 */
56static struct i2c_pnx_data i2c0_data = { 55static struct resource i2c0_resources[] = {
57 .name = I2C_CHIP_NAME "1", 56 [0] = {
58 .base = LPC32XX_I2C1_BASE, 57 .start = LPC32XX_I2C1_BASE,
59 .irq = IRQ_LPC32XX_I2C_1, 58 .end = LPC32XX_I2C1_BASE + 0x100 - 1,
59 .flags = IORESOURCE_MEM,
60 },
61 [1] = {
62 .start = IRQ_LPC32XX_I2C_1,
63 .end = IRQ_LPC32XX_I2C_1,
64 .flags = IORESOURCE_IRQ,
65 },
60}; 66};
61 67
62static struct i2c_pnx_data i2c1_data = { 68static struct resource i2c1_resources[] = {
63 .name = I2C_CHIP_NAME "2", 69 [0] = {
64 .base = LPC32XX_I2C2_BASE, 70 .start = LPC32XX_I2C2_BASE,
65 .irq = IRQ_LPC32XX_I2C_2, 71 .end = LPC32XX_I2C2_BASE + 0x100 - 1,
72 .flags = IORESOURCE_MEM,
73 },
74 [1] = {
75 .start = IRQ_LPC32XX_I2C_2,
76 .end = IRQ_LPC32XX_I2C_2,
77 .flags = IORESOURCE_IRQ,
78 },
66}; 79};
67 80
68static struct i2c_pnx_data i2c2_data = { 81static struct resource i2c2_resources[] = {
69 .name = "USB-I2C", 82 [0] = {
70 .base = LPC32XX_OTG_I2C_BASE, 83 .start = LPC32XX_OTG_I2C_BASE,
71 .irq = IRQ_LPC32XX_USB_I2C, 84 .end = LPC32XX_OTG_I2C_BASE + 0x100 - 1,
85 .flags = IORESOURCE_MEM,
86 },
87 [1] = {
88 .start = IRQ_LPC32XX_USB_I2C,
89 .end = IRQ_LPC32XX_USB_I2C,
90 .flags = IORESOURCE_IRQ,
91 },
72}; 92};
73 93
74struct platform_device lpc32xx_i2c0_device = { 94struct platform_device lpc32xx_i2c0_device = {
75 .name = "pnx-i2c", 95 .name = "pnx-i2c.0",
76 .id = 0, 96 .id = 0,
77 .dev = { 97 .num_resources = ARRAY_SIZE(i2c0_resources),
78 .platform_data = &i2c0_data, 98 .resource = i2c0_resources,
79 },
80}; 99};
81 100
82struct platform_device lpc32xx_i2c1_device = { 101struct platform_device lpc32xx_i2c1_device = {
83 .name = "pnx-i2c", 102 .name = "pnx-i2c.1",
84 .id = 1, 103 .id = 1,
85 .dev = { 104 .num_resources = ARRAY_SIZE(i2c1_resources),
86 .platform_data = &i2c1_data, 105 .resource = i2c1_resources,
87 },
88}; 106};
89 107
90struct platform_device lpc32xx_i2c2_device = { 108struct platform_device lpc32xx_i2c2_device = {
91 .name = "pnx-i2c", 109 .name = "pnx-i2c.2",
92 .id = 2, 110 .id = 2,
93 .dev = { 111 .num_resources = ARRAY_SIZE(i2c2_resources),
94 .platform_data = &i2c2_data, 112 .resource = i2c2_resources,
95 },
96}; 113};
97 114
98/* TSC (Touch Screen Controller) */ 115/* TSC (Touch Screen Controller) */