From 6b65cd742823f78a6538491982159098ab5fcae1 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 10 Dec 2006 21:21:32 +0100 Subject: i2c: New ARM Versatile/Realview bus driver Add support for the I2C bus found on the ARM Versatile and Realview platforms. The I2C bus has a RTC and optionally some EEPROMs attached. Signed-off-by: Russell King Signed-off-by: Jean Delvare --- arch/arm/mach-versatile/core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/arm/mach-versatile') diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 57196947559..bf71507c76f 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -325,6 +325,19 @@ static struct platform_device smc91x_device = { .resource = smc91x_resources, }; +static struct resource versatile_i2c_resource = { + .start = VERSATILE_I2C_BASE, + .end = VERSATILE_I2C_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device versatile_i2c_device = { + .name = "versatile-i2c", + .id = -1, + .num_resources = 1, + .resource = &versatile_i2c_resource, +}; + #define VERSATILE_SYSMCI (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET) unsigned int mmc_status(struct device *dev) @@ -775,6 +788,7 @@ void __init versatile_init(void) clk_register(&versatile_clcd_clk); platform_device_register(&versatile_flash_device); + platform_device_register(&versatile_i2c_device); platform_device_register(&smc91x_device); for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { -- cgit v1.2.3-70-g09d2