On 11/16/2010 02:10 AM, Grant Likely wrote: > On Mon, Nov 15, 2010 at 02:12:03PM -0500, Cyril Chemparathy wrote: >> TI's sequencer serial port (TI-SSP) is a jack-of-all-trades type of serial >> port >> device. It has a built-in programmable execution engine that can be >> programmed >> to operate as almost any serial bus (I2C, SPI, EasyScale, and others). >> >> This patch adds a driver for this controller device. The driver does not >> expose a user-land interface. Protocol drivers built on top of this layer >> are >> expected to remain in-kernel. >> [...] >> +static inline void ssp_write(struct ti_ssp *ssp, int reg, u32 val) >> +{ >> + __raw_writel(val, ssp->regs + reg); >> +} > > I'm pretty sure it was resolved that __raw_ versions should not be > used here.
The endian-swap done by writel/readl are incorrect since these devices are meant to be accessed native-endian at all times. See [1] below for Russell King's earlier response on this. In this case, I don't think memory-device ordering matters, and therefore the __raw_ variants should be ok. Should I just insert barriers into the read/write wrappers here? [...] Regards Cyril. [1] http://kerneltrap.org/mailarchive/linux-kernel/2010/10/22/4636289 _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source