diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2009-04-16 00:16:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-16 01:49:00 -0400 |
commit | 40c7e8be556715079d0a9d7454ceb5371a2f0b39 (patch) | |
tree | 2dcc3fda9f27db55bba8ce3acecd06895da90b85 /arch/sh/kernel/cpu/sh4a | |
parent | 47948d2bd6d27648a107a27357b3bc5ad054ff64 (diff) |
sh: sh7724: Add I2C support.
This adds support for the SH-Mobile I2C controller on the SH7724.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 4327b1e080b..f17eda6688d 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -99,9 +99,55 @@ static struct platform_device rtc_device = { | |||
99 | .resource = rtc_resources, | 99 | .resource = rtc_resources, |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* I2C0 */ | ||
103 | static struct resource iic0_resources[] = { | ||
104 | [0] = { | ||
105 | .name = "IIC0", | ||
106 | .start = 0x04470000, | ||
107 | .end = 0x04470018 - 1, | ||
108 | .flags = IORESOURCE_MEM, | ||
109 | }, | ||
110 | [1] = { | ||
111 | .start = 96, | ||
112 | .end = 99, | ||
113 | .flags = IORESOURCE_IRQ, | ||
114 | }, | ||
115 | }; | ||
116 | |||
117 | static struct platform_device iic0_device = { | ||
118 | .name = "i2c-sh_mobile", | ||
119 | .id = 0, /* "i2c0" clock */ | ||
120 | .num_resources = ARRAY_SIZE(iic0_resources), | ||
121 | .resource = iic0_resources, | ||
122 | }; | ||
123 | |||
124 | /* I2C1 */ | ||
125 | static struct resource iic1_resources[] = { | ||
126 | [0] = { | ||
127 | .name = "IIC1", | ||
128 | .start = 0x04750000, | ||
129 | .end = 0x04750018 - 1, | ||
130 | .flags = IORESOURCE_MEM, | ||
131 | }, | ||
132 | [1] = { | ||
133 | .start = 92, | ||
134 | .end = 95, | ||
135 | .flags = IORESOURCE_IRQ, | ||
136 | }, | ||
137 | }; | ||
138 | |||
139 | static struct platform_device iic1_device = { | ||
140 | .name = "i2c-sh_mobile", | ||
141 | .id = 1, /* "i2c1" clock */ | ||
142 | .num_resources = ARRAY_SIZE(iic1_resources), | ||
143 | .resource = iic1_resources, | ||
144 | }; | ||
145 | |||
102 | static struct platform_device *sh7724_devices[] __initdata = { | 146 | static struct platform_device *sh7724_devices[] __initdata = { |
103 | &sci_device, | 147 | &sci_device, |
104 | &rtc_device, | 148 | &rtc_device, |
149 | &iic0_device, | ||
150 | &iic1_device, | ||
105 | }; | 151 | }; |
106 | 152 | ||
107 | static int __init sh7724_devices_setup(void) | 153 | static int __init sh7724_devices_setup(void) |