diff options
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 9f012551794d..19b03f62c3f4 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -14,6 +14,7 @@ | |||
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_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/mv643xx_i2c.h> | ||
17 | #include <linux/ata_platform.h> | 18 | #include <linux/ata_platform.h> |
18 | #include <linux/spi/orion_spi.h> | 19 | #include <linux/spi/orion_spi.h> |
19 | #include <net/dsa.h> | 20 | #include <net/dsa.h> |
@@ -371,6 +372,45 @@ void __init kirkwood_spi_init() | |||
371 | 372 | ||
372 | 373 | ||
373 | /***************************************************************************** | 374 | /***************************************************************************** |
375 | * I2C | ||
376 | ****************************************************************************/ | ||
377 | static struct mv64xxx_i2c_pdata kirkwood_i2c_pdata = { | ||
378 | .freq_m = 8, /* assumes 166 MHz TCLK */ | ||
379 | .freq_n = 3, | ||
380 | .timeout = 1000, /* Default timeout of 1 second */ | ||
381 | }; | ||
382 | |||
383 | static struct resource kirkwood_i2c_resources[] = { | ||
384 | { | ||
385 | .name = "i2c", | ||
386 | .start = I2C_PHYS_BASE, | ||
387 | .end = I2C_PHYS_BASE + 0x1f, | ||
388 | .flags = IORESOURCE_MEM, | ||
389 | }, { | ||
390 | .name = "i2c", | ||
391 | .start = IRQ_KIRKWOOD_TWSI, | ||
392 | .end = IRQ_KIRKWOOD_TWSI, | ||
393 | .flags = IORESOURCE_IRQ, | ||
394 | }, | ||
395 | }; | ||
396 | |||
397 | static struct platform_device kirkwood_i2c = { | ||
398 | .name = MV64XXX_I2C_CTLR_NAME, | ||
399 | .id = 0, | ||
400 | .num_resources = ARRAY_SIZE(kirkwood_i2c_resources), | ||
401 | .resource = kirkwood_i2c_resources, | ||
402 | .dev = { | ||
403 | .platform_data = &kirkwood_i2c_pdata, | ||
404 | }, | ||
405 | }; | ||
406 | |||
407 | void __init kirkwood_i2c_init(void) | ||
408 | { | ||
409 | platform_device_register(&kirkwood_i2c); | ||
410 | } | ||
411 | |||
412 | |||
413 | /***************************************************************************** | ||
374 | * UART0 | 414 | * UART0 |
375 | ****************************************************************************/ | 415 | ****************************************************************************/ |
376 | static struct plat_serial8250_port kirkwood_uart0_data[] = { | 416 | static struct plat_serial8250_port kirkwood_uart0_data[] = { |