diff options
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r-- | arch/arm/mach-pxa/devices.c | 95 |
1 files changed, 77 insertions, 18 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 35736fc08634..e16f8e3d58d3 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -4,13 +4,12 @@ | |||
4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
5 | #include <linux/dma-mapping.h> | 5 | #include <linux/dma-mapping.h> |
6 | 6 | ||
7 | #include <mach/gpio.h> | 7 | #include <mach/pxa-regs.h> |
8 | #include <mach/udc.h> | 8 | #include <mach/udc.h> |
9 | #include <mach/pxafb.h> | 9 | #include <mach/pxafb.h> |
10 | #include <mach/mmc.h> | 10 | #include <mach/mmc.h> |
11 | #include <mach/irda.h> | 11 | #include <mach/irda.h> |
12 | #include <mach/i2c.h> | 12 | #include <mach/i2c.h> |
13 | #include <mach/mfp-pxa27x.h> | ||
14 | #include <mach/ohci.h> | 13 | #include <mach/ohci.h> |
15 | #include <mach/pxa27x_keypad.h> | 14 | #include <mach/pxa27x_keypad.h> |
16 | #include <mach/pxa2xx_spi.h> | 15 | #include <mach/pxa2xx_spi.h> |
@@ -156,8 +155,8 @@ void __init set_pxa_fb_parent(struct device *parent_dev) | |||
156 | 155 | ||
157 | static struct resource pxa_resource_ffuart[] = { | 156 | static struct resource pxa_resource_ffuart[] = { |
158 | { | 157 | { |
159 | .start = __PREG(FFUART), | 158 | .start = 0x40100000, |
160 | .end = __PREG(FFUART) + 35, | 159 | .end = 0x40100023, |
161 | .flags = IORESOURCE_MEM, | 160 | .flags = IORESOURCE_MEM, |
162 | }, { | 161 | }, { |
163 | .start = IRQ_FFUART, | 162 | .start = IRQ_FFUART, |
@@ -175,8 +174,8 @@ struct platform_device pxa_device_ffuart= { | |||
175 | 174 | ||
176 | static struct resource pxa_resource_btuart[] = { | 175 | static struct resource pxa_resource_btuart[] = { |
177 | { | 176 | { |
178 | .start = __PREG(BTUART), | 177 | .start = 0x40200000, |
179 | .end = __PREG(BTUART) + 35, | 178 | .end = 0x40200023, |
180 | .flags = IORESOURCE_MEM, | 179 | .flags = IORESOURCE_MEM, |
181 | }, { | 180 | }, { |
182 | .start = IRQ_BTUART, | 181 | .start = IRQ_BTUART, |
@@ -194,8 +193,8 @@ struct platform_device pxa_device_btuart = { | |||
194 | 193 | ||
195 | static struct resource pxa_resource_stuart[] = { | 194 | static struct resource pxa_resource_stuart[] = { |
196 | { | 195 | { |
197 | .start = __PREG(STUART), | 196 | .start = 0x40700000, |
198 | .end = __PREG(STUART) + 35, | 197 | .end = 0x40700023, |
199 | .flags = IORESOURCE_MEM, | 198 | .flags = IORESOURCE_MEM, |
200 | }, { | 199 | }, { |
201 | .start = IRQ_STUART, | 200 | .start = IRQ_STUART, |
@@ -213,8 +212,8 @@ struct platform_device pxa_device_stuart = { | |||
213 | 212 | ||
214 | static struct resource pxa_resource_hwuart[] = { | 213 | static struct resource pxa_resource_hwuart[] = { |
215 | { | 214 | { |
216 | .start = __PREG(HWUART), | 215 | .start = 0x41600000, |
217 | .end = __PREG(HWUART) + 47, | 216 | .end = 0x4160002F, |
218 | .flags = IORESOURCE_MEM, | 217 | .flags = IORESOURCE_MEM, |
219 | }, { | 218 | }, { |
220 | .start = IRQ_HWUART, | 219 | .start = IRQ_HWUART, |
@@ -249,18 +248,53 @@ struct platform_device pxa_device_i2c = { | |||
249 | .num_resources = ARRAY_SIZE(pxai2c_resources), | 248 | .num_resources = ARRAY_SIZE(pxai2c_resources), |
250 | }; | 249 | }; |
251 | 250 | ||
252 | static unsigned long pxa27x_i2c_mfp_cfg[] = { | ||
253 | GPIO117_I2C_SCL, | ||
254 | GPIO118_I2C_SDA, | ||
255 | }; | ||
256 | |||
257 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | 251 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) |
258 | { | 252 | { |
259 | if (cpu_is_pxa27x()) | ||
260 | pxa2xx_mfp_config(ARRAY_AND_SIZE(pxa27x_i2c_mfp_cfg)); | ||
261 | pxa_register_device(&pxa_device_i2c, info); | 253 | pxa_register_device(&pxa_device_i2c, info); |
262 | } | 254 | } |
263 | 255 | ||
256 | #ifdef CONFIG_PXA27x | ||
257 | static struct resource pxa27x_resources_i2c_power[] = { | ||
258 | { | ||
259 | .start = 0x40f00180, | ||
260 | .end = 0x40f001a3, | ||
261 | .flags = IORESOURCE_MEM, | ||
262 | }, { | ||
263 | .start = IRQ_PWRI2C, | ||
264 | .end = IRQ_PWRI2C, | ||
265 | .flags = IORESOURCE_IRQ, | ||
266 | }, | ||
267 | }; | ||
268 | |||
269 | struct platform_device pxa27x_device_i2c_power = { | ||
270 | .name = "pxa2xx-i2c", | ||
271 | .id = 1, | ||
272 | .resource = pxa27x_resources_i2c_power, | ||
273 | .num_resources = ARRAY_SIZE(pxa27x_resources_i2c_power), | ||
274 | }; | ||
275 | #endif | ||
276 | |||
277 | #ifdef CONFIG_PXA3xx | ||
278 | static struct resource pxa3xx_resources_i2c_power[] = { | ||
279 | { | ||
280 | .start = 0x40f500c0, | ||
281 | .end = 0x40f500d3, | ||
282 | .flags = IORESOURCE_MEM, | ||
283 | }, { | ||
284 | .start = IRQ_PWRI2C, | ||
285 | .end = IRQ_PWRI2C, | ||
286 | .flags = IORESOURCE_IRQ, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | struct platform_device pxa3xx_device_i2c_power = { | ||
291 | .name = "pxa2xx-i2c", | ||
292 | .id = 1, | ||
293 | .resource = pxa3xx_resources_i2c_power, | ||
294 | .num_resources = ARRAY_SIZE(pxa3xx_resources_i2c_power), | ||
295 | }; | ||
296 | #endif | ||
297 | |||
264 | static struct resource pxai2s_resources[] = { | 298 | static struct resource pxai2s_resources[] = { |
265 | { | 299 | { |
266 | .start = 0x40400000, | 300 | .start = 0x40400000, |
@@ -296,11 +330,36 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) | |||
296 | pxa_register_device(&pxa_device_ficp, info); | 330 | pxa_register_device(&pxa_device_ficp, info); |
297 | } | 331 | } |
298 | 332 | ||
299 | struct platform_device pxa_device_rtc = { | 333 | static struct resource pxa_rtc_resources[] = { |
334 | [0] = { | ||
335 | .start = 0x40900000, | ||
336 | .end = 0x40900000 + 0x3b, | ||
337 | .flags = IORESOURCE_MEM, | ||
338 | }, | ||
339 | [1] = { | ||
340 | .start = IRQ_RTC1Hz, | ||
341 | .end = IRQ_RTC1Hz, | ||
342 | .flags = IORESOURCE_IRQ, | ||
343 | }, | ||
344 | [2] = { | ||
345 | .start = IRQ_RTCAlrm, | ||
346 | .end = IRQ_RTCAlrm, | ||
347 | .flags = IORESOURCE_IRQ, | ||
348 | }, | ||
349 | }; | ||
350 | |||
351 | struct platform_device sa1100_device_rtc = { | ||
300 | .name = "sa1100-rtc", | 352 | .name = "sa1100-rtc", |
301 | .id = -1, | 353 | .id = -1, |
302 | }; | 354 | }; |
303 | 355 | ||
356 | struct platform_device pxa_device_rtc = { | ||
357 | .name = "pxa-rtc", | ||
358 | .id = -1, | ||
359 | .num_resources = ARRAY_SIZE(pxa_rtc_resources), | ||
360 | .resource = pxa_rtc_resources, | ||
361 | }; | ||
362 | |||
304 | static struct resource pxa_ac97_resources[] = { | 363 | static struct resource pxa_ac97_resources[] = { |
305 | [0] = { | 364 | [0] = { |
306 | .start = 0x40500000, | 365 | .start = 0x40500000, |