]> git.dujemihanovic.xyz Git - u-boot.git/commit
ufs: split flush and invalidate to only invalidate when required
authorNeil Armstrong <neil.armstrong@linaro.org>
Mon, 30 Sep 2024 12:44:25 +0000 (14:44 +0200)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 14 Oct 2024 06:55:28 +0000 (08:55 +0200)
commit4139e5680bcf3016561c8830d914ee0b0ab741d1
tree4acb82e4324b1e3c00115d8c2c935afb26f9208c
parentc64d22b57d8a9fe4d08ab677ba33d6004b98a468
ufs: split flush and invalidate to only invalidate when required

There is no need to flush and invalidate all data updated by the
driver, mainly because on ARM platforms flush also invalidates
the cachelines.

Split the function in two and add the appropriate cacheline
invalidates after the UFS DMA operation finishes to make sure
we read from memory.

Flushing then invalidating cacheline unaligned data causes data
corruption issues on Qualcomm platforms, and is largely unnecessary
anyway, so let's cleanup the cache operations.

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Tested-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Tested-by: Julius Lehmann <lehmanju@devpi.de>
Link: https://lore.kernel.org/r/20240930-topic-ufs-enhancements-v3-3-58234f84ab89@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
drivers/ufs/ufs.c