]> git.baikalelectronics.ru Git - uboot.git/commit
i2c: designware: Avoid overwriting the cmd_data register
authorMarek Vasut <marex@denx.de>
Thu, 20 Oct 2016 14:48:28 +0000 (16:48 +0200)
committerHeiko Schocher <hs@denx.de>
Mon, 24 Oct 2016 16:15:47 +0000 (18:15 +0200)
commit14731e5a3eb98ccb41a08ef4b90d16011ed612be
tree797bf98c04716ed0719ee71f63f396633e39ce63
parent155825d6dd405ebcace872779213077a9feebd92
i2c: designware: Avoid overwriting the cmd_data register

Make sure the driver writes the cmd_data register only once per
read transfer instead of doing so potentially repeatedly.

In case the read transfer didn't finish quickly enough, the loop
in the driver code would spin fast enough to write the same value
into the cmd_data register again before re-checking whether the
transfer completed, which would cause another spurious read transfer
on the bus.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
drivers/i2c/designware_i2c.c