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
e4f78d78
Commit
e4f78d78
authored
14 years ago
by
Graeme Russ
Browse files
Options
Downloads
Patches
Plain Diff
x86: Convert board_init_f to use an init_sequence
parent
a3824142
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/i386/lib/board.c
+29
-41
29 additions, 41 deletions
arch/i386/lib/board.c
with
29 additions
and
41 deletions
arch/i386/lib/board.c
+
29
−
41
View file @
e4f78d78
...
@@ -156,7 +156,28 @@ static void display_flash_config (ulong size)
...
@@ -156,7 +156,28 @@ static void display_flash_config (ulong size)
*/
*/
typedef
int
(
init_fnc_t
)
(
void
);
typedef
int
(
init_fnc_t
)
(
void
);
init_fnc_t
*
init_sequence
[]
=
{
static
int
calculate_relocation_address
(
void
);
static
int
copy_uboot_to_ram
(
void
);
static
int
clear_bss
(
void
);
static
int
do_elf_reloc_fixups
(
void
);
init_fnc_t
*
init_sequence_f
[]
=
{
cpu_init_f
,
board_early_init_f
,
env_init
,
init_baudrate
,
serial_init
,
console_init_f
,
dram_init_f
,
calculate_relocation_address
,
copy_uboot_to_ram
,
clear_bss
,
do_elf_reloc_fixups
,
NULL
,
};
init_fnc_t
*
init_sequence_r
[]
=
{
cpu_init_r
,
/* basic cpu dependent setup */
cpu_init_r
,
/* basic cpu dependent setup */
board_early_init_r
,
/* basic board dependent setup */
board_early_init_r
,
/* basic board dependent setup */
dram_init
,
/* configure available RAM banks */
dram_init
,
/* configure available RAM banks */
...
@@ -235,41 +256,12 @@ static int do_elf_reloc_fixups(void)
...
@@ -235,41 +256,12 @@ static int do_elf_reloc_fixups(void)
*/
*/
void
board_init_f
(
ulong
boot_flags
)
void
board_init_f
(
ulong
boot_flags
)
{
{
/* First stage CPU initialization */
init_fnc_t
**
init_fnc_ptr
;
if
(
cpu_init_f
()
!=
0
)
hang
();
/* First stage Board initialization */
if
(
board_early_init_f
()
!=
0
)
hang
();
if
(
env_init
()
!=
0
)
hang
();
if
(
init_baudrate
()
!=
0
)
hang
();
if
(
serial_init
()
!=
0
)
hang
();
if
(
console_init_f
()
!=
0
)
hang
();
if
(
dram_init_f
()
!=
0
)
hang
();
if
(
calculate_relocation_address
()
!=
0
)
hang
();
/* Copy U-Boot into RAM */
if
(
copy_uboot_to_ram
()
!=
0
)
hang
();
if
(
clear_bss
()
!=
0
)
hang
();
if
(
do_elf_reloc_fixups
()
!=
0
)
for
(
init_fnc_ptr
=
init_sequence_f
;
*
init_fnc_ptr
;
++
init_fnc_ptr
)
{
hang
();
if
((
*
init_fnc_ptr
)()
!=
0
)
hang
();
}
gd
->
flags
|=
GD_FLG_RELOC
;
gd
->
flags
|=
GD_FLG_RELOC
;
...
@@ -283,7 +275,6 @@ void board_init_f(ulong boot_flags)
...
@@ -283,7 +275,6 @@ void board_init_f(ulong boot_flags)
void
board_init_r
(
gd_t
*
id
,
ulong
dest_addr
)
void
board_init_r
(
gd_t
*
id
,
ulong
dest_addr
)
{
{
char
*
s
;
char
*
s
;
int
i
;
ulong
size
;
ulong
size
;
static
bd_t
bd_data
;
static
bd_t
bd_data
;
static
gd_t
gd_data
;
static
gd_t
gd_data
;
...
@@ -307,12 +298,9 @@ void board_init_r(gd_t *id, ulong dest_addr)
...
@@ -307,12 +298,9 @@ void board_init_r(gd_t *id, ulong dest_addr)
mem_malloc_init
((((
ulong
)
dest_addr
-
CONFIG_SYS_MALLOC_LEN
)
+
3
)
&~
3
,
mem_malloc_init
((((
ulong
)
dest_addr
-
CONFIG_SYS_MALLOC_LEN
)
+
3
)
&~
3
,
CONFIG_SYS_MALLOC_LEN
);
CONFIG_SYS_MALLOC_LEN
);
for
(
init_fnc_ptr
=
init_sequence
,
i
=
0
;
*
init_fnc_ptr
;
++
init_fnc_ptr
,
i
++
)
{
for
(
init_fnc_ptr
=
init_sequence_r
;
*
init_fnc_ptr
;
++
init_fnc_ptr
)
{
show_boot_progress
(
0xa130
|
i
);
if
((
*
init_fnc_ptr
)()
!=
0
)
if
((
*
init_fnc_ptr
)()
!=
0
)
{
hang
();
hang
();
}
}
}
show_boot_progress
(
0x23
);
show_boot_progress
(
0x23
);
...
...
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