This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Minimum DMA bytes required for transfer



Hi ,

I am working on 3.12 kernel . In file /drivers/spi/spi-omap2-mcspi.c lin2 - Line no 120 says 

#define DMA_MIN_BYTES  160

Why is it only 160 ? why not 120 or any other number ?

Thanks

rahul

  • Hi Rahul,

    DMA_MIN_BYTES is the threshold for McSPI driver switching from PIO mode to DMA.
    It is defined, taking into account maximum throughput of PIO mode and minimum throughput of DMA mode.
    Why exactly 160, may be the better idea is to ask driver authors.

    BR,
    Georgi