* [PATCH 1/2] ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT
@ 2013-10-02 6:19 Kuninori Morimoto
2013-10-02 8:05 ` Simon Horman
2013-10-02 8:07 ` Kuninori Morimoto
0 siblings, 2 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2013-10-02 6:19 UTC (permalink / raw)
To: linux-sh
r8a7779 INTC needs IRL pin mode settings to determine
behavior of IRQ0 - IRQ3, and r8a7779_init_irq_extpin()
is controlling it via irlm parameter.
But this function registers renesas_intc_irqpin driver
if irlm was set, and this value depends on platform.
This is not good for DT.
This patch splits r8a7779_init_irq_extpin() function
into "mode settings" and "funtion register" parts,
and add status = "disabled" on r8a7779.dtsi as default
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/boot/dts/r8a7779.dtsi | 1 +
arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 +
arch/arm/mach-shmobile/setup-r8a7779.c | 6 +++++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index 912b3a0..19faeac 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -135,6 +135,7 @@
irqpin0: irqpin@fe780010 {
compatible = "renesas,intc-irqpin";
#interrupt-cells = <2>;
+ status = "disabled";
interrupt-controller;
reg = <0xfe78001c 4>,
<0xfe780010 4>,
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
index 31e87b9..17af34e 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
@@ -33,6 +33,7 @@ static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d)
extern void r8a7779_init_delay(void);
extern void r8a7779_init_irq_extpin(int irlm);
+extern void r8a7779_init_irq_extpin_dt(int irlm);
extern void r8a7779_init_irq_dt(void);
extern void r8a7779_map_io(void);
extern void r8a7779_earlytimer_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index eacb2f7..13049e9 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -98,7 +98,7 @@ static struct resource irqpin0_resources[] __initdata = {
DEFINE_RES_IRQ(gic_spi(30)), /* IRQ3 */
};
-void __init r8a7779_init_irq_extpin(int irlm)
+void __init r8a7779_init_irq_extpin_dt(int irlm)
{
void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
u32 tmp;
@@ -116,7 +116,11 @@ void __init r8a7779_init_irq_extpin(int irlm)
tmp |= (1 << 21); /* LVLMODE = 1 */
iowrite32(tmp, icr0);
iounmap(icr0);
+}
+void __init r8a7779_init_irq_extpin(int irlm)
+{
+ r8a7779_init_irq_extpin_dt(irlm);
if (irlm)
platform_device_register_resndata(
&platform_bus, "renesas_intc_irqpin", -1,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT
2013-10-02 6:19 [PATCH 1/2] ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT Kuninori Morimoto
@ 2013-10-02 8:05 ` Simon Horman
2013-10-02 8:07 ` Kuninori Morimoto
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2013-10-02 8:05 UTC (permalink / raw)
To: linux-sh
On Tue, Oct 01, 2013 at 11:19:35PM -0700, Kuninori Morimoto wrote:
> r8a7779 INTC needs IRL pin mode settings to determine
> behavior of IRQ0 - IRQ3, and r8a7779_init_irq_extpin()
> is controlling it via irlm parameter.
> But this function registers renesas_intc_irqpin driver
> if irlm was set, and this value depends on platform.
> This is not good for DT.
> This patch splits r8a7779_init_irq_extpin() function
> into "mode settings" and "funtion register" parts,
> and add status = "disabled" on r8a7779.dtsi as default
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/boot/dts/r8a7779.dtsi | 1 +
> arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 +
> arch/arm/mach-shmobile/setup-r8a7779.c | 6 +++++-
> 3 files changed, 7 insertions(+), 1 deletion(-)
Please split this into two patches.
1. A DT patch that modifies r8a7779.dtsi
2. An SoC patch that modifies r8a7779.h and setup-r8a7779.c
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT
2013-10-02 6:19 [PATCH 1/2] ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT Kuninori Morimoto
2013-10-02 8:05 ` Simon Horman
@ 2013-10-02 8:07 ` Kuninori Morimoto
1 sibling, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2013-10-02 8:07 UTC (permalink / raw)
To: linux-sh
Hi Simon
> > r8a7779 INTC needs IRL pin mode settings to determine
> > behavior of IRQ0 - IRQ3, and r8a7779_init_irq_extpin()
> > is controlling it via irlm parameter.
> > But this function registers renesas_intc_irqpin driver
> > if irlm was set, and this value depends on platform.
> > This is not good for DT.
> > This patch splits r8a7779_init_irq_extpin() function
> > into "mode settings" and "funtion register" parts,
> > and add status = "disabled" on r8a7779.dtsi as default
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> > arch/arm/boot/dts/r8a7779.dtsi | 1 +
> > arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 +
> > arch/arm/mach-shmobile/setup-r8a7779.c | 6 +++++-
> > 3 files changed, 7 insertions(+), 1 deletion(-)
>
> Please split this into two patches.
>
> 1. A DT patch that modifies r8a7779.dtsi
> 2. An SoC patch that modifies r8a7779.h and setup-r8a7779.c
OK, will do
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-02 8:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 6:19 [PATCH 1/2] ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT Kuninori Morimoto
2013-10-02 8:05 ` Simon Horman
2013-10-02 8:07 ` Kuninori Morimoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox