* [U-Boot] [PATCH] x86: Drop FSP error defines and use EFI instead
@ 2015-08-11 17:57 Simon Glass
2015-08-12 0:59 ` Bin Meng
0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2015-08-11 17:57 UTC (permalink / raw)
To: u-boot
Now that we have an efi.h header we can use that for FSP error defines.
Drop the FSP ones.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/x86/include/asm/fsp/fsp_types.h | 11 -----------
arch/x86/lib/fsp/fsp_common.c | 3 ++-
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/arch/x86/include/asm/fsp/fsp_types.h b/arch/x86/include/asm/fsp/fsp_types.h
index f32d827..4fe69f2 100644
--- a/arch/x86/include/asm/fsp/fsp_types.h
+++ b/arch/x86/include/asm/fsp/fsp_types.h
@@ -68,15 +68,4 @@ struct efi_guid {
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
(SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
-/*
- * Define FSP API return status code.
- * Compatiable with EFI_STATUS defined in PI Spec.
- */
-#define FSP_SUCCESS 0
-#define FSP_INVALID_PARAM 0x80000002
-#define FSP_UNSUPPORTED 0x80000003
-#define FSP_DEVICE_ERROR 0x80000007
-#define FSP_NOT_FOUND 0x8000000E
-#define FSP_ALREADY_STARTED 0x80000014
-
#endif
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 6f72c6d..1893c58 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <efi.h>
#include <errno.h>
#include <asm/io.h>
#include <asm/post.h>
@@ -46,7 +47,7 @@ void board_final_cleanup(void)
/* call into FspNotify */
debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
status = fsp_notify(NULL, INIT_PHASE_BOOT);
- if (status != FSP_SUCCESS)
+ if (status != EFI_SUCCESS)
debug("fail, error code %x\n", status);
else
debug("OK\n");
--
2.5.0.rc2.392.g76e840b
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] x86: Drop FSP error defines and use EFI instead
2015-08-11 17:57 [U-Boot] [PATCH] x86: Drop FSP error defines and use EFI instead Simon Glass
@ 2015-08-12 0:59 ` Bin Meng
0 siblings, 0 replies; 2+ messages in thread
From: Bin Meng @ 2015-08-12 0:59 UTC (permalink / raw)
To: u-boot
Hi Simon,
On Wed, Aug 12, 2015 at 1:57 AM, Simon Glass <sjg@chromium.org> wrote:
> Now that we have an efi.h header we can use that for FSP error defines.
> Drop the FSP ones.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> arch/x86/include/asm/fsp/fsp_types.h | 11 -----------
> arch/x86/lib/fsp/fsp_common.c | 3 ++-
> 2 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/arch/x86/include/asm/fsp/fsp_types.h b/arch/x86/include/asm/fsp/fsp_types.h
> index f32d827..4fe69f2 100644
> --- a/arch/x86/include/asm/fsp/fsp_types.h
> +++ b/arch/x86/include/asm/fsp/fsp_types.h
> @@ -68,15 +68,4 @@ struct efi_guid {
> #define SIGNATURE_64(A, B, C, D, E, F, G, H) \
> (SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
>
> -/*
> - * Define FSP API return status code.
> - * Compatiable with EFI_STATUS defined in PI Spec.
> - */
> -#define FSP_SUCCESS 0
> -#define FSP_INVALID_PARAM 0x80000002
> -#define FSP_UNSUPPORTED 0x80000003
> -#define FSP_DEVICE_ERROR 0x80000007
> -#define FSP_NOT_FOUND 0x8000000E
> -#define FSP_ALREADY_STARTED 0x80000014
> -
> #endif
> diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
> index 6f72c6d..1893c58 100644
> --- a/arch/x86/lib/fsp/fsp_common.c
> +++ b/arch/x86/lib/fsp/fsp_common.c
> @@ -5,6 +5,7 @@
> */
>
> #include <common.h>
> +#include <efi.h>
We can drop this include, and (see below)
> #include <errno.h>
> #include <asm/io.h>
> #include <asm/post.h>
> @@ -46,7 +47,7 @@ void board_final_cleanup(void)
> /* call into FspNotify */
> debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
> status = fsp_notify(NULL, INIT_PHASE_BOOT);
> - if (status != FSP_SUCCESS)
> + if (status != EFI_SUCCESS)
just do: if (status) here, like we did in fsp_init_phase_pci()
> debug("fail, error code %x\n", status);
> else
> debug("OK\n");
> --
Regards,
Bin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-12 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11 17:57 [U-Boot] [PATCH] x86: Drop FSP error defines and use EFI instead Simon Glass
2015-08-12 0:59 ` Bin Meng
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.