* [PATCH 1/5] irqchip: atmel-aic: add irq fixup for RTT block
2014-09-03 9:07 [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Boris BREZILLON
@ 2014-09-03 9:07 ` Boris BREZILLON
2014-09-03 9:07 ` [PATCH 2/5] irqchip: atmel-aic: add irq fixups for at91sam926x SoCs Boris BREZILLON
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Boris BREZILLON @ 2014-09-03 9:07 UTC (permalink / raw)
To: linux-arm-kernel
Add a new fixup function for the RTT (Real Time Timer) block.
This fixup function was previously implemented in
arch/arm/mach-at91/sysirq_mask.c, but is now moved to the AIC driver so
that we can remove SoC specific hooks in arch/arm/mach-at91/ when booting
a DT kernel.
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
---
drivers/irqchip/irq-atmel-aic-common.c | 26 ++++++++++++++++++++++++++
drivers/irqchip/irq-atmel-aic-common.h | 2 ++
2 files changed, 28 insertions(+)
diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
index 6ae3cdee..656cfe3 100644
--- a/drivers/irqchip/irq-atmel-aic-common.c
+++ b/drivers/irqchip/irq-atmel-aic-common.c
@@ -167,6 +167,32 @@ void __init aic_common_rtc_irq_fixup(struct device_node *root)
iounmap(regs);
}
+#define AT91_RTT_MR 0x00 /* Real-time Mode Register */
+#define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */
+#define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */
+
+void __init aic_common_rtt_irq_fixup(struct device_node *root)
+{
+ struct device_node *np;
+ void __iomem *regs;
+
+ /*
+ * The at91sam9263 SoC has 2 instances of the RTT block, hence we
+ * iterate over the DT to find each occurrence.
+ */
+ for_each_compatible_node(np, NULL, "atmel,at91sam9260-rtt") {
+ regs = of_iomap(np, 0);
+ if (!regs)
+ continue;
+
+ writel(readl(regs + AT91_RTT_MR) &
+ ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN),
+ regs + AT91_RTT_MR);
+
+ iounmap(regs);
+ }
+}
+
void __init aic_common_irq_fixup(const struct of_device_id *matches)
{
struct device_node *root = of_find_node_by_path("/");
diff --git a/drivers/irqchip/irq-atmel-aic-common.h b/drivers/irqchip/irq-atmel-aic-common.h
index 90aa00e..603f0a9 100644
--- a/drivers/irqchip/irq-atmel-aic-common.h
+++ b/drivers/irqchip/irq-atmel-aic-common.h
@@ -34,6 +34,8 @@ struct irq_domain *__init aic_common_of_init(struct device_node *node,
void __init aic_common_rtc_irq_fixup(struct device_node *root);
+void __init aic_common_rtt_irq_fixup(struct device_node *root);
+
void __init aic_common_irq_fixup(const struct of_device_id *matches);
#endif /* __IRQ_ATMEL_AIC_COMMON_H */
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/5] irqchip: atmel-aic: add irq fixups for at91sam926x SoCs
2014-09-03 9:07 [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Boris BREZILLON
2014-09-03 9:07 ` [PATCH 1/5] irqchip: atmel-aic: add irq fixup for RTT block Boris BREZILLON
@ 2014-09-03 9:07 ` Boris BREZILLON
2014-09-03 9:07 ` [PATCH 3/5] irqchip: atmel-aic: add specific irq fixup function for sam9g45 and sam9rl Boris BREZILLON
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Boris BREZILLON @ 2014-09-03 9:07 UTC (permalink / raw)
To: linux-arm-kernel
The at91sam9260, at91sam9261, at91sam9263 and at91sam9g20 embed an RTT
(Real Time Timer) block and thus need to call the aic_common_rtt_irq_fixup
function.
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
---
drivers/irqchip/irq-atmel-aic.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index a82869e..c21c3d2 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -216,11 +216,20 @@ static void __init at91sam9_aic_irq_fixup(struct device_node *root)
aic_common_rtc_irq_fixup(root);
}
+static void __init at91sam9260_aic_irq_fixup(struct device_node *root)
+{
+ aic_common_rtt_irq_fixup(root);
+}
+
static const struct of_device_id __initdata aic_irq_fixups[] = {
{ .compatible = "atmel,at91sam9g45", .data = at91sam9_aic_irq_fixup },
{ .compatible = "atmel,at91sam9n12", .data = at91sam9_aic_irq_fixup },
{ .compatible = "atmel,at91sam9rl", .data = at91sam9_aic_irq_fixup },
{ .compatible = "atmel,at91sam9x5", .data = at91sam9_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9260", .data = at91sam9260_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9261", .data = at91sam9260_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9263", .data = at91sam9260_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9g20", .data = at91sam9260_aic_irq_fixup },
{ /* sentinel */ },
};
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/5] irqchip: atmel-aic: add specific irq fixup function for sam9g45 and sam9rl
2014-09-03 9:07 [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Boris BREZILLON
2014-09-03 9:07 ` [PATCH 1/5] irqchip: atmel-aic: add irq fixup for RTT block Boris BREZILLON
2014-09-03 9:07 ` [PATCH 2/5] irqchip: atmel-aic: add irq fixups for at91sam926x SoCs Boris BREZILLON
@ 2014-09-03 9:07 ` Boris BREZILLON
2014-09-03 9:07 ` [PATCH 4/5] irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming consistency Boris BREZILLON
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Boris BREZILLON @ 2014-09-03 9:07 UTC (permalink / raw)
To: linux-arm-kernel
The at91sam9g45 and at91sam9rl SoCs embed one RTT (Real Time Timer) and one
RTC block and thus need to call both rtt and rtc fixup functions.
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
---
drivers/irqchip/irq-atmel-aic.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index c21c3d2..8e3b585 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -221,10 +221,16 @@ static void __init at91sam9260_aic_irq_fixup(struct device_node *root)
aic_common_rtt_irq_fixup(root);
}
+static void __init at91sam9g45_aic_irq_fixup(struct device_node *root)
+{
+ aic_common_rtc_irq_fixup(root);
+ aic_common_rtt_irq_fixup(root);
+}
+
static const struct of_device_id __initdata aic_irq_fixups[] = {
- { .compatible = "atmel,at91sam9g45", .data = at91sam9_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9g45", .data = at91sam9g45_aic_irq_fixup },
{ .compatible = "atmel,at91sam9n12", .data = at91sam9_aic_irq_fixup },
- { .compatible = "atmel,at91sam9rl", .data = at91sam9_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9rl", .data = at91sam9g45_aic_irq_fixup },
{ .compatible = "atmel,at91sam9x5", .data = at91sam9_aic_irq_fixup },
{ .compatible = "atmel,at91sam9260", .data = at91sam9260_aic_irq_fixup },
{ .compatible = "atmel,at91sam9261", .data = at91sam9260_aic_irq_fixup },
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/5] irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming consistency
2014-09-03 9:07 [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Boris BREZILLON
` (2 preceding siblings ...)
2014-09-03 9:07 ` [PATCH 3/5] irqchip: atmel-aic: add specific irq fixup function for sam9g45 and sam9rl Boris BREZILLON
@ 2014-09-03 9:07 ` Boris BREZILLON
2014-09-03 9:07 ` [PATCH 5/5] irqchip: atmel-aic: add missing entry for rm9200 irq fixups Boris BREZILLON
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Boris BREZILLON @ 2014-09-03 9:07 UTC (permalink / raw)
To: linux-arm-kernel
Rename at91sam9_aic_irq_fixup into at91rm9200_aic_irq_fixup to be
consistent with other fixup functions.
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
---
drivers/irqchip/irq-atmel-aic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index 8e3b585..a755cfe 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -211,7 +211,7 @@ static const struct irq_domain_ops aic_irq_ops = {
.xlate = aic_irq_domain_xlate,
};
-static void __init at91sam9_aic_irq_fixup(struct device_node *root)
+static void __init at91rm9200_aic_irq_fixup(struct device_node *root)
{
aic_common_rtc_irq_fixup(root);
}
@@ -229,9 +229,9 @@ static void __init at91sam9g45_aic_irq_fixup(struct device_node *root)
static const struct of_device_id __initdata aic_irq_fixups[] = {
{ .compatible = "atmel,at91sam9g45", .data = at91sam9g45_aic_irq_fixup },
- { .compatible = "atmel,at91sam9n12", .data = at91sam9_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9n12", .data = at91rm9200_aic_irq_fixup },
{ .compatible = "atmel,at91sam9rl", .data = at91sam9g45_aic_irq_fixup },
- { .compatible = "atmel,at91sam9x5", .data = at91sam9_aic_irq_fixup },
+ { .compatible = "atmel,at91sam9x5", .data = at91rm9200_aic_irq_fixup },
{ .compatible = "atmel,at91sam9260", .data = at91sam9260_aic_irq_fixup },
{ .compatible = "atmel,at91sam9261", .data = at91sam9260_aic_irq_fixup },
{ .compatible = "atmel,at91sam9263", .data = at91sam9260_aic_irq_fixup },
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/5] irqchip: atmel-aic: add missing entry for rm9200 irq fixups
2014-09-03 9:07 [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Boris BREZILLON
` (3 preceding siblings ...)
2014-09-03 9:07 ` [PATCH 4/5] irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming consistency Boris BREZILLON
@ 2014-09-03 9:07 ` Boris BREZILLON
2014-09-09 9:24 ` [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Alexandre Belloni
2014-09-14 5:46 ` Jason Cooper
6 siblings, 0 replies; 12+ messages in thread
From: Boris BREZILLON @ 2014-09-03 9:07 UTC (permalink / raw)
To: linux-arm-kernel
The at91rm9200 have an RTT block and thus must at91rm9200_aic_irq_fixup
has to be called when intialazing the irqchip.
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
---
drivers/irqchip/irq-atmel-aic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index a755cfe..02ff229 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -228,6 +228,7 @@ static void __init at91sam9g45_aic_irq_fixup(struct device_node *root)
}
static const struct of_device_id __initdata aic_irq_fixups[] = {
+ { .compatible = "atmel,at91rm9200", .data = at91rm9200_aic_irq_fixup },
{ .compatible = "atmel,at91sam9g45", .data = at91sam9g45_aic_irq_fixup },
{ .compatible = "atmel,at91sam9n12", .data = at91rm9200_aic_irq_fixup },
{ .compatible = "atmel,at91sam9rl", .data = at91sam9g45_aic_irq_fixup },
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-09-03 9:07 [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Boris BREZILLON
` (4 preceding siblings ...)
2014-09-03 9:07 ` [PATCH 5/5] irqchip: atmel-aic: add missing entry for rm9200 irq fixups Boris BREZILLON
@ 2014-09-09 9:24 ` Alexandre Belloni
2014-09-14 5:46 ` Jason Cooper
6 siblings, 0 replies; 12+ messages in thread
From: Alexandre Belloni @ 2014-09-09 9:24 UTC (permalink / raw)
To: linux-arm-kernel
On 03/09/2014 at 11:07:46 +0200, Boris Brezillon wrote :
> Hello,
>
> This patch series add a new fixup function for the RTT (Real Time Timer)
> block and make use of it on SoCs integrating at least one RTT to prevent
> spurious interrupts on the first interrupt line.
>
> This fixup function was previously implemented in
> arch/arm/mach-at91/sysirq_mask.c, but is now moved to the AIC driver so
> that we can remove SoC specific hooks in arch/arm/mach-at91/ when booting
> a DT kernel.
>
> This series also reworks the naming convention of the SoC specific fixup
> functions and add an entry for the at91rm9200.
>
> The series depends on the acceptation of the RTT DT bindings proposed here
> [1].
>
Whole series is:
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-09-03 9:07 [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Boris BREZILLON
` (5 preceding siblings ...)
2014-09-09 9:24 ` [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup Alexandre Belloni
@ 2014-09-14 5:46 ` Jason Cooper
2014-09-15 19:49 ` Boris BREZILLON
6 siblings, 1 reply; 12+ messages in thread
From: Jason Cooper @ 2014-09-14 5:46 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 03, 2014 at 11:07:46AM +0200, Boris BREZILLON wrote:
> The series depends on the acceptation of the RTT DT bindings proposed here
> [1].
>
> Best Regards,
>
> Boris
>
> [1]https://lkml.org/lkml/2014/9/3/145
Hmm, the bindings, unfortunately, still seem to be in flux. Any update?
thx,
Jason.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-09-14 5:46 ` Jason Cooper
@ 2014-09-15 19:49 ` Boris BREZILLON
2014-09-15 19:53 ` Boris BREZILLON
0 siblings, 1 reply; 12+ messages in thread
From: Boris BREZILLON @ 2014-09-15 19:49 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Sun, 14 Sep 2014 01:46:48 -0400
Jason Cooper <jason@lakedaemon.net> wrote:
> On Wed, Sep 03, 2014 at 11:07:46AM +0200, Boris BREZILLON wrote:
> > The series depends on the acceptation of the RTT DT bindings proposed here
> > [1].
> >
> > Best Regards,
> >
> > Boris
> >
> > [1]https://lkml.org/lkml/2014/9/3/145
>
> Hmm, the bindings, unfortunately, still seem to be in flux. Any update?
Actually, all at91 developers seemed to agree on this binding [2], and
these changes do not impact the current series.
Anyway, I think it's safer to wait for an official approval before
taking this series into irqchip/next.
Best Regards,
Boris
[2]https://lkml.org/lkml/2014/9/11/513
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-09-15 19:49 ` Boris BREZILLON
@ 2014-09-15 19:53 ` Boris BREZILLON
2014-11-02 2:29 ` Jason Cooper
0 siblings, 1 reply; 12+ messages in thread
From: Boris BREZILLON @ 2014-09-15 19:53 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 15 Sep 2014 21:49:07 +0200
Boris BREZILLON <boris.brezillon@free-electrons.com> wrote:
> Hi,
>
> On Sun, 14 Sep 2014 01:46:48 -0400
> Jason Cooper <jason@lakedaemon.net> wrote:
>
> > On Wed, Sep 03, 2014 at 11:07:46AM +0200, Boris BREZILLON wrote:
> > > The series depends on the acceptation of the RTT DT bindings proposed here
> > > [1].
> > >
> > > Best Regards,
> > >
> > > Boris
> > >
> > > [1]https://lkml.org/lkml/2014/9/3/145
> >
> > Hmm, the bindings, unfortunately, still seem to be in flux. Any update?
>
> Actually, all at91 developers seemed to agree on this binding [2], and
> these changes do not impact the current series.
>
> Anyway, I think it's safer to wait for an official approval before
> taking this series into irqchip/next.
>
> Best Regards,
>
> Boris
>
> [2]https://lkml.org/lkml/2014/9/11/513
Sorry, wrong link.
[2]http://lists.infradead.org/pipermail/linux-arm-kernel/2014-September/286524.html
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-09-15 19:53 ` Boris BREZILLON
@ 2014-11-02 2:29 ` Jason Cooper
2014-11-08 9:37 ` Boris Brezillon
0 siblings, 1 reply; 12+ messages in thread
From: Jason Cooper @ 2014-11-02 2:29 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 15, 2014 at 09:53:56PM +0200, Boris BREZILLON wrote:
> On Mon, 15 Sep 2014 21:49:07 +0200
> Boris BREZILLON <boris.brezillon@free-electrons.com> wrote:
>
> > Hi,
> >
> > On Sun, 14 Sep 2014 01:46:48 -0400
> > Jason Cooper <jason@lakedaemon.net> wrote:
> >
> > > On Wed, Sep 03, 2014 at 11:07:46AM +0200, Boris BREZILLON wrote:
> > > > The series depends on the acceptation of the RTT DT bindings proposed here
> > > > [1].
> > > >
> > > > Best Regards,
> > > >
> > > > Boris
> > > >
> > > > [1]https://lkml.org/lkml/2014/9/3/145
> > >
> > > Hmm, the bindings, unfortunately, still seem to be in flux. Any update?
> >
> > Actually, all at91 developers seemed to agree on this binding [2], and
> > these changes do not impact the current series.
> >
> > Anyway, I think it's safer to wait for an official approval before
> > taking this series into irqchip/next.
Care to resend against v3.18-rc1?
thx,
Jason.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-11-02 2:29 ` Jason Cooper
@ 2014-11-08 9:37 ` Boris Brezillon
0 siblings, 0 replies; 12+ messages in thread
From: Boris Brezillon @ 2014-11-08 9:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi Jason,
On Sat, 1 Nov 2014 22:29:05 -0400
Jason Cooper <jason@lakedaemon.net> wrote:
> On Mon, Sep 15, 2014 at 09:53:56PM +0200, Boris BREZILLON wrote:
> > On Mon, 15 Sep 2014 21:49:07 +0200
> > Boris BREZILLON <boris.brezillon@free-electrons.com> wrote:
> >
> > > Hi,
> > >
> > > On Sun, 14 Sep 2014 01:46:48 -0400
> > > Jason Cooper <jason@lakedaemon.net> wrote:
> > >
> > > > On Wed, Sep 03, 2014 at 11:07:46AM +0200, Boris BREZILLON wrote:
> > > > > The series depends on the acceptation of the RTT DT bindings proposed here
> > > > > [1].
> > > > >
> > > > > Best Regards,
> > > > >
> > > > > Boris
> > > > >
> > > > > [1]https://lkml.org/lkml/2014/9/3/145
> > > >
> > > > Hmm, the bindings, unfortunately, still seem to be in flux. Any update?
> > >
> > > Actually, all at91 developers seemed to agree on this binding [2], and
> > > these changes do not impact the current series.
> > >
> > > Anyway, I think it's safer to wait for an official approval before
> > > taking this series into irqchip/next.
>
> Care to resend against v3.18-rc1?
Not sure if you noticed, but I have resent this series after rebasing it
on 3.18-rc3:
http://comments.gmane.org/gmane.linux.kernel/1819609
Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread