diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:53:52 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 2b16a4fb91b9b31c0d152588f5ac51080c6c0763 (patch) | |
tree | 72c352a8e807a4720c1675a755969206c6370588 /ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c | |
parent | 40b0b23ed34f48c26d711d3e4613a4bb35eeadff (diff) | |
download | edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.tar.gz edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.tar.bz2 edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.zip |
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>
Diffstat (limited to 'ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c')
-rw-r--r-- | ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c index 3f96b1e450..c340212432 100644 --- a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c +++ b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c @@ -74,7 +74,7 @@ SerialPortGetBaseAddress ( //
// Enumerate all FDT nodes looking for a PL011 and capture its base address
//
- for (Prev = 0;; Prev = Node) {
+ for (Prev = 0; ; Prev = Node) {
Node = fdt_next_node (DeviceTreeBase, Prev, NULL);
if (Node < 0) {
break;
@@ -89,11 +89,11 @@ SerialPortGetBaseAddress ( // Iterate over the NULL-separated items in the compatible string
//
for (CompatibleItem = Compatible; CompatibleItem < Compatible + Len;
- CompatibleItem += 1 + AsciiStrLen (CompatibleItem)) {
-
+ CompatibleItem += 1 + AsciiStrLen (CompatibleItem))
+ {
if (AsciiStrCmp (CompatibleItem, "arm,pl011") == 0) {
NodeStatus = fdt_getprop (DeviceTreeBase, Node, "status", &Len);
- if (NodeStatus != NULL && AsciiStrCmp (NodeStatus, "okay") != 0) {
+ if ((NodeStatus != NULL) && (AsciiStrCmp (NodeStatus, "okay") != 0)) {
continue;
}
@@ -101,13 +101,14 @@ SerialPortGetBaseAddress ( if (Len != 16) {
return 0;
}
+
UartBase = (UINTN)fdt64_to_cpu (ReadUnaligned64 (RegProperty));
- BaudRate = (UINTN)FixedPcdGet64 (PcdUartDefaultBaudRate);
+ BaudRate = (UINTN)FixedPcdGet64 (PcdUartDefaultBaudRate);
ReceiveFifoDepth = 0; // Use the default value for Fifo depth
- Parity = (EFI_PARITY_TYPE)FixedPcdGet8 (PcdUartDefaultParity);
- DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);
- StopBits = (EFI_STOP_BITS_TYPE) FixedPcdGet8 (PcdUartDefaultStopBits);
+ Parity = (EFI_PARITY_TYPE)FixedPcdGet8 (PcdUartDefaultParity);
+ DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);
+ StopBits = (EFI_STOP_BITS_TYPE)FixedPcdGet8 (PcdUartDefaultStopBits);
Status = PL011UartInitializePort (
UartBase,
@@ -124,6 +125,7 @@ SerialPortGetBaseAddress ( }
}
}
+
return 0;
}
@@ -140,16 +142,17 @@ SerialPortGetBaseAddress ( UINTN
EFIAPI
SerialPortWrite (
- IN UINT8 *Buffer,
- IN UINTN NumberOfBytes
+ IN UINT8 *Buffer,
+ IN UINTN NumberOfBytes
)
{
- UINT64 SerialRegisterBase;
+ UINT64 SerialRegisterBase;
SerialRegisterBase = SerialPortGetBaseAddress ();
if (SerialRegisterBase != 0) {
return PL011UartWrite ((UINTN)SerialRegisterBase, Buffer, NumberOfBytes);
}
+
return 0;
}
@@ -166,9 +169,9 @@ SerialPortWrite ( UINTN
EFIAPI
SerialPortRead (
- OUT UINT8 *Buffer,
- IN UINTN NumberOfBytes
-)
+ OUT UINT8 *Buffer,
+ IN UINTN NumberOfBytes
+ )
{
return 0;
}
@@ -202,7 +205,7 @@ SerialPortPoll ( RETURN_STATUS
EFIAPI
SerialPortSetControl (
- IN UINT32 Control
+ IN UINT32 Control
)
{
return RETURN_UNSUPPORTED;
@@ -221,7 +224,7 @@ SerialPortSetControl ( RETURN_STATUS
EFIAPI
SerialPortGetControl (
- OUT UINT32 *Control
+ OUT UINT32 *Control
)
{
return RETURN_UNSUPPORTED;
@@ -263,14 +266,13 @@ SerialPortGetControl ( 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 RETURN_UNSUPPORTED;
}
-
|