aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop33x
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-09-18 18:15:21 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 05:25:38 -0400
commite25d64f1242e8586f6e20c26fd876a4d956a6c45 (patch)
tree1a68da7173716896254847708dcd1675102a24ac /arch/arm/mach-iop33x
parent7ae1f7ec525c32db441836ab0ab010b85cb819a2 (diff)
[ARM] 3819/1: iop3xx: factor out shared i2c code
Move the i2c bits shared between iop32x and iop33x to plat-iop/i2c.c and include/asm-arm/hardware/iop3xx.h. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-iop33x')
-rw-r--r--arch/arm/mach-iop33x/setup.c44
1 files changed, 2 insertions, 42 deletions
diff --git a/arch/arm/mach-iop33x/setup.c b/arch/arm/mach-iop33x/setup.c
index 67cb21cb0ad9..ad737d6582b5 100644
--- a/arch/arm/mach-iop33x/setup.c
+++ b/arch/arm/mach-iop33x/setup.c
@@ -100,51 +100,9 @@ static struct platform_device iop33x_uart1 = {
100 .resource = iop33x_uart1_resources, 100 .resource = iop33x_uart1_resources,
101}; 101};
102 102
103static struct resource iop33x_i2c_0_resources[] = {
104 [0] = {
105 .start = 0xfffff680,
106 .end = 0xfffff698,
107 .flags = IORESOURCE_MEM,
108 },
109 [1] = {
110 .start = IRQ_IOP331_I2C_0,
111 .end = IRQ_IOP331_I2C_0,
112 .flags = IORESOURCE_IRQ
113 }
114};
115
116static struct resource iop33x_i2c_1_resources[] = {
117 [0] = {
118 .start = 0xfffff6a0,
119 .end = 0xfffff6b8,
120 .flags = IORESOURCE_MEM,
121 },
122 [1] = {
123 .start = IRQ_IOP331_I2C_1,
124 .end = IRQ_IOP331_I2C_1,
125 .flags = IORESOURCE_IRQ
126 }
127};
128
129static struct platform_device iop33x_i2c_0_controller = {
130 .name = "IOP3xx-I2C",
131 .id = 0,
132 .num_resources = 2,
133 .resource = iop33x_i2c_0_resources
134};
135
136static struct platform_device iop33x_i2c_1_controller = {
137 .name = "IOP3xx-I2C",
138 .id = 1,
139 .num_resources = 2,
140 .resource = iop33x_i2c_1_resources
141};
142
143static struct platform_device *iop33x_devices[] __initdata = { 103static struct platform_device *iop33x_devices[] __initdata = {
144 &iop33x_uart0, 104 &iop33x_uart0,
145 &iop33x_uart1, 105 &iop33x_uart1,
146 &iop33x_i2c_0_controller,
147 &iop33x_i2c_1_controller
148}; 106};
149 107
150void __init iop33x_init(void) 108void __init iop33x_init(void)
@@ -154,6 +112,8 @@ void __init iop33x_init(void)
154 platform_add_devices(iop33x_devices, 112 platform_add_devices(iop33x_devices,
155 ARRAY_SIZE(iop33x_devices)); 113 ARRAY_SIZE(iop33x_devices));
156 } 114 }
115 platform_device_register(&iop3xx_i2c0_device);
116 platform_device_register(&iop3xx_i2c1_device);
157} 117}
158 118
159#ifdef CONFIG_ARCH_IOP33X 119#ifdef CONFIG_ARCH_IOP33X