]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
mpc52xx_psc_spi: fix block transfer
authorLuotao Fu <l.fu@pengutronix.de>
Tue, 29 Jul 2008 02:50:14 +0000 (02:50 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Aug 2008 19:43:11 +0000 (12:43 -0700)
commit9bbba9277a48a49ae9212558ee7656e6016bca4d
tree58c75a4ddac0363b456b2b9bf3038db666c6268a
parent804dc20d0fa5763a25b7bef61a1547a3d1be470c
mpc52xx_psc_spi: fix block transfer

commit 9a7867e1b34c3575e7e76a05c0c54c6edbdae2a4 upstream

The block transfer routine in the mpc52xx psc spi driver misinterpret
the datasheet.  According to the processor datasheet the chipselect is
held as long as the EOF is not written.

Theoretically blocks of any sizes can be transferred in this way.  The
old routine however writes an EOF after every word, which has the size
of size_of_word.  This makes the transfer slow.

Also fixed some duplicate code.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/spi/mpc52xx_psc_spi.c