]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commite6289d63a6f39237a027dcee46366ba158cb8406
treefb27d2b1dca5ba2a89789788a2801f427dc3b26d
parent020862648445d7c1b12ea213c152f27def703f3b
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