[PATCH] kill mutex in lis
Werner Almesberger
werner at openmoko.org
Sat Oct 11 19:01:39 CEST 2008
Simon, by the way, if you're looking into using the S3C SPI hardware,
please be aware that drivers/spi/spi_s3c24xx.c has a few issues:
- the driver can get can terminally confused if there's a stray
interrupt when enabling the subsystem. I have a somewhat paranoid
patch in
http://svn.openmoko.org/developers/werner/wlan-spi/patches/s3c-spi-stray-irq.patch
but it's simpler if you just
init_completion(&hw->done);
before sending the first byte in s3c24xx_spi_txrx. This is fixed
in recent mainline, so depending on what base you use, this fix
may already be there.
- if your base is old enough, you also need something like this one:
http://svn.openmoko.org/developers/werner/wlan-spi/patches/s3c-spi-api-update.patch
- SPI reception lags by one byte. This only seems to affect a small
number of 24xx chips, and it's still not clear which ones. In any
case, we're among the lucky winners who have a chip with that
problem.
This patch fixes the problem:
http://svn.openmoko.org/developers/werner/wlan-spi/patches/s3c-spi-fix-int-mode.patch
(You only need the drivers/spi/spi_s3c24xx.c part.)
Note: I saw this with SPI0. The a11n meters are on SPI1, so this
may be different. If you try this, please let me know whether SPI1
is affected as well.
- and if you want to see some real speed, forget about interrupts and
poll:
http://svn.openmoko.org/developers/werner/wlan-spi/patches/s3c-spi-from-int-to-poll.patch
Alas, we don't know how fast the a11n meter interface can go, so
this may or may not be useful.
All my code is for the WLAN interface looped back to SPI0, not the
accelerometers on SPI1. So there may be some differences.
- Werner
More information about the openmoko-kernel
mailing list