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
601aed1e
Commit
601aed1e
authored
19 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Patches
Plain Diff
Add automatic HW detection for another CMC_PU2 variant
Patch by Martin Krause, 20 Apr 2005
parent
dbc58190
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG
+5
-2
5 additions, 2 deletions
CHANGELOG
board/cmc_pu2/cmc_pu2.c
+18
-5
18 additions, 5 deletions
board/cmc_pu2/cmc_pu2.c
with
23 additions
and
7 deletions
CHANGELOG
+
5
−
2
View file @
601aed1e
...
@@ -2,14 +2,17 @@
...
@@ -2,14 +2,17 @@
Changes for U-Boot 1.1.4:
Changes for U-Boot 1.1.4:
======================================================================
======================================================================
* Add automatic HW detection for another CMC_PU2 variant
Patch by Martin Krause, 20 Apr 2005
* Remove CONFIG_AT91RM9200DK in CMC-PU2 configuration
* Remove CONFIG_AT91RM9200DK in CMC-PU2 configuration
Patch by Martin Krause, 19 Apr 2005
Patch by Martin Krause, 19 Apr 2005
* Fix initialization problem on TQM5200 without SM501
* Fix initialization problem on TQM5200 without SM501
Patch by Martin Krause, 8 Apr
.
2005
Patch by Martin Krause,
0
8 Apr 2005
* Add RTC support for STK52XX.200
* Add RTC support for STK52XX.200
Patch by Martin Krause, 7 Apr
.
2005
Patch by Martin Krause,
0
7 Apr 2005
* Add support for IFM o2dnt board
* Add support for IFM o2dnt board
...
...
This diff is collapsed.
Click to expand it.
board/cmc_pu2/cmc_pu2.c
+
18
−
5
View file @
601aed1e
...
@@ -35,8 +35,9 @@
...
@@ -35,8 +35,9 @@
/*
/*
* Miscelaneous platform dependent initialisations
* Miscelaneous platform dependent initialisations
*/
*/
#define CMC_BASIC 1
#define CMC_
HP_
BASIC 1
#define CMC_PU2 2
#define CMC_PU2 2
#define CMC_BASIC 4
int
hw_detect
(
void
);
int
hw_detect
(
void
);
...
@@ -74,14 +75,14 @@ int board_init (void)
...
@@ -74,14 +75,14 @@ int board_init (void)
/*
/*
* On CMC-PU2 board configure PB3-PB6 to input without pull ups to
* On CMC-PU2 board configure PB3-PB6 to input without pull ups to
* clear the duo LEDs (the external pull downs assure a proper
* clear the duo LEDs (the external pull downs assure a proper
* signal). On CMC-BASIC set PB3-PB6 to output and
drive it
* signal). On CMC-BASIC
and CMC-HP-BASIC
set PB3-PB6 to output and
* high, to configure current meas
s
urement on AINx.
*
drive it
high, to configure current measurement on AINx.
*/
*/
if
(
hw_detect
()
&
CMC_PU2
)
{
if
(
hw_detect
()
&
CMC_PU2
)
{
piob
->
PIO_ODR
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
piob
->
PIO_ODR
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
}
}
else
if
(
hw_detect
()
&
CMC_BASIC
)
{
else
if
(
(
hw_detect
()
&
CMC_BASIC
)
||
(
hw_detect
()
&
CMC_HP_BASIC
))
{
piob
->
PIO_SODR
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
piob
->
PIO_SODR
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
piob
->
PIO_OER
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
piob
->
PIO_OER
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
...
@@ -119,6 +120,8 @@ int checkboard (void)
...
@@ -119,6 +120,8 @@ int checkboard (void)
puts
(
"Board: CMC-PU2 (Rittal GmbH)
\n
"
);
puts
(
"Board: CMC-PU2 (Rittal GmbH)
\n
"
);
else
if
(
hw_detect
()
&
CMC_BASIC
)
else
if
(
hw_detect
()
&
CMC_BASIC
)
puts
(
"Board: CMC-BASIC (Rittal GmbH)
\n
"
);
puts
(
"Board: CMC-BASIC (Rittal GmbH)
\n
"
);
else
if
(
hw_detect
()
&
CMC_HP_BASIC
)
puts
(
"Board: CMC-HP-BASIC (Rittal GmbH)
\n
"
);
else
else
puts
(
"Board: unknown
\n
"
);
puts
(
"Board: unknown
\n
"
);
return
0
;
return
0
;
...
@@ -136,6 +139,16 @@ int hw_detect (void)
...
@@ -136,6 +139,16 @@ int hw_detect (void)
pio
->
PIO_PPUDR
=
AT91C_PIO_PB12
;
pio
->
PIO_PPUDR
=
AT91C_PIO_PB12
;
pio
->
PIO_PER
=
AT91C_PIO_PB12
;
pio
->
PIO_PER
=
AT91C_PIO_PB12
;
/* configure PB13 as input without pull up */
pio
->
PIO_ODR
=
AT91C_PIO_PB13
;
pio
->
PIO_PPUDR
=
AT91C_PIO_PB13
;
pio
->
PIO_PER
=
AT91C_PIO_PB13
;
/* read board identification pin */
/* read board identification pin */
return
((
pio
->
PIO_PDSR
&
AT91C_PIO_PB12
)
?
CMC_PU2
:
CMC_BASIC
);
if
(
pio
->
PIO_PDSR
&
AT91C_PIO_PB12
)
return
((
pio
->
PIO_PDSR
&
AT91C_PIO_PB13
)
?
CMC_PU2
:
0
);
else
return
((
pio
->
PIO_PDSR
&
AT91C_PIO_PB13
)
?
CMC_HP_BASIC
:
CMC_BASIC
);
}
}
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