hw/gpio/pl061: Convert to 3-phase reset and assert GPIO lines correctly on reset
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 2 Jul 2021 10:40:16 +0000 (11:40 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 9 Jul 2021 15:09:12 +0000 (16:09 +0100)
commitef4989b0a898ae20a974d261b14d4e5c1c097292
tree5b454d45a858580d48f5d4a98296f3b4a246f964
parentd6773a1f996db5339cdc1e01f14ffb70ca9f4d28
hw/gpio/pl061: Convert to 3-phase reset and assert GPIO lines correctly on reset

The PL061 comes out of reset with all its lines configured as input,
which means they might need to be pulled to 0 or 1 depending on the
'pullups' and 'pulldowns' properties.  Currently we do not assert
these lines on reset; they will only be set whenever the guest first
touches a register that triggers a call to pl061_update().

Convert the device to three-phase reset so we have a place where we
can safely call qemu_set_irq() to set the floating lines to their
correct values.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
hw/gpio/pl061.c
hw/gpio/trace-events