summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-01-06 14:04:36 +0800
committerSimon Glass <sjg@chromium.org>2015-01-13 07:25:02 -0800
commitb2439aecd3091e754d3dc3f8be422fee74180295 (patch)
treeab18ede5630a831ee8561bee593b6b46e7f69cb0 /arch/x86/include
parentcb3b2e62caa7b87ed727d690c5a8bd1e003ab601 (diff)
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/include')
-rw-r--r--arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h36
-rw-r--r--arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h2
2 files changed, 4 insertions, 34 deletions
diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h b/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
index 51103617b09..6cca7f56541 100644
--- a/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
+++ b/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
@@ -183,36 +183,6 @@ struct hob_guid {
};
/**
- * get_hob_type() - return the type of a HOB
- *
- * This macro returns the type field from the HOB header for the
- * HOB specified by hob.
- *
- * @hob: A pointer to a HOB.
- *
- * @return: HOB type.
- */
-static inline u16 get_hob_type(const struct hob_header *hdr)
-{
- return hdr->type;
-}
-
-/**
- * get_hob_length() - return the length, in bytes, of a HOB
- *
- * This macro returns the len field from the HOB header for the
- * HOB specified by hob.
- *
- * @hob: A pointer to a HOB.
- *
- * @return: HOB length.
- */
-static inline u16 get_hob_length(const struct hob_header *hdr)
-{
- return hdr->len;
-}
-
-/**
* get_next_hob() - return a pointer to the next HOB in the HOB list
*
* This macro returns a pointer to HOB that follows the HOB specified by hob
@@ -224,7 +194,7 @@ static inline u16 get_hob_length(const struct hob_header *hdr)
*/
static inline const struct hob_header *get_next_hob(const struct hob_header *hdr)
{
- return (const struct hob_header *)((u32)hdr + get_hob_length(hdr));
+ return (const struct hob_header *)((u32)hdr + hdr->len);
}
/**
@@ -241,7 +211,7 @@ static inline const struct hob_header *get_next_hob(const struct hob_header *hdr
*/
static inline bool end_of_hob(const struct hob_header *hdr)
{
- return get_hob_type(hdr) == HOB_TYPE_EOH;
+ return hdr->type == HOB_TYPE_EOH;
}
/**
@@ -273,7 +243,7 @@ static inline void *get_guid_hob_data(const struct hob_header *hdr)
*/
static inline u16 get_guid_hob_data_size(const struct hob_header *hdr)
{
- return get_hob_length(hdr) - sizeof(struct hob_guid);
+ return hdr->len - sizeof(struct hob_guid);
}
/* FSP specific GUID HOB definitions */
diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h b/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
index 2a3e987ebb0..ebdbd034350 100644
--- a/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
+++ b/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
@@ -145,7 +145,7 @@ u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len);
*
* @retval: A HOB object with matching type; Otherwise NULL.
*/
-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);
/**
* Returns the next instance of the matched GUID HOB from the starting HOB.