From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 28 Mar 2017 10:27:19 -0600 Subject: [U-Boot] [PATCH 04/17] board_f: powerpc: Join the two CONFIG_8xx_CPUCLK_DEFAULT sections In-Reply-To: <20170328162733.20905-1-sjg@chromium.org> References: <20170328162733.20905-1-sjg@chromium.org> Message-ID: <20170328162733.20905-4-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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