Browse Source

irqchip: exynos-combiner: remove hard-coded irq_base value

Replace irq_domain_add_simple with "irq_domain_add_linear" in order to use
linear irq domain, and to remove hardcoded irq_base_value.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Chander Kashyap 11 năm trước cách đây
mục cha
commit
9403ac8822
1 tập tin đã thay đổi với 3 bổ sung12 xóa
  1. 3 12
      drivers/irqchip/exynos-combiner.c

+ 3 - 12
drivers/irqchip/exynos-combiner.c

@@ -171,8 +171,7 @@ static struct irq_domain_ops combiner_irq_domain_ops = {
 
 
 static void __init combiner_init(void __iomem *combiner_base,
 static void __init combiner_init(void __iomem *combiner_base,
 				 struct device_node *np,
 				 struct device_node *np,
-				 unsigned int max_nr,
-				 int irq_base)
+				 unsigned int max_nr)
 {
 {
 	int i, irq;
 	int i, irq;
 	unsigned int nr_irq;
 	unsigned int nr_irq;
@@ -186,7 +185,7 @@ static void __init combiner_init(void __iomem *combiner_base,
 		return;
 		return;
 	}
 	}
 
 
-	combiner_irq_domain = irq_domain_add_simple(np, nr_irq, irq_base,
+	combiner_irq_domain = irq_domain_add_linear(np, nr_irq,
 				&combiner_irq_domain_ops, combiner_data);
 				&combiner_irq_domain_ops, combiner_data);
 	if (WARN_ON(!combiner_irq_domain)) {
 	if (WARN_ON(!combiner_irq_domain)) {
 		pr_warning("%s: irq domain init failed\n", __func__);
 		pr_warning("%s: irq domain init failed\n", __func__);
@@ -207,7 +206,6 @@ static int __init combiner_of_init(struct device_node *np,
 {
 {
 	void __iomem *combiner_base;
 	void __iomem *combiner_base;
 	unsigned int max_nr = 20;
 	unsigned int max_nr = 20;
-	int irq_base = -1;
 
 
 	combiner_base = of_iomap(np, 0);
 	combiner_base = of_iomap(np, 0);
 	if (!combiner_base) {
 	if (!combiner_base) {
@@ -221,14 +219,7 @@ static int __init combiner_of_init(struct device_node *np,
 			__func__, max_nr);
 			__func__, max_nr);
 	}
 	}
 
 
-	/* 
-	 * FIXME: This is a hardwired COMBINER_IRQ(0,0). Once all devices
-	 * get their IRQ from DT, remove this in order to get dynamic
-	 * allocation.
-	 */
-	irq_base = 160;
-
-	combiner_init(combiner_base, np, max_nr, irq_base);
+	combiner_init(combiner_base, np, max_nr);
 
 
 	return 0;
 	return 0;
 }
 }