summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/dinar/BiosCallOuts.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-04 17:07:45 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-26 09:27:31 +0200
commitc459f9658b73ccb6a4300a00eafef90412fc4984 (patch)
treef5801e95874752232ccce99fea21ccbbf7a6a285 /src/mainboard/amd/dinar/BiosCallOuts.c
parentcc84a001b8b71d457f30e5520c1583bbd297d691 (diff)
downloadcoreboot-c459f9658b73ccb6a4300a00eafef90412fc4984.tar.xz
AGESA: Add common callouts
Most of the callouts are not specific to board or even family. Start new file with default callouts doing nothing and returning either AGESA_SUCCESS or AGESA_UNSUPPORTED. Also add callout for returning empty IdsIdData. This feature is not used and could be easily overriden at board-level at later time. Change-Id: I65dbcdd80dddc89d47669ebe62c22caa63792f5c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5678 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/mainboard/amd/dinar/BiosCallOuts.c')
-rw-r--r--src/mainboard/amd/dinar/BiosCallOuts.c90
1 files changed, 6 insertions, 84 deletions
diff --git a/src/mainboard/amd/dinar/BiosCallOuts.c b/src/mainboard/amd/dinar/BiosCallOuts.c
index c7b9409151..4f7f7b77d7 100644
--- a/src/mainboard/amd/dinar/BiosCallOuts.c
+++ b/src/mainboard/amd/dinar/BiosCallOuts.c
@@ -93,14 +93,14 @@ STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DO_RESET, BiosReset },
{AGESA_LOCATE_BUFFER, BiosLocateBuffer},
{AGESA_READ_SPD, BiosReadSpd },
- {AGESA_READ_SPD_RECOVERY, BiosDefaultRet },
+ {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, BiosRunFuncOnAp },
- {AGESA_GNB_PCIE_SLOT_RESET, BiosGnbPcieSlotReset },
- {AGESA_GET_IDS_INIT_DATA, BiosGetIdsInitData },
+ {AGESA_GNB_PCIE_SLOT_RESET, agesa_NoopSuccess },
+ {AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData },
{AGESA_HOOKBEFORE_DRAM_INIT, BiosHookBeforeDramInit },
- {AGESA_HOOKBEFORE_DRAM_INIT_RECOVERY, BiosHookBeforeDramInitRecovery },
- {AGESA_HOOKBEFORE_DQS_TRAINING, BiosHookBeforeDQSTraining },
- {AGESA_HOOKBEFORE_EXIT_SELF_REF, BiosHookBeforeExitSelfRefresh },
+ {AGESA_HOOKBEFORE_DRAM_INIT_RECOVERY, agesa_NoopSuccess },
+ {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopSuccess },
+ {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
};
AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
@@ -128,60 +128,6 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
}
-CONST IDS_NV_ITEM IdsData[] =
-{
- /*{
- AGESA_IDS_NV_MAIN_PLL_CON,
- 0x1
- },
- {
- AGESA_IDS_NV_MAIN_PLL_FID_EN,
- 0x1
- },
- {
- AGESA_IDS_NV_MAIN_PLL_FID,
- 0x8
- },
-
- {
- AGESA_IDS_NV_CUSTOM_NB_PSTATE,
- },
- {
- AGESA_IDS_NV_CUSTOM_NB_P0_DIV_CTRL,
- },
- {
- AGESA_IDS_NV_CUSTOM_NB_P1_DIV_CTRL,
- },
- {
- AGESA_IDS_NV_FORCE_NB_PSTATE,
- },
- */
- {
- 0xFFFF,
- 0xFFFF
- }
-};
-
-#define NUM_IDS_ENTRIES (sizeof (IdsData) / sizeof (IDS_NV_ITEM))
-
-
-AGESA_STATUS BiosGetIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
-{
- UINTN i;
- IDS_NV_ITEM *IdsPtr;
-
- IdsPtr = ((IDS_CALLOUT_STRUCT *) ConfigPtr)->IdsNvPtr;
-
- if (Data == IDS_CALLOUT_INIT) {
- for (i = 0; i < NUM_IDS_ENTRIES; i++) {
- IdsPtr[i].IdsNvValue = IdsData[i].IdsNvValue;
- IdsPtr[i].IdsNvId = IdsData[i].IdsNvId;
- }
- }
- return AGESA_SUCCESS;
-}
-
-
AGESA_STATUS BiosReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
AGESA_STATUS Status;
@@ -202,11 +148,6 @@ AGESA_STATUS BiosReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
}
/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
-{
- return AGESA_SUCCESS;
-}
-/* Call the host environment interface to provide a user hook opportunity. */
AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
AGESA_STATUS Status;
@@ -233,22 +174,3 @@ AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
Status = AGESA_SUCCESS;
return Status;
}
-
-/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeDramInitRecovery (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
-{
- return AGESA_SUCCESS;
-}
-/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
-{
- return AGESA_SUCCESS;
-}
-/* PCIE slot reset control */
-AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
-{
- AGESA_STATUS Status;
-
- Status = AGESA_SUCCESS;
- return Status;
-}