From: "Zeng, Star" <star.zeng@intel.com>
To: "Zhang, Shenglei" <shenglei.zhang@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Dong, Eric" <eric.dong@intel.com>, "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH v2 07/27] MdeModulePkg SdMmcPciHcDxe: Remove redundant functions
Date: Mon, 20 Aug 2018 04:57:20 +0000 [thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBAF4D1@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20180815014609.19948-8-shenglei.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
-----Original Message-----
From: Zhang, Shenglei
Sent: Wednesday, August 15, 2018 9:46 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: [PATCH v2 07/27] MdeModulePkg SdMmcPciHcDxe: Remove redundant functions
The functions that are never called have been removed.
They are SdCardGetCsd and SdCardGetScr.
https://bugzilla.tianocore.org/show_bug.cgi?id=1062
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei <shenglei.zhang@intel.com>
---
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 107 ------------------
1 file changed, 107 deletions(-)
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c
index 9e70de956f..8c93933bc6 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c
@@ -318,116 +318,9 @@ SdCardSetRca (
return Status;
}
-/**
- Send command SEND_CSD to the SD device to get the data of the CSD register.
-
- Refer to SD Physical Layer Simplified Spec 4.1 Section 4.7 for details.
-
- @param[in] PassThru A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance.
- @param[in] Slot The slot number of the SD card to send the command to.
- @param[in] Rca The relative device address of selected device.
- @param[out] Csd The buffer to store the content of the CSD register.
- Note the caller should ignore the lowest byte of this
- buffer as the content of this byte is meaningless even
- if the operation succeeds.
-
- @retval EFI_SUCCESS The operation is done correctly.
- @retval Others The operation fails.
-
-**/
-EFI_STATUS
-SdCardGetCsd (
- IN EFI_SD_MMC_PASS_THRU_PROTOCOL *PassThru,
- IN UINT8 Slot,
- IN UINT16 Rca,
- OUT SD_CSD *Csd
- )
-{
- EFI_SD_MMC_COMMAND_BLOCK SdMmcCmdBlk;
- EFI_SD_MMC_STATUS_BLOCK SdMmcStatusBlk;
- EFI_SD_MMC_PASS_THRU_COMMAND_PACKET Packet;
- EFI_STATUS Status;
-
- ZeroMem (&SdMmcCmdBlk, sizeof (SdMmcCmdBlk));
- ZeroMem (&SdMmcStatusBlk, sizeof (SdMmcStatusBlk));
- ZeroMem (&Packet, sizeof (Packet));
-
- Packet.SdMmcCmdBlk = &SdMmcCmdBlk;
- Packet.SdMmcStatusBlk = &SdMmcStatusBlk;
- Packet.Timeout = SD_MMC_HC_GENERIC_TIMEOUT;
- SdMmcCmdBlk.CommandIndex = SD_SEND_CSD;
- SdMmcCmdBlk.CommandType = SdMmcCommandTypeAc;
- SdMmcCmdBlk.ResponseType = SdMmcResponseTypeR2;
- SdMmcCmdBlk.CommandArgument = (UINT32)Rca << 16;
- Status = SdMmcPassThruPassThru (PassThru, Slot, &Packet, NULL);
- if (!EFI_ERROR (Status)) {
- //
- // For details, refer to SD Host Controller Simplified Spec 3.0 Table 2-12.
- //
- CopyMem (((UINT8*)Csd) + 1, &SdMmcStatusBlk.Resp0, sizeof (SD_CSD) - 1);
- }
-
- return Status;
-}
-
-/**
- Send command SEND_CSD to the SD device to get the data of the CSD register.
-
- Refer to SD Physical Layer Simplified Spec 4.1 Section 4.7 for details.
- @param[in] PassThru A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance.
- @param[in] Slot The slot number of the SD card to send the command to.
- @param[in] Rca The relative device address of selected device.
- @param[out] Scr The buffer to store the content of the SCR register.
-
- @retval EFI_SUCCESS The operation is done correctly.
- @retval Others The operation fails.
-
-**/
-EFI_STATUS
-SdCardGetScr (
- IN EFI_SD_MMC_PASS_THRU_PROTOCOL *PassThru,
- IN UINT8 Slot,
- IN UINT16 Rca,
- OUT SD_SCR *Scr
- )
-{
- EFI_SD_MMC_COMMAND_BLOCK SdMmcCmdBlk;
- EFI_SD_MMC_STATUS_BLOCK SdMmcStatusBlk;
- EFI_SD_MMC_PASS_THRU_COMMAND_PACKET Packet;
- EFI_STATUS Status;
-
- ZeroMem (&SdMmcCmdBlk, sizeof (SdMmcCmdBlk));
- ZeroMem (&SdMmcStatusBlk, sizeof (SdMmcStatusBlk));
- ZeroMem (&Packet, sizeof (Packet));
-
- Packet.SdMmcCmdBlk = &SdMmcCmdBlk;
- Packet.SdMmcStatusBlk = &SdMmcStatusBlk;
- Packet.Timeout = SD_MMC_HC_GENERIC_TIMEOUT;
-
- SdMmcCmdBlk.CommandIndex = SD_APP_CMD;
- SdMmcCmdBlk.CommandType = SdMmcCommandTypeAc;
- SdMmcCmdBlk.ResponseType = SdMmcResponseTypeR1;
- SdMmcCmdBlk.CommandArgument = (UINT32)Rca << 16;
-
- Status = SdMmcPassThruPassThru (PassThru, Slot, &Packet, NULL);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- SdMmcCmdBlk.CommandIndex = SD_SEND_SCR;
- SdMmcCmdBlk.CommandType = SdMmcCommandTypeAdtc;
- SdMmcCmdBlk.ResponseType = SdMmcResponseTypeR1;
-
- Packet.InDataBuffer = Scr;
- Packet.InTransferLength = sizeof (SD_SCR);
-
- Status = SdMmcPassThruPassThru (PassThru, Slot, &Packet, NULL);
-
- return Status;
-}
/**
Send command SELECT_DESELECT_CARD to the SD device to select/deselect it.
--
2.18.0.windows.1
next prev parent reply other threads:[~2018-08-20 4:57 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 1:45 [PATCH v2 00/27] MdeModulePkg Remove redundant functions shenglei
2018-08-15 1:45 ` [PATCH v2 01/27] MdeModulePkg CapsuleApp: Remove a redundant function shenglei
2018-08-15 1:45 ` [PATCH v2 02/27] MdeModulePkg UiApp: Remove redundant functions shenglei
2018-08-15 2:24 ` Dong, Eric
2018-08-15 1:45 ` [PATCH v2 03/27] MdeModulePkg AtaAtapiPassThru: " shenglei
2018-08-15 1:45 ` [PATCH v2 04/27] MdeModulePkg EhciDxe: " shenglei
2018-08-15 1:45 ` [PATCH v2 05/27] MdeModulePkg NvmExpressDxe: " shenglei
2018-08-15 1:45 ` [PATCH v2 06/27] MdeModulePkg PciBusDxe: " shenglei
2018-08-15 1:45 ` [PATCH v2 07/27] MdeModulePkg SdMmcPciHcDxe: " shenglei
2018-08-15 2:01 ` Wu, Hao A
2018-08-20 4:57 ` Zeng, Star [this message]
2018-08-15 1:45 ` [PATCH v2 08/27] MdeModulePkg UhciPei: " shenglei
2018-08-15 1:45 ` [PATCH v2 09/27] MdeModulePkg XhciDxe: " shenglei
2018-08-15 1:45 ` [PATCH v2 10/27] MdeModulePkg XhciPei: " shenglei
2018-08-15 1:45 ` [PATCH v2 11/27] MdeModulePkg UfsBlockIoPei: " shenglei
2018-08-15 1:45 ` [PATCH v2 12/27] MdeModulePkg UfsPassThruDxe: " shenglei
2018-08-15 1:45 ` [PATCH v2 13/27] MdeModulePkg UsbBotPei: " shenglei
2018-08-15 1:45 ` [PATCH v2 14/27] MdeModulePkg UsbBusDxe: " shenglei
2018-08-15 1:45 ` [PATCH v2 15/27] MdeModulePkg UsbBusPei: " shenglei
2018-08-15 1:45 ` [PATCH v2 16/27] MdeModulePkg Core/Dxe: " shenglei
2018-08-15 1:45 ` [PATCH v2 17/27] MdeModulePkg PiSmmCore: " shenglei
2018-08-15 1:46 ` [PATCH v2 18/27] MdeModulePkg Ps2KeyboardDxe: Remove a redundant function shenglei
2018-08-15 1:46 ` [PATCH v2 19/27] MdeModulePkg EmmcBlockIoPei: " shenglei
2018-08-15 1:46 ` [PATCH v2 20/27] MdeModulePkg SdBlockIoPei: " shenglei
2018-08-15 1:46 ` [PATCH v2 21/27] MdeModulePkg TerminalDxe: " shenglei
2018-08-15 1:46 ` [PATCH v2 22/27] MdeModulePkg HiiDatabaseDxe: " shenglei
2018-08-15 2:20 ` Dong, Eric
2018-08-15 1:46 ` [PATCH v2 23/27] MdeModulePkg Ip4Dxe: " shenglei
2018-08-15 1:46 ` [PATCH v2 24/27] MdeModulePkg IScsiDxe: " shenglei
2018-08-15 1:46 ` [PATCH v2 25/27] MdeModulePkg Tcp4Dxe: Remove redundant functions shenglei
2018-08-15 1:46 ` [PATCH v2 26/27] MdeModulePkg SetupBrowserDxe: Remove a redundant function shenglei
2018-08-20 4:56 ` Zeng, Star
2018-08-15 1:46 ` [PATCH v2 27/27] MdeModulePkg UiApp: Remove a redundant function and a variable shenglei
2018-08-20 4:55 ` Zeng, Star
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103BBAF4D1@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox