mirror of
https://github.com/qemu/qemu.git
synced 2024-12-04 01:03:38 +08:00
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>
This commit is contained in:
parent
d5c3eb50af
commit
d0a030d801
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user