]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c
MdeModulePkg: Change use of EFI_D_* to DEBUG_*
[mirror_edk2.git] / MdeModulePkg / Bus / Sd / SdBlockIoPei / SdHci.c
index 756c3063bbfff635b250134c127d59a8fbae5ea6..7c8b548b9e1fbabe0aae6d0b79585d38f1f17a08 100644 (file)
@@ -304,7 +304,7 @@ SdPeimHcReset (
   Status  = SdPeimHcRwMmio (Bar + SD_HC_SW_RST, FALSE, sizeof (SwReset), &SwReset);\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimHcReset: write full 1 fails: %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimHcReset: write full 1 fails: %r\n", Status));\r
     return Status;\r
   }\r
 \r
@@ -316,7 +316,7 @@ SdPeimHcReset (
              SD_TIMEOUT\r
              );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_INFO, "SdPeimHcReset: reset done with %r\n", Status));\r
+    DEBUG ((DEBUG_INFO, "SdPeimHcReset: reset done with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
@@ -556,7 +556,7 @@ SdPeimHcClockSupply (
     }\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "BaseClkFreq %dMHz Divisor %d ClockFreq %dKhz\n", BaseClkFreq, Divisor, ClockFreq));\r
+  DEBUG ((DEBUG_INFO, "BaseClkFreq %dMHz Divisor %d ClockFreq %dKhz\n", BaseClkFreq, Divisor, ClockFreq));\r
 \r
   Status = SdPeimHcRwMmio (Bar + SD_HC_CTRL_VER, TRUE, sizeof (ControllerVer), &ControllerVer);\r
   if (EFI_ERROR (Status)) {\r
@@ -578,7 +578,7 @@ SdPeimHcClockSupply (
     ASSERT (Divisor <= 0x80);\r
     ClockCtrl = (Divisor & 0xFF) << 8;\r
   } else {\r
-    DEBUG ((EFI_D_ERROR, "Unknown SD Host Controller Spec version [0x%x]!!!\n", ControllerVer));\r
+    DEBUG ((DEBUG_ERROR, "Unknown SD Host Controller Spec version [0x%x]!!!\n", ControllerVer));\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -596,7 +596,7 @@ SdPeimHcClockSupply (
   ClockCtrl |= BIT0;\r
   Status = SdPeimHcRwMmio (Bar + SD_HC_CLOCK_CTRL, FALSE, sizeof (ClockCtrl), &ClockCtrl);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "Set SDCLK Frequency Select and Internal Clock Enable fields fails\n"));\r
+    DEBUG ((DEBUG_ERROR, "Set SDCLK Frequency Select and Internal Clock Enable fields fails\n"));\r
     return Status;\r
   }\r
 \r
@@ -936,7 +936,7 @@ BuildAdmaDescTable (
   // for 32-bit address descriptor table.\r
   //\r
   if ((Data & (BIT0 | BIT1)) != 0) {\r
-    DEBUG ((EFI_D_INFO, "The buffer [0x%x] to construct ADMA desc is not aligned to 4 bytes boundary!\n", Data));\r
+    DEBUG ((DEBUG_INFO, "The buffer [0x%x] to construct ADMA desc is not aligned to 4 bytes boundary!\n", Data));\r
   }\r
 \r
   Entries = DivU64x32 ((DataLen + ADMA_MAX_DATA_PER_LINE - 1), ADMA_MAX_DATA_PER_LINE);\r
@@ -2549,7 +2549,7 @@ SdPeimTuningClock (
     }\r
   } while (++Retry < 40);\r
 \r
-  DEBUG ((EFI_D_ERROR, "SdPeimTuningClock: Send tuning block fails at %d times with HostCtrl2 %02x\n", Retry, HostCtrl2));\r
+  DEBUG ((DEBUG_ERROR, "SdPeimTuningClock: 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
@@ -2638,7 +2638,7 @@ SdPeimSetBusMode (
 \r
   Status = SdPeimGetCsd (Slot, Rca, &Slot->Csd);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimSetBusMode: SdPeimGetCsd fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimSetBusMode: SdPeimGetCsd fails with %r\n", Status));\r
     return Status;\r
   }\r
 \r
@@ -2649,14 +2649,14 @@ SdPeimSetBusMode (
 \r
   Status = SdPeimSelect (Slot, Rca);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimSetBusMode: SdPeimSelect fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimSetBusMode: SdPeimSelect fails with %r\n", Status));\r
     return Status;\r
   }\r
 \r
   BusWidth = 4;\r
   Status = SdPeimSwitchBusWidth (Slot, Rca, BusWidth);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimSetBusMode: SdPeimSwitchBusWidth fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimSetBusMode: SdPeimSwitchBusWidth fails with %r\n", Status));\r
     return Status;\r
   }\r
 \r
@@ -2689,16 +2689,16 @@ SdPeimSetBusMode (
     AccessMode = 0;\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "SdPeimSetBusMode: AccessMode %d ClockFreq %d BusWidth %d\n", AccessMode, ClockFreq, BusWidth));\r
+  DEBUG ((DEBUG_INFO, "SdPeimSetBusMode: AccessMode %d ClockFreq %d BusWidth %d\n", AccessMode, ClockFreq, BusWidth));\r
 \r
   Status = SdPeimSwitch (Slot, AccessMode, 0xF, 0xF, 0xF, TRUE, SwitchResp);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimSetBusMode: SdPeimSwitch fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimSetBusMode: SdPeimSwitch fails with %r\n", Status));\r
     return Status;\r
   }\r
 \r
   if ((SwitchResp[16] & 0xF) != AccessMode) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimSetBusMode: SdPeimSwitch 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, "SdPeimSetBusMode: SdPeimSwitch 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
@@ -2725,19 +2725,19 @@ SdPeimSetBusMode (
 \r
   Status = SdPeimHcClockSupply (Slot->SdHcBase, ClockFreq * 1000);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimSetBusMode: SdPeimHcClockSupply %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimSetBusMode: SdPeimHcClockSupply %r\n", Status));\r
     return Status;\r
   }\r
 \r
   if ((AccessMode == 3) || ((AccessMode == 2) && (Capability.TuningSDR50 != 0))) {\r
     Status = SdPeimTuningClock (Slot);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "SdPeimSetBusMode: SdPeimTuningClock fails with %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "SdPeimSetBusMode: SdPeimTuningClock fails with %r\n", Status));\r
       return Status;\r
     }\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "SdPeimSetBusMode: SdPeimSetBusMode %r\n", Status));\r
+  DEBUG ((DEBUG_INFO, "SdPeimSetBusMode: SdPeimSetBusMode %r\n", Status));\r
 \r
   return Status;\r
 }\r
@@ -2776,7 +2776,7 @@ SdPeimIdentification (
   //\r
   Status = SdPeimReset (Slot);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimIdentification: Executing Cmd0 fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimIdentification: Executing Cmd0 fails with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
@@ -2784,7 +2784,7 @@ SdPeimIdentification (
   //\r
   Status = SdPeimVoltageCheck (Slot, 0x1, 0xFF);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimIdentification: Executing Cmd8 fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimIdentification: Executing Cmd8 fails with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
@@ -2792,7 +2792,7 @@ SdPeimIdentification (
   //\r
   Status = SdioSendOpCond (Slot, 0, FALSE);\r
   if (!EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimIdentification: Found SDIO device, ignore it as we don't support\n"));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimIdentification: Found SDIO device, ignore it as we don't support\n"));\r
     return EFI_DEVICE_ERROR;\r
   }\r
   //\r
@@ -2800,7 +2800,7 @@ SdPeimIdentification (
   //\r
   Status = SdPeimSendOpCond (Slot, 0, 0, FALSE, FALSE, FALSE, &Ocr);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimIdentification: Executing SdPeimSendOpCond fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimIdentification: Executing SdPeimSendOpCond fails with %r\n", Status));\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
@@ -2863,12 +2863,12 @@ SdPeimIdentification (
   do {\r
     Status = SdPeimSendOpCond (Slot, 0, Ocr, S18r, Xpc, TRUE, &Ocr);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "SdPeimIdentification: SdPeimSendOpCond fails with %r Ocr %x, S18r %x, Xpc %x\n", Status, Ocr, S18r, Xpc));\r
+      DEBUG ((DEBUG_ERROR, "SdPeimIdentification: SdPeimSendOpCond fails with %r Ocr %x, S18r %x, Xpc %x\n", Status, Ocr, S18r, Xpc));\r
       return EFI_DEVICE_ERROR;\r
     }\r
 \r
     if (Retry++ == 100) {\r
-      DEBUG ((EFI_D_ERROR, "SdPeimIdentification: SdPeimSendOpCond fails too many times\n"));\r
+      DEBUG ((DEBUG_ERROR, "SdPeimIdentification: SdPeimSendOpCond fails too many times\n"));\r
       return EFI_DEVICE_ERROR;\r
     }\r
     MicroSecondDelay (10 * 1000);\r
@@ -2885,7 +2885,7 @@ SdPeimIdentification (
        ((Ocr & BIT24) != 0)) {\r
     Status = SdPeimVoltageSwitch (Slot);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "SdPeimIdentification: Executing SdPeimVoltageSwitch fails with %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "SdPeimIdentification: Executing SdPeimVoltageSwitch fails with %r\n", Status));\r
       Status = EFI_DEVICE_ERROR;\r
       goto Error;\r
     } else {\r
@@ -2897,7 +2897,7 @@ SdPeimIdentification (
 \r
       SdPeimHcRwMmio (Slot->SdHcBase + SD_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState);\r
       if (((PresentState >> 20) & 0xF) != 0) {\r
-        DEBUG ((EFI_D_ERROR, "SdPeimIdentification: SwitchVoltage fails with PresentState = 0x%x\n", PresentState));\r
+        DEBUG ((DEBUG_ERROR, "SdPeimIdentification: SwitchVoltage fails with PresentState = 0x%x\n", PresentState));\r
         Status = EFI_DEVICE_ERROR;\r
         goto Error;\r
       }\r
@@ -2908,7 +2908,7 @@ SdPeimIdentification (
 \r
       SdPeimHcRwMmio (Slot->SdHcBase + SD_HC_HOST_CTRL2, TRUE, sizeof (HostCtrl2), &HostCtrl2);\r
       if ((HostCtrl2 & BIT3) == 0) {\r
-        DEBUG ((EFI_D_ERROR, "SdPeimIdentification: SwitchVoltage fails with HostCtrl2 = 0x%x\n", HostCtrl2));\r
+        DEBUG ((DEBUG_ERROR, "SdPeimIdentification: SwitchVoltage fails with HostCtrl2 = 0x%x\n", HostCtrl2));\r
         Status = EFI_DEVICE_ERROR;\r
         goto Error;\r
       }\r
@@ -2919,29 +2919,29 @@ SdPeimIdentification (
 \r
       SdPeimHcRwMmio (Slot->SdHcBase + SD_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState);\r
       if (((PresentState >> 20) & 0xF) != 0xF) {\r
-        DEBUG ((EFI_D_ERROR, "SdPeimIdentification: SwitchVoltage fails with PresentState = 0x%x, It should be 0xF\n", PresentState));\r
+        DEBUG ((DEBUG_ERROR, "SdPeimIdentification: 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, "SdPeimIdentification: Switch to 1.8v signal voltage success\n"));\r
+    DEBUG ((DEBUG_INFO, "SdPeimIdentification: Switch to 1.8v signal voltage success\n"));\r
   }\r
 \r
   Status = SdPeimAllSendCid (Slot);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimIdentification: Executing SdPeimAllSendCid fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimIdentification: Executing SdPeimAllSendCid fails with %r\n", Status));\r
     return Status;\r
   }\r
 \r
   Status = SdPeimSetRca (Slot, &Rca);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "SdPeimIdentification: Executing SdPeimSetRca fails with %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "SdPeimIdentification: Executing SdPeimSetRca fails with %r\n", Status));\r
     return Status;\r
   }\r
   //\r
   // Enter Data Tranfer Mode.\r
   //\r
-  DEBUG ((EFI_D_INFO, "Found a SD device at slot [%d]\n", Slot));\r
+  DEBUG ((DEBUG_INFO, "Found a SD device at slot [%d]\n", Slot));\r
 \r
   Status = SdPeimSetBusMode (Slot, Rca, ((Ocr & BIT24) != 0));\r
 \r