Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 30 May 2013 20:16:16 -0500 | Subject | Re: [PATCH v2 2/3] video: xilinxfb: Do not use out_be32 IO function | From | Timur Tabi <> |
| |
On Thu, May 30, 2013 at 5:04 PM, Arnd Bergmann <arnd@arndb.de> wrote: > > This is probably missing barriers, and is wrong on systems on which > the endianess of the device is different from the CPU.
I suggest what was done in fsl_ssi.c:
#ifdef PPC #define read_ssi(addr) in_be32(addr) #define write_ssi(val, addr) out_be32(addr, val) #define write_ssi_mask(addr, clear, set) clrsetbits_be32(addr, clear, set) #elif defined ARM #define read_ssi(addr) readl(addr) #define write_ssi(val, addr) writel(val, addr) /* * FIXME: Proper locking should be added at write_ssi_mask caller level * to ensure this register read/modify/write sequence is race free. */ static inline void write_ssi_mask(u32 __iomem *addr, u32 clear, u32 set) { u32 val = readl(addr); val = (val & ~clear) | set; writel(val, addr); } #endif
| ![\](/images/icornerr.gif) |