<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/mmc/mmc.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>mmc: Add support for eMMC 5.1B specification</title>
<updated>2026-03-23T03:27:52+00:00</updated>
<author>
<name>Han Xu</name>
<email>han.xu@nxp.com</email>
</author>
<published>2026-02-25T21:13:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67fc505228558efa19380542d801807fa9eee054'/>
<id>67fc505228558efa19380542d801807fa9eee054</id>
<content type='text'>
Add support for eMMC specification version 5.1B by defining
MMC_VERSION_5_1B and including it in the version array.

eMMC 5.1B (JESD84-B51B) is a minor revision of the 5.1 specification
that primarily addresses MDT (Manufacturing Date) adjustment for dates
beyond 2025. This aligns with the Linux kernel commit 9996707822f82
("mmc: core: Adjust MDT beyond 2025").

Since the manufacturing date field is not currently used in U-Boot,
this change has no functional impact beyond proper device recognition.
It allows the driver to correctly identify and initialize eMMC devices
that report version 5.1B in their Extended CSD register.

Signed-off-by: Han Xu &lt;han.xu@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for eMMC specification version 5.1B by defining
MMC_VERSION_5_1B and including it in the version array.

eMMC 5.1B (JESD84-B51B) is a minor revision of the 5.1 specification
that primarily addresses MDT (Manufacturing Date) adjustment for dates
beyond 2025. This aligns with the Linux kernel commit 9996707822f82
("mmc: core: Adjust MDT beyond 2025").

Since the manufacturing date field is not currently used in U-Boot,
this change has no functional impact beyond proper device recognition.
It allows the driver to correctly identify and initialize eMMC devices
that report version 5.1B in their Extended CSD register.

Signed-off-by: Han Xu &lt;han.xu@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: Fix typos in comments and debug messages</title>
<updated>2026-02-03T14:11:05+00:00</updated>
<author>
<name>Tanmay Kathpalia</name>
<email>tanmay.kathpalia@altera.com</email>
</author>
<published>2026-01-25T12:39:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7f9e9b50336777ce07ca7d7bc40bd82856d12468'/>
<id>7f9e9b50336777ce07ca7d7bc40bd82856d12468</id>
<content type='text'>
Fix the following typos in drivers/mmc/mmc.c:
- "neiter" -&gt; "neither" in __mmc_switch() comment
- "witdh" -&gt; "width" in bus_width() warning message
- "enver" -&gt; "never" in mmc_select_mode_and_width() comment

Signed-off-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following typos in drivers/mmc/mmc.c:
- "neiter" -&gt; "neither" in __mmc_switch() comment
- "witdh" -&gt; "width" in bus_width() warning message
- "enver" -&gt; "never" in mmc_select_mode_and_width() comment

Signed-off-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: Fix retry logic in sd_get_capabilities</title>
<updated>2026-01-22T02:38:50+00:00</updated>
<author>
<name>Yanir Levin</name>
<email>yanir.levin@tandemg.com</email>
</author>
<published>2026-01-22T02:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=124aeeff837d20374ec00e292c31444b67b7a971'/>
<id>124aeeff837d20374ec00e292c31444b67b7a971</id>
<content type='text'>
In sd_get_capabilities an ACMD is sent (SD_CMD_APP_SEND_SCR),
which requires sending APP_CMD (MMC_CMD_APP_CMD) before.

Currently, the ACMD is retried on error, however APP_CMD isn't.
In this case, when the ACMD fails and it is tried again,
the retry attempts will not be handled as ACMD, which is wrong.

The fix performs the retry attempts on the sequence of
APP_CMD and the ACMD together.

Signed-off-by: Yanir Levin &lt;yanir.levin@tandemg.com&gt;
Reviewed-by: Eran Moshe &lt;emoshe@gsitechnology.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In sd_get_capabilities an ACMD is sent (SD_CMD_APP_SEND_SCR),
which requires sending APP_CMD (MMC_CMD_APP_CMD) before.

Currently, the ACMD is retried on error, however APP_CMD isn't.
In this case, when the ACMD fails and it is tried again,
the retry attempts will not be handled as ACMD, which is wrong.

The fix performs the retry attempts on the sequence of
APP_CMD and the ACMD together.

Signed-off-by: Yanir Levin &lt;yanir.levin@tandemg.com&gt;
Reviewed-by: Eran Moshe &lt;emoshe@gsitechnology.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: Fix missing 1 ms delay after mmc power up</title>
<updated>2026-01-08T13:57:20+00:00</updated>
<author>
<name>Christoph Stoidner</name>
<email>c.stoidner@phytec.de</email>
</author>
<published>2025-10-31T14:59:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=21cdfd199220cd259b5b7d472cee0577b7eb8eca'/>
<id>21cdfd199220cd259b5b7d472cee0577b7eb8eca</id>
<content type='text'>
mmc/sd specification requires a 1 ms delay (stable supply voltage)
after vdd was enabled and before issuing first command.

For most sdcard/soc combinations, the missing delay seems to be not a
problem because the processing time between enabling vdd and the first
command is often hundreds of microseconds or more. However, in our
specific case, some sdcards were not detected by u-boot:
* soc: NXP i.MX 93
* sdcards: SanDisk Ultra, 64GB micro SDXC 1,
           MediaRange, 8GB, SDHC
* measured time between vdd and first command: approx. 784us
* symptom: both sdcards did not respond at all to first commands,
           u-boot mmc subsystem ran into timeout and stops to
           initialize the cards

Signed-off-by: Christoph Stoidner &lt;c.stoidner@phytec.de&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
mmc/sd specification requires a 1 ms delay (stable supply voltage)
after vdd was enabled and before issuing first command.

For most sdcard/soc combinations, the missing delay seems to be not a
problem because the processing time between enabling vdd and the first
command is often hundreds of microseconds or more. However, in our
specific case, some sdcards were not detected by u-boot:
* soc: NXP i.MX 93
* sdcards: SanDisk Ultra, 64GB micro SDXC 1,
           MediaRange, 8GB, SDHC
* measured time between vdd and first command: approx. 784us
* symptom: both sdcards did not respond at all to first commands,
           u-boot mmc subsystem ran into timeout and stops to
           initialize the cards

Signed-off-by: Christoph Stoidner &lt;c.stoidner@phytec.de&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: sd: Handle UHS-I voltage signaling without power cycle</title>
<updated>2025-10-30T02:11:18+00:00</updated>
<author>
<name>Tanmay Kathpalia</name>
<email>tanmay.kathpalia@altera.com</email>
</author>
<published>2025-10-21T20:45:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=906ee6785b1cb5a51375b5a613a7cc56acced8c8'/>
<id>906ee6785b1cb5a51375b5a613a7cc56acced8c8</id>
<content type='text'>
Some boards have SD card connectors where the power rail cannot be switched
off by the driver. However there are various circumstances when a card
might be re-initialized, such as after system resume, warm re-boot, or
error handling. However, a UHS card will continue to use 1.8V signaling
unless it is power cycled.

If the card has not been power cycled, it may still be using 1.8V
signaling. According to the SD spec., the Bus Speed Mode (function group 1)
bits 2 to 4 are zero if the card is initialized at 3.3V signal level. Thus
they can be used to determine if the card has already switched to 1.8V
signaling. Detect that situation and try to initialize a UHS-I (1.8V)
transfer mode.

Signed-off-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some boards have SD card connectors where the power rail cannot be switched
off by the driver. However there are various circumstances when a card
might be re-initialized, such as after system resume, warm re-boot, or
error handling. However, a UHS card will continue to use 1.8V signaling
unless it is power cycled.

If the card has not been power cycled, it may still be using 1.8V
signaling. According to the SD spec., the Bus Speed Mode (function group 1)
bits 2 to 4 are zero if the card is initialized at 3.3V signal level. Thus
they can be used to determine if the card has already switched to 1.8V
signaling. Detect that situation and try to initialize a UHS-I (1.8V)
transfer mode.

Signed-off-by: Tanmay Kathpalia &lt;tanmay.kathpalia@altera.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: enable/disable VQMMC regulator only during MMC power cycle</title>
<updated>2025-10-30T02:11:17+00:00</updated>
<author>
<name>Kaustabh Chakraborty</name>
<email>kauschluss@disroot.org</email>
</author>
<published>2025-10-17T15:24:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f425edd10f30361ad52af466e36ffe718af1ea5'/>
<id>0f425edd10f30361ad52af466e36ffe718af1ea5</id>
<content type='text'>
Disrupting the regulator voltage during ios configuration messes with
the MMC initialization sequence. Move the VQMMC regulator enable/disable
functions to the MMC power cycle function, similar to how its done for
the VMMC regulator.

Signed-off-by: Kaustabh Chakraborty &lt;kauschluss@disroot.org&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disrupting the regulator voltage during ios configuration messes with
the MMC initialization sequence. Move the VQMMC regulator enable/disable
functions to the MMC power cycle function, similar to how its done for
the VMMC regulator.

Signed-off-by: Kaustabh Chakraborty &lt;kauschluss@disroot.org&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: Fix a potential warning in xPL</title>
<updated>2025-10-10T02:46:40+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-10-01T20:30:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6304cfa5a7ea57725700556f8f64197a75f93066'/>
<id>6304cfa5a7ea57725700556f8f64197a75f93066</id>
<content type='text'>
When xPL_MMC_WRITE is set but also xPL_MMC_TINY is set, the function
sd_read_ssr may be unused. Guard it appropriately.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When xPL_MMC_WRITE is set but also xPL_MMC_TINY is set, the function
sd_read_ssr may be unused. Guard it appropriately.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: core: style fixes in mmc.c</title>
<updated>2025-09-24T16:06:27+00:00</updated>
<author>
<name>Bhimeswararao Matsa</name>
<email>bhimeswararao.matsa@gmail.com</email>
</author>
<published>2025-09-01T13:44:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3cabc6bf7e16c7e2a1156392c31e40f678cc7026'/>
<id>3cabc6bf7e16c7e2a1156392c31e40f678cc7026</id>
<content type='text'>
Fix a couple of style issues reported by checkpatch.pl:

- Replace `#ifdef CONFIG_MMC_TRACE` with `#if IS_ENABLED(CONFIG_MMC_TRACE)`
  to follow the preferred kernel style for config-dependent branches.
- Drop explicit zero initialization of a static variable.

No functional change intended.

Signed-off-by: Bhimeswararao Matsa &lt;bhimeswararao.matsa@gmail.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a couple of style issues reported by checkpatch.pl:

- Replace `#ifdef CONFIG_MMC_TRACE` with `#if IS_ENABLED(CONFIG_MMC_TRACE)`
  to follow the preferred kernel style for config-dependent branches.
- Drop explicit zero initialization of a static variable.

No functional change intended.

Signed-off-by: Bhimeswararao Matsa &lt;bhimeswararao.matsa@gmail.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: core: drop space before newline in trace printf</title>
<updated>2025-09-01T02:33:10+00:00</updated>
<author>
<name>Bhimeswararao Matsa</name>
<email>bhimeswararao.matsa@gmail.com</email>
</author>
<published>2025-08-29T02:11:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=140562d3a2b447079499d773a7d21ec1728692cb'/>
<id>140562d3a2b447079499d773a7d21ec1728692cb</id>
<content type='text'>
Remove unnecessary whitespace before '\n' in trace printf
format strings (checkpatch warning QUOTED_WHITESPACE_BEFORE_NEWLINE).

No functional change intended.

Signed-off-by: Bhimeswararao Matsa &lt;bhimeswararao.matsa@gmail.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unnecessary whitespace before '\n' in trace printf
format strings (checkpatch warning QUOTED_WHITESPACE_BEFORE_NEWLINE).

No functional change intended.

Signed-off-by: Bhimeswararao Matsa &lt;bhimeswararao.matsa@gmail.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: Take cleanup path to free memory on error exit</title>
<updated>2025-07-17T17:39:06+00:00</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-07-03T14:03:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1d2723731b41be97fdc56acb68e075f752fd2f2a'/>
<id>1d2723731b41be97fdc56acb68e075f752fd2f2a</id>
<content type='text'>
Instead of returning -EINVAL directly which will not call the cleanup
path to free memory, fix the code to set the error and then goto the
cleanup code.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of returning -EINVAL directly which will not call the cleanup
path to free memory, fix the code to set the error and then goto the
cleanup code.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
