summaryrefslogtreecommitdiff
path: root/src/mainboard/supermicro/h8qgi
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-07-05 15:24:50 +1000
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-07-14 19:47:25 +0200
commit06ff7268f67d1345fd115fda0879d781eac2d6b1 (patch)
treeb207320af0d3f833af0037a94bc99aec032f07f6 /src/mainboard/supermicro/h8qgi
parent9f0a2be1658cf6d329aefac2660a53a465312468 (diff)
downloadcoreboot-06ff7268f67d1345fd115fda0879d781eac2d6b1.tar.xz
AGESA: Fix error status code return type to enum from UINT32
AGESA correctly uses the enum AGESA_STATUS type whereas boards use a mess of UINT32 typecasts. Also no need to shout VOID. We are not that careful on changing all cases of VOID->void or whitespace issues as these files will get merged with follow-ups. Change-Id: I16ccfcc73cda6b917c7ff5fd42ee2cd04e7dc0dd Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6182 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard/supermicro/h8qgi')
-rw-r--r--src/mainboard/supermicro/h8qgi/agesawrapper.c50
-rw-r--r--src/mainboard/supermicro/h8qgi/agesawrapper.h20
2 files changed, 35 insertions, 35 deletions
diff --git a/src/mainboard/supermicro/h8qgi/agesawrapper.c b/src/mainboard/supermicro/h8qgi/agesawrapper.c
index ba23b4d318..8ee89a7a83 100644
--- a/src/mainboard/supermicro/h8qgi/agesawrapper.c
+++ b/src/mainboard/supermicro/h8qgi/agesawrapper.c
@@ -78,7 +78,7 @@ VOID *AcpiAlib = NULL;
*/
extern VOID OemCustomizeInitEarly(IN OUT AMD_EARLY_PARAMS *InitEarly);
-static UINT32 agesawrapper_amdinitcpuio(VOID)
+static AGESA_STATUS agesawrapper_amdinitcpuio(void)
{
AGESA_STATUS Status;
UINT32 PciData;
@@ -169,10 +169,10 @@ static UINT32 agesawrapper_amdinitcpuio(VOID)
}
Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return Status;
}
-UINT32 agesawrapper_amdinitmmio(VOID)
+AGESA_STATUS agesawrapper_amdinitmmio(void)
{
AGESA_STATUS Status;
UINT64 MsrReg;
@@ -199,10 +199,10 @@ UINT32 agesawrapper_amdinitmmio(VOID)
LibAmdMsrWrite(0x20D, &MsrReg, &StdHeader);
Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return Status;
}
-UINT32 agesawrapper_amdinitreset(VOID)
+UINT32 agesawrapper_amdinitreset(void)
{
AGESA_STATUS status = AGESA_SUCCESS;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -228,7 +228,7 @@ UINT32 agesawrapper_amdinitreset(VOID)
AmdParamStruct.StdHeader.ImageBasePtr = 0;
status = AmdCreateStruct(&AmdParamStruct);
if (status != AGESA_SUCCESS) {
- return (UINT32)status;
+ return status;
}
AmdResetParams.HtConfig.Depth = 0;
@@ -241,10 +241,10 @@ UINT32 agesawrapper_amdinitreset(VOID)
agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct(&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32 agesawrapper_amdinitearly(VOID)
+AGESA_STATUS agesawrapper_amdinitearly(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -265,7 +265,7 @@ UINT32 agesawrapper_amdinitearly(VOID)
AmdParamStruct.StdHeader.ImageBasePtr = 0;
status = AmdCreateStruct(&AmdParamStruct);
if (status != AGESA_SUCCESS) {
- return (UINT32)status;
+ return status;
}
AmdEarlyParamsPtr = (AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr;
@@ -280,10 +280,10 @@ UINT32 agesawrapper_amdinitearly(VOID)
printk(BIOS_DEBUG, "BSP Frequency: %uMHz\n", (unsigned int)TscRateInMhz);
AmdReleaseStruct(&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32 agesawrapper_amdinitpost(VOID)
+AGESA_STATUS agesawrapper_amdinitpost(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -305,7 +305,7 @@ UINT32 agesawrapper_amdinitpost(VOID)
status = AmdCreateStruct(&AmdParamStruct);
if (status != AGESA_SUCCESS) {
- return (UINT32)status;
+ return status;
}
PostParams = (AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitPost(PostParams);
@@ -321,10 +321,10 @@ UINT32 agesawrapper_amdinitpost(VOID)
FamilySpecificServices->GetTscRate (FamilySpecificServices, &TscRateInMhz, &AmdParamStruct.StdHeader);
printk(BIOS_DEBUG, "BSP Frequency: %uMHz\n", (unsigned int)TscRateInMhz);
- return (UINT32)status;
+ return status;
}
-UINT32 agesawrapper_amdinitenv(VOID)
+AGESA_STATUS agesawrapper_amdinitenv(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -344,7 +344,7 @@ UINT32 agesawrapper_amdinitenv(VOID)
status = AmdCreateStruct(&AmdParamStruct);
if (status != AGESA_SUCCESS) {
- return (UINT32)status;
+ return status;
}
EnvParams = (AMD_ENV_PARAMS *)AmdParamStruct.NewStructPtr;
status = AmdInitEnv(EnvParams);
@@ -352,7 +352,7 @@ UINT32 agesawrapper_amdinitenv(VOID)
agesawrapper_amdreadeventlog(EnvParams->StdHeader.HeapStatus);
AmdReleaseStruct(&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
VOID * agesawrapper_getlateinitptr(int pick)
@@ -382,7 +382,7 @@ VOID * agesawrapper_getlateinitptr(int pick)
return NULL;
}
-UINT32 agesawrapper_amdinitmid(VOID)
+AGESA_STATUS agesawrapper_amdinitmid(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -404,17 +404,17 @@ UINT32 agesawrapper_amdinitmid(VOID)
status = AmdCreateStruct(&AmdParamStruct);
if (status != AGESA_SUCCESS) {
- return (UINT32)status;
+ return status;
}
status = AmdInitMid((AMD_MID_PARAMS *)AmdParamStruct.NewStructPtr);
if (status != AGESA_SUCCESS)
agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct(&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32 agesawrapper_amdinitlate(VOID)
+AGESA_STATUS agesawrapper_amdinitlate(void)
{
AGESA_STATUS Status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -460,14 +460,14 @@ UINT32 agesawrapper_amdinitlate(VOID)
* AmdReleaseStruct (&AmdLateParams);
*/
- return (UINT32)Status;
+ return Status;
}
/**
* @param[in] UINTN ApicIdOfCore,
* @param[in] AP_EXE_PARAMS *LaunchApParams
*/
-UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
AGESA_STATUS Status;
AMD_LATE_PARAMS AmdLateParams;
@@ -490,7 +490,7 @@ UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
ASSERT(Status <= AGESA_UNSUPPORTED);
}
- return (UINT32)Status;
+ return Status;
}
/**
@@ -1152,7 +1152,7 @@ static void interpret_agesa_eventlog(EVENT_PARAMS *event)
/**
* @param HeapStatus -the current HeapStatus
*/
-UINT32 agesawrapper_amdreadeventlog(UINT8 HeapStatus)
+AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus)
{
printk(BIOS_DEBUG, "enter in %s\n", __func__);
AGESA_STATUS Status;
@@ -1185,5 +1185,5 @@ UINT32 agesawrapper_amdreadeventlog(UINT8 HeapStatus)
}
printk(BIOS_DEBUG, "exit %s \n", __func__);
- return (UINT32)Status;
+ return Status;
}
diff --git a/src/mainboard/supermicro/h8qgi/agesawrapper.h b/src/mainboard/supermicro/h8qgi/agesawrapper.h
index 51e438d497..c99714de25 100644
--- a/src/mainboard/supermicro/h8qgi/agesawrapper.h
+++ b/src/mainboard/supermicro/h8qgi/agesawrapper.h
@@ -68,16 +68,16 @@ enum {
*---------------------------------------------------------------------------------------
*/
-UINT32 agesawrapper_amdinitreset (void);
-UINT32 agesawrapper_amdinitearly (void);
-UINT32 agesawrapper_amdinitenv (void);
-UINT32 agesawrapper_amdinitlate (void);
-UINT32 agesawrapper_amdinitpost (void);
-UINT32 agesawrapper_amdinitmid (void);
-UINT32 agesawrapper_amdreadeventlog (UINT8 HeapStatus);
-UINT32 agesawrapper_amdinitmmio (void);
+AGESA_STATUS agesawrapper_amdinitreset(void);
+AGESA_STATUS agesawrapper_amdinitearly(void);
+AGESA_STATUS agesawrapper_amdinitenv(void);
+AGESA_STATUS agesawrapper_amdinitlate(void);
+AGESA_STATUS agesawrapper_amdinitpost(void);
+AGESA_STATUS agesawrapper_amdinitmid(void);
+AGESA_STATUS agesawrapper_amdreadeventlog (UINT8 HeapStatus);
+AGESA_STATUS agesawrapper_amdinitmmio(void);
void *agesawrapper_getlateinitptr (int pick);
-UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
+AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
-static inline UINT32 agesawrapper_amdS3Save(void) { return 0; }
+static inline AGESA_STATUS agesawrapper_amdS3Save(void) { return 0; }
#endif