Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
b23170c0
Commit
b23170c0
authored
May 15, 2007
by
Russell King
Committed by
Russell King
Jul 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] pxa: introduce cpu_is_pxaXXX macros
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
7a2b94bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/generic.c
+2
-4
include/asm-arm/arch-pxa/hardware.h
include/asm-arm/arch-pxa/hardware.h
+36
-0
No files found.
arch/arm/mach-pxa/generic.c
View file @
b23170c0
...
...
@@ -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
;
...
...
include/asm-arm/arch-pxa/hardware.h
View file @
b23170c0
...
...
@@ -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
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment