Currently, U-Boot doesn't set the bRefClkFreq attribute before
changing power mode of the UFS device. If there is a difference
between the UFS device and the host controller, all commands will fail
after switching to high speed.

This behavior is rarely observed, because Linux sets the bRefClkFreq
attribute on probe, and the bRefClkFreq is a persistent attribute. In
other words, once Linux has booted once, the issue will never be seen.

If trying to provision and boot from an unprovisioned UFS device,
U-Boot will fail. Fix this by adding support for setting the
bRefClkFreq attribute.

Jared McArthur (2):
  ufs: Add support for sending UFS attribute requests
  ufs: Add bRefClkFreq attribute setting

 drivers/ufs/ufs.c | 184 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/ufs/ufs.h |  10 +++
 2 files changed, 194 insertions(+)

-- 
2.34.1

Reply via email to