06.02.2019 22:16, Sowjanya Komatineni пишет:
> + if (!i2c_dev->msg_read) {
> + if (dma) {
> + memcpy(buffer, msg->buf, msg->len);
> + dma_sync_single_for_device(i2c_dev->dev,
> +i2c_dev->dma_phys
07.02.2019 22:14, Dmitry Osipenko пишет:
> 06.02.2019 22:16, Sowjanya Komatineni пишет:
>> +static void tegra_i2c_config_fifo_trig(struct tegra_i2c_dev *i2c_dev,
>> + size_t len)
>> +{
>> +u32 val = 0, reg;
>> +u8 dma_burst = 0;
There is no need to set dma
> >>> static const struct tegra_i2c_hw_feature tegra210_i2c_hw = { @@
> >>> -980,6 +1302,7 @@ static const struct tegra_i2c_hw_feature
> >>> tegra210_i2c_hw = {
> >>> .has_mst_fifo = false,
> >>> .quirks = &tegra_i2c_quirks,
> >>> .supports_bus_clear = true,
> >>> + .has_apb_dma = true,
06.02.2019 22:16, Sowjanya Komatineni пишет:
> +static void tegra_i2c_config_fifo_trig(struct tegra_i2c_dev *i2c_dev,
> +size_t len)
> +{
> + u32 val = 0, reg;
> + u8 dma_burst = 0;
> + struct dma_slave_config slv_config = {0};
> + struct dma_chan
07.02.2019 21:56, Sowjanya Komatineni пишет:
>
>>> static const struct tegra_i2c_hw_feature tegra210_i2c_hw = { @@
>>> -980,6 +1302,7 @@ static const struct tegra_i2c_hw_feature tegra210_i2c_hw
>>> = {
>>> .has_mst_fifo = false,
>>> .quirks = &tegra_i2c_quirks,
>>> .supports_bus_cl
> > static const struct tegra_i2c_hw_feature tegra210_i2c_hw = { @@
> > -980,6 +1302,7 @@ static const struct tegra_i2c_hw_feature tegra210_i2c_hw
> > = {
> > .has_mst_fifo = false,
> > .quirks = &tegra_i2c_quirks,
> > .supports_bus_clear = true,
> > + .has_apb_dma = true,
> > }
06.02.2019 22:16, Sowjanya Komatineni пишет:
> /**
> @@ -191,6 +207,7 @@ struct tegra_i2c_hw_feature {
> * @fast_clk: clock reference for fast clock of I2C controller
> * @rst: reset control for the I2C controller
> * @base: ioremapped registers cookie
> + * @base_phys: Physical base address
06.02.2019 22:16, Sowjanya Komatineni пишет:
> @@ -920,6 +1238,7 @@ static const struct tegra_i2c_hw_feature tegra20_i2c_hw
> = {
> .has_mst_fifo = false,
> .quirks = &tegra_i2c_quirks,
> .supports_bus_clear = false,
> + .has_apb_dma = true,
> };
>
> static const struct t
06.02.2019 22:16, Sowjanya Komatineni пишет:
> + if (i2c_dev->msg_read && i2c_dev->msg_err == I2C_ERR_NONE) {
> + dma_sync_single_for_cpu(i2c_dev->dev,
> + i2c_dev->dma_phys,
> +
07.02.2019 21:02, Sowjanya Komatineni пишет:
>
>>> It became apparent to me that there is a problem here. The size of
>>> dma_buf is 4096 bytes and maximum message length is 4096 too, we have
>>> pushed 12 bytes packet_header to the buffer >and now there are 4084
>>> bytes left
> > It became apparent to me that there is a problem here. The size of
> > dma_buf is 4096 bytes and maximum message length is 4096 too, we have
> > pushed 12 bytes packet_header to the buffer >and now there are 4084
> > bytes left for the message in the buffer. Hence transfer o
07.02.2019 19:08, Sowjanya Komatineni пишет:
>
> It became apparent to me that there is a problem here. The size of
> dma_buf is 4096 bytes and maximum message length is 4096 too, we have
> pushed 12 bytes packet_header to the buffer >and now there are 4084 bytes
> left for the
> > >> It became apparent to me that there is a problem here. The size of
> > >> dma_buf is 4096 bytes and maximum message length is 4096 too, we have
> > >> pushed 12 bytes packet_header to the buffer >and now there are 4084
> > >> bytes left for the message in the buffer. Hence transfer of 4K
On Thu, Feb 07, 2019 at 07:01:45PM +0300, Dmitry Osipenko wrote:
> 07.02.2019 18:23, Sowjanya Komatineni пишет:
> >
> >> It became apparent to me that there is a problem here. The size of dma_buf
> >> is 4096 bytes and maximum message length is 4096 too, we have pushed 12
> >> bytes packet_heade
On Thu, Feb 07, 2019 at 03:11:06PM +, Sowjanya Komatineni wrote:
> >
> >
> > > @@ -1124,6 +1453,10 @@ static int tegra_i2c_probe(struct platform_device
> > > *pdev)
> > > }
> > > }
> > >
> > > + ret = tegra_i2c_init_dma(i2c_dev);
> > > + if (ret < 0)
> > > + goto disabl
07.02.2019 18:23, Sowjanya Komatineni пишет:
>
>> It became apparent to me that there is a problem here. The size of dma_buf
>> is 4096 bytes and maximum message length is 4096 too, we have pushed 12
>> bytes packet_header to the buffer >and now there are 4084 bytes left for the
>> message in t
07.02.2019 18:17, Sowjanya Komatineni пишет:
>>>
@@ -1124,6 +1453,10 @@ static int tegra_i2c_probe(struct platform_device
*pdev)
}
}
+ ret = tegra_i2c_init_dma(i2c_dev);
+ if (ret < 0)
+ goto disable_div_clk;
+
ret = t
>It became apparent to me that there is a problem here. The size of dma_buf is
>4096 bytes and maximum message length is 4096 too, we have pushed 12 bytes
>packet_header to the buffer >and now there are 4084 bytes left for the message
>in the buffer. Hence transfer of 4KB will cause buffer over
> >
> > > @@ -1124,6 +1453,10 @@ static int tegra_i2c_probe(struct platform_device
> > > *pdev)
> > > }
> > > }
> > >
> > > + ret = tegra_i2c_init_dma(i2c_dev);
> > > + if (ret < 0)
> > > + goto disable_div_clk;
> > > +
> > > ret = tegra_i2c_init(i2c_dev);
> > > if (ret)
07.02.2019 18:11, Sowjanya Komatineni пишет:
>>
>>
>>> @@ -1124,6 +1453,10 @@ static int tegra_i2c_probe(struct platform_device
>>> *pdev)
>>> }
>>> }
>>>
>>> + ret = tegra_i2c_init_dma(i2c_dev);
>>> + if (ret < 0)
>>> + goto disable_div_clk;
>>> +
>>> ret = teg
>
>
> > @@ -1124,6 +1453,10 @@ static int tegra_i2c_probe(struct platform_device
> > *pdev)
> > }
> > }
> >
> > + ret = tegra_i2c_init_dma(i2c_dev);
> > + if (ret < 0)
> > + goto disable_div_clk;
> > +
> > ret = tegra_i2c_init(i2c_dev);
> > if (ret) {
> >
06.02.2019 22:16, 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
06.02.2019 22:16, 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
On Wed, Feb 06, 2019 at 11:16:07AM -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
24 matches
Mail list logo