soc/amd: Convert from AMD units to coreboot units

There are several files under soc/amd that use units defined by file
porting.h. These units use upper case, and are not recognized by checkpatch,
thus causing problems when defining a pointer (request to use space before
and after the star symbol). These are the definitions from porting.h showing
the units that this patch will change and their coreboot definitions (not all
are actually used):
  typedef uintptr_t      UINTN;
  typedef int64_t        INT64;
  typedef uint64_t       UINT64;
  typedef int32_t        INT32;
  typedef uint32_t       UINT32;
  typedef int16_t        INT16;
  typedef uint16_t       UINT16;
  typedef int8_t         INT8;
  typedef uint8_t        UINT8;
  typedef char           CHAR8;
  typedef unsigned short CHAR16;
  typedef unsigned char  BOOLEAN;
  typedef void VOID;

BUG=b:118775313
TEST=Build and boot grunt.

Change-Id: Ic1bd64d6224a030a65d23decabf0e602cee02871
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/29520
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Richard Spiegel
2018-11-06 16:32:28 -07:00
committed by Patrick Georgi
parent 509d99ca6b
commit 271b8a5f81
7 changed files with 117 additions and 101 deletions

View File

@@ -27,10 +27,10 @@
#include "chip.h"
#include <amdblocks/car.h>
void __weak platform_FchParams_reset(
FCH_RESET_DATA_BLOCK *FchParams_reset) {}
void __weak platform_FchParams_reset(FCH_RESET_DATA_BLOCK *FchParams_reset) {}
AGESA_STATUS agesa_fch_initreset(UINT32 Func, UINTN FchData, VOID *ConfigPtr)
AGESA_STATUS agesa_fch_initreset(uint32_t Func, uintptr_t FchData,
void *ConfigPtr)
{
AMD_CONFIG_PARAMS *StdHeader = ConfigPtr;
@@ -48,7 +48,8 @@ AGESA_STATUS agesa_fch_initreset(UINT32 Func, UINTN FchData, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
AGESA_STATUS agesa_fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr)
AGESA_STATUS agesa_fch_initenv(uint32_t Func, uintptr_t FchData,
void *ConfigPtr)
{
AMD_CONFIG_PARAMS *StdHeader = ConfigPtr;
const struct device *dev = dev_find_slot(0, SATA_DEVFN);
@@ -92,7 +93,7 @@ AGESA_STATUS agesa_fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
AGESA_STATUS agesa_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr)
AGESA_STATUS agesa_ReadSpd(uint32_t Func, uintptr_t Data, void *ConfigPtr)
{
uint8_t spd_address;
int err;
@@ -137,7 +138,7 @@ AGESA_STATUS agesa_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
AGESA_STATUS agesa_HaltThisAp(UINT32 Func, UINTN Data, VOID *ConfigPtr)
AGESA_STATUS agesa_HaltThisAp(uint32_t Func, uintptr_t Data, void *ConfigPtr)
{
AGESA_HALT_THIS_AP_PARAMS *info = ConfigPtr;
uint32_t flags = 0;