summaryrefslogtreecommitdiff
path: root/src/mainboard/asrock
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/asrock')
-rw-r--r--src/mainboard/asrock/e350m1/BiosCallOuts.c28
-rw-r--r--src/mainboard/asrock/e350m1/BiosCallOuts.h2
-rw-r--r--src/mainboard/asrock/e350m1/agesawrapper.h5
-rw-r--r--src/mainboard/asrock/imb-a180/BiosCallOuts.c24
-rw-r--r--src/mainboard/asrock/imb-a180/BiosCallOuts.h2
-rw-r--r--src/mainboard/asrock/imb-a180/agesawrapper.h5
6 files changed, 6 insertions, 60 deletions
diff --git a/src/mainboard/asrock/e350m1/BiosCallOuts.c b/src/mainboard/asrock/e350m1/BiosCallOuts.c
index 7525cbc34e..97e282ba0b 100644
--- a/src/mainboard/asrock/e350m1/BiosCallOuts.c
+++ b/src/mainboard/asrock/e350m1/BiosCallOuts.c
@@ -23,6 +23,7 @@
#include "heapManager.h"
#include "SB800.h"
#include <northbridge/amd/agesa/family14/dimmSpd.h>
+#include <stdlib.h>
/* Should AGESA_GNB_PCIE_SLOT_RESET use agesa_NoopSuccess?
*
@@ -32,7 +33,7 @@
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
-CONST BIOS_CALLOUT_STRUCT BiosCallouts[] =
+const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{AGESA_ALLOCATE_BUFFER, BiosAllocateBuffer },
{AGESA_DEALLOCATE_BUFFER, BiosDeallocateBuffer },
@@ -46,30 +47,7 @@ CONST BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
{AGESA_GNB_PCIE_SLOT_RESET, agesa_NoopUnsupported },
};
-
-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);
/* Call the host environment interface to provide a user hook opportunity. */
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
diff --git a/src/mainboard/asrock/e350m1/BiosCallOuts.h b/src/mainboard/asrock/e350m1/BiosCallOuts.h
index 27ac074e37..1cb500635d 100644
--- a/src/mainboard/asrock/e350m1/BiosCallOuts.h
+++ b/src/mainboard/asrock/e350m1/BiosCallOuts.h
@@ -23,7 +23,5 @@
#include <northbridge/amd/agesa/def_callouts.h>
#include <northbridge/amd/agesa/family14/fam14_callouts.h>
-/* CALLOUT Initialization */
-AGESA_STATUS GetBiosCallout(UINT32 Func, UINT32 Data, VOID *ConfigPtr);
#endif //_BIOS_CALLOUT_H_
diff --git a/src/mainboard/asrock/e350m1/agesawrapper.h b/src/mainboard/asrock/e350m1/agesawrapper.h
index dee4224691..10158f6454 100644
--- a/src/mainboard/asrock/e350m1/agesawrapper.h
+++ b/src/mainboard/asrock/e350m1/agesawrapper.h
@@ -57,11 +57,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/asrock/imb-a180/BiosCallOuts.c b/src/mainboard/asrock/imb-a180/BiosCallOuts.c
index f262b299c9..43d99bc777 100644
--- a/src/mainboard/asrock/imb-a180/BiosCallOuts.c
+++ b/src/mainboard/asrock/imb-a180/BiosCallOuts.c
@@ -26,8 +26,9 @@
#include "heapManager.h"
#include "FchPlatform.h"
#include "cbfs.h"
+#include <stdlib.h>
-STATIC CONST BIOS_CALLOUT_STRUCT BiosCallouts[] =
+const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{AGESA_ALLOCATE_BUFFER, fam16kb_AllocateBuffer },
{AGESA_DEALLOCATE_BUFFER, fam16kb_DeallocateBuffer },
@@ -42,26 +43,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);
/**
* CODEC Initialization Table for Azalia HD Audio using Realtek ALC662 chip
diff --git a/src/mainboard/asrock/imb-a180/BiosCallOuts.h b/src/mainboard/asrock/imb-a180/BiosCallOuts.h
index 7490b669a6..2b8aae211e 100644
--- a/src/mainboard/asrock/imb-a180/BiosCallOuts.h
+++ b/src/mainboard/asrock/imb-a180/BiosCallOuts.h
@@ -23,8 +23,6 @@
#include <northbridge/amd/agesa/def_callouts.h>
#include <northbridge/amd/agesa/family16kb/fam16kb_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/asrock/imb-a180/agesawrapper.h b/src/mainboard/asrock/imb-a180/agesawrapper.h
index 32b24cb284..8589db51ef 100644
--- a/src/mainboard/asrock/imb-a180/agesawrapper.h
+++ b/src/mainboard/asrock/imb-a180/agesawrapper.h
@@ -54,11 +54,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
*----------------------------------------------------------------------------------------