diff options
author | Zongyuan Li <zongyuan.li@smartx.com> | 2022-03-25 02:15:55 +0800 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-04-21 11:37:04 +0100 |
commit | d0a030d80165d0b20b0687dab8f99056eee68352 (patch) | |
tree | 2b5dbb4659cc90a7c9f8d7f3338e1591cba29dd0 /hw/arm | |
parent | d5c3eb50afac631d41daec7c09a959fa06304fce (diff) | |
download | qemu-d0a030d80165d0b20b0687dab8f99056eee68352.zip qemu-d0a030d80165d0b20b0687dab8f99056eee68352.tar.gz qemu-d0a030d80165d0b20b0687dab8f99056eee68352.tar.bz2 |
hw/arm/stellaris: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'
Signed-off-by: Zongyuan Li <zongyuan.li@smartx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220324181557.203805-3-zongyuan.li@smartx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/stellaris.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index b6c8a5d..12c673c 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "hw/core/split-irq.h" #include "hw/sysbus.h" #include "hw/sd/sd.h" #include "hw/ssi/ssi.h" @@ -1160,6 +1161,7 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) DeviceState *ssddev; DriveInfo *dinfo; DeviceState *carddev; + DeviceState *gpio_d_splitter; BlockBackend *blk; /* @@ -1237,9 +1239,18 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) &error_fatal); ssddev = ssi_create_peripheral(bus, "ssd0323"); - gpio_out[GPIO_D][0] = qemu_irq_split( - qdev_get_gpio_in_named(sddev, SSI_GPIO_CS, 0), + + gpio_d_splitter = qdev_new(TYPE_SPLIT_IRQ); + qdev_prop_set_uint32(gpio_d_splitter, "num-lines", 2); + qdev_realize_and_unref(gpio_d_splitter, NULL, &error_fatal); + qdev_connect_gpio_out( + gpio_d_splitter, 0, + qdev_get_gpio_in_named(sddev, SSI_GPIO_CS, 0)); + qdev_connect_gpio_out( + gpio_d_splitter, 1, qdev_get_gpio_in_named(ssddev, SSI_GPIO_CS, 0)); + gpio_out[GPIO_D][0] = qdev_get_gpio_in(gpio_d_splitter, 0); + gpio_out[GPIO_C][7] = qdev_get_gpio_in(ssddev, 0); /* Make sure the select pin is high. */ |