]> git.dujemihanovic.xyz Git - u-boot.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)
commitb03380805b5a184b7017dc428a53c8e1e9c9f99c
tree797bf98c04716ed0719ee71f63f396633e39ce63
parent5ac5861c4ba851b473e6a24940b412b397627d8d
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