summaryrefslogtreecommitdiff
path: root/arch/arm/mach-iop32x/setup.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-09-18 23:15:21 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 10:25:38 +0100
commite25d64f1242e8586f6e20c26fd876a4d956a6c45 (patch)
tree1a68da7173716896254847708dcd1675102a24ac /arch/arm/mach-iop32x/setup.c
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-iop32x/setup.c')
-rw-r--r--arch/arm/mach-iop32x/setup.c53
1 files changed, 3 insertions, 50 deletions
diff --git a/arch/arm/mach-iop32x/setup.c b/arch/arm/mach-iop32x/setup.c
index 48d806474f40..1a03b0b41baa 100644
--- a/arch/arm/mach-iop32x/setup.c
+++ b/arch/arm/mach-iop32x/setup.c
@@ -29,6 +29,7 @@
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
+#include <asm/hardware/iop3xx.h>
#define IOP321_UART_XTAL 1843200
@@ -57,58 +58,10 @@ static struct uart_port iop321_serial_ports[] = {
}
};
-static struct resource iop32x_i2c_0_resources[] = {
- [0] = {
- .start = 0xfffff680,
- .end = 0xfffff698,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = IRQ_IOP321_I2C_0,
- .end = IRQ_IOP321_I2C_0,
- .flags = IORESOURCE_IRQ
- }
-};
-
-static struct resource iop32x_i2c_1_resources[] = {
- [0] = {
- .start = 0xfffff6a0,
- .end = 0xfffff6b8,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = IRQ_IOP321_I2C_1,
- .end = IRQ_IOP321_I2C_1,
- .flags = IORESOURCE_IRQ
- }
-};
-
-static struct platform_device iop32x_i2c_0_controller = {
- .name = "IOP3xx-I2C",
- .id = 0,
- .num_resources = 2,
- .resource = iop32x_i2c_0_resources
-};
-
-static struct platform_device iop32x_i2c_1_controller = {
- .name = "IOP3xx-I2C",
- .id = 1,
- .num_resources = 2,
- .resource = iop32x_i2c_1_resources
-};
-
-static struct platform_device *iop32x_devices[] __initdata = {
- &iop32x_i2c_0_controller,
- &iop32x_i2c_1_controller
-};
-
void __init iop32x_init(void)
{
- if(iop_is_321())
- {
- platform_add_devices(iop32x_devices,
- ARRAY_SIZE(iop32x_devices));
- }
+ platform_device_register(&iop3xx_i2c0_device);
+ platform_device_register(&iop3xx_i2c1_device);
early_serial_setup(&iop321_serial_ports[0]);
}