aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/generic.c
diff options
context:
space:
mode:
authorMatt Reimer <mreimer@vpop.net>2005-10-28 11:25:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-28 11:25:02 -0400
commitd9e29649875df82828167dd45c802d942db863ba (patch)
tree8ce0d5d46bde4a92e212aabe18a3a86f508c8fd4 /arch/arm/mach-pxa/generic.c
parent80a18573cea2e6d8e95abe4d42bfc5f97761999a (diff)
[ARM] 3029/1: Add HWUART support for PXA 255/26x
Patch from Matt Reimer Adds support for HWUART on PXA 255 / 26x. This patch originally came from http://svn.rungie.com/svn/gumstix-buildroot/trunk/sources/kernel-patches/000-gumstix-hwuart.patch and has been tweaked by me. Signed-off-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
-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);