Skip to content

Commit d680d05

Browse files
committed
mmc: sdhci-uhs2: Add quirk for devices with broken UHS-2
The GL9755 in Apple silicon Macboo Pros and Mac Studios has non-functioning UHS-2 under linux. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 0c78e14 commit d680d05

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/mmc/host/sdhci-uhs2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,8 @@ static void __sdhci_uhs2_add_host_v4(struct sdhci_host *host, u32 caps1)
11621162
mmc = host->mmc;
11631163

11641164
/* Support UHS2 */
1165-
if (caps1 & SDHCI_SUPPORT_UHS2)
1165+
if ((caps1 & SDHCI_SUPPORT_UHS2) &&
1166+
!(host->quirks2 & SDHCI_QUIRK2_BROKEN_UHS2))
11661167
mmc->caps2 |= MMC_CAP2_SD_UHS2;
11671168

11681169
max_current_caps2 = sdhci_readl(host, SDHCI_MAX_CURRENT_1);

drivers/mmc/host/sdhci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ struct sdhci_host {
537537
/* Issue CMD and DATA reset together */
538538
#define SDHCI_QUIRK2_ISSUE_CMD_DAT_RESET_TOGETHER (1<<19)
539539

540+
#define SDHCI_QUIRK2_BROKEN_UHS2 (1<<27)
541+
540542
int irq; /* Device IRQ */
541543
void __iomem *ioaddr; /* Mapped address */
542544
phys_addr_t mapbase; /* physical address base */

0 commit comments

Comments
 (0)