Hi,

On 03/28/2014 03:15 AM, Wills Wang wrote:
> In sun5i/sun6i/sun7i, the maximum of DMA DES bits are 16, the maximum buffer 
> size is (1 << 15)

No the maximum buffer size is 2 ^ 16, which gets expressed as a buf-size of 0
in the register. I've added a printf to ensure the maximum buf size actually
ever gets used and it does and doing 64k transfers works fine.

Note that this also is what the u-boot code has been doing from day one, and
what the upstream kernel code does.

Regards,

Hans


, so the shift bits should be (MMC_MAX_DMA_DES_BIT - 1).
> #define SDXC_DES_NUM_SHIFT    (MMC_MAX_DMA_DES_BIT - 1)
> #define SDXC_DES_BUFFER_MAX_LEN    (1U << SDXC_DES_NUM_SHIFT)
> 
> On 03/28/2014 04:40 AM, Hans de Goede wrote:
>>>> >>@@ -250,7 +250,7 @@
>>>> >>   #define SDXC_IDMA_ERR (SDXC_IDMACFatalBusErr|SDXC_IDMACDesInvalid \
>>>> >>               |SDXC_IDMACCardErrSum|SDXC_IDMACAbnormalIntSum)
>>>> >>
>>>> >>-#define SDXC_DES_NUM_SHIFT    (MMC_MAX_DMA_DES_BIT)
>>>> >>+#define SDXC_DES_NUM_SHIFT    (MMC_MAX_DMA_DES_BIT - 1)
>>>> >>   #define SDXC_DES_BUFFER_MAX_LEN    (1U << SDXC_DES_NUM_SHIFT)
>>>> >>   struct sunxi_mmc_idma_des {
>>>> >>       u32    config;
>> This chunk is non-sense and should not I repeat NOT be applied.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to