qemu-e2k/hw/gpio
Peter Delevoryas 2ec063788e hw/gpio/aspeed_gpio: Fix QOM pin property
I was setting gpioV4-7 to "1110" using the QOM pin property handler and
noticed that lowering gpioV7 was inadvertently lowering gpioV4-6 too.

    (qemu) qom-set /machine/soc/gpio gpioV4 true
    (qemu) qom-set /machine/soc/gpio gpioV5 true
    (qemu) qom-set /machine/soc/gpio gpioV6 true
    (qemu) qom-get /machine/soc/gpio gpioV4
    true
    (qemu) qom-set /machine/soc/gpio gpioV7 false
    (qemu) qom-get /machine/soc/gpio gpioV4
    false

An expression in aspeed_gpio_set_pin_level was using a logical NOT
operator instead of a bitwise NOT operator:

    value &= !pin_mask;

The original author probably intended to make a bitwise NOT expression
"~", but mistakenly used a logical NOT operator "!" instead. Some
programming languages like Rust use "!" for both purposes.

Fixes: 4b7f956862 ("hw/gpio: Add basic Aspeed GPIO model for AST2400 and
AST2500")
Signed-off-by: Peter Delevoryas <pdel@fb.com>
Message-Id: <20220502080827.244815-1-pdel@fb.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-05-02 17:03:04 +02:00
..
aspeed_gpio.c hw/gpio/aspeed_gpio: Fix QOM pin property 2022-05-02 17:03:04 +02:00
bcm2835_gpio.c qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
gpio_key.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
gpio_pwr.c hw/gpio/gpio_pwr: use shutdown function for reboot 2021-07-02 11:48:36 +01:00
imx_gpio.c Remove unnecessary minimum_version_id_old fields 2022-01-28 15:38:23 +01:00
Kconfig hw: gpio: implement gpio-pwr driver for qemu reset/poweroff 2021-01-29 10:47:28 +00:00
max7310.c Pull request trivial patches 20200919 2020-09-22 15:42:23 +01:00
meson.build Drop the deprecated unicore32 target 2021-05-12 18:20:52 +02:00
mpc8xxx.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
npcm7xx_gpio.c hw/gpio: Add GPIO model for Nuvoton NPCM7xx 2020-10-27 11:10:32 +00:00
nrf51_gpio.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
omap_gpio.c exec/exec-all: Move 'qemu/log.h' include in units requiring it 2022-02-21 10:18:06 +01:00
pl061.c hw/gpio/pl061: Document a shortcoming in our implementation 2021-07-09 16:09:12 +01:00
sifive_gpio.c hw/riscv: Move sifive_gpio model to hw/gpio 2020-09-09 15:54:19 -07:00
trace-events hw/gpio/pl061: Convert to 3-phase reset and assert GPIO lines correctly on reset 2021-07-09 16:09:12 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
zaurus.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00