[PATCH v1 03/10] ufs: host: mediatek: Add memory barrier for ref-clk control
Bart Van Assche
bvanassche at acm.org
Wed Jul 16 08:26:42 PDT 2025
On 7/15/25 11:25 PM, peter.wang at mediatek.com wrote:
> + /*
> + * Make sure that ref-clk on/off control register
> + * is writed done before read it.
> + */
> + mb();
A memory barrier doesn't guarantee that an MMIO write has been
completed. A memory barrier enforces ordering of MMIO writes but does
not guarantee completion of MMIO writes. What you need is an MMIO read.
See e.g. commit 4bf3855497b6 ("scsi: ufs: core: Perform read back after
disabling UIC_COMMAND_COMPL").
Bart.
More information about the Linux-mediatek
mailing list