From 2f70573ca48451e34f5a7336c25b8628c402e590 Mon Sep 17 00:00:00 2001 From: Neeraj Soni Date: Thu, 23 Jul 2020 13:25:57 +0530 Subject: [PATCH] mmc: host: Fix the offset for ICE address ICE address space was added to command queue address space in eMMC JEDEC v5.2 spec so adapt the offset of crypto registers accordingly. Change-Id: I409b031edcf1055289f2868aaaa00adc20eabfec Signed-off-by: Neeraj Soni --- drivers/mmc/host/cmdq_hci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c index a7b7597d96a3..2d182bcb401f 100644 --- a/drivers/mmc/host/cmdq_hci.c +++ b/drivers/mmc/host/cmdq_hci.c @@ -411,6 +411,11 @@ static int cmdq_enable(struct mmc_host *mmc) if (cmdq_host_is_crypto_supported(cq_host)) { cmdq_crypto_enable(cq_host); cqcfg |= CQ_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 + * shifted. Set offset_changed boolean to use updated address. + */ + cq_host->offset_changed = true; } cmdq_writel(cq_host, cqcfg, CQCFG);