<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/mmc, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/mmc?h=main</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/mmc?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-07-29T03:15:56Z</updated>
<entry>
<title>mmc: enable CMD23 for multi-block transfers</title>
<updated>2026-07-29T03:15:56Z</updated>
<author>
<name>Eric Chung</name>
<email>eric.chung@riscstar.com</email>
</author>
<published>2026-07-22T15:21:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7e613de952e7e407a14d7110d6697457a53a68bc'/>
<id>urn:sha1:7e613de952e7e407a14d7110d6697457a53a68bc</id>
<content type='text'>
Enable the support for the CMD23 (SET_BLOCK_COUNT) command to
manage multi-block read/write operations. This allows the MMC
core to use CMD23 in preference to the legacy CMD18/CMD25 plus
CMD12 sequence, reducing command overhead and improving I/O
performance on multi-block transfers.

Signed-off-by: Eric Chung &lt;eric.chung@riscstar.com&gt;
Signed-off-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
[ Drop MMC_CAP_CMD32 from mvebu_mmc.h ]
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>mmc: fix mmc_deinit regression when card is at 1.8V signaling</title>
<updated>2026-07-29T03:15:55Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-07-13T13:32:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4f5f30e77c69ccb981978365fdabe0825f041f88'/>
<id>urn:sha1:4f5f30e77c69ccb981978365fdabe0825f041f88</id>
<content type='text'>
Commit 906ee6785b1c ("mmc: sd: Handle UHS-I voltage signaling without
power cycle") added detection of cards already operating at 1.8V
signaling via mmc_sd_card_using_v18(). This correctly handles the
warm-reboot scenario in mmc_startup().

However, mmc_deinit() strips ALL UHS capabilities from the card caps
and calls sd_select_mode_and_width() to downgrade the card before
kernel handoff. For a card that has switched to 1.8V, uhs_en is
already true (via OCR_S18R in mmc-&gt;ocr), so sd_select_mode_and_width()
attempts UHS mode selection -- but no UHS modes remain in the filtered
caps. The non-UHS fallbacks (SD_HS, MMC_LEGACY) are 3.3V speed modes
which, when selected while signaling at 1.8V, leave the card in an
inconsistent state it cannot recover from without a power cycle.

Per SD Physical Layer Specification: "Once the card enters 1.8V
signaling mode, the card cannot be switched to 3.3V signaling without
power cycle. If the card receives CMD0, card returns to Idle state but
still works with SDR12 timing."

Fix by using a UHS capability mask that preserves UHS_SDR12 when the
card is operating at 1.8V. SDR12 is the minimum valid UHS-I mode and
is always available at 1.8V signaling per the SD specification, so the
card is left in a consistent (1.8V) state at a low, safe speed.

Fixes: 906ee6785b1c ("mmc: sd: Handle UHS-I voltage signaling without power cycle")
Reviewed-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>mmc: fix mmc_bwrite() ignoring host get_b_max() callback</title>
<updated>2026-07-29T03:15:55Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-07-13T13:32:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=648263b69c329d157d2a28f6b74172640e611533'/>
<id>urn:sha1:648263b69c329d157d2a28f6b74172640e611533</id>
<content type='text'>
mmc_bwrite() uses mmc-&gt;cfg-&gt;b_max directly to limit per-transfer block
count. The read path (mmc_bread()) correctly calls mmc_get_b_max()
which dispatches to the host driver get_b_max() callback. This callback
allows host drivers to enforce DMA boundary constraints based on the
buffer address.

Fix mmc_bwrite() to use mmc_get_b_max() to match the read path. This
requires removing the static qualifier from the non-DM mmc_get_b_max()
and adding its declaration to mmc_private.h.

Reviewed-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>mmc: sdhci: fix align_buffer memory leak on re-initialization</title>
<updated>2026-07-29T03:15:55Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-07-13T13:32:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b95ce3f0945cac05c09a1837ea2401df78d766d4'/>
<id>urn:sha1:b95ce3f0945cac05c09a1837ea2401df78d766d4</id>
<content type='text'>
sdhci_init() allocates a 512KB aligned bounce buffer for controllers
with SDHCI_QUIRK_32BIT_DMA_ADDR. In the non-DM code path, sdhci_init()
is registered as ops-&gt;init and called on every mmc_init(). Each call
allocates a new buffer without checking or freeing the previous one,
leaking 512KB per re-initialization.

Fix by guarding the allocation with !host-&gt;align_buffer so it only
allocates on the first call.

Reviewed-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Signed-off-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>mmc: rpmb: fix tautological condition in RPMB_REQ_READ_DATA validation</title>
<updated>2026-07-29T03:15:55Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-07-13T13:32:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67d06fe102712dc07e05bbdf893fc48ba73c86a6'/>
<id>urn:sha1:67d06fe102712dc07e05bbdf893fc48ba73c86a6</id>
<content type='text'>
In rpmb_route_frames(), the RPMB_REQ_READ_DATA case checks
"req_cnt != 1 || !req_cnt" which is tautological -- !req_cnt (req_cnt
== 0) is always a subset of req_cnt != 1. The second operand is dead
code.

Based on the pattern of all other cases in the switch (RPMB_REQ_KEY,
RPMB_REQ_WRITE_DATA, RPMB_REQ_WCOUNTER) which validate rsp_cnt, this
was meant to be "req_cnt != 1 || !rsp_cnt". Without this fix, a caller
could pass rsp_cnt=0 for a read request without validation.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>mmc: fix mmc_poll_for_busy() false timeout when card is ready</title>
<updated>2026-07-29T03:15:55Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-07-13T13:32:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f23b5e079a93245c01f618022fd76d189070d190'/>
<id>urn:sha1:f23b5e079a93245c01f618022fd76d189070d190</id>
<content type='text'>
mmc_poll_for_busy() returns a false -ETIMEDOUT if the card becomes
ready on the exact iteration where timeout_ms reaches 0. The card-ready
check breaks out of the loop, but then the post-loop check
"if (timeout_ms &lt;= 0)" fires and returns -ETIMEDOUT despite the card
being ready.

Fix by returning 0 directly when the card is ready instead of breaking
out of the loop. The only exit from the loop is now the timeout path,
so the post-loop code unconditionally returns -ETIMEDOUT.

Reviewed-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>mmc: sunxi: fix MACH_SUN9I typo in get_mclk_offset()</title>
<updated>2026-07-26T20:31:22Z</updated>
<author>
<name>Omar Ivan Fardjoume</name>
<email>ivan.fardjoume@gmail.com</email>
</author>
<published>2026-05-26T21:28:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c83594e844931ac2db1da19597119c2309b88f2c'/>
<id>urn:sha1:c83594e844931ac2db1da19597119c2309b88f2c</id>
<content type='text'>
The get_mclk_offset() function used the non-existent Kconfig symbol
CONFIG_MACH_SUN9I_A80 instead of CONFIG_MACH_SUN9I, causing the
MMC2 clock register to be written at 0x06000090 instead of
0x06000418. This corrupted the CMD2 response and made eMMC
completely unresponsive.
Also the legacy (SPL) sunxi_mmc_init() did not include CONFIG_MACH_SUN9I
in the 8-bit bus width condition, so MMC2 (eMMC) would only use
4-bit mode in the SPL, which is insufficient for reliable boot.

Tested on a Cubieboard4 A80: with both fixes, SPL loads U-Boot proper
and boots Debian 12 from eMMC with no SD card present.

Signed-off-by: Omar Ivan Fardjoume &lt;ivan.fardjoume@email.com&gt;
[Andre: fix mangled patch, trim commit message]
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
</entry>
<entry>
<title>mmc: sdhci: Use CONFIG_IS_ENABLED for MMC_IO_VOLTAGE</title>
<updated>2026-07-12T08:18:32Z</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2026-07-09T23:02:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=35c3e733fe4cbaa91f6cc02ddbb30f6feb3eb1fc'/>
<id>urn:sha1:35c3e733fe4cbaa91f6cc02ddbb30f6feb3eb1fc</id>
<content type='text'>
Use CONFIG_IS_ENABLED() instead of IS_ENABLED() when checking the
MMC_IO_VOLTAGE symbol so the Kconfig option is evaluated correctly for
xPL builds.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>mmc: dw_mmc: Allow use of in-spec voltage range for vqmmc-supply</title>
<updated>2026-07-12T08:18:32Z</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2026-07-09T23:02:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9118fc77f088aa21bbdeb03344f0a576a0a835d2'/>
<id>urn:sha1:9118fc77f088aa21bbdeb03344f0a576a0a835d2</id>
<content type='text'>
The Rockchip RK3399 SoC SDMMC IO domain supports 1.8V and 3.0V mode, and
the 3.0V mode is within SD Standards allowed 2.7V-3.6V range. However,
the commit 0b75109b6aaf ("mmc: dw_mmc: return error for invalid voltage
setting") help enforce strict 1.8V and 3.3V when setting vqmmc-supply
making mmc_set_signal_voltage() now fail for MMC_SIGNAL_VOLTAGE_330 and
leading to an improper switch to MMC_SIGNAL_VOLTAGE_180.

Use regulator_set_value_clamp() to set an SD Standards voltage range,
1.70V-1.95V and 2.7V-3.6V, I/O voltage instead of requiring an exact
regulator value to closer match Linux and to fix use of 3.3V signal
voltage on Rockchip RK3399 boards using MMC_IO_VOLTAGE=y.

Fixes: 0b75109b6aaf ("mmc: dw_mmc: return error for invalid voltage setting")
Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
</entry>
<entry>
<title>treewide: Kconfig: use bool instead of tristate</title>
<updated>2026-07-10T21:45:57Z</updated>
<author>
<name>Anshul Dalal</name>
<email>anshuld@ti.com</email>
</author>
<published>2026-06-25T03:17:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=199a088b96c9d352cffa59ce4043e5ac60917697'/>
<id>urn:sha1:199a088b96c9d352cffa59ce4043e5ac60917697</id>
<content type='text'>
U-Boot does not support modules, so having tristate options is useless.

Therefore this patch does a blind replace of all tristate options to
bool tree-wide.

Signed-off-by: Anshul Dalal &lt;anshuld@ti.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@nabladev.com&gt;
Reviewed-by: Quentin Schulz &lt;quentin.schulz@cherry.de&gt;
Reviewed-by: Siddharth Vadapalli &lt;s-vadapalli@ti.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Reviewed-by: Romain Gantois &lt;romain.gantois@bootlin.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
