i2c: cadence: Fix the hold bit setting
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Tue, 5 Feb 2019 11:12:53 +0000 (16:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:09:46 +0000 (20:09 +0100)
commitd9ce9aea3f63ba11921aae156c9e57f2e0ba0dee
tree2d6077c4f1c0a9a927ee6d3b5ede55e72a25e521
parent8f622a7d512c567d24cfde1059002ffbb0bf1cb0
i2c: cadence: Fix the hold bit setting

[ Upstream commit d358def706880defa4c9e87381c5bf086a97d5f9 ]

In case the hold bit is not needed we are carrying the old values.
Fix the same by resetting the bit when not needed.

Fixes the sporadic i2c bus lockups on National Instruments
Zynq-based devices.

Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller")
Reported-by: Kyle Roeschley <kyle.roeschley@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Tested-by: Kyle Roeschley <kyle.roeschley@ni.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-cadence.c