summaryrefslogtreecommitdiff
path: root/xen/include/asm-arm/device.h
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2014-05-13 16:50:27 +0100
committerIan Campbell <ian.campbell@citrix.com>2014-05-14 14:45:42 +0100
commit6d49536d844a2685a50281c5385a093a61911987 (patch)
treeb8d10251b19d9af02cc8d36548849b2d5a4acfcb /xen/include/asm-arm/device.h
parent7d0f4a2cad3faa6dbecca87b1b11cf19ce06cd97 (diff)
xen/arm: Don't give IOMMU devices to dom0 when iommu is disabled
When iommu={disable,off,no,false} is given to Xen command line, the IOMMU framework won't specify that the device shouldn't be passthrough to DOM0. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/include/asm-arm/device.h')
-rw-r--r--xen/include/asm-arm/device.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h
index ed043441ca..60109cc95b 100644
--- a/xen/include/asm-arm/device.h
+++ b/xen/include/asm-arm/device.h
@@ -8,6 +8,8 @@ enum device_type
{
DEVICE_SERIAL,
DEVICE_IOMMU,
+ /* Use for error */
+ DEVICE_UNKNOWN,
};
struct device_desc {
@@ -32,6 +34,14 @@ struct device_desc {
int __init device_init(struct dt_device_node *dev, enum device_type type,
const void *data);
+/**
+ * device_get_type - Get the type of the device
+ * @dev: device to match
+ *
+ * Return the device type on success or DEVICE_ANY on failure
+ */
+enum device_type device_get_type(const struct dt_device_node *dev);
+
#define DT_DEVICE_START(_name, _namestr, _type) \
static const struct device_desc __dev_desc_##_name __used \
__attribute__((__section__(".dev.info"))) = { \