aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/generic.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 719b91e93fa2..218eb9671fa3 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -253,6 +253,10 @@ static struct platform_device stuart_device = {
253 .name = "pxa2xx-uart", 253 .name = "pxa2xx-uart",
254 .id = 2, 254 .id = 2,
255}; 255};
256static struct platform_device hwuart_device = {
257 .name = "pxa2xx-uart",
258 .id = 3,
259};
256 260
257static struct resource i2c_resources[] = { 261static struct resource i2c_resources[] = {
258 { 262 {
@@ -310,7 +314,19 @@ static struct platform_device *devices[] __initdata = {
310 314
311static int __init pxa_init(void) 315static int __init pxa_init(void)
312{ 316{
313 return platform_add_devices(devices, ARRAY_SIZE(devices)); 317 int cpuid, ret;
318
319 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
320 if (ret)
321 return ret;
322
323 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
324 cpuid = read_cpuid(CPUID_ID);
325 if (((cpuid >> 4) & 0xfff) == 0x2d0 ||
326 ((cpuid >> 4) & 0xfff) == 0x290)
327 ret = platform_device_register(&hwuart_device);
328
329 return ret;
314} 330}
315 331
316subsys_initcall(pxa_init); 332subsys_initcall(pxa_init);