hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary

Instead of filling an array of all the possible IRQs, only call
qdev_get_gpio_in() when an IRQ is used. Remove the array from
RX62NState. Doing so we avoid calling qdev_get_gpio_in() on an
unrealized device.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240213130341.1793-4-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2024-02-07 16:26:12 +01:00
parent 7188dfcda2
commit 2e0b925a34
2 changed files with 8 additions and 9 deletions

View file

@ -67,7 +67,6 @@ struct RX62NState {
MemoryRegion iomem2;
MemoryRegion iomem3;
MemoryRegion c_flash;
qemu_irq irq[NR_IRQS];
/* Input Clock (XTAL) frequency */
uint32_t xtal_freq_hz;