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

Commit a5923817 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: cqhci: Handle cqhci crypto configurations correctly"

parents 9e84b183 9392d2d7
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)