]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Csm/CsmSupportLib/LegacyInterrupt.c
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Csm / CsmSupportLib / LegacyInterrupt.c
index 97ca21945fe7a0106918633bb730411126ba449f..5bed2e2b5107a17021d8164cecc31255c6201e0d 100644 (file)
 //\r
 // Handle for the Legacy Interrupt Protocol instance produced by this driver\r
 //\r
-STATIC EFI_HANDLE mLegacyInterruptHandle = NULL;\r
+STATIC EFI_HANDLE  mLegacyInterruptHandle = NULL;\r
 \r
 //\r
 // Legacy Interrupt Device number (0x01 on piix4, 0x1f on q35/mch)\r
 //\r
-STATIC UINT8      mLegacyInterruptDevice;\r
+STATIC UINT8  mLegacyInterruptDevice;\r
 \r
 //\r
 // The Legacy Interrupt Protocol instance produced by this driver\r
 //\r
-STATIC EFI_LEGACY_INTERRUPT_PROTOCOL mLegacyInterrupt = {\r
+STATIC EFI_LEGACY_INTERRUPT_PROTOCOL  mLegacyInterrupt = {\r
   GetNumberPirqs,\r
   GetLocation,\r
   ReadPirq,\r
   WritePirq\r
 };\r
 \r
-STATIC UINT8 PirqReg[MAX_PIRQ_NUMBER] = { PIRQA, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH };\r
-\r
+STATIC UINT8  PirqReg[MAX_PIRQ_NUMBER] = { PIRQA, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH };\r
 \r
 /**\r
   Return the number of PIRQs supported by this chipset.\r
@@ -53,7 +52,6 @@ GetNumberPirqs (
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   Return PCI location of this device.\r
   $PIR table requires this info.\r
@@ -82,7 +80,6 @@ GetLocation (
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   Builds the PCI configuration address for the register specified by PirqNumber\r
 \r
@@ -95,12 +92,12 @@ GetAddress (
   UINT8  PirqNumber\r
   )\r
 {\r
-  return PCI_LIB_ADDRESS(\r
-          LEGACY_INT_BUS,\r
-          mLegacyInterruptDevice,\r
-          LEGACY_INT_FUNC,\r
-          PirqReg[PirqNumber]\r
-          );\r
+  return PCI_LIB_ADDRESS (\r
+           LEGACY_INT_BUS,\r
+           mLegacyInterruptDevice,\r
+           LEGACY_INT_FUNC,\r
+           PirqReg[PirqNumber]\r
+           );\r
 }\r
 \r
 /**\r
@@ -127,12 +124,11 @@ ReadPirq (
   }\r
 \r
   *PirqData = PciRead8 (GetAddress (PirqNumber));\r
-  *PirqData = (UINT8) (*PirqData & 0x7f);\r
+  *PirqData = (UINT8)(*PirqData & 0x7f);\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   Write the given PIRQ register\r
 \r
@@ -160,7 +156,6 @@ WritePirq (
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   Initialize Legacy Interrupt support\r
 \r
@@ -178,7 +173,7 @@ LegacyInterruptInstall (
   //\r
   // Make sure the Legacy Interrupt Protocol is not already installed in the system\r
   //\r
-  ASSERT_PROTOCOL_ALREADY_INSTALLED(NULL, &gEfiLegacyInterruptProtocolGuid);\r
+  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiLegacyInterruptProtocolGuid);\r
 \r
   //\r
   // Query Host Bridge DID to determine platform type, then set device number\r
@@ -192,8 +187,12 @@ LegacyInterruptInstall (
       mLegacyInterruptDevice = LEGACY_INT_DEV_Q35;\r
       break;\r
     default:\r
-      DEBUG ((DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",\r
-        __FUNCTION__, HostBridgeDevId));\r
+      DEBUG ((\r
+        DEBUG_ERROR,\r
+        "%a: Unknown Host Bridge Device ID: 0x%04x\n",\r
+        __FUNCTION__,\r
+        HostBridgeDevId\r
+        ));\r
       ASSERT (FALSE);\r
       return EFI_UNSUPPORTED;\r
   }\r
@@ -207,8 +206,7 @@ LegacyInterruptInstall (
                   &mLegacyInterrupt,\r
                   NULL\r
                   );\r
-  ASSERT_EFI_ERROR(Status);\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   return Status;\r
 }\r
-\r