RE: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Sowjanya Komatineni
> > +static int tegra_i2c_init_dma_param(struct tegra_i2c_dev *i2c_dev, > > + bool dma_to_memory) > > +{ > > + struct dma_chan *dma_chan; > > + u32 *dma_buf; > > + dma_addr_t dma_phys; > > + int ret; > > + const char *chan_name = dma_to_memory ? "rx" : "tx";

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
26.01.2019 3:28, Dmitry Osipenko пишет: > 24.01.2019 23:51, Sowjanya Komatineni пишет: >> This patch adds DMA support for Tegra I2C. >> >> Tegra I2C TX and RX FIFO depth is 8 words. PIO mode is used for >> transfer size of the max FIFO depth and DMA mode is used for >> transfer size higher than

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
24.01.2019 23:51, Sowjanya Komatineni пишет: > This patch adds DMA support for Tegra I2C. > > Tegra I2C TX and RX FIFO depth is 8 words. PIO mode is used for > transfer size of the max FIFO depth and DMA mode is used for > transfer size higher than max FIFO depth to save CPU overhead. > > PIO

RE: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Sowjanya Komatineni
> > > >>> + if (i2c_dev->has_dma) { > > > >>> + ret = tegra_i2c_init_dma_param(i2c_dev, true); > > > >>> + if (ret == -EPROBE_DEFER) > > > >>> + goto disable_div_clk; > > > >>> + ret = tegra_i2c_init_dma_param(i2c_dev, false); > > > >>>

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Thierry Reding
On Fri, Jan 25, 2019 at 09:11:54PM +, Sowjanya Komatineni wrote: > > > > >>> + if (i2c_dev->has_dma) { > > >>> + ret = tegra_i2c_init_dma_param(i2c_dev, true); > > >>> + if (ret == -EPROBE_DEFER) > > >>> + goto disable_div_clk; > > >>>

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
24.01.2019 23:51, Sowjanya Komatineni пишет: > This patch adds DMA support for Tegra I2C. > > Tegra I2C TX and RX FIFO depth is 8 words. PIO mode is used for > transfer size of the max FIFO depth and DMA mode is used for > transfer size higher than max FIFO depth to save CPU overhead. > > PIO

RE: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Sowjanya Komatineni
> > + if (i2c_dev->has_dma) { > > + ret = tegra_i2c_init_dma_param(i2c_dev, true); > > + if (ret == -EPROBE_DEFER) > > + goto disable_div_clk; > > + ret = tegra_i2c_init_dma_param(i2c_dev, false); > > +

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
26.01.2019 0:49, Dmitry Osipenko пишет: > 3) After applying these patches I2C transfers are failing on Tegra20 with > "tegra-i2c 7000c400.i2c: Failed to allocate the DMA buffer". > Actually scratch the above, turned out I haven't applied patches correctly. In fact patches are failing to

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
24.01.2019 23:51, Sowjanya Komatineni пишет: > This patch adds DMA support for Tegra I2C. > > Tegra I2C TX and RX FIFO depth is 8 words. PIO mode is used for > transfer size of the max FIFO depth and DMA mode is used for > transfer size higher than max FIFO depth to save CPU overhead. > > PIO

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
26.01.2019 0:11, Sowjanya Komatineni пишет: > > > + if (i2c_dev->has_dma) { > + ret = tegra_i2c_init_dma_param(i2c_dev, true); > + if (ret == -EPROBE_DEFER) > + goto disable_div_clk; > + ret = tegra_i2c_init_dma_param(i2c_dev, false);

RE: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Sowjanya Komatineni
> >>> + if (i2c_dev->has_dma) { > >>> + ret = tegra_i2c_init_dma_param(i2c_dev, true); > >>> + if (ret == -EPROBE_DEFER) > >>> + goto disable_div_clk; > >>> + ret = tegra_i2c_init_dma_param(i2c_dev, false); > >>> + if (ret == -EPROBE_DEFER) > >>> +

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
25.01.2019 23:31, Sowjanya Komatineni пишет: > >>> + if (i2c_dev->has_dma) { >>> + ret = tegra_i2c_init_dma_param(i2c_dev, true); >>> + if (ret == -EPROBE_DEFER) >>> + goto disable_div_clk; >>> + ret = tegra_i2c_init_dma_param(i2c_dev, false); >>>

RE: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Sowjanya Komatineni
> > + if (i2c_dev->has_dma) { > > + ret = tegra_i2c_init_dma_param(i2c_dev, true); > > + if (ret == -EPROBE_DEFER) > > + goto disable_div_clk; > > + ret = tegra_i2c_init_dma_param(i2c_dev, false); > > + if (ret == -EPROBE_DEFER) > > +

Re: [PATCH V2 3/4] i2c: tegra: Add DMA Support

2019-01-25 Thread Dmitry Osipenko
24.01.2019 23:51, Sowjanya Komatineni пишет: > This patch adds DMA support for Tegra I2C. > > Tegra I2C TX and RX FIFO depth is 8 words. PIO mode is used for > transfer size of the max FIFO depth and DMA mode is used for > transfer size higher than max FIFO depth to save CPU overhead. > > PIO