]> git.baikalelectronics.ru Git - kernel.git/commit
spi/fsl_espi: change the read behaviour of the SPIRF
authorMingkai Hu <Mingkai.hu@freescale.com>
Tue, 21 Dec 2010 01:26:07 +0000 (09:26 +0800)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 24 Dec 2010 08:53:41 +0000 (01:53 -0700)
commit895355a874ca456338fd39dedbc3617647b09a16
treefb27d2b1dca5ba2a89789788a2801f427dc3b26d
parent46bb216fc470f76a1992cf8725806a64c118843b
spi/fsl_espi: change the read behaviour of the SPIRF

The user must read N bytes of SPIRF (1 <= N <= 4) that do not exceed the
amount of data in the receive FIFO, so read the SPIRF byte by byte when
the data in receive FIFO is less than 4 bytes.

On Simics, when read N bytes that exceed the amount of data in receive
FIFO, we can't read the data out, that is we can't clear the rx FIFO,
then the CPU will loop on the espi rx interrupt.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_fsl_espi.c