qemu/hw/core
Laszlo Ersek 0b336b3b98 hw/core: explicit OFW unit address callback for SysBusDeviceClass
The sysbus_get_fw_dev_path() function formats OpenFirmware device path
nodes ("driver-name@unit-address") for sysbus devices. The first choice
for "unit-address" is the base address of the device's first MMIO region.
The second choice is its first IO port.

However, if two sysbus devices with the same "driver-name" lack both MMIO
and PIO resources, then there is no good way to distinguish them based on
their OFW nodes, because in this case unit-address is omitted completely
for both devices. An example is TYPE_PXB_HOST ("pxb-host").

For the sake of such devices, introduce the explicit_ofw_unit_address()
"virtual member function". With this function, each sysbus device in the
same SysBusDeviceClass can state its own address.

Cc: Markus Armbruster <armbru@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Tested-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-23 22:58:36 +02:00
..
empty_slot.c empty_slot: QOM cast cleanup 2013-07-29 21:06:37 +02:00
fw-path-provider.c fw_cfg: fix typos in comments: patch -> path 2015-02-10 09:27:19 +03:00
hotplug.c qdev: HotplugHandler: Provide unplug callback 2014-10-15 05:03:13 +02:00
irq.c irq: Remove qemu_irq_intercept_out 2014-10-23 16:41:25 +02:00
loader.c acpi-build: remove dependency from ram_addr.h 2015-04-27 18:24:18 +02:00
machine.c machine: add default_ram_size to machine class 2015-06-03 23:56:55 +02:00
Makefile.objs Create specific config option for "platform-bus" 2015-02-27 15:17:42 +01:00
nmi.c nmi: Implement inject_nmi() for non-monitor context use 2015-06-11 17:45:50 +02:00
null-machine.c machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
platform-bus.c sysbus: Add new platform bus helper device 2014-11-04 23:26:14 +01:00
ptimer.c hw/ptimer: Do not artificially limit timers when using icount 2015-05-08 17:15:23 +10:00
qdev-properties-system.c QemuOpts: Convert qemu_opts_foreach() to Error 2015-06-09 07:37:37 +02:00
qdev-properties.c qdev: fix OVERFLOW_BEFORE_WIDEN 2015-06-23 08:14:13 +02:00
qdev.c qdev: Deprecated qdev_init() is finally unused, drop 2015-06-19 19:14:22 +02:00
stream.c stream: Remove app argument hack 2013-04-16 10:04:23 +02:00
sysbus.c hw/core: explicit OFW unit address callback for SysBusDeviceClass 2015-06-23 22:58:36 +02:00
uboot_image.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00