Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5486
-gerrit
commit cf8218468e6deddee298b6dd455f467511b99677 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Sat Apr 12 04:12:14 2014 +1000
jetway/nf81-t56n-lf: Decapitalise type specifier
Try to use void and uint*_t type specifiers in place of VOID and UINT* respectively. Use const in place of CONST type modifier. Remove some useless type casts.
Change-Id: I4bff96a222507fc35333488331c3f35ef1158132 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c | 87 +++++----- src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h | 42 ++--- .../jetway/nf81-t56n-lf/PlatformGnbPcie.c | 13 +- .../jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h | 5 +- src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c | 182 ++++++++------------- src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h | 34 ++-- src/mainboard/jetway/nf81-t56n-lf/buildOpts.c | 8 +- 7 files changed, 165 insertions(+), 206 deletions(-)
diff --git a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c index e86b813..909b94e 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c +++ b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c @@ -24,6 +24,7 @@ #include <northbridge/amd/agesa/family14/dimmSpd.h> #include <vendorcode/amd/agesa/f14/Proc/CPU/heapManager.h> #include <vendorcode/amd/cimx/sb800/SB800.h> +#include <stdint.h>
STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] = { @@ -76,7 +77,7 @@ STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] = }, };
-AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS GetBiosCallout (uint32_t Func, uint32_t Data, void *ConfigPtr) { UINTN i; AGESA_STATUS CalloutStatus; @@ -98,16 +99,16 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return CalloutStatus; }
-AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr) { - UINT32 AvailableHeapSize; - UINT8 *BiosHeapBaseAddr; - UINT32 CurrNodeOffset; - UINT32 PrevNodeOffset; - UINT32 FreedNodeOffset; - UINT32 BestFitNodeOffset; - UINT32 BestFitPrevNodeOffset; - UINT32 NextFreeOffset; + uint32_t AvailableHeapSize; + uint8_t *BiosHeapBaseAddr; + uint32_t CurrNodeOffset; + uint32_t PrevNodeOffset; + uint32_t FreedNodeOffset; + uint32_t BestFitNodeOffset; + uint32_t BestFitPrevNodeOffset; + uint32_t NextFreeOffset; BIOS_BUFFER_NODE *CurrNodePtr; BIOS_BUFFER_NODE *FreedNodePtr; BIOS_BUFFER_NODE *BestFitNodePtr; @@ -120,7 +121,7 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) AllocParams->BufferPointer = NULL;
AvailableHeapSize = BIOS_HEAP_SIZE - sizeof (BIOS_HEAP_MANAGER); - BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader)); + BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader)); BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
printk(BIOS_SPEW, "%s BiosHeapBaseAddr: %x\n", __func__, (u32) BiosHeapBaseAddr); @@ -132,7 +133,7 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) CurrNodePtr->BufferHandle = AllocParams->BufferHandle; CurrNodePtr->BufferSize = AllocParams->BufferLength; CurrNodePtr->NextNodeOffset = 0; - AllocParams->BufferPointer = (UINT8 *) CurrNodePtr + sizeof (BIOS_BUFFER_NODE); + AllocParams->BufferPointer = (uint8_t *) CurrNodePtr + sizeof (BIOS_BUFFER_NODE);
/* Update the remaining free space */ FreedNodeOffset = CurrNodeOffset + CurrNodePtr->BufferSize + sizeof (BIOS_BUFFER_NODE); @@ -222,22 +223,22 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) BestFitNodePtr->NextNodeOffset = 0;
/* Remove BestFitNode from list of Freed nodes */ - AllocParams->BufferPointer = (UINT8 *) BestFitNodePtr + sizeof (BIOS_BUFFER_NODE); + AllocParams->BufferPointer = (uint8_t *) BestFitNodePtr + sizeof (BIOS_BUFFER_NODE); } }
return AGESA_SUCCESS; }
-AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosDeallocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr) {
- UINT8 *BiosHeapBaseAddr; - UINT32 AllocNodeOffset; - UINT32 PrevNodeOffset; - UINT32 NextNodeOffset; - UINT32 FreedNodeOffset; - UINT32 EndNodeOffset; + uint8_t *BiosHeapBaseAddr; + uint32_t AllocNodeOffset; + uint32_t PrevNodeOffset; + uint32_t NextNodeOffset; + uint32_t FreedNodeOffset; + uint32_t EndNodeOffset; BIOS_BUFFER_NODE *AllocNodePtr; BIOS_BUFFER_NODE *PrevNodePtr; BIOS_BUFFER_NODE *FreedNodePtr; @@ -247,7 +248,7 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
- BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader)); + BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader)); BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
/* Find target node to deallocate in list of allocated nodes. @@ -271,7 +272,7 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) PrevNodePtr->NextNodeOffset = AllocNodePtr->NextNodeOffset;
/* Zero out the buffer, and clear the BufferHandle */ - LibAmdMemFill ((UINT8 *)AllocNodePtr + sizeof (BIOS_BUFFER_NODE), 0, AllocNodePtr->BufferSize, &(AllocParams->StdHeader)); + LibAmdMemFill ((uint8_t *)AllocNodePtr + sizeof (BIOS_BUFFER_NODE), 0, AllocNodePtr->BufferSize, &(AllocParams->StdHeader)); AllocNodePtr->BufferHandle = 0; AllocNodePtr->BufferSize += sizeof (BIOS_BUFFER_NODE);
@@ -348,17 +349,17 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return AGESA_SUCCESS; }
-AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosLocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr) { - UINT32 AllocNodeOffset; - UINT8 *BiosHeapBaseAddr; + uint32_t AllocNodeOffset; + uint8_t *BiosHeapBaseAddr; BIOS_BUFFER_NODE *AllocNodePtr; BIOS_HEAP_MANAGER *BiosHeapBasePtr; AGESA_BUFFER_PARAMS *AllocParams;
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
- BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader)); + BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader)); BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
AllocNodeOffset = BiosHeapBasePtr->StartOfAllocatedNodes; @@ -375,14 +376,14 @@ AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) } }
- AllocParams->BufferPointer = (UINT8 *) ((UINT8 *) AllocNodePtr + sizeof (BIOS_BUFFER_NODE)); + AllocParams->BufferPointer = (uint8_t *) ((uint8_t *) AllocNodePtr + sizeof (BIOS_BUFFER_NODE)); AllocParams->BufferLength = AllocNodePtr->BufferSize;
return AGESA_SUCCESS;
}
-AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosRunFuncOnAp (uint32_t Func, uint32_t Data, void *ConfigPtr) { AGESA_STATUS Status;
@@ -390,10 +391,10 @@ AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; }
-AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosReset (uint32_t Func, uint32_t Data, void *ConfigPtr) { AGESA_STATUS Status; - UINT8 Value; + uint8_t Value; UINTN ResetType; AMD_CONFIG_PARAMS *StdHeader;
@@ -426,7 +427,7 @@ AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; }
-AGESA_STATUS BiosReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosReadSpd (uint32_t Func, uint32_t Data, void *ConfigPtr) { AGESA_STATUS Status; #ifdef __PRE_RAM__ @@ -438,19 +439,19 @@ AGESA_STATUS BiosReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr) return Status; }
-AGESA_STATUS BiosDefaultRet (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosDefaultRet (uint32_t Func, uint32_t Data, void *ConfigPtr) { return AGESA_UNSUPPORTED; }
/* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosHookBeforeDQSTraining (uint32_t Func, uint32_t Data, void *ConfigPtr) { return AGESA_SUCCESS; }
/* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosHookBeforeDramInit (uint32_t Func, uint32_t Data, void *ConfigPtr) { /* Unlike e.g. AMD Inagua, Persimmon is unable to vary the RAM voltage. * Make sure the right speed settings are selected. @@ -460,28 +461,28 @@ AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr) }
/* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeDramInitRecovery (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosHookBeforeDramInitRecovery (uint32_t Func, uint32_t Data, void *ConfigPtr) { return AGESA_SUCCESS; }
/* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosHookBeforeExitSelfRefresh (uint32_t Func, uint32_t Data, void *ConfigPtr) { return AGESA_SUCCESS; }
/* PCIE slot reset control */ -AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) +AGESA_STATUS BiosGnbPcieSlotReset (uint32_t Func, uint32_t Data, void *ConfigPtr) { AGESA_STATUS Status; UINTN FcnData; PCIe_SLOT_RESET_INFO *ResetInfo;
- UINT32 GpioMmioAddr; - UINT32 AcpiMmioAddr; - UINT8 Data8; - UINT16 Data16; + uint32_t GpioMmioAddr; + uint32_t AcpiMmioAddr; + uint8_t Data8; + uint16_t Data16;
FcnData = Data; ResetInfo = ConfigPtr; @@ -492,7 +493,7 @@ AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) WriteIo8(0xCD6, 0x26); Data8 = ReadIo8(0xCD7); Data16|=Data8; - AcpiMmioAddr = (UINT32)Data16 << 16; + AcpiMmioAddr = (uint32_t)Data16 << 16; Status = AGESA_UNSUPPORTED; GpioMmioAddr = AcpiMmioAddr + GPIO_BASE; switch (ResetInfo->ResetId) @@ -501,7 +502,7 @@ AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr) switch (ResetInfo->ResetControl) { case AssertSlotReset: Data8 = Read64Mem8(GpioMmioAddr+SB_GPIO_REG50); - Data8 &= ~(UINT8)BIT6 ; + Data8 &= ~(uint8_t)BIT6 ; Write64Mem8(GpioMmioAddr+SB_GPIO_REG50, Data8); Status = AGESA_SUCCESS; break; diff --git a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h index 40dc809..6464a16 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h +++ b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h @@ -23,52 +23,54 @@ #include "Porting.h" #include "AGESA.h"
+#include <stdint.h> + #define BIOS_HEAP_START_ADDRESS 0x10000 /* HEAP during cold boot */ #define BIOS_HEAP_SIZE 0x20000 #define BSP_STACK_BASE_ADDR 0x30000
typedef struct _BIOS_HEAP_MANAGER { - //UINT32 AvailableSize; - UINT32 StartOfAllocatedNodes; - UINT32 StartOfFreedNodes; + //uint32_t AvailableSize; + uint32_t StartOfAllocatedNodes; + uint32_t StartOfFreedNodes; } BIOS_HEAP_MANAGER;
typedef struct _BIOS_BUFFER_NODE { - UINT32 BufferHandle; - UINT32 BufferSize; - UINT32 NextNodeOffset; + uint32_t BufferHandle; + uint32_t BufferSize; + uint32_t NextNodeOffset; } BIOS_BUFFER_NODE;
/* * Callouts */ -AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS GetBiosCallout (uint32_t Func, uint32_t Data, void *ConfigPtr);
/* Required Callouts * AGESA Advanced Callouts - CPU */ -AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr); -AGESA_STATUS BiosGetIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr); +AGESA_STATUS BiosDeallocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr); +AGESA_STATUS BiosLocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr); +AGESA_STATUS BiosRunFuncOnAp (uint32_t Func, uint32_t Data, void *ConfigPtr); +AGESA_STATUS BiosReset (uint32_t Func, uint32_t Data, void *ConfigPtr); +AGESA_STATUS BiosGetIdsInitData (uint32_t Func, uint32_t Data, void *ConfigPtr);
/* AGESA Advanced Callouts - Memory */ -AGESA_STATUS BiosReadSpd (UINT32 Func,UINT32 Data,VOID *ConfigPtr); +AGESA_STATUS BiosReadSpd (uint32_t Func,uint32_t Data,void *ConfigPtr);
/* BIOS default RET */ -AGESA_STATUS BiosDefaultRet (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS BiosDefaultRet (uint32_t Func, uint32_t Data, void *ConfigPtr);
/* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS BiosHookBeforeDQSTraining (uint32_t Func, uint32_t Data, void *ConfigPtr); /* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS BiosHookBeforeDramInit (uint32_t Func, uint32_t Data, void *ConfigPtr); /* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeDramInitRecovery (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS BiosHookBeforeDramInitRecovery (uint32_t Func, uint32_t Data, void *ConfigPtr); /* Call the host environment interface to provide a user hook opportunity. */ -AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS BiosHookBeforeExitSelfRefresh (uint32_t Func, uint32_t Data, void *ConfigPtr); /* PCIE slot reset control */ -AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr); +AGESA_STATUS BiosGnbPcieSlotReset (uint32_t Func, uint32_t Data, void *ConfigPtr);
#endif /* _BIOS_CALLOUT_H_ */ diff --git a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c index 1c16818..949baf8 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c +++ b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c @@ -27,15 +27,12 @@
#define FILECODE PROC_RECOVERY_MEM_NB_ON_MRNON_FILECODE
-VOID -OemCustomizeInitEarly ( - IN OUT AMD_EARLY_PARAMS *InitEarly - ) +void OemCustomizeInitEarly (IN OUT AMD_EARLY_PARAMS *InitEarly) { - AGESA_STATUS Status; - VOID *BrazosPcieComplexListPtr; - VOID *BrazosPciePortPtr; - VOID *BrazosPcieDdiPtr; + AGESA_STATUS Status; + void *BrazosPcieComplexListPtr; + void *BrazosPciePortPtr; + void *BrazosPcieDdiPtr;
ALLOCATE_HEAP_PARAMS AllocHeapParams;
diff --git a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h index b620d20..dd6f7d7 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h +++ b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h @@ -79,9 +79,6 @@ #define GNB_GPP_PORT8_CHANNEL_TYPE 4 #define GNB_GPP_PORT8_HOTPLUG_SUPPORT 0
-VOID -OemCustomizeInitEarly ( - IN OUT AMD_EARLY_PARAMS *InitEarly - ); +void OemCustomizeInitEarly (IN OUT AMD_EARLY_PARAMS *InitEarly);
#endif /* _PLATFORM_GNB_PCIE_COMPLEX_H */ diff --git a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c index f4dffcd..45a9fae 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c +++ b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c @@ -40,16 +40,16 @@ #define MMCONF_ENABLE 1
/* ACPI table pointers returned by AmdInitLate */ -VOID *DmiTable = NULL; -VOID *AcpiPstate = NULL; -VOID *AcpiSrat = NULL; -VOID *AcpiSlit = NULL; +void *DmiTable = NULL; +void *AcpiPstate = NULL; +void *AcpiSrat = NULL; +void *AcpiSlit = NULL;
-VOID *AcpiWheaMce = NULL; -VOID *AcpiWheaCmc = NULL; -VOID *AcpiAlib = NULL; +void *AcpiWheaMce = NULL; +void *AcpiWheaCmc = NULL; +void *AcpiAlib = NULL;
-uint32_t agesawrapper_amdinitcpuio(void) +AGESA_STATUS agesawrapper_amdinitcpuio(void) { pci_devfn_t dev; msr_t msr; @@ -84,25 +84,21 @@ uint32_t agesawrapper_amdinitcpuio(void) return AGESA_SUCCESS; }
-UINT32 -agesawrapper_amdinitmmio ( - VOID - ) +AGESA_STATUS agesawrapper_amdinitmmio(void) { - AGESA_STATUS Status; UINT64 MsrReg; - UINT32 PciData; + uint32_t PciData; PCI_ADDR PciAddress; AMD_CONFIG_PARAMS StdHeader;
- UINT8 BusRangeVal = 0; - UINT8 BusNum; - UINT8 Index; + uint8_t BusRangeVal = 0; + uint8_t BusNum; + uint8_t Index;
/* - Set the MMIO Configuration Base Address and Bus Range onto MMIO configuration base - Address MSR register. - */ + * Set the MMIO Configuration Base Address and Bus Range onto MMIO + * configuration base Address MSR register. + */
for (Index = 0; Index < 8; Index++) { BusNum = CONFIG_MMCONF_BUS_NUMBER >> Index; @@ -130,14 +126,10 @@ agesawrapper_amdinitmmio ( PciData = (AMD_APU_SSID<<0x10)|AMD_APU_SVID; LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
- Status = AGESA_SUCCESS; - return (UINT32)Status; + return AGESA_SUCCESS; }
-UINT32 -agesawrapper_amdinitreset ( - VOID - ) +AGESA_STATUS agesawrapper_amdinitreset(void) { AGESA_STATUS status; AMD_INTERFACE_PARAMS AmdParamStruct; @@ -160,13 +152,11 @@ 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 ( - VOID - ) +AGESA_STATUS agesawrapper_amdinitearly(void) { AGESA_STATUS status; AMD_INTERFACE_PARAMS AmdParamStruct; @@ -189,19 +179,19 @@ agesawrapper_amdinitearly ( if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(); AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status; + return status; }
-UINT32 GetHeapBase( +uint32_t GetHeapBase( AMD_CONFIG_PARAMS *StdHeader ) { - UINT32 heap; + uint32_t heap;
#if CONFIG_HAVE_ACPI_RESUME /* Both romstage and ramstage has this S3 detect. */ if (acpi_get_sleep_type() == 3) - heap = (UINT32)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* himem_heap_base + high_stack_size */ + heap = (uint32_t)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* himem_heap_base + high_stack_size */ else #endif heap = BIOS_HEAP_START_ADDRESS; /* low mem */ @@ -209,14 +199,11 @@ UINT32 GetHeapBase( return heap; }
-UINT32 -agesawrapper_amdinitpost ( - VOID - ) +AGESA_STATUS agesawrapper_amdinitpost(void) { AGESA_STATUS status; - UINT16 i; - UINT32 *HeadPtr; + uint16_t i; + uint32_t *HeadPtr; AMD_INTERFACE_PARAMS AmdParamStruct; BIOS_HEAP_MANAGER *BiosManagerPtr;
@@ -237,7 +224,7 @@ agesawrapper_amdinitpost ( /* Initialize heap space */ BiosManagerPtr = (BIOS_HEAP_MANAGER *)GetHeapBase(&AmdParamStruct.StdHeader);
- HeadPtr = (UINT32 *) ((UINT8 *) BiosManagerPtr + sizeof (BIOS_HEAP_MANAGER)); + HeadPtr = (uint32_t *) ((uint8_t *) BiosManagerPtr + sizeof (BIOS_HEAP_MANAGER)); for (i = 0; i < ((BIOS_HEAP_SIZE/4) - (sizeof (BIOS_HEAP_MANAGER)/4)); i++) { *HeadPtr = 0x00000000; HeadPtr++; @@ -245,18 +232,15 @@ agesawrapper_amdinitpost ( BiosManagerPtr->StartOfAllocatedNodes = 0; BiosManagerPtr->StartOfFreedNodes = 0;
- return (UINT32)status; + return status; }
-UINT32 -agesawrapper_amdinitenv ( - VOID - ) +AGESA_STATUS agesawrapper_amdinitenv(void) { AGESA_STATUS status; AMD_INTERFACE_PARAMS AmdParamStruct; PCI_ADDR PciAddress; - UINT32 PciValue; + uint32_t PciValue;
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
@@ -343,13 +327,10 @@ agesawrapper_amdinitenv ( LibAmdPciWrite (AccessWidth32, PciAddress, &PciValue, &AmdParamStruct.StdHeader); AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status; + return status; }
-VOID * -agesawrapper_getlateinitptr ( - int pick - ) +void * agesawrapper_getlateinitptr(int pick) { switch (pick) { case PICK_DMI: @@ -371,10 +352,7 @@ agesawrapper_getlateinitptr ( } }
-UINT32 -agesawrapper_amdinitmid ( - VOID - ) +AGESA_STATUS agesawrapper_amdinitmid(void) { AGESA_STATUS status; AMD_INTERFACE_PARAMS AmdParamStruct; @@ -397,15 +375,12 @@ 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; + AGESA_STATUS status; AMD_INTERFACE_PARAMS AmdParamStruct; AMD_LATE_PARAMS * AmdLateParamsPtr;
@@ -423,10 +398,10 @@ agesawrapper_amdinitlate (
printk (BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32)AmdLateParamsPtr);
- Status = AmdInitLate (AmdLateParamsPtr); - if (Status != AGESA_SUCCESS) { + status = AmdInitLate (AmdLateParamsPtr); + if (status != AGESA_SUCCESS) { agesawrapper_amdreadeventlog(); - ASSERT(Status == AGESA_SUCCESS); + ASSERT(status == AGESA_SUCCESS); }
DmiTable = AmdLateParamsPtr->DmiTable; @@ -447,14 +422,11 @@ agesawrapper_amdinitlate ( * AmdReleaseStruct (&AmdLateParams); */
- return (UINT32)Status; + return status; }
#if CONFIG_HAVE_ACPI_RESUME -UINT32 -agesawrapper_amdinitresume ( - VOID - ) +AGESA_STATUS agesawrapper_amdinitresume(void) { AGESA_STATUS status; AMD_INTERFACE_PARAMS AmdParamStruct; @@ -486,15 +458,12 @@ agesawrapper_amdinitresume ( if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(); AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status; + return status; }
-UINT32 -agesawrapper_amds3laterestore ( - VOID - ) +AGESA_STATUS agesawrapper_amds3laterestore(void) { - AGESA_STATUS Status; + AGESA_STATUS status; AMD_INTERFACE_PARAMS AmdInterfaceParams; AMD_S3LATE_PARAMS AmdS3LateParams; AMD_S3LATE_PARAMS *AmdS3LateParamsPtr; @@ -519,22 +488,19 @@ agesawrapper_amds3laterestore ( (u32 *) &AmdS3LateParamsPtr->S3DataBlock.VolatileStorageSize, (void **) &AmdS3LateParamsPtr->S3DataBlock.VolatileStorage);
- Status = AmdS3LateRestore (AmdS3LateParamsPtr); - if (Status != AGESA_SUCCESS) { + status = AmdS3LateRestore (AmdS3LateParamsPtr); + if (status != AGESA_SUCCESS) { agesawrapper_amdreadeventlog(); - ASSERT(Status == AGESA_SUCCESS); + ASSERT(status == AGESA_SUCCESS); }
- return (UINT32)Status; + return status; }
#ifndef __PRE_RAM__ -UINT32 -agesawrapper_amdS3Save ( - VOID - ) +AGESA_STATUS agesawrapper_amdS3Save(void) { - AGESA_STATUS Status; + AGESA_STATUS status; AMD_S3SAVE_PARAMS *AmdS3SaveParamsPtr; AMD_INTERFACE_PARAMS AmdInterfaceParams; S3_DATA_TYPE S3DataType; @@ -553,15 +519,15 @@ agesawrapper_amdS3Save ( AmdS3SaveParamsPtr = (AMD_S3SAVE_PARAMS *)AmdInterfaceParams.NewStructPtr; AmdS3SaveParamsPtr->StdHeader = AmdInterfaceParams.StdHeader;
- Status = AmdS3Save (AmdS3SaveParamsPtr); - if (Status != AGESA_SUCCESS) { + status = AmdS3Save (AmdS3SaveParamsPtr); + if (status != AGESA_SUCCESS) { agesawrapper_amdreadeventlog(); - ASSERT(Status == AGESA_SUCCESS); + ASSERT(status == AGESA_SUCCESS); }
S3DataType = S3DataTypeNonVolatile;
- Status = OemAgesaSaveS3Info ( + status = OemAgesaSaveS3Info ( S3DataType, AmdS3SaveParamsPtr->S3DataBlock.NvStorageSize, AmdS3SaveParamsPtr->S3DataBlock.NvStorage); @@ -569,7 +535,7 @@ agesawrapper_amdS3Save ( if (AmdS3SaveParamsPtr->S3DataBlock.VolatileStorageSize != 0) { S3DataType = S3DataTypeVolatile;
- Status = OemAgesaSaveS3Info ( + status = OemAgesaSaveS3Info ( S3DataType, AmdS3SaveParamsPtr->S3DataBlock.VolatileStorageSize, AmdS3SaveParamsPtr->S3DataBlock.VolatileStorage @@ -579,19 +545,18 @@ agesawrapper_amdS3Save ( OemAgesaSaveMtrr(); AmdReleaseStruct (&AmdInterfaceParams);
- return (UINT32)Status; + return status; } #endif /* #ifndef __PRE_RAM__ */ #endif /* CONFIG_HAVE_ACPI_RESUME */
-UINT32 -agesawrapper_amdlaterunaptask ( - UINT32 Func, - UINT32 Data, - VOID *ConfigPtr +AGESA_STATUS agesawrapper_amdlaterunaptask ( + uint32_t Func, + uint32_t Data, + void *ConfigPtr ) { - AGESA_STATUS Status; + AGESA_STATUS status; AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS)); @@ -603,21 +568,18 @@ agesawrapper_amdlaterunaptask ( ApExeParams.FunctionNumber = Func; ApExeParams.RelatedDataBlock = ConfigPtr;
- Status = AmdLateRunApTask (&ApExeParams); - if (Status != AGESA_SUCCESS) { + status = AmdLateRunApTask (&ApExeParams); + if (status != AGESA_SUCCESS) { agesawrapper_amdreadeventlog(); - ASSERT(Status == AGESA_SUCCESS); + ASSERT(status == AGESA_SUCCESS); }
- return (UINT32)Status; + return status; }
-UINT32 -agesawrapper_amdreadeventlog ( - VOID - ) +AGESA_STATUS agesawrapper_amdreadeventlog(void) { - AGESA_STATUS Status; + AGESA_STATUS status; EVENT_PARAMS AmdEventParams;
memset(&AmdEventParams, 0, sizeof(EVENT_PARAMS)); @@ -626,13 +588,13 @@ agesawrapper_amdreadeventlog ( AmdEventParams.StdHeader.CalloutPtr = NULL; AmdEventParams.StdHeader.Func = 0; AmdEventParams.StdHeader.ImageBasePtr = 0; - Status = AmdReadEventLog (&AmdEventParams); + status = AmdReadEventLog (&AmdEventParams); while (AmdEventParams.EventClass != 0) { printk(BIOS_DEBUG,"\nEventLog: EventClass = %lx, EventInfo = %lx.\n",AmdEventParams.EventClass,AmdEventParams.EventInfo); printk(BIOS_DEBUG," Param1 = %lx, Param2 = %lx.\n",AmdEventParams.DataParam1,AmdEventParams.DataParam2); printk(BIOS_DEBUG," Param3 = %lx, Param4 = %lx.\n",AmdEventParams.DataParam3,AmdEventParams.DataParam4); - Status = AmdReadEventLog (&AmdEventParams); + status = AmdReadEventLog (&AmdEventParams); }
- return (UINT32)Status; + return status; } diff --git a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h index ee31fcf..f10117f 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h +++ b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h @@ -42,27 +42,27 @@ enum { };
typedef struct { - UINT32 CalloutName; - AGESA_STATUS (*CalloutPtr) (UINT32 Func, UINT32 Data, VOID* ConfigPtr); + uint32_t CalloutName; + AGESA_STATUS (*CalloutPtr) (uint32_t Func, uint32_t Data, void* ConfigPtr); } BIOS_CALLOUT_STRUCT;
-UINT32 agesawrapper_amdinitreset (void); -UINT32 agesawrapper_amdinitearly (void); -UINT32 agesawrapper_amdinitenv (void); -UINT32 agesawrapper_amdinitlate (void); -UINT32 agesawrapper_amdinitpost (void); -UINT32 agesawrapper_amdinitmid (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);
-UINT32 agesawrapper_amdreadeventlog (void); +AGESA_STATUS agesawrapper_amdreadeventlog(void);
-uint32_t 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); -void *agesawrapper_getlateinitptr (int pick); +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_t, uint32_t, void *); +void * agesawrapper_getlateinitptr(int);
-UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader); +uint32_t GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
#endif /* _AGESAWRAPPER_H_ */ diff --git a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c index 532e1c9..7f11ff6 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c +++ b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c @@ -239,7 +239,7 @@ */
/* The fixed MTRR values to be set after memory initialization. */ -CONST AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] = +const AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] = { { AMD_AP_MTRR_FIX64k_00000, 0x1E1E1E1E1E1E1E1Eull }, { AMD_AP_MTRR_FIX16k_80000, 0x1E1E1E1E1E1E1E1Eull }, @@ -330,16 +330,16 @@ CONST AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] = * If PlatformSpecificTable is populated, AGESA will base its settings on the * data from the table. Otherwise, it will use its default conservative settings. */ -CONST PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = { +const PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = { NUMBER_OF_DIMMS_SUPPORTED (ANY_SOCKET, ANY_CHANNEL, 2), NUMBER_OF_CHANNELS_SUPPORTED (ANY_SOCKET, 1), PSO_END };
/* DA Customer table */ -CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = +const uint8_t AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] = { NBACCESS (MTEnd, 0, 0, 0, 0, 0), /* End of Table */ };
-CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]); +const uint8_t SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]);