diff options
author | Tom Rini <trini@ti.com> | 2015-02-18 03:11:36 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2015-02-18 03:11:36 (GMT) |
commit | 9ec84f103b3f3e770043b06042e5d2d6f2339e39 (patch) | |
tree | 693381b5c55d2a2e1d98707ff39a59ced75d66ef /common/board_r.c | |
parent | 1e7b357a4ebf9a99a6258a0bbedf4e318a5263e0 (diff) | |
parent | 5c98d7ffb0b11c9e3909f56ec5ce9dff682f1e30 (diff) | |
download | u-boot-fsl-qoriq-9ec84f103b3f3e770043b06042e5d2d6f2339e39.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-avr32
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/common/board_r.c b/common/board_r.c index 907b33c..4fcd4f6 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; @@ -459,6 +462,18 @@ static int initr_env(void) return 0; } +#ifdef CONFIG_SYS_BOOTPARAMS_LEN +static int initr_malloc_bootparams(void) +{ + gd->bd->bi_boot_params = (ulong)malloc(CONFIG_SYS_BOOTPARAMS_LEN); + if (!gd->bd->bi_boot_params) { + puts("WARNING: Cannot allocate space for boot parameters\n"); + return -ENOMEM; + } + return 0; +} +#endif + #ifdef CONFIG_SC3 /* TODO: with new initcalls, move this into the driver */ extern void sc3_read_eeprom(void); @@ -486,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(); @@ -775,6 +790,9 @@ init_fnc_t init_sequence_r[] = { initr_dataflash, #endif initr_env, +#ifdef CONFIG_SYS_BOOTPARAMS_LEN + initr_malloc_bootparams, +#endif INIT_FUNC_WATCHDOG_RESET initr_secondary_cpu, #ifdef CONFIG_SC3 @@ -810,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) @@ -878,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 |