<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/ufs/ufs.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>ufs: core: Rename ufs.c to ufs-uclass.c</title>
<updated>2025-10-28T16:32:48+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-10-28T14:22:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1de63f1be48b6af0d2e90cdadfa9c0d3b9abf3b7'/>
<id>1de63f1be48b6af0d2e90cdadfa9c0d3b9abf3b7</id>
<content type='text'>
Previous commit folded existing ufs-uclass.c into ufs.c ,
which produced a nice and reviewable change , but also broke
the UCLASS should be in *-uclass.c pattern. Fix it. Keep the
change separate from the previous one to make this reviewable.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20251028142335.18125-3-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous commit folded existing ufs-uclass.c into ufs.c ,
which produced a nice and reviewable change , but also broke
the UCLASS should be in *-uclass.c pattern. Fix it. Keep the
change separate from the previous one to make this reviewable.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20251028142335.18125-3-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: core: Fold ufs-uclass into ufs</title>
<updated>2025-10-28T16:32:29+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2025-10-28T14:22:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ea97b856179338a51cb6fd3fef07680e5e2c662a'/>
<id>ea97b856179338a51cb6fd3fef07680e5e2c662a</id>
<content type='text'>
Move the few lines of ufs-uclass.c into ufs.c and remove the
ufs-uclass.c . No functional change.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20251028142335.18125-2-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the few lines of ufs-uclass.c into ufs.c and remove the
ufs-uclass.c . No functional change.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Link: https://patch.msgid.link/20251028142335.18125-2-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: core: Add ufshcd_dme_enable() and ufshcd_dme_reset()</title>
<updated>2025-10-28T16:20:17+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2025-10-20T08:16:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=84919722e6a7af63729e2289588f4dfb37b43879'/>
<id>84919722e6a7af63729e2289588f4dfb37b43879</id>
<content type='text'>
In order for host drivers to use.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Link: https://patch.msgid.link/1760948182-128561-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order for host drivers to use.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Link: https://patch.msgid.link/1760948182-128561-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: Add bRefClkFreq attribute setting</title>
<updated>2025-10-28T16:12:10+00:00</updated>
<author>
<name>Jared McArthur</name>
<email>j-mcarthur@ti.com</email>
</author>
<published>2025-10-10T19:55:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c7327ac29590952089bf3d8994d0951e58cc2322'/>
<id>c7327ac29590952089bf3d8994d0951e58cc2322</id>
<content type='text'>
A UFS device needs its bRefClkFreq attribute set to the correct value
before switching to high speed. If bRefClkFreq is set to the wrong
value, all transactions after the power mode change will fail.

The bRefClkFreq depends on the host controller and the device.
Query the device's current bRefClkFreq and compare with the ref_clk
specified in the device-tree. If the two differ, set the bRefClkFreq
to the device-tree's ref_clk frequency.

Taken from Linux kernel v6.17 (drivers/ufs/core/ufshcd.c and
include/ufs/ufs.h) and ported to U-Boot.

Signed-off-by: Jared McArthur &lt;j-mcarthur@ti.com&gt;
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
Reviewed-by: Udit Kumar &lt;u-kumar1@ti.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Link: https://patch.msgid.link/20251010195556.1772611-3-j-mcarthur@ti.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A UFS device needs its bRefClkFreq attribute set to the correct value
before switching to high speed. If bRefClkFreq is set to the wrong
value, all transactions after the power mode change will fail.

The bRefClkFreq depends on the host controller and the device.
Query the device's current bRefClkFreq and compare with the ref_clk
specified in the device-tree. If the two differ, set the bRefClkFreq
to the device-tree's ref_clk frequency.

Taken from Linux kernel v6.17 (drivers/ufs/core/ufshcd.c and
include/ufs/ufs.h) and ported to U-Boot.

Signed-off-by: Jared McArthur &lt;j-mcarthur@ti.com&gt;
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
Reviewed-by: Udit Kumar &lt;u-kumar1@ti.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Link: https://patch.msgid.link/20251010195556.1772611-3-j-mcarthur@ti.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: Add support for sending UFS attribute requests</title>
<updated>2025-10-28T16:12:10+00:00</updated>
<author>
<name>Jared McArthur</name>
<email>j-mcarthur@ti.com</email>
</author>
<published>2025-10-10T19:55:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ae0872e9c38394be8fcdb38ef391e635d4cf7a22'/>
<id>ae0872e9c38394be8fcdb38ef391e635d4cf7a22</id>
<content type='text'>
Some UFS attributes must be set before a UFS device is initialized.
Add ufshcd_query_attr and ufshcd_query_attr_retry to send UFS
attribute requests.

Taken from Linux Kernel v6.17 (drivers/ufs/core/ufshcd.c) and ported
to U-Boot.

Signed-off-by: Jared McArthur &lt;j-mcarthur@ti.com&gt;
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Udit Kumar &lt;u-kumar1@ti.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Link: https://patch.msgid.link/20251010195556.1772611-2-j-mcarthur@ti.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some UFS attributes must be set before a UFS device is initialized.
Add ufshcd_query_attr and ufshcd_query_attr_retry to send UFS
attribute requests.

Taken from Linux Kernel v6.17 (drivers/ufs/core/ufshcd.c) and ported
to U-Boot.

Signed-off-by: Jared McArthur &lt;j-mcarthur@ti.com&gt;
Reviewed-by: Bryan Brattlof &lt;bb@ti.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Udit Kumar &lt;u-kumar1@ti.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Link: https://patch.msgid.link/20251010195556.1772611-2-j-mcarthur@ti.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: Fix wrong bitfield usage for Data Direction in Transfer Request</title>
<updated>2025-10-28T16:10:46+00:00</updated>
<author>
<name>Kunihiko Hayashi</name>
<email>hayashi.kunihiko@socionext.com</email>
</author>
<published>2025-10-10T02:45:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d0dfb8c635ab4ff60090878879c9f75f9a7193da'/>
<id>d0dfb8c635ab4ff60090878879c9f75f9a7193da</id>
<content type='text'>
Commit d232d7fdbf6f ("ufs: core: sync ufshci.h with Linux v6.12") updated
the Data Direction values from bitmask values to simple enumerations.

Before:
    enum {
        UTP_NO_DATA_TRANSFER    = 0x00000000,
        UTP_HOST_TO_DEVICE      = 0x02000000,
        UTP_DEVICE_TO_HOST      = 0x04000000,
    };

Updated:
    enum utp_data_direction {
        UTP_NO_DATA_TRANSFER    = 0,
        UTP_HOST_TO_DEVICE      = 1,
        UTP_DEVICE_TO_HOST      = 2,
    };

However, the U-Boot code still uses these values directly without shifting,
and resulting in wrong bitfield placement in the Transfer Request
Descriptor.

This fixes the issue by applying the necessary shift to align the value.

Fixes: d232d7fdbf6f ("ufs: core: sync ufshci.h with Linux v6.12")
Signed-off-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://patch.msgid.link/20251010024557.673787-1-hayashi.kunihiko@socionext.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit d232d7fdbf6f ("ufs: core: sync ufshci.h with Linux v6.12") updated
the Data Direction values from bitmask values to simple enumerations.

Before:
    enum {
        UTP_NO_DATA_TRANSFER    = 0x00000000,
        UTP_HOST_TO_DEVICE      = 0x02000000,
        UTP_DEVICE_TO_HOST      = 0x04000000,
    };

Updated:
    enum utp_data_direction {
        UTP_NO_DATA_TRANSFER    = 0,
        UTP_HOST_TO_DEVICE      = 1,
        UTP_DEVICE_TO_HOST      = 2,
    };

However, the U-Boot code still uses these values directly without shifting,
and resulting in wrong bitfield placement in the Transfer Request
Descriptor.

This fixes the issue by applying the necessary shift to align the value.

Fixes: d232d7fdbf6f ("ufs: core: sync ufshci.h with Linux v6.12")
Signed-off-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://patch.msgid.link/20251010024557.673787-1-hayashi.kunihiko@socionext.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: amd-versal2: Configure RMMI and M-PHY registers for HS mode</title>
<updated>2025-08-26T05:30:10+00:00</updated>
<author>
<name>Venkatesh Yadav Abbarapu</name>
<email>venkatesh.abbarapu@amd.com</email>
</author>
<published>2025-07-24T04:44:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a51b7dfc6fec0aa76367114af59a7114b040b090'/>
<id>a51b7dfc6fec0aa76367114af59a7114b040b090</id>
<content type='text'>
Configure RMMI and M-PHY registers for HS mode required for selection of
bit rate series A or B. If it is not a calibrated part, then switch back
to SLOWAUTO_MODE and skip all these configurations.
Implemented below sequence as per the DWC RMMI databook.
1. Override RMMI CBRATESEL with the desired rate.
2. Set TX_CFGUPDT_0 to 1'b1 for one TX_CFGCLK_0 cycle.
3. Override PHY rx_req to 1, then poll on PHY rx_ack register till it
goes 1(both lanes).
4. Override PHY rx_req to 0, then poll on PHY rx_ack register till it
goes 0(both lanes).
5. Remove PHY rx_req override(both lanes).
6. Start the LS PMC.

Signed-off-by: Venkatesh Yadav Abbarapu &lt;venkatesh.abbarapu@amd.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20250724044402.260149-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Configure RMMI and M-PHY registers for HS mode required for selection of
bit rate series A or B. If it is not a calibrated part, then switch back
to SLOWAUTO_MODE and skip all these configurations.
Implemented below sequence as per the DWC RMMI databook.
1. Override RMMI CBRATESEL with the desired rate.
2. Set TX_CFGUPDT_0 to 1'b1 for one TX_CFGCLK_0 cycle.
3. Override PHY rx_req to 1, then poll on PHY rx_ack register till it
goes 1(both lanes).
4. Override PHY rx_req to 0, then poll on PHY rx_ack register till it
goes 0(both lanes).
5. Remove PHY rx_req override(both lanes).
6. Start the LS PMC.

Signed-off-by: Venkatesh Yadav Abbarapu &lt;venkatesh.abbarapu@amd.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20250724044402.260149-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: core: cosmetic fixups</title>
<updated>2025-03-18T14:31:49+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2024-12-30T10:30:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=03012e85998fb0d796359c7270d2b3887863aee6'/>
<id>03012e85998fb0d796359c7270d2b3887863aee6</id>
<content type='text'>
Fixes some alignment warnings, missing comments on write barrier,
missing parenthesis around macro parameters and a comment typo.

No functional changes intended.

Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Tested-by: Love Kumar &lt;love.kumar@amd.com&gt;
Link: https://lore.kernel.org/r/20241230-topic-ufs-cleanup-v2-3-4c6d7994a45d@linaro.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes some alignment warnings, missing comments on write barrier,
missing parenthesis around macro parameters and a comment typo.

No functional changes intended.

Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Tested-by: Love Kumar &lt;love.kumar@amd.com&gt;
Link: https://lore.kernel.org/r/20241230-topic-ufs-cleanup-v2-3-4c6d7994a45d@linaro.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: core: mark unexported functions as static</title>
<updated>2025-03-18T14:31:49+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2024-12-30T10:30:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c20826be04046ebe7f5a03070cf00645e4380e35'/>
<id>c20826be04046ebe7f5a03070cf00645e4380e35</id>
<content type='text'>
Mark the remaining local functions as static to avoid build
warnings.

Also drop the EXPORT_SYMBOL of ufshcd_map_desc_id_to_length.

Tested-by: Love Kumar &lt;love.kumar@amd.com&gt;
Link: https://lore.kernel.org/r/20241230-topic-ufs-cleanup-v2-2-4c6d7994a45d@linaro.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mark the remaining local functions as static to avoid build
warnings.

Also drop the EXPORT_SYMBOL of ufshcd_map_desc_id_to_length.

Tested-by: Love Kumar &lt;love.kumar@amd.com&gt;
Link: https://lore.kernel.org/r/20241230-topic-ufs-cleanup-v2-2-4c6d7994a45d@linaro.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ufs: core: include missing include/ufs.h</title>
<updated>2025-03-18T14:31:49+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2024-12-30T10:30:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=938ce571b89cdada5ee210150254972a07df6ef2'/>
<id>938ce571b89cdada5ee210150254972a07df6ef2</id>
<content type='text'>
Add missing ufs.h causing build warning on some symbols.

Tested-by: Love Kumar &lt;love.kumar@amd.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Link: https://lore.kernel.org/r/20241230-topic-ufs-cleanup-v2-1-4c6d7994a45d@linaro.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing ufs.h causing build warning on some symbols.

Tested-by: Love Kumar &lt;love.kumar@amd.com&gt;
Reviewed-by: Neha Malcom Francis &lt;n-francis@ti.com&gt;
Link: https://lore.kernel.org/r/20241230-topic-ufs-cleanup-v2-1-4c6d7994a45d@linaro.org
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
