Lines Matching refs:bus

26    inherit from a particular bus (e.g. PCI or I2C) rather than
50 /* This is a nasty hack to allow passing a NULL bus to qdev_create. */
71 DeviceState *qdev_create(BusState *bus, const char *name)
88 if (!bus) {
92 NULL, "main-system-bus");
94 bus = main_system_bus;
96 if (t->info->bus_type != bus->type) {
97 /* TODO: Print bus type names. */
98 hw_error("Device '%s' on wrong bus type (%d/%d)", name,
99 t->info->bus_type, bus->type);
101 dev->parent_bus = bus;
102 QLIST_INSERT_HEAD(&bus->children, dev, sibling);
159 BusState *bus;
175 /* find bus */
176 path = qemu_opt_get(opts, "bus");
178 bus = qbus_find(path);
179 if (!bus) {
182 if (bus->info != info->bus_info) {
184 driver, bus->info->name);
188 bus = qbus_find_recursive(main_system_bus, NULL, info->bus_info);
189 if (!bus) {
195 if (qdev_hotplug && !bus->allow_hotplug) {
196 qerror_report(QERR_BUS_NO_HOTPLUG, bus->name);
201 qdev = qdev_create_from_info(bus, info);
227 /* Unlink device from bus and free the structure. */
393 appropriate bus. */
408 BusState *bus;
410 QLIST_FOREACH(bus, &dev->child_bus, sibling) {
411 if (strcmp(name, bus->name) == 0) {
412 return bus;
420 /* Create a scsi bus, and attach devices to it. */
421 /* TODO: Actually create a scsi bus for hotplug to use. */
424 int bus = next_scsi_bus++;
429 info = drive_get(IF_SCSI, bus, unit);
440 BusState *bus;
442 bus = g_malloc0(size);
443 bus->type = type;
444 bus->parent = parent;
445 bus->name = g_strdup(name);
446 QLIST_INIT(&bus->children);
448 QLIST_INSERT_HEAD(&parent->child_bus, bus, sibling);
450 return bus;
462 static void qbus_print(Monitor *mon, BusState *bus, int indent);
506 static void qbus_print(Monitor *mon, BusState *bus, int indent)
510 qdev_printf("bus: %s\n", bus->name);
512 qdev_printf("type %s\n", bus_type_names[bus->type]);
513 QLIST_FOREACH(dev, &bus->children, sibling) {