From 6025efa3472f38d719d850d2143dae0b215db0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 5 May 2014 13:20:56 +0300 Subject: AGESA: Use common GetBiosCallout() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9c8f7cc98c65102486e17ec49fa2246211dffc4f Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/5688 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Patrick Georgi --- src/mainboard/asus/f2a85-m/BiosCallOuts.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'src/mainboard/asus/f2a85-m/BiosCallOuts.c') 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 #include +#include -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 -- cgit v1.2.3