All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Geert Uytterhoeven
	<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>,
	Grygorii Strashko
	<grygorii.strashko-l0cyMroinI0@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V2 13/14] dt-bindings: arm-gic: Add documentation for Tegra210 AGIC
Date: Thu, 28 Apr 2016 10:55:25 +0100	[thread overview]
Message-ID: <20160428095525.GB21145@leverpostej> (raw)
In-Reply-To: <5721C597.1010105-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Thu, Apr 28, 2016 at 09:11:03AM +0100, Jon Hunter wrote:
> 
> On 27/04/16 18:38, Mark Rutland wrote:
> > On Wed, Apr 27, 2016 at 04:34:53PM +0100, Jon Hunter wrote:
> >>
> >> On 22/04/16 12:22, Mark Rutland wrote:
> >>
> >> [snip]
> >>
> >>>>>> I am not sure if it will be popular to add Tegra specific clock names
> >>>>>> to the GIC DT docs. However, in that case, then possibly the only
> >>>>>> alternative is to move the Tegra AGIC driver into its own file and
> >>>>>> expose the GIC APIs for it to use. Then we could add our own DT doc
> >>>>>> for the Tegra AGIC as well (based upon the ARM GIC).
> >>>>>
> >>>>> The clock-names don't seem right to me, as they sound like provide names
> >>>>> or global clock line names rather than consumer-side names ("clk" and
> >>>>> "apb_pclk").
> >>>>
> >>>> Yes that would be fine with me.
> >>>
> >>> Ok; if we model the apb_pclk as owned by the AXI switch (which it is),
> >>> then there's no change for the GIC binding, short of the additional
> >>> compatible string as an extension of "arm,gic-400", as we already model
> >>> that clock in the GIC-400 binding.
> >>
> >> I have been re-working this based upon the feedback received. In the GIC
> >> driver we have the following definitions ...
> >>
> >>  IRQCHIP_DECLARE(gic_400, "arm,gic-400", gic_of_init);
> >>  IRQCHIP_DECLARE(arm11mp_gic, "arm,arm11mp-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(arm1176jzf_dc_gic, "arm,arm1176jzf-devchip-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(cortex_a15_gic, "arm,cortex-a15-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(cortex_a9_gic, "arm,cortex-a9-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(cortex_a7_gic, "arm,cortex-a7-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(msm_8660_qgic, "qcom,msm-8660-qgic", gic_of_init);
> >>  IRQCHIP_DECLARE(msm_qgic2, "qcom,msm-qgic2", gic_of_init);
> >>  IRQCHIP_DECLARE(pl390, "arm,pl390", gic_of_init);
> >>
> >>
> >> If I have something like the following in my dts ...
> >>
> >> 	agic: interrupt-controller@702f9000 {
> >> 		compatible = "nvidia,tegra210-agic", "arm,gic-400";
> >> 		...
> >> 	};
> >>
> >> The problem with this is that it tries to register the interrupt controller
> >> early during of_irq_init() before the platform driver has chance to
> >> initialise it.

[...]

> > We could instead explicitly match "nvidia,tegra210-agic", bailing out if
> > we see that. Otherwise, if we can't handle it like a GIC-400, then we
> > can just drop the GIC-400 compatible string from the fallback list.
> 
> Would it also be a none-starter to have "arm,gic-pm" instead of
> "nvidia,tegra210-agic"? At this point it is not really specific to tegra
> any more and so I was hoping to get rid of that. For example, ...
> 
> 	compatible = "arm,gic-pm", "arm,gic-400";

I'm not keen on the "*-pm" approach, as such compatible strings aren't
reall describing HW, but rather the SW policy to apply, and really would
only be there to bodge around a structural issue we have in Linux today
w.r.t. the device model split and probe ordering.

The "nvidia,tegra210-agic" string can be taken as describing any
Tegra-210 specific integration quirks, though I agree that's also not
fantastic for extending PM support beyond Tegra 210 and variants
thereof.

So maybe the best approach is bailing out in the presence of clocks
and/or power domains after all, on the assumption that nothing today has
those properties, though I fear we may have problems with that later
down the line if/when people describe those for the root GIC to describe
those must be hogged, even if not explicitly managed.

Thanks,
Mark.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@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>,
	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 13/14] dt-bindings: arm-gic: Add documentation for Tegra210 AGIC
Date: Thu, 28 Apr 2016 10:55:25 +0100	[thread overview]
Message-ID: <20160428095525.GB21145@leverpostej> (raw)
In-Reply-To: <5721C597.1010105@nvidia.com>

On Thu, Apr 28, 2016 at 09:11:03AM +0100, Jon Hunter wrote:
> 
> On 27/04/16 18:38, Mark Rutland wrote:
> > On Wed, Apr 27, 2016 at 04:34:53PM +0100, Jon Hunter wrote:
> >>
> >> On 22/04/16 12:22, Mark Rutland wrote:
> >>
> >> [snip]
> >>
> >>>>>> I am not sure if it will be popular to add Tegra specific clock names
> >>>>>> to the GIC DT docs. However, in that case, then possibly the only
> >>>>>> alternative is to move the Tegra AGIC driver into its own file and
> >>>>>> expose the GIC APIs for it to use. Then we could add our own DT doc
> >>>>>> for the Tegra AGIC as well (based upon the ARM GIC).
> >>>>>
> >>>>> The clock-names don't seem right to me, as they sound like provide names
> >>>>> or global clock line names rather than consumer-side names ("clk" and
> >>>>> "apb_pclk").
> >>>>
> >>>> Yes that would be fine with me.
> >>>
> >>> Ok; if we model the apb_pclk as owned by the AXI switch (which it is),
> >>> then there's no change for the GIC binding, short of the additional
> >>> compatible string as an extension of "arm,gic-400", as we already model
> >>> that clock in the GIC-400 binding.
> >>
> >> I have been re-working this based upon the feedback received. In the GIC
> >> driver we have the following definitions ...
> >>
> >>  IRQCHIP_DECLARE(gic_400, "arm,gic-400", gic_of_init);
> >>  IRQCHIP_DECLARE(arm11mp_gic, "arm,arm11mp-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(arm1176jzf_dc_gic, "arm,arm1176jzf-devchip-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(cortex_a15_gic, "arm,cortex-a15-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(cortex_a9_gic, "arm,cortex-a9-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(cortex_a7_gic, "arm,cortex-a7-gic", gic_of_init);
> >>  IRQCHIP_DECLARE(msm_8660_qgic, "qcom,msm-8660-qgic", gic_of_init);
> >>  IRQCHIP_DECLARE(msm_qgic2, "qcom,msm-qgic2", gic_of_init);
> >>  IRQCHIP_DECLARE(pl390, "arm,pl390", gic_of_init);
> >>
> >>
> >> If I have something like the following in my dts ...
> >>
> >> 	agic: interrupt-controller@702f9000 {
> >> 		compatible = "nvidia,tegra210-agic", "arm,gic-400";
> >> 		...
> >> 	};
> >>
> >> The problem with this is that it tries to register the interrupt controller
> >> early during of_irq_init() before the platform driver has chance to
> >> initialise it.

[...]

> > We could instead explicitly match "nvidia,tegra210-agic", bailing out if
> > we see that. Otherwise, if we can't handle it like a GIC-400, then we
> > can just drop the GIC-400 compatible string from the fallback list.
> 
> Would it also be a none-starter to have "arm,gic-pm" instead of
> "nvidia,tegra210-agic"? At this point it is not really specific to tegra
> any more and so I was hoping to get rid of that. For example, ...
> 
> 	compatible = "arm,gic-pm", "arm,gic-400";

I'm not keen on the "*-pm" approach, as such compatible strings aren't
reall describing HW, but rather the SW policy to apply, and really would
only be there to bodge around a structural issue we have in Linux today
w.r.t. the device model split and probe ordering.

The "nvidia,tegra210-agic" string can be taken as describing any
Tegra-210 specific integration quirks, though I agree that's also not
fantastic for extending PM support beyond Tegra 210 and variants
thereof.

So maybe the best approach is bailing out in the presence of clocks
and/or power domains after all, on the assumption that nothing today has
those properties, though I fear we may have problems with that later
down the line if/when people describe those for the root GIC to describe
those must be hogged, even if not explicitly managed.

Thanks,
Mark.

  parent reply	other threads:[~2016-04-28  9:55 UTC|newest]

Thread overview: 96+ 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 ` Jon Hunter
     [not found] ` <1461150237-15580-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
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     ` Jon Hunter
2016-04-20 11:03   ` [PATCH V2 04/14] irqdomain: Fix handling of type settings for existing mappings Jon Hunter
2016-04-20 11:03     ` Jon Hunter
2016-04-21 11:31     ` Jon Hunter
2016-04-21 11:31       ` Jon Hunter
     [not found]     ` <1461150237-15580-5-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-22  8:11       ` Marc Zyngier
2016-04-22  8:11         ` Marc Zyngier
2016-04-20 11:03   ` [PATCH V2 06/14] irqdomain: Don't set type when mapping an IRQ Jon Hunter
2016-04-20 11:03     ` Jon Hunter
     [not found]     ` <1461150237-15580-7-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-21 15:45       ` Jon Hunter
2016-04-21 15:45         ` Jon Hunter
     [not found]         ` <5718F593.40605-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-22  8:22           ` Marc Zyngier
2016-04-22  8:22             ` Marc Zyngier
     [not found]             ` <5719DF5B.9010304-5wv7dgnIgG8@public.gmane.org>
2016-04-22  8:48               ` Jon Hunter
2016-04-22  8:48                 ` Jon Hunter
     [not found]                 ` <5719E563.3010303-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-22  9:34                   ` Marc Zyngier
2016-04-22  9:34                     ` Marc Zyngier
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-20 11:03   ` Jon Hunter
     [not found]   ` <1461150237-15580-3-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-22  8:49     ` Marc Zyngier
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-20 11:03   ` Jon Hunter
     [not found]   ` <1461150237-15580-4-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-22  8:41     ` Marc Zyngier
2016-04-22  8:41       ` 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   ` Jon Hunter
2016-04-20 11:03 ` [PATCH V2 07/14] genirq: Add runtime power management support for IRQ chips Jon Hunter
2016-04-20 11:03   ` Jon Hunter
     [not found]   ` <1461150237-15580-8-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-20 17:11     ` Kevin Hilman
2016-04-20 17:11       ` Kevin Hilman
2016-04-21  9:19       ` Jon Hunter
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   ` 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   ` 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   ` 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   ` 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   ` Jon Hunter
2016-04-20 11:03 ` [PATCH V2 13/14] dt-bindings: arm-gic: Add documentation for Tegra210 AGIC Jon Hunter
2016-04-20 11:03   ` 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:12       ` Jon Hunter
     [not found]       ` <571A0739.3090502-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-22 11:22         ` Mark Rutland
2016-04-22 11:22           ` Mark Rutland
2016-04-22 14:57           ` Jon Hunter
2016-04-22 14:57             ` Jon Hunter
2016-04-27 15:34           ` Jon Hunter
2016-04-27 15:34             ` Jon Hunter
     [not found]             ` <5720DC1D.1080802-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-27 17:38               ` Mark Rutland
2016-04-27 17:38                 ` Mark Rutland
2016-04-27 18:02                 ` Geert Uytterhoeven
2016-04-27 18:02                   ` Geert Uytterhoeven
2016-04-28  8:11                 ` Jon Hunter
2016-04-28  8:11                   ` Jon Hunter
2016-04-28  8:31                   ` Geert Uytterhoeven
2016-04-28  8:31                     ` Geert Uytterhoeven
     [not found]                   ` <5721C597.1010105-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-28  9:55                     ` Mark Rutland [this message]
2016-04-28  9:55                       ` Mark Rutland
2016-05-06  8:32                       ` Jon Hunter
2016-05-06  8:32                         ` Jon Hunter
     [not found]                         ` <572C56A6.7020408-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-07 14:10                           ` Geert Uytterhoeven
2016-05-07 14:10                             ` Geert Uytterhoeven
     [not found]                             ` <CAMuHMdX+egbNPP4QQ2R28GbyVkg9qBrwYfUy8EE0PdB6od+LBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-08 12:25                               ` Jon Hunter
2016-05-08 12:25                                 ` Jon Hunter
     [not found]                                 ` <572F302A.6010506-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-09  9:32                                   ` Marc Zyngier
2016-05-09  9:32                                     ` Marc Zyngier
2016-05-11 15:51                               ` Rob Herring
2016-05-11 15:51                                 ` Rob Herring
     [not found]                                 ` <CAL_Jsq+HSH7e1T9y47nHV_x5NvZ-52cfDEKKFkr16ax671FxSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-11 16:08                                   ` Jon Hunter
2016-05-11 16:08                                     ` Jon Hunter
2016-05-11 16:10                                     ` Jon Hunter
     [not found]                                     ` <573358F9.6000108-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-11 16:16                                       ` Jon Hunter
2016-05-11 16:16                                         ` Jon Hunter
     [not found]                                         ` <57335AD3.7070109-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-11 16:30                                           ` Rob Herring
2016-05-11 16:30                                             ` Rob Herring
     [not found]                                             ` <CAL_Jsq+ZhwUOSfQG-8V9xgxiXBj2j3Q6k48d=BWtWK9pEHH_MQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-11 16:53                                               ` Jon Hunter
2016-05-11 16:53                                                 ` Jon Hunter
     [not found]                                                 ` <57336397.4000401-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-11 17:28                                                   ` Mark Rutland
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-20 11:03   ` Jon Hunter
     [not found]   ` <1461150237-15580-15-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-22  9:57     ` Marc Zyngier
2016-04-22  9:57       ` Marc Zyngier
2016-04-22 10:21       ` Jon Hunter
2016-04-22 10:21         ` Jon Hunter

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=20160428095525.GB21145@leverpostej \
    --to=mark.rutland-5wv7dgnigg8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=grygorii.strashko-l0cyMroinI0@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marc.zyngier-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.