]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.c
ArmPlatformPkg: Update PL011 Serial PCDs to Fixed PCDs
[mirror_edk2.git] / ArmPlatformPkg / Drivers / PL011Uart / PL011Uart.c
index ab00cae26d92fced0f14bb17706129859846ad3c..d0f9381e9eaad2c14e1c86b89ff1c1cf9f0a6427 100644 (file)
@@ -168,17 +168,17 @@ PL011UartInitializePort (
   //\r
 \r
   // If PL011 Integer value has been defined then always ignore the BAUD rate\r
   //\r
 \r
   // If PL011 Integer value has been defined then always ignore the BAUD rate\r
-  if (PcdGet32 (PL011UartInteger) != 0) {\r
-      MmioWrite32 (UartBase + UARTIBRD, PcdGet32 (PL011UartInteger));\r
-      MmioWrite32 (UartBase + UARTFBRD, PcdGet32 (PL011UartFractional));\r
+  if (FixedPcdGet32 (PL011UartInteger) != 0) {\r
+      MmioWrite32 (UartBase + UARTIBRD, FixedPcdGet32 (PL011UartInteger));\r
+      MmioWrite32 (UartBase + UARTFBRD, FixedPcdGet32 (PL011UartFractional));\r
   } else {\r
     // If BAUD rate is zero then replace it with the system default value\r
     if (*BaudRate == 0) {\r
   } else {\r
     // If BAUD rate is zero then replace it with the system default value\r
     if (*BaudRate == 0) {\r
-      *BaudRate = PcdGet32 (PcdSerialBaudRate);\r
+      *BaudRate = FixedPcdGet32 (PcdSerialBaudRate);\r
       ASSERT (*BaudRate != 0);\r
     }\r
 \r
       ASSERT (*BaudRate != 0);\r
     }\r
 \r
-    Divisor = (PcdGet32 (PL011UartClkInHz) * 4) / *BaudRate;\r
+    Divisor = (FixedPcdGet32 (PL011UartClkInHz) * 4) / *BaudRate;\r
     MmioWrite32 (UartBase + UARTIBRD, Divisor >> FRACTION_PART_SIZE_IN_BITS);\r
     MmioWrite32 (UartBase + UARTFBRD, Divisor & FRACTION_PART_MASK);\r
   }\r
     MmioWrite32 (UartBase + UARTIBRD, Divisor >> FRACTION_PART_SIZE_IN_BITS);\r
     MmioWrite32 (UartBase + UARTFBRD, Divisor & FRACTION_PART_MASK);\r
   }\r