ArmVirtPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the ArmVirtPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
40b0b23ed3
commit
2b16a4fb91
@@ -23,7 +23,7 @@
|
||||
#include <Library/HobLib.h>
|
||||
#include <Guid/EarlyPL011BaseAddress.h>
|
||||
|
||||
STATIC UINTN mSerialBaseAddress;
|
||||
STATIC UINTN mSerialBaseAddress;
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
@@ -57,9 +57,10 @@ FdtPL011SerialPortLibInitialize (
|
||||
EFI_STOP_BITS_TYPE StopBits;
|
||||
|
||||
Hob = GetFirstGuidHob (&gEarlyPL011BaseAddressGuid);
|
||||
if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof *UartBase) {
|
||||
if ((Hob == NULL) || (GET_GUID_HOB_DATA_SIZE (Hob) != sizeof *UartBase)) {
|
||||
return RETURN_NOT_FOUND;
|
||||
}
|
||||
|
||||
UartBase = GET_GUID_HOB_DATA (Hob);
|
||||
|
||||
mSerialBaseAddress = (UINTN)*UartBase;
|
||||
@@ -67,11 +68,11 @@ FdtPL011SerialPortLibInitialize (
|
||||
return RETURN_NOT_FOUND;
|
||||
}
|
||||
|
||||
BaudRate = (UINTN)PcdGet64 (PcdUartDefaultBaudRate);
|
||||
BaudRate = (UINTN)PcdGet64 (PcdUartDefaultBaudRate);
|
||||
ReceiveFifoDepth = 0; // Use the default value for Fifo depth
|
||||
Parity = (EFI_PARITY_TYPE)PcdGet8 (PcdUartDefaultParity);
|
||||
DataBits = PcdGet8 (PcdUartDefaultDataBits);
|
||||
StopBits = (EFI_STOP_BITS_TYPE) PcdGet8 (PcdUartDefaultStopBits);
|
||||
Parity = (EFI_PARITY_TYPE)PcdGet8 (PcdUartDefaultParity);
|
||||
DataBits = PcdGet8 (PcdUartDefaultDataBits);
|
||||
StopBits = (EFI_STOP_BITS_TYPE)PcdGet8 (PcdUartDefaultStopBits);
|
||||
|
||||
return PL011UartInitializePort (
|
||||
mSerialBaseAddress,
|
||||
@@ -97,13 +98,14 @@ FdtPL011SerialPortLibInitialize (
|
||||
UINTN
|
||||
EFIAPI
|
||||
SerialPortWrite (
|
||||
IN UINT8 *Buffer,
|
||||
IN UINTN NumberOfBytes
|
||||
IN UINT8 *Buffer,
|
||||
IN UINTN NumberOfBytes
|
||||
)
|
||||
{
|
||||
if (mSerialBaseAddress != 0) {
|
||||
return PL011UartWrite (mSerialBaseAddress, Buffer, NumberOfBytes);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -120,13 +122,14 @@ SerialPortWrite (
|
||||
UINTN
|
||||
EFIAPI
|
||||
SerialPortRead (
|
||||
OUT UINT8 *Buffer,
|
||||
IN UINTN NumberOfBytes
|
||||
)
|
||||
OUT UINT8 *Buffer,
|
||||
IN UINTN NumberOfBytes
|
||||
)
|
||||
{
|
||||
if (mSerialBaseAddress != 0) {
|
||||
return PL011UartRead (mSerialBaseAddress, Buffer, NumberOfBytes);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -146,6 +149,7 @@ SerialPortPoll (
|
||||
if (mSerialBaseAddress != 0) {
|
||||
return PL011UartPoll (mSerialBaseAddress);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -185,15 +189,15 @@ SerialPortPoll (
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
SerialPortSetAttributes (
|
||||
IN OUT UINT64 *BaudRate,
|
||||
IN OUT UINT32 *ReceiveFifoDepth,
|
||||
IN OUT UINT32 *Timeout,
|
||||
IN OUT EFI_PARITY_TYPE *Parity,
|
||||
IN OUT UINT8 *DataBits,
|
||||
IN OUT EFI_STOP_BITS_TYPE *StopBits
|
||||
IN OUT UINT64 *BaudRate,
|
||||
IN OUT UINT32 *ReceiveFifoDepth,
|
||||
IN OUT UINT32 *Timeout,
|
||||
IN OUT EFI_PARITY_TYPE *Parity,
|
||||
IN OUT UINT8 *DataBits,
|
||||
IN OUT EFI_STOP_BITS_TYPE *StopBits
|
||||
)
|
||||
{
|
||||
RETURN_STATUS Status;
|
||||
RETURN_STATUS Status;
|
||||
|
||||
if (mSerialBaseAddress == 0) {
|
||||
Status = RETURN_UNSUPPORTED;
|
||||
@@ -225,10 +229,10 @@ SerialPortSetAttributes (
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
SerialPortSetControl (
|
||||
IN UINT32 Control
|
||||
IN UINT32 Control
|
||||
)
|
||||
{
|
||||
RETURN_STATUS Status;
|
||||
RETURN_STATUS Status;
|
||||
|
||||
if (mSerialBaseAddress == 0) {
|
||||
Status = RETURN_UNSUPPORTED;
|
||||
@@ -252,10 +256,10 @@ SerialPortSetControl (
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
SerialPortGetControl (
|
||||
OUT UINT32 *Control
|
||||
OUT UINT32 *Control
|
||||
)
|
||||
{
|
||||
RETURN_STATUS Status;
|
||||
RETURN_STATUS Status;
|
||||
|
||||
if (mSerialBaseAddress == 0) {
|
||||
Status = RETURN_UNSUPPORTED;
|
||||
@@ -265,4 +269,3 @@ SerialPortGetControl (
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user