* [PATCH v2 1/5] irqchip: atmel-aic: add irq fixup for RTT block
2014-11-03 8:30 [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Boris Brezillon
@ 2014-11-03 8:31 ` Boris Brezillon
2014-11-03 8:31 ` [PATCH v2 2/5] irqchip: atmel-aic: add irq fixups for at91sam926x SoCs Boris Brezillon
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Boris Brezillon @ 2014-11-03 8:31 UTC (permalink / raw)
To: linux-arm-kernel
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
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] 8+ messages in thread* [PATCH v2 2/5] irqchip: atmel-aic: add irq fixups for at91sam926x SoCs
2014-11-03 8:30 [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Boris Brezillon
2014-11-03 8:31 ` [PATCH v2 1/5] irqchip: atmel-aic: add irq fixup for RTT block Boris Brezillon
@ 2014-11-03 8:31 ` Boris Brezillon
2014-11-03 8:31 ` [PATCH v2 3/5] irqchip: atmel-aic: add specific irq fixup function for sam9g45 and sam9rl Boris Brezillon
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Boris Brezillon @ 2014-11-03 8:31 UTC (permalink / raw)
To: linux-arm-kernel
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
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 9a2cf3c..637d600 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -214,11 +214,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] 8+ messages in thread* [PATCH v2 3/5] irqchip: atmel-aic: add specific irq fixup function for sam9g45 and sam9rl
2014-11-03 8:30 [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Boris Brezillon
2014-11-03 8:31 ` [PATCH v2 1/5] irqchip: atmel-aic: add irq fixup for RTT block Boris Brezillon
2014-11-03 8:31 ` [PATCH v2 2/5] irqchip: atmel-aic: add irq fixups for at91sam926x SoCs Boris Brezillon
@ 2014-11-03 8:31 ` Boris Brezillon
2014-11-03 8:31 ` [PATCH v2 4/5] irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming consistency Boris Brezillon
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Boris Brezillon @ 2014-11-03 8:31 UTC (permalink / raw)
To: linux-arm-kernel
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
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 637d600..d7b0495 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -219,10 +219,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] 8+ messages in thread* [PATCH v2 4/5] irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming consistency
2014-11-03 8:30 [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Boris Brezillon
` (2 preceding siblings ...)
2014-11-03 8:31 ` [PATCH v2 3/5] irqchip: atmel-aic: add specific irq fixup function for sam9g45 and sam9rl Boris Brezillon
@ 2014-11-03 8:31 ` Boris Brezillon
2014-11-03 8:31 ` [PATCH v2 5/5] irqchip: atmel-aic: add missing entry for rm9200 irq fixups Boris Brezillon
2014-11-09 4:55 ` [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Jason Cooper
5 siblings, 0 replies; 8+ messages in thread
From: Boris Brezillon @ 2014-11-03 8:31 UTC (permalink / raw)
To: linux-arm-kernel
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
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 d7b0495..6f011b4 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -209,7 +209,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);
}
@@ -227,9 +227,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] 8+ messages in thread* [PATCH v2 5/5] irqchip: atmel-aic: add missing entry for rm9200 irq fixups
2014-11-03 8:30 [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Boris Brezillon
` (3 preceding siblings ...)
2014-11-03 8:31 ` [PATCH v2 4/5] irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming consistency Boris Brezillon
@ 2014-11-03 8:31 ` Boris Brezillon
2014-11-09 4:55 ` [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Jason Cooper
5 siblings, 0 replies; 8+ messages in thread
From: Boris Brezillon @ 2014-11-03 8:31 UTC (permalink / raw)
To: linux-arm-kernel
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
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 6f011b4..a6398a5 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -226,6 +226,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] 8+ messages in thread* [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-11-03 8:30 [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Boris Brezillon
` (4 preceding siblings ...)
2014-11-03 8:31 ` [PATCH v2 5/5] irqchip: atmel-aic: add missing entry for rm9200 irq fixups Boris Brezillon
@ 2014-11-09 4:55 ` Jason Cooper
2014-11-13 10:58 ` Nicolas Ferre
5 siblings, 1 reply; 8+ messages in thread
From: Jason Cooper @ 2014-11-09 4:55 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 03, 2014 at 09:30:59AM +0100, 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.
>
> Best Regards,
>
> Boris
>
> Changes since v1:
> - rebased on linux-3.18-rc2
>
> Boris BREZILLON (5):
> irqchip: atmel-aic: add irq fixup for RTT block
> irqchip: atmel-aic: add irq fixups for at91sam926x SoCs
> irqchip: atmel-aic: add specific irq fixup function for sam9g45 and
> sam9rl
> irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming
> consistency
> irqchip: atmel-aic: add missing entry for rm9200 irq fixups
>
> drivers/irqchip/irq-atmel-aic-common.c | 26 ++++++++++++++++++++++++++
> drivers/irqchip/irq-atmel-aic-common.h | 2 ++
> drivers/irqchip/irq-atmel-aic.c | 26 +++++++++++++++++++++-----
> 3 files changed, 49 insertions(+), 5 deletions(-)
Whole series applied to irqchip/atmel
thx,
Jason.
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup
2014-11-09 4:55 ` [PATCH v2 0/5] irqchip: atmel-aic: add RTT irq fixup Jason Cooper
@ 2014-11-13 10:58 ` Nicolas Ferre
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2014-11-13 10:58 UTC (permalink / raw)
To: linux-arm-kernel
On 09/11/2014 05:55, Jason Cooper :
> On Mon, Nov 03, 2014 at 09:30:59AM +0100, 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.
>>
>> Best Regards,
>>
>> Boris
>>
>> Changes since v1:
>> - rebased on linux-3.18-rc2
>>
>> Boris BREZILLON (5):
>> irqchip: atmel-aic: add irq fixup for RTT block
>> irqchip: atmel-aic: add irq fixups for at91sam926x SoCs
>> irqchip: atmel-aic: add specific irq fixup function for sam9g45 and
>> sam9rl
>> irqchip: atmel-aic: rename at91sam9_aic_irq_fixup for naming
>> consistency
>> irqchip: atmel-aic: add missing entry for rm9200 irq fixups
>>
>> drivers/irqchip/irq-atmel-aic-common.c | 26 ++++++++++++++++++++++++++
>> drivers/irqchip/irq-atmel-aic-common.h | 2 ++
>> drivers/irqchip/irq-atmel-aic.c | 26 +++++++++++++++++++++-----
>> 3 files changed, 49 insertions(+), 5 deletions(-)
>
> Whole series applied to irqchip/atmel
Too late but for the record:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
There are a little tiny details that I can solve later (function names,
order of SoCs, etc.).
Bye,
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 8+ messages in thread