
18 Jan
2011
18 Jan
'11
12:27 a.m.
Dear Tom Warren,
In message AANLkTikCQ_0cNFRj_5S2zShcJ-2qyvi24yeH0DcqEPf_@mail.gmail.com you wrote:
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))?
Please see the thread "ARM: Avoid compiler optimization for usages of readb, writeb and friends."
Is that different enough from 'uart->lcr = 0' to warrant the change?
Yes, it is - in recent (i. e. fixed) code.
Does it add some HW barriers or forced read-before-write that the 'volatile' struct doesn't?
Yes, it does. See above.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Conquest is easy. Control is not.
-- Kirk, "Mirror, Mirror", stardate unknown