2013-09-23 10:13:58

by Mateusz Krawczuk

[permalink] [raw]
Subject: [PATCH] DT: S5P: If detected device tree skip irq init

It prevents from executing code already called by device tree.

Signed-off-by: Mateusz Krawczuk <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
---
arch/arm/plat-samsung/s5p-irq-eint.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/plat-samsung/s5p-irq-eint.c b/arch/arm/plat-samsung/s5p-irq-eint.c
index faa6516..ebee4dc 100644
--- a/arch/arm/plat-samsung/s5p-irq-eint.c
+++ b/arch/arm/plat-samsung/s5p-irq-eint.c
@@ -16,6 +16,7 @@
#include <linux/device.h>
#include <linux/gpio.h>
#include <linux/irqchip/arm-vic.h>
+#include <linux/of.h>

#include <plat/regs-irqtype.h>

@@ -202,6 +203,9 @@ static int __init s5p_init_irq_eint(void)
{
int irq;

+ if (of_have_populated_dt())
+ return -ENODEV;
+
for (irq = IRQ_EINT(0); irq <= IRQ_EINT(15); irq++)
irq_set_chip(irq, &s5p_irq_vic_eint);

--
1.8.1.2


2013-09-23 12:32:54

by Tomasz Figa

[permalink] [raw]
Subject: Re: [PATCH] DT: S5P: If detected device tree skip irq init

On Monday 23 of September 2013 12:13:42 Mateusz Krawczuk wrote:
> It prevents from executing code already called by device tree.

I'd say that it prevents from executing code handling things that, when
booting with device tree, are already handled by other code, namely the
pinctrl-exynos driver.

>
> Signed-off-by: Mateusz Krawczuk <[email protected]>
> Signed-off-by: Kyungmin Park <[email protected]>
> ---
> arch/arm/plat-samsung/s5p-irq-eint.c | 4 ++++
> 1 file changed, 4 insertions(+)

Otherwise, after fixing commit message:

Acked-by: Tomasz Figa <[email protected]>

Best regards,
Tomasz