[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/6] qdev: introduce a helper function which trigger
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 3/6] qdev: introduce a helper function which triggers reset from a given device. |
Date: |
Thu, 2 Sep 2010 18:25:06 +0900 |
introduce a helper function which triggers reset on device tree
from a given device.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/qdev-core.h | 1 +
hw/qdev.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hw/qdev-core.h b/hw/qdev-core.h
index 49ac87a..20ebe1f 100644
--- a/hw/qdev-core.h
+++ b/hw/qdev-core.h
@@ -195,6 +195,7 @@ int qdev_walk_children(DeviceState *dev, qdev_walkerfn
*devfn,
DeviceState *qbus_find_child_dev(BusState *bus, const char *id);
BusState *qbus_find_child_bus(BusState *bus, const char *id);
+void qdev_reset_all(DeviceState *dev);
void qbus_reset_all(BusState *bus);
void qbus_realize_all(BusState *bus);
diff --git a/hw/qdev.c b/hw/qdev.c
index 9300d7f..191dfac 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -174,6 +174,11 @@ static int qbus_reset_one(BusState *bus, void *opaque)
return 0;
}
+void qdev_reset_all(DeviceState *dev)
+{
+ qdev_walk_children(dev, qdev_reset_one, qbus_reset_one, NULL);
+}
+
void qbus_reset_all(BusState *bus)
{
qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL);
--
1.7.1.1
- [Qemu-devel] [PATCH 0/6 v3] introduce qbus reset callback and pci bus reset clean up, Isaku Yamahata, 2010/09/02
- [Qemu-devel] [PATCH 6/6] pci bridge: implement secondary bus reset., Isaku Yamahata, 2010/09/02
- [Qemu-devel] [PATCH 5/6] pci: teach pci devices that have reset callback how to reset common registers., Isaku Yamahata, 2010/09/02
- [Qemu-devel] [PATCH 3/6] qdev: introduce a helper function which triggers reset from a given device.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 2/6] qdev: introduce reset call back for qbus level., Isaku Yamahata, 2010/09/02
- [Qemu-devel] [PATCH 4/6] pci: make pci reset use qdev reset frame work., Isaku Yamahata, 2010/09/02
- [Qemu-devel] [PATCH 1/6] qdev: Make qbus_walk_children() call busfn for root bus., Isaku Yamahata, 2010/09/02
- [Qemu-devel] Re: [PATCH 0/6 v3] introduce qbus reset callback and pci bus reset clean up, Anthony Liguori, 2010/09/02