diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-10-30 16:00:04 -0500 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-10-30 16:00:04 -0500 |
commit | 07b188ab773e183871e57b33ae37bf635c9f12ba (patch) | |
tree | 311df8a0dd12fb7bd3e9b5b1a5ca500f0428d679 /arch/arm/mach-pxa/generic.c | |
parent | 47c564e10f219f867bdb49225972749a43485a47 (diff) | |
parent | 9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43 (diff) |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 82 |
1 files changed, 72 insertions, 10 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 1d7677669a76..3248bc9b9495 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/arch/udc.h> | 34 | #include <asm/arch/udc.h> |
35 | #include <asm/arch/pxafb.h> | 35 | #include <asm/arch/pxafb.h> |
36 | #include <asm/arch/mmc.h> | 36 | #include <asm/arch/mmc.h> |
37 | #include <asm/arch/irda.h> | ||
37 | #include <asm/arch/i2c.h> | 38 | #include <asm/arch/i2c.h> |
38 | 39 | ||
39 | #include "generic.h" | 40 | #include "generic.h" |
@@ -92,14 +93,42 @@ EXPORT_SYMBOL(pxa_set_cken); | |||
92 | * and cache flush area. | 93 | * and cache flush area. |
93 | */ | 94 | */ |
94 | static struct map_desc standard_io_desc[] __initdata = { | 95 | static struct map_desc standard_io_desc[] __initdata = { |
95 | /* virtual physical length type */ | 96 | { /* Devs */ |
96 | { 0xf2000000, 0x40000000, 0x02000000, MT_DEVICE }, /* Devs */ | 97 | .virtual = 0xf2000000, |
97 | { 0xf4000000, 0x44000000, 0x00100000, MT_DEVICE }, /* LCD */ | 98 | .pfn = __phys_to_pfn(0x40000000), |
98 | { 0xf6000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Mem Ctl */ | 99 | .length = 0x02000000, |
99 | { 0xf8000000, 0x4c000000, 0x00100000, MT_DEVICE }, /* USB host */ | 100 | .type = MT_DEVICE |
100 | { 0xfa000000, 0x50000000, 0x00100000, MT_DEVICE }, /* Camera */ | 101 | }, { /* LCD */ |
101 | { 0xfe000000, 0x58000000, 0x00100000, MT_DEVICE }, /* IMem ctl */ | 102 | .virtual = 0xf4000000, |
102 | { 0xff000000, 0x00000000, 0x00100000, MT_DEVICE } /* UNCACHED_PHYS_0 */ | 103 | .pfn = __phys_to_pfn(0x44000000), |
104 | .length = 0x00100000, | ||
105 | .type = MT_DEVICE | ||
106 | }, { /* Mem Ctl */ | ||
107 | .virtual = 0xf6000000, | ||
108 | .pfn = __phys_to_pfn(0x48000000), | ||
109 | .length = 0x00100000, | ||
110 | .type = MT_DEVICE | ||
111 | }, { /* USB host */ | ||
112 | .virtual = 0xf8000000, | ||
113 | .pfn = __phys_to_pfn(0x4c000000), | ||
114 | .length = 0x00100000, | ||
115 | .type = MT_DEVICE | ||
116 | }, { /* Camera */ | ||
117 | .virtual = 0xfa000000, | ||
118 | .pfn = __phys_to_pfn(0x50000000), | ||
119 | .length = 0x00100000, | ||
120 | .type = MT_DEVICE | ||
121 | }, { /* IMem ctl */ | ||
122 | .virtual = 0xfe000000, | ||
123 | .pfn = __phys_to_pfn(0x58000000), | ||
124 | .length = 0x00100000, | ||
125 | .type = MT_DEVICE | ||
126 | }, { /* UNCACHED_PHYS_0 */ | ||
127 | .virtual = 0xff000000, | ||
128 | .pfn = __phys_to_pfn(0x00000000), | ||
129 | .length = 0x00100000, | ||
130 | .type = MT_DEVICE | ||
131 | } | ||
103 | }; | 132 | }; |
104 | 133 | ||
105 | void __init pxa_map_io(void) | 134 | void __init pxa_map_io(void) |
@@ -225,6 +254,10 @@ static struct platform_device stuart_device = { | |||
225 | .name = "pxa2xx-uart", | 254 | .name = "pxa2xx-uart", |
226 | .id = 2, | 255 | .id = 2, |
227 | }; | 256 | }; |
257 | static struct platform_device hwuart_device = { | ||
258 | .name = "pxa2xx-uart", | ||
259 | .id = 3, | ||
260 | }; | ||
228 | 261 | ||
229 | static struct resource i2c_resources[] = { | 262 | static struct resource i2c_resources[] = { |
230 | { | 263 | { |
@@ -265,10 +298,26 @@ static struct resource i2s_resources[] = { | |||
265 | static struct platform_device i2s_device = { | 298 | static struct platform_device i2s_device = { |
266 | .name = "pxa2xx-i2s", | 299 | .name = "pxa2xx-i2s", |
267 | .id = -1, | 300 | .id = -1, |
268 | .resource = i2c_resources, | 301 | .resource = i2s_resources, |
269 | .num_resources = ARRAY_SIZE(i2s_resources), | 302 | .num_resources = ARRAY_SIZE(i2s_resources), |
270 | }; | 303 | }; |
271 | 304 | ||
305 | static u64 pxaficp_dmamask = ~(u32)0; | ||
306 | |||
307 | static struct platform_device pxaficp_device = { | ||
308 | .name = "pxa2xx-ir", | ||
309 | .id = -1, | ||
310 | .dev = { | ||
311 | .dma_mask = &pxaficp_dmamask, | ||
312 | .coherent_dma_mask = 0xffffffff, | ||
313 | }, | ||
314 | }; | ||
315 | |||
316 | void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) | ||
317 | { | ||
318 | pxaficp_device.dev.platform_data = info; | ||
319 | } | ||
320 | |||
272 | static struct platform_device *devices[] __initdata = { | 321 | static struct platform_device *devices[] __initdata = { |
273 | &pxamci_device, | 322 | &pxamci_device, |
274 | &udc_device, | 323 | &udc_device, |
@@ -276,13 +325,26 @@ static struct platform_device *devices[] __initdata = { | |||
276 | &ffuart_device, | 325 | &ffuart_device, |
277 | &btuart_device, | 326 | &btuart_device, |
278 | &stuart_device, | 327 | &stuart_device, |
328 | &pxaficp_device, | ||
279 | &i2c_device, | 329 | &i2c_device, |
280 | &i2s_device, | 330 | &i2s_device, |
281 | }; | 331 | }; |
282 | 332 | ||
283 | static int __init pxa_init(void) | 333 | static int __init pxa_init(void) |
284 | { | 334 | { |
285 | return platform_add_devices(devices, ARRAY_SIZE(devices)); | 335 | int cpuid, ret; |
336 | |||
337 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
338 | if (ret) | ||
339 | return ret; | ||
340 | |||
341 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | ||
342 | cpuid = read_cpuid(CPUID_ID); | ||
343 | if (((cpuid >> 4) & 0xfff) == 0x2d0 || | ||
344 | ((cpuid >> 4) & 0xfff) == 0x290) | ||
345 | ret = platform_device_register(&hwuart_device); | ||
346 | |||
347 | return ret; | ||
286 | } | 348 | } |
287 | 349 | ||
288 | subsys_initcall(pxa_init); | 350 | subsys_initcall(pxa_init); |