Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-04 Thread Dmitry Osipenko
05.02.2019 4:37, Sowjanya Komatineni пишет: >> I know that APB DMA driver enables flow control based on the channels spec, >> but still won't hurt to explicitly show that channels are flow-controlled. >> Ideally APB DMA driver should respect the device_fc field. >> >> dma_sconfig.dev

RE: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-04 Thread Sowjanya Komatineni
> I know that APB DMA driver enables flow control based on the channels spec, > but still won't hurt to explicitly show that channels are flow-controlled. > Ideally APB DMA driver should respect the device_fc field. > > dma_sconfig.device_fc = true; Dmitry, Thanks for all feedback

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-04 Thread Dmitry Osipenko
03.02.2019 17:47, Dmitry Osipenko пишет: > 01.02.2019 20:07, 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 ma

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-04 Thread Thierry Reding
On Sun, Feb 03, 2019 at 07:48:09PM +0300, Dmitry Osipenko wrote: > 02.02.2019 21:32, 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 use

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-04 Thread Thierry Reding
On Fri, Feb 01, 2019 at 09:07:45AM -0800, Sowjanya Komatineni wrote: > 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 CP

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-03 Thread Dmitry Osipenko
02.02.2019 21:32, 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. >

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-03 Thread Dmitry Osipenko
02.02.2019 21:43, Sowjanya Komatineni пишет: > >> +static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev) { >> +struct dma_chan *dma_chan; >> +u32 *dma_buf; >> +dma_addr_t dma_phys; >> +int err = 0; >> + >> +if (!IS_ENABLED(

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-03 Thread Dmitry Osipenko
03.02.2019 17:47, Dmitry Osipenko пишет: > 01.02.2019 20:07, 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 ma

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-03 Thread Dmitry Osipenko
01.02.2019 20:07, 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 mod

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-03 Thread Dmitry Osipenko
01.02.2019 20:07, 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 mod

RE: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-02 Thread Sowjanya Komatineni
> +static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev) { > +struct dma_chan *dma_chan; > +u32 *dma_buf; > +dma_addr_t dma_phys; > +int err = 0; > + > +if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) > +

RE: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-02 Thread 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 mode needs full intervention of

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-02 Thread Dmitry Osipenko
01.02.2019 22:22, Dmitry Osipenko пишет: > 01.02.2019 22:20, Sowjanya Komatineni пишет: >> +static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev) { + struct dma_chan *dma_chan; + u32 *dma_buf; + dma_addr_t dma_phys; + int err = 0; + + if (!IS_ENABLED(C

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-02 Thread Dmitry Osipenko
01.02.2019 20:07, 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 mod

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread Dmitry Osipenko
02.02.2019 0:36, Sowjanya Komatineni пишет: > >>> rx_chan = dma_request_slave_channel_reason(i2c_dev->dev, "rx"); if (IS_ERR(rx_chan)) return PTR_ERR(rx_chan); > + > + dma_chan = dma_request_slave_channel_reason(i2c_dev->dev, "tx"); > + if (IS

RE: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread Sowjanya Komatineni
> > > >>rx_chan = dma_request_slave_channel_reason(i2c_dev->dev, "rx"); > >>if (IS_ERR(rx_chan)) > >>return PTR_ERR(rx_chan); > >> > >> > >>> + > >>> + dma_chan = dma_request_slave_channel_reason(i2c_dev->dev, "tx"); > >>> + if (IS_ERR(dma_chan)) { > >>> + err = PTR_E

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread Dmitry Osipenko
01.02.2019 23:21, Sowjanya Komatineni пишет: > >> rx_chan = dma_request_slave_channel_reason(i2c_dev->dev, "rx"); >> if (IS_ERR(rx_chan)) >> return PTR_ERR(rx_chan); >> >> >>> + >>> + dma_chan = dma_request_slave_channel_reason(i2c_dev->dev, "tx"); >>> + if (IS_ERR(dma_c

RE: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread Sowjanya Komatineni
> rx_chan = dma_request_slave_channel_reason(i2c_dev->dev, "rx"); > if (IS_ERR(rx_chan)) > return PTR_ERR(rx_chan); > > > > + > > + dma_chan = dma_request_slave_channel_reason(i2c_dev->dev, "tx"); > > + if (IS_ERR(dma_chan)) { > > + err = PTR_ERR(dma_chan);

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread Dmitry Osipenko
01.02.2019 22:20, Sowjanya Komatineni пишет: > >>> +static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev) { >>> + struct dma_chan *dma_chan; >>> + u32 *dma_buf; >>> + dma_addr_t dma_phys; >>> + int err = 0; >>> + >>> + if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) >>> + retur

RE: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread Sowjanya Komatineni
> > +static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev) { > > + struct dma_chan *dma_chan; > > + u32 *dma_buf; > > + dma_addr_t dma_phys; > > + int err = 0; > > + > > + if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) > > + return -ENODEV; > > Driver shall not fail to probe i

Re: [PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread Dmitry Osipenko
01.02.2019 20:07, 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 mod

[PATCH V9 3/5] i2c: tegra: Add DMA support

2019-02-01 Thread 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 mode needs full intervention of CPU to fill or empty FIFO's an