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

Unverified Commit 9392d2d7 authored by Phanindra Babu Pabba's avatar Phanindra Babu Pabba
Browse files

mmc: cqhci: Handle cqhci crypto configurations correctly



Enable/Disable cqhci crypto from cqhci_enable/cqhci_disable
instead of __cqhci_enable/__cqhci_disable to avoid mulitple
changes to crypto configs. These APIs are more frequently
called & the intermittent disablement of crypto config is
leading to failure of keyslot programming, their by blocking
the encryption of content.

Change-Id: If7bafaad4ec90b6f97ab1ca6006335d6f58220e4
Signed-off-by: default avatarPhanindra Babu Pabba <pabba@codeaurora.org>
parent 9cdeb30a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -281,7 +281,6 @@ static void __cqhci_enable(struct cqhci_host *cq_host)
		cqcfg |= CQHCI_TASK_DESC_SZ;

	if (cqhci_host_is_crypto_supported(cq_host)) {
		cqhci_crypto_enable(cq_host);
		cqcfg |= CQHCI_ICE_ENABLE;
		/* For SDHC v5.0 onwards, ICE 3.0 specific registers are added
		 * in CQ register space, due to which few CQ registers are
@@ -325,9 +324,6 @@ static void __cqhci_disable(struct cqhci_host *cq_host)
{
	u32 cqcfg;

	if (cqhci_host_is_crypto_supported(cq_host))
		cqhci_crypto_disable(cq_host);

	cqcfg = cqhci_readl(cq_host, CQHCI_CFG);
	cqcfg &= ~CQHCI_ENABLE;
	cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
@@ -373,6 +369,9 @@ static int cqhci_enable(struct mmc_host *mmc, struct mmc_card *card)
	if (err)
		return err;

	if (cqhci_host_is_crypto_supported(cq_host))
		cqhci_crypto_enable(cq_host);

	__cqhci_enable(cq_host);

	if (cq_host->ops->enhanced_strobe_mask)
@@ -431,6 +430,9 @@ static void cqhci_disable(struct mmc_host *mmc)

	cqhci_off(mmc);

	if (cqhci_host_is_crypto_supported(cq_host))
		cqhci_crypto_disable(cq_host);

	__cqhci_disable(cq_host);

	if (cq_host->ops->enhanced_strobe_mask)