aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
-rw-r--r--arch/arm/mach-pxa/generic.c82
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 */
94static struct map_desc standard_io_desc[] __initdata = { 95static 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
105void __init pxa_map_io(void) 134void __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};
257static struct platform_device hwuart_device = {
258 .name = "pxa2xx-uart",
259 .id = 3,
260};
228 261
229static struct resource i2c_resources[] = { 262static struct resource i2c_resources[] = {
230 { 263 {
@@ -265,10 +298,26 @@ static struct resource i2s_resources[] = {
265static struct platform_device i2s_device = { 298static 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
305static u64 pxaficp_dmamask = ~(u32)0;
306
307static 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
316void __init pxa_set_ficp_info(struct pxaficp_platform_data *info)
317{
318 pxaficp_device.dev.platform_data = info;
319}
320
272static struct platform_device *devices[] __initdata = { 321static 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
283static int __init pxa_init(void) 333static 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
288subsys_initcall(pxa_init); 350subsys_initcall(pxa_init);