hw: Contain drive, serial, parallel, net misuse
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVHUTQAAoJEDhwtADrkYZTPtsP/0Ua+QZAOuTVo5EJTBZWFlcW WpUu91af7Lgsx9RQ/PwOA3wR/X+Kkr6ZpzgSOKV0F4EKGaxlVIXvAAKd6IVoVSuK 8RFY9YH2LsI/qLVsjUD501Gc4NRuqycNVZOSklG9fWbqYvyWpVWcaMVlqx6aPV8g NNhWMgLIFXtpzWpIMYrt+7U+G8ufBWPTAhhs9fAZp6EQwutvx04BcoUUv5mi1YsK rVmM+0YHwQpi1NjzSBoxHotYN/YfHpecMgWaRy5NbpYCGgntkABP8MsuWOMl2wqe lvdZrSLyob7LqX84jHP9mreku4rRehtwz81Yp5hUFNIsuFV19pZf4gG8FZbwzJjs t4vJb/5aUDxCxI6SlYTHgTFKPFXHLP9lM0fbGfsbmi7nVd2xq02S7U9UWIoejxrR bLrRnWajHkywjdVnOsnimZKj0H0JU+hCtZdbl89VMPj3mNGdvlRXHYfxBH8p9a4+ Dm+OCo7KTWgZpCW7DBUJerD5utR36+ulH695Gita57yxQDpRP0qYSYENjwON4syE 9KSxoI/FAY/RPjtHHjSv0fCxMNSp5fAOT1sM/a3pNrutJmxd/OUfUXS5f1H1CWVV qt8o8rVMqsrsgE2xxXnu7Q4gbVKpJSLgB+Bg7O3V0sS4kwtlgjIsfazs1MPlJBKR HbM4oDOWp+olONw2awDX =Iwrz -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-hw-2015-04-02' into staging hw: Contain drive, serial, parallel, net misuse # gpg: Signature made Thu Apr 2 14:32:00 2015 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-hw-2015-04-02: sysbus: Make devices picking up backends unavailable with -device sdhci: Make device "sdhci-pci" unavailable with -device hw: Mark device misusing nd_table[] FIXME hw: Mark devices picking up char backends actively FIXME hw: Mark devices picking up block backends actively FIXME Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
913fbe9a6a
@ -34,6 +34,7 @@ static void aw_a10_init(Object *obj)
|
||||
|
||||
object_initialize(&s->emac, sizeof(s->emac), TYPE_AW_EMAC);
|
||||
qdev_set_parent_bus(DEVICE(&s->emac), sysbus_get_default());
|
||||
/* FIXME use qdev NIC properties instead of nd_table[] */
|
||||
if (nd_table[0].used) {
|
||||
qemu_check_nic_model(&nd_table[0], TYPE_AW_EMAC);
|
||||
qdev_set_nic_properties(DEVICE(&s->emac), &nd_table[0]);
|
||||
@ -92,6 +93,7 @@ static void aw_a10_realize(DeviceState *dev, Error **errp)
|
||||
sysbus_mmio_map(sysbusdev, 0, AW_A10_EMAC_BASE);
|
||||
sysbus_connect_irq(sysbusdev, 0, s->irq[55]);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of serial_hds[] */
|
||||
serial_mm_init(get_system_memory(), AW_A10_UART0_REG_BASE, 2, s->irq[1],
|
||||
115200, serial_hds[0], DEVICE_NATIVE_ENDIAN);
|
||||
}
|
||||
|
@ -168,6 +168,7 @@ static int sl_nand_init(SysBusDevice *dev)
|
||||
DriveInfo *nand;
|
||||
|
||||
s->ctl = 0;
|
||||
/* FIXME use a qdev drive property instead of drive_get() */
|
||||
nand = drive_get(IF_MTD, 0, 0);
|
||||
s->nand = nand_init(nand ? blk_by_legacy_dinfo(nand) : NULL,
|
||||
s->manf_id, s->chip_id);
|
||||
@ -1035,6 +1036,8 @@ static void sl_nand_class_init(ObjectClass *klass, void *data)
|
||||
k->init = sl_nand_init;
|
||||
dc->vmsd = &vmstate_sl_nand_info;
|
||||
dc->props = sl_nand_properties;
|
||||
/* Reason: init() method uses drive_get() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo sl_nand_info = {
|
||||
|
@ -623,6 +623,7 @@ static int m25p80_init(SSISlave *ss)
|
||||
s->dirty_page = -1;
|
||||
s->storage = blk_blockalign(s->blk, s->size);
|
||||
|
||||
/* FIXME use a qdev drive property instead of drive_get_next() */
|
||||
dinfo = drive_get_next(IF_MTD);
|
||||
|
||||
if (dinfo) {
|
||||
|
@ -483,6 +483,7 @@ static void cadence_uart_realize(DeviceState *dev, Error **errp)
|
||||
s->fifo_trigger_handle = timer_new_ns(QEMU_CLOCK_VIRTUAL,
|
||||
fifo_trigger_update, s);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
|
||||
if (s->chr) {
|
||||
@ -536,6 +537,8 @@ static void cadence_uart_class_init(ObjectClass *klass, void *data)
|
||||
dc->realize = cadence_uart_realize;
|
||||
dc->vmsd = &vmstate_cadence_uart;
|
||||
dc->reset = cadence_uart_reset;
|
||||
/* Reason: realize() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo cadence_uart_info = {
|
||||
|
@ -143,6 +143,7 @@ static void digic_uart_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
DigicUartState *s = DIGIC_UART(dev);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
if (s->chr) {
|
||||
qemu_chr_add_handlers(s->chr, uart_can_rx, uart_rx, uart_event, s);
|
||||
@ -176,6 +177,8 @@ static void digic_uart_class_init(ObjectClass *klass, void *data)
|
||||
dc->realize = digic_uart_realize;
|
||||
dc->reset = digic_uart_reset;
|
||||
dc->vmsd = &vmstate_digic_uart;
|
||||
/* Reason: realize() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo digic_uart_info = {
|
||||
|
@ -219,6 +219,7 @@ static int etraxfs_ser_init(SysBusDevice *dev)
|
||||
"etraxfs-serial", R_MAX * 4);
|
||||
sysbus_init_mmio(dev, &s->mmio);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
if (s->chr) {
|
||||
qemu_chr_add_handlers(s->chr,
|
||||
@ -235,6 +236,8 @@ static void etraxfs_ser_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
k->init = etraxfs_ser_init;
|
||||
dc->reset = etraxfs_ser_reset;
|
||||
/* Reason: init() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo etraxfs_ser_info = {
|
||||
|
@ -117,6 +117,7 @@ static int lm32_juart_init(SysBusDevice *dev)
|
||||
{
|
||||
LM32JuartState *s = LM32_JUART(dev);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
if (s->chr) {
|
||||
qemu_chr_add_handlers(s->chr, juart_can_rx, juart_rx, juart_event, s);
|
||||
@ -144,6 +145,8 @@ static void lm32_juart_class_init(ObjectClass *klass, void *data)
|
||||
k->init = lm32_juart_init;
|
||||
dc->reset = juart_reset;
|
||||
dc->vmsd = &vmstate_lm32_juart;
|
||||
/* Reason: init() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo lm32_juart_info = {
|
||||
|
@ -258,6 +258,7 @@ static int lm32_uart_init(SysBusDevice *dev)
|
||||
"uart", R_MAX * 4);
|
||||
sysbus_init_mmio(dev, &s->iomem);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
if (s->chr) {
|
||||
qemu_chr_add_handlers(s->chr, uart_can_rx, uart_rx, uart_event, s);
|
||||
@ -284,6 +285,8 @@ static void lm32_uart_class_init(ObjectClass *klass, void *data)
|
||||
k->init = lm32_uart_init;
|
||||
dc->reset = uart_reset;
|
||||
dc->vmsd = &vmstate_lm32_uart;
|
||||
/* Reason: init() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo lm32_uart_info = {
|
||||
|
@ -199,6 +199,7 @@ static void milkymist_uart_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
MilkymistUartState *s = MILKYMIST_UART(dev);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
if (s->chr) {
|
||||
qemu_chr_add_handlers(s->chr, uart_can_rx, uart_rx, uart_event, s);
|
||||
@ -234,6 +235,8 @@ static void milkymist_uart_class_init(ObjectClass *klass, void *data)
|
||||
dc->realize = milkymist_uart_realize;
|
||||
dc->reset = milkymist_uart_reset;
|
||||
dc->vmsd = &vmstate_milkymist_uart;
|
||||
/* Reason: realize() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo milkymist_uart_info = {
|
||||
|
@ -293,6 +293,7 @@ static void pl011_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
PL011State *s = PL011(dev);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
|
||||
if (s->chr) {
|
||||
@ -307,6 +308,8 @@ static void pl011_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
dc->realize = pl011_realize;
|
||||
dc->vmsd = &vmstate_pl011;
|
||||
/* Reason: realize() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo pl011_arm_info = {
|
||||
|
@ -198,6 +198,7 @@ static void stm32f2xx_usart_init(Object *obj)
|
||||
TYPE_STM32F2XX_USART, 0x2000);
|
||||
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
|
||||
if (s->chr) {
|
||||
@ -211,6 +212,8 @@ static void stm32f2xx_usart_class_init(ObjectClass *klass, void *data)
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->reset = stm32f2xx_usart_reset;
|
||||
/* Reason: instance_init() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo stm32f2xx_usart_info = {
|
||||
|
@ -205,6 +205,7 @@ static void xilinx_uartlite_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
XilinxUARTLite *s = XILINX_UARTLITE(dev);
|
||||
|
||||
/* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
|
||||
s->chr = qemu_char_get_next_serial();
|
||||
if (s->chr)
|
||||
qemu_chr_add_handlers(s->chr, uart_can_rx, uart_rx, uart_event, s);
|
||||
@ -227,6 +228,8 @@ static void xilinx_uartlite_class_init(ObjectClass *klass, void *data)
|
||||
|
||||
dc->reset = xilinx_uartlite_reset;
|
||||
dc->realize = xilinx_uartlite_realize;
|
||||
/* Reason: realize() method uses qemu_char_get_next_serial() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo xilinx_uartlite_info = {
|
||||
|
@ -278,6 +278,7 @@ static void pc87312_realize(DeviceState *dev, Error **errp)
|
||||
pc87312_hard_reset(s);
|
||||
|
||||
if (is_parallel_enabled(s)) {
|
||||
/* FIXME use a qdev chardev prop instead of parallel_hds[] */
|
||||
chr = parallel_hds[0];
|
||||
if (chr == NULL) {
|
||||
chr = qemu_chr_new("par0", "null", NULL);
|
||||
@ -296,6 +297,7 @@ static void pc87312_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (is_uart_enabled(s, i)) {
|
||||
/* FIXME use a qdev chardev prop instead of serial_hds[] */
|
||||
chr = serial_hds[i];
|
||||
if (chr == NULL) {
|
||||
snprintf(name, sizeof(name), "ser%d", i);
|
||||
@ -319,11 +321,13 @@ static void pc87312_realize(DeviceState *dev, Error **errp)
|
||||
d = DEVICE(isa);
|
||||
qdev_prop_set_uint32(d, "iobase", get_fdc_iobase(s));
|
||||
qdev_prop_set_uint32(d, "irq", 6);
|
||||
/* FIXME use a qdev drive property instead of drive_get() */
|
||||
drive = drive_get(IF_FLOPPY, 0, 0);
|
||||
if (drive != NULL) {
|
||||
qdev_prop_set_drive_nofail(d, "driveA",
|
||||
blk_by_legacy_dinfo(drive));
|
||||
}
|
||||
/* FIXME use a qdev drive property instead of drive_get() */
|
||||
drive = drive_get(IF_FLOPPY, 0, 1);
|
||||
if (drive != NULL) {
|
||||
qdev_prop_set_drive_nofail(d, "driveB",
|
||||
|
@ -255,6 +255,7 @@ static int milkymist_memcard_init(SysBusDevice *dev)
|
||||
DriveInfo *dinfo;
|
||||
BlockBackend *blk;
|
||||
|
||||
/* FIXME use a qdev drive property instead of drive_get_next() */
|
||||
dinfo = drive_get_next(IF_SD);
|
||||
blk = dinfo ? blk_by_legacy_dinfo(dinfo) : NULL;
|
||||
s->card = sd_init(blk, false);
|
||||
@ -296,6 +297,8 @@ static void milkymist_memcard_class_init(ObjectClass *klass, void *data)
|
||||
k->init = milkymist_memcard_init;
|
||||
dc->reset = milkymist_memcard_reset;
|
||||
dc->vmsd = &vmstate_milkymist_memcard;
|
||||
/* Reason: init() method uses drive_get_next() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo milkymist_memcard_info = {
|
||||
|
@ -490,6 +490,7 @@ static int pl181_init(SysBusDevice *sbd)
|
||||
sysbus_init_irq(sbd, &s->irq[0]);
|
||||
sysbus_init_irq(sbd, &s->irq[1]);
|
||||
qdev_init_gpio_out(dev, s->cardstatus, 2);
|
||||
/* FIXME use a qdev drive property instead of drive_get_next() */
|
||||
dinfo = drive_get_next(IF_SD);
|
||||
s->card = sd_init(dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, false);
|
||||
if (s->card == NULL) {
|
||||
@ -507,6 +508,8 @@ static void pl181_class_init(ObjectClass *klass, void *data)
|
||||
sdc->init = pl181_init;
|
||||
k->vmsd = &vmstate_pl181;
|
||||
k->reset = pl181_reset;
|
||||
/* Reason: init() method uses drive_get_next() */
|
||||
k->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo pl181_info = {
|
||||
|
@ -1146,6 +1146,7 @@ static void sdhci_initfn(SDHCIState *s)
|
||||
{
|
||||
DriveInfo *di;
|
||||
|
||||
/* FIXME use a qdev drive property instead of drive_get_next() */
|
||||
di = drive_get_next(IF_SD);
|
||||
s->card = sd_init(di ? blk_by_legacy_dinfo(di) : NULL, false);
|
||||
if (s->card == NULL) {
|
||||
@ -1253,6 +1254,8 @@ static void sdhci_pci_class_init(ObjectClass *klass, void *data)
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
dc->vmsd = &sdhci_vmstate;
|
||||
dc->props = sdhci_properties;
|
||||
/* Reason: realize() method uses drive_get_next() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo sdhci_pci_info = {
|
||||
@ -1294,6 +1297,8 @@ static void sdhci_sysbus_class_init(ObjectClass *klass, void *data)
|
||||
dc->vmsd = &sdhci_vmstate;
|
||||
dc->props = sdhci_properties;
|
||||
dc->realize = sdhci_sysbus_realize;
|
||||
/* Reason: instance_init() method uses drive_get_next() */
|
||||
dc->cannot_instantiate_with_device_add_yet = true;
|
||||
}
|
||||
|
||||
static const TypeInfo sdhci_sysbus_info = {
|
||||
|
@ -255,6 +255,7 @@ static int ssi_sd_init(SSISlave *d)
|
||||
DriveInfo *dinfo;
|
||||
|
||||
s->mode = SSI_SD_CMD;
|
||||
/* FIXME use a qdev drive property instead of drive_get_next() */
|
||||
dinfo = drive_get_next(IF_SD);
|
||||
s->sd = sd_init(dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, true);
|
||||
if (s->sd == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user