summaryrefslogtreecommitdiff
path: root/src/mainboard/asus
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/asus
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/asus')
-rw-r--r--src/mainboard/asus/f2a85-m/agesawrapper.c82
-rw-r--r--src/mainboard/asus/f2a85-m/agesawrapper.h30
2 files changed, 43 insertions, 69 deletions
diff --git a/src/mainboard/asus/f2a85-m/agesawrapper.c b/src/mainboard/asus/f2a85-m/agesawrapper.c
index 2a3502a699..a964238529 100644
--- a/src/mainboard/asus/f2a85-m/agesawrapper.c
+++ b/src/mainboard/asus/f2a85-m/agesawrapper.c
@@ -76,10 +76,7 @@ VOID *AcpiIvrs = NULL;
* L O C A L F U N C T I O N S
*---------------------------------------------------------------------------------------
*/
-UINT32
-agesawrapper_amdinitcpuio (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitcpuio(void)
{
AGESA_STATUS Status;
UINT64 MsrReg;
@@ -122,13 +119,10 @@ agesawrapper_amdinitcpuio (
PciData = 0x00000003;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdinitmmio (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitmmio(void)
{
AGESA_STATUS Status;
UINT64 MsrReg;
@@ -155,13 +149,10 @@ agesawrapper_amdinitmmio (
LibAmdMsrWrite (0x20D, &MsrReg, &StdHeader);
Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdinitreset (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitreset(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -195,13 +186,10 @@ agesawrapper_amdinitreset (
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
if (status != AGESA_SUCCESS) 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;
@@ -227,13 +215,10 @@ agesawrapper_amdinitearly (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitpost (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitpost(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -259,13 +244,10 @@ agesawrapper_amdinitpost (
/* Initialize heap space */
EmptyHeap();
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitenv (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitenv(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -292,7 +274,7 @@ agesawrapper_amdinitenv (
Modify D1F0x18
*/
- return (UINT32)status;
+ return status;
}
VOID *
@@ -322,10 +304,7 @@ agesawrapper_getlateinitptr (
}
}
-UINT32
-agesawrapper_amdinitmid (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitmid(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -352,13 +331,10 @@ agesawrapper_amdinitmid (
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;
@@ -404,11 +380,10 @@ agesawrapper_amdinitlate (
(unsigned int)AcpiAlib, (unsigned int)AcpiIvrs, __func__);
/* AmdReleaseStruct (&AmdParamStruct); */
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdlaterunaptask (
+AGESA_STATUS agesawrapper_amdlaterunaptask (
UINT32 Func,
UINT32 Data,
VOID *ConfigPtr
@@ -435,11 +410,11 @@ agesawrapper_amdlaterunaptask (
ASSERT(Status == AGESA_SUCCESS);
}
- return (UINT32)Status;
+ return Status;
}
-UINT32 agesawrapper_amdinitresume(VOID)
+AGESA_STATUS agesawrapper_amdinitresume(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -475,11 +450,11 @@ UINT32 agesawrapper_amdinitresume(VOID)
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
#ifndef __PRE_RAM__
-UINT32 agesawrapper_fchs3earlyrestore (VOID)
+AGESA_STATUS agesawrapper_fchs3earlyrestore(void)
{
AGESA_STATUS status = AGESA_SUCCESS;
@@ -502,7 +477,7 @@ UINT32 agesawrapper_fchs3earlyrestore (VOID)
}
#endif
-UINT32 agesawrapper_amds3laterestore (VOID)
+AGESA_STATUS agesawrapper_amds3laterestore(void)
{
AGESA_STATUS Status;
AMD_INTERFACE_PARAMS AmdInterfaceParams;
@@ -540,14 +515,14 @@ UINT32 agesawrapper_amds3laterestore (VOID)
ASSERT(Status == AGESA_SUCCESS);
}
- return (UINT32)Status;
+ return Status;
}
#ifndef __PRE_RAM__
extern UINT8 picr_data[0x54], intr_data[0x54];
-UINT32 agesawrapper_fchs3laterestore (VOID)
+AGESA_STATUS agesawrapper_fchs3laterestore(void)
{
AGESA_STATUS status = AGESA_SUCCESS;
@@ -583,7 +558,7 @@ UINT32 agesawrapper_fchs3laterestore (VOID)
#ifndef __PRE_RAM__
-UINT32 agesawrapper_amdS3Save(VOID)
+AGESA_STATUS agesawrapper_amdS3Save(void)
{
AGESA_STATUS Status;
AMD_S3SAVE_PARAMS *AmdS3SaveParamsPtr;
@@ -642,13 +617,12 @@ UINT32 agesawrapper_amdS3Save(VOID)
AmdReleaseStruct (&AmdInterfaceParams);
- return (UINT32)Status;
+ return Status;
}
#endif /* #ifndef __PRE_RAM__ */
-UINT32
-agesawrapper_amdreadeventlog (
+AGESA_STATUS agesawrapper_amdreadeventlog (
UINT8 HeapStatus
)
{
@@ -673,5 +647,5 @@ agesawrapper_amdreadeventlog (
Status = AmdReadEventLog (&AmdEventParams);
}
- return (UINT32)Status;
+ return Status;
}
diff --git a/src/mainboard/asus/f2a85-m/agesawrapper.h b/src/mainboard/asus/f2a85-m/agesawrapper.h
index 4ae226d3cd..23fcd1bcaa 100644
--- a/src/mainboard/asus/f2a85-m/agesawrapper.h
+++ b/src/mainboard/asus/f2a85-m/agesawrapper.h
@@ -68,22 +68,22 @@ 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);
-UINT32 agesawrapper_amdinitcpuio (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);
+AGESA_STATUS agesawrapper_amdinitcpuio(void);
void *agesawrapper_getlateinitptr (int pick);
-UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, void *ConfigPtr);
-UINT32 agesawrapper_amdS3Save(VOID);
-UINT32 agesawrapper_amdinitresume(VOID);
-UINT32 agesawrapper_amds3laterestore (VOID);
+AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, void *ConfigPtr);
+AGESA_STATUS agesawrapper_amdS3Save(void);
+AGESA_STATUS agesawrapper_amdinitresume(void);
+AGESA_STATUS agesawrapper_amds3laterestore(void);
-UINT32 agesawrapper_fchs3earlyrestore (VOID);
-UINT32 agesawrapper_fchs3laterestore (VOID);
+AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
+AGESA_STATUS agesawrapper_fchs3laterestore(void);
#endif