Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e35aae2 authored by Sahitya Tummala's avatar Sahitya Tummala Committed by Veerabhadrarao Badiganti
Browse files

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: default avatarSahitya Tummala <stummala@codeaurora.org>
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
parent 82a1975d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -224,6 +224,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)
{
+6 −0
Original line number Diff line number Diff line
@@ -97,6 +97,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);
@@ -120,6 +121,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)
{