From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/5] ARM: at91: fix irq_pm_install_action WARNING
Date: Tue, 16 Dec 2014 15:20:41 +0100 [thread overview]
Message-ID: <20141216152041.56ff9b2e@bbrezillon> (raw)
In-Reply-To: <alpine.DEB.2.11.1412161349420.17382@nanos>
On Tue, 16 Dec 2014 13:56:26 +0100 (CET)
Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 16 Dec 2014, Boris Brezillon wrote:
> > Thomas Gleixner <tglx@linutronix.de> wrote:
> > > Install the timer interrupt as a demultiplexing interrupt.
> >
> > I can try to hack the AIC irqchip driver to implement this demux logic,
> > but this logic can't be placed in the PIT (Periodic Interval Timer)
> > driver itself, because the shared IRQ line is used by the at91 clock
> > controller (PMC) which is providing the clock to the PIT device.
> > This gives the following dependency graph:
> >
> > PIT =depends-on=> Master Clock =provided-by=> PMC =needs=> PMC IRQ.
>
> It never can be a part of a device driver. This is a property of the
> interrupt controller which fails to provide a proper demux for this
> irq line in the first place.
>
> So you fake the demux in the irq chip driver, where you provide the
> pseudo chip and the demux logic. None of the device drivers (PIT, PMC,
> UART ...) even knows about that.
>
> |--------| |--------|
> | AIC |-------------| Pseudo |---- PIT
> | | | chip |---- PMC
> | | | |---- UART
> | | |--------|
> | |--- devX
> | |--- devY
> | |--- devZ
> |--------|
>
> So PIT, PMC and UART get interrupt numbers handed out which are
> outside of the interrupt space of AIC.
Okay, that's what I had in mind, thanks for clarifying this aspect.
Regarding the DT representation, it should look like this, right ?
aic: interrupt-controller at fffff000 {
#interrupt-cells = <3>;
compatible = "atmel,at91rm9200-aic";
interrupt-controller;
reg = <0xfffff000 0x200>;
atmel,external-irqs = <29 30 31>;
irq1_demux: irq1-demux {
#interrupt-cells = <1>;
interrupt-controller;
}
};
pit: timer at fffffd30 {
compatible = "atmel,at91sam9260-pit";
reg = <0xfffffd30 0xf>;
/* 0 is the id reserved for the PIT */
interrupts-extended = <&irq1_demux 0>;
clocks = <&mck>;
};
pmc: pmc at fffffc00 {
compatible = "atmel,at91sam9260-pmc";
reg = <0xfffffc00 0x100>;
/* 1 is the id reserved for the PMC */
interrupts-extended = <&irq1_demux 1>;
[...]
};
Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-12-16 14:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 16:15 [PATCH 0/5] ARM: at91: fix irq_pm_install_action WARNING Boris Brezillon
2014-12-15 16:15 ` [PATCH 1/5] genirq: Support mixing IRQF_NO_SUSPEND/IRQF_SUSPEND on shared irqs Boris Brezillon
2014-12-15 21:45 ` Rafael J. Wysocki
2014-12-15 16:15 ` [PATCH 2/5] clk: at91: implement suspend/resume for the PMC irqchip Boris Brezillon
2014-12-15 16:15 ` [PATCH 3/5] watchdog: at91sam9: request the irq with IRQF_NO_SUSPEND Boris Brezillon
2014-12-15 16:15 ` [PATCH 4/5] rtc: at91: request IRQs with IRQF_SUSPEND_NOACTION Boris Brezillon
2014-12-15 16:15 ` [PATCH 5/5] tty: serial: atmel: request IRQ " Boris Brezillon
2014-12-15 22:20 ` [PATCH 0/5] ARM: at91: fix irq_pm_install_action WARNING Rafael J. Wysocki
2014-12-15 22:48 ` Rafael J. Wysocki
2014-12-16 9:07 ` Boris Brezillon
2014-12-16 10:03 ` Thomas Gleixner
2014-12-16 11:25 ` Boris Brezillon
2014-12-16 12:56 ` Thomas Gleixner
2014-12-16 14:20 ` Boris Brezillon [this message]
2014-12-16 14:52 ` Thomas Gleixner
2014-12-16 18:26 ` Boris Brezillon
2014-12-16 20:37 ` Thomas Gleixner
2015-01-08 13:52 ` [RFC PATCH] irqchip: add dumb demultiplexer implementation Boris Brezillon
2015-01-13 10:38 ` Thomas Gleixner
2015-01-13 10:58 ` Boris Brezillon
2015-01-13 12:41 ` Thomas Gleixner
2015-01-13 17:00 ` Boris Brezillon
2015-01-13 17:31 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141216152041.56ff9b2e@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).