All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
	jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	machael-QKn5cuLxLXY@public.gmane.org
Subject: Re: [PATCH 1/9] ARM: Kirkwood: Add interrupt controller support for DT boards
Date: Thu, 14 Jun 2012 08:12:34 +0000	[thread overview]
Message-ID: <201206140812.34399.arnd@arndb.de> (raw)
In-Reply-To: <1339324322-29388-2-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>

On Sunday 10 June 2012, Andrew Lunn wrote:
> +static int __init kirkwood_add_irq_domain(struct device_node *np,
> +                                         struct device_node *interrupt_parent)
> +{
> +       kirkwood_init_irq();
> +       irq_domain_add_legacy(np, 64, 0, 0, &irq_domain_simple_ops, NULL);
> +       return 0;
> +}
> +
> +static const struct of_device_id kirkwood_irq_match[] = {
> +       { .compatible = "marvell,orion-intc",
> +         .data = kirkwood_add_irq_domain, },
> +       {},
> +};
> +
> +static void __init kirkwood_dt_init_irq(void)
> +{
> +       of_irq_init(kirkwood_irq_match);
> +}
> +

I think if you compute the number of interrupts in the domain from the number of
registers that are described in the device tree, call orion_irq_init()
based on those registers, and use irq domains for the gpio stuff as Rob suggested,
this init_irq function can become completely generic to all orion platforms.

That is what I tried to do with an earlier patch, which was flawed for other reasons.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/9] ARM: Kirkwood: Add interrupt controller support for DT boards
Date: Thu, 14 Jun 2012 08:12:34 +0000	[thread overview]
Message-ID: <201206140812.34399.arnd@arndb.de> (raw)
In-Reply-To: <1339324322-29388-2-git-send-email-andrew@lunn.ch>

On Sunday 10 June 2012, Andrew Lunn wrote:
> +static int __init kirkwood_add_irq_domain(struct device_node *np,
> +                                         struct device_node *interrupt_parent)
> +{
> +       kirkwood_init_irq();
> +       irq_domain_add_legacy(np, 64, 0, 0, &irq_domain_simple_ops, NULL);
> +       return 0;
> +}
> +
> +static const struct of_device_id kirkwood_irq_match[] = {
> +       { .compatible = "marvell,orion-intc",
> +         .data = kirkwood_add_irq_domain, },
> +       {},
> +};
> +
> +static void __init kirkwood_dt_init_irq(void)
> +{
> +       of_irq_init(kirkwood_irq_match);
> +}
> +

I think if you compute the number of interrupts in the domain from the number of
registers that are described in the device tree, call orion_irq_init()
based on those registers, and use irq domains for the gpio stuff as Rob suggested,
this init_irq function can become completely generic to all orion platforms.

That is what I tried to do with an earlier patch, which was flawed for other reasons.

	Arnd

  parent reply	other threads:[~2012-06-14  8:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-10 10:31 [PATCH 1/9] ARM: Kirkwood: Add interrupt controller support for DT boards Andrew Lunn
2012-06-10 10:31 ` Andrew Lunn
     [not found] ` <1339324322-29388-2-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2012-06-10 16:48   ` Jason Cooper
2012-06-10 16:48     ` Jason Cooper
2012-06-10 21:21   ` Michael Walle
2012-06-10 21:21     ` Michael Walle
2012-06-11 12:49   ` Rob Herring
2012-06-11 12:49     ` Rob Herring
2012-06-14  8:12   ` Arnd Bergmann [this message]
2012-06-14  8:12     ` Arnd Bergmann
     [not found]     ` <201206140812.34399.arnd-r2nGTMty4D4@public.gmane.org>
2012-06-14  9:18       ` Andrew Lunn
2012-06-14  9:18         ` Andrew Lunn
     [not found]         ` <20120614091858.GD4799-g2DYL2Zd6BY@public.gmane.org>
2012-06-14 11:55           ` Arnd Bergmann
2012-06-14 11:55             ` Arnd Bergmann

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=201206140812.34399.arnd@arndb.de \
    --to=arnd-r2ngtmty4d4@public.gmane.org \
    --cc=andrew-g2DYL2Zd6BY@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=machael-QKn5cuLxLXY@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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.