aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2010-03-11 05:42:47 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-04-07 03:22:03 -0400
commitc1909cc19abdfa9f995036996603c9e969117e72 (patch)
tree651cf7da24310c39026909f9bff1a5b73ba161cf /arch/arm/mach-shmobile
parent9bc4341eb79d885e5a9dda6384a60bb0f4655fe7 (diff)
ARM: mach-shmobile: sh7372: Add I2C0, I2C1 support
sh7372 chip has 2 INTC. Then, I2C0 is connected to INTCS, and I2C1 is connected to INTCA. Both of these has no GPIO settings. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 1d1153290f59..b7c5d896e01c 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -32,6 +32,7 @@
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34 34
35/* SCIF */
35static struct plat_sci_port scif0_platform_data = { 36static struct plat_sci_port scif0_platform_data = {
36 .mapbase = 0xe6c40000, 37 .mapbase = 0xe6c40000,
37 .flags = UPF_BOOT_AUTOCONF, 38 .flags = UPF_BOOT_AUTOCONF,
@@ -137,6 +138,7 @@ static struct platform_device scif6_device = {
137 }, 138 },
138}; 139};
139 140
141/* CMT */
140static struct sh_timer_config cmt10_platform_data = { 142static struct sh_timer_config cmt10_platform_data = {
141 .name = "CMT10", 143 .name = "CMT10",
142 .channel_offset = 0x10, 144 .channel_offset = 0x10,
@@ -169,6 +171,49 @@ static struct platform_device cmt10_device = {
169 .num_resources = ARRAY_SIZE(cmt10_resources), 171 .num_resources = ARRAY_SIZE(cmt10_resources),
170}; 172};
171 173
174/* I2C */
175static struct resource iic0_resources[] = {
176 [0] = {
177 .name = "IIC0",
178 .start = 0xFFF20000,
179 .end = 0xFFF20425 - 1,
180 .flags = IORESOURCE_MEM,
181 },
182 [1] = {
183 .start = intcs_evt2irq(0xe00),
184 .end = intcs_evt2irq(0xe60),
185 .flags = IORESOURCE_IRQ,
186 },
187};
188
189static struct platform_device iic0_device = {
190 .name = "i2c-sh_mobile",
191 .id = 0, /* "i2c0" clock */
192 .num_resources = ARRAY_SIZE(iic0_resources),
193 .resource = iic0_resources,
194};
195
196static struct resource iic1_resources[] = {
197 [0] = {
198 .name = "IIC1",
199 .start = 0xE6C20000,
200 .end = 0xE6C20425 - 1,
201 .flags = IORESOURCE_MEM,
202 },
203 [1] = {
204 .start = 44,
205 .end = 47,
206 .flags = IORESOURCE_IRQ,
207 },
208};
209
210static struct platform_device iic1_device = {
211 .name = "i2c-sh_mobile",
212 .id = 1, /* "i2c1" clock */
213 .num_resources = ARRAY_SIZE(iic1_resources),
214 .resource = iic1_resources,
215};
216
172static struct platform_device *sh7372_early_devices[] __initdata = { 217static struct platform_device *sh7372_early_devices[] __initdata = {
173 &scif0_device, 218 &scif0_device,
174 &scif1_device, 219 &scif1_device,
@@ -178,6 +223,8 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
178 &scif5_device, 223 &scif5_device,
179 &scif6_device, 224 &scif6_device,
180 &cmt10_device, 225 &cmt10_device,
226 &iic0_device,
227 &iic1_device,
181}; 228};
182 229
183void __init sh7372_add_standard_devices(void) 230void __init sh7372_add_standard_devices(void)