sysbus.c (afd76ffba966a072a7bbd0048bdf3b2ab69d3d4a) | sysbus.c (046f370fb44172a34e54e341e7aeca4405af67a1) |
---|---|
1/* 2 * System (CPU) Bus device support code 3 * 4 * Copyright (c) 2009 CodeSourcery 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 362 unchanged lines hidden (view full) --- 371BusState *sysbus_get_default(void) 372{ 373 if (!main_system_bus) { 374 main_system_bus_create(); 375 } 376 return main_system_bus; 377} 378 | 1/* 2 * System (CPU) Bus device support code 3 * 4 * Copyright (c) 2009 CodeSourcery 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 362 unchanged lines hidden (view full) --- 371BusState *sysbus_get_default(void) 372{ 373 if (!main_system_bus) { 374 main_system_bus_create(); 375 } 376 return main_system_bus; 377} 378 |
379void sysbus_init_child_obj(Object *parent, const char *childname, void *child, 380 size_t childsize, const char *childtype) 381{ 382 object_initialize_child(parent, childname, child, childsize, childtype, 383 &error_abort, NULL); 384 qdev_set_parent_bus(DEVICE(child), sysbus_get_default()); 385} 386 |
|
379static void sysbus_register_types(void) 380{ 381 type_register_static(&system_bus_info); 382 type_register_static(&sysbus_device_type_info); 383} 384 385type_init(sysbus_register_types) | 387static void sysbus_register_types(void) 388{ 389 type_register_static(&system_bus_info); 390 type_register_static(&sysbus_device_type_info); 391} 392 393type_init(sysbus_register_types) |