diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-01-22 04:56:09 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-01-29 03:02:51 -0500 |
commit | 424f59d04d7450555ef2bf1eb4a5e2cd2ecf08cd (patch) | |
tree | 4484f1b30b88fd64d015ea4bb93275bc6a1f09e3 | |
parent | 3fb1b6ad0679ad671bd496712b2a088550ee86b2 (diff) |
sh: CMT platform data for sh7723/sh7722/sh7366/sh7343
CMT platform data for SuperH Mobile sh7723/sh7722/sh7343/sh7366.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 34 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 34 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 34 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 34 |
4 files changed, 136 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 4ff4dc64520..c1549382c87 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/serial.h> | 12 | #include <linux/serial.h> |
13 | #include <linux/serial_sci.h> | 13 | #include <linux/serial_sci.h> |
14 | #include <linux/uio_driver.h> | 14 | #include <linux/uio_driver.h> |
15 | #include <linux/sh_cmt.h> | ||
15 | #include <asm/clock.h> | 16 | #include <asm/clock.h> |
16 | 17 | ||
17 | static struct resource iic0_resources[] = { | 18 | static struct resource iic0_resources[] = { |
@@ -140,6 +141,38 @@ static struct platform_device jpu_device = { | |||
140 | .num_resources = ARRAY_SIZE(jpu_resources), | 141 | .num_resources = ARRAY_SIZE(jpu_resources), |
141 | }; | 142 | }; |
142 | 143 | ||
144 | static struct sh_cmt_config cmt_platform_data = { | ||
145 | .name = "CMT", | ||
146 | .channel_offset = 0x60, | ||
147 | .timer_bit = 5, | ||
148 | .clk = "cmt0", | ||
149 | .clockevent_rating = 125, | ||
150 | .clocksource_rating = 200, | ||
151 | }; | ||
152 | |||
153 | static struct resource cmt_resources[] = { | ||
154 | [0] = { | ||
155 | .name = "CMT", | ||
156 | .start = 0x044a0060, | ||
157 | .end = 0x044a006b, | ||
158 | .flags = IORESOURCE_MEM, | ||
159 | }, | ||
160 | [1] = { | ||
161 | .start = 104, | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | }; | ||
165 | |||
166 | static struct platform_device cmt_device = { | ||
167 | .name = "sh_cmt", | ||
168 | .id = 0, | ||
169 | .dev = { | ||
170 | .platform_data = &cmt_platform_data, | ||
171 | }, | ||
172 | .resource = cmt_resources, | ||
173 | .num_resources = ARRAY_SIZE(cmt_resources), | ||
174 | }; | ||
175 | |||
143 | static struct plat_sci_port sci_platform_data[] = { | 176 | static struct plat_sci_port sci_platform_data[] = { |
144 | { | 177 | { |
145 | .mapbase = 0xffe00000, | 178 | .mapbase = 0xffe00000, |
@@ -175,6 +208,7 @@ static struct platform_device sci_device = { | |||
175 | }; | 208 | }; |
176 | 209 | ||
177 | static struct platform_device *sh7343_devices[] __initdata = { | 210 | static struct platform_device *sh7343_devices[] __initdata = { |
211 | &cmt_device, | ||
178 | &iic0_device, | 212 | &iic0_device, |
179 | &iic1_device, | 213 | &iic1_device, |
180 | &sci_device, | 214 | &sci_device, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index 839ae97a7fd..93ecf8ed5c6 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/serial.h> | 14 | #include <linux/serial.h> |
15 | #include <linux/serial_sci.h> | 15 | #include <linux/serial_sci.h> |
16 | #include <linux/uio_driver.h> | 16 | #include <linux/uio_driver.h> |
17 | #include <linux/sh_cmt.h> | ||
17 | #include <asm/clock.h> | 18 | #include <asm/clock.h> |
18 | 19 | ||
19 | static struct resource iic_resources[] = { | 20 | static struct resource iic_resources[] = { |
@@ -147,6 +148,38 @@ static struct platform_device veu1_device = { | |||
147 | .num_resources = ARRAY_SIZE(veu1_resources), | 148 | .num_resources = ARRAY_SIZE(veu1_resources), |
148 | }; | 149 | }; |
149 | 150 | ||
151 | static struct sh_cmt_config cmt_platform_data = { | ||
152 | .name = "CMT", | ||
153 | .channel_offset = 0x60, | ||
154 | .timer_bit = 5, | ||
155 | .clk = "cmt0", | ||
156 | .clockevent_rating = 125, | ||
157 | .clocksource_rating = 200, | ||
158 | }; | ||
159 | |||
160 | static struct resource cmt_resources[] = { | ||
161 | [0] = { | ||
162 | .name = "CMT", | ||
163 | .start = 0x044a0060, | ||
164 | .end = 0x044a006b, | ||
165 | .flags = IORESOURCE_MEM, | ||
166 | }, | ||
167 | [1] = { | ||
168 | .start = 104, | ||
169 | .flags = IORESOURCE_IRQ, | ||
170 | }, | ||
171 | }; | ||
172 | |||
173 | static struct platform_device cmt_device = { | ||
174 | .name = "sh_cmt", | ||
175 | .id = 0, | ||
176 | .dev = { | ||
177 | .platform_data = &cmt_platform_data, | ||
178 | }, | ||
179 | .resource = cmt_resources, | ||
180 | .num_resources = ARRAY_SIZE(cmt_resources), | ||
181 | }; | ||
182 | |||
150 | static struct plat_sci_port sci_platform_data[] = { | 183 | static struct plat_sci_port sci_platform_data[] = { |
151 | { | 184 | { |
152 | .mapbase = 0xffe00000, | 185 | .mapbase = 0xffe00000, |
@@ -167,6 +200,7 @@ static struct platform_device sci_device = { | |||
167 | }; | 200 | }; |
168 | 201 | ||
169 | static struct platform_device *sh7366_devices[] __initdata = { | 202 | static struct platform_device *sh7366_devices[] __initdata = { |
203 | &cmt_device, | ||
170 | &iic_device, | 204 | &iic_device, |
171 | &sci_device, | 205 | &sci_device, |
172 | &usb_host_device, | 206 | &usb_host_device, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 5146afc156e..0e5d204bc79 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/serial_sci.h> | 13 | #include <linux/serial_sci.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/uio_driver.h> | 15 | #include <linux/uio_driver.h> |
16 | #include <linux/sh_cmt.h> | ||
16 | #include <asm/clock.h> | 17 | #include <asm/clock.h> |
17 | #include <asm/mmzone.h> | 18 | #include <asm/mmzone.h> |
18 | 19 | ||
@@ -176,6 +177,38 @@ static struct platform_device jpu_device = { | |||
176 | .num_resources = ARRAY_SIZE(jpu_resources), | 177 | .num_resources = ARRAY_SIZE(jpu_resources), |
177 | }; | 178 | }; |
178 | 179 | ||
180 | static struct sh_cmt_config cmt_platform_data = { | ||
181 | .name = "CMT", | ||
182 | .channel_offset = 0x60, | ||
183 | .timer_bit = 5, | ||
184 | .clk = "cmt0", | ||
185 | .clockevent_rating = 125, | ||
186 | .clocksource_rating = 200, | ||
187 | }; | ||
188 | |||
189 | static struct resource cmt_resources[] = { | ||
190 | [0] = { | ||
191 | .name = "CMT", | ||
192 | .start = 0x044a0060, | ||
193 | .end = 0x044a006b, | ||
194 | .flags = IORESOURCE_MEM, | ||
195 | }, | ||
196 | [1] = { | ||
197 | .start = 104, | ||
198 | .flags = IORESOURCE_IRQ, | ||
199 | }, | ||
200 | }; | ||
201 | |||
202 | static struct platform_device cmt_device = { | ||
203 | .name = "sh_cmt", | ||
204 | .id = 0, | ||
205 | .dev = { | ||
206 | .platform_data = &cmt_platform_data, | ||
207 | }, | ||
208 | .resource = cmt_resources, | ||
209 | .num_resources = ARRAY_SIZE(cmt_resources), | ||
210 | }; | ||
211 | |||
179 | static struct plat_sci_port sci_platform_data[] = { | 212 | static struct plat_sci_port sci_platform_data[] = { |
180 | { | 213 | { |
181 | .mapbase = 0xffe00000, | 214 | .mapbase = 0xffe00000, |
@@ -209,6 +242,7 @@ static struct platform_device sci_device = { | |||
209 | }; | 242 | }; |
210 | 243 | ||
211 | static struct platform_device *sh7722_devices[] __initdata = { | 244 | static struct platform_device *sh7722_devices[] __initdata = { |
245 | &cmt_device, | ||
212 | &rtc_device, | 246 | &rtc_device, |
213 | &usbf_device, | 247 | &usbf_device, |
214 | &iic_device, | 248 | &iic_device, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 849770d780a..5338dacbcfb 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/serial_sci.h> | 14 | #include <linux/serial_sci.h> |
15 | #include <linux/uio_driver.h> | 15 | #include <linux/uio_driver.h> |
16 | #include <linux/sh_cmt.h> | ||
16 | #include <asm/clock.h> | 17 | #include <asm/clock.h> |
17 | #include <asm/mmzone.h> | 18 | #include <asm/mmzone.h> |
18 | 19 | ||
@@ -100,6 +101,38 @@ static struct platform_device veu1_device = { | |||
100 | .num_resources = ARRAY_SIZE(veu1_resources), | 101 | .num_resources = ARRAY_SIZE(veu1_resources), |
101 | }; | 102 | }; |
102 | 103 | ||
104 | static struct sh_cmt_config cmt_platform_data = { | ||
105 | .name = "CMT", | ||
106 | .channel_offset = 0x60, | ||
107 | .timer_bit = 5, | ||
108 | .clk = "cmt0", | ||
109 | .clockevent_rating = 125, | ||
110 | .clocksource_rating = 200, | ||
111 | }; | ||
112 | |||
113 | static struct resource cmt_resources[] = { | ||
114 | [0] = { | ||
115 | .name = "CMT", | ||
116 | .start = 0x044a0060, | ||
117 | .end = 0x044a006b, | ||
118 | .flags = IORESOURCE_MEM, | ||
119 | }, | ||
120 | [1] = { | ||
121 | .start = 104, | ||
122 | .flags = IORESOURCE_IRQ, | ||
123 | }, | ||
124 | }; | ||
125 | |||
126 | static struct platform_device cmt_device = { | ||
127 | .name = "sh_cmt", | ||
128 | .id = 0, | ||
129 | .dev = { | ||
130 | .platform_data = &cmt_platform_data, | ||
131 | }, | ||
132 | .resource = cmt_resources, | ||
133 | .num_resources = ARRAY_SIZE(cmt_resources), | ||
134 | }; | ||
135 | |||
103 | static struct plat_sci_port sci_platform_data[] = { | 136 | static struct plat_sci_port sci_platform_data[] = { |
104 | { | 137 | { |
105 | .mapbase = 0xffe00000, | 138 | .mapbase = 0xffe00000, |
@@ -221,6 +254,7 @@ static struct platform_device iic_device = { | |||
221 | }; | 254 | }; |
222 | 255 | ||
223 | static struct platform_device *sh7723_devices[] __initdata = { | 256 | static struct platform_device *sh7723_devices[] __initdata = { |
257 | &cmt_device, | ||
224 | &sci_device, | 258 | &sci_device, |
225 | &rtc_device, | 259 | &rtc_device, |
226 | &iic_device, | 260 | &iic_device, |