sysbus.c (59c58f96b270f5edd4ad10954c3a96556cb3a728) | sysbus.c (7e83a77f96ee18cb891f309dc617caa5e07ff51e) |
---|---|
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 --- 236 unchanged lines hidden (view full) --- 245 } 246 sysbus_connect_irq(s, n, irq); 247 n++; 248 } 249 va_end(va); 250 return dev; 251} 252 | 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 --- 236 unchanged lines hidden (view full) --- 245 } 246 sysbus_connect_irq(s, n, irq); 247 n++; 248 } 249 va_end(va); 250 return dev; 251} 252 |
253DeviceState *sysbus_try_create_varargs(const char *name, 254 hwaddr addr, ...) 255{ 256 DeviceState *dev; 257 SysBusDevice *s; 258 va_list va; 259 qemu_irq irq; 260 int n; 261 262 dev = qdev_try_create(NULL, name); 263 if (!dev) { 264 return NULL; 265 } 266 s = SYS_BUS_DEVICE(dev); 267 qdev_init_nofail(dev); 268 if (addr != (hwaddr)-1) { 269 sysbus_mmio_map(s, 0, addr); 270 } 271 va_start(va, addr); 272 n = 0; 273 while (1) { 274 irq = va_arg(va, qemu_irq); 275 if (!irq) { 276 break; 277 } 278 sysbus_connect_irq(s, n, irq); 279 n++; 280 } 281 va_end(va); 282 return dev; 283} 284 | |
285static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent) 286{ 287 SysBusDevice *s = SYS_BUS_DEVICE(dev); 288 hwaddr size; 289 int i; 290 291 for (i = 0; i < s->num_mmio; i++) { 292 size = memory_region_size(s->mmio[i].memory); --- 103 unchanged lines hidden --- | 253static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent) 254{ 255 SysBusDevice *s = SYS_BUS_DEVICE(dev); 256 hwaddr size; 257 int i; 258 259 for (i = 0; i < s->num_mmio; i++) { 260 size = memory_region_size(s->mmio[i].memory); --- 103 unchanged lines hidden --- |