summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-10-17 22:33:22 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-10-19 06:19:44 +0200
commita1ebbc42ad791369c2e4f626e46917bdb1459d72 (patch)
treea9cb880f9cdb7adfd02b3c751f1e9a1500cf91c6 /src/mainboard
parentc5cc9f233c9b2a1decf57b6e51438d03152fe54e (diff)
downloadcoreboot-a1ebbc42ad791369c2e4f626e46917bdb1459d72.tar.xz
AGESA fam12 fam14 fam15: Use common agesa_readSpd()
Remove northbridge specific callouts for AGESA_READ_SPD. Move low-level SMBus code to southbridge. Change-Id: I5fc91c49d9ef8e0af1c4d8194f857c61ce417d1d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7113 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/amd/dinar/BiosCallOuts.c5
-rw-r--r--src/mainboard/amd/inagua/BiosCallOuts.c3
-rw-r--r--src/mainboard/amd/persimmon/BiosCallOuts.c3
-rw-r--r--src/mainboard/amd/south_station/BiosCallOuts.c3
-rw-r--r--src/mainboard/amd/torpedo/BiosCallOuts.c2
-rw-r--r--src/mainboard/amd/union_station/BiosCallOuts.c3
-rw-r--r--src/mainboard/asrock/e350m1/BiosCallOuts.c3
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c3
-rw-r--r--src/mainboard/lippert/frontrunner-af/BiosCallOuts.c3
-rw-r--r--src/mainboard/lippert/toucan-af/BiosCallOuts.c3
-rw-r--r--src/mainboard/supermicro/h8qgi/BiosCallOuts.c3
-rw-r--r--src/mainboard/supermicro/h8scm/BiosCallOuts.c19
-rw-r--r--src/mainboard/tyan/s8226/BiosCallOuts.c3
13 files changed, 15 insertions, 41 deletions
diff --git a/src/mainboard/amd/dinar/BiosCallOuts.c b/src/mainboard/amd/dinar/BiosCallOuts.c
index c5267dca72..72424f8849 100644
--- a/src/mainboard/amd/dinar/BiosCallOuts.c
+++ b/src/mainboard/amd/dinar/BiosCallOuts.c
@@ -24,10 +24,11 @@
#include "OptionsIds.h"
#include "heapManager.h"
#include "SB700.h"
-#include <northbridge/amd/agesa/family15/dimmSpd.h>
#include "OEM.h" /* SMBUS0_BASE_ADDRESS */
#include <stdlib.h>
+#include <southbridge/amd/cimx/sb700/smbus_spd.h>
+
#ifndef SB_GPIO_REG01
#define SB_GPIO_REG01 1
#endif
@@ -117,7 +118,7 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
select_socket(((AGESA_READ_SPD_PARAMS *)ConfigPtr)->SocketId);
- Status = agesa_ReadSPD (Func, Data, ConfigPtr);
+ Status = agesa_ReadSpd (Func, Data, ConfigPtr);
restore_socket();
#else
diff --git a/src/mainboard/amd/inagua/BiosCallOuts.c b/src/mainboard/amd/inagua/BiosCallOuts.c
index f67d87902c..56130125ed 100644
--- a/src/mainboard/amd/inagua/BiosCallOuts.c
+++ b/src/mainboard/amd/inagua/BiosCallOuts.c
@@ -22,7 +22,6 @@
#include "BiosCallOuts.h"
#include "heapManager.h"
#include "SB800.h"
-#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
@@ -34,7 +33,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, board_GnbPcieSlotReset },
diff --git a/src/mainboard/amd/persimmon/BiosCallOuts.c b/src/mainboard/amd/persimmon/BiosCallOuts.c
index cfd9c6f35b..c700324768 100644
--- a/src/mainboard/amd/persimmon/BiosCallOuts.c
+++ b/src/mainboard/amd/persimmon/BiosCallOuts.c
@@ -22,7 +22,6 @@
#include "BiosCallOuts.h"
#include "heapManager.h"
#include "SB800.h"
-#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
@@ -34,7 +33,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, board_GnbPcieSlotReset },
diff --git a/src/mainboard/amd/south_station/BiosCallOuts.c b/src/mainboard/amd/south_station/BiosCallOuts.c
index 6dfad31546..272a3949a5 100644
--- a/src/mainboard/amd/south_station/BiosCallOuts.c
+++ b/src/mainboard/amd/south_station/BiosCallOuts.c
@@ -22,7 +22,6 @@
#include "BiosCallOuts.h"
#include "heapManager.h"
#include "SB800.h"
-#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
@@ -34,7 +33,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, board_GnbPcieSlotReset },
diff --git a/src/mainboard/amd/torpedo/BiosCallOuts.c b/src/mainboard/amd/torpedo/BiosCallOuts.c
index 8422f1d68b..38d4003afb 100644
--- a/src/mainboard/amd/torpedo/BiosCallOuts.c
+++ b/src/mainboard/amd/torpedo/BiosCallOuts.c
@@ -47,7 +47,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, board_GnbPcieSlotReset },
diff --git a/src/mainboard/amd/union_station/BiosCallOuts.c b/src/mainboard/amd/union_station/BiosCallOuts.c
index 6dfad31546..272a3949a5 100644
--- a/src/mainboard/amd/union_station/BiosCallOuts.c
+++ b/src/mainboard/amd/union_station/BiosCallOuts.c
@@ -22,7 +22,6 @@
#include "BiosCallOuts.h"
#include "heapManager.h"
#include "SB800.h"
-#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <stdlib.h>
static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
@@ -34,7 +33,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, board_GnbPcieSlotReset },
diff --git a/src/mainboard/asrock/e350m1/BiosCallOuts.c b/src/mainboard/asrock/e350m1/BiosCallOuts.c
index 09571dd8c3..4a39cd6bc9 100644
--- a/src/mainboard/asrock/e350m1/BiosCallOuts.c
+++ b/src/mainboard/asrock/e350m1/BiosCallOuts.c
@@ -22,7 +22,6 @@
#include "BiosCallOuts.h"
#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?
@@ -39,7 +38,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopSuccess },
diff --git a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
index b3199caad3..dd3d4cf206 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
@@ -21,7 +21,6 @@
#include "BiosCallOuts.h"
#include <Lib/amdlib.h>
-#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <vendorcode/amd/agesa/f14/Proc/CPU/heapManager.h>
#include <vendorcode/amd/cimx/sb800/SB800.h>
#include <stdint.h>
@@ -36,7 +35,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, board_GnbPcieSlotReset },
diff --git a/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c b/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c
index 02642561c4..3104c24835 100644
--- a/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c
+++ b/src/mainboard/lippert/frontrunner-af/BiosCallOuts.c
@@ -21,7 +21,6 @@
#include "amdlib.h"
#include "BiosCallOuts.h"
#include "heapManager.h"
-#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <stdlib.h>
/* Should AGESA_GNB_PCIE_SLOT_RESET use agesa_NoopSuccess?
@@ -37,7 +36,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, agesa_NoopUnsupported },
diff --git a/src/mainboard/lippert/toucan-af/BiosCallOuts.c b/src/mainboard/lippert/toucan-af/BiosCallOuts.c
index f1ae168c18..da9ab1a8fc 100644
--- a/src/mainboard/lippert/toucan-af/BiosCallOuts.c
+++ b/src/mainboard/lippert/toucan-af/BiosCallOuts.c
@@ -21,7 +21,6 @@
#include "amdlib.h"
#include "BiosCallOuts.h"
#include "heapManager.h"
-#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <stdlib.h>
/* Should AGESA_GNB_PCIE_SLOT_RESET use agesa_NoopSuccess?
@@ -38,7 +37,7 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, BiosReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GNB_PCIE_SLOT_RESET, agesa_NoopUnsupported },
diff --git a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
index 6e6eb6a79c..7b7d5e128c 100644
--- a/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
+++ b/src/mainboard/supermicro/h8qgi/BiosCallOuts.c
@@ -23,7 +23,6 @@
#include "Ids.h"
#include "OptionsIds.h"
#include "heapManager.h"
-#include <northbridge/amd/agesa/family15/dimmSpd.h>
#include <arch/io.h>
#ifdef __PRE_RAM__
@@ -101,7 +100,7 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
original_value = select_socket(((AGESA_READ_SPD_PARAMS *)ConfigPtr)->SocketId);
- Status = agesa_ReadSPD (Func, Data, ConfigPtr);
+ Status = agesa_ReadSpd (Func, Data, ConfigPtr);
restore_socket(original_value);
#else
diff --git a/src/mainboard/supermicro/h8scm/BiosCallOuts.c b/src/mainboard/supermicro/h8scm/BiosCallOuts.c
index 5d0fd00c97..c891dbd13b 100644
--- a/src/mainboard/supermicro/h8scm/BiosCallOuts.c
+++ b/src/mainboard/supermicro/h8scm/BiosCallOuts.c
@@ -23,18 +23,15 @@
#include "Ids.h"
#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);
-
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{AGESA_ALLOCATE_BUFFER, agesa_AllocateBuffer },
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
{AGESA_DO_RESET, agesa_Reset },
- {AGESA_READ_SPD, board_ReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
{AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData },
@@ -43,17 +40,3 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
};
const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts);
-
-
-
-static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
-{
- AGESA_STATUS Status;
-#ifdef __PRE_RAM__
- Status = agesa_ReadSPD (Func, Data, ConfigPtr);
-#else
- Status = AGESA_UNSUPPORTED;
-#endif
-
- return Status;
-}
diff --git a/src/mainboard/tyan/s8226/BiosCallOuts.c b/src/mainboard/tyan/s8226/BiosCallOuts.c
index ee641221b3..becb4d0ba9 100644
--- a/src/mainboard/tyan/s8226/BiosCallOuts.c
+++ b/src/mainboard/tyan/s8226/BiosCallOuts.c
@@ -23,7 +23,6 @@
#include "Ids.h"
#include "OptionsIds.h"
#include "heapManager.h"
-#include <northbridge/amd/agesa/family15/dimmSpd.h>
#include <arch/io.h>
#include <stdlib.h>
@@ -109,7 +108,7 @@ static AGESA_STATUS board_ReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
original_value = select_socket(((AGESA_READ_SPD_PARAMS *)ConfigPtr)->SocketId);
- Status = agesa_ReadSPD (Func, Data, ConfigPtr);
+ Status = agesa_ReadSpd (Func, Data, ConfigPtr);
restore_socket(original_value);
#else