]> git.baikalelectronics.ru Git - arm-tf.git/commit
fix(ufs): flush the entire PRDT
authorJorge Troncoso <jatron@google.com>
Wed, 22 Feb 2023 09:41:18 +0000 (01:41 -0800)
committerJorge Troncoso <jatron@google.com>
Sat, 25 Feb 2023 14:32:43 +0000 (06:32 -0800)
commit83ef8698f9d1477c892cad15b4e48574ed634903
tree1a5e10a5a7a1225493ed02ccfc16bfefe9e93de6
parent56db7b8b08d5bb350a02e1f794dc6eb02827917f
fix(ufs): flush the entire PRDT

Previously, if the image being read exceeded 12,800 KB (or 50 PRDT
entries of size 256 KB), the UFS driver would not flush the entire
Physical Region Descriptor Table (PRDT). This would cause the UFS host
controller to read empty PRDT entries, which eventually would make the
system crash. This change updates the UFS driver to flush the entire
PRDT, irrespective of the size of the image being read.

This change also throws an error if the memory allocated for UFS
descriptors is not sufficient to hold the entire Physical Region
Descriptor Table (PRDT).

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I291dc62748992481be3cc156ce1474a6e3990ea9
drivers/ufs/ufs.c