linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Rob Herring <robh+dt@kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: Kevin Hilman <khilman@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	<linux-tegra@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 14/14] irqchip/gic: Add support for tegra AGIC interrupt controller
Date: Fri, 22 Apr 2016 11:21:35 +0100	[thread overview]
Message-ID: <5719FB2F.10708@nvidia.com> (raw)
In-Reply-To: <5719F5A1.6060301@arm.com>


On 22/04/16 10:57, Marc Zyngier wrote:
> On 20/04/16 12:03, Jon Hunter wrote:
>> Add a driver for the Tegra-AGIC interrupt controller which is compatible
>> with the ARM GIC-400 interrupt controller.
>>
>> The Tegra AGIC (Audio GIC) is part of the Audio Processing Engine (APE) on
>> Tegra210 and can route interrupts to either the GIC for the CPU subsystem
>> or the Audio DSP (ADSP) within the APE. The AGIC uses CPU interface 0 to
>> route interrupts to the CPU GIC and CPU interface 1 to route interrupts to
>> the ADSP.
>>
>> The APE is located within its own power domain on the chip and so the
>> AGIC needs to manage both the power domain and its clocks. Commit
>> afbbd2338176 ("irqchip/gic: Document optional Clock and Power Domain
>> properties") has already added clock and power-domain properties to the
>> GIC binding and so we can make use of these for the AGIC.
>>
>> With the AGIC being located in a different power domain to the main CPU
>> cluster this means that:
>> 1. The interrupt controller cannot be registered via IRQCHIP_DECLARE()
>>    because it needs to be registered as a platform device so that the
>>    generic PM domain core will ensure that the power domain is available
>>    before probing.
>> 2. The interrupt controller cannot be suspended/restored based upon
>>    changes in the CPU power state and needs to use runtime-pm instead.
>>
>> The GIC platform driver has been implemented by making the following
>> changes to the core GIC driver:
>> 1. Remove the dependency on CONFIG_CPU_PM from PM specific variables and
>>    functions so that they can be used by the platform driver even when
>>    CONFIG_CPU_PM is not selected.
>> 2. Move the code that maps the GIC registers and parses the device-tree
>>    blob into a new function called gic_of_setup() that can be used by
>>    both the platform driver as well as the existing driver.
>> 3. Add and register platform driver for the GIC. The platform driver
>>    uses the PM_CLK framework for managing the clocks used by the GIC
>>    and so select CONFIG_PM_CLK.
>>
>> Finally, a couple other notes on the implementation are:
>> 1. Currently the GIC platform driver only supports non-root GICs and
>>    assumes that the GIC has a parent interrupt. It is assumed that
>>    root interrupt controllers need to be initialised early.
>> 2. There is no specific suspend handling for GICs registered as platform
>>    devices. Non-wakeup interrupts will be disabled by the kernel during
>>    late suspend, however, this alone will not power down the GIC if
>>    interrupts have been requested and not freed. Therefore, requestors
>>    of non-wakeup interrupts will need to free them on entering suspend
>>    in order to power-down the GIC.
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>>
>> Please note that so far I have not added all the clock names for the
>> various GIC versions (as described by the DT documentation). I thought
>> we could add these as they are needed.
> 
> So while the code looks OK, I'd like to stop adding more code to this
> poor GIC driver, because it is starting to look like a huge mess.

Agree.

> What is preventing us to move this to a separate irq-gic-pm.c file?

Absolutely nothing. Once we sort out the clocking, I will do that.

Cheers
Jon

      reply	other threads:[~2016-04-22 10:21 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 11:03 [PATCH V2 00/14] Add support for Tegra210 AGIC Jon Hunter
2016-04-20 11:03 ` [PATCH V2 01/14] irqchip/gic: Don't unnecessarily write the IRQ configuration Jon Hunter
2016-04-20 11:03 ` [PATCH V2 02/14] irqchip/gic: WARN if setting the interrupt type for a PPI fails Jon Hunter
2016-04-22  8:49   ` Marc Zyngier
2016-04-20 11:03 ` [PATCH V2 03/14] irqchip: Mask the non-type/sense bits when translating an IRQ Jon Hunter
2016-04-22  8:41   ` Marc Zyngier
2016-04-20 11:03 ` [PATCH V2 04/14] irqdomain: Fix handling of type settings for existing mappings Jon Hunter
2016-04-21 11:31   ` Jon Hunter
2016-04-22  8:11   ` Marc Zyngier
2016-04-20 11:03 ` [PATCH V2 05/14] genirq: Look-up trigger type if not specified by caller Jon Hunter
2016-04-20 11:03 ` [PATCH V2 06/14] irqdomain: Don't set type when mapping an IRQ Jon Hunter
2016-04-21 15:45   ` Jon Hunter
2016-04-22  8:22     ` Marc Zyngier
2016-04-22  8:48       ` Jon Hunter
2016-04-22  9:34         ` Marc Zyngier
2016-04-20 11:03 ` [PATCH V2 07/14] genirq: Add runtime power management support for IRQ chips Jon Hunter
2016-04-20 17:11   ` Kevin Hilman
2016-04-21  9:19     ` Jon Hunter
2016-04-20 11:03 ` [PATCH V2 08/14] irqchip/gic: Don't initialise chip if mapping IO space fails Jon Hunter
2016-04-20 11:03 ` [PATCH V2 09/14] irqchip/gic: Remove static irq_chip definition for eoimode1 Jon Hunter
2016-04-20 11:03 ` [PATCH V2 10/14] irqchip/gic: Return an error if GIC initialisation fails Jon Hunter
2016-04-20 11:03 ` [PATCH V2 11/14] irqchip/gic: Pass GIC pointer to save/restore functions Jon Hunter
2016-04-20 11:03 ` [PATCH V2 12/14] irqchip/gic: Prepare for adding platform driver Jon Hunter
2016-04-20 11:03 ` [PATCH V2 13/14] dt-bindings: arm-gic: Add documentation for Tegra210 AGIC Jon Hunter
2016-04-22  9:48   ` Marc Zyngier
2016-04-22 10:00   ` Mark Rutland
2016-04-22 11:12     ` Jon Hunter
2016-04-22 11:22       ` Mark Rutland
2016-04-22 14:57         ` Jon Hunter
2016-04-27 15:34         ` Jon Hunter
2016-04-27 17:38           ` Mark Rutland
2016-04-27 18:02             ` Geert Uytterhoeven
2016-04-28  8:11             ` Jon Hunter
2016-04-28  8:31               ` Geert Uytterhoeven
2016-04-28  9:55               ` Mark Rutland
2016-05-06  8:32                 ` Jon Hunter
2016-05-07 14:10                   ` Geert Uytterhoeven
2016-05-08 12:25                     ` Jon Hunter
2016-05-09  9:32                       ` Marc Zyngier
2016-05-11 15:51                     ` Rob Herring
2016-05-11 16:08                       ` Jon Hunter
2016-05-11 16:10                         ` Jon Hunter
2016-05-11 16:16                         ` Jon Hunter
2016-05-11 16:30                           ` Rob Herring
2016-05-11 16:53                             ` Jon Hunter
2016-05-11 17:28                               ` Mark Rutland
2016-05-11 19:49                                 ` Jon Hunter
2016-04-20 11:03 ` [PATCH V2 14/14] irqchip/gic: Add support for tegra AGIC interrupt controller Jon Hunter
2016-04-22  9:57   ` Marc Zyngier
2016-04-22 10:21     ` Jon Hunter [this message]

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=5719FB2F.10708@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=geert@linux-m68k.org \
    --cc=grygorii.strashko@ti.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jason@lakedaemon.net \
    --cc=khilman@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    /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).