From 0695c992dc6411e263c5c3d65fd9ef2c5f6418e1 Mon Sep 17 00:00:00 2001 From: Taekki Kim Date: Fri, 30 Sep 2016 18:13:26 +0900 Subject: [PATCH] dma: of: add multi irq get API for support IRQF_GIC_MULTI_TARGET. Change-Id: Ie58232a9fe0f1a5228fa8c7505fd30d856873caf Signed-off-by: Taekki Kim --- drivers/dma/of-dma.c | 13 +++++++++++++ include/linux/of_dma.h | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 0a459731632f..2a1ef19bef22 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c @@ -502,3 +502,16 @@ struct dma_chan *of_dma_xlate_by_chan_id(struct of_phandle_args *dma_spec, return dma_get_slave_channel(candidate); } EXPORT_SYMBOL_GPL(of_dma_xlate_by_chan_id); + +bool of_dma_multi_irq(struct device_node *np) +{ + bool ret = 0; + const __be32 *prop; + + prop = of_get_property(np, "#dma-multi-irq", NULL); + if (prop) + ret = be32_to_cpup(prop); + + return ret; +} +EXPORT_SYMBOL_GPL(of_dma_multi_irq); diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h index 05d3c6114806..b6a8e2231f48 100644 --- a/include/linux/of_dma.h +++ b/include/linux/of_dma.h @@ -61,6 +61,7 @@ extern void __iomem *of_dma_get_awwrapper_address(struct device_node *np, unsign extern void __iomem *of_dma_get_instwrapper_address(struct device_node *np); extern bool of_dma_get_wrapper_available(struct device_node *np); extern u64 of_dma_get_mask(struct device_node *np, char *name); +extern bool of_dma_multi_irq(struct device_node *np); #else static inline int of_dma_controller_register(struct device_node *np, struct dma_chan *(*of_dma_xlate) @@ -127,6 +128,11 @@ static u64 of_dma_get_mask(struct device_node *np, char *name) } #define of_dma_xlate_by_chan_id NULL +static inline bool of_dma_multi_irq(struct device_node *np) +{ + return NULL; +} + #endif #endif /* __LINUX_OF_DMA_H */ -- 2.20.1