diff options
author | Russell King <rmk@arm.linux.org.uk> | 2006-12-10 15:21:32 -0500 |
---|---|---|
committer | Jean Delvare <khali@arrakis.delvare> | 2006-12-10 15:21:32 -0500 |
commit | 6b65cd742823f78a6538491982159098ab5fcae1 (patch) | |
tree | 1ab913871887b73418583da527716df9da692419 /arch/arm/mach-realview | |
parent | 763d9c046a2e511ec090a8986d3f85edf7448e7e (diff) |
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 <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r-- | arch/arm/mach-realview/core.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 68c67053f479..84d3fe76e94e 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -141,6 +141,19 @@ struct platform_device realview_smc91x_device = { | |||
141 | .resource = realview_smc91x_resources, | 141 | .resource = realview_smc91x_resources, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static struct resource realview_i2c_resource = { | ||
145 | .start = REALVIEW_I2C_BASE, | ||
146 | .end = REALVIEW_I2C_BASE + SZ_4K - 1, | ||
147 | .flags = IORESOURCE_MEM, | ||
148 | }; | ||
149 | |||
150 | struct platform_device realview_i2c_device = { | ||
151 | .name = "versatile-i2c", | ||
152 | .id = -1, | ||
153 | .num_resources = 1, | ||
154 | .resource = &realview_i2c_resource, | ||
155 | }; | ||
156 | |||
144 | #define REALVIEW_SYSMCI (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET) | 157 | #define REALVIEW_SYSMCI (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET) |
145 | 158 | ||
146 | static unsigned int realview_mmc_status(struct device *dev) | 159 | static unsigned int realview_mmc_status(struct device *dev) |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 93e86d9f439c..2b53420f9c1b 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -108,6 +108,7 @@ static struct amba_device name##_device = { \ | |||
108 | 108 | ||
109 | extern struct platform_device realview_flash_device; | 109 | extern struct platform_device realview_flash_device; |
110 | extern struct platform_device realview_smc91x_device; | 110 | extern struct platform_device realview_smc91x_device; |
111 | extern struct platform_device realview_i2c_device; | ||
111 | extern struct mmc_platform_data realview_mmc0_plat_data; | 112 | extern struct mmc_platform_data realview_mmc0_plat_data; |
112 | extern struct mmc_platform_data realview_mmc1_plat_data; | 113 | extern struct mmc_platform_data realview_mmc1_plat_data; |
113 | extern struct clk realview_clcd_clk; | 114 | extern struct clk realview_clcd_clk; |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 84a959530fb6..9741b4d3c9cf 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -155,6 +155,7 @@ static void __init realview_eb_init(void) | |||
155 | 155 | ||
156 | platform_device_register(&realview_flash_device); | 156 | platform_device_register(&realview_flash_device); |
157 | platform_device_register(&realview_smc91x_device); | 157 | platform_device_register(&realview_smc91x_device); |
158 | platform_device_register(&realview_i2c_device); | ||
158 | 159 | ||
159 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 160 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
160 | struct amba_device *d = amba_devs[i]; | 161 | struct amba_device *d = amba_devs[i]; |