Sorry for missing this patch previously.
Reviewed-by: Hao Wu <hao.a...@intel.com>

Best Regards,
Hao Wu


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@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
> 
> 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.z...@intel.com>
> Cc: Eric Dong <eric.d...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: shenglei <shenglei.zh...@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
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to