diff options
Diffstat (limited to 'src/mainboard/supermicro')
-rw-r--r-- | src/mainboard/supermicro/h8qgi/BiosCallOuts.c | 25 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8qgi/BiosCallOuts.h | 2 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8qgi/agesawrapper.h | 5 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8scm/BiosCallOuts.c | 25 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8scm/BiosCallOuts.h | 2 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8scm/agesawrapper.h | 5 |
6 files changed, 6 insertions, 58 deletions
diff --git a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c index 894ee531c1..6604fbace1 100644 --- a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c +++ b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c @@ -73,7 +73,8 @@ static void restore_socket(UINT8 original_value) static AGESA_STATUS board_ReadSpd (UINT32 Func,UINT32 Data,VOID *ConfigPtr); -STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] = +#include <stdlib.h> +const BIOS_CALLOUT_STRUCT BiosCallouts[] = { {AGESA_ALLOCATE_BUFFER, BiosAllocateBuffer }, {AGESA_DEALLOCATE_BUFFER, BiosDeallocateBuffer }, @@ -87,27 +88,7 @@ STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] = {AGESA_HOOKBEFORE_DRAM_INIT, agesa_NoopSuccess }, {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess }, }; - -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); static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) { diff --git a/src/mainboard/supermicro/h8qgi/BiosCallOuts.h b/src/mainboard/supermicro/h8qgi/BiosCallOuts.h index f733c3f727..c53a687506 100644 --- a/src/mainboard/supermicro/h8qgi/BiosCallOuts.h +++ b/src/mainboard/supermicro/h8qgi/BiosCallOuts.h @@ -23,8 +23,6 @@ #include <northbridge/amd/agesa/def_callouts.h> #include <northbridge/amd/agesa/family15/fam15_callouts.h> -/* CALLOUT Initialization */ -AGESA_STATUS GetBiosCallout(UINT32 Func, UINT32 Data, VOID *ConfigPtr); #define SB_GPIO_REG02 2 #define SB_GPIO_REG09 9 diff --git a/src/mainboard/supermicro/h8qgi/agesawrapper.h b/src/mainboard/supermicro/h8qgi/agesawrapper.h index 7abf826a39..4f5a6934b0 100644 --- a/src/mainboard/supermicro/h8qgi/agesawrapper.h +++ b/src/mainboard/supermicro/h8qgi/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 *---------------------------------------------------------------------------------------- diff --git a/src/mainboard/supermicro/h8scm/BiosCallOuts.c b/src/mainboard/supermicro/h8scm/BiosCallOuts.c index 4cef34d9fc..4f90579b53 100644 --- a/src/mainboard/supermicro/h8scm/BiosCallOuts.c +++ b/src/mainboard/supermicro/h8scm/BiosCallOuts.c @@ -24,10 +24,11 @@ #include "OptionsIds.h" #include "heapManager.h" #include <northbridge/amd/agesa/family15/dimmSpd.h> +#include <stdlib.h> static AGESA_STATUS board_ReadSpd (UINT32 Func,UINT32 Data, VOID *ConfigPtr); -STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] = +const BIOS_CALLOUT_STRUCT BiosCallouts[] = { {AGESA_ALLOCATE_BUFFER, BiosAllocateBuffer }, {AGESA_DEALLOCATE_BUFFER, BiosDeallocateBuffer }, @@ -41,27 +42,7 @@ STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] = {AGESA_HOOKBEFORE_DRAM_INIT, agesa_NoopSuccess }, {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess }, }; - -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); diff --git a/src/mainboard/supermicro/h8scm/BiosCallOuts.h b/src/mainboard/supermicro/h8scm/BiosCallOuts.h index e3935d21ac..30b66f43a1 100644 --- a/src/mainboard/supermicro/h8scm/BiosCallOuts.h +++ b/src/mainboard/supermicro/h8scm/BiosCallOuts.h @@ -23,7 +23,5 @@ #include <northbridge/amd/agesa/def_callouts.h> #include <northbridge/amd/agesa/family15/fam15_callouts.h> -/* CALLOUT Initialization */ -AGESA_STATUS GetBiosCallout(UINT32 Func, UINT32 Data, VOID *ConfigPtr); #endif //_BIOS_CALLOUT_H_ diff --git a/src/mainboard/supermicro/h8scm/agesawrapper.h b/src/mainboard/supermicro/h8scm/agesawrapper.h index 7abf826a39..4f5a6934b0 100644 --- a/src/mainboard/supermicro/h8scm/agesawrapper.h +++ b/src/mainboard/supermicro/h8scm/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 *---------------------------------------------------------------------------------------- |