summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2014-08-08 10:18:40 +0200
committerStefano Babic <sbabic@denx.de>2014-08-08 10:18:40 +0200
commitc23154aab5825fec81d5500c53eaa686646c76b5 (patch)
tree32b0aafae49f664a65ced50981492bb031f006b8 /arch/sandbox
parentcb07d74e2e0c0a41533b6bcd551af9bf2ebcf2bc (diff)
parent9d195a546179bc732aba9eacccf0a9a3db591288 (diff)
downloadu-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.c4
-rw-r--r--arch/sandbox/cpu/start.c8
-rw-r--r--arch/sandbox/include/asm/config.h1
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 */