RE: [PATCH v5 0/3] usb: ehci+chipidea: fix imx28 "ENGR119653 USB: ARM to USB register error issue"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> > 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));
> > +}
> 



��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux