diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-05-05 13:20:56 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-06-06 13:30:52 +0200 |
commit | 6025efa3472f38d719d850d2143dae0b215db0f3 (patch) | |
tree | f324d7b97a5c3fe488d2d3d67ad8cc1296b9128e /src/mainboard/asus/f2a85-m | |
parent | 83cc3b0ed5f522e8ab23b9a9cab8f89bbb65c9c3 (diff) |
AGESA: Use common GetBiosCallout()
Change-Id: I9c8f7cc98c65102486e17ec49fa2246211dffc4f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5688
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/mainboard/asus/f2a85-m')
-rw-r--r-- | src/mainboard/asus/f2a85-m/BiosCallOuts.c | 24 | ||||
-rw-r--r-- | src/mainboard/asus/f2a85-m/BiosCallOuts.h | 2 | ||||
-rw-r--r-- | src/mainboard/asus/f2a85-m/agesawrapper.h | 5 |
3 files changed, 3 insertions, 28 deletions
diff --git a/src/mainboard/asus/f2a85-m/BiosCallOuts.c b/src/mainboard/asus/f2a85-m/BiosCallOuts.c index 6bcc18057b..68da196bd0 100644 --- a/src/mainboard/asus/f2a85-m/BiosCallOuts.c +++ b/src/mainboard/asus/f2a85-m/BiosCallOuts.c @@ -23,8 +23,9 @@ #include <cbfs.h> #include <vendorcode/amd/agesa/f15tn/Proc/Fch/FchPlatform.h> +#include <stdlib.h> -STATIC CONST BIOS_CALLOUT_STRUCT BiosCallouts[] = +const BIOS_CALLOUT_STRUCT BiosCallouts[] = { {AGESA_ALLOCATE_BUFFER, fam15tn_AllocateBuffer }, {AGESA_DEALLOCATE_BUFFER, fam15tn_DeallocateBuffer }, @@ -39,26 +40,7 @@ STATIC CONST BIOS_CALLOUT_STRUCT BiosCallouts[] = {AGESA_FCH_OEM_CALLOUT, Fch_Oem_config }, {AGESA_GNB_GFX_GET_VBIOS_IMAGE, agesa_GfxGetVbiosImage } }; - -AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) -{ - UINTN i; - AGESA_STATUS CalloutStatus; - UINTN CallOutCount = sizeof (BiosCallouts) / sizeof (BiosCallouts [0]); - - for (i = 0; i < CallOutCount; i++) - { - if (BiosCallouts[i].CalloutName == Func) - break; - } - - if(i >= CallOutCount) - return AGESA_UNSUPPORTED; - - CalloutStatus = BiosCallouts[i].CalloutPtr (Func, Data, ConfigPtr); - - return CalloutStatus; -} +const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts); /** * ASUS F2A85-M board ALC887-VD Verb Table diff --git a/src/mainboard/asus/f2a85-m/BiosCallOuts.h b/src/mainboard/asus/f2a85-m/BiosCallOuts.h index 7ccb07ad16..54d15cc983 100644 --- a/src/mainboard/asus/f2a85-m/BiosCallOuts.h +++ b/src/mainboard/asus/f2a85-m/BiosCallOuts.h @@ -23,8 +23,6 @@ #include <northbridge/amd/agesa/def_callouts.h> #include <northbridge/amd/agesa/family15tn/fam15tn_callouts.h> -/* CALLOUT Initialization */ -AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr); /* FCH OEM Config*/ AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr); diff --git a/src/mainboard/asus/f2a85-m/agesawrapper.h b/src/mainboard/asus/f2a85-m/agesawrapper.h index 71f0ff63bb..4ae226d3cd 100644 --- a/src/mainboard/asus/f2a85-m/agesawrapper.h +++ b/src/mainboard/asus/f2a85-m/agesawrapper.h @@ -53,11 +53,6 @@ enum { *---------------------------------------------------------------------------------------- */ -typedef struct { - UINT32 CalloutName; - AGESA_STATUS (*CalloutPtr) (UINT32 Func, UINT32 Data, VOID* ConfigPtr); -} BIOS_CALLOUT_STRUCT; - /*---------------------------------------------------------------------------------------- * P R O T O T Y P E S O F L O C A L F U N C T I O N S *---------------------------------------------------------------------------------------- |