i2c: rcar: handle RXDMA HW behaviour on Gen3
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 28 Jun 2018 20:45:38 +0000 (22:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Oct 2018 07:48:54 +0000 (09:48 +0200)
commit4d5af836674f58daf5f7bf6b5536f58406d400d7
treef7a2b40fb69f02e0f269f7759613de09c07416a4
parentfaf578e3593e69613aed559dc96c3594f27324f3
i2c: rcar: handle RXDMA HW behaviour on Gen3

commit 2b16fd63059ab9a46d473620749672dc342e1d21 upstream.

On Gen3, we can only do RXDMA once per transfer reliably. For that, we
must reset the device, then we can have RXDMA once. This patch
implements this. When there is no reset controller or the reset fails,
RXDMA will be blocked completely. Otherwise, it will be disabled after
the first RXDMA transfer. Based on a commit from the BSP by Hiromitsu
Yamasaki, yet completely refactored to handle multiple read messages
within one transfer.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-rcar.c