Declare stack_top as u32 in struct shared_data and struct common_buf
so that we can avoid casting in fsp_init().

Signed-off-by: Bin Meng <bmeng...@gmail.com>
---

 arch/x86/include/asm/fsp/fsp_api.h     | 2 +-
 arch/x86/include/asm/fsp/fsp_support.h | 2 +-
 arch/x86/lib/fsp/fsp_support.c         | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/fsp/fsp_api.h 
b/arch/x86/include/asm/fsp/fsp_api.h
index 2d34d13..db83e35 100644
--- a/arch/x86/include/asm/fsp/fsp_api.h
+++ b/arch/x86/include/asm/fsp/fsp_api.h
@@ -30,7 +30,7 @@ struct common_buf {
         * Stack top pointer used by the bootloader. The new stack frame will be
         * set up at this location after FspInit API call.
         */
-       u32     *stack_top;
+       u32     stack_top;
        u32     boot_mode;      /* Current system boot mode */
        void    *upd_data;      /* User platform configuraiton data region */
        u32     reserved[7];    /* Reserved */
diff --git a/arch/x86/include/asm/fsp/fsp_support.h 
b/arch/x86/include/asm/fsp/fsp_support.h
index f30d7b4..685778e 100644
--- a/arch/x86/include/asm/fsp/fsp_support.h
+++ b/arch/x86/include/asm/fsp/fsp_support.h
@@ -20,7 +20,7 @@
 
 struct shared_data {
        struct fsp_header       *fsp_hdr;
-       u32                     *stack_top;
+       u32                     stack_top;
        struct upd_region       fsp_upd;
 };
 
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index 0408b5d..df62ba8 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -122,7 +122,7 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
        memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
 
        /* Reserve a gap in stack top */
-       rt_buf.common.stack_top = (u32 *)stack_top - 32;
+       rt_buf.common.stack_top = stack_top - 32;
        rt_buf.common.boot_mode = boot_mode;
        rt_buf.common.upd_data = fsp_upd;
 
@@ -152,7 +152,7 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
        params_ptr = &params;
 
        shared_data.fsp_hdr = fsp_hdr;
-       shared_data.stack_top = (u32 *)stack_top;
+       shared_data.stack_top = stack_top;
 
        post_code(POST_PRE_MRC);
 
-- 
1.8.2.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to