From 6d7734649dc2302f565098becddab0412f8e589e Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 20 Aug 2013 18:28:40 +0200 Subject: imx233: increase max dma transfer size The old max dma transfer size was set to 2^15 because allowing values up to 2^16 would result in overflow of the transfer count in many places. This was a problem with the old register headers because the macros didn't make sure the result is contained in the bitmask of the field. The new macro do so 2^16 will actually end up being 0 which means 2^16 for the hardware. This is kind of hacky but it works and I prefer that this stays a power of two because setting it to 2^16-1 would be extremely weird. Change-Id: I9ce5661c477a79ab52efd5c573948e2353117804 --- firmware/target/arm/imx233/dma-imx233.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/target/arm/imx233/dma-imx233.h b/firmware/target/arm/imx233/dma-imx233.h index a64b8a64d1..5caff740a8 100644 --- a/firmware/target/arm/imx233/dma-imx233.h +++ b/firmware/target/arm/imx233/dma-imx233.h @@ -142,7 +142,7 @@ struct imx233_dma_info_t /* A single descriptor cannot transfer more than 2^16 bytes but because of the * weird 0=64KiB, it's safer to restrict to 2^15 */ -#define IMX233_MAX_SINGLE_DMA_XFER_SIZE (1 << 15) +#define IMX233_MAX_SINGLE_DMA_XFER_SIZE (1 << 16) void imx233_dma_init(void); void imx233_dma_reset_channel(unsigned chan); -- cgit v1.2.3