[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [RFC 2/6] arm64: Add definitions for fwnode_handle
- To: Sameer Goel <sgoel@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Julien Grall <julien.grall@xxxxxxx>
- Date: Thu, 8 Jun 2017 20:47:56 +0100
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Tomasz Nowicki <tn@xxxxxxxxxxxx>, Punit Agrawal <punit.agrawal@xxxxxxx>, Tim Deegan <tim@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxx>, nd@xxxxxxx, Robin Murphy <robin.murphy@xxxxxxx>, Shanker Donthineni <shankerd@xxxxxxxxxxxxxx>
- Delivery-date: Thu, 08 Jun 2017 19:49:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi,
Please CC all the relevant maintainers on this patch.
On 08/06/2017 20:30, Sameer Goel wrote:
This will be used as a device property to match the DMA capable devices
with the associated SMMU. The header file is a port from linux.
Linux ChangeId:ce793486e23e: driver core / ACPI: Represent ACPI
companions using fwnode_handle
Signed-off-by: Sameer Goel <sgoel@xxxxxxxxxxxxxx>
---
xen/include/asm-arm/device.h | 2 ++
xen/include/xen/fwnode.h | 35 +++++++++++++++++++++++++++++++++++
I am not totally convinced this is the right place for this header. But
I will leave the REST maintainers deciding.
2 files changed, 37 insertions(+)
create mode 100644 xen/include/xen/fwnode.h
diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h
index 6734ae8..78c38fe 100644
--- a/xen/include/asm-arm/device.h
+++ b/xen/include/asm-arm/device.h
@@ -2,6 +2,7 @@
#define __ASM_ARM_DEVICE_H
#include <xen/init.h>
+#include <xen/fwnode.h>
enum device_type
{
@@ -19,6 +20,7 @@ struct device
#ifdef CONFIG_HAS_DEVICE_TREE
struct dt_device_node *of_node; /* Used by drivers imported from Linux */
#endif
+ struct fwnode_handle *fwnode; /*fw device node identifier */
struct dev_archdata archdata;
};
diff --git a/xen/include/xen/fwnode.h b/xen/include/xen/fwnode.h
new file mode 100644
index 0000000..db65b15
--- /dev/null
+++ b/xen/include/xen/fwnode.h
@@ -0,0 +1,35 @@
+/*
+ * fwnode.h - Firmware device node object handle type definition.
+ *
+ * Copyright (C) 2015, Intel Corporation
+ * Author: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Ported from Linux include/linux/fwnode.h
+ * => commit ce793486e23e0162a732c605189c8028e0910e86
+ *
+ * No functional Xen modifications.
+ */
+
+#ifndef __XEN_FWNODE_H_
+#define __XEN_FWNODE_H_
+
+enum fwnode_type {
+ FWNODE_INVALID = 0,
+ FWNODE_OF,
+ FWNODE_ACPI,
+ FWNODE_ACPI_DATA,
+ FWNODE_ACPI_STATIC,
+ FWNODE_PDATA,
+ FWNODE_IRQCHIP
+};
+
+struct fwnode_handle {
+ enum fwnode_type type;
+ struct fwnode_handle *secondary;
+};
+
+#endif
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|