mbox series

[0/3] i2c: rcar: make DMA more robust

Message ID 20190305175434.13107-1-wsa+renesas@sang-engineering.com (mailing list archive)
Headers show
Series i2c: rcar: make DMA more robust | expand

Message

Wolfram Sang March 5, 2019, 5:54 p.m. UTC
The Renesas BSP has a patch to wait for the data register being empty before
starting TX-DMA. This is according to the data sheet, so this small series does
the same in patch 2 & 3. However, refactored, so there is less to compute and
it is hopefully also easy to read. During that work, I noticed an implicit
assumption about a required minimal DMA length. It is now explicit and
documented :)

Tested on a Renesas Salvator XS (R-Car M3N) and now regressions found when
writing data with DMA.

I am unsure if patches 2+3 should be squashed or not, but at least for
reviewing, seperate patches is easier.

Glad to hear what you think,

   Wolfram


Wolfram Sang (3):
  i2c: rcar: sanity check for minimal DMA length
  i2c: rcar: let DMA enable routine return success status
  i2c: rcar: wait for data empty before starting DMA

 drivers/i2c/busses/i2c-rcar.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

Comments

Geert Uytterhoeven March 11, 2019, 9:59 a.m. UTC | #1
Hi Wolfram,

On Tue, Mar 5, 2019 at 7:52 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> The Renesas BSP has a patch to wait for the data register being empty before
> starting TX-DMA. This is according to the data sheet, so this small series does
> the same in patch 2 & 3. However, refactored, so there is less to compute and
> it is hopefully also easy to read. During that work, I noticed an implicit
> assumption about a required minimal DMA length. It is now explicit and
> documented :)
>
> Tested on a Renesas Salvator XS (R-Car M3N) and now regressions found when

no regressions? ;-)

> writing data with DMA.

Gr{oetje,eeting}s,

                        Geert
Wolfram Sang March 11, 2019, 10:39 a.m. UTC | #2
> > Tested on a Renesas Salvator XS (R-Car M3N) and now regressions found when
> 
> no regressions? ;-)

:DDD