[U-Boot] [PATCH 0/4 V2] Add basic NVIDIA Tegra2 SoC support

Albert ARIBAUD albert.aribaud at free.fr
Sat Jan 15 00:00:43 CET 2011


Hello,

Le 14/01/2011 23:39, Tom Warren a écrit :

> So instead of, say uart->lcr = 0, you'd prefer writel(0, uart->lcr),
> where writel = __arch_putl(v, a) = (*(volatile unsigned int *)(a) =
> (v))?
> Is that different enough from 'uart->lcr = 0' to warrant the change?
> Does it add some HW barriers or forced read-before-write that the
> 'volatile' struct doesn't?

writel() and readl() do not introduce "read-before-write", that is, they 
do not perform any more than what their names imply, but yes they do 
introduce barriers, or more precisely, they force the compiler to do so.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list