From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 779A9210F16A0 for ; Tue, 14 Aug 2018 19:01:51 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2018 19:01:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,241,1531810800"; d="scan'208";a="64998449" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga007.jf.intel.com with ESMTP; 14 Aug 2018 19:01:33 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 14 Aug 2018 19:01:32 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 14 Aug 2018 19:01:32 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.143]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.205]) with mapi id 14.03.0319.002; Wed, 15 Aug 2018 10:01:29 +0800 From: "Wu, Hao A" To: "Zhang, Shenglei" , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Zeng, Star" Thread-Topic: [edk2] [PATCH v2 07/27] MdeModulePkg SdMmcPciHcDxe: Remove redundant functions Thread-Index: AQHUNDn88sr93ni70kCs6+mYuxC/oaTADtzg Date: Wed, 15 Aug 2018 02:01:29 +0000 Message-ID: References: <20180815014609.19948-1-shenglei.zhang@intel.com> <20180815014609.19948-8-shenglei.zhang@intel.com> In-Reply-To: <20180815014609.19948-8-shenglei.zhang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 07/27] MdeModulePkg SdMmcPciHcDxe: Remove redundant functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 02:01:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sorry for missing this patch previously. Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > shenglei > Sent: Wednesday, August 15, 2018 9:46 AM > To: edk2-devel@lists.01.org > Cc: Dong, Eric; Zeng, Star > Subject: [edk2] [PATCH v2 07/27] MdeModulePkg SdMmcPciHcDxe: Remove > redundant functions >=20 > The functions that are never called have been removed. > They are SdCardGetCsd and SdCardGetScr. > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1062 >=20 > Cc: Star Zeng > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: shenglei > --- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 107 ------------------ > 1 file changed, 107 deletions(-) >=20 > 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; > } >=20 > -/** > - 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 c= ommand > to. > - @param[in] Rca The relative device address of selected devi= ce. > - @param[out] Csd The buffer to store the content of the CSD r= egister. > - Note the caller should ignore the lowest byt= e of this > - buffer as the content of this byte is meanin= gless 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 =3D &SdMmcCmdBlk; > - Packet.SdMmcStatusBlk =3D &SdMmcStatusBlk; > - Packet.Timeout =3D SD_MMC_HC_GENERIC_TIMEOUT; >=20 > - SdMmcCmdBlk.CommandIndex =3D SD_SEND_CSD; > - SdMmcCmdBlk.CommandType =3D SdMmcCommandTypeAc; > - SdMmcCmdBlk.ResponseType =3D SdMmcResponseTypeR2; > - SdMmcCmdBlk.CommandArgument =3D (UINT32)Rca << 16; >=20 > - Status =3D SdMmcPassThruPassThru (PassThru, Slot, &Packet, NULL); > - if (!EFI_ERROR (Status)) { > - // > - // For details, refer to SD Host Controller Simplified Spec 3.0 Tabl= e 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= . >=20 > - @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 c= ommand > to. > - @param[in] Rca The relative device address of selected devi= ce. > - @param[out] Scr The buffer to store the content of the SCR r= egister. > - > - @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 =3D &SdMmcCmdBlk; > - Packet.SdMmcStatusBlk =3D &SdMmcStatusBlk; > - Packet.Timeout =3D SD_MMC_HC_GENERIC_TIMEOUT; > - > - SdMmcCmdBlk.CommandIndex =3D SD_APP_CMD; > - SdMmcCmdBlk.CommandType =3D SdMmcCommandTypeAc; > - SdMmcCmdBlk.ResponseType =3D SdMmcResponseTypeR1; > - SdMmcCmdBlk.CommandArgument =3D (UINT32)Rca << 16; > - > - Status =3D SdMmcPassThruPassThru (PassThru, Slot, &Packet, NULL); > - if (EFI_ERROR (Status)) { > - return Status; > - } > - > - SdMmcCmdBlk.CommandIndex =3D SD_SEND_SCR; > - SdMmcCmdBlk.CommandType =3D SdMmcCommandTypeAdtc; > - SdMmcCmdBlk.ResponseType =3D SdMmcResponseTypeR1; > - > - Packet.InDataBuffer =3D Scr; > - Packet.InTransferLength =3D sizeof (SD_SCR); > - > - Status =3D SdMmcPassThruPassThru (PassThru, Slot, &Packet, NULL); > - > - return Status; > -} >=20 > /** > Send command SELECT_DESELECT_CARD to the SD device to select/deselect > it. > -- > 2.18.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel