From: Axe Yang <axe.yang@mediatek.com>
To: Chaotian Jing <chaotian.jing@mediatek.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Wenbin Mei <wenbin.mei@mediatek.com>
Cc: <yong.mao@mediatek.com>, <qingliang.li@mediatek.com>,
<andy-ld.lu@mediatek.com>, <linux-mmc@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
Axe Yang <axe.yang@mediatek.com>
Subject: [PATCH 2/2] mmc: mtk-sd: add support to disable single burst
Date: Thu, 6 Mar 2025 16:48:06 +0800 [thread overview]
Message-ID: <20250306085028.5024-3-axe.yang@mediatek.com> (raw)
In-Reply-To: <20250306085028.5024-1-axe.yang@mediatek.com>
Add support to disable 'single' burst type if the bus type is AXI.
Since the AMBA within some of the legacy and new designed MSDC IP
is AXI, this switch is necessary.
The burst type is not IC-specific, but host-specific. So we use a
devicetree property 'mediatek,disable-single-burst' to switch burst
type for specific MSDC host.
Signed-off-by: Axe Yang <axe.yang@mediatek.com>
---
drivers/mmc/host/mtk-sd.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 345ea91629e0..ed46c69def1e 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -249,6 +249,7 @@
#define MSDC_PATCH_BIT1_CMDTA GENMASK(5, 3) /* RW */
#define MSDC_PB1_BUSY_CHECK_SEL BIT(7) /* RW */
#define MSDC_PATCH_BIT1_STOP_DLY GENMASK(11, 8) /* RW */
+#define MSDC_PB1_SINGLE_BURST BIT(16) /* RW */
#define MSDC_PATCH_BIT2_CFGRESP BIT(15) /* RW */
#define MSDC_PATCH_BIT2_CFGCRCSTS BIT(28) /* RW */
@@ -485,6 +486,7 @@ struct msdc_host {
u32 src_clk_freq; /* source clock frequency */
unsigned char timing;
bool vqmmc_enabled;
+ bool disable_single_burst;
u32 latch_ck;
u32 hs400_ds_delay;
u32 hs400_ds_dly3;
@@ -1874,6 +1876,10 @@ static void msdc_init_hw(struct msdc_host *host)
writel(0xffff4089, host->base + MSDC_PATCH_BIT1);
sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL);
+ if (host->disable_single_burst)
+ sdr_clr_bits(host->base + MSDC_PATCH_BIT1,
+ MSDC_PB1_SINGLE_BURST);
+
if (host->dev_comp->stop_clk_fix) {
if (host->dev_comp->stop_dly_sel)
sdr_set_field(host->base + MSDC_PATCH_BIT1,
@@ -2820,6 +2826,10 @@ static void msdc_of_property_parse(struct platform_device *pdev,
host->cqhci = true;
else
host->cqhci = false;
+
+ host->disable_single_burst =
+ of_property_read_bool(pdev->dev.of_node,
+ "mediatek,disable-single-burst");
}
static int msdc_of_clock_parse(struct platform_device *pdev,
--
2.46.0
prev parent reply other threads:[~2025-03-06 10:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 8:48 [PATCH 0/2] mmc: mtk-sd: add support for burst type switch Axe Yang
2025-03-06 8:48 ` [PATCH 1/2] dt-bindings: mmc: mtk-sd: add single burst switch Axe Yang
2025-03-06 9:19 ` AngeloGioacchino Del Regno
2025-03-07 6:59 ` Axe Yang (杨磊)
2025-03-07 15:48 ` Conor Dooley
2025-03-10 3:31 ` Axe Yang (杨磊)
2025-03-11 9:47 ` AngeloGioacchino Del Regno
2025-03-12 6:30 ` Axe Yang (杨磊)
2025-03-25 2:41 ` Axe Yang (杨磊)
2025-03-25 10:20 ` AngeloGioacchino Del Regno
2025-03-27 2:48 ` Axe Yang (杨磊)
2025-04-03 10:57 ` AngeloGioacchino Del Regno
2025-03-06 8:48 ` Axe Yang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250306085028.5024-3-axe.yang@mediatek.com \
--to=axe.yang@mediatek.com \
--cc=andy-ld.lu@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chaotian.jing@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=qingliang.li@mediatek.com \
--cc=robh@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=wenbin.mei@mediatek.com \
--cc=yong.mao@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox