[PATCH] Adapt spi_mpc83xx SPI driver for 832x

Vitaly Wool vitalywool at gmail.com
Wed Dec 13 20:44:19 EST 2006


On 12/13/06, Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
>
> The MPC 832x has a different SPI controller i/f, probably due to
> its QUICC engine support. This patch adapts the spi_mpx83xx driver to
> be usable on QE based 83xx cpus.
>

First, I'm pretty much against sending such patches to arch lists and not to
subsystem lists.

@@ -99,31 +105,39 @@ static inline u32 mpc83xx_spi_read_reg(_
        return in_be32(reg);
 }

Then,  this
+       *rx++ = (type)(data >> shift);                                    \
and this
+       data = *tx++ << shift;                                  \

pieces of code are potentially dangerous (what if 'shift' is something like
'x & 0xf3 << 4' ?)

Vitaly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20061213/f3044ea7/attachment.htm>


More information about the Linuxppc-dev mailing list