Skip to contentSkip to conversation

board_f: sandbox: Move setup_ram_buf() to private code

PATCH New Simon Glass 6 participants 61 messages Mar 28, 2017 – Apr 6, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/17 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.

---

 arch/sandbox/cpu/start.c |  7 +++++++
 common/board_f.c         | 18 ------------------
 2 files changed, 7 insertions(+), 18 deletions(-)
arch/sandbox/cpu/start.c +7 -0
index 6e4ec017cc..dc58fef90c 100644
@@ -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);
common/board_f.c +0 -18
index bb24a633fb..22829dfed0 100644
@@ -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,
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#1 lore raw

PATCH 2/17 board_f: initcall: Add a header guard

This file is missing the usual header guard. Add it.

---

 include/initcall.h | 5 +++++
 1 file changed, 5 insertions(+)
include/initcall.h +5 -0
index 65f67dca83..fe7e90388e 100644
@@ -4,6 +4,11 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#ifndef __INITCALL_H
+#define __INITCALL_H
+
 typedef int (*init_fnc_t)(void);
 
 int initcall_run_list(const init_fnc_t init_sequence[]);
+
+#endif
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#2 lore raw

PATCH 2/17 board_f: initcall: Add a header guard

Quoted 3 lines · Simon Glass

This file is missing the usual header guard. Add it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/8704c47c/attachment.sig>
#3 lore raw

PATCH 3/17 board_f: x86: Rename x86_fsp_init() to arch_fsp_init()

In reply to Simon Glass

While x86 is the only user and this could in principle be moved to arch_cpu_init() there is some justification for this being a separate call. It provides a way to handle init which is not CPU-specific, but must happen before the CPU can be set up.

Rename the function to be more generic.

---

 arch/x86/include/asm/u-boot-x86.h | 3 ---
 arch/x86/lib/fsp/fsp_common.c     | 2 +-
 common/board_f.c                  | 4 ++--
 include/common.h                  | 9 +++++++++
 4 files changed, 12 insertions(+), 6 deletions(-)
arch/x86/include/asm/u-boot-x86.h +0 -3
index 4f901f9392..cc7fc7370e 100644
@@ -55,9 +55,6 @@ u32 isa_map_rom(u32 bus_addr, int size);
 /* arch/x86/lib/... */
 int video_bios_init(void);
 
-/* arch/x86/lib/fsp/... */
-int x86_fsp_init(void);
-
 void	board_init_f_r_trampoline(ulong) __attribute__ ((noreturn));
 void	board_init_f_r(void) __attribute__ ((noreturn));
 
arch/x86/lib/fsp/fsp_common.c +1 -1
index 8479af1d7e..cebf85ee5b 100644
@@ -70,7 +70,7 @@ static __maybe_unused void *fsp_prepare_mrc_cache(void)
 	return cache->data;
 }
 
-int x86_fsp_init(void)
+int arch_fsp_init(void)
 {
 	void *nvs;
 
common/board_f.c +2 -2
index 22829dfed0..0454907590 100644
@@ -832,8 +832,8 @@ static const init_fnc_t init_sequence_f[] = {
 #endif
 	initf_malloc,
 	initf_console_record,
-#if defined(CONFIG_X86) && defined(CONFIG_HAVE_FSP)
-	x86_fsp_init,
+#if defined(CONFIG_HAVE_FSP)
+	arch_fsp_init,
 #endif
 	arch_cpu_init,		/* basic arch cpu dependent setup */
 	mach_cpu_init,		/* SoC/machine dependent CPU setup */
include/common.h +9 -0
index 2cbbd5a60c..6170422359 100644
@@ -289,6 +289,15 @@ int update_flash_size(int flash_size);
 int arch_early_init_r(void);
 
 /**
+ * arch_fsp_init() - perform firmware support package init
+ *
+ * Where U-Boot relies on binary blobs to handle part of the system init, this
+ * function can be used to set up the blobs. This is used on some Intel
+ * platforms.
+ */
+int arch_fsp_init(void);
+
+/**
  * arch_cpu_init_dm() - init CPU after driver model is available
  *
  * This is called immediately after driver model is available before
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#4 lore raw

PATCH 3/17 board_f: x86: Rename x86_fsp_init() to arch_fsp_init()

Quoted 8 lines · Simon Glass

While x86 is the only user and this could in principle be moved to arch_cpu_init() there is some justification for this being a separate call. It provides a way to handle init which is not CPU-specific, but must happen before the CPU can be set up.

Rename the function to be more generic.

Thanks,
Stefan

#5 lore raw

PATCH 3/17 board_f: x86: Rename x86_fsp_init() to arch_fsp_init()

In reply to Simon Glass
Quoted 9 lines · Simon Glass

While x86 is the only user and this could in principle be moved to arch_cpu_init() there is some justification for this being a separate call. It provides a way to handle init which is not CPU-specific, but must happen before the CPU can be set up.

Rename the function to be more generic.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/f8b636ad/attachment.sig>
#6 lore raw

PATCH 4/17 board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sections

In reply to Simon Glass

We have two chunks of code which depend on this CONFIG options. There is likely no need to keep them apart, so join them.

---

 common/board_f.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
common/board_f.c +8 -9
index 0454907590..57e26d08cb 100644
@@ -844,7 +844,13 @@ static const init_fnc_t init_sequence_f[] = {
 	board_early_init_f,
 #endif
 	/* TODO: can any of this go into arch_cpu_init()? */
-#if defined(CONFIG_PPC) && !defined(CONFIG_8xx_CPUCLK_DEFAULT)
+#if defined(CONFIG_8xx_CPUCLK_DEFAULT)
+	/* get CPU and bus clocks according to the environment variable */
+	get_clocks_866,
+	/* adjust sdram refresh rate according to the new clock */
+	sdram_adjust_866,
+	init_timebase,
+#elif defined(CONFIG_PPC)
 	get_clocks,		/* get CPU and bus clocks (etc.) */
 #if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \
 		&& !defined(CONFIG_TQM885D)
@@ -852,7 +858,7 @@ static const init_fnc_t init_sequence_f[] = {
 #endif
 	/* TODO: can we rename this to timer_init()? */
 	init_timebase,
-#endif
+#endif /* CONFIG_8xx_CPUCLK_DEFAULT */
 #if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
 		defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32) || \
 		defined(CONFIG_SH) || defined(CONFIG_SPARC)
@@ -865,13 +871,6 @@ static const init_fnc_t init_sequence_f[] = {
 	get_clocks,
 #endif
 	env_init,		/* initialize environment */
-#if defined(CONFIG_8xx_CPUCLK_DEFAULT)
-	/* get CPU and bus clocks according to the environment variable */
-	get_clocks_866,
-	/* adjust sdram refresh rate according to the new clock */
-	sdram_adjust_866,
-	init_timebase,
-#endif
 	init_baud_rate,		/* initialze baudrate settings */
 	serial_init,		/* serial communications setup */
 	console_init_f,		/* stage 1 init of console */
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#8 lore raw

PATCH 4/17 board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sections

In reply to Simon Glass
Quoted 5 lines · Simon Glass

We have two chunks of code which depend on this CONFIG options. There is likely no need to keep them apart, so join them.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/75d3e5db/attachment.sig>
#9 lore raw

PATCH 5/17 board_f: powerpc: Rename get_clocks_866() to get_clocks()

In reply to Simon Glass

We really don't need to have a name like this in the generic init sequence. Use the generic get_clocks() name so that we can merge these two at some point.

---

 arch/powerpc/cpu/mpc8xx/speed.c | 2 +-
 common/board_f.c                | 2 +-
 include/common.h                | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)
arch/powerpc/cpu/mpc8xx/speed.c +1 -1
index 42442b8c98..613209cc6d 100644
@@ -243,7 +243,7 @@ static long init_pll_866 (long clk);
  * contains invalid value).
  * This functions requires an MPC866 or newer series CPU.
  */
-int get_clocks_866 (void)
+int get_clocks(void)
 {
 	volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
 	char		  tmp[64];
common/board_f.c +1 -1
index 57e26d08cb..05b2b137f7 100644
@@ -846,7 +846,7 @@ static const init_fnc_t init_sequence_f[] = {
 	/* TODO: can any of this go into arch_cpu_init()? */
 #if defined(CONFIG_8xx_CPUCLK_DEFAULT)
 	/* get CPU and bus clocks according to the environment variable */
-	get_clocks_866,
+	get_clocks,
 	/* adjust sdram refresh rate according to the new clock */
 	sdram_adjust_866,
 	init_timebase,
include/common.h +0 -1
index 6170422359..cdaeec8e42 100644
@@ -640,7 +640,6 @@ int serial_stub_tstc(struct stdio_dev *sdev);
 
 /* $(CPU)/speed.c */
 int	get_clocks (void);
-int	get_clocks_866 (void);
 int	sdram_adjust_866 (void);
 int	adjust_sdram_tbs_8xx (void);
 #if defined(CONFIG_MPC8260)
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#10 lore raw

PATCH 5/17 board_f: powerpc: Rename get_clocks_866() to get_clocks()

Quoted 4 lines · Simon Glass

We really don't need to have a name like this in the generic init sequence. Use the generic get_clocks() name so that we can merge these two at some point.

Quoted 8 lines

---

 arch/powerpc/cpu/mpc8xx/speed.c | 2 +-
 common/board_f.c                | 2 +-
 include/common.h                | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)
#12 lore raw

PATCH 5/17 board_f: powerpc: Rename get_clocks_866() to get_clocks()

In reply to Simon Glass
Quoted 7 lines · Simon Glass

We really don't need to have a name like this in the generic init sequence. Use the generic get_clocks() name so that we can merge these two at some point.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/7db4bb2f/attachment.sig>
#13 lore raw

PATCH 6/17 board_f: Remove sdram_adjust_866() from the init sequence

In reply to Simon Glass

We can just call this from the only function that needs it.

---

 arch/powerpc/cpu/mpc8xx/speed.c | 32 ++++++++++++++++----------------
 common/board_f.c                |  2 --
 include/common.h                |  1 -
 3 files changed, 16 insertions(+), 19 deletions(-)
arch/powerpc/cpu/mpc8xx/speed.c +16 -16
index 613209cc6d..7a532cca07 100644
@@ -237,6 +237,21 @@ int get_clocks (void)
 
 static long init_pll_866 (long clk);
 
+/* Adjust sdram refresh rate to actual CPU clock.
+ */
+static int sdram_adjust_866(void)
+{
+	volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
+	long		  mamr;
+
+	mamr = immr->im_memctl.memc_mamr;
+	mamr &= ~MAMR_PTA_MSK;
+	mamr |= ((gd->cpu_clk / CONFIG_SYS_PTA_PER_CLK) << MAMR_PTA_SHIFT);
+	immr->im_memctl.memc_mamr = mamr;
+
+	return 0;
+}
+
 /* This function sets up PLL (init_pll_866() is called) and
  * fills gd->cpu_clk and gd->bus_clk according to the environment
  * variable 'cpuclk' or to CONFIG_8xx_CPUCLK_DEFAULT (if 'cpuclk'
@@ -278,22 +293,7 @@ int get_clocks(void)
 	}
 	immr->im_clkrst.car_sccr = sccr_reg;
 
-	return (0);
-}
-
-/* Adjust sdram refresh rate to actual CPU clock.
- */
-int sdram_adjust_866 (void)
-{
-	volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
-	long		  mamr;
-
-	mamr = immr->im_memctl.memc_mamr;
-	mamr &= ~MAMR_PTA_MSK;
-	mamr |= ((gd->cpu_clk / CONFIG_SYS_PTA_PER_CLK) << MAMR_PTA_SHIFT);
-	immr->im_memctl.memc_mamr = mamr;
-
-	return (0);
+	return sdram_adjust_866();
 }
 
 /* Configure PLL for MPC866/859/885 CPU series
common/board_f.c +0 -2
index 05b2b137f7..14035b1805 100644
@@ -847,8 +847,6 @@ static const init_fnc_t init_sequence_f[] = {
 #if defined(CONFIG_8xx_CPUCLK_DEFAULT)
 	/* get CPU and bus clocks according to the environment variable */
 	get_clocks,
-	/* adjust sdram refresh rate according to the new clock */
-	sdram_adjust_866,
 	init_timebase,
 #elif defined(CONFIG_PPC)
 	get_clocks,		/* get CPU and bus clocks (etc.) */
include/common.h +0 -1
index cdaeec8e42..ef12e44095 100644
@@ -640,7 +640,6 @@ int serial_stub_tstc(struct stdio_dev *sdev);
 
 /* $(CPU)/speed.c */
 int	get_clocks (void);
-int	sdram_adjust_866 (void);
 int	adjust_sdram_tbs_8xx (void);
 #if defined(CONFIG_MPC8260)
 int	prt_8260_clks (void);
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#15 lore raw

PATCH 6/17 board_f: Remove sdram_adjust_866() from the init sequence

In reply to Simon Glass
Quoted 4 lines · Simon Glass

We can just call this from the only function that needs it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/a2f53951/attachment.sig>
#16 lore raw

PATCH 7/17 board_f: Remove adjust_sdram_tbs_8xx() from the init sequence

In reply to Simon Glass

We can just call this from the only place that needs it.

---

 arch/powerpc/cpu/mpc8xx/speed.c | 63 +++++++++++++++++++++--------------------
 common/board_f.c                |  4 ---
 include/common.h                |  1 -
 3 files changed, 33 insertions(+), 35 deletions(-)
arch/powerpc/cpu/mpc8xx/speed.c +33 -30
index 7a532cca07..e2295d253f 100644
@@ -252,6 +252,33 @@ static int sdram_adjust_866(void)
 	return 0;
 }
 
+/*
+ * Adjust sdram refresh rate to actual CPU clock
+ * and set timebase source according to actual CPU clock
+ */
+static int adjust_sdram_tbs_8xx(void)
+{
+#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) && \
+		!defined(CONFIG_TQM885D)
+	volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
+	long		  mamr;
+	long              sccr;
+
+	mamr = immr->im_memctl.memc_mamr;
+	mamr &= ~MAMR_PTA_MSK;
+	mamr |= ((gd->cpu_clk / CONFIG_SYS_PTA_PER_CLK) << MAMR_PTA_SHIFT);
+	immr->im_memctl.memc_mamr = mamr;
+
+	if (gd->cpu_clk < 67000000) {
+		sccr = immr->im_clkrst.car_sccr;
+		sccr |= SCCR_TBS;
+		immr->im_clkrst.car_sccr = sccr;
+	}
+#endif /* CONFIG_TQM8xxL/M, !TQM866M, !TQM885D */
+
+	return 0;
+}
+
 /* This function sets up PLL (init_pll_866() is called) and
  * fills gd->cpu_clk and gd->bus_clk according to the environment
  * variable 'cpuclk' or to CONFIG_8xx_CPUCLK_DEFAULT (if 'cpuclk'
@@ -264,6 +291,7 @@ int get_clocks(void)
 	char		  tmp[64];
 	long		  cpuclk = 0;
 	long		  sccr_reg;
+	int ret;
 
 	if (getenv_f("cpuclk", tmp, sizeof (tmp)) > 0)
 		cpuclk = simple_strtoul (tmp, NULL, 10) * 1000000;
@@ -293,7 +321,11 @@ int get_clocks(void)
 	}
 	immr->im_clkrst.car_sccr = sccr_reg;
 
-	return sdram_adjust_866();
+	ret = sdram_adjust_866();
+	if (ret)
+		return ret;
+
+	return adjust_sdram_tbs_8xx();
 }
 
 /* Configure PLL for MPC866/859/885 CPU series
@@ -369,32 +401,3 @@ static long init_pll_866 (long clk)
 }
 
 #endif /* CONFIG_8xx_CPUCLK_DEFAULT */
-
-#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \
-    && !defined(CONFIG_TQM885D)
-/*
- * Adjust sdram refresh rate to actual CPU clock
- * and set timebase source according to actual CPU clock
- */
-int adjust_sdram_tbs_8xx (void)
-{
-	volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
-	long		  mamr;
-	long              sccr;
-
-	mamr = immr->im_memctl.memc_mamr;
-	mamr &= ~MAMR_PTA_MSK;
-	mamr |= ((gd->cpu_clk / CONFIG_SYS_PTA_PER_CLK) << MAMR_PTA_SHIFT);
-	immr->im_memctl.memc_mamr = mamr;
-
-	if (gd->cpu_clk < 67000000) {
-		sccr = immr->im_clkrst.car_sccr;
-		sccr |= SCCR_TBS;
-		immr->im_clkrst.car_sccr = sccr;
-	}
-
-	return (0);
-}
-#endif /* CONFIG_TQM8xxL/M, !TQM866M, !TQM885D */
-
-/* ------------------------------------------------------------------------- */
common/board_f.c +0 -4
index 14035b1805..7feffa4939 100644
@@ -850,10 +850,6 @@ static const init_fnc_t init_sequence_f[] = {
 	init_timebase,
 #elif defined(CONFIG_PPC)
 	get_clocks,		/* get CPU and bus clocks (etc.) */
-#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \
-		&& !defined(CONFIG_TQM885D)
-	adjust_sdram_tbs_8xx,
-#endif
 	/* TODO: can we rename this to timer_init()? */
 	init_timebase,
 #endif /* CONFIG_8xx_CPUCLK_DEFAULT */
include/common.h +0 -1
index ef12e44095..ce37e9fc59 100644
@@ -640,7 +640,6 @@ int serial_stub_tstc(struct stdio_dev *sdev);
 
 /* $(CPU)/speed.c */
 int	get_clocks (void);
-int	adjust_sdram_tbs_8xx (void);
 #if defined(CONFIG_MPC8260)
 int	prt_8260_clks (void);
 #elif defined(CONFIG_MPC5xxx)
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#18 lore raw

PATCH 7/17 board_f: Remove adjust_sdram_tbs_8xx() from the init sequence

In reply to Simon Glass
Quoted 4 lines · Simon Glass

We can just call this from the only place that needs it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/5ce381a7/attachment.sig>
#19 lore raw

PATCH 8/17 board_f: powerpc: Unified get_clocks() portion of init sequence

In reply to Simon Glass

Now that both branches of the #if do the same thing, we can unify them.

---

 common/board_f.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
common/board_f.c +2 -6
index 7feffa4939..e387ca2233 100644
@@ -843,16 +843,12 @@ static const init_fnc_t init_sequence_f[] = {
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
 	board_early_init_f,
 #endif
-	/* TODO: can any of this go into arch_cpu_init()? */
-#if defined(CONFIG_8xx_CPUCLK_DEFAULT)
+#ifdef CONFIG_PPC
 	/* get CPU and bus clocks according to the environment variable */
-	get_clocks,
-	init_timebase,
-#elif defined(CONFIG_PPC)
 	get_clocks,		/* get CPU and bus clocks (etc.) */
 	/* TODO: can we rename this to timer_init()? */
 	init_timebase,
-#endif /* CONFIG_8xx_CPUCLK_DEFAULT */
+#endif
 #if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
 		defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32) || \
 		defined(CONFIG_SH) || defined(CONFIG_SPARC)
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#22 lore raw

PATCH 8/17 board_f: powerpc: Unified get_clocks() portion of init sequence

In reply to Simon Glass
Quoted 5 lines · Simon Glass

Now that both branches of the #if do the same thing, we can unify them.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/1fa3b675/attachment.sig>
#23 lore raw

PATCH 9/17 board_f: powerpc: Use timer_init() instead of init_timebase()

In reply to Simon Glass

There is no good reason to use a different name on PowerPC. Change it to timer_init() like the others.

---

 arch/powerpc/cpu/mpc5xx/cpu_init.c        | 2 +-
 arch/powerpc/lib/time.c                   | 2 +-
 board/freescale/mpc8313erdb/mpc8313erdb.c | 2 +-
 board/freescale/mpc8315erdb/mpc8315erdb.c | 2 +-
 common/board_f.c                          | 4 +---
 include/common.h                          | 1 -
 6 files changed, 5 insertions(+), 8 deletions(-)
arch/powerpc/cpu/mpc5xx/cpu_init.c +1 -1
index 0f62c13f86..5bae39f8c0 100644
@@ -43,7 +43,7 @@ void cpu_init_f (volatile immap_t * immr)
 	immr->im_uimb.uimb_umcr = CONFIG_SYS_UMCR;
 
 	/* Time base and decrementer will be enables (TBE) */
-	/* in init_timebase() in time.c called from board_init_f(). */
+	/* in timer_init() in time.c called from board_init_f(). */
 
 	/* Initialize the PIT. Unlock PISCRK */
 	immr->im_sitk.sitk_piscrk = KAPWR_KEY;
arch/powerpc/lib/time.c +1 -1
index 62b6c72f4e..de5f0be66d 100644
@@ -60,7 +60,7 @@ unsigned long ticks2usec(unsigned long ticks)
 #endif
 /* ------------------------------------------------------------------------- */
 
-int init_timebase (void)
+int timer_init(void)
 {
 	unsigned long temp;
 
board/freescale/mpc8313erdb/mpc8313erdb.c +1 -1
index eac193e817..693dff651a 100644
@@ -133,7 +133,7 @@ void board_init_f(ulong bootflag)
 	NS16550_init((NS16550_t)(CONFIG_SYS_IMMR + 0x4500),
 		     CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
 	puts("NAND boot... ");
-	init_timebase();
+	timer_init();
 	initdram(0);
 	relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC_SP, (gd_t *)gd,
 		      CONFIG_SYS_NAND_U_BOOT_RELOC);
board/freescale/mpc8315erdb/mpc8315erdb.c +1 -1
index 3cec09b586..1da6e2166d 100644
@@ -221,7 +221,7 @@ void board_init_f(ulong bootflag)
 	NS16550_init((NS16550_t)(CONFIG_SYS_IMMR + 0x4500),
 		     CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
 	puts("NAND boot... ");
-	init_timebase();
+	timer_init();
 	initdram(0);
 	relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC + 0x10000, (gd_t *)gd,
 		      CONFIG_SYS_NAND_U_BOOT_RELOC);
common/board_f.c +1 -3
index e387ca2233..dcbe72d91b 100644
@@ -846,10 +846,8 @@ static const init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_PPC
 	/* get CPU and bus clocks according to the environment variable */
 	get_clocks,		/* get CPU and bus clocks (etc.) */
-	/* TODO: can we rename this to timer_init()? */
-	init_timebase,
 #endif
-#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
+#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \
 		defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32) || \
 		defined(CONFIG_SH) || defined(CONFIG_SPARC)
 	timer_init,		/* initialize timer */
include/common.h +0 -1
index ce37e9fc59..684083510b 100644
@@ -783,7 +783,6 @@ void	wait_ticks    (unsigned long);
 /* arch/$(ARCH)/lib/time.c */
 ulong	usec2ticks    (unsigned long usec);
 ulong	ticks2usec    (unsigned long ticks);
-int	init_timebase (void);
 
 /* lib/gunzip.c */
 int gunzip(void *, int, unsigned char *, unsigned long *);
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#24 lore raw

PATCH 9/17 board_f: powerpc: Use timer_init() instead of init_timebase()

Quoted 6 lines · Simon Glass

There is no good reason to use a different name on PowerPC. Change it to timer_init() like the others.

---

Quoted 8 lines
 arch/powerpc/cpu/mpc5xx/cpu_init.c        | 2 +-
 arch/powerpc/lib/time.c                   | 2 +-
 board/freescale/mpc8313erdb/mpc8313erdb.c | 2 +-
 board/freescale/mpc8315erdb/mpc8315erdb.c | 2 +-
 common/board_f.c                          | 4 +---
 include/common.h                          | 1 -
 6 files changed, 5 insertions(+), 8 deletions(-)
#26 lore raw

PATCH 9/17 board_f: powerpc: Use timer_init() instead of init_timebase()

In reply to Simon Glass
Quoted 6 lines · Simon Glass

There is no good reason to use a different name on PowerPC. Change it to timer_init() like the others.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/f884745e/attachment.sig>
#27 lore raw

PATCH 10/17 board_f: Use timer_init() on all archs

In reply to Simon Glass

More than half of the architectures use this function so let's make them all use it.

For those which don't actually define it, we can rely on the weak function in lib/time.c

---

 common/board_f.c | 4 ----
 1 file changed, 4 deletions(-)
common/board_f.c +0 -4
index dcbe72d91b..9ba3163e0f 100644
@@ -847,11 +847,7 @@ static const init_fnc_t init_sequence_f[] = {
 	/* get CPU and bus clocks according to the environment variable */
 	get_clocks,		/* get CPU and bus clocks (etc.) */
 #endif
-#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \
-		defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32) || \
-		defined(CONFIG_SH) || defined(CONFIG_SPARC)
 	timer_init,		/* initialize timer */
-#endif
 #if defined(CONFIG_BOARD_POSTCLK_INIT)
 	board_postclk_init,
 #endif
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#28 lore raw

PATCH 10/17 board_f: Use timer_init() on all archs

Quoted 12 lines · Simon Glass

More than half of the architectures use this function so let's make them all use it.

For those which don't actually define it, we can rely on the weak function in lib/time.c

---

 common/board_f.c | 4 ----
 1 file changed, 4 deletions(-)
#30 lore raw

PATCH 10/17 board_f: Use timer_init() on all archs

In reply to Simon Glass
Quoted 9 lines · Simon Glass

More than half of the architectures use this function so let's make them all use it.

For those which don't actually define it, we can rely on the weak function in lib/time.c

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/86950a77/attachment.sig>
#31 lore raw

PATCH 11/17 powerpc: freescale: Unify the two get_clocks() calls

In reply to Simon Glass

Combine the conditions so this appears in the init list only once.

---

 common/board_f.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
common/board_f.c +1 -4
index 9ba3163e0f..cbd9f67709 100644
@@ -843,7 +843,7 @@ static const init_fnc_t init_sequence_f[] = {
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
 	board_early_init_f,
 #endif
-#ifdef CONFIG_PPC
+#if defined(CONFIG_PPC) || defined(CONFIG_SYS_FSL_CLK) || defined(CONFIG_M68K)
 	/* get CPU and bus clocks according to the environment variable */
 	get_clocks,		/* get CPU and bus clocks (etc.) */
 #endif
@@ -851,9 +851,6 @@ static const init_fnc_t init_sequence_f[] = {
 #if defined(CONFIG_BOARD_POSTCLK_INIT)
 	board_postclk_init,
 #endif
-#if defined(CONFIG_SYS_FSL_CLK) || defined(CONFIG_M68K)
-	get_clocks,
-#endif
 	env_init,		/* initialize environment */
 	init_baud_rate,		/* initialze baudrate settings */
 	serial_init,		/* serial communications setup */
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#32 lore raw

PATCH 11/17 powerpc: freescale: Unify the two get_clocks() calls

Quoted 23 lines · Simon Glass

Combine the conditions so this appears in the init list only once.

---

 common/board_f.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
common/board_f.c +1 -1
index 9ba3163e0f..cbd9f67709 100644
@@ -843,7 +843,7 @@ static const init_fnc_t init_sequence_f[] = {
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
 	board_early_init_f,
 #endif
-#ifdef CONFIG_PPC
+#if defined(CONFIG_PPC) || defined(CONFIG_SYS_FSL_CLK) || defined(CONFIG_M68K)
 	/* get CPU and bus clocks according to the environment variable */
 	get_clocks,		/* get CPU and bus clocks (etc.) */
 #endif

common/board_f.c static const init_fnc_t init_sequence_f[] = { · line 856

Quoted 9 lines
common/board_f.c +0 -3
@@ -851,9 +851,6 @@ static const init_fnc_t init_sequence_f[] = {
 #if defined(CONFIG_BOARD_POSTCLK_INIT)
 	board_postclk_init,
 #endif
-#if defined(CONFIG_SYS_FSL_CLK) || defined(CONFIG_M68K)
-	get_clocks,
-#endif
 	env_init,		/* initialize environment */
 	init_baud_rate,		/* initialze baudrate settings */
 	serial_init,		/* serial communications setup */

The change looks OK. I will need some time to test this set on some boards to confirm.

York

#35 lore raw

PATCH 11/17 powerpc: freescale: Unify the two get_clocks() calls

In reply to Simon Glass
Quoted 5 lines · Simon Glass

Combine the conditions so this appears in the init list only once.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/cf05caa7/attachment.sig>
#36 lore raw

PATCH 12/17 board_f: powerpc: Move prt_83xx_rsr() to private code

In reply to Simon Glass

This function is called just before checkcpu() on MPX83xx. Move it to the code for that arch.

---

 arch/powerpc/cpu/mpc83xx/cpu.c       | 5 +++++
 arch/powerpc/cpu/mpc83xx/cpu_init.c  | 1 +
 arch/powerpc/include/asm/processor.h | 2 ++
 common/board_f.c                     | 3 ---
 include/common.h                     | 2 --
 5 files changed, 8 insertions(+), 5 deletions(-)
arch/powerpc/cpu/mpc83xx/cpu.c +5 -0
index c87f0fdd29..cb82621ec4 100644
@@ -33,6 +33,7 @@ int checkcpu(void)
 	u32 pvr = get_pvr();
 	u32 spridr;
 	char buf[32];
+	int ret;
 	int i;
 
 	const struct cpu_type {
@@ -61,6 +62,10 @@ int checkcpu(void)
 
 	immr = (immap_t *)CONFIG_SYS_IMMR;
 
+	ret = prt_83xx_rsr();
+	if (ret)
+		return ret;
+
 	puts("CPU:   ");
 
 	switch (pvr & 0xffff0000) {
arch/powerpc/cpu/mpc83xx/cpu_init.c +1 -0
index 3a0916bdbf..2a9db0c51b 100644
@@ -8,6 +8,7 @@
 #include <mpc83xx.h>
 #include <ioports.h>
 #include <asm/io.h>
+#include <asm/processor.h>
 #ifdef CONFIG_USB_EHCI_FSL
 #include <usb/ehci-ci.h>
 #endif
arch/powerpc/include/asm/processor.h +2 -0
index 81bae6f008..c032726df1 100644
@@ -1354,6 +1354,8 @@ void ll_puts(const char *);
 /* In misc.c */
 void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
 
+int prt_83xx_rsr(void);
+
 #endif /* ndef ASSEMBLY*/
 
 #ifdef CONFIG_MACH_SPECIFIC
common/board_f.c +0 -3
index cbd9f67709..74cdef0ddb 100644
@@ -864,9 +864,6 @@ static const init_fnc_t init_sequence_f[] = {
 	prt_8260_rsr,
 	prt_8260_clks,
 #endif /* CONFIG_MPC8260 */
-#if defined(CONFIG_MPC83xx)
-	prt_83xx_rsr,
-#endif
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH)
 	checkcpu,
 #endif
include/common.h +0 -2
index 684083510b..6f08110b74 100644
@@ -715,8 +715,6 @@ ulong cpu_init_f(void);
 int	cpu_init_r    (void);
 #if defined(CONFIG_MPC8260)
 int	prt_8260_rsr  (void);
-#elif defined(CONFIG_MPC83xx)
-int	prt_83xx_rsr  (void);
 #endif
 
 /* $(CPU)/interrupts.c */
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#38 lore raw

PATCH 12/17 board_f: powerpc: Move prt_83xx_rsr() to private code

In reply to Simon Glass
Quoted 4 lines · Simon Glass

This function is called just before checkcpu() on MPX83xx. Move it to the code for that arch.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/949f3adb/attachment.sig>
#39 lore raw

PATCH 13/17 board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()

In reply to Simon Glass

We don't need a special hook for sandbox as one of the later ones will do just as well. We can print error messages about bad options after we print the banner. In fact, it seems better.

---

 arch/sandbox/cpu/start.c  | 5 +++++
 common/board_f.c          | 3 ---
 include/configs/sandbox.h | 2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)
arch/sandbox/cpu/start.c +5 -0
index dc58fef90c..f605d4d61e 100644
@@ -66,6 +66,11 @@ int sandbox_early_getopt_check(void)
 	os_exit(0);
 }
 
+int misc_init_f(void)
+{
+	return sandbox_early_getopt_check();
+}
+
 static int sandbox_cmdline_cb_help(struct sandbox_state *state, const char *arg)
 {
 	/* just flag to sandbox_early_getopt_check to show usage */
common/board_f.c +0 -3
index 74cdef0ddb..9d17ae0100 100644
@@ -855,9 +855,6 @@ static const init_fnc_t init_sequence_f[] = {
 	init_baud_rate,		/* initialze baudrate settings */
 	serial_init,		/* serial communications setup */
 	console_init_f,		/* stage 1 init of console */
-#ifdef CONFIG_SANDBOX
-	sandbox_early_getopt_check,
-#endif
 	display_options,	/* say that we are here */
 	display_text_info,	/* show debugging info if required */
 #if defined(CONFIG_MPC8260)
include/configs/sandbox.h +2 -0
index 6b3cd18046..7de8765dc8 100644
@@ -199,4 +199,6 @@
 #define CONFIG_SYS_SYSTEMACE_WIDTH	16
 #define CONFIG_SYS_SYSTEMACE_BASE	0
 
+#define CONFIG_MISC_INIT_F
+
 #endif
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#40 lore raw

PATCH 13/17 board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()

Quoted 5 lines · Simon Glass

We don't need a special hook for sandbox as one of the later ones will do just as well. We can print error messages about bad options after we print the banner. In fact, it seems better.

Thanks,
Stefan

#41 lore raw

PATCH 13/17 board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()

In reply to Simon Glass
Quoted 6 lines · Simon Glass

We don't need a special hook for sandbox as one of the later ones will do just as well. We can print error messages about bad options after we print the banner. In fact, it seems better.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/8c467fc2/attachment.sig>
#42 lore raw

PATCH 14/17 board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private

In reply to Simon Glass

Move these two function calls into checkcpu(), which is called on this arch immediately after these two.

---

 arch/powerpc/cpu/mpc8260/cpu.c       | 9 ++++++++-
 arch/powerpc/include/asm/processor.h | 2 ++
 common/board_f.c                     | 4 ----
 include/common.h                     | 7 +------
 4 files changed, 11 insertions(+), 11 deletions(-)
arch/powerpc/cpu/mpc8260/cpu.c +8 -1
index 9f2be3cb22..58d1c0261c 100644
@@ -50,7 +50,14 @@ int checkcpu (void)
 	uint pvr = get_pvr ();
 	uint immr, rev, m, k;
 	char buf[32];
-
+	int ret;
+
+	ret = prt_8260_rsr();
+	if (ret)
+		return ret;
+	ret = prt_8260_clks();
+	if (ret)
+		return ret;
 	puts ("CPU:   ");
 
 	switch (pvr) {
arch/powerpc/include/asm/processor.h +2 -0
index c032726df1..fd38da9fe5 100644
@@ -1355,6 +1355,8 @@ void ll_puts(const char *);
 void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
 
 int prt_83xx_rsr(void);
+int prt_8260_rsr(void);
+int prt_8260_clks(void);
 
 #endif /* ndef ASSEMBLY*/
 
common/board_f.c +0 -4
index 9d17ae0100..8f37662a57 100644
@@ -857,10 +857,6 @@ static const init_fnc_t init_sequence_f[] = {
 	console_init_f,		/* stage 1 init of console */
 	display_options,	/* say that we are here */
 	display_text_info,	/* show debugging info if required */
-#if defined(CONFIG_MPC8260)
-	prt_8260_rsr,
-	prt_8260_clks,
-#endif /* CONFIG_MPC8260 */
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH)
 	checkcpu,
 #endif
include/common.h +1 -6
index 6f08110b74..bc486489a2 100644
@@ -640,9 +640,7 @@ int serial_stub_tstc(struct stdio_dev *sdev);
 
 /* $(CPU)/speed.c */
 int	get_clocks (void);
-#if defined(CONFIG_MPC8260)
-int	prt_8260_clks (void);
-#elif defined(CONFIG_MPC5xxx)
+#if defined(CONFIG_MPC5xxx)
 int	prt_mpc5xxx_clks (void);
 #endif
 #ifdef CONFIG_4xx
@@ -713,9 +711,6 @@ ulong cpu_init_f(void);
 #endif
 
 int	cpu_init_r    (void);
-#if defined(CONFIG_MPC8260)
-int	prt_8260_rsr  (void);
-#endif
 
 /* $(CPU)/interrupts.c */
 int	interrupt_init	   (void);
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#44 lore raw

PATCH 14/17 board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private

In reply to Simon Glass
Quoted 5 lines · Simon Glass

Move these two function calls into checkcpu(), which is called on this arch immediately after these two.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/490c3f2c/attachment.sig>
#45 lore raw

PATCH 15/17 board_f: x86: Use checkcpu() for CPU init

In reply to Simon Glass

At present we misuse print_cpuinfo() do so CPU init on x86. This is done because it is the next available call after the console is enabled. But several arches use checkcpu() instead. Despite the horrible name (which we can fix), it seems a better choice.

Adjust the various x86 CPU implementations to move their init code into checkcpu() and use print_cpuinfo() only for printing CPU info.

---

 arch/x86/cpu/broadwell/cpu.c     | 12 +++++++++---
 arch/x86/cpu/coreboot/coreboot.c |  5 +++++
 arch/x86/cpu/efi/efi.c           |  5 +++++
 arch/x86/cpu/ivybridge/cpu.c     | 14 ++++++++++----
 arch/x86/cpu/qemu/qemu.c         |  6 ++++++
 arch/x86/cpu/quark/quark.c       |  5 +++++
 arch/x86/cpu/x86_64/cpu.c        |  5 +++++
 arch/x86/lib/efi/efi.c           |  5 +++++
 arch/x86/lib/fsp/fsp_common.c    |  5 +++++
 common/board_f.c                 |  3 ++-
 10 files changed, 57 insertions(+), 8 deletions(-)
arch/x86/cpu/broadwell/cpu.c +9 -3
index 1b71d566c9..294dfa6643 100644
@@ -131,10 +131,8 @@ int arch_cpu_init(void)
 	return x86_cpu_init_f();
 }
 
-int print_cpuinfo(void)
+int checkcpu(void)
 {
-	char processor_name[CPU_MAX_NAME_LEN];
-	const char *name;
 	int ret;
 
 	set_max_freq();
@@ -144,6 +142,14 @@ int print_cpuinfo(void)
 		return ret;
 	gd->arch.pei_boot_mode = PEI_BOOT_NONE;
 
+	return 0;
+}
+
+int print_cpuinfo(void)
+{
+	char processor_name[CPU_MAX_NAME_LEN];
+	const char *name;
+
 	/* Print processor name */
 	name = cpu_get_name(processor_name);
 	printf("CPU:   %s\n", name);
arch/x86/cpu/coreboot/coreboot.c +5 -0
index 1b042037bb..658b900f0b 100644
@@ -34,6 +34,11 @@ int board_early_init_f(void)
 	return 0;
 }
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	return default_print_cpuinfo();
arch/x86/cpu/efi/efi.c +5 -0
index 993ab8dcde..741613f615 100644
@@ -18,6 +18,11 @@ int board_early_init_f(void)
 	return 0;
 }
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	return default_print_cpuinfo();
arch/x86/cpu/ivybridge/cpu.c +10 -4
index c4aca08f0d..099cb94e5d 100644
@@ -74,7 +74,7 @@ int arch_cpu_init_dm(void)
 	/*
 	 * We should do as little as possible before the serial console is
 	 * up. Perhaps this should move to later. Our next lot of init
-	 * happens in print_cpuinfo() when we have a console
+	 * happens in checkcpu() when we have a console
 	 */
 	ret = set_flex_ratio_to_tdp_nominal();
 	if (ret)
@@ -125,12 +125,10 @@ static void enable_usb_bar(struct udevice *bus)
 	pci_bus_write_config(bus, usb3, PCI_COMMAND, cmd, PCI_SIZE_32);
 }
 
-int print_cpuinfo(void)
+int checkcpu(void)
 {
 	enum pei_boot_mode_t boot_mode = PEI_BOOT_NONE;
-	char processor_name[CPU_MAX_NAME_LEN];
 	struct udevice *dev, *lpc;
-	const char *name;
 	uint32_t pm1_cnt;
 	uint16_t pm1_sts;
 	int ret;
@@ -182,6 +180,14 @@ int print_cpuinfo(void)
 
 	gd->arch.pei_boot_mode = boot_mode;
 
+	return 0;
+}
+
+int print_cpuinfo(void)
+{
+	char processor_name[CPU_MAX_NAME_LEN];
+	const char *name;
+
 	/* Print processor name */
 	name = cpu_get_name(processor_name);
 	printf("CPU:   %s\n", name);
arch/x86/cpu/qemu/qemu.c +6 -0
index 7153eb21f5..35a146c66a 100644
@@ -148,6 +148,12 @@ int arch_cpu_init(void)
 
 #if !CONFIG_IS_ENABLED(EFI_STUB) && \
 	!CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT)
+
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	post_code(POST_CPU_INFO);
arch/x86/cpu/quark/quark.c +5 -0
index bdd360a99f..0c2cea4ee9 100644
@@ -264,6 +264,11 @@ int arch_cpu_init_dm(void)
 	return 0;
 }
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	post_code(POST_CPU_INFO);
arch/x86/cpu/x86_64/cpu.c +5 -0
index db171f750d..cafae15af0 100644
@@ -67,6 +67,11 @@ int misc_init_r(void)
 	return 0;
 }
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	return 0;
arch/x86/lib/efi/efi.c +5 -0
index ede5d5676b..533318bc36 100644
@@ -125,6 +125,11 @@ void dram_init_banksize(void)
 	}
 }
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	return default_print_cpuinfo();
arch/x86/lib/fsp/fsp_common.c +5 -0
index cebf85ee5b..66a388d601 100644
@@ -14,6 +14,11 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	post_code(POST_CPU_INFO);
common/board_f.c +2 -1
index 8f37662a57..7ec45299d7 100644
@@ -857,7 +857,8 @@ static const init_fnc_t init_sequence_f[] = {
 	console_init_f,		/* stage 1 init of console */
 	display_options,	/* say that we are here */
 	display_text_info,	/* show debugging info if required */
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH)
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH) || \
+		defined(CONFIG_X86)
 	checkcpu,
 #endif
 #if defined(CONFIG_DISPLAY_CPUINFO)
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#46 lore raw

PATCH 15/17 board_f: x86: Use checkcpu() for CPU init

Quoted 9 lines · Simon Glass

At present we misuse print_cpuinfo() do so CPU init on x86. This is done because it is the next available call after the console is enabled. But several arches use checkcpu() instead. Despite the horrible name (which we can fix), it seems a better choice.

Adjust the various x86 CPU implementations to move their init code into checkcpu() and use print_cpuinfo() only for printing CPU info.

Thanks,
Stefan

#47 lore raw

PATCH 15/17 board_f: x86: Use checkcpu() for CPU init

In reply to Simon Glass
Quoted 10 lines · Simon Glass

At present we misuse print_cpuinfo() do so CPU init on x86. This is done because it is the next available call after the console is enabled. But several arches use checkcpu() instead. Despite the horrible name (which we can fix), it seems a better choice.

Adjust the various x86 CPU implementations to move their init code into checkcpu() and use print_cpuinfo() only for printing CPU info.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/84a66cc5/attachment.sig>
#48 lore raw

PATCH 16/17 i2c: Drop unused i2c_soft...() functions

In reply to Simon Glass

These are not used in U-Boot. Manual relocation fixup is used by blackfin but that is being removed.

---

 drivers/i2c/i2c_core.c | 44 --------------------------------------------
 include/i2c.h          | 15 ---------------
 2 files changed, 59 deletions(-)
drivers/i2c/i2c_core.c +0 -44
index 16b1aba32a..19769dab67 100644
@@ -39,50 +39,6 @@ struct i2c_bus_hose i2c_bus[CONFIG_SYS_NUM_I2C_BUSES] =
 
 DECLARE_GLOBAL_DATA_PTR;
 
-void i2c_reloc_fixup(void)
-{
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-	struct i2c_adapter *i2c_adap_p = ll_entry_start(struct i2c_adapter,
-						i2c);
-	struct i2c_adapter *tmp = i2c_adap_p;
-	int max = ll_entry_count(struct i2c_adapter, i2c);
-	int		i;
-	unsigned long	addr;
-
-	if (gd->reloc_off == 0)
-		return;
-
-	for (i = 0; i < max; i++) {
-		/* i2c_init() */
-		addr = (unsigned long)i2c_adap_p->init;
-		addr += gd->reloc_off;
-		i2c_adap_p->init = (void *)addr;
-		/* i2c_probe() */
-		addr = (unsigned long)i2c_adap_p->probe;
-		addr += gd->reloc_off;
-		i2c_adap_p->probe = (void *)addr;
-		/* i2c_read() */
-		addr = (unsigned long)i2c_adap_p->read;
-		addr += gd->reloc_off;
-		i2c_adap_p->read = (void *)addr;
-		/* i2c_write() */
-		addr = (unsigned long)i2c_adap_p->write;
-		addr += gd->reloc_off;
-		i2c_adap_p->write = (void *)addr;
-		/* i2c_set_bus_speed() */
-		addr = (unsigned long)i2c_adap_p->set_bus_speed;
-		addr += gd->reloc_off;
-		i2c_adap_p->set_bus_speed = (void *)addr;
-		/* name */
-		addr = (unsigned long)i2c_adap_p->name;
-		addr += gd->reloc_off;
-		i2c_adap_p->name = (char *)addr;
-		tmp++;
-		i2c_adap_p = tmp;
-	}
-#endif
-}
-
 #ifndef CONFIG_SYS_I2C_DIRECT_BUS
 /*
  * i2c_mux_set()
include/i2c.h +0 -15
index d500445aaf..4bbeecabf2 100644
@@ -791,21 +791,6 @@ unsigned int i2c_set_bus_speed(unsigned int speed);
 
 unsigned int i2c_get_bus_speed(void);
 
-/*
- * i2c_reloc_fixup:
- *
- * Adjusts I2C pointers after U-Boot is relocated to DRAM
- */
-void i2c_reloc_fixup(void);
-#if defined(CONFIG_SYS_I2C_SOFT)
-void i2c_soft_init(void);
-void i2c_soft_active(void);
-void i2c_soft_tristate(void);
-int i2c_soft_read(void);
-void i2c_soft_sda(int bit);
-void i2c_soft_scl(int bit);
-void i2c_soft_delay(void);
-#endif
 #else
 
 /*
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#49 lore raw

PATCH 16/17 i2c: Drop unused i2c_soft...() functions

Quoted 4 lines · Simon Glass

These are not used in U-Boot. Manual relocation fixup is used by blackfin but that is being removed.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/82bc4eac/attachment.sig>
#50 lore raw

PATCH 17/17 i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS

In reply to Simon Glass

This is not used by any board. Drop it.

Clean up board_f sequence a little
This series tries to remove #ifdefs from the board_f init sequence. It gets as far as I2C and then we need to discuss whether we can start to remove the old I2C framework.

I think that ideally each entry in the init sequence should be enabled by at most one CONFIG, which is in Kconfig and is not arch-specific. END

---

 board/samsung/common/Makefile    |  1 -
 board/samsung/common/multi_i2c.c | 59 ----------------------------------------
 include/i2c.h                    |  7 -----
 scripts/config_whitelist.txt     |  1 -
 4 files changed, 68 deletions(-)
 delete mode 100644 board/samsung/common/multi_i2c.c
board/samsung/common/Makefile +0 -1
index ef1a8f318f..fa85f7dcd2 100644
@@ -5,7 +5,6 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o
 obj-$(CONFIG_USB_GADGET_DOWNLOAD) += gadget.o
 obj-$(CONFIG_MISC_COMMON) += misc.o
 
board/samsung/common/multi_i2c.c deleted +0 -59

59 lines not on this page · raw message

include/i2c.h +0 -7
index 4bbeecabf2..cd7f61e1c1 100644
@@ -930,13 +930,6 @@ enum {
 	I2C_8, I2C_9, I2C_10,
 };
 
-/* Multi I2C busses handling */
-#ifdef CONFIG_SOFT_I2C_MULTI_BUS
-extern int get_multi_scl_pin(void);
-extern int get_multi_sda_pin(void);
-extern int multi_i2c_init(void);
-#endif
-
 /**
  * Get FDT values for i2c bus.
  *
scripts/config_whitelist.txt +0 -1
index 668f238459..ba90758a29 100644
@@ -2838,7 +2838,6 @@ CONFIG_SOFT_I2C_I2C5_SCL
 CONFIG_SOFT_I2C_I2C5_SDA
 CONFIG_SOFT_I2C_I2C9_SCL
 CONFIG_SOFT_I2C_I2C9_SDA
-CONFIG_SOFT_I2C_MULTI_BUS
 CONFIG_SOFT_I2C_READ_REPEATED_START
 CONFIG_SOFT_SPI
 CONFIG_SOFT_TWS
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#51 lore raw

PATCH 17/17 i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS

Hi Simon,

+CC board maintainer: Jaehoon.

Quoted 121 lines

This is not used by any board. Drop it.

Clean up board_f sequence a little
This series tries to remove #ifdefs from the board_f init sequence. It gets as far as I2C and then we need to discuss whether we can start to remove the old I2C framework.

I think that ideally each entry in the init sequence should be enabled by at most one CONFIG, which is in Kconfig and is not arch-specific. END

---

 board/samsung/common/Makefile    |  1 -
 board/samsung/common/multi_i2c.c | 59
----------------------------------------
include/i2c.h                    |  7 -----
scripts/config_whitelist.txt     |  1 - 4 files changed, 68

deletions(-) delete mode 100644 board/samsung/common/multi_i2c.c

(quoted diff) +0 -0

b/board/samsung/common/Makefile index ef1a8f318f..fa85f7dcd2 100644

board/samsung/common/Makefile +0 -1
@@ -5,7 +5,6 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o
 obj-$(CONFIG_USB_GADGET_DOWNLOAD) += gadget.o
 obj-$(CONFIG_MISC_COMMON) += misc.o
 
(quoted diff) +0 -0

b/board/samsung/common/multi_i2c.c deleted file mode 100644 index 71c32c0b6e..0000000000

board/samsung/common/multi_i2c.c deleted +0 -59
@@ -1,59 +0,0 @@
-/*
- *  Copyright (C) 2012 Samsung Electronics
- *  Lukasz Majewski <[email protected]>
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#include <common.h>
-#include <i2c.h>
-
-#ifndef CONFIG_SOFT_I2C_I2C10_SCL
-#define CONFIG_SOFT_I2C_I2C10_SCL 0
-#endif
-
-#ifndef CONFIG_SOFT_I2C_I2C10_SDA
-#define CONFIG_SOFT_I2C_I2C10_SDA 0
-#endif
-
-/* Handle multiple I2C buses instances */
-int get_multi_scl_pin(void)
-{
-	unsigned int bus = i2c_get_bus_num();
-
-	switch (bus) {
-	case I2C_0:
-		return CONFIG_SOFT_I2C_I2C5_SCL;
-	case I2C_1:
-		return CONFIG_SOFT_I2C_I2C9_SCL;
-	case I2C_2:
-		return CONFIG_SOFT_I2C_I2C10_SCL;
-	default:
-		printf("I2C_%d not supported!\n", bus);
-	};
-
-	return 0;
-}
-
-int get_multi_sda_pin(void)
-{
-	unsigned int bus = i2c_get_bus_num();
-
-	switch (bus) {
-	case I2C_0:
-		return CONFIG_SOFT_I2C_I2C5_SDA;
-	case I2C_1:
-		return CONFIG_SOFT_I2C_I2C9_SDA;
-	case I2C_2:
-		return CONFIG_SOFT_I2C_I2C10_SDA;
-	default:
-		printf("I2C_%d not supported!\n", bus);
-	};
-
-	return 0;
-}
-
-int multi_i2c_init(void)
-{
-	return 0;
-}
include/i2c.h +0 -7
index 4bbeecabf2..cd7f61e1c1 100644
@@ -930,13 +930,6 @@ enum {
 	I2C_8, I2C_9, I2C_10,
 };
 
-/* Multi I2C busses handling */
-#ifdef CONFIG_SOFT_I2C_MULTI_BUS
-extern int get_multi_scl_pin(void);
-extern int get_multi_sda_pin(void);
-extern int multi_i2c_init(void);
-#endif
-
 /**
  * Get FDT values for i2c bus.
  *
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index 668f238459..ba90758a29 100644

scripts/config_whitelist.txt CONFIG_SOFT_I2C_I2C5_SCL · line 2843

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -2838,7 +2838,6 @@ CONFIG_SOFT_I2C_I2C5_SCL
 CONFIG_SOFT_I2C_I2C5_SDA
 CONFIG_SOFT_I2C_I2C9_SCL
 CONFIG_SOFT_I2C_I2C9_SDA
-CONFIG_SOFT_I2C_MULTI_BUS
 CONFIG_SOFT_I2C_READ_REPEATED_START
 CONFIG_SOFT_SPI
 CONFIG_SOFT_TWS

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

#52 lore raw

PATCH 17/17 i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS

Quoted 126 lines · Lukasz Majewski

Hi Simon,

+CC board maintainer: Jaehoon.

Quoted 122 lines

This is not used by any board. Drop it.

Clean up board_f sequence a little
This series tries to remove #ifdefs from the board_f init sequence. It gets as far as I2C and then we need to discuss whether we can start to remove the old I2C framework.

I think that ideally each entry in the init sequence should be enabled by at most one CONFIG, which is in Kconfig and is not arch-specific. END

---

 board/samsung/common/Makefile    |  1 -
 board/samsung/common/multi_i2c.c | 59
----------------------------------------
include/i2c.h                    |  7 -----
scripts/config_whitelist.txt     |  1 - 4 files changed, 68

deletions(-) delete mode 100644 board/samsung/common/multi_i2c.c

(quoted diff) +0 -0

b/board/samsung/common/Makefile index ef1a8f318f..fa85f7dcd2 100644

board/samsung/common/Makefile +0 -1
@@ -5,7 +5,6 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o
 obj-$(CONFIG_USB_GADGET_DOWNLOAD) += gadget.o
 obj-$(CONFIG_MISC_COMMON) += misc.o
 
(quoted diff) +0 -0

b/board/samsung/common/multi_i2c.c deleted file mode 100644 index 71c32c0b6e..0000000000

board/samsung/common/multi_i2c.c deleted +0 -59
@@ -1,59 +0,0 @@
-/*
- *  Copyright (C) 2012 Samsung Electronics
- *  Lukasz Majewski <[email protected]>
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#include <common.h>
-#include <i2c.h>
-
-#ifndef CONFIG_SOFT_I2C_I2C10_SCL
-#define CONFIG_SOFT_I2C_I2C10_SCL 0
-#endif
-
-#ifndef CONFIG_SOFT_I2C_I2C10_SDA
-#define CONFIG_SOFT_I2C_I2C10_SDA 0
-#endif
-
-/* Handle multiple I2C buses instances */
-int get_multi_scl_pin(void)
-{
-	unsigned int bus = i2c_get_bus_num();
-
-	switch (bus) {
-	case I2C_0:
-		return CONFIG_SOFT_I2C_I2C5_SCL;
-	case I2C_1:
-		return CONFIG_SOFT_I2C_I2C9_SCL;
-	case I2C_2:
-		return CONFIG_SOFT_I2C_I2C10_SCL;
-	default:
-		printf("I2C_%d not supported!\n", bus);
-	};
-
-	return 0;
-}
-
-int get_multi_sda_pin(void)
-{
-	unsigned int bus = i2c_get_bus_num();
-
-	switch (bus) {
-	case I2C_0:
-		return CONFIG_SOFT_I2C_I2C5_SDA;
-	case I2C_1:
-		return CONFIG_SOFT_I2C_I2C9_SDA;
-	case I2C_2:
-		return CONFIG_SOFT_I2C_I2C10_SDA;
-	default:
-		printf("I2C_%d not supported!\n", bus);
-	};
-
-	return 0;
-}
-
-int multi_i2c_init(void)
-{
-	return 0;
-}
include/i2c.h +0 -7
index 4bbeecabf2..cd7f61e1c1 100644
@@ -930,13 +930,6 @@ enum {
 	I2C_8, I2C_9, I2C_10,
 };
 
-/* Multi I2C busses handling */
-#ifdef CONFIG_SOFT_I2C_MULTI_BUS
-extern int get_multi_scl_pin(void);
-extern int get_multi_sda_pin(void);
-extern int multi_i2c_init(void);
-#endif
-
 /**
  * Get FDT values for i2c bus.
  *
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index 668f238459..ba90758a29 100644

scripts/config_whitelist.txt +0 -0
@@ -2838,7 +2838,6 @@ CONFIG_SOFT_I2C_I2C5_SCL
 CONFIG_SOFT_I2C_I2C5_SDA
Quoted 8 lines

scripts/config_whitelist.txt CONFIG_SOFT_I2C_I2C5_SCL · line 2843

Quoted 6 lines
scripts/config_whitelist.txt +0 -1
 CONFIG_SOFT_I2C_I2C9_SCL
 CONFIG_SOFT_I2C_I2C9_SDA
-CONFIG_SOFT_I2C_MULTI_BUS
 CONFIG_SOFT_I2C_READ_REPEATED_START
 CONFIG_SOFT_SPI
 CONFIG_SOFT_TWS

Best Regards,
Jaehoon Chung

Quoted 14 lines

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

#53 lore raw

PATCH 17/17 i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS

In reply to Simon Glass
Quoted 8 lines · Simon Glass

This is not used by any board. Drop it.

Clean up board_f sequence a little
This series tries to remove #ifdefs from the board_f init sequence. It gets as far as I2C and then we need to discuss whether we can start to remove the old I2C framework.

Quoted 5 lines

I think that ideally each entry in the init sequence should be enabled by at most one CONFIG, which is in Kconfig and is not arch-specific. END

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/980e3586/attachment.sig>
#55 lore raw

PATCH 1/17 board_f: sandbox: Move setup_ram_buf() to private code

In reply to Simon Glass
Quoted 7 lines · Simon Glass

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/c3cbc7d5/attachment.sig>
#56 lore raw

PATCH 1/17 board_f: sandbox: Move setup_ram_buf() to private code

Hi Tom,

Quoted 11 lines · Tom Rini
Quoted 7 lines · Simon Glass

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.

Applied to u-boot/master, thanks!

I was just about to resend that series to fix the cover letter...but perhaps it doesn't matter.

I'm resending the second series now.

Regards,
SImon

#57 lore raw

PATCH 1/17 board_f: sandbox: Move setup_ram_buf() to private code

Quoted 13 lines · Simon Glass

Hi Tom,

Quoted 10 lines · Tom Rini
Quoted 7 lines · Simon Glass

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.

Quoted 6 lines
Quoted 1 line

Applied to u-boot/master, thanks!

I was just about to resend that series to fix the cover letter...but perhaps it doesn't matter.

I'm resending the second series now.

Yeah, you'll want to re-sync stuff, sorry. I did have a few fixups to do as I applied these, but mainly due to removing sparc/blackfin/openrisc first.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/4cef1113/attachment.sig>
#58 lore raw

PATCH 1/17 board_f: sandbox: Move setup_ram_buf() to private code

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 15 lines · Simon Glass

Hi Tom,

Quoted 11 lines · Tom Rini
Quoted 7 lines · Simon Glass

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.

Applied to u-boot/master, thanks!

Quoted 8 lines
Quoted 4 lines

I was just about to resend that series to fix the cover letter...but perhaps it doesn't matter.

I'm resending the second series now.

Yeah, you'll want to re-sync stuff, sorry. I did have a few fixups to do as I applied these, but mainly due to removing sparc/blackfin/openrisc first.

Yes I was assuming the removal would go in before my series, so that's good. I think you've applied everything except this patch:

board_f: Rename initdram() to dram_init()

Is that right? If so, I'll respin and resend. I hope it wasn't too much work!

Regards,
Simon

#59 lore raw

PATCH 1/17 board_f: sandbox: Move setup_ram_buf() to private code

Quoted 28 lines · Simon Glass

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 15 lines · Simon Glass

Hi Tom,

Quoted 11 lines · Tom Rini
Quoted 7 lines · Simon Glass

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.

Applied to u-boot/master, thanks!

Quoted 8 lines
Quoted 4 lines

I was just about to resend that series to fix the cover letter...but perhaps it doesn't matter.

I'm resending the second series now.

Yeah, you'll want to re-sync stuff, sorry. I did have a few fixups to do as I applied these, but mainly due to removing sparc/blackfin/openrisc first.

Quoted 6 lines

Yes I was assuming the removal would go in before my series, so that's good. I think you've applied everything except this patch:

board_f: Rename initdram() to dram_init()

Is that right? If so, I'll respin and resend. I hope it wasn't too much work!

Correct, and it wasn't hard, no. But with initdram() what I was trying to stress yesterday was that we have some use cases where both functions are used and in different ways. So some of the platforms will need a real think on how to get the same functionality still. I'm not sure if I was clear enough yesterday. Thanks again!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170406/51544157/attachment.sig>
#60 lore raw

PATCH 1/17 board_f: sandbox: Move setup_ram_buf() to private code

Hi Tom,

Quoted 34 lines · Tom Rini
Quoted 33 lines · Simon Glass

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 15 lines · Simon Glass

Hi Tom,

Quoted 11 lines · Tom Rini
Quoted 7 lines · Simon Glass

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.

Applied to u-boot/master, thanks!

Quoted 8 lines
Quoted 4 lines

I was just about to resend that series to fix the cover letter...but perhaps it doesn't matter.

I'm resending the second series now.

Yeah, you'll want to re-sync stuff, sorry. I did have a few fixups to do as I applied these, but mainly due to removing sparc/blackfin/openrisc first.

Yes I was assuming the removal would go in before my series, so that's good. I think you've applied everything except this patch:

board_f: Rename initdram() to dram_init()

Quoted 7 lines
Quoted 1 line

Is that right? If so, I'll respin and resend. I hope it wasn't too much work!

Correct, and it wasn't hard, no. But with initdram() what I was trying to stress yesterday was that we have some use cases where both functions are used and in different ways. So some of the platforms will need a real think on how to get the same functionality still. I'm not sure if I was clear enough yesterday. Thanks again!

Yes it was clear. I think it affects Freescale where they wanted to use the same name on the ARM platforms as PowerPC. I've fixed that by renaming the function. For arc it turns out I didn't have the compiler installed (having removed it in an upgrade) so didn't notice the error. Ooops.

I've have to do a full build again before resending though. Should be late today.

Regards,
Simon