]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Adjust the FSP types slightly
authorSimon Glass <sjg@chromium.org>
Wed, 28 Jan 2015 05:13:37 +0000 (22:13 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 10:59:07 +0000 (12:59 +0200)
To avoid casts, find_fsp_header() should return a pointer. Add asmlinkage
to two API functions which use that convention. UPD_TERMINATOR is common
so move it into a common file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h
arch/x86/include/asm/fsp/fsp_api.h
arch/x86/include/asm/fsp/fsp_support.h
arch/x86/lib/fsp/fsp_support.c

index bce58b1e697c435c7c646e7409953bc38f40e312..3c57558d21410db24b36b86c4865691023bd17a8 100644 (file)
@@ -10,8 +10,6 @@
 #ifndef __VPDHEADER_H__
 #define __VPDHEADER_H__
 
-#define UPD_TERMINATOR 0x55AA
-
 struct __packed upd_region {
        u64     sign;                   /* Offset 0x0000 */
        u64     reserved;               /* Offset 0x0008 */
index a9d7156109236eb79f13cf3599c0c1d4d9046263..2d34d138abdd8c60f832aa04a173b595947649c1 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef __FSP_API_H__
 #define __FSP_API_H__
 
+#include <linux/linkage.h>
+
 /*
  * FspInit continuation function prototype.
  * Control will be returned to this callback function after FspInit API call.
@@ -47,9 +49,9 @@ struct fsp_notify_params {
 };
 
 /* FspInit API function prototype */
-typedef u32 (*fsp_init_f)(struct fsp_init_params *params);
+typedef asmlinkage u32 (*fsp_init_f)(struct fsp_init_params *params);
 
 /* FspNotify API function prototype */
-typedef u32 (*fsp_notify_f)(struct fsp_notify_params *params);
+typedef asmlinkage u32 (*fsp_notify_f)(struct fsp_notify_params *params);
 
 #endif
index 6329cfea66075429cd4332e074fedfedcc6c7074..c6c7dc0f83b5f4a86b363c8c0fef86c2036cad6f 100644 (file)
@@ -26,6 +26,8 @@ struct shared_data {
 
 #define FSP_LOWMEM_BASE                0x100000UL
 #define FSP_HIGHMEM_BASE       0x100000000ULL
+#define UPD_TERMINATOR         0x55AA
+
 
 /**
  * FSP Continuation assembly helper routine
@@ -61,7 +63,7 @@ void fsp_continue(struct shared_data *shared_data, u32 status,
  *
  * @retval: the offset of FSP header. If signature is invalid, returns 0.
  */
-u32 find_fsp_header(void);
+struct fsp_header *find_fsp_header(void);
 
 /**
  * FSP initialization wrapper function.
index f6ae85a8bad4dda28d8947951f674b1c7eb55e02..bf3780711f836fe2db4282304b9e479e62cedae6 100644 (file)
@@ -30,7 +30,7 @@ static bool compare_guid(const struct efi_guid *guid1,
                return false;
 }
 
-u32 __attribute__((optimize("O0"))) find_fsp_header(void)
+struct fsp_header *__attribute__((optimize("O0"))) find_fsp_header(void)
 {
        /*
         * This function may be called before the a stack is established,
@@ -84,7 +84,7 @@ u32 __attribute__((optimize("O0"))) find_fsp_header(void)
                fsp = 0;
        }
 
-       return (u32)fsp;
+       return (struct fsp_header *)fsp;
 }
 
 void fsp_continue(struct shared_data *shared_data, u32 status, void *hob_list)