hw/sd/bcm2835_sdhost: Fix PIO mode writes
commit03a31776e8fb239fee98625dd83b85f5cbe3ccba
authorGuenter Roeck <linux@roeck-us.net>
Mon, 23 Jul 2018 14:21:26 +0000 (23 15:21 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 23 Jul 2018 14:21:26 +0000 (23 15:21 +0100)
tree3add69bf80051ca77aca2b23084c357eead29b64
parent7b6d7b84da328d5d1fffb862b8388d511e085812
hw/sd/bcm2835_sdhost: Fix PIO mode writes

Writes in PIO mode have two requirements:

- A data interrupt must be generated after a write command has been
  issued to indicate that the chip is ready to receive data.
- A block interrupt must be generated after each block to indicate
  that the chip is ready to receive the next data block.

Rearrange the code to make this happen. Tested on raspi3 (in PIO mode)
and raspi2 (in DMA mode).

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-id: 1531779837-20557-1-git-send-email-linux@roeck-us.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/sd/bcm2835_sdhost.c