diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh2a/setup-mxg.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh2a/setup-mxg.c | 98 |
1 files changed, 12 insertions, 86 deletions
diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c index 63e996f9a7ed..26fcdbd4127a 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c +++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c | |||
@@ -114,88 +114,18 @@ static struct intc_mask_reg mask_registers[] __initdata = { | |||
114 | static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups, | 114 | static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups, |
115 | mask_registers, prio_registers, NULL); | 115 | mask_registers, prio_registers, NULL); |
116 | 116 | ||
117 | static struct sh_timer_config mtu2_0_platform_data = { | 117 | static struct resource mtu2_resources[] = { |
118 | .channel_offset = -0x80, | 118 | DEFINE_RES_MEM(0xff801000, 0x400), |
119 | .timer_bit = 0, | 119 | DEFINE_RES_IRQ_NAMED(228, "tgi0a"), |
120 | .clockevent_rating = 200, | 120 | DEFINE_RES_IRQ_NAMED(234, "tgi1a"), |
121 | DEFINE_RES_IRQ_NAMED(240, "tgi2a"), | ||
121 | }; | 122 | }; |
122 | 123 | ||
123 | static struct resource mtu2_0_resources[] = { | 124 | static struct platform_device mtu2_device = { |
124 | [0] = { | 125 | .name = "sh-mtu2", |
125 | .start = 0xff801300, | 126 | .id = -1, |
126 | .end = 0xff801326, | 127 | .resource = mtu2_resources, |
127 | .flags = IORESOURCE_MEM, | 128 | .num_resources = ARRAY_SIZE(mtu2_resources), |
128 | }, | ||
129 | [1] = { | ||
130 | .start = 228, | ||
131 | .flags = IORESOURCE_IRQ, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | static struct platform_device mtu2_0_device = { | ||
136 | .name = "sh_mtu2", | ||
137 | .id = 0, | ||
138 | .dev = { | ||
139 | .platform_data = &mtu2_0_platform_data, | ||
140 | }, | ||
141 | .resource = mtu2_0_resources, | ||
142 | .num_resources = ARRAY_SIZE(mtu2_0_resources), | ||
143 | }; | ||
144 | |||
145 | static struct sh_timer_config mtu2_1_platform_data = { | ||
146 | .channel_offset = -0x100, | ||
147 | .timer_bit = 1, | ||
148 | .clockevent_rating = 200, | ||
149 | }; | ||
150 | |||
151 | static struct resource mtu2_1_resources[] = { | ||
152 | [0] = { | ||
153 | .start = 0xff801380, | ||
154 | .end = 0xff801390, | ||
155 | .flags = IORESOURCE_MEM, | ||
156 | }, | ||
157 | [1] = { | ||
158 | .start = 234, | ||
159 | .flags = IORESOURCE_IRQ, | ||
160 | }, | ||
161 | }; | ||
162 | |||
163 | static struct platform_device mtu2_1_device = { | ||
164 | .name = "sh_mtu2", | ||
165 | .id = 1, | ||
166 | .dev = { | ||
167 | .platform_data = &mtu2_1_platform_data, | ||
168 | }, | ||
169 | .resource = mtu2_1_resources, | ||
170 | .num_resources = ARRAY_SIZE(mtu2_1_resources), | ||
171 | }; | ||
172 | |||
173 | static struct sh_timer_config mtu2_2_platform_data = { | ||
174 | .channel_offset = 0x80, | ||
175 | .timer_bit = 2, | ||
176 | .clockevent_rating = 200, | ||
177 | }; | ||
178 | |||
179 | static struct resource mtu2_2_resources[] = { | ||
180 | [0] = { | ||
181 | .start = 0xff801000, | ||
182 | .end = 0xff80100a, | ||
183 | .flags = IORESOURCE_MEM, | ||
184 | }, | ||
185 | [1] = { | ||
186 | .start = 240, | ||
187 | .flags = IORESOURCE_IRQ, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | static struct platform_device mtu2_2_device = { | ||
192 | .name = "sh_mtu2", | ||
193 | .id = 2, | ||
194 | .dev = { | ||
195 | .platform_data = &mtu2_2_platform_data, | ||
196 | }, | ||
197 | .resource = mtu2_2_resources, | ||
198 | .num_resources = ARRAY_SIZE(mtu2_2_resources), | ||
199 | }; | 129 | }; |
200 | 130 | ||
201 | static struct plat_sci_port scif0_platform_data = { | 131 | static struct plat_sci_port scif0_platform_data = { |
@@ -221,9 +151,7 @@ static struct platform_device scif0_device = { | |||
221 | 151 | ||
222 | static struct platform_device *mxg_devices[] __initdata = { | 152 | static struct platform_device *mxg_devices[] __initdata = { |
223 | &scif0_device, | 153 | &scif0_device, |
224 | &mtu2_0_device, | 154 | &mtu2_device, |
225 | &mtu2_1_device, | ||
226 | &mtu2_2_device, | ||
227 | }; | 155 | }; |
228 | 156 | ||
229 | static int __init mxg_devices_setup(void) | 157 | static int __init mxg_devices_setup(void) |
@@ -240,9 +168,7 @@ void __init plat_irq_setup(void) | |||
240 | 168 | ||
241 | static struct platform_device *mxg_early_devices[] __initdata = { | 169 | static struct platform_device *mxg_early_devices[] __initdata = { |
242 | &scif0_device, | 170 | &scif0_device, |
243 | &mtu2_0_device, | 171 | &mtu2_device, |
244 | &mtu2_1_device, | ||
245 | &mtu2_2_device, | ||
246 | }; | 172 | }; |
247 | 173 | ||
248 | void __init plat_early_device_setup(void) | 174 | void __init plat_early_device_setup(void) |