summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/cqhci.h
diff options
context:
space:
mode:
authorWenbin Mei <wenbin.mei@mediatek.com>2023-06-09 18:13:55 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2023-06-12 15:20:08 +0200
commitf2764e1f795c1db80ac1a08abae5b2f470355da6 (patch)
tree40869e8d84d1e43f967c6de7d83379bc114738da /drivers/mmc/host/cqhci.h
parentac93af1fe3f49ddecc6d0a367e9c3e1caac3cfe5 (diff)
mmc: mtk-sd: reduce CIT for better performance
CQHCI_SSC1 indicates to CQE the polling period to use when using periodic SEND_QUEUE_STATUS(CMD13) polling. Since MSDC CQE uses msdc_hclk as ITCFVAL, so driver should use hclk frequency to get the actual time. The default value 0x1000 that corresponds to 150us for MediaTek SoCs, let's decrease it to 0x40 that corresponds to 2.35us, which can improve the performance of some eMMC devices. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://lore.kernel.org/r/20230609101355.5220-2-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/cqhci.h')
-rw-r--r--drivers/mmc/host/cqhci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/cqhci.h b/drivers/mmc/host/cqhci.h
index ba9387ed90eb..1a12e40a02e6 100644
--- a/drivers/mmc/host/cqhci.h
+++ b/drivers/mmc/host/cqhci.h
@@ -5,6 +5,7 @@
#define LINUX_MMC_CQHCI_H
#include <linux/compiler.h>
+#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/spinlock_types.h>
#include <linux/types.h>
@@ -23,6 +24,8 @@
/* capabilities */
#define CQHCI_CAP 0x04
#define CQHCI_CAP_CS 0x10000000 /* Crypto Support */
+#define CQHCI_CAP_ITCFMUL GENMASK(15, 12)
+#define CQHCI_ITCFMUL(x) FIELD_GET(CQHCI_CAP_ITCFMUL, (x))
/* configuration */
#define CQHCI_CFG 0x08