Patchwork [PATCHv7,02/16] Introduce new BusInfo callback get_fw_dev_path.

login
register
mail settings
Submitter Gleb Natapov
Date Dec. 6, 2010, 1:54 p.m.
Message ID <1291643687-32232-3-git-send-email-gleb@redhat.com>
Download mbox | patch
Permalink /patch/74355/
State New
Headers show

Comments

Gleb Natapov - Dec. 6, 2010, 1:54 p.m.
New get_fw_dev_path callback will be used for build device path usable
by firmware in contrast to qdev qemu internal device path.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
 hw/qdev.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/qdev.h b/hw/qdev.h
index bc71110..f72fbde 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -49,6 +49,12 @@  struct DeviceState {
 
 typedef void (*bus_dev_printfn)(Monitor *mon, DeviceState *dev, int indent);
 typedef char *(*bus_get_dev_path)(DeviceState *dev);
+/*
+ * This callback is used to create Open Firmware device path in accordance with
+ * OF spec http://forthworks.com/standards/of1275.pdf. Indicidual bus bindings
+ * can be found here http://playground.sun.com/1275/bindings/.
+ */
+typedef char *(*bus_get_fw_dev_path)(DeviceState *dev);
 typedef int (qbus_resetfn)(BusState *bus);
 
 struct BusInfo {
@@ -56,6 +62,7 @@  struct BusInfo {
     size_t size;
     bus_dev_printfn print_dev;
     bus_get_dev_path get_dev_path;
+    bus_get_fw_dev_path get_fw_dev_path;
     qbus_resetfn *reset;
     Property *props;
 };