Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300484
| From | Milo Kim <milo.kim@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/19] irqchip: atmel-aic: clean up RTT interrupt code |
| Date | 2016-01-04 05:40 +0100 |
| Message-ID | <qN563-6Ig-27@gated-at.bofh.it> (permalink) |
| References | <qN4Wl-6EU-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Atmel AIC disables RTT(Real Time Timer) interrupt on initialization.
Alarm interrupt(ALMIEN) and RTT increment interrupt(RTTINCIEN) are used.
However, the controller doesn't need to do it.
* RTT driver disables interrupts on _probe().
ALMIEN and RTTINCIEN bits in RTT_MR are cleared to disable RTT
interrupts.
(drivers/rtc/rtc-at91sam9.c)
/* disable all interrupts (same as on shutdown path) */
mr &= ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN);
rtt_writel(rtc, MR, mr);
* All RTT interrupts are disabled by default.
Reset value of ALMIEN and RTTINCIEN bits are 0.
Please note that all devices have same RTT registers.
AT91RM9G45
AT91SAM9RL
AT91SAM9260
AT91SAM9261
AT91SAM9263
AT91SAM9G20
So, aic_common_rtt_irq_fixup() helper can be removed.
And aic_common_irq_fixup() also can be removed because no driver
calls it any more.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Boris BREZILLON <boris.brezillon@free-electrons.com>
Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Milo Kim <milo.kim@ti.com>
---
drivers/irqchip/irq-atmel-aic-common.c | 45 ----------------------------------
drivers/irqchip/irq-atmel-aic-common.h | 4 ---
drivers/irqchip/irq-atmel-aic.c | 22 -----------------
3 files changed, 71 deletions(-)
diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
index f8261be..ef2c619 100644
--- a/drivers/irqchip/irq-atmel-aic-common.c
+++ b/drivers/irqchip/irq-atmel-aic-common.c
@@ -139,51 +139,6 @@ static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
}
}
-#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("/");
- const struct of_device_id *match;
-
- if (!root)
- return;
-
- match = of_match_node(matches, root);
- of_node_put(root);
-
- if (match) {
- void (*fixup)(struct device_node *) = match->data;
- fixup(root);
- }
-
- of_node_put(root);
-}
-
struct irq_domain *__init aic_common_of_init(struct device_node *node,
const struct irq_domain_ops *ops,
const char *name, int nirqs)
diff --git a/drivers/irqchip/irq-atmel-aic-common.h b/drivers/irqchip/irq-atmel-aic-common.h
index 9027f15..c178557 100644
--- a/drivers/irqchip/irq-atmel-aic-common.h
+++ b/drivers/irqchip/irq-atmel-aic-common.h
@@ -32,8 +32,4 @@ struct irq_domain *__init aic_common_of_init(struct device_node *node,
const struct irq_domain_ops *ops,
const char *name, int nirqs);
-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 */
diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index 4c60224..6fcd680 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -209,26 +209,6 @@ static const struct irq_domain_ops aic_irq_ops = {
.xlate = aic_irq_domain_xlate,
};
-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_rtt_irq_fixup(root);
-}
-
-static const struct of_device_id aic_irq_fixups[] __initconst = {
- { .compatible = "atmel,at91sam9g45", .data = at91sam9g45_aic_irq_fixup },
- { .compatible = "atmel,at91sam9rl", .data = at91sam9g45_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 */ },
-};
-
static int __init aic_of_init(struct device_node *node,
struct device_node *parent)
{
@@ -243,8 +223,6 @@ static int __init aic_of_init(struct device_node *node,
if (IS_ERR(domain))
return PTR_ERR(domain);
- aic_common_irq_fixup(aic_irq_fixups);
-
aic_domain = domain;
gc = irq_get_domain_generic_chip(domain, 0);
--
2.6.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
[PATCH 07/19] irqchip: atmel-aic: make common IRQ domain translate function Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
[PATCH 09/19] irqchip: atmel-aic: add common retrigger function Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
[PATCH 13/19] irqchip: atmel-aic: clean up irq_chip_generic Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
[PATCH 01/19] irqchip: atmel-aic: fix wrong bit operation for IRQ priority Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
Re: [PATCH 01/19] irqchip: atmel-aic: fix wrong bit operation for IRQ priority Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 09:20 +0100
[PATCH 17/19] irqchip: atmel-aic: use unified IRQ chip initialization function Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
[PATCH 06/19] irqchip: atmel-aic: introduce register data structure Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
Re: [PATCH 06/19] irqchip: atmel-aic: introduce register data structure Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 10:00 +0100
Re: [PATCH 06/19] irqchip: atmel-aic: introduce register data structure Milo Kim <milo.kim@ti.com> - 2016-01-06 09:40 +0100
[PATCH 04/19] irqchip: atmel-aic: replace magic numbers with named constant Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
Re: [PATCH 04/19] irqchip: atmel-aic: replace magic numbers with named constant Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 09:30 +0100
[PATCH 19/19] irqchip: atmel-aic: rename AIC driver and fix Kconfig Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
[PATCH 11/19] irqchip: atmel-aic: add common PM IRQ chip operation Milo Kim <milo.kim@ti.com> - 2016-01-04 05:30 +0100
[PATCH 12/19] irqchip: atmel-aic: use EOI register data in aic_reg_data Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
[PATCH 14/19] irqchip: atmel-aic: add common HW init function Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
[PATCH 10/19] irqchip: atmel-aic: add common set_type function Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
[PATCH 08/19] irqchip: atmel-aic: add common mask and unmask functions Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
Re: [PATCH 08/19] irqchip: atmel-aic: add common mask and unmask functions Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 09:50 +0100
[PATCH 02/19] irqchip: atmel-aic: clean up RTC interrupt code Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
Re: [PATCH 02/19] irqchip: atmel-aic: clean up RTC interrupt code Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 09:20 +0100
[PATCH 05/19] irqchip: atmel-aic: use simple constant to get number of interrupts per chip Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
Re: [PATCH 05/19] irqchip: atmel-aic: use simple constant to get number of interrupts per chip Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 09:40 +0100
[PATCH 03/19] irqchip: atmel-aic: clean up RTT interrupt code Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
Re: [PATCH 03/19] irqchip: atmel-aic: clean up RTT interrupt code Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 09:20 +0100
[PATCH 15/19] irqchip: atmel-aic: add common interrupt handler Milo Kim <milo.kim@ti.com> - 2016-01-04 05:40 +0100
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-04 10:10 +0100
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-01-04 10:40 +0100
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Milo Kim <milo.kim@ti.com> - 2016-01-06 09:00 +0100
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Milo Kim <milo.kim@ti.com> - 2016-01-06 08:50 +0100
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-01-06 10:10 +0100
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Jason Cooper <jason@lakedaemon.net> - 2016-01-06 15:50 +0100
Re: [PATCH 00/19] irqchip: atmel-aic: make unified AIC driver Milo Kim <milo.kim@ti.com> - 2016-01-07 08:50 +0100
csiph-web