From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com [IPv6:2a00:1450:4010:c07::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C9F8081EC5 for ; Tue, 29 Nov 2016 05:49:42 -0800 (PST) Received: by mail-lf0-x233.google.com with SMTP id t196so122211274lff.3 for ; Tue, 29 Nov 2016 05:49:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Op/IErBHNvBhLvjzr4g4+1Jx2p9xJ83p5eMH3mUuUt0=; b=nasJmfil9WF0mRTmCKG63iHhkisPsUKtF/9aVm+TqQXrRhgvsoGsUWBJ73B3z51bZ/ UfHGE5MsYZDXAJyIOgUawmAFl5sl4TqxVLrwAUlZ3HLj51j9TBUxGcbGEE1rMqWc/qK5 on9nGHoK0mbysueszID1DHLe8pJuKbDfeb0TOop7CYCIw8m6ZrSWq7i90CfuNxB4A9nk IydciGubcsNrkCZQp5g66lI9fpVe2SKScgvN7ofU80Ezrya8aJIQGbIyRn7SjLyUAsxz Dxd+2V6IPoiP2c+usaF3Zw7riE6kgAADwK/3sDG8Tf8U3KuTqkieBCivxLi+Az7NWXXU nxjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Op/IErBHNvBhLvjzr4g4+1Jx2p9xJ83p5eMH3mUuUt0=; b=MPsIkT4RQ8lCJAGzSRmJmXsEFsaM+e3k6iZ2HqX4BA/Xk+Dr89ZTcegPgi5t2wFPsf pbonROHdcfAkZbXN9Zca2BddyjWXkQ7hAOH555P7xcQlNA+ddoQFVWgiWHMV8LIxN95H Onn2CyO3ItHzBlGPPumPJgoCX13gU4RgDA1NPEK364JJp1zXTQuHIgT7LwC1Z9UNWVb1 HMi9D+RHxPLbcR+adHo/ZeJKHBmVpxGDH5ZrA3fuimQNgC1UKFuYsSjaGeMzlNjjqBKI UuFN7FrnaeB0wzweXdvf8ZMr3erNM2Dg7EJw1ig+HMBFjVSrYQ5V1vOFU6Erx/pQYkip JTGQ== X-Gm-Message-State: AKaTC007uQxDJDPVru8EN/7KTWnd6rRqpw6CYTdsM7EfdmPLf4hDAeNd9BEgNv/UqoJNZA== X-Received: by 10.46.69.69 with SMTP id s66mr12506759lja.71.1480427380064; Tue, 29 Nov 2016 05:49:40 -0800 (PST) Received: from enkidu.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id g38sm13633591lfi.40.2016.11.29.05.49.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Nov 2016 05:49:39 -0800 (PST) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: feng.tian@intel.com, michael.d.kinney@intel.com, liming.gao@intel.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, mw@semihalf.com, jsd@semihalf.com Date: Tue, 29 Nov 2016 14:52:28 +0100 Message-Id: <1480427548-22298-1-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Subject: [PATCH] MdeModulePkg/SdMmcPciHcDxe: Replace deprecated debug level macros X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 13:49:43 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Jan Dąbroś EFI_D_INFO, EFI_D_VERBOSE, EFI_D_WARN and EFI_D_ERROR are replaced with currently recommended values. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros Signed-off-by: Marcin Wojtas --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 36 +++++----- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 40 +++++------ MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 22 +++--- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 78 +++++++++++----------- 4 files changed, 88 insertions(+), 88 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c index 61d3517..3f73194 100755 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c @@ -533,7 +533,7 @@ EmmcTuningClkForHs200 ( do { Status = EmmcSendTuningBlk (PassThru, Slot, BusWidth); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcTuningClkForHs200: Send tuning block fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "EmmcTuningClkForHs200: Send tuning block fails with %r\n", Status)); return Status; } @@ -551,7 +551,7 @@ EmmcTuningClkForHs200 ( } } while (++Retry < 40); - DEBUG ((EFI_D_ERROR, "EmmcTuningClkForHs200: Send tuning block fails at %d times with HostCtrl2 %02x\n", Retry, HostCtrl2)); + DEBUG ((DEBUG_ERROR, "EmmcTuningClkForHs200: Send tuning block fails at %d times with HostCtrl2 %02x\n", Retry, HostCtrl2)); // // Abort the tuning procedure and reset the tuning circuit. // @@ -618,20 +618,20 @@ EmmcSwitchBusWidth ( CmdSet = 0; Status = EmmcSwitch (PassThru, Slot, Access, Index, Value, CmdSet); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcSwitchBusWidth: Switch to bus width %d fails with %r\n", BusWidth, Status)); + DEBUG ((DEBUG_ERROR, "EmmcSwitchBusWidth: Switch to bus width %d fails with %r\n", BusWidth, Status)); return Status; } Status = EmmcSendStatus (PassThru, Slot, Rca, &DevStatus); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcSwitchBusWidth: Send status fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "EmmcSwitchBusWidth: Send status fails with %r\n", Status)); return Status; } // // Check the switch operation is really successful or not. // if ((DevStatus & BIT7) != 0) { - DEBUG ((EFI_D_ERROR, "EmmcSwitchBusWidth: The switch operation fails as DevStatus is 0x%08x\n", DevStatus)); + DEBUG ((DEBUG_ERROR, "EmmcSwitchBusWidth: The switch operation fails as DevStatus is 0x%08x\n", DevStatus)); return EFI_DEVICE_ERROR; } @@ -686,20 +686,20 @@ EmmcSwitchClockFreq ( Status = EmmcSwitch (PassThru, Slot, Access, Index, Value, CmdSet); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcSwitchClockFreq: Switch to hstiming %d fails with %r\n", HsTiming, Status)); + DEBUG ((DEBUG_ERROR, "EmmcSwitchClockFreq: Switch to hstiming %d fails with %r\n", HsTiming, Status)); return Status; } Status = EmmcSendStatus (PassThru, Slot, Rca, &DevStatus); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcSwitchClockFreq: Send status fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "EmmcSwitchClockFreq: Send status fails with %r\n", Status)); return Status; } // // Check the switch operation is really successful or not. // if ((DevStatus & BIT7) != 0) { - DEBUG ((EFI_D_ERROR, "EmmcSwitchClockFreq: The switch operation fails as DevStatus is 0x%08x\n", DevStatus)); + DEBUG ((DEBUG_ERROR, "EmmcSwitchClockFreq: The switch operation fails as DevStatus is 0x%08x\n", DevStatus)); return EFI_DEVICE_ERROR; } // @@ -995,13 +995,13 @@ EmmcSetBusMode ( Status = EmmcGetCsd (PassThru, Slot, Rca, &Csd); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcSetBusMode: GetCsd fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "EmmcSetBusMode: GetCsd fails with %r\n", Status)); return Status; } Status = EmmcSelect (PassThru, Slot, Rca); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcSetBusMode: Select fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "EmmcSetBusMode: Select fails with %r\n", Status)); return Status; } @@ -1019,7 +1019,7 @@ EmmcSetBusMode ( // Status = EmmcGetExtCsd (PassThru, Slot, &ExtCsd); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcSetBusMode: GetExtCsd fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "EmmcSetBusMode: GetExtCsd fails with %r\n", Status)); return Status; } // @@ -1065,7 +1065,7 @@ EmmcSetBusMode ( return EFI_SUCCESS; } - DEBUG ((EFI_D_INFO, "EmmcSetBusMode: HsTiming %d ClockFreq %d BusWidth %d Ddr %a\n", HsTiming, ClockFreq, BusWidth, IsDdr ? "TRUE":"FALSE")); + DEBUG ((DEBUG_INFO, "EmmcSetBusMode: HsTiming %d ClockFreq %d BusWidth %d Ddr %a\n", HsTiming, ClockFreq, BusWidth, IsDdr ? "TRUE":"FALSE")); if (HsTiming == 3) { // @@ -1084,7 +1084,7 @@ EmmcSetBusMode ( Status = EmmcSwitchToHighSpeed (PciIo, PassThru, Slot, Rca, ClockFreq, IsDdr, BusWidth); } - DEBUG ((EFI_D_INFO, "EmmcSetBusMode: Switch to %a %r\n", (HsTiming == 3) ? "HS400" : ((HsTiming == 2) ? "HS200" : "HighSpeed"), Status)); + DEBUG ((DEBUG_INFO, "EmmcSetBusMode: Switch to %a %r\n", (HsTiming == 3) ? "HS400" : ((HsTiming == 2) ? "HS200" : "HighSpeed"), Status)); return Status; } @@ -1118,7 +1118,7 @@ EmmcIdentification ( Status = EmmcReset (PassThru, Slot); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_VERBOSE, "EmmcIdentification: Executing Cmd0 fails with %r\n", Status)); + DEBUG ((DEBUG_VERBOSE, "EmmcIdentification: Executing Cmd0 fails with %r\n", Status)); return Status; } @@ -1126,7 +1126,7 @@ EmmcIdentification ( do { Status = EmmcGetOcr (PassThru, Slot, &Ocr); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_VERBOSE, "EmmcIdentification: Executing Cmd1 fails with %r\n", Status)); + DEBUG ((DEBUG_VERBOSE, "EmmcIdentification: Executing Cmd1 fails with %r\n", Status)); return Status; } Ocr |= BIT30; @@ -1134,7 +1134,7 @@ EmmcIdentification ( Status = EmmcGetAllCid (PassThru, Slot); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_VERBOSE, "EmmcIdentification: Executing Cmd2 fails with %r\n", Status)); + DEBUG ((DEBUG_VERBOSE, "EmmcIdentification: Executing Cmd2 fails with %r\n", Status)); return Status; } // @@ -1146,13 +1146,13 @@ EmmcIdentification ( Rca = Slot + 1; Status = EmmcSetRca (PassThru, Slot, Rca); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "EmmcIdentification: Executing Cmd3 fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "EmmcIdentification: Executing Cmd3 fails with %r\n", Status)); return Status; } // // Enter Data Tranfer Mode. // - DEBUG ((EFI_D_INFO, "EmmcIdentification: Found a EMMC device at slot [%d], RCA [%d]\n", Slot, Rca)); + DEBUG ((DEBUG_INFO, "EmmcIdentification: Found a EMMC device at slot [%d], RCA [%d]\n", Slot, Rca)); Private->Slot[Slot].CardType = EmmcCardType; Status = EmmcSetBusMode (PciIo, PassThru, Slot, Rca); diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c index 8193f4e..9122848 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c @@ -779,7 +779,7 @@ SdCardTuningClock ( do { Status = SdCardSendTuningBlk (PassThru, Slot); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdCardSendTuningBlk: Send tuning block fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "SdCardSendTuningBlk: Send tuning block fails with %r\n", Status)); return Status; } @@ -796,7 +796,7 @@ SdCardTuningClock ( } } while (++Retry < 40); - DEBUG ((EFI_D_ERROR, "SdCardTuningClock: Send tuning block fails at %d times with HostCtrl2 %02x\n", Retry, HostCtrl2)); + DEBUG ((DEBUG_ERROR, "SdCardTuningClock: Send tuning block fails at %d times with HostCtrl2 %02x\n", Retry, HostCtrl2)); // // Abort the tuning procedure and reset the tuning circuit. // @@ -838,20 +838,20 @@ SdCardSwitchBusWidth ( Status = SdCardSetBusWidth (PassThru, Slot, Rca, BusWidth); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdCardSwitchBusWidth: Switch to bus width %d fails with %r\n", BusWidth, Status)); + DEBUG ((DEBUG_ERROR, "SdCardSwitchBusWidth: Switch to bus width %d fails with %r\n", BusWidth, Status)); return Status; } Status = SdCardSendStatus (PassThru, Slot, Rca, &DevStatus); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdCardSwitchBusWidth: Send status fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "SdCardSwitchBusWidth: Send status fails with %r\n", Status)); return Status; } // // Check the switch operation is really successful or not. // if ((DevStatus >> 16) != 0) { - DEBUG ((EFI_D_ERROR, "SdCardSwitchBusWidth: The switch operation fails as DevStatus is 0x%08x\n", DevStatus)); + DEBUG ((DEBUG_ERROR, "SdCardSwitchBusWidth: The switch operation fails as DevStatus is 0x%08x\n", DevStatus)); return EFI_DEVICE_ERROR; } @@ -944,11 +944,11 @@ SdCardSetBusMode ( } if ((SwitchResp[16] & 0xF) != AccessMode) { - 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)); + 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)); return EFI_DEVICE_ERROR; } - DEBUG ((EFI_D_INFO, "SdCardSetBusMode: Switch to AccessMode %d ClockFreq %d BusWidth %d\n", AccessMode, ClockFreq, BusWidth)); + DEBUG ((DEBUG_INFO, "SdCardSetBusMode: Switch to AccessMode %d ClockFreq %d BusWidth %d\n", AccessMode, ClockFreq, BusWidth)); // // Set to Hight Speed timing @@ -1025,7 +1025,7 @@ SdCardIdentification ( // Status = SdCardReset (PassThru, Slot); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_INFO, "SdCardIdentification: Executing Cmd0 fails with %r\n", Status)); + DEBUG ((DEBUG_INFO, "SdCardIdentification: Executing Cmd0 fails with %r\n", Status)); return Status; } // @@ -1033,7 +1033,7 @@ SdCardIdentification ( // Status = SdCardVoltageCheck (PassThru, Slot, 0x1, 0xFF); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_INFO, "SdCardIdentification: Executing Cmd8 fails with %r\n", Status)); + DEBUG ((DEBUG_INFO, "SdCardIdentification: Executing Cmd8 fails with %r\n", Status)); return Status; } // @@ -1041,7 +1041,7 @@ SdCardIdentification ( // Status = SdioSendOpCond (PassThru, Slot, 0, FALSE); if (!EFI_ERROR (Status)) { - DEBUG ((EFI_D_INFO, "SdCardIdentification: Found SDIO device, ignore it as we don't support\n")); + DEBUG ((DEBUG_INFO, "SdCardIdentification: Found SDIO device, ignore it as we don't support\n")); return EFI_DEVICE_ERROR; } // @@ -1049,7 +1049,7 @@ SdCardIdentification ( // Status = SdCardSendOpCond (PassThru, Slot, 0, 0, FALSE, FALSE, FALSE, &Ocr); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_INFO, "SdCardIdentification: Executing SdCardSendOpCond fails with %r\n", Status)); + DEBUG ((DEBUG_INFO, "SdCardIdentification: Executing SdCardSendOpCond fails with %r\n", Status)); return EFI_DEVICE_ERROR; } @@ -1100,7 +1100,7 @@ SdCardIdentification ( do { Status = SdCardSendOpCond (PassThru, Slot, 0, Ocr, S18r, Xpc, TRUE, &Ocr); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdCardIdentification: SdCardSendOpCond fails with %r Ocr %x, S18r %x, Xpc %x\n", Status, Ocr, S18r, Xpc)); + DEBUG ((DEBUG_ERROR, "SdCardIdentification: SdCardSendOpCond fails with %r Ocr %x, S18r %x, Xpc %x\n", Status, Ocr, S18r, Xpc)); return EFI_DEVICE_ERROR; } } while ((Ocr & BIT31) == 0); @@ -1116,7 +1116,7 @@ SdCardIdentification ( ((Ocr & BIT24) != 0)) { Status = SdCardVoltageSwitch (PassThru, Slot); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdCardIdentification: Executing SdCardVoltageSwitch fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardVoltageSwitch fails with %r\n", Status)); Status = EFI_DEVICE_ERROR; goto Error; } else { @@ -1128,7 +1128,7 @@ SdCardIdentification ( SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState); if (((PresentState >> 20) & 0xF) != 0) { - DEBUG ((EFI_D_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x\n", PresentState)); + DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x\n", PresentState)); Status = EFI_DEVICE_ERROR; goto Error; } @@ -1139,7 +1139,7 @@ SdCardIdentification ( SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_HOST_CTRL2, TRUE, sizeof (HostCtrl2), &HostCtrl2); if ((HostCtrl2 & BIT3) == 0) { - DEBUG ((EFI_D_ERROR, "SdCardIdentification: SwitchVoltage fails with HostCtrl2 = 0x%x\n", HostCtrl2)); + DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with HostCtrl2 = 0x%x\n", HostCtrl2)); Status = EFI_DEVICE_ERROR; goto Error; } @@ -1150,29 +1150,29 @@ SdCardIdentification ( SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState); if (((PresentState >> 20) & 0xF) != 0xF) { - DEBUG ((EFI_D_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x, It should be 0xF\n", PresentState)); + DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x, It should be 0xF\n", PresentState)); Status = EFI_DEVICE_ERROR; goto Error; } } - DEBUG ((EFI_D_INFO, "SdCardIdentification: Switch to 1.8v signal voltage success\n")); + DEBUG ((DEBUG_INFO, "SdCardIdentification: Switch to 1.8v signal voltage success\n")); } Status = SdCardAllSendCid (PassThru, Slot); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdCardIdentification: Executing SdCardAllSendCid fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardAllSendCid fails with %r\n", Status)); return Status; } Status = SdCardSetRca (PassThru, Slot, &Rca); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdCardIdentification: Executing SdCardSetRca fails with %r\n", Status)); + DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardSetRca fails with %r\n", Status)); return Status; } // // Enter Data Tranfer Mode. // - DEBUG ((EFI_D_INFO, "SdCardIdentification: Found a SD device at slot [%d]\n", Slot)); + DEBUG ((DEBUG_INFO, "SdCardIdentification: Found a SD device at slot [%d]\n", Slot)); Private->Slot[Slot].CardType = SdCardType; Status = SdCardSetBusMode (PciIo, PassThru, Slot, Rca, ((Ocr & BIT24) != 0)); diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c index 5de1dd6..4c1b5c8 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c @@ -197,7 +197,7 @@ Done: Trb->Packet->TransactionStatus = EFI_TIMEOUT; TrbEvent = Trb->Event; SdMmcFreeTrb (Trb); - DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p EFI_TIMEOUT\n", TrbEvent)); + DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p EFI_TIMEOUT\n", TrbEvent)); gBS->SignalEvent (TrbEvent); return; } @@ -207,7 +207,7 @@ Done: Trb->Packet->TransactionStatus = Status; TrbEvent = Trb->Event; SdMmcFreeTrb (Trb); - DEBUG ((EFI_D_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p with %r\n", TrbEvent, Status)); + DEBUG ((DEBUG_VERBOSE, "ProcessAsyncTaskList(): Signal Event %p with %r\n", TrbEvent, Status)); gBS->SignalEvent (TrbEvent); } return; @@ -246,7 +246,7 @@ SdMmcPciHcEnumerateDevice ( if ((Private->Slot[Slot].Enable) && (Private->Slot[Slot].SlotType == RemovableSlot)) { Status = SdMmcHcCardDetect (Private->PciIo, Slot, &MediaPresent); if ((Status == EFI_MEDIA_CHANGED) && !MediaPresent) { - DEBUG ((EFI_D_INFO, "SdMmcPciHcEnumerateDevice: device disconnected at slot %d of pci %p\n", Slot, Private->PciIo)); + DEBUG ((DEBUG_INFO, "SdMmcPciHcEnumerateDevice: device disconnected at slot %d of pci %p\n", Slot, Private->PciIo)); Private->Slot[Slot].MediaPresent = FALSE; Private->Slot[Slot].Initialized = FALSE; // @@ -277,7 +277,7 @@ SdMmcPciHcEnumerateDevice ( ); } if ((Status == EFI_MEDIA_CHANGED) && MediaPresent) { - DEBUG ((EFI_D_INFO, "SdMmcPciHcEnumerateDevice: device connected at slot %d of pci %p\n", Slot, Private->PciIo)); + DEBUG ((DEBUG_INFO, "SdMmcPciHcEnumerateDevice: device connected at slot %d of pci %p\n", Slot, Private->PciIo)); // // Reset the specified slot of the SD/MMC Pci Host Controller // @@ -529,7 +529,7 @@ SdMmcPciHcDriverBindingStart ( BOOLEAN MediaPresent; BOOLEAN Support64BitDma; - DEBUG ((EFI_D_INFO, "SdMmcPciHcDriverBindingStart: Start\n")); + DEBUG ((DEBUG_INFO, "SdMmcPciHcDriverBindingStart: Start\n")); // // Open PCI I/O Protocol and save pointer to open protocol @@ -620,7 +620,7 @@ SdMmcPciHcDriverBindingStart ( Private->Slot[Slot].SlotType = Private->Capability[Slot].SlotType; if ((Private->Slot[Slot].SlotType != RemovableSlot) && (Private->Slot[Slot].SlotType != EmbeddedSlot)) { - DEBUG ((EFI_D_INFO, "SdMmcPciHcDxe doesn't support the slot type [%d]!!!\n", Private->Slot[Slot].SlotType)); + DEBUG ((DEBUG_INFO, "SdMmcPciHcDxe doesn't support the slot type [%d]!!!\n", Private->Slot[Slot].SlotType)); continue; } @@ -638,7 +638,7 @@ SdMmcPciHcDriverBindingStart ( if (EFI_ERROR (Status) && (Status != EFI_MEDIA_CHANGED)) { continue; } else if (!MediaPresent) { - DEBUG ((EFI_D_ERROR, "SdMmcHcCardDetect: No device attached in Slot[%d]!!!\n", Slot)); + DEBUG ((EFI_ERROR, "SdMmcHcCardDetect: No device attached in Slot[%d]!!!\n", Slot)); continue; } @@ -679,7 +679,7 @@ SdMmcPciHcDriverBindingStart ( NULL ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_WARN, "SdMmcPciHcDriverBindingStart: failed to enable 64-bit DMA (%r)\n", Status)); + DEBUG ((DEBUG_WARN, "SdMmcPciHcDriverBindingStart: failed to enable 64-bit DMA (%r)\n", Status)); } } @@ -728,7 +728,7 @@ SdMmcPciHcDriverBindingStart ( NULL ); - DEBUG ((EFI_D_INFO, "SdMmcPciHcDriverBindingStart: %r End on %x\n", Status, Controller)); + DEBUG ((DEBUG_INFO, "SdMmcPciHcDriverBindingStart: %r End on %x\n", Status, Controller)); Done: if (EFI_ERROR (Status)) { @@ -809,7 +809,7 @@ SdMmcPciHcDriverBindingStop ( LIST_ENTRY *NextLink; SD_MMC_HC_TRB *Trb; - DEBUG ((EFI_D_INFO, "SdMmcPciHcDriverBindingStop: Start\n")); + DEBUG ((DEBUG_INFO, "SdMmcPciHcDriverBindingStop: Start\n")); Status = gBS->OpenProtocol ( Controller, @@ -883,7 +883,7 @@ SdMmcPciHcDriverBindingStop ( FreePool (Private); - DEBUG ((EFI_D_INFO, "SdMmcPciHcDriverBindingStop: End with %r\n", Status)); + DEBUG ((DEBUG_INFO, "SdMmcPciHcDriverBindingStop: End with %r\n", Status)); return Status; } diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c index b4ff2af..ccbf355 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c @@ -33,46 +33,46 @@ DumpCapabilityReg ( // // Dump Capability Data // - DEBUG ((EFI_D_INFO, " == Slot [%d] Capability is 0x%x ==\n", Slot, Capability)); - DEBUG ((EFI_D_INFO, " Timeout Clk Freq %d%a\n", Capability->TimeoutFreq, (Capability->TimeoutUnit) ? "MHz" : "KHz")); - DEBUG ((EFI_D_INFO, " Base Clk Freq %dMHz\n", Capability->BaseClkFreq)); - DEBUG ((EFI_D_INFO, " Max Blk Len %dbytes\n", 512 * (1 << Capability->MaxBlkLen))); - DEBUG ((EFI_D_INFO, " 8-bit Support %a\n", Capability->BusWidth8 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " ADMA2 Support %a\n", Capability->Adma2 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " HighSpeed Support %a\n", Capability->HighSpeed ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " SDMA Support %a\n", Capability->Sdma ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Suspend/Resume %a\n", Capability->SuspRes ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Voltage 3.3 %a\n", Capability->Voltage33 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Voltage 3.0 %a\n", Capability->Voltage30 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Voltage 1.8 %a\n", Capability->Voltage18 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " 64-bit Sys Bus %a\n", Capability->SysBus64 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Async Interrupt %a\n", Capability->AsyncInt ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " SlotType ")); + DEBUG ((DEBUG_INFO, " == Slot [%d] Capability is 0x%x ==\n", Slot, Capability)); + DEBUG ((DEBUG_INFO, " Timeout Clk Freq %d%a\n", Capability->TimeoutFreq, (Capability->TimeoutUnit) ? "MHz" : "KHz")); + DEBUG ((DEBUG_INFO, " Base Clk Freq %dMHz\n", Capability->BaseClkFreq)); + DEBUG ((DEBUG_INFO, " Max Blk Len %dbytes\n", 512 * (1 << Capability->MaxBlkLen))); + DEBUG ((DEBUG_INFO, " 8-bit Support %a\n", Capability->BusWidth8 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " ADMA2 Support %a\n", Capability->Adma2 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " HighSpeed Support %a\n", Capability->HighSpeed ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " SDMA Support %a\n", Capability->Sdma ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Suspend/Resume %a\n", Capability->SuspRes ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Voltage 3.3 %a\n", Capability->Voltage33 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Voltage 3.0 %a\n", Capability->Voltage30 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Voltage 1.8 %a\n", Capability->Voltage18 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " 64-bit Sys Bus %a\n", Capability->SysBus64 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Async Interrupt %a\n", Capability->AsyncInt ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " SlotType ")); if (Capability->SlotType == 0x00) { - DEBUG ((EFI_D_INFO, "%a\n", "Removable Slot")); + DEBUG ((DEBUG_INFO, "%a\n", "Removable Slot")); } else if (Capability->SlotType == 0x01) { - DEBUG ((EFI_D_INFO, "%a\n", "Embedded Slot")); + DEBUG ((DEBUG_INFO, "%a\n", "Embedded Slot")); } else if (Capability->SlotType == 0x02) { - DEBUG ((EFI_D_INFO, "%a\n", "Shared Bus Slot")); + DEBUG ((DEBUG_INFO, "%a\n", "Shared Bus Slot")); } else { - DEBUG ((EFI_D_INFO, "%a\n", "Reserved")); - } - DEBUG ((EFI_D_INFO, " SDR50 Support %a\n", Capability->Sdr50 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " SDR104 Support %a\n", Capability->Sdr104 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " DDR50 Support %a\n", Capability->Ddr50 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Driver Type A %a\n", Capability->DriverTypeA ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Driver Type C %a\n", Capability->DriverTypeC ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Driver Type D %a\n", Capability->DriverTypeD ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Driver Type 4 %a\n", Capability->DriverType4 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, "%a\n", "Reserved")); + } + DEBUG ((DEBUG_INFO, " SDR50 Support %a\n", Capability->Sdr50 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " SDR104 Support %a\n", Capability->Sdr104 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " DDR50 Support %a\n", Capability->Ddr50 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Driver Type A %a\n", Capability->DriverTypeA ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Driver Type C %a\n", Capability->DriverTypeC ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Driver Type D %a\n", Capability->DriverTypeD ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Driver Type 4 %a\n", Capability->DriverType4 ? "TRUE" : "FALSE")); if (Capability->TimerCount == 0) { - DEBUG ((EFI_D_INFO, " Retuning TimerCnt Disabled\n", 2 * (Capability->TimerCount - 1))); + DEBUG ((DEBUG_INFO, " Retuning TimerCnt Disabled\n", 2 * (Capability->TimerCount - 1))); } else { - DEBUG ((EFI_D_INFO, " Retuning TimerCnt %dseconds\n", 2 * (Capability->TimerCount - 1))); + DEBUG ((DEBUG_INFO, " Retuning TimerCnt %dseconds\n", 2 * (Capability->TimerCount - 1))); } - DEBUG ((EFI_D_INFO, " SDR50 Tuning %a\n", Capability->TuningSDR50 ? "TRUE" : "FALSE")); - DEBUG ((EFI_D_INFO, " Retuning Mode Mode %d\n", Capability->RetuningMod + 1)); - DEBUG ((EFI_D_INFO, " Clock Multiplier M = %d\n", Capability->ClkMultiplier + 1)); - DEBUG ((EFI_D_INFO, " HS 400 %a\n", Capability->Hs400 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " SDR50 Tuning %a\n", Capability->TuningSDR50 ? "TRUE" : "FALSE")); + DEBUG ((DEBUG_INFO, " Retuning Mode Mode %d\n", Capability->RetuningMod + 1)); + DEBUG ((DEBUG_INFO, " Clock Multiplier M = %d\n", Capability->ClkMultiplier + 1)); + DEBUG ((DEBUG_INFO, " HS 400 %a\n", Capability->Hs400 ? "TRUE" : "FALSE")); return; } @@ -439,7 +439,7 @@ SdMmcHcReset ( Status = SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_SW_RST, FALSE, sizeof (SwReset), &SwReset); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "SdMmcHcReset: write full 1 fails: %r\n", Status)); + DEBUG ((DEBUG_ERROR, "SdMmcHcReset: write full 1 fails: %r\n", Status)); return Status; } @@ -453,7 +453,7 @@ SdMmcHcReset ( SD_MMC_HC_GENERIC_TIMEOUT ); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_INFO, "SdMmcHcReset: reset done with %r\n", Status)); + DEBUG ((DEBUG_INFO, "SdMmcHcReset: reset done with %r\n", Status)); return Status; } // @@ -732,7 +732,7 @@ SdMmcHcClockSupply ( } } - DEBUG ((EFI_D_INFO, "BaseClkFreq %dMHz Divisor %d ClockFreq %dKhz\n", BaseClkFreq, Divisor, ClockFreq)); + DEBUG ((DEBUG_INFO, "BaseClkFreq %dMHz Divisor %d ClockFreq %dKhz\n", BaseClkFreq, Divisor, ClockFreq)); Status = SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_CTRL_VER, TRUE, sizeof (ControllerVer), &ControllerVer); if (EFI_ERROR (Status)) { @@ -754,7 +754,7 @@ SdMmcHcClockSupply ( ASSERT (Divisor <= 0x80); ClockCtrl = (Divisor & 0xFF) << 8; } else { - DEBUG ((EFI_D_ERROR, "Unknown SD Host Controller Spec version [0x%x]!!!\n", ControllerVer)); + DEBUG ((DEBUG_ERROR, "Unknown SD Host Controller Spec version [0x%x]!!!\n", ControllerVer)); return EFI_UNSUPPORTED; } @@ -772,7 +772,7 @@ SdMmcHcClockSupply ( ClockCtrl |= BIT0; Status = SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_CLOCK_CTRL, FALSE, sizeof (ClockCtrl), &ClockCtrl); if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Set SDCLK Frequency Select and Internal Clock Enable fields fails\n")); + DEBUG ((DEBUG_ERROR, "Set SDCLK Frequency Select and Internal Clock Enable fields fails\n")); return Status; } @@ -1125,7 +1125,7 @@ BuildAdmaDescTable ( // for 32-bit address descriptor table. // if ((Data & (BIT0 | BIT1)) != 0) { - DEBUG ((EFI_D_INFO, "The buffer [0x%x] to construct ADMA desc is not aligned to 4 bytes boundary!\n", Data)); + DEBUG ((DEBUG_INFO, "The buffer [0x%x] to construct ADMA desc is not aligned to 4 bytes boundary!\n", Data)); } Entries = DivU64x32 ((DataLen + ADMA_MAX_DATA_PER_LINE - 1), ADMA_MAX_DATA_PER_LINE); -- 1.8.3.1