qemu-e2k/hw/gpio
Joel Stanley e229a179a5 hw: aspeed_gpio: Fix memory size
The macro used to calculate the maximum memory size of the MMIO region
had a mistake, causing all GPIO models to create a mapping of 0x9D8.
The intent was to have it be 0x9D8 - 0x800.

This extra size doesn't matter on ast2400 and ast2500, which have a 4KB
region set aside for the GPIO controller.

On the ast2600 the 3.3V and 1.8V GPIO controllers are 2KB apart, so the
regions would overlap. Worse was the 1.8V controller would map over the
top of the following peripheral, which happens to be the RTC.

The mmio region used by each device is a maximum of 2KB, so avoid the
calculations and hard code this as the maximum.

Fixes: 36d737ee82 ("hw/gpio: Add in AST2600 specific implementation")
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Rashmica Gupta <rashmica.g@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20210713065854.134634-2-joel@jms.id.au
[PMM: fix autocorrect error in commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-07-27 11:00:00 +01:00
..
Kconfig hw: gpio: implement gpio-pwr driver for qemu reset/poweroff 2021-01-29 10:47:28 +00:00
aspeed_gpio.c hw: aspeed_gpio: Fix memory size 2021-07-27 11:00:00 +01:00
bcm2835_gpio.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02: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 qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01: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 hw/gpio/omap_gpio: Replace fprintf() by qemu_log_mask(GUEST_ERROR) 2020-09-09 15:27:48 +02: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