dma: of: add multi irq get API for support IRQF_GIC_MULTI_TARGET.
authorTaekki Kim <taekki.kim@samsung.com>
Fri, 30 Sep 2016 09:13:26 +0000 (18:13 +0900)
committerTaekki Kim <taekki.kim@samsung.com>
Mon, 14 May 2018 05:42:48 +0000 (14:42 +0900)
Change-Id: Ie58232a9fe0f1a5228fa8c7505fd30d856873caf
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
drivers/dma/of-dma.c
include/linux/of_dma.h

index 0a459731632f9b2265f2a9705c5e58680e525963..2a1ef19bef22dc57211d91df995cb9573f4ff725 100644 (file)
@@ -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);
index 05d3c61148063c5de3e54d7a76282f87365a8d21..b6a8e2231f480a00c8d634171fdd997eb403997b 100644 (file)
@@ -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 */