Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
5b913d49
Commit
5b913d49
authored
8 years ago
by
Troy Kisky
Browse files
Options
Downloads
Patches
Plain Diff
mx5: soc: use iim_srev to detect TO3
Signed-off-by:
Troy Kisky
<
troy.kisky@boundarydevices.com
>
parent
0971f49e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/arm/mach-imx/mx5/soc.c
+18
-20
18 additions, 20 deletions
arch/arm/mach-imx/mx5/soc.c
with
18 additions
and
20 deletions
arch/arm/mach-imx/mx5/soc.c
+
18
−
20
View file @
5b913d49
...
...
@@ -23,30 +23,28 @@ u32 get_cpu_rev(void)
{
#ifdef CONFIG_MX51
int
system_rev
=
0x51000
;
#else
int
system_rev
=
0x53000
;
#endif
int
reg
=
__raw_readl
(
ROM_SI_REV
);
int
reg
=
readl
(
&
((
struct
iim_regs
*
)
IIM_BASE_ADDR
)
->
srev
);
#if defined(CONFIG_MX51)
switch
(
reg
)
{
case
0x02
:
system_rev
|=
CHIP_REV_1_1
;
break
;
case
0x10
:
if
((
__raw_readl
(
GPIO1_BASE_ADDR
+
0x0
)
&
(
0x1
<<
22
))
==
0
)
system_rev
|=
CHIP_REV_2_5
;
else
system_rev
|=
CHIP_REV_2_0
;
break
;
case
0x20
:
if
(
reg
>=
0x10
)
{
system_rev
|=
CHIP_REV_3_0
;
break
;
default:
system_rev
|=
CHIP_REV_1_0
;
break
;
}
else
{
reg
=
__raw_readl
(
ROM_SI_REV
);
if
(
reg
>=
0x10
)
{
/* Why read from UART3_RXD, surely this is board specific ? */
if
((
__raw_readl
(
GPIO1_BASE_ADDR
+
0x0
)
&
(
0x1
<<
22
))
==
0
)
system_rev
|=
CHIP_REV_2_5
;
else
system_rev
|=
CHIP_REV_2_0
;
}
else
if
(
reg
>=
0x02
)
{
system_rev
|=
CHIP_REV_1_1
;
}
else
{
system_rev
|=
CHIP_REV_1_0
;
}
}
#else
int
system_rev
=
0x53000
;
int
reg
=
__raw_readl
(
ROM_SI_REV
);
if
(
reg
<
0x20
)
system_rev
|=
CHIP_REV_1_0
;
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment