
Dear Peter Tyser,
In message 1295047406.29642.6729.camel@petert you wrote:
Agreed, I should have dug deeper. On PPC we use out_be32() or similar to access memory mapped registers, which does have an explicit barrier. I'm not familiar with ARM so don't know what the proper access functions are, but it looks like the defacto standard writel()/readl().
I have a patch waiting o be applied that adds proper memory barriers for ARM, too. They are necessary.
I'd personally use writel()/readl() in this patch. Functionally it may be the same as your volatile accesses, but its the generally recommended practice. It looks like most of the Tegra support in the Linux kernel also uses writel()/readl() for what its worth. Ultimately its up to the ARM U-Boot maintainer to decide if they require the access functions or not - I'm just giving my opinions from PPC experience.
It's not only recommended, it is mandatory.
I/O accesors _MUST_ be used.
Best regards,
Wolfgang Denk