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
be6b6e4e
Commit
be6b6e4e
authored
20 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Patches
Plain Diff
Patch by Martin Krause, 01 Apr 2005:
Add automatic HW detection for CMC_PU2 and CMC_BASIC
parent
e6ba3c92
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG
+3
-2
3 additions, 2 deletions
CHANGELOG
board/cmc_pu2/cmc_pu2.c
+76
-2
76 additions, 2 deletions
board/cmc_pu2/cmc_pu2.c
include/asm-arm/arch-at91rm9200/AT91RM9200.h
+4
-0
4 additions, 0 deletions
include/asm-arm/arch-at91rm9200/AT91RM9200.h
lib_arm/board.c
+1
-1
1 addition, 1 deletion
lib_arm/board.c
with
84 additions
and
5 deletions
CHANGELOG
+
3
−
2
View file @
be6b6e4e
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
Changes for U-Boot 1.1.3:
Changes for U-Boot 1.1.3:
======================================================================
======================================================================
* Patch by Martin Krause, 01 Apr 2005:
* Patches by Martin Krause, 01 Apr 2005:
Fix flash erase timeout on CMC_PU2
- Fix flash erase timeout on CMC_PU2
- Add automatic HW detection for CMC_PU2 and CMC_BASIC
* Patch by Steven Scholz, 13 March 2005:
* Patch by Steven Scholz, 13 March 2005:
fix cache enabling for AT91RM9200
fix cache enabling for AT91RM9200
...
...
This diff is collapsed.
Click to expand it.
board/cmc_pu2/cmc_pu2.c
+
76
−
2
View file @
be6b6e4e
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
* Modified for CMC_PU2 (removed Smart Media support) by Gary Jennejohn
* Modified for CMC_PU2 (removed Smart Media support) by Gary Jennejohn
* (2004) garyj@denx.de
* (2004) garyj@denx.de
*
*
* Modified for CMC_BASIC by Martin Krause (2005), TQ-Systems GmbH
*
* See file CREDITS for list of people who contributed to this
* See file CREDITS for list of people who contributed to this
* project.
* project.
*
*
...
@@ -33,22 +35,67 @@
...
@@ -33,22 +35,67 @@
/*
/*
* Miscelaneous platform dependent initialisations
* Miscelaneous platform dependent initialisations
*/
*/
#define CMC_BASIC 1
#define CMC_PU2 2
int
hw_detect
(
void
);
int
board_init
(
void
)
int
board_init
(
void
)
{
{
DECLARE_GLOBAL_DATA_PTR
;
DECLARE_GLOBAL_DATA_PTR
;
AT91PS_PIO
piob
=
AT91C_BASE_PIOB
;
AT91PS_PIO
pioc
=
AT91C_BASE_PIOC
;
/* Enable Ctrlc */
/* Enable Ctrlc */
console_init_f
();
console_init_f
();
/* Correct IRDA resistor problem */
/* Correct IRDA resistor problem */
/* Set PA23_TXD in Output */
/* Set PA23_TXD in Output */
(
AT91PS_PIO
)
AT91C_BASE_PIOA
->
PIO_OER
=
AT91C_PA23_TXD2
;
/*
(AT91PS_PIO) AT91C_BASE_PIOA->PIO_OER = AT91C_PA23_TXD2;
*/
/* memory and cpu-speed are setup before relocation */
/* memory and cpu-speed are setup before relocation */
/* so we do _nothing_ here */
/* so we do _nothing_ here */
/* arch number of CMC_PU2-Board */
/* PIOB and PIOC clock enabling */
*
AT91C_PMC_PCER
=
1
<<
AT91C_ID_PIOB
;
*
AT91C_PMC_PCER
=
1
<<
AT91C_ID_PIOC
;
/*
* configure PC0-PC3 as input without pull ups, so RS485 driver enable
* (CMC-PU2) and digital outputs (CMC-BASIC) are deactivated.
*/
pioc
->
PIO_ODR
=
AT91C_PIO_PC0
|
AT91C_PIO_PC1
|
AT91C_PIO_PC2
|
AT91C_PIO_PC3
;
pioc
->
PIO_PPUDR
=
AT91C_PIO_PC0
|
AT91C_PIO_PC1
|
AT91C_PIO_PC2
|
AT91C_PIO_PC3
;
pioc
->
PIO_PER
=
AT91C_PIO_PC0
|
AT91C_PIO_PC1
|
AT91C_PIO_PC2
|
AT91C_PIO_PC3
;
/*
* On CMC-PU2 board configure PB3-PB6 to input without pull ups to
* clear the duo LEDs (the external pull downs assure a proper
* signal). On CMC-BASIC set PB3-PB6 to output and drive it
* high, to configure current meassurement on AINx.
*/
if
(
hw_detect
()
&
CMC_PU2
)
{
piob
->
PIO_ODR
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
}
else
if
(
hw_detect
()
&
CMC_BASIC
)
{
piob
->
PIO_SODR
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
piob
->
PIO_OER
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
}
piob
->
PIO_PPUDR
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
piob
->
PIO_PER
=
AT91C_PIO_PB3
|
AT91C_PIO_PB4
|
AT91C_PIO_PB5
|
AT91C_PIO_PB6
;
/*
* arch number of CMC_PU2-Board. MACH_TYPE_CMC_PU2 is not supported in
* the linuxarm kernel, yet.
*/
/* gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2; */
/* gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2; */
gd
->
bd
->
bi_arch_number
=
251
;
gd
->
bd
->
bi_arch_number
=
251
;
/* adress of boot parameters */
/* adress of boot parameters */
...
@@ -65,3 +112,30 @@ int dram_init (void)
...
@@ -65,3 +112,30 @@ int dram_init (void)
gd
->
bd
->
bi_dram
[
0
].
size
=
PHYS_SDRAM_SIZE
;
gd
->
bd
->
bi_dram
[
0
].
size
=
PHYS_SDRAM_SIZE
;
return
0
;
return
0
;
}
}
int
checkboard
(
void
)
{
if
(
hw_detect
()
&
CMC_PU2
)
puts
(
"Board: CMC-PU2 (Rittal GmbH)
\n
"
);
else
if
(
hw_detect
()
&
CMC_BASIC
)
puts
(
"Board: CMC-BASIC (Rittal GmbH)
\n
"
);
else
puts
(
"Board: unknown
\n
"
);
return
0
;
}
int
hw_detect
(
void
)
{
AT91PS_PIO
pio
=
AT91C_BASE_PIOB
;
/* PIOB clock enabling */
*
AT91C_PMC_PCER
=
1
<<
AT91C_ID_PIOB
;
/* configure PB12 as input without pull up */
pio
->
PIO_ODR
=
AT91C_PIO_PB12
;
pio
->
PIO_PPUDR
=
AT91C_PIO_PB12
;
pio
->
PIO_PER
=
AT91C_PIO_PB12
;
/* read board identification pin */
return
((
pio
->
PIO_PDSR
&
AT91C_PIO_PB12
)
?
CMC_PU2
:
CMC_BASIC
);
}
This diff is collapsed.
Click to expand it.
include/asm-arm/arch-at91rm9200/AT91RM9200.h
+
4
−
0
View file @
be6b6e4e
...
@@ -665,6 +665,10 @@ typedef struct _AT91S_PDC {
...
@@ -665,6 +665,10 @@ typedef struct _AT91S_PDC {
#define AT91C_PIO_PA7 ((unsigned int) 1 << 7)
/* Pin Controlled by PA7 */
#define AT91C_PIO_PA7 ((unsigned int) 1 << 7)
/* Pin Controlled by PA7 */
#define AT91C_PA7_ETXCK_EREFCK ((unsigned int) AT91C_PIO_PA7)
/* Ethernet MAC Transmit Clock/Reference Clock */
#define AT91C_PA7_ETXCK_EREFCK ((unsigned int) AT91C_PIO_PA7)
/* Ethernet MAC Transmit Clock/Reference Clock */
#define AT91C_PIO_PB3 ((unsigned int) 1 << 3)
/* Pin Controlled by PB7 */
#define AT91C_PIO_PB4 ((unsigned int) 1 << 4)
/* Pin Controlled by PB7 */
#define AT91C_PIO_PB5 ((unsigned int) 1 << 5)
/* Pin Controlled by PB7 */
#define AT91C_PIO_PB6 ((unsigned int) 1 << 6)
/* Pin Controlled by PB7 */
#define AT91C_PIO_PB7 ((unsigned int) 1 << 7)
/* Pin Controlled by PB7 */
#define AT91C_PIO_PB7 ((unsigned int) 1 << 7)
/* Pin Controlled by PB7 */
#define AT91C_PIO_PB25 ((unsigned int) 1 << 25)
/* Pin Controlled by PB25 */
#define AT91C_PIO_PB25 ((unsigned int) 1 << 25)
/* Pin Controlled by PB25 */
#define AT91C_PB25_DSR1 ((unsigned int) AT91C_PIO_PB25)
/* USART 1 Data Set ready */
#define AT91C_PB25_DSR1 ((unsigned int) AT91C_PIO_PB25)
/* USART 1 Data Set ready */
...
...
This diff is collapsed.
Click to expand it.
lib_arm/board.c
+
1
−
1
View file @
be6b6e4e
...
@@ -198,7 +198,7 @@ init_fnc_t *init_sequence[] = {
...
@@ -198,7 +198,7 @@ init_fnc_t *init_sequence[] = {
display_banner
,
/* say that we are here */
display_banner
,
/* say that we are here */
dram_init
,
/* configure available RAM banks */
dram_init
,
/* configure available RAM banks */
display_dram_config
,
display_dram_config
,
#if defined(CONFIG_VCMA9)
#if defined(CONFIG_VCMA9)
|| defined (CONFIG_CMC_PU2)
checkboard
,
checkboard
,
#endif
#endif
NULL
,
NULL
,
...
...
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