Lines Matching refs:nd

21 void nubus_set_irq(NubusDevice *nd, int level)  in nubus_set_irq()  argument
23 NubusBus *nubus = NUBUS_BUS(qdev_get_parent_bus(DEVICE(nd))); in nubus_set_irq()
25 qemu_set_irq(nubus->irqs[nd->slot], level); in nubus_set_irq()
31 NubusDevice *nd = NUBUS_DEVICE(dev); in nubus_device_realize() local
38 if (nd->slot < 0 || nd->slot >= NUBUS_SLOT_NB) { in nubus_device_realize()
41 nd->slot, NUBUS_SLOT_NB - 1); in nubus_device_realize()
46 slot_offset = nd->slot * NUBUS_SUPER_SLOT_SIZE; in nubus_device_realize()
48 name = g_strdup_printf("nubus-super-slot-%x", nd->slot); in nubus_device_realize()
49 memory_region_init(&nd->super_slot_mem, OBJECT(dev), name, in nubus_device_realize()
52 &nd->super_slot_mem); in nubus_device_realize()
56 slot_offset = nd->slot * NUBUS_SLOT_SIZE; in nubus_device_realize()
58 name = g_strdup_printf("nubus-slot-%x", nd->slot); in nubus_device_realize()
59 memory_region_init(&nd->slot_mem, OBJECT(dev), name, NUBUS_SLOT_SIZE); in nubus_device_realize()
61 &nd->slot_mem); in nubus_device_realize()
65 if (nd->romfile != NULL) { in nubus_device_realize()
66 path = qemu_find_file(QEMU_FILE_TYPE_BIOS, nd->romfile); in nubus_device_realize()
68 path = g_strdup(nd->romfile); in nubus_device_realize()
73 error_setg(errp, "failed to find romfile \"%s\"", nd->romfile); in nubus_device_realize()
77 error_setg(errp, "romfile \"%s\" is empty", nd->romfile); in nubus_device_realize()
82 nd->romfile); in nubus_device_realize()
87 name = g_strdup_printf("nubus-slot-%x-declaration-rom", nd->slot); in nubus_device_realize()
94 memory_region_init_rom(&nd->decl_rom, OBJECT(dev), name, align_size, in nubus_device_realize()
96 rom_ptr = memory_region_get_ram_ptr(&nd->decl_rom); in nubus_device_realize()
102 error_setg(errp, "could not load romfile \"%s\"", nd->romfile); in nubus_device_realize()
105 memory_region_add_subregion(&nd->slot_mem, NUBUS_SLOT_SIZE - align_size, in nubus_device_realize()
106 &nd->decl_rom); in nubus_device_realize()