diff options
author | Stefano Babic <sbabic@denx.de> | 2014-08-08 10:18:40 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-08-08 10:18:40 +0200 |
commit | c23154aab5825fec81d5500c53eaa686646c76b5 (patch) | |
tree | 32b0aafae49f664a65ced50981492bb031f006b8 /arch/sandbox | |
parent | cb07d74e2e0c0a41533b6bcd551af9bf2ebcf2bc (diff) | |
parent | 9d195a546179bc732aba9eacccf0a9a3db591288 (diff) | |
download | u-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.zip u-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.tar.gz u-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 4 | ||||
-rw-r--r-- | arch/sandbox/cpu/start.c | 8 | ||||
-rw-r--r-- | arch/sandbox/include/asm/config.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index 3f4005b..1aa397c 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <dm/root.h> #include <os.h> #include <asm/state.h> @@ -14,6 +15,9 @@ void reset_cpu(ulong ignored) if (state_uninit()) os_exit(2); + if (dm_uninit()) + os_exit(2); + /* This is considered normal termination for now */ os_exit(0); } diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index aad3b8b..b3d7051 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -6,6 +6,7 @@ #include <common.h> #include <os.h> #include <asm/getopt.h> +#include <asm/io.h> #include <asm/sections.h> #include <asm/state.h> @@ -218,6 +219,7 @@ SANDBOX_CMDLINE_OPT_SHORT(terminal, 't', 1, int main(int argc, char *argv[]) { struct sandbox_state *state; + gd_t data; int ret; ret = state_init(); @@ -236,6 +238,12 @@ int main(int argc, char *argv[]) if (state->ram_buf_rm && state->ram_buf_fname) os_unlink(state->ram_buf_fname); + memset(&data, '\0', sizeof(data)); + gd = &data; +#ifdef CONFIG_SYS_MALLOC_F_LEN + gd->malloc_base = CONFIG_MALLOC_F_ADDR; +#endif + /* Do pre- and post-relocation init */ board_init_f(0); diff --git a/arch/sandbox/include/asm/config.h b/arch/sandbox/include/asm/config.h index 6c1bff9..ec7729e 100644 --- a/arch/sandbox/include/asm/config.h +++ b/arch/sandbox/include/asm/config.h @@ -7,7 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_SYS_GENERIC_GLOBAL_DATA #define CONFIG_SANDBOX_ARCH /* Used by drivers/spi/sandbox_spi.c and arch/sandbox/include/asm/state.h */ |