Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59255
b: refs/heads/master
c: b23170c
h: refs/heads/master
i:
  59253: b4242f1
  59251: db98da2
  59247: a79537e
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jul 12, 2007
1 parent a19cb30 commit 6fca264
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a2b94bc39915041304578188441f0f21aa5532a
refs/heads/master: b23170c01f6e4ea043df7cd9486c2488e01f3d60
6 changes: 2 additions & 4 deletions trunk/arch/arm/mach-pxa/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,16 +448,14 @@ static struct platform_device *devices[] __initdata = {

static int __init pxa_init(void)
{
int cpuid, ret;
int ret;

ret = platform_add_devices(devices, ARRAY_SIZE(devices));
if (ret)
return ret;

/* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
cpuid = read_cpuid(CPUID_ID);
if (((cpuid >> 4) & 0xfff) == 0x2d0 ||
((cpuid >> 4) & 0xfff) == 0x290)
if (cpu_is_pxa25x())
ret = platform_device_register(&hwuart_device);

return ret;
Expand Down
36 changes: 36 additions & 0 deletions trunk/include/asm-arm/arch-pxa/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,42 @@

#ifndef __ASSEMBLY__

#define __cpu_is_pxa21x(id) \
({ \
unsigned int _id = (id) >> 4 & 0xf3f; \
_id == 0x212; \
})

#define __cpu_is_pxa25x(id) \
({ \
unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x2d0 || _id == 0x290; \
})

#define __cpu_is_pxa27x(id) \
({ \
unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x411; \
})

#define cpu_is_pxa21x() \
({ \
unsigned int id = read_cpuid(CPUID_ID); \
__cpu_is_pxa21x(id); \
})

#define cpu_is_pxa25x() \
({ \
unsigned int id = read_cpuid(CPUID_ID); \
__cpu_is_pxa25x(id); \
})

#define cpu_is_pxa27x() \
({ \
unsigned int id = read_cpuid(CPUID_ID); \
__cpu_is_pxa27x(id); \
})

/*
* Handy routine to set GPIO alternate functions
*/
Expand Down

0 comments on commit 6fca264

Please sign in to comment.