diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:45 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:08:36 -0400 |
commit | aac7ffa3ed121846b61347028828617c5dd1ce46 (patch) | |
tree | ec2590692fef62fe4df9dc772e2552bb17e50892 /arch/arm/mach-kirkwood | |
parent | 7e3819d820c9aa3536d15fe7310c054bef1f5f04 (diff) |
ARM: orion: Consolidate I2C initialization.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 485f3b9ba4e2..fc86a80ef565 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/serial_8250.h> | 14 | #include <linux/serial_8250.h> |
15 | #include <linux/mbus.h> | 15 | #include <linux/mbus.h> |
16 | #include <linux/mv643xx_i2c.h> | ||
17 | #include <linux/ata_platform.h> | 16 | #include <linux/ata_platform.h> |
18 | #include <linux/mtd/nand.h> | 17 | #include <linux/mtd/nand.h> |
19 | #include <linux/spi/orion_spi.h> | 18 | #include <linux/spi/orion_spi.h> |
@@ -324,37 +323,9 @@ void __init kirkwood_spi_init() | |||
324 | /***************************************************************************** | 323 | /***************************************************************************** |
325 | * I2C | 324 | * I2C |
326 | ****************************************************************************/ | 325 | ****************************************************************************/ |
327 | static struct mv64xxx_i2c_pdata kirkwood_i2c_pdata = { | ||
328 | .freq_m = 8, /* assumes 166 MHz TCLK */ | ||
329 | .freq_n = 3, | ||
330 | .timeout = 1000, /* Default timeout of 1 second */ | ||
331 | }; | ||
332 | |||
333 | static struct resource kirkwood_i2c_resources[] = { | ||
334 | { | ||
335 | .start = I2C_PHYS_BASE, | ||
336 | .end = I2C_PHYS_BASE + 0x1f, | ||
337 | .flags = IORESOURCE_MEM, | ||
338 | }, { | ||
339 | .start = IRQ_KIRKWOOD_TWSI, | ||
340 | .end = IRQ_KIRKWOOD_TWSI, | ||
341 | .flags = IORESOURCE_IRQ, | ||
342 | }, | ||
343 | }; | ||
344 | |||
345 | static struct platform_device kirkwood_i2c = { | ||
346 | .name = MV64XXX_I2C_CTLR_NAME, | ||
347 | .id = 0, | ||
348 | .num_resources = ARRAY_SIZE(kirkwood_i2c_resources), | ||
349 | .resource = kirkwood_i2c_resources, | ||
350 | .dev = { | ||
351 | .platform_data = &kirkwood_i2c_pdata, | ||
352 | }, | ||
353 | }; | ||
354 | |||
355 | void __init kirkwood_i2c_init(void) | 326 | void __init kirkwood_i2c_init(void) |
356 | { | 327 | { |
357 | platform_device_register(&kirkwood_i2c); | 328 | orion_i2c_init(I2C_PHYS_BASE, IRQ_KIRKWOOD_TWSI, 8); |
358 | } | 329 | } |
359 | 330 | ||
360 | 331 | ||