summaryrefslogtreecommitdiff
path: root/src/mainboard/tyan
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/tyan
parent9f0a2be1658cf6d329aefac2660a53a465312468 (diff)
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/tyan')
-rw-r--r--src/mainboard/tyan/s8226/agesawrapper.c53
-rw-r--r--src/mainboard/tyan/s8226/agesawrapper.h20
2 files changed, 35 insertions, 38 deletions
diff --git a/src/mainboard/tyan/s8226/agesawrapper.c b/src/mainboard/tyan/s8226/agesawrapper.c
index 79cc826886..425054c966 100644
--- a/src/mainboard/tyan/s8226/agesawrapper.c
+++ b/src/mainboard/tyan/s8226/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,13 +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;
@@ -209,10 +206,10 @@ agesawrapper_amdinitmmio (
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;
@@ -238,7 +235,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;
@@ -251,10 +248,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;
@@ -275,7 +272,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;
@@ -290,10 +287,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;
@@ -315,7 +312,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);
@@ -331,10 +328,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;
@@ -354,7 +351,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);
@@ -362,7 +359,7 @@ UINT32 agesawrapper_amdinitenv(VOID)
agesawrapper_amdreadeventlog(EnvParams->StdHeader.HeapStatus);
AmdReleaseStruct(&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
VOID * agesawrapper_getlateinitptr(int pick)
@@ -392,7 +389,7 @@ VOID * agesawrapper_getlateinitptr(int pick)
return NULL;
}
-UINT32 agesawrapper_amdinitmid(VOID)
+AGESA_STATUS agesawrapper_amdinitmid(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -414,17 +411,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;
@@ -470,14 +467,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;
@@ -500,7 +497,7 @@ UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
ASSERT(Status <= AGESA_UNSUPPORTED);
}
- return (UINT32)Status;
+ return Status;
}
/**
@@ -1162,7 +1159,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;
@@ -1195,5 +1192,5 @@ UINT32 agesawrapper_amdreadeventlog(UINT8 HeapStatus)
}
printk(BIOS_DEBUG, "exit %s \n", __func__);
- return (UINT32)Status;
+ return Status;
}
diff --git a/src/mainboard/tyan/s8226/agesawrapper.h b/src/mainboard/tyan/s8226/agesawrapper.h
index 51e438d497..c99714de25 100644
--- a/src/mainboard/tyan/s8226/agesawrapper.h
+++ b/src/mainboard/tyan/s8226/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