difos/target/linux/bcm27xx/patches-6.12/950-0430-drivers-sdhci-brcmstb-work-around-mystery-CQE-CMD_ID.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

37 lines
1.2 KiB
Diff

From 87d96e0b65fc81f4c24eb3cc80ebf92eb99c8578 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.com>
Date: Fri, 22 Mar 2024 14:22:55 +0000
Subject: [PATCH] drivers: sdhci-brcmstb: work around mystery CQE
CMD_IDLE_TIMER trampling
For unknown reasons the controller seems to reset the idle polling timer
interval on CQE enable/disable to 8 clocks which is extremely short.
Just use the reset value in the eMMC spec (4096 clock periods which at
200MHz is ~20uS).
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
---
drivers/mmc/host/sdhci-brcmstb.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -385,6 +385,7 @@ static void sdhci_brcmstb_dumpregs(struc
static void sdhci_brcmstb_cqe_enable(struct mmc_host *mmc)
{
struct sdhci_host *host = mmc_priv(mmc);
+ struct cqhci_host *cq_host = mmc->cqe_private;
u32 reg;
reg = sdhci_readl(host, SDHCI_PRESENT_STATE);
@@ -394,6 +395,9 @@ static void sdhci_brcmstb_cqe_enable(str
}
sdhci_cqe_enable(mmc);
+
+ /* Reset CMD13 polling timer back to eMMC specification default */
+ cqhci_writel(cq_host, 0x00011000, CQHCI_SSC1);
}
static const struct cqhci_host_ops sdhci_brcmstb_cqhci_ops = {