]> git.baikalelectronics.ru Git - kernel.git/commit
spi/i.mx: drain MXC SPI transfer buffer when probing device
authorDaniel Mack <daniel@caiaq.de>
Thu, 19 Nov 2009 19:01:42 +0000 (19:01 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 9 Dec 2009 01:48:16 +0000 (18:48 -0700)
commit3c566b5a3b9a5ac612e7fa1c4f197496f149041a
tree2bbf8ecbf000083f147fab885bdb91894c56186a
parent5928421c0f1595a8d992bf1c229ebe314b14188f
spi/i.mx: drain MXC SPI transfer buffer when probing device

On the MX31litekit, the bootloader seems to communicate with the MC13783
PMIC chip before booting Linux. However, it does not flush all the
buffers properly after that, which makes the imx-spi driver read
bogus data when probing the MC13783.

Fix that by draining the SPI receive buffer on startup.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_imx.c