@@ -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. */