fsi/gpio: Use relative-addressing commands
authorJeremy Kerr <jk@ozlabs.org>
Thu, 10 May 2018 09:22:05 +0000 (17:22 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 12 Jun 2018 04:05:10 +0000 (14:05 +1000)
commit0e82e5c1fad79ffe9d316296c7a4c1de539d0c48
treeb815704b7119f0f7f9f1c7df9a4721107697310a
parent8193fb4451ceb8c6585a529556542bdeb375e0d9
fsi/gpio: Use relative-addressing commands

FSI CFAMs support shorter commands that use a relative (or same) address
as the last. This change introduces a last_addr to the master state, and
uses it for subsequent reads/writes, and performs relative addressing
when a subsequent read/write is in range.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
Tested-by: Joel Stanley <joel@jms.id.au>
drivers/fsi/fsi-master-gpio.c