diff mbox

[U-Boot,v3] x86: Drop FSP error defines and use EFI instead

Message ID 1439429587-30896-1-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Aug. 13, 2015, 1:33 a.m. UTC
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>
---

Changes in v3:
- Drop #include of efi.h since it is not needed

Changes in v2:
- Drop checking against EFI_STATUS since this reduces code readability

 arch/x86/include/asm/fsp/fsp_types.h | 11 -----------
 arch/x86/lib/fsp/fsp_common.c        |  2 +-
 2 files changed, 1 insertion(+), 12 deletions(-)

Comments

Bin Meng Aug. 13, 2015, 1:54 a.m. UTC | #1
On Thu, Aug 13, 2015 at 9:33 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>
> ---
>
> Changes in v3:
> - Drop #include of efi.h since it is not needed
>
> Changes in v2:
> - Drop checking against EFI_STATUS since this reduces code readability
>
>  arch/x86/include/asm/fsp/fsp_types.h | 11 -----------
>  arch/x86/lib/fsp/fsp_common.c        |  2 +-
>  2 files changed, 1 insertion(+), 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..d564cb9 100644
> --- a/arch/x86/lib/fsp/fsp_common.c
> +++ b/arch/x86/lib/fsp/fsp_common.c
> @@ -46,7 +46,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)
>                 debug("fail, error code %x\n", status);
>         else
>                 debug("OK\n");
> --

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass Aug. 14, 2015, 4:49 p.m. UTC | #2
On 12 August 2015 at 19:54, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Thu, Aug 13, 2015 at 9:33 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>
>> ---
>>
>> Changes in v3:
>> - Drop #include of efi.h since it is not needed
>>
>> Changes in v2:
>> - Drop checking against EFI_STATUS since this reduces code readability
>>
>>  arch/x86/include/asm/fsp/fsp_types.h | 11 -----------
>>  arch/x86/lib/fsp/fsp_common.c        |  2 +-
>>  2 files changed, 1 insertion(+), 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..d564cb9 100644
>> --- a/arch/x86/lib/fsp/fsp_common.c
>> +++ b/arch/x86/lib/fsp/fsp_common.c
>> @@ -46,7 +46,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)
>>                 debug("fail, error code %x\n", status);
>>         else
>>                 debug("OK\n");
>> --
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-x86.
diff mbox

Patch

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..d564cb9 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -46,7 +46,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)
 		debug("fail, error code %x\n", status);
 	else
 		debug("OK\n");