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
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
max7310.c
meson.build Drop the deprecated unicore32 target 2021-05-12 18:20:52 +02:00
mpc8xxx.c
npcm7xx_gpio.c
nrf51_gpio.c
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
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
zaurus.c