diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-01-06 14:04:36 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-13 07:25:02 -0800 |
commit | b2439aecd3091e754d3dc3f8be422fee74180295 (patch) | |
tree | ab18ede5630a831ee8561bee593b6b46e7f69cb0 /arch/x86/cpu/queensbay | |
parent | cb3b2e62caa7b87ed727d690c5a8bd1e003ab601 (diff) | |
download | u-boot-imx-b2439aecd3091e754d3dc3f8be422fee74180295.zip u-boot-imx-b2439aecd3091e754d3dc3f8be422fee74180295.tar.gz u-boot-imx-b2439aecd3091e754d3dc3f8be422fee74180295.tar.bz2 |
x86: fsp: Drop get_hob_type() and get_hob_length()
These two are not worth having separate inline functions as they are
really simple, so drop them.
Also changed 'type' parameter of fsp_get_next_hob() from u16 to uint.
Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/queensbay')
-rw-r--r-- | arch/x86/cpu/queensbay/fsp_support.c | 10 | ||||
-rw-r--r-- | arch/x86/cpu/queensbay/tnc_dram.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/cpu/queensbay/fsp_support.c b/arch/x86/cpu/queensbay/fsp_support.c index 4764e3c..aed3e2b 100644 --- a/arch/x86/cpu/queensbay/fsp_support.c +++ b/arch/x86/cpu/queensbay/fsp_support.c @@ -242,7 +242,7 @@ u32 fsp_get_usable_lowmem_top(const void *hob_list) /* * Collect memory ranges */ top = FSP_LOWMEM_BASE; while (!end_of_hob(hdr)) { - if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) { + if (hdr->type == HOB_TYPE_RES_DESC) { res_desc = (struct hob_res_desc *)hdr; if (res_desc->type == RES_SYS_MEM) { phys_start = res_desc->phys_start; @@ -271,7 +271,7 @@ u64 fsp_get_usable_highmem_top(const void *hob_list) /* Collect memory ranges */ top = FSP_HIGHMEM_BASE; while (!end_of_hob(hdr)) { - if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) { + if (hdr->type == HOB_TYPE_RES_DESC) { res_desc = (struct hob_res_desc *)hdr; if (res_desc->type == RES_SYS_MEM) { phys_start = res_desc->phys_start; @@ -297,7 +297,7 @@ u64 fsp_get_reserved_mem_from_guid(const void *hob_list, u64 *len, /* Collect memory ranges */ while (!end_of_hob(hdr)) { - if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) { + if (hdr->type == HOB_TYPE_RES_DESC) { res_desc = (struct hob_res_desc *)hdr; if (res_desc->type == RES_MEM_RESERVED) { if (compare_guid(&res_desc->owner, guid)) { @@ -342,7 +342,7 @@ u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len) return base; } -const struct hob_header *fsp_get_next_hob(u16 type, const void *hob_list) +const struct hob_header *fsp_get_next_hob(uint type, const void *hob_list) { const struct hob_header *hdr; @@ -350,7 +350,7 @@ const struct hob_header *fsp_get_next_hob(u16 type, const void *hob_list) /* Parse the HOB list until end of list or matching type is found */ while (!end_of_hob(hdr)) { - if (get_hob_type(hdr) == type) + if (hdr->type == type) return hdr; hdr = get_next_hob(hdr); diff --git a/arch/x86/cpu/queensbay/tnc_dram.c b/arch/x86/cpu/queensbay/tnc_dram.c index b669dbc..df79a39 100644 --- a/arch/x86/cpu/queensbay/tnc_dram.c +++ b/arch/x86/cpu/queensbay/tnc_dram.c @@ -19,7 +19,7 @@ int dram_init(void) hdr = gd->arch.hob_list; while (!end_of_hob(hdr)) { - if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) { + if (hdr->type == HOB_TYPE_RES_DESC) { res_desc = (struct hob_res_desc *)hdr; if (res_desc->type == RES_SYS_MEM || res_desc->type == RES_MEM_RESERVED) { @@ -63,7 +63,7 @@ unsigned install_e820_map(unsigned max_entries, struct e820entry *entries) hdr = gd->arch.hob_list; while (!end_of_hob(hdr)) { - if (get_hob_type(hdr) == HOB_TYPE_RES_DESC) { + if (hdr->type == HOB_TYPE_RES_DESC) { res_desc = (struct hob_res_desc *)hdr; entries[num_entries].addr = res_desc->phys_start; entries[num_entries].size = res_desc->len; |