[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/7] hw/misc/platform_devices: add call to sysbus fd
From: |
Eric Auger |
Subject: |
[Qemu-devel] [PATCH 6/7] hw/misc/platform_devices: add call to sysbus fdt_add_node |
Date: |
Mon, 7 Jul 2014 08:08:11 +0100 |
Creation of the node in the device tree relies on the new sysbus
fdt_add_node method.
Signed-off-by: Eric Auger <address@hidden>
---
hw/misc/platform_devices.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/hw/misc/platform_devices.c b/hw/misc/platform_devices.c
index 96ab272..a054606 100644
--- a/hw/misc/platform_devices.c
+++ b/hw/misc/platform_devices.c
@@ -9,7 +9,8 @@ int sysbus_device_create_devtree(Object *obj, void *opaque)
PlatformDevtreeData *data = opaque;
Object *dev;
SysBusDevice *sbdev;
- bool matched = false;
+ SysBusDeviceClass *k;
+
dev = object_dynamic_cast(obj, TYPE_SYS_BUS_DEVICE);
sbdev = (SysBusDevice *)dev;
@@ -19,12 +20,8 @@ int sysbus_device_create_devtree(Object *obj, void *opaque)
return object_child_foreach(obj, sysbus_device_create_devtree, data);
}
- if (!matched) {
- error_report("Device %s is not supported by this machine yet.",
- qdev_fw_name(DEVICE(dev)));
- exit(1);
- }
-
+ k = SYS_BUS_DEVICE_GET_CLASS(dev);
+ k->fdt_add_node(sbdev, data);
return 0;
}
--
1.8.3.2
- Re: [Qemu-devel] [PATCH 1/7] hw/misc/platform_devices: helpers for dynamic instantiation of platform devices, (continued)
- [Qemu-devel] [PATCH 4/7] hw/arm/virt: Support dynamically spawned sysbus devices, Eric Auger, 2014/07/07
- [Qemu-devel] [PATCH 3/7] hw/arm/virt: add new add_fdt_xxx_node functions, Eric Auger, 2014/07/07
- [Qemu-devel] [PATCH 5/7] hw/core/sysbus: add fdt_add_node method, Eric Auger, 2014/07/07
- [Qemu-devel] [PATCH 2/7] hw/arm/boot: load_dtb becomes non static, Eric Auger, 2014/07/07
- [Qemu-devel] [PATCH 6/7] hw/misc/platform_devices: add call to sysbus fdt_add_node,
Eric Auger <=
- [Qemu-devel] [PATCH 7/7] hw/misc/platform_devices: Add platform_bus_base to PlatformDevtreeData, Eric Auger, 2014/07/07