sysbus.c (89e9429c3cb42400f3a80890e0c20b18aa62a11d) | sysbus.c (0b336b3b98d8983d821ef9b0f159acc7c77cbac7) |
---|---|
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 --- 267 unchanged lines hidden (view full) --- 276 monitor_printf(mon, "%*smmio " TARGET_FMT_plx "/" TARGET_FMT_plx "\n", 277 indent, "", s->mmio[i].addr, size); 278 } 279} 280 281static char *sysbus_get_fw_dev_path(DeviceState *dev) 282{ 283 SysBusDevice *s = SYS_BUS_DEVICE(dev); | 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 --- 267 unchanged lines hidden (view full) --- 276 monitor_printf(mon, "%*smmio " TARGET_FMT_plx "/" TARGET_FMT_plx "\n", 277 indent, "", s->mmio[i].addr, size); 278 } 279} 280 281static char *sysbus_get_fw_dev_path(DeviceState *dev) 282{ 283 SysBusDevice *s = SYS_BUS_DEVICE(dev); |
284 SysBusDeviceClass *sbc = SYS_BUS_DEVICE_GET_CLASS(s); 285 /* for the explicit unit address fallback case: */ 286 char *addr, *fw_dev_path; |
|
284 285 if (s->num_mmio) { 286 return g_strdup_printf("%s@" TARGET_FMT_plx, qdev_fw_name(dev), 287 s->mmio[0].addr); 288 } 289 if (s->num_pio) { 290 return g_strdup_printf("%s@i%04x", qdev_fw_name(dev), s->pio[0]); 291 } | 287 288 if (s->num_mmio) { 289 return g_strdup_printf("%s@" TARGET_FMT_plx, qdev_fw_name(dev), 290 s->mmio[0].addr); 291 } 292 if (s->num_pio) { 293 return g_strdup_printf("%s@i%04x", qdev_fw_name(dev), s->pio[0]); 294 } |
295 if (sbc->explicit_ofw_unit_address) { 296 addr = sbc->explicit_ofw_unit_address(s); 297 if (addr) { 298 fw_dev_path = g_strdup_printf("%s@%s", qdev_fw_name(dev), addr); 299 g_free(addr); 300 return fw_dev_path; 301 } 302 } |
|
292 return g_strdup(qdev_fw_name(dev)); 293} 294 295void sysbus_add_io(SysBusDevice *dev, hwaddr addr, 296 MemoryRegion *mem) 297{ 298 memory_region_add_subregion(get_system_io(), addr, mem); 299} --- 53 unchanged lines hidden --- | 303 return g_strdup(qdev_fw_name(dev)); 304} 305 306void sysbus_add_io(SysBusDevice *dev, hwaddr addr, 307 MemoryRegion *mem) 308{ 309 memory_region_add_subregion(get_system_io(), addr, mem); 310} --- 53 unchanged lines hidden --- |