Page MenuHomeFreeBSD

sdhci: Add new quirk for hardware that can't signal R1B busy
Needs ReviewPublic

Authored by jhibbits on Mon, Aug 3, 11:33 PM.

Details

Reviewers
wma
mmel
imp
Summary

Some sdhci controllers don't fire Transfer Complete when the R1B busy
signal releases. sdhci_finish_command() waits for TC (via data_done)
before considering the request complete, which hangs R1B-without-data
commands (CMD7, CMD12, CMD38, MMC CMD6 switches, etc.) on affected
hardware.

Add SDHCI_QUIRK_NO_BUSY_IRQ. When set, sdhci_finish_command() treats
R1B-without-data as complete at response time; the next command's
CIHB/CDIHB inhibit polling in sdhci_start_command() naturally waits for
the card to release DAT0 busy before issuing.

Modeled on Linux's SDHCI_QUIRK_NO_BUSY_IRQ
(drivers/mmc/host/sdhci.c).

Set the quirk in sdhci_fsl_fdt on Freescale eSDHC vendor version <= V22
(e.g. P1022, MPC8544, older PowerQUICC-III/QorIQ), matching what Linux
does at sdhci-of-esdhc.c:1465-1466.

Assisted-by: Claude Code (Opus 4.7(1M))

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75356
Build 72239: arc lint + arc unit