summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/dinar
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/amd/dinar
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/amd/dinar')
-rw-r--r--src/mainboard/amd/dinar/agesawrapper.c62
-rw-r--r--src/mainboard/amd/dinar/agesawrapper.h20
2 files changed, 30 insertions, 52 deletions
diff --git a/src/mainboard/amd/dinar/agesawrapper.c b/src/mainboard/amd/dinar/agesawrapper.c
index f8a5803f57..a8fc62e95d 100644
--- a/src/mainboard/amd/dinar/agesawrapper.c
+++ b/src/mainboard/amd/dinar/agesawrapper.c
@@ -78,7 +78,7 @@ GetEndBusNum (
return Index;
}
-static UINT32 amdinitcpuio(VOID)
+static UINT32 amdinitcpuio(void)
{
AGESA_STATUS Status;
UINT64 MsrReg;
@@ -195,13 +195,10 @@ static UINT32 amdinitcpuio(VOID)
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;
@@ -248,13 +245,10 @@ agesawrapper_amdinitmmio (
LibAmdMsrWrite (0x20F, &MsrReg, &StdHeader);
Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdinitreset (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitreset(void)
{
AGESA_STATUS status;
#if (defined AGESA_ENTRY_INIT_RESET) && (AGESA_ENTRY_INIT_RESET == TRUE)
@@ -291,13 +285,10 @@ agesawrapper_amdinitreset (
status = AGESA_SUCCESS;
#endif
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitearly (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitearly(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -323,7 +314,7 @@ agesawrapper_amdinitearly (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
/**
* OemCustomizeInitEarly
@@ -354,10 +345,7 @@ OemCustomizeInitPost (
InitPost->MemConfig.UmaSize = 0xE0-0xC0;
}
-UINT32
-agesawrapper_amdinitpost (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitpost(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -386,13 +374,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;
@@ -413,7 +398,7 @@ agesawrapper_amdinitenv (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
VOID *
@@ -444,10 +429,7 @@ agesawrapper_getlateinitptr (
}
}
-UINT32
-agesawrapper_amdinitmid (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitmid(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -474,11 +456,10 @@ agesawrapper_amdinitmid (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitlate(VOID)
+AGESA_STATUS agesawrapper_amdinitlate(void)
{
AGESA_STATUS Status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -526,10 +507,10 @@ agesawrapper_amdinitlate(VOID)
* AmdReleaseStruct (&AmdLateParams);
*/
- return (UINT32)Status;
+ return Status;
}
-UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
AGESA_STATUS Status;
AP_EXE_PARAMS AmdLateParams;
@@ -550,13 +531,10 @@ UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
ASSERT(Status == AGESA_SUCCESS);
}
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdreadeventlog (
- VOID
- )
+AGESA_STATUS agesawrapper_amdreadeventlog(void)
{
AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
@@ -578,5 +556,5 @@ agesawrapper_amdreadeventlog (
Status = AmdReadEventLog (&AmdEventParams);
}
- return (UINT32)Status;
+ return Status;
}
diff --git a/src/mainboard/amd/dinar/agesawrapper.h b/src/mainboard/amd/dinar/agesawrapper.h
index b8b8db8620..70cf4f6230 100644
--- a/src/mainboard/amd/dinar/agesawrapper.h
+++ b/src/mainboard/amd/dinar/agesawrapper.h
@@ -84,16 +84,16 @@ enum {
//void brazos_platform_stage(void);
-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 (void);
-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(void);
+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