u-boot-brain/drivers/gpio
Rasmus Villemoes dd4cf53f98 gpio: mpc8xxx: don't do RMW on gpdat register when setting value
The driver correctly handles reading back the value of an output gpio
by reading from the shadow register for output, and from gpdat for
inputs.

Unfortunately, when setting the value of some gpio, we do a RMW cycle
on the gpdat register without taking the shadow register into account,
thus accidentally setting other output gpios (at least those whose
value cannot be read back) to 0 at the same time.

When changing a gpio from input to output, we still need to make sure
it initially has the requested value. So, the procedure is

- update the shadow register
- compute the new gpdir register
- write the bitwise and of the shadow and new gpdir register to gpdat
- write the new gpdir register

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2020-03-31 10:06:52 -04:00
..
74x164_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
adi_gpio2.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
altera_pio.c gpio: altera_pio: fix get_value 2019-02-25 16:07:36 +01:00
at91_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
atmel_pio4.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
axp_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm2835_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm6345_gpio.c gpio: bcm6345: switch to raw I/O functions 2019-04-12 17:32:51 +02:00
cortina_gpio.c gpio: cortina_gpio: add DM_GPIO driver for CAxxxx SoCs 2020-02-07 14:01:21 -05:00
da8xx_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
da8xx_gpio.h dm: gpio: Allow control of GPIO uclass in SPL 2019-12-15 08:52:29 +08:00
db8500_gpio.c GPIO: Correct doc typo "confguration" -> "configuration" 2017-02-08 16:24:29 -05:00
dwapb_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
gpio-rcar.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
gpio-rza1.c gpio: renesas: Add RZ/A1 R7S72100 GPIO driver 2019-05-07 05:41:32 +02:00
gpio-uclass.c gpio: Rename free() to rfree() 2020-02-05 19:33:46 -07:00
gpio-uniphier.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hi6220_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hsdk-creg-gpio.c GPIO: CREG: improve flexibility of hsdk-creg-gpio driver 2018-07-31 07:49:47 +03:00
imx_rgpio2p.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
intel_broadwell_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
intel_gpio.c gpio: intel_gpio: Fix register/bit offsets intel_gpio_get_value() 2020-02-04 12:54:55 +08:00
intel_ich6_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig gpio: cortina_gpio: add DM_GPIO driver for CAxxxx SoCs 2020-02-07 14:01:21 -05:00
kona_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
kw_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lpc32xx_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile gpio: Let DM_74X164 be built without CONFIG_SPL_GPIO 2020-02-09 14:52:39 +01:00
mpc8xxx_gpio.c gpio: mpc8xxx: don't do RMW on gpdat register when setting value 2020-03-31 10:06:52 -04:00
mpc83xx_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
mscc_sgpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
msm_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mt7621_gpio.c gpio: Add MT7621 GPIO support 2018-11-18 16:02:22 +01:00
mvebu_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mvgpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
mvgpio.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mvmfp.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxc_gpio.c gpio: mxc_gpio: add support for i.MXRT1050 2020-01-14 22:53:59 +01:00
mxs_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
omap_gpio.c dm: gpio: Allow control of GPIO uclass in SPL 2019-12-15 08:52:29 +08:00
pca953x_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
pca953x.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pca9698.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
pcf8575_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pic32_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pm8916_gpio.c sandbox: spmi: Add ranges property for address translation 2019-10-08 13:57:39 +08:00
rk_gpio.c rockchip: use 'arch-rockchip' as header file path 2019-05-01 00:00:05 +02:00
s5p_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sh_pfc.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sifive-gpio.c gpio: sifive: add support for DM based gpio driver for FU540-SoC 2019-10-18 09:04:01 +08:00
spear_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
stm32_gpio.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sunxi_gpio.c dm: gpio: Allow control of GPIO uclass in SPL 2019-12-15 08:52:29 +08:00
tca642x.c GPIO: tca642x: Rework to not include commands in SPL 2018-01-19 15:49:29 -05:00
tegra_gpio.c gpio: Remove DM_FLAG_PRE_RELOC flag in various drivers 2018-11-14 09:16:28 -08:00
tegra186_gpio_priv.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tegra186_gpio.c gpio: Remove DM_FLAG_PRE_RELOC flag in various drivers 2018-11-14 09:16:28 -08:00
vybrid_gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
xilinx_gpio.c gpio: xilinx: Add support for using label property 2018-08-07 11:03:43 +02:00
zynq_gpio.c gpio: zynq: Add gpio driver support for PMC gpio 2019-10-24 13:37:01 +02:00