aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/tyan/s8226/BiosCallOuts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/tyan/s8226/BiosCallOuts.c')
-rw-r--r--src/mainboard/tyan/s8226/BiosCallOuts.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/mainboard/tyan/s8226/BiosCallOuts.c b/src/mainboard/tyan/s8226/BiosCallOuts.c
index 0d1817aecb..2812836701 100644
--- a/src/mainboard/tyan/s8226/BiosCallOuts.c
+++ b/src/mainboard/tyan/s8226/BiosCallOuts.c
@@ -25,6 +25,7 @@
#include "heapManager.h"
#include <northbridge/amd/agesa/family15/dimmSpd.h>
#include <arch/io.h>
+#include <stdlib.h>
#ifdef __PRE_RAM__
/* These defines are used to select the appropriate socket for the SPD read
@@ -81,7 +82,7 @@ static void restore_socket(UINT8 original_value)
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 },
@@ -95,27 +96,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)
{