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