hw/dma/omap_dma: Fix bugs with DMA requests above 32
commit7648673636bbd7dcb9abf3cc87a8ba7a65b85436
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Jun 2013 12:51:59 +0000 (28 13:51 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 15 Jul 2013 15:17:44 +0000 (15 16:17 +0100)
treeb147733970f3c0de287ba8f07f7b7fa483e57b95
parent8827b0fb66cab9f7978c4e66dad4cf3c0989a72e
hw/dma/omap_dma: Fix bugs with DMA requests above 32

The drqbmp field of struct soc_dma_s is a uint64_t; however several
places in the code attempt to set bits in it using "(1 << drq)",
which will fail if drq is large enough that the 1 bit gets shifted
off the top of a 32 bit integer.  Change these to "(1ULL << drq)" so
that the promotion to 64 bit happens before the shift rather than
afterwards.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1372423919-5669-1-git-send-email-peter.maydell@linaro.org
hw/dma/omap_dma.c