]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c
MdeModulePkg/PciBus: Accept Spec values as BarIndex and Alignment
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / SdMmcPciHcDxe / SdDevice.c
index 8193f4eb2f44c89bcb6dd7759a4005ef1e50a712..91228480219bf924ae44fe39dae33dc2b57d05ad 100644 (file)
@@ -779,7 +779,7 @@ SdCardTuningClock (
   do {\r
     Status = SdCardSendTuningBlk (PassThru, Slot);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "SdCardSendTuningBlk: Send tuning block fails with %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "SdCardSendTuningBlk: Send tuning block fails with %r\n", Status));\r
       return Status;\r
     }\r
 \r
@@ -796,7 +796,7 @@ SdCardTuningClock (
     }\r
   } while (++Retry < 40);\r
 \r
-  DEBUG ((EFI_D_ERROR, "SdCardTuningClock: Send tuning block fails at %d times with HostCtrl2 %02x\n", Retry, HostCtrl2));\r
+  DEBUG ((DEBUG_ERROR, "SdCardTuningClock: Send tuning block fails at %d times with HostCtrl2 %02x\n", Retry, HostCtrl2));\r
   //\r
   // Abort the tuning procedure and reset the tuning circuit.\r
   //\r
@@ -838,20 +838,20 @@ SdCardSwitchBusWidth (
 \r
   Status = SdCardSetBusWidth (PassThru, Slot, Rca, BusWidth);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdCardSwitchBusWidth: Switch to bus width %d fails with %r\n", BusWidth, Status));\r
+    DEBUG ((DEBUG_ERROR, "SdCardSwitchBusWidth: Switch to bus width %d fails with %r\n", BusWidth, Status));\r
     return Status;\r
   }\r
 \r
   Status = SdCardSendStatus (PassThru, Slot, Rca, &DevStatus);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdCardSwitchBusWidth: Send status fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdCardSwitchBusWidth: Send status fails with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
   // Check the switch operation is really successful or not.\r
   //\r
   if ((DevStatus >> 16) != 0) {\r
-    DEBUG ((EFI_D_ERROR, "SdCardSwitchBusWidth: The switch operation fails as DevStatus is 0x%08x\n", DevStatus));\r
+    DEBUG ((DEBUG_ERROR, "SdCardSwitchBusWidth: The switch operation fails as DevStatus is 0x%08x\n", DevStatus));\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
@@ -944,11 +944,11 @@ SdCardSetBusMode (
   }\r
 \r
   if ((SwitchResp[16] & 0xF) != AccessMode) {\r
-    DEBUG ((EFI_D_ERROR, "SdCardSetBusMode: Switch to AccessMode %d ClockFreq %d BusWidth %d fails! The Switch response is 0x%1x\n", AccessMode, ClockFreq, BusWidth, SwitchResp[16] & 0xF));\r
+    DEBUG ((DEBUG_ERROR, "SdCardSetBusMode: Switch to AccessMode %d ClockFreq %d BusWidth %d fails! The Switch response is 0x%1x\n", AccessMode, ClockFreq, BusWidth, SwitchResp[16] & 0xF));\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "SdCardSetBusMode: Switch to AccessMode %d ClockFreq %d BusWidth %d\n", AccessMode, ClockFreq, BusWidth));\r
+  DEBUG ((DEBUG_INFO, "SdCardSetBusMode: Switch to AccessMode %d ClockFreq %d BusWidth %d\n", AccessMode, ClockFreq, BusWidth));\r
 \r
   //\r
   // Set to Hight Speed timing\r
@@ -1025,7 +1025,7 @@ SdCardIdentification (
   //\r
   Status = SdCardReset (PassThru, Slot);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_INFO, "SdCardIdentification: Executing Cmd0 fails with %r\n", Status));\r
+    DEBUG ((DEBUG_INFO, "SdCardIdentification: Executing Cmd0 fails with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
@@ -1033,7 +1033,7 @@ SdCardIdentification (
   //\r
   Status = SdCardVoltageCheck (PassThru, Slot, 0x1, 0xFF);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_INFO, "SdCardIdentification: Executing Cmd8 fails with %r\n", Status));\r
+    DEBUG ((DEBUG_INFO, "SdCardIdentification: Executing Cmd8 fails with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
@@ -1041,7 +1041,7 @@ SdCardIdentification (
   //\r
   Status = SdioSendOpCond (PassThru, Slot, 0, FALSE);\r
   if (!EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_INFO, "SdCardIdentification: Found SDIO device, ignore it as we don't support\n"));\r
+    DEBUG ((DEBUG_INFO, "SdCardIdentification: Found SDIO device, ignore it as we don't support\n"));\r
     return EFI_DEVICE_ERROR;\r
   }\r
   //\r
@@ -1049,7 +1049,7 @@ SdCardIdentification (
   //\r
   Status = SdCardSendOpCond (PassThru, Slot, 0, 0, FALSE, FALSE, FALSE, &Ocr);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_INFO, "SdCardIdentification: Executing SdCardSendOpCond fails with %r\n", Status));\r
+    DEBUG ((DEBUG_INFO, "SdCardIdentification: Executing SdCardSendOpCond fails with %r\n", Status));\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
@@ -1100,7 +1100,7 @@ SdCardIdentification (
   do {\r
     Status = SdCardSendOpCond (PassThru, Slot, 0, Ocr, S18r, Xpc, TRUE, &Ocr);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "SdCardIdentification: SdCardSendOpCond fails with %r Ocr %x, S18r %x, Xpc %x\n", Status, Ocr, S18r, Xpc));\r
+      DEBUG ((DEBUG_ERROR, "SdCardIdentification: SdCardSendOpCond fails with %r Ocr %x, S18r %x, Xpc %x\n", Status, Ocr, S18r, Xpc));\r
       return EFI_DEVICE_ERROR;\r
     }\r
   } while ((Ocr & BIT31) == 0);\r
@@ -1116,7 +1116,7 @@ SdCardIdentification (
        ((Ocr & BIT24) != 0)) {\r
     Status = SdCardVoltageSwitch (PassThru, Slot);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "SdCardIdentification: Executing SdCardVoltageSwitch fails with %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardVoltageSwitch fails with %r\n", Status));\r
       Status = EFI_DEVICE_ERROR;\r
       goto Error;\r
     } else {\r
@@ -1128,7 +1128,7 @@ SdCardIdentification (
 \r
       SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState);\r
       if (((PresentState >> 20) & 0xF) != 0) {\r
-        DEBUG ((EFI_D_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x\n", PresentState));\r
+        DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x\n", PresentState));\r
         Status = EFI_DEVICE_ERROR;\r
         goto Error;\r
       }\r
@@ -1139,7 +1139,7 @@ SdCardIdentification (
 \r
       SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_HOST_CTRL2, TRUE, sizeof (HostCtrl2), &HostCtrl2);\r
       if ((HostCtrl2 & BIT3) == 0) {\r
-        DEBUG ((EFI_D_ERROR, "SdCardIdentification: SwitchVoltage fails with HostCtrl2 = 0x%x\n", HostCtrl2));\r
+        DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with HostCtrl2 = 0x%x\n", HostCtrl2));\r
         Status = EFI_DEVICE_ERROR;\r
         goto Error;\r
       }\r
@@ -1150,29 +1150,29 @@ SdCardIdentification (
 \r
       SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState);\r
       if (((PresentState >> 20) & 0xF) != 0xF) {\r
-        DEBUG ((EFI_D_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x, It should be 0xF\n", PresentState));\r
+        DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x, It should be 0xF\n", PresentState));\r
         Status = EFI_DEVICE_ERROR;\r
         goto Error;\r
       }\r
     }\r
-    DEBUG ((EFI_D_INFO, "SdCardIdentification: Switch to 1.8v signal voltage success\n"));\r
+    DEBUG ((DEBUG_INFO, "SdCardIdentification: Switch to 1.8v signal voltage success\n"));\r
   }\r
 \r
   Status = SdCardAllSendCid (PassThru, Slot);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdCardIdentification: Executing SdCardAllSendCid fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardAllSendCid fails with %r\n", Status));\r
     return Status;\r
   }\r
 \r
   Status = SdCardSetRca (PassThru, Slot, &Rca);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdCardIdentification: Executing SdCardSetRca fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardSetRca fails with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
   // Enter Data Tranfer Mode.\r
   //\r
-  DEBUG ((EFI_D_INFO, "SdCardIdentification: Found a SD device at slot [%d]\n", Slot));\r
+  DEBUG ((DEBUG_INFO, "SdCardIdentification: Found a SD device at slot [%d]\n", Slot));\r
   Private->Slot[Slot].CardType = SdCardType;\r
 \r
   Status = SdCardSetBusMode (PciIo, PassThru, Slot, Rca, ((Ocr & BIT24) != 0));\r