mmc: sdhci-msm-ice: implement crypto_cfg_reset host operation
When encryption/decryption is enabled in CQ mode, the legacy commands that are sent in HALT state will use different slot other than slot 0 for crypto configuration information. The slot that is selected depends on the last slot that was used when it is in CQ mode. This is causing the data of legacy commands to be encrypted/decrypted based on the wrong slot usage for crypto config details. Hence, clear the crypto configuration of the slot used in CQ mode whenever it gets completed. Change-Id: I6817de46d895b61f410dd732be57ba60efb58fb2 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This commit is contained in:
parent
96deb87c8c
commit
4ca359f328
3 changed files with 13 additions and 0 deletions
|
@ -146,6 +146,12 @@ int sdhci_msm_ice_init(struct sdhci_host *host)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void sdhci_msm_ice_cfg_reset(struct sdhci_host *host, u32 slot)
|
||||
{
|
||||
writel_relaxed(SDHCI_MSM_ICE_ENABLE_BYPASS,
|
||||
host->ioaddr + CORE_VENDOR_SPEC_ICE_CTRL_INFO_3_n + 16 * slot);
|
||||
}
|
||||
|
||||
int sdhci_msm_ice_cfg(struct sdhci_host *host, struct mmc_request *mrq,
|
||||
u32 slot)
|
||||
{
|
||||
|
|
|
@ -80,6 +80,7 @@ enum {
|
|||
#ifdef CONFIG_MMC_SDHCI_MSM_ICE
|
||||
int sdhci_msm_ice_get_dev(struct sdhci_host *host);
|
||||
int sdhci_msm_ice_init(struct sdhci_host *host);
|
||||
void sdhci_msm_ice_cfg_reset(struct sdhci_host *host, u32 slot);
|
||||
int sdhci_msm_ice_cfg(struct sdhci_host *host, struct mmc_request *mrq,
|
||||
u32 slot);
|
||||
int sdhci_msm_ice_reset(struct sdhci_host *host);
|
||||
|
@ -103,6 +104,11 @@ inline int sdhci_msm_ice_init(struct sdhci_host *host)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void sdhci_msm_ice_cfg_reset(struct sdhci_host *host, u32 slot)
|
||||
{
|
||||
}
|
||||
|
||||
inline int sdhci_msm_ice_cfg(struct sdhci_host *host,
|
||||
struct mmc_request *mrq, u32 slot)
|
||||
{
|
||||
|
|
|
@ -3143,6 +3143,7 @@ void sdhci_msm_reset_workaround(struct sdhci_host *host, u32 enable)
|
|||
|
||||
static struct sdhci_ops sdhci_msm_ops = {
|
||||
.crypto_engine_cfg = sdhci_msm_ice_cfg,
|
||||
.crypto_cfg_reset = sdhci_msm_ice_cfg_reset,
|
||||
.crypto_engine_reset = sdhci_msm_ice_reset,
|
||||
.set_uhs_signaling = sdhci_msm_set_uhs_signaling,
|
||||
.check_power_status = sdhci_msm_check_power_status,
|
||||
|
|
Loading…
Add table
Reference in a new issue