diff options
author | Andreas Bießmann <andreas.devel@googlemail.com> | 2015-02-06 23:06:48 +0100 |
---|---|---|
committer | Andreas Bießmann <andreas.devel@googlemail.com> | 2015-02-17 22:54:38 +0100 |
commit | a752a8b4c49d67daa4ea9f9ebac3972bb1c2328b (patch) | |
tree | 145248ad901cd8fcfbaa385345c270fdbea14647 /common | |
parent | c722f0b026249385bbbcec4f5be9bd3abd69342c (diff) |
avr32: add generic board support
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/board_f.c | 2 | ||||
-rw-r--r-- | common/board_r.c | 13 | ||||
-rw-r--r-- | common/cmd_bdinfo.c | 4 |
3 files changed, 13 insertions, 6 deletions
diff --git a/common/board_f.c b/common/board_f.c index ef3f036dadc..4d8b8a626be 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -883,7 +883,7 @@ static init_fnc_t init_sequence_f[] = { #endif announce_dram_init, /* TODO: unify all these dram functions? */ -#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE) +#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32) dram_init, /* configure available RAM banks */ #endif #if defined(CONFIG_MIPS) || defined(CONFIG_PPC) diff --git a/common/board_r.c b/common/board_r.c index f0b4f9d9351..4fcd4f6a705 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -55,6 +55,9 @@ #include <dm/root.h> #include <linux/compiler.h> #include <linux/err.h> +#ifdef CONFIG_AVR32 +#include <asm/arch/mmu.h> +#endif DECLARE_GLOBAL_DATA_PTR; @@ -498,7 +501,7 @@ static int initr_api(void) #endif /* enable exceptions */ -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) || defined(CONFIG_AVR32) static int initr_enable_interrupts(void) { enable_interrupts(); @@ -825,10 +828,10 @@ init_fnc_t init_sequence_r[] = { initr_kgdb, #endif interrupt_init, -#if defined(CONFIG_ARM) +#if defined(CONFIG_ARM) || defined(CONFIG_AVR32) initr_enable_interrupts, #endif -#if defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE) +#if defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32) timer_init, /* initialize timer */ #endif #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) @@ -893,6 +896,10 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) int i; #endif +#ifdef CONFIG_AVR32 + mmu_init_r(dest_addr); +#endif + #if !defined(CONFIG_X86) && !defined(CONFIG_ARM) && !defined(CONFIG_ARM64) gd = new_gd; #endif diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index e9eab232f96..aa81da227b9 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -345,8 +345,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) bd_t *bd = gd->bd; print_num("boot_params", (ulong)bd->bi_boot_params); - print_num("memstart", (ulong)bd->bi_memstart); - print_lnum("memsize", (u64)bd->bi_memsize); + print_num("memstart", (ulong)bd->bi_dram[0].start); + print_lnum("memsize", (u64)bd->bi_dram[0].size); print_num("flashstart", (ulong)bd->bi_flashstart); print_num("flashsize", (ulong)bd->bi_flashsize); print_num("flashoffset", (ulong)bd->bi_flashoffset); |