bcm2835_dma: Fix the ylen loop in TD mode
commiteb87ff05eab2a39bc0fcd8b4ec51433c4e7fbe42
authorRene Stange <rsta2@o2online.de>
Fri, 7 Feb 2020 14:04:27 +0000 (7 14:04 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 7 Feb 2020 14:04:27 +0000 (7 14:04 +0000)
tree457bc59d7ea9df52e6dcea742add7c02399bc87b
parentd63d0ec59d87a698de5ed843288f90a23470cf2e
bcm2835_dma: Fix the ylen loop in TD mode

In TD (two dimensions) DMA mode ylen has to be increased by one after
reading it from the TXFR_LEN register, because a value of zero has to
result in one run through of the ylen loop. This has been tested on a
real Raspberry Pi 3 Model B+. In the previous implementation the ylen
loop was not passed at all for a value of zero.

Signed-off-by: Rene Stange <rsta2@o2online.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/dma/bcm2835_dma.c