[spi-devel-general] [PATCH 1/4] [POWERPC][SPI] spi_mpc83xx.c: should turn off SPI unit while switching any mode.

Anton Vorontsov avorontsov at ru.mvista.com
Fri Jul 27 23:36:28 EST 2007


On Fri, Jul 27, 2007 at 01:32:27AM -0500, Kumar Gala wrote:
>
> On Jul 26, 2007, at 8:13 AM, Anton Vorontsov wrote:
>
>> Documentation clearly states, that mode should not be changed
>> till SPMODE_ENABLE bit set. I've seen hangs w/o this patch.
>
> Out of interest what board/part do you see the hang on?

It's MPC8323E-RDB.

Using spidev_test utility:

root at 10.0.0.99:~# ./a.out -D /dev/spidev1.0
spi mode: 0
bits per word: 8
max speed: Hz (kHz): 500000 (500)
...
root at 10.0.0.99:~#


Then trying change bits per word to 32:

root at 10.0.0.99:~# ./a.out -D /dev/spidev1.0 -b 32
spi mode: 0
bits per word: 32
max speed: Hz (kHz): 500000 (500)
<---- hang

Board is still alive, but SPI isn't.

Though, there are various steps to reproduce the same.
So SPI unit should be really turned off to change mode.

Thanks,

-- 
Anton Vorontsov
email: cbou at mail.ru
backup email: ya-cbou at yandex.ru
irc://irc.freenode.net/bd2



More information about the Linuxppc-dev mailing list