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

* [U-Boot] [PATCH 02/17] board_f: initcall: Add a header guard
  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 ` 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
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/initcall.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/initcall.h b/include/initcall.h
index 65f67dca83..fe7e90388e 100644
--- a/include/initcall.h
+++ b/include/initcall.h
@@ -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
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 03/17] board_f: x86: Rename x86_fsp_init() to arch_fsp_init()
  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-03-28 16:27 ` 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
                   ` (15 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

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

diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index 4f901f9392..cc7fc7370e 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -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));
 
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 8479af1d7e..cebf85ee5b 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -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;
 
diff --git a/common/board_f.c b/common/board_f.c
index 22829dfed0..0454907590 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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 */
diff --git a/include/common.h b/include/common.h
index 2cbbd5a60c..6170422359 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 04/17] board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sections
  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-03-28 16:27 ` [U-Boot] [PATCH 03/17] board_f: x86: Rename x86_fsp_init() to arch_fsp_init() Simon Glass
@ 2017-03-28 16:27 ` 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
                   ` (14 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/board_f.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 0454907590..57e26d08cb 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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 */
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 05/17] board_f: powerpc: Rename get_clocks_866() to get_clocks()
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (2 preceding siblings ...)
  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-28 16:27 ` Simon Glass
  2017-03-28 20:08   ` york sun
                     ` (2 more replies)
  2017-03-28 16:27 ` [U-Boot] [PATCH 06/17] board_f: Remove sdram_adjust_866() from the init sequence Simon Glass
                   ` (13 subsequent siblings)
  17 siblings, 3 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

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

diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index 42442b8c98..613209cc6d 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -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];
diff --git a/common/board_f.c b/common/board_f.c
index 57e26d08cb..05b2b137f7 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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,
diff --git a/include/common.h b/include/common.h
index 6170422359..cdaeec8e42 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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)
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 06/17] board_f: Remove sdram_adjust_866() from the init sequence
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (3 preceding siblings ...)
  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 16:27 ` 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
                   ` (12 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/powerpc/cpu/mpc8xx/speed.c | 32 ++++++++++++++++----------------
 common/board_f.c                |  2 --
 include/common.h                |  1 -
 3 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index 613209cc6d..7a532cca07 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -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
diff --git a/common/board_f.c b/common/board_f.c
index 05b2b137f7..14035b1805 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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.) */
diff --git a/include/common.h b/include/common.h
index cdaeec8e42..ef12e44095 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 07/17] board_f: Remove adjust_sdram_tbs_8xx() from the init sequence
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (4 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 06/17] board_f: Remove sdram_adjust_866() from the init sequence Simon Glass
@ 2017-03-28 16:27 ` 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
                   ` (11 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/powerpc/cpu/mpc8xx/speed.c | 63 +++++++++++++++++++++--------------------
 common/board_f.c                |  4 ---
 include/common.h                |  1 -
 3 files changed, 33 insertions(+), 35 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index 7a532cca07..e2295d253f 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -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 */
-
-/* ------------------------------------------------------------------------- */
diff --git a/common/board_f.c b/common/board_f.c
index 14035b1805..7feffa4939 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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 */
diff --git a/include/common.h b/include/common.h
index ef12e44095..ce37e9fc59 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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)
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 08/17] board_f: powerpc: Unified get_clocks() portion of init sequence
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (5 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 07/17] board_f: Remove adjust_sdram_tbs_8xx() " Simon Glass
@ 2017-03-28 16:27 ` Simon Glass
  2017-03-28 20:08   ` york sun
                     ` (2 more replies)
  2017-03-28 16:27 ` [U-Boot] [PATCH 09/17] board_f: powerpc: Use timer_init() instead of init_timebase() Simon Glass
                   ` (10 subsequent siblings)
  17 siblings, 3 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/board_f.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 7feffa4939..e387ca2233 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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)
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 09/17] board_f: powerpc: Use timer_init() instead of init_timebase()
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (6 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 08/17] board_f: powerpc: Unified get_clocks() portion of " Simon Glass
@ 2017-03-28 16:27 ` Simon Glass
  2017-03-28 20:08   ` york sun
                     ` (2 more replies)
  2017-03-28 16:27 ` [U-Boot] [PATCH 10/17] board_f: Use timer_init() on all archs Simon Glass
                   ` (9 subsequent siblings)
  17 siblings, 3 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

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

diff --git a/arch/powerpc/cpu/mpc5xx/cpu_init.c b/arch/powerpc/cpu/mpc5xx/cpu_init.c
index 0f62c13f86..5bae39f8c0 100644
--- a/arch/powerpc/cpu/mpc5xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc5xx/cpu_init.c
@@ -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;
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index 62b6c72f4e..de5f0be66d 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -60,7 +60,7 @@ unsigned long ticks2usec(unsigned long ticks)
 #endif
 /* ------------------------------------------------------------------------- */
 
-int init_timebase (void)
+int timer_init(void)
 {
 	unsigned long temp;
 
diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c
index eac193e817..693dff651a 100644
--- a/board/freescale/mpc8313erdb/mpc8313erdb.c
+++ b/board/freescale/mpc8313erdb/mpc8313erdb.c
@@ -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);
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 3cec09b586..1da6e2166d 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -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);
diff --git a/common/board_f.c b/common/board_f.c
index e387ca2233..dcbe72d91b 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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 */
diff --git a/include/common.h b/include/common.h
index ce37e9fc59..684083510b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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 *);
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 10/17] board_f: Use timer_init() on all archs
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (7 preceding siblings ...)
  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 16:27 ` Simon Glass
  2017-03-28 20:08   ` york sun
                     ` (2 more replies)
  2017-03-28 16:27 ` [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls Simon Glass
                   ` (8 subsequent siblings)
  17 siblings, 3 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/board_f.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index dcbe72d91b..9ba3163e0f 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (8 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 10/17] board_f: Use timer_init() on all archs Simon Glass
@ 2017-03-28 16:27 ` Simon Glass
  2017-03-28 17:10   ` york sun
                     ` (3 more replies)
  2017-03-28 16:27 ` [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code Simon Glass
                   ` (7 subsequent siblings)
  17 siblings, 4 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/board_f.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 9ba3163e0f..cbd9f67709 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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 */
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (9 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls Simon Glass
@ 2017-03-28 16:27 ` 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
                   ` (6 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

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

diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index c87f0fdd29..cb82621ec4 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -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) {
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 3a0916bdbf..2a9db0c51b 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -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
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 81bae6f008..c032726df1 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -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
diff --git a/common/board_f.c b/common/board_f.c
index cbd9f67709..74cdef0ddb 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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
diff --git a/include/common.h b/include/common.h
index 684083510b..6f08110b74 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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 */
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 13/17] board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (10 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code Simon Glass
@ 2017-03-28 16:27 ` 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
                   ` (5 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/cpu/start.c  | 5 +++++
 common/board_f.c          | 3 ---
 include/configs/sandbox.h | 2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index dc58fef90c..f605d4d61e 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -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 */
diff --git a/common/board_f.c b/common/board_f.c
index 74cdef0ddb..9d17ae0100 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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)
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 6b3cd18046..7de8765dc8 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -199,4 +199,6 @@
 #define CONFIG_SYS_SYSTEMACE_WIDTH	16
 #define CONFIG_SYS_SYSTEMACE_BASE	0
 
+#define CONFIG_MISC_INIT_F
+
 #endif
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 14/17] board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (11 preceding siblings ...)
  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-28 16:27 ` 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
                   ` (4 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

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

diff --git a/arch/powerpc/cpu/mpc8260/cpu.c b/arch/powerpc/cpu/mpc8260/cpu.c
index 9f2be3cb22..58d1c0261c 100644
--- a/arch/powerpc/cpu/mpc8260/cpu.c
+++ b/arch/powerpc/cpu/mpc8260/cpu.c
@@ -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) {
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index c032726df1..fd38da9fe5 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -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*/
 
diff --git a/common/board_f.c b/common/board_f.c
index 9d17ae0100..8f37662a57 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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
diff --git a/include/common.h b/include/common.h
index 6f08110b74..bc486489a2 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 15/17] board_f: x86: Use checkcpu() for CPU init
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (12 preceding siblings ...)
  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-28 16:27 ` 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
                   ` (3 subsequent siblings)
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

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

diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index 1b71d566c9..294dfa6643 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -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);
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 1b042037bb..658b900f0b 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -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();
diff --git a/arch/x86/cpu/efi/efi.c b/arch/x86/cpu/efi/efi.c
index 993ab8dcde..741613f615 100644
--- a/arch/x86/cpu/efi/efi.c
+++ b/arch/x86/cpu/efi/efi.c
@@ -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();
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index c4aca08f0d..099cb94e5d 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -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);
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 7153eb21f5..35a146c66a 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -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);
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index bdd360a99f..0c2cea4ee9 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -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);
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index db171f750d..cafae15af0 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -67,6 +67,11 @@ int misc_init_r(void)
 	return 0;
 }
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	return 0;
diff --git a/arch/x86/lib/efi/efi.c b/arch/x86/lib/efi/efi.c
index ede5d5676b..533318bc36 100644
--- a/arch/x86/lib/efi/efi.c
+++ b/arch/x86/lib/efi/efi.c
@@ -125,6 +125,11 @@ void dram_init_banksize(void)
 	}
 }
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	return default_print_cpuinfo();
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index cebf85ee5b..66a388d601 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -14,6 +14,11 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int checkcpu(void)
+{
+	return 0;
+}
+
 int print_cpuinfo(void)
 {
 	post_code(POST_CPU_INFO);
diff --git a/common/board_f.c b/common/board_f.c
index 8f37662a57..7ec45299d7 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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)
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 16/17] i2c: Drop unused i2c_soft...() functions
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (13 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 15/17] board_f: x86: Use checkcpu() for CPU init Simon Glass
@ 2017-03-28 16:27 ` 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
                   ` (2 subsequent siblings)
  17 siblings, 1 reply; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/i2c/i2c_core.c | 44 --------------------------------------------
 include/i2c.h          | 15 ---------------
 2 files changed, 59 deletions(-)

diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 16b1aba32a..19769dab67 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -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()
diff --git a/include/i2c.h b/include/i2c.h
index d500445aaf..4bbeecabf2 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -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
 
 /*
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 17/17] i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (14 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 16/17] i2c: Drop unused i2c_soft...() functions Simon Glass
@ 2017-03-28 16:27 ` Simon Glass
  2017-03-29  8:41   ` Lukasz Majewski
  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
  17 siblings, 2 replies; 61+ messages in thread
From: Simon Glass @ 2017-03-28 16:27 UTC (permalink / raw)
  To: u-boot

This is not used by any board. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
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

diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile
index ef1a8f318f..fa85f7dcd2 100644
--- a/board/samsung/common/Makefile
+++ b/board/samsung/common/Makefile
@@ -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
 
diff --git a/board/samsung/common/multi_i2c.c b/board/samsung/common/multi_i2c.c
deleted file mode 100644
index 71c32c0b6e..0000000000
--- a/board/samsung/common/multi_i2c.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *  Copyright (C) 2012 Samsung Electronics
- *  Lukasz Majewski <l.majewski@samsung.com>
- *
- * 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;
-}
diff --git a/include/i2c.h b/include/i2c.h
index 4bbeecabf2..cd7f61e1c1 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -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.
  *
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 668f238459..ba90758a29 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
-- 
2.12.2.564.g063fe858b8-goog

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

* [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls
  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
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 61+ messages in thread
From: york sun @ 2017-03-28 17:10 UTC (permalink / raw)
  To: u-boot

On 03/28/2017 09:27 AM, Simon Glass wrote:
> Combine the conditions so this appears in the init list only once.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  common/board_f.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/common/board_f.c b/common/board_f.c
> index 9ba3163e0f..cbd9f67709 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -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 */
>

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

York

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

* [U-Boot] [PATCH 05/17] board_f: powerpc: Rename get_clocks_866() to get_clocks()
  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
  2 siblings, 0 replies; 61+ messages in thread
From: york sun @ 2017-03-28 20:08 UTC (permalink / raw)
  To: u-boot

On 03/28/2017 09:27 AM, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/powerpc/cpu/mpc8xx/speed.c | 2 +-
>  common/board_f.c                | 2 +-
>  include/common.h                | 1 -
>  3 files changed, 2 insertions(+), 3 deletions(-)
>

Reviewed-by: York Sun <york.sun@nxp.com>

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

* [U-Boot] [PATCH 08/17] board_f: powerpc: Unified get_clocks() portion of init sequence
  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
  2 siblings, 0 replies; 61+ messages in thread
From: york sun @ 2017-03-28 20:08 UTC (permalink / raw)
  To: u-boot

On 03/28/2017 09:27 AM, Simon Glass wrote:
> Now that both branches of the #if do the same thing, we can unify them.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  common/board_f.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>

Reviewed-by: York Sun <york.sun@nxp.com>

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

* [U-Boot] [PATCH 09/17] board_f: powerpc: Use timer_init() instead of init_timebase()
  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
  2 siblings, 0 replies; 61+ messages in thread
From: york sun @ 2017-03-28 20:08 UTC (permalink / raw)
  To: u-boot

On 03/28/2017 09:27 AM, Simon Glass wrote:
> There is no good reason to use a different name on PowerPC. Change it to
> timer_init() like the others.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  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(-)
>

Reviewed-by: York Sun <york.sun@nxp.com>

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

* [U-Boot] [PATCH 10/17] board_f: Use timer_init() on all archs
  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
  2 siblings, 0 replies; 61+ messages in thread
From: york sun @ 2017-03-28 20:08 UTC (permalink / raw)
  To: u-boot

On 03/28/2017 09:27 AM, Simon Glass wrote:
> 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
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  common/board_f.c | 4 ----
>  1 file changed, 4 deletions(-)
>

Reviewed-by: York Sun <york.sun@nxp.com>

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

* [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls
  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
  3 siblings, 0 replies; 61+ messages in thread
From: york sun @ 2017-03-28 20:08 UTC (permalink / raw)
  To: u-boot

On 03/28/2017 09:27 AM, Simon Glass wrote:
> Combine the conditions so this appears in the init list only once.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  common/board_f.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>

Reviewed-by: York Sun <york.sun@nxp.com>

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

* [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (15 preceding siblings ...)
  2017-03-28 16:27 ` [U-Boot] [PATCH 17/17] i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS Simon Glass
@ 2017-03-29  5:01 ` Stefan Roese
  2017-04-06 16:23 ` [U-Boot] [U-Boot, " Tom Rini
  17 siblings, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:01 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> 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>

Thanks,
Stefan

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

* [U-Boot] [PATCH 03/17] board_f: x86: Rename x86_fsp_init() to arch_fsp_init()
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:09 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 04/17] board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sections
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:12 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> We have two chunks of code which depend on this CONFIG options. There is
> likely no need to keep them apart, so join them.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 05/17] board_f: powerpc: Rename get_clocks_866() to get_clocks()
  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
  2 siblings, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:12 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 06/17] board_f: Remove sdram_adjust_866() from the init sequence
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:13 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> We can just call this from the only function that needs it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 07/17] board_f: Remove adjust_sdram_tbs_8xx() from the init sequence
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:14 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> We can just call this from the only place that needs it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 08/17] board_f: powerpc: Unified get_clocks() portion of init sequence
  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
  2 siblings, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:15 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> Now that both branches of the #if do the same thing, we can unify them.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 09/17] board_f: powerpc: Use timer_init() instead of init_timebase()
  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
  2 siblings, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:16 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> There is no good reason to use a different name on PowerPC. Change it to
> timer_init() like the others.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 10/17] board_f: Use timer_init() on all archs
  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
  2 siblings, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:18 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> 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
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls
  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
  3 siblings, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:19 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> Combine the conditions so this appears in the init list only once.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:19 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> This function is called just before checkcpu() on MPX83xx. Move it to the
> code for that arch.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 13/17] board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:20 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 14/17] board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:21 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> Move these two function calls into checkcpu(), which is called on this
> arch immediately after these two.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 15/17] board_f: x86: Use checkcpu() for CPU init
  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
  1 sibling, 0 replies; 61+ messages in thread
From: Stefan Roese @ 2017-03-29  5:22 UTC (permalink / raw)
  To: u-boot

On 28.03.2017 18:27, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH 17/17] i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS
  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
  1 sibling, 1 reply; 61+ messages in thread
From: Lukasz Majewski @ 2017-03-29  8:41 UTC (permalink / raw)
  To: u-boot

Hi Simon,

+CC board maintainer: Jaehoon.

> This is not used by any board. Drop it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> 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
> 
> diff --git a/board/samsung/common/Makefile
> b/board/samsung/common/Makefile index ef1a8f318f..fa85f7dcd2 100644
> --- a/board/samsung/common/Makefile
> +++ b/board/samsung/common/Makefile
> @@ -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
>  
> diff --git a/board/samsung/common/multi_i2c.c
> b/board/samsung/common/multi_i2c.c deleted file mode 100644
> index 71c32c0b6e..0000000000
> --- a/board/samsung/common/multi_i2c.c
> +++ /dev/null
> @@ -1,59 +0,0 @@
> -/*
> - *  Copyright (C) 2012 Samsung Electronics
> - *  Lukasz Majewski <l.majewski@samsung.com>
> - *
> - * 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;
> -}
> diff --git a/include/i2c.h b/include/i2c.h
> index 4bbeecabf2..cd7f61e1c1 100644
> --- a/include/i2c.h
> +++ b/include/i2c.h
> @@ -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.
>   *
> diff --git a/scripts/config_whitelist.txt
> b/scripts/config_whitelist.txt index 668f238459..ba90758a29 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -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

Acked-by: Lukasz Majewski <lukma@denx.de>


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

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

* [U-Boot] [PATCH 17/17] i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS
  2017-03-29  8:41   ` Lukasz Majewski
@ 2017-03-30  4:40     ` Jaehoon Chung
  0 siblings, 0 replies; 61+ messages in thread
From: Jaehoon Chung @ 2017-03-30  4:40 UTC (permalink / raw)
  To: u-boot

On 03/29/2017 05:41 PM, Lukasz Majewski wrote:
> Hi Simon,
> 
> +CC board maintainer: Jaehoon.
> 
>> This is not used by any board. Drop it.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> 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
>>
>> diff --git a/board/samsung/common/Makefile
>> b/board/samsung/common/Makefile index ef1a8f318f..fa85f7dcd2 100644
>> --- a/board/samsung/common/Makefile
>> +++ b/board/samsung/common/Makefile
>> @@ -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
>>  
>> diff --git a/board/samsung/common/multi_i2c.c
>> b/board/samsung/common/multi_i2c.c deleted file mode 100644
>> index 71c32c0b6e..0000000000
>> --- a/board/samsung/common/multi_i2c.c
>> +++ /dev/null
>> @@ -1,59 +0,0 @@
>> -/*
>> - *  Copyright (C) 2012 Samsung Electronics
>> - *  Lukasz Majewski <l.majewski@samsung.com>
>> - *
>> - * 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;
>> -}
>> diff --git a/include/i2c.h b/include/i2c.h
>> index 4bbeecabf2..cd7f61e1c1 100644
>> --- a/include/i2c.h
>> +++ b/include/i2c.h
>> @@ -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.
>>   *
>> diff --git a/scripts/config_whitelist.txt
>> b/scripts/config_whitelist.txt index 668f238459..ba90758a29 100644
>> --- a/scripts/config_whitelist.txt
>> +++ b/scripts/config_whitelist.txt
>> @@ -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
> 
> Acked-by: Lukasz Majewski <lukma@denx.de>

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

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

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

* [U-Boot] [U-Boot, 01/17] board_f: sandbox: Move setup_ram_buf() to private code
  2017-03-28 16:27 [U-Boot] [PATCH 01/17] board_f: sandbox: Move setup_ram_buf() to private code Simon Glass
                   ` (16 preceding siblings ...)
  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 ` Tom Rini
  2017-04-06 16:24   ` Simon Glass
  17 siblings, 1 reply; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:23 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:16AM -0600, Simon Glass wrote:

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

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot,02/17] board_f: initcall: Add a header guard
  2017-03-28 16:27 ` [U-Boot] [PATCH 02/17] board_f: initcall: Add a header guard Simon Glass
@ 2017-04-06 16:23   ` Tom Rini
  0 siblings, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:23 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:17AM -0600, Simon Glass wrote:

> This file is missing the usual header guard. Add it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 03/17] board_f: x86: Rename x86_fsp_init() to arch_fsp_init()
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:18AM -0600, Simon Glass wrote:

> 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.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 04/17] board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sections
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:19AM -0600, Simon Glass wrote:

> We have two chunks of code which depend on this CONFIG options. There is
> likely no need to keep them apart, so join them.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 05/17] board_f: powerpc: Rename get_clocks_866() to get_clocks()
  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   ` Tom Rini
  2 siblings, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:20AM -0600, Simon Glass wrote:

> 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.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: York Sun <york.sun@nxp.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 01/17] board_f: sandbox: Move setup_ram_buf() to private code
  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
  0 siblings, 1 reply; 61+ messages in thread
From: Simon Glass @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 6 April 2017 at 10:23, Tom Rini <trini@konsulko.com> wrote:
> On Tue, Mar 28, 2017 at 10:27:16AM -0600, Simon Glass wrote:
>
>> 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>
>
> 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

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

* [U-Boot] [U-Boot, 06/17] board_f: Remove sdram_adjust_866() from the init sequence
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:21AM -0600, Simon Glass wrote:

> We can just call this from the only function that needs it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 07/17] board_f: Remove adjust_sdram_tbs_8xx() from the init sequence
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:22AM -0600, Simon Glass wrote:

> We can just call this from the only place that needs it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 08/17] board_f: powerpc: Unified get_clocks() portion of init sequence
  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   ` Tom Rini
  2 siblings, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:23AM -0600, Simon Glass wrote:

> Now that both branches of the #if do the same thing, we can unify them.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: York Sun <york.sun@nxp.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 09/17] board_f: powerpc: Use timer_init() instead of init_timebase()
  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   ` Tom Rini
  2 siblings, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:24AM -0600, Simon Glass wrote:

> There is no good reason to use a different name on PowerPC. Change it to
> timer_init() like the others.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: York Sun <york.sun@nxp.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot,10/17] board_f: Use timer_init() on all archs
  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   ` Tom Rini
  2 siblings, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:25AM -0600, Simon Glass wrote:

> 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
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: York Sun <york.sun@nxp.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 11/17] powerpc: freescale: Unify the two get_clocks() calls
  2017-03-28 16:27 ` [U-Boot] [PATCH 11/17] powerpc: freescale: Unify the two get_clocks() calls Simon Glass
                     ` (2 preceding siblings ...)
  2017-03-29  5:19   ` Stefan Roese
@ 2017-04-06 16:24   ` Tom Rini
  3 siblings, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:26AM -0600, Simon Glass wrote:

> Combine the conditions so this appears in the init list only once.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: York Sun <york.sun@nxp.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 12/17] board_f: powerpc: Move prt_83xx_rsr() to private code
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:27AM -0600, Simon Glass wrote:

> This function is called just before checkcpu() on MPX83xx. Move it to the
> code for that arch.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 13/17] board_f: sandbox: Move sandbox_early_getopt_check() into misc_init_f()
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:28AM -0600, Simon Glass wrote:

> 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.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 14/17] board_f: powerpc: Make prt_8260_rsr(), prt_8260_clks() private
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:29AM -0600, Simon Glass wrote:

> Move these two function calls into checkcpu(), which is called on this
> arch immediately after these two.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 15/17] board_f: x86: Use checkcpu() for CPU init
  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   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:30AM -0600, Simon Glass wrote:

> 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.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 16/17] i2c: Drop unused i2c_soft...() functions
  2017-03-28 16:27 ` [U-Boot] [PATCH 16/17] i2c: Drop unused i2c_soft...() functions Simon Glass
@ 2017-04-06 16:24   ` Tom Rini
  0 siblings, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:24 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:31AM -0600, Simon Glass wrote:

> These are not used in U-Boot. Manual relocation fixup is used by blackfin
> but that is being removed.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot,17/17] i2c: Drop CONFIG_SOFT_I2C_MULTI_BUS
  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-04-06 16:25   ` Tom Rini
  1 sibling, 0 replies; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:25 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 28, 2017 at 10:27:32AM -0600, Simon Glass wrote:

> This is not used by any board. Drop it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> 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
> Acked-by: Lukasz Majewski <lukma@denx.de>
> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

Applied to u-boot/master, thanks!

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

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

* [U-Boot] [U-Boot, 01/17] board_f: sandbox: Move setup_ram_buf() to private code
  2017-04-06 16:24   ` Simon Glass
@ 2017-04-06 16:27     ` Tom Rini
  2017-04-06 16:43       ` Simon Glass
  0 siblings, 1 reply; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:27 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 06, 2017 at 10:24:09AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 6 April 2017 at 10:23, Tom Rini <trini@konsulko.com> wrote:
> > On Tue, Mar 28, 2017 at 10:27:16AM -0600, Simon Glass wrote:
> >
> >> 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>
> >
> > 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.

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

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

* [U-Boot] [U-Boot, 01/17] board_f: sandbox: Move setup_ram_buf() to private code
  2017-04-06 16:27     ` Tom Rini
@ 2017-04-06 16:43       ` Simon Glass
  2017-04-06 16:47         ` Tom Rini
  0 siblings, 1 reply; 61+ messages in thread
From: Simon Glass @ 2017-04-06 16:43 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 6 April 2017 at 10:27, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Apr 06, 2017 at 10:24:09AM -0600, Simon Glass wrote:
>> Hi Tom,
>>
>> On 6 April 2017 at 10:23, Tom Rini <trini@konsulko.com> wrote:
>> > On Tue, Mar 28, 2017 at 10:27:16AM -0600, Simon Glass wrote:
>> >
>> >> 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>
>> >
>> > 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.

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

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

* [U-Boot] [U-Boot, 01/17] board_f: sandbox: Move setup_ram_buf() to private code
  2017-04-06 16:43       ` Simon Glass
@ 2017-04-06 16:47         ` Tom Rini
  2017-04-06 16:50           ` Simon Glass
  0 siblings, 1 reply; 61+ messages in thread
From: Tom Rini @ 2017-04-06 16:47 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 06, 2017 at 10:43:38AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 6 April 2017 at 10:27, Tom Rini <trini@konsulko.com> wrote:
> > On Thu, Apr 06, 2017 at 10:24:09AM -0600, Simon Glass wrote:
> >> Hi Tom,
> >>
> >> On 6 April 2017 at 10:23, Tom Rini <trini@konsulko.com> wrote:
> >> > On Tue, Mar 28, 2017 at 10:27:16AM -0600, Simon Glass wrote:
> >> >
> >> >> 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>
> >> >
> >> > 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.
> 
> 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!

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

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

* [U-Boot] [U-Boot, 01/17] board_f: sandbox: Move setup_ram_buf() to private code
  2017-04-06 16:47         ` Tom Rini
@ 2017-04-06 16:50           ` Simon Glass
  0 siblings, 0 replies; 61+ messages in thread
From: Simon Glass @ 2017-04-06 16:50 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 6 April 2017 at 10:47, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Apr 06, 2017 at 10:43:38AM -0600, Simon Glass wrote:
>> Hi Tom,
>>
>> On 6 April 2017 at 10:27, Tom Rini <trini@konsulko.com> wrote:
>> > On Thu, Apr 06, 2017 at 10:24:09AM -0600, Simon Glass wrote:
>> >> Hi Tom,
>> >>
>> >> On 6 April 2017 at 10:23, Tom Rini <trini@konsulko.com> wrote:
>> >> > On Tue, Mar 28, 2017 at 10:27:16AM -0600, Simon Glass wrote:
>> >> >
>> >> >> 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>
>> >> >
>> >> > 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.
>>
>> 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!

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

^ permalink raw reply	[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.