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
Reform
reform-boundary-uboot
Commits
04e93ec9
Commit
04e93ec9
authored
19 years ago
by
Stefan Roese
Browse files
Options
Downloads
Patches
Plain Diff
Update for esd apc405
parent
2a8af187
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
board/esd/apc405/apc405.c
+64
-3
64 additions, 3 deletions
board/esd/apc405/apc405.c
board/esd/apc405/fpgadata.c
+2280
-2295
2280 additions, 2295 deletions
board/esd/apc405/fpgadata.c
include/configs/APC405.h
+4
-1
4 additions, 1 deletion
include/configs/APC405.h
with
2348 additions
and
2299 deletions
board/esd/apc405/apc405.c
+
64
−
3
View file @
04e93ec9
...
...
@@ -63,10 +63,56 @@ unsigned char logo_bmp[] =
*/
#include
"../common/lcd.c"
#include
"../common/"
CFG_LCD_HEADER_NAME
#include CFG_LCD_HEADER_NAME
#endif
/* CONFIG_LCD_USED */
int
board_revision
(
void
)
{
unsigned
long
cntrl0Reg
;
unsigned
long
value
;
/*
* Get version of APC405 board from GPIO's
*/
/*
* Setup GPIO pins (CS2/GPIO11 and CS3/GPIO12 as GPIO)
*/
cntrl0Reg
=
mfdcr
(
cntrl0
);
mtdcr
(
cntrl0
,
cntrl0Reg
|
0x03000000
);
out32
(
GPIO0_ODR
,
in32
(
GPIO0_ODR
)
&
~
0x00180000
);
out32
(
GPIO0_TCR
,
in32
(
GPIO0_TCR
)
&
~
0x00180000
);
udelay
(
1000
);
/* wait some time before reading input */
value
=
in32
(
GPIO0_IR
)
&
0x00180000
;
/* get config bits */
/*
* Restore GPIO settings
*/
mtdcr
(
cntrl0
,
cntrl0Reg
);
switch
(
value
)
{
case
0x00180000
:
/* CS2==1 && CS3==1 -> version <= 1.2 */
return
2
;
case
0x00080000
:
/* CS2==0 && CS3==1 -> version 1.3 */
return
3
;
#if 0 /* not yet manufactured ! */
case 0x00100000:
/* CS2==1 && CS3==0 -> version 1.4 */
return 4;
case 0x00000000:
/* CS2==0 && CS3==0 -> version 1.5 */
return 5;
#endif
default:
/* should not be reached! */
return
0
;
}
}
int
board_early_init_f
(
void
)
{
/*
...
...
@@ -120,8 +166,12 @@ int misc_init_f (void)
int
misc_init_r
(
void
)
{
DECLARE_GLOBAL_DATA_PTR
;
volatile
unsigned
short
*
fpga_mode
=
(
unsigned
short
*
)((
ulong
)
CFG_FPGA_BASE_ADDR
+
CFG_FPGA_CTRL
);
volatile
unsigned
short
*
fpga_ctrl2
=
(
unsigned
short
*
)((
ulong
)
CFG_FPGA_BASE_ADDR
+
CFG_FPGA_CTRL2
);
volatile
unsigned
char
*
duart0_mcr
=
(
unsigned
char
*
)((
ulong
)
DUART0_BA
+
4
);
volatile
unsigned
char
*
duart1_mcr
=
...
...
@@ -204,6 +254,11 @@ int misc_init_r (void)
SET_FPGA
(
FPGA_PRG
|
FPGA_CLK
|
FPGA_DATA
);
udelay
(
1000
);
/* wait 1ms */
/*
* Write board revision in FPGA
*/
*
fpga_ctrl2
=
(
*
fpga_ctrl2
&
0xfff0
)
|
(
gd
->
board_type
&
0x000f
);
/*
* Enable power on PS/2 interface (with reset)
*/
...
...
@@ -228,8 +283,11 @@ int misc_init_r (void)
logo_bmp
,
sizeof
(
logo_bmp
));
/*
*
Enable
microcontroller and setup backlight PWM controller
*
Reset
microcontroller and setup backlight PWM controller
*/
*
fpga_mode
|=
0x0014
;
for
(
i
=
0
;
i
<
10
;
i
++
)
udelay
(
1000
);
*
fpga_mode
|=
0x001c
;
*
fuji_lcdbl_pwm
=
0x00ff
;
...
...
@@ -243,6 +301,8 @@ int misc_init_r (void)
int
checkboard
(
void
)
{
DECLARE_GLOBAL_DATA_PTR
;
unsigned
char
str
[
64
];
int
i
=
getenv_r
(
"serial#"
,
str
,
sizeof
(
str
));
...
...
@@ -254,7 +314,8 @@ int checkboard (void)
puts
(
str
);
}
putc
(
'\n'
);
gd
->
board_type
=
board_revision
();
printf
(
", Rev 1.%ld
\n
"
,
gd
->
board_type
);
/*
* Disable sleep mode in LXT971
...
...
This diff is collapsed.
Click to expand it.
board/esd/apc405/fpgadata.c
+
2280
−
2295
View file @
04e93ec9
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
include/configs/APC405.h
+
4
−
1
View file @
04e93ec9
...
...
@@ -42,6 +42,8 @@
#define CONFIG_SYS_CLK_FREQ 33333400
/* external frequency to pll */
#define CONFIG_BOARD_TYPES 1
/* support board types */
#define CONFIG_BAUDRATE 9600
#define CONFIG_BOOTDELAY 3
/* autoboot after 3 seconds */
...
...
@@ -321,6 +323,7 @@
/* FPGA internal regs */
#define CFG_FPGA_CTRL 0x008
#define CFG_FPGA_CTRL2 0x00a
/* FPGA Control Reg */
#define CFG_FPGA_CTRL_CF_RESET 0x0001
...
...
@@ -348,7 +351,7 @@
/* Image information... */
#define CONFIG_LCD_USED CONFIG_LCD_BIG
#define CFG_LCD_HEADER_NAME "s1d13806_640_480_16bpp.h"
#define CFG_LCD_HEADER_NAME "
../common/
s1d13806_640_480_16bpp.h"
#define CFG_LCD_LOGO_NAME "logo_640_480_24bpp.c"
#define CFG_LCD_MEM CFG_LCD_BIG_MEM
...
...
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