Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
de093ee7
Commit
de093ee7
authored
May 17, 2013
by
Henrik Nordstrom
Browse files
felboot: Reuse sunxi_board_init() directly from u-boot tree
parent
8b0ecf71
Changes
2
Show whitespace changes
Inline
Side-by-side
felboot/Makefile
View file @
de093ee7
...
...
@@ -25,7 +25,7 @@ UBOOT_OBJS= \
spl/drivers/power/axp209.o
\
spl/drivers/i2c/libi2c.o
\
spl/common/memsize.o
\
spl/board/sunxi/dram_
$(BOARD)
.o
$(
addprefix
spl/board/sunxi/
,board.o
dram_
$(BOARD)
.o
)
.c.o
:
$(CROSS_COMPILE)$(CC)
-c
$(CFLAGS)
$<
-o
$@
...
...
felboot/main.c
View file @
de093ee7
...
...
@@ -24,9 +24,12 @@ void _start(void)
clock_init
();
gpio_init
();
uart_init
();
timer_init
();
s_init
();
}
int
gdata
;
void
dcache_enable
(
void
)
{
}
...
...
@@ -52,45 +55,6 @@ void udelay(unsigned long usec)
__udelay
(
usec
);
}
void
sunxi_board_init
(
void
)
{
int
power_failed
=
1
;
int
ramsize
;
timer_init
();
printf
(
"DRAM:"
);
ramsize
=
sunxi_dram_init
();
if
(
!
ramsize
)
{
printf
(
" ?"
);
ramsize
=
sunxi_dram_init
();
}
if
(
!
ramsize
)
{
printf
(
" ?"
);
ramsize
=
sunxi_dram_init
();
}
printf
(
" %dMB
\n
"
,
ramsize
>>
20
);
if
(
!
ramsize
)
hang
();
#ifdef CONFIG_AXP209_POWER
power_failed
|=
axp209_init
();
power_failed
|=
axp209_set_dcdc2
(
1400
);
power_failed
|=
axp209_set_dcdc3
(
1250
);
power_failed
|=
axp209_set_ldo2
(
3000
);
power_failed
|=
axp209_set_ldo3
(
2800
);
power_failed
|=
axp209_set_ldo4
(
2800
);
#endif
/*
* Only clock up the CPU to full speed if we are reasonably
* assured it's being powered with suitable core voltage
*/
if
(
!
power_failed
)
clock_set_pll1
(
1008000000
);
}
int
putchar
(
int
ch
)
{
return
uart_putc
(
ch
);
...
...
@@ -100,3 +64,13 @@ int puts(const char *str)
{
return
uart_puts
(
str
);
}
int
sunxi_mmc_init
(
void
)
{
return
-
1
;
}
int
status_led_set
(
void
)
{
return
-
1
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment