[PATCH v2 2/3] serial: mxs-auart: add the DMA support for mx28

Huang Shijie b32955 at freescale.com
Sun Nov 4 22:16:53 EST 2012


于 2012年10月25日 19:08, Vinod Koul 写道:
> On Thu, 2012-10-25 at 17:15 +0800, Huang Shijie wrote:
>> yes. I have to setup the register. Could you told me which API is the
>> right API?
> dmaengine_slave_config() should be used to send the slave specfic
> parameters
It seems hard to set the registers by the

dmaengine_slave_config().

[1] firstly, there are several drivers use the mxs-dma, the gpmi-nand, mxs-mmc,spi-mxs, i2c-mxs.
        If we set the registers by the dmaengine_slave_config(), we must have the register base address for gpmi, mxs, spi, i2c.
      It's not a good idea to access these registers in the mxs-dma driver.

[2] secondly, take gpmi_read_page() for example, it uses the DMA_TRANS_NONE several times :
     If we set the registers by the dmaengine_slave_config(), the gpmi_read_page() will become like:
     .....................................
     dmaengine_slave_config()
     dmaengine_prep_slave_sg().
     ...................................

     dmaengine_slave_config()
     dmaengine_prep_slave_sg().
     ...................................

      dmaengine_slave_config()
      dmaengine_prep_slave_sg().
     ...................................

     Is it a nice look?

  [3] dma_slave_config{} does not have the fields to contain the registers value.


So I think the  current code it's ok, we'd better do not change it.

thanks
Huang Shijie













More information about the linux-arm-kernel mailing list