All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/9] x86: fsp: Rename update_fsp_upd() and change its signature
Date: Thu, 10 Dec 2015 22:03:00 -0800	[thread overview]
Message-ID: <1449813784-23365-6-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1449813784-23365-1-git-send-email-bmeng.cn@gmail.com>

To support platform-specific configurations (might not always be
UPD on some platform), use a better name update_fsp_configs() and
accepct struct fsp_config_data as its parameter so that platform
codes can handle whatever configuration data for that FSP.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/x86/cpu/baytrail/fsp_configs.c    |  5 +++--
 arch/x86/cpu/queensbay/fsp_configs.c   |  2 +-
 arch/x86/include/asm/fsp/fsp_support.h |  6 +++---
 arch/x86/lib/fsp/fsp_support.c         | 12 ++++++------
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/x86/cpu/baytrail/fsp_configs.c b/arch/x86/cpu/baytrail/fsp_configs.c
index a72d615..9810921 100644
--- a/arch/x86/cpu/baytrail/fsp_configs.c
+++ b/arch/x86/cpu/baytrail/fsp_configs.c
@@ -121,12 +121,13 @@ const struct pch_azalia_config azalia_config = {
 };
 
 /**
- * Override the FSP's UPD.
+ * Override the FSP's configuration data.
  * If the device tree does not specify an integer setting, use the default
  * provided in Intel's Baytrail_FSP_Gold4.tgz release FSP/BayleyBayFsp.bsf file.
  */
-void update_fsp_upd(struct upd_region *fsp_upd)
+void update_fsp_configs(struct fsp_config_data *config)
 {
+	struct upd_region *fsp_upd = &config->fsp_upd;
 	struct memory_down_data *mem;
 	const void *blob = gd->fdt_blob;
 	int node;
diff --git a/arch/x86/cpu/queensbay/fsp_configs.c b/arch/x86/cpu/queensbay/fsp_configs.c
index 78bc966..f84ae30 100644
--- a/arch/x86/cpu/queensbay/fsp_configs.c
+++ b/arch/x86/cpu/queensbay/fsp_configs.c
@@ -8,7 +8,7 @@
 #include <common.h>
 #include <asm/fsp/fsp_support.h>
 
-void update_fsp_upd(struct upd_region *fsp_upd)
+void update_fsp_configs(struct fsp_config_data *config)
 {
 	/* Override any UPD setting if required */
 
diff --git a/arch/x86/include/asm/fsp/fsp_support.h b/arch/x86/include/asm/fsp/fsp_support.h
index 39b2864..67741cc 100644
--- a/arch/x86/include/asm/fsp/fsp_support.h
+++ b/arch/x86/include/asm/fsp/fsp_support.h
@@ -192,13 +192,13 @@ void *fsp_get_nvs_data(const void *hob_list, u32 *len);
 void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
 
 /**
- * This function overrides the default configurations in the UPD data region.
+ * This function overrides the default configurations of FSP.
  *
- * @fsp_upd: A pointer to the upd_region data strcture
+ * @config:  A pointer to the FSP configuration data structure
  *
  * @return:  None
  */
-void update_fsp_upd(struct upd_region *fsp_upd);
+void update_fsp_configs(struct fsp_config_data *config);
 
 /**
  * fsp_init_phase_pci() - Tell the FSP that we have completed PCI init
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index 60e61c4..9257745 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -118,6 +118,10 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
 		panic("Invalid FSP header");
 	}
 
+	config_data.common.fsp_hdr = fsp_hdr;
+	config_data.common.stack_top = stack_top;
+	config_data.common.boot_mode = boot_mode;
+
 	fsp_upd = &config_data.fsp_upd;
 	memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
 
@@ -140,8 +144,8 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
 	/* Verify the UPD data region is valid */
 	assert(fsp_upd->terminator == UPD_TERMINATOR);
 
-	/* Override any UPD setting if required */
-	update_fsp_upd(fsp_upd);
+	/* Override any configuration if required */
+	update_fsp_configs(&config_data);
 
 	memset(&params, 0, sizeof(struct fsp_init_params));
 	params.nvs_buf = nvs_buf;
@@ -151,10 +155,6 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
 	init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init);
 	params_ptr = &params;
 
-	config_data.common.fsp_hdr = fsp_hdr;
-	config_data.common.stack_top = stack_top;
-	config_data.common.boot_mode = boot_mode;
-
 	post_code(POST_PRE_MRC);
 
 	/* Load GDT for FSP */
-- 
1.8.2.1

  parent reply	other threads:[~2015-12-11  6:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11  6:02 [U-Boot] [PATCH v2 0/9] x86: fsp: Move platform-specific config to chipset directory Bin Meng
2015-12-11  6:02 ` [U-Boot] [PATCH v2 1/9] x86: fsp: Simplify fsp_continue() Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:02 ` [U-Boot] [PATCH v2 2/9] x86: fsp: Avoid cast stack_top in struct shared_data Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:02 ` [U-Boot] [PATCH v2 3/9] x86: fsp: Add boot_mode as a member of " Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:02 ` [U-Boot] [PATCH v2 4/9] x86: fsp: Rename shared_data to fsp_config_data Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:03 ` Bin Meng [this message]
2015-12-19  2:51   ` [U-Boot] [PATCH v2 5/9] x86: fsp: Rename update_fsp_upd() and change its signature Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:03 ` [U-Boot] [PATCH v2 6/9] x86: fsp: Introduce CONFIG_FSP_USE_UPD Kconfig option Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:03 ` [U-Boot] [PATCH v2 7/9] x86: queensbay: Remove invalid comments in update_fsp_configs() Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:03 ` [U-Boot] [PATCH v2 8/9] x86: fsp: Move struct fspinit_rtbuf definition to chipset header Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng
2015-12-11  6:03 ` [U-Boot] [PATCH v2 9/9] x86: fsp: Set up init runtime buffer in update_fsp_configs() Bin Meng
2015-12-19  2:51   ` Simon Glass
2015-12-21  7:44     ` Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449813784-23365-6-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.