x86: ich6_gpio: Add use-lvl-write-cache for I/O access mode
authorBin Meng <bmeng.cn@gmail.com>
Mon, 8 May 2017 02:52:29 +0000 (19:52 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 17 May 2017 09:13:06 +0000 (17:13 +0800)
commit770ee0174223e824a721f5f164cc8b2bf7473189
tree0de6de27fe1f7ee3d15aa9333ac2011d75a544f7
parent4759dffe23460d39d8e92c01013b00a3587e2112
x86: ich6_gpio: Add use-lvl-write-cache for I/O access mode

Add a device-tree property use-lvl-write-cache that will cause
writes to lvl to be cached instead of read from lvl before each
write. This is required on some platforms that have the register
implemented as dual read/write (such as Baytrail).

Prior to this fix the blue USB port on the Minnowboard Max was
unusable since USB_HOST_EN0 was set high then immediately set
low when USB_HOST_EN1 was written.

This also resolves the 'gpio clear | set' command warning like:
  "Warning: value of pin is still 0"

Signed-off-by: George McCollister <george.mccollister@gmail.com>
<rebased on latest origin/master, fixed all baytrail boards>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/dts/bayleybay.dts
arch/x86/dts/baytrail_som-db5800-som-6867.dts
arch/x86/dts/conga-qeval20-qa3-e3845.dts
arch/x86/dts/dfi-bt700.dtsi
arch/x86/dts/minnowmax.dts
drivers/gpio/intel_ich6_gpio.c