summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/persimmon
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/persimmon
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/persimmon')
-rw-r--r--src/mainboard/amd/persimmon/agesawrapper.c65
-rw-r--r--src/mainboard/amd/persimmon/agesawrapper.h30
2 files changed, 41 insertions, 54 deletions
diff --git a/src/mainboard/amd/persimmon/agesawrapper.c b/src/mainboard/amd/persimmon/agesawrapper.c
index cfd0eeeb8c..b3a217afa3 100644
--- a/src/mainboard/amd/persimmon/agesawrapper.c
+++ b/src/mainboard/amd/persimmon/agesawrapper.c
@@ -46,8 +46,7 @@ VOID *AcpiWheaMce = NULL;
VOID *AcpiWheaCmc = NULL;
VOID *AcpiAlib = NULL;
-UINT32
-agesawrapper_amdinitcpuio (
+AGESA_STATUS agesawrapper_amdinitcpuio (
VOID
)
{
@@ -92,11 +91,10 @@ agesawrapper_amdinitcpuio (
PciData = 0x00000003;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdinitmmio (
+AGESA_STATUS agesawrapper_amdinitmmio (
VOID
)
{
@@ -142,11 +140,10 @@ agesawrapper_amdinitmmio (
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdinitreset (
+AGESA_STATUS agesawrapper_amdinitreset (
VOID
)
{
@@ -171,11 +168,10 @@ agesawrapper_amdinitreset (
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitearly (
+AGESA_STATUS agesawrapper_amdinitearly (
VOID
)
{
@@ -200,11 +196,10 @@ agesawrapper_amdinitearly (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitpost (
+AGESA_STATUS agesawrapper_amdinitpost (
VOID
)
{
@@ -228,11 +223,10 @@ agesawrapper_amdinitpost (
/* Initialize heap space */
EmptyHeap();
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitenv (
+AGESA_STATUS agesawrapper_amdinitenv (
VOID
)
{
@@ -326,7 +320,7 @@ agesawrapper_amdinitenv (
LibAmdPciWrite (AccessWidth32, PciAddress, &PciValue, &AmdParamStruct.StdHeader);
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
VOID *
@@ -354,8 +348,7 @@ agesawrapper_getlateinitptr (
}
}
-UINT32
-agesawrapper_amdinitmid (
+AGESA_STATUS agesawrapper_amdinitmid (
VOID
)
{
@@ -380,11 +373,10 @@ agesawrapper_amdinitmid (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitlate (
+AGESA_STATUS agesawrapper_amdinitlate (
VOID
)
{
@@ -430,11 +422,10 @@ agesawrapper_amdinitlate (
* AmdReleaseStruct (&AmdLateParams);
*/
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdinitresume (
+AGESA_STATUS agesawrapper_amdinitresume (
VOID
)
{
@@ -468,11 +459,10 @@ agesawrapper_amdinitresume (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amds3laterestore (
+AGESA_STATUS agesawrapper_amds3laterestore (
VOID
)
{
@@ -507,12 +497,11 @@ agesawrapper_amds3laterestore (
ASSERT(Status == AGESA_SUCCESS);
}
- return (UINT32)Status;
+ return Status;
}
#ifndef __PRE_RAM__
-UINT32
-agesawrapper_amdS3Save (
+AGESA_STATUS agesawrapper_amdS3Save (
VOID
)
{
@@ -561,12 +550,11 @@ agesawrapper_amdS3Save (
OemAgesaSaveMtrr();
AmdReleaseStruct (&AmdInterfaceParams);
- return (UINT32)Status;
+ return Status;
}
#endif /* #ifndef __PRE_RAM__ */
-UINT32
-agesawrapper_amdlaterunaptask (
+AGESA_STATUS agesawrapper_amdlaterunaptask (
UINT32 Func,
UINT32 Data,
VOID *ConfigPtr
@@ -590,11 +578,10 @@ agesawrapper_amdlaterunaptask (
ASSERT(Status == AGESA_SUCCESS);
}
- return (UINT32)Status;
+ return Status;
}
-UINT32
-agesawrapper_amdreadeventlog (
+AGESA_STATUS agesawrapper_amdreadeventlog (
VOID
)
{
@@ -615,5 +602,5 @@ agesawrapper_amdreadeventlog (
Status = AmdReadEventLog (&AmdEventParams);
}
- return (UINT32)Status;
+ return Status;
}
diff --git a/src/mainboard/amd/persimmon/agesawrapper.h b/src/mainboard/amd/persimmon/agesawrapper.h
index c16dab2932..d14603e614 100644
--- a/src/mainboard/amd/persimmon/agesawrapper.h
+++ b/src/mainboard/amd/persimmon/agesawrapper.h
@@ -39,21 +39,21 @@ enum {
PICK_ALIB, /* SACPI SSDT table with ALIB implementation */
};
-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_amdinitcpuio (void);
-UINT32 agesawrapper_amdinitmmio (void);
-UINT32 agesawrapper_amdinitresume (void);
-UINT32 agesawrapper_amdS3Save (void);
-UINT32 agesawrapper_amds3laterestore (void);
-UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
+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_amdinitcpuio(void);
+AGESA_STATUS agesawrapper_amdinitmmio(void);
+AGESA_STATUS agesawrapper_amdinitresume(void);
+AGESA_STATUS agesawrapper_amdS3Save(void);
+AGESA_STATUS agesawrapper_amds3laterestore(void);
+AGESA_STATUS agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
void *agesawrapper_getlateinitptr (int pick);
#endif /* _AGESAWRAPPER_H_ */