From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Subject: Re: [PATCH v4 3/5] ARM: tegra: Initialize interrupt controller from DT
Date: Fri, 29 Aug 2014 21:53:42 +0200 [thread overview]
Message-ID: <3113165.EcqFA5vr07@wuerfel> (raw)
In-Reply-To: <20140829150422.GA11035@ulmo>
On Friday 29 August 2014 17:04:28 Thierry Reding wrote:
> static struct irq_chip *extn;
>
> void gic_arch_register(const struct irqchip *chip)
> {
> if (WARN(extn != NULL))
> return;
>
> gic_chip.flags |= chip->flags;
> extn = chip;
> }
>
> Any preferences, or other ideas? Adding Thomas and Jason, perhaps they
> can provide more input on how to solve this.
I think the entire gic_arch_extn method is done in a rather odd way
and we should try to come up with a replacement.
These are the users at the moment:
arch/arm/mach-exynos/pm.c: gic_arch_extn.irq_set_wake = exynos_irq_set_wake;
arch/arm/mach-imx/gpc.c: gic_arch_extn.irq_mask = imx_gpc_irq_mask;
arch/arm/mach-imx/gpc.c: gic_arch_extn.irq_unmask = imx_gpc_irq_unmask;
arch/arm/mach-imx/gpc.c: gic_arch_extn.irq_set_wake = imx_gpc_irq_set_wake;
arch/arm/mach-omap2/omap-wakeupgen.c: gic_arch_extn.irq_mask = wakeupgen_mask;
arch/arm/mach-omap2/omap-wakeupgen.c: gic_arch_extn.irq_unmask = wakeupgen_unmask;
arch/arm/mach-omap2/omap-wakeupgen.c: gic_arch_extn.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_W
arch/arm/mach-shmobile/intc-sh73a0.c: gic_arch_extn.irq_set_wake = sh73a0_set_wake;
arch/arm/mach-shmobile/setup-r8a7779.c: gic_arch_extn.irq_set_wake = r8a7779_set_wake;
arch/arm/mach-tegra/irq.c: gic_arch_extn.irq_ack = tegra_ack;
arch/arm/mach-tegra/irq.c: gic_arch_extn.irq_eoi = tegra_eoi;
arch/arm/mach-tegra/irq.c: gic_arch_extn.irq_mask = tegra_mask;
arch/arm/mach-tegra/irq.c: gic_arch_extn.irq_unmask = tegra_unmask;
arch/arm/mach-tegra/irq.c: gic_arch_extn.irq_retrigger = tegra_retrigger;
arch/arm/mach-tegra/irq.c: gic_arch_extn.irq_set_wake = tegra_set_wake;
arch/arm/mach-tegra/irq.c: gic_arch_extn.flags = IRQCHIP_MASK_ON_SUSPEND;
arch/arm/mach-ux500/cpu.c: gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
arch/arm/mach-zynq/common.c: gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
I have to admit I don't really understand how these work, but what
I'd expect to work better is a way to turn the gic code into more
of a library that can be used by specialized drivers. In that
case you would register a driver for the tegra gic using IRQCHIP_DECLARE
and that driver would call a variation of gic_of_init() or gic_init_bases()
with the extra stuff as arguments.
We'd have to hack around the fact that all these platforms currently
don't list a specialized compatible string, but at least for the future
we should be able to do this without special hacks.
Arnd
next prev parent reply other threads:[~2014-08-29 19:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 15:31 [PATCH v4 1/5] of: Add NVIDIA Tegra Legacy Interrupt Controller binding Thierry Reding
[not found] ` <1409239879-12376-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-28 15:31 ` [PATCH v4 2/5] ARM: tegra: Add legacy interrupt controller nodes Thierry Reding
[not found] ` <1409239879-12376-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-28 16:11 ` Arnd Bergmann
2014-09-01 8:16 ` Peter De Schrijver
2014-08-28 15:31 ` [PATCH v4 3/5] ARM: tegra: Initialize interrupt controller from DT Thierry Reding
[not found] ` <1409239879-12376-3-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-28 16:10 ` Arnd Bergmann
2014-08-29 7:31 ` Thierry Reding
2014-08-29 14:24 ` Thierry Reding
2014-08-29 15:04 ` Thierry Reding
2014-08-29 19:53 ` Arnd Bergmann [this message]
2014-08-30 15:54 ` Jason Cooper
[not found] ` <20140830155459.GI3683-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-09-01 8:45 ` Arnd Bergmann
2014-09-01 8:47 ` Thierry Reding
2014-08-29 3:27 ` Varka Bhadram
[not found] ` <53FFF335.1020402-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-29 7:29 ` Thierry Reding
2014-08-28 15:31 ` [PATCH v4 4/5] ARM: tegra: Remove unused GIC initialization Thierry Reding
2014-08-28 15:31 ` [PATCH v4 5/5] ARM: tegra: Remove unused defines Thierry Reding
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=3113165.EcqFA5vr07@wuerfel \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@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 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).