summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-03-28 10:27:16 -0600
committerTom Rini <trini@konsulko.com>2017-04-05 13:52:35 -0400
commitbb967240bbd0b8c1816710803bca3c976d071d12 (patch)
tree4c48a88816fb95a3ece89f3966cdd79a18a75431 /arch/sandbox/cpu
parent70cc0c34b638fbf99f0984dc53312cd8479c99a7 (diff)
board_f: sandbox: Move setup_ram_buf() to private code
There is no need to have this call in the generic init sequence and no other architecture has needed it in the time it has been there. Move it into sandbox's private code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/start.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 6e4ec017cc..dc58fef90c 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -275,6 +275,12 @@ int board_run_command(const char *cmdline)
return 1;
}
+static void setup_ram_buf(struct sandbox_state *state)
+{
+ gd->arch.ram_buf = state->ram_buf;
+ gd->ram_size = state->ram_size;
+}
+
int main(int argc, char *argv[])
{
struct sandbox_state *state;
@@ -302,6 +308,7 @@ int main(int argc, char *argv[])
#ifdef CONFIG_SYS_MALLOC_F_LEN
gd->malloc_base = CONFIG_MALLOC_F_ADDR;
#endif
+ setup_ram_buf(state);
/* Do pre- and post-relocation init */
board_init_f(0);