All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code
@ 2017-03-28 16:27 Simon Glass
  2017-03-28 16:27 ` [U-Boot] [PATCH 02/17] board_f: initcall: Add a header guard Simon Glass
                   ` (17 more replies)
  0 siblings, 18 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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>
---

 arch/sandbox/cpu/start.c |  7 +++++++
 common/board_f.c         | 18 ------------------
 2 files changed, 7 insertions(+), 18 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);
diff --git a/common/board_f.c b/common/board_f.c
index bb24a633fb..22829dfed0 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -58,9 +58,6 @@
 #if defined(CONFIG_X86) || defined(CONFIG_ARC) || defined(CONFIG_XTENSA)
 #include <asm/relocate.h>
 #endif
-#ifdef CONFIG_SANDBOX
-#include <asm/state.h>
-#endif
 #include <dm/root.h>
 #include <linux/compiler.h>
 
@@ -295,18 +292,6 @@ __weak int mach_cpu_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_SANDBOX
-static int setup_ram_buf(void)
-{
-	struct sandbox_state *state = state_get_current();
-
-	gd->arch.ram_buf = state->ram_buf;
-	gd->ram_size = state->ram_size;
-
-	return 0;
-}
-#endif
-
 /* Get the top of usable RAM */
 __weak ulong board_get_usable_ram_top(ulong total_size)
 {
@@ -838,9 +823,6 @@ __weak int arch_cpu_init_dm(void)
 }
 
 static const init_fnc_t init_sequence_f[] = {
-#ifdef CONFIG_SANDBOX
-	setup_ram_buf,
-#endif
 	setup_mon_len,
 #ifdef CONFIG_OF_CONTROL
 	fdtdec_setup,
-- 
2.12.2.564.g063fe858b8-goog

^ permalink raw reply related	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2017-04-06 16:50 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
2017-03-28 16:27 ` [U-Boot] [PATCH 02/17] board_f: initcall: Add a header guard Simon Glass
2017-04-06 16:23   ` [U-Boot] [U-Boot,02/17] " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 03/17] board_f: x86: Rename x86_fsp_init() to arch_fsp_init() Simon Glass
2017-03-29  5:09   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 04/17] board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sections Simon Glass
2017-03-29  5:12   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 05/17] board_f: powerpc: Rename get_clocks_866() to get_clocks() Simon Glass
2017-03-28 20:08   ` york sun
2017-03-29  5:12   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 06/17] board_f: Remove sdram_adjust_866() from the init sequence Simon Glass
2017-03-29  5:13   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 07/17] board_f: Remove adjust_sdram_tbs_8xx() " Simon Glass
2017-03-29  5:14   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 08/17] board_f: powerpc: Unified get_clocks() portion of " Simon Glass
2017-03-28 20:08   ` york sun
2017-03-29  5:15   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 09/17] board_f: powerpc: Use timer_init() instead of init_timebase() Simon Glass
2017-03-28 20:08   ` york sun
2017-03-29  5:16   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 10/17] board_f: Use timer_init() on all archs Simon Glass
2017-03-28 20:08   ` york sun
2017-03-29  5:18   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot,10/17] " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls Simon Glass
2017-03-28 17:10   ` york sun
2017-03-28 20:08   ` york sun
2017-03-29  5:19   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code Simon Glass
2017-03-29  5:19   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 13/17] board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f() Simon Glass
2017-03-29  5:20   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 14/17] board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private Simon Glass
2017-03-29  5:21   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 15/17] board_f: x86: Use checkcpu() for CPU init Simon Glass
2017-03-29  5:22   ` Stefan Roese
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 16/17] i2c: Drop unused i2c_soft...() functions Simon Glass
2017-04-06 16:24   ` [U-Boot] [U-Boot, " Tom Rini
2017-03-28 16:27 ` [U-Boot] [PATCH 17/17] i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS Simon Glass
2017-03-29  8:41   ` Lukasz Majewski
2017-03-30  4:40     ` Jaehoon Chung
2017-04-06 16:25   ` [U-Boot] [U-Boot,17/17] " Tom Rini
2017-03-29  5:01 ` [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Stefan Roese
2017-04-06 16:23 ` [U-Boot] [U-Boot, " Tom Rini
2017-04-06 16:24   ` Simon Glass
2017-04-06 16:27     ` Tom Rini
2017-04-06 16:43       ` Simon Glass
2017-04-06 16:47         ` Tom Rini
2017-04-06 16:50           ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.