diff mbox

[U-Boot,03/17] board_f: x86: Rename x86_fsp_init() to arch_fsp_init()

Message ID 20170328162733.20905-3-sjg@chromium.org
State Accepted
Commit 671549e5b0f51ad015746f0dcbe05332dfe370b1
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass March 28, 2017, 4:27 p.m. UTC
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(-)

Comments

Stefan Roese March 29, 2017, 5:09 a.m. UTC | #1
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
Tom Rini April 6, 2017, 4:24 p.m. UTC | #2
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!
diff mbox

Patch

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