> > The __iomem is just sparse thing, and not related to gcc, our
> imx28_ehci_writel
> > uses assembly directly, and not call writel any more. The definition of
> > __raw_writel still uses volatile:
> 
> Yes....
> >
> > include/asm-generic/io.h:
> > static inline void __raw_writel(u32 b, volatile void __iomem *addr)
> > {
> >             *(volatile u32 __force *) addr = b;
> > }
> 
> What does that mean for our imx28_ehci_writel? Do we need volatile here?
>

Yes, all access in swp needs to visit register (IO memory) directly to
fix this problem.
 
> > +static inline void imx28_ehci_writel(const unsigned int val, __u32
> __iomem *addr)
> > +{
> > +   __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr));
> > +}
> 



Reply via email to