summaryrefslogtreecommitdiffstats
path: root/lib_avr32
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-11-19 18:06:53 +0100
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-04-14 15:20:27 +0200
commitdf548d3c3e2bbc40258713167859ffc2ce99a900 (patch)
tree63759a73724848ba192874aa552861e03faf1058 /lib_avr32
parent03d1e1365796cd15d1726e8a51fd8b5be50b2fe9 (diff)
downloadblackbird-obmc-uboot-df548d3c3e2bbc40258713167859ffc2ce99a900.tar.gz
blackbird-obmc-uboot-df548d3c3e2bbc40258713167859ffc2ce99a900.zip
AVR32: Resource management rewrite
Rewrite the resource management code (i.e. I/O memory, clock gating, gpio) so it doesn't depend on any global state. This is necessary because this code is heavily used before relocation to RAM, so we can't write to any global variables. As an added bonus, this makes u-boot's memory footprint a bit smaller, although some functionality has been left out; all clocks are enabled all the time, and there's no checking for gpio line conflicts. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'lib_avr32')
-rw-r--r--lib_avr32/avr32_linux.c4
-rw-r--r--lib_avr32/board.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/lib_avr32/avr32_linux.c b/lib_avr32/avr32_linux.c
index d128dfb53f..6095e2ff21 100644
--- a/lib_avr32/avr32_linux.c
+++ b/lib_avr32/avr32_linux.c
@@ -27,7 +27,7 @@
#include <asm/addrspace.h>
#include <asm/io.h>
#include <asm/setup.h>
-#include <asm/arch/platform.h>
+#include <asm/arch/clk.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -133,7 +133,7 @@ static struct tag *setup_clock_tags(struct tag *params)
params->hdr.size = tag_size(tag_clock);
params->u.clock.clock_id = ACLOCK_HSB;
params->u.clock.clock_flags = 0;
- params->u.clock.clock_hz = pm_get_clock_freq(CLOCK_HSB);
+ params->u.clock.clock_hz = get_hsb_clk_rate();
#endif
return tag_next(params);
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index c531eef713..12d0b973b8 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -131,6 +131,7 @@ void board_init_f(ulong unused)
gd = &gd_data;
/* Perform initialization sequence */
+ board_early_init_f();
cpu_init();
timer_init();
env_init();
OpenPOWER on IntegriCloud