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-dove/common.c | |
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-dove/common.c')
-rw-r--r-- | arch/arm/mach-dove/common.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 1d878ce69d93..198760b1b17d 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/mbus.h> | 18 | #include <linux/mbus.h> |
19 | #include <linux/mv643xx_i2c.h> | ||
20 | #include <linux/ata_platform.h> | 19 | #include <linux/ata_platform.h> |
21 | #include <linux/serial_8250.h> | 20 | #include <linux/serial_8250.h> |
22 | #include <linux/spi/orion_spi.h> | 21 | #include <linux/spi/orion_spi.h> |
@@ -305,39 +304,9 @@ void __init dove_spi1_init(void) | |||
305 | /***************************************************************************** | 304 | /***************************************************************************** |
306 | * I2C | 305 | * I2C |
307 | ****************************************************************************/ | 306 | ****************************************************************************/ |
308 | static struct mv64xxx_i2c_pdata dove_i2c_data = { | ||
309 | .freq_m = 10, /* assumes 166 MHz TCLK gets 94.3kHz */ | ||
310 | .freq_n = 3, | ||
311 | .timeout = 1000, /* Default timeout of 1 second */ | ||
312 | }; | ||
313 | |||
314 | static struct resource dove_i2c_resources[] = { | ||
315 | { | ||
316 | .name = "i2c base", | ||
317 | .start = DOVE_I2C_PHYS_BASE, | ||
318 | .end = DOVE_I2C_PHYS_BASE + 0x20 - 1, | ||
319 | .flags = IORESOURCE_MEM, | ||
320 | }, { | ||
321 | .name = "i2c irq", | ||
322 | .start = IRQ_DOVE_I2C, | ||
323 | .end = IRQ_DOVE_I2C, | ||
324 | .flags = IORESOURCE_IRQ, | ||
325 | }, | ||
326 | }; | ||
327 | |||
328 | static struct platform_device dove_i2c = { | ||
329 | .name = MV64XXX_I2C_CTLR_NAME, | ||
330 | .id = 0, | ||
331 | .num_resources = ARRAY_SIZE(dove_i2c_resources), | ||
332 | .resource = dove_i2c_resources, | ||
333 | .dev = { | ||
334 | .platform_data = &dove_i2c_data, | ||
335 | }, | ||
336 | }; | ||
337 | |||
338 | void __init dove_i2c_init(void) | 307 | void __init dove_i2c_init(void) |
339 | { | 308 | { |
340 | platform_device_register(&dove_i2c); | 309 | orion_i2c_init(DOVE_I2C_PHYS_BASE, IRQ_DOVE_I2C, 10); |
341 | } | 310 | } |
342 | 311 | ||
343 | /***************************************************************************** | 312 | /***************************************************************************** |