linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 02/13] ARM: vic: device tree binding
Date: Thu, 10 Nov 2011 14:46:48 +0000	[thread overview]
Message-ID: <20111110144648.GC16018@totoro> (raw)
In-Reply-To: <1320369010-23428-3-git-send-email-jamie@jamieiles.com>

On Fri, Nov 04, 2011 at 01:09:59AM +0000, Jamie Iles wrote:
> This adds a device tree binding for the VIC based on the of_irq_init()
> support.  This adds an irqdomain to the vic and always registers all
> vics in the static vic array rather than for pm only to keep track of
> the irq domain.  struct irq_data::hwirq is used where appropriate rather
> than runtime masking.
> 
> v2:	- use irq_domain_simple_ops
> 	- remove stub implementation of vic_of_init for !CONFIG_OF
> 	- Make VIC select IRQ_DOMAIN
> 
> Reviewed-by: Rob Herring <robherring2@gmail.com>
> Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
>  Documentation/devicetree/bindings/arm/vic.txt |   29 +++++++
>  arch/arm/common/Kconfig                       |    1 +
>  arch/arm/common/vic.c                         |  106 ++++++++++++++++++-------
>  arch/arm/include/asm/hardware/vic.h           |    7 ++-
>  4 files changed, 114 insertions(+), 29 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/arm/vic.txt
> 
> diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
> index 01f18a4..e689975 100644
> --- a/arch/arm/common/vic.c
> +++ b/arch/arm/common/vic.c
> @@ -22,6 +22,10 @@
[...]
> +#ifdef CONFIG_OF
> +int __init vic_of_init(struct device_node *node, struct device_node *parent)
> +{
> +	void __iomem *regs;
> +	int irq_base;
> +
> +	if (WARN(parent, "non-root VICs are not supported"))
> +		return -EINVAL;
> +
> +	regs = of_iomap(node, 0);
> +	if (WARN_ON(!regs))
> +		return -EIO;
> +
> +	irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id());
> +	if (WARN_ON(irq_base < 0))
> +		goto out_unmap;

Hmm, this appears to need linux/export.h for THIS_MODULE now.  
linux/irq.h has a comment saying it uses a macro to avoid needing an 
include of export.h there so I guess it needs to go in here instead.

Jamie

  reply	other threads:[~2011-11-10 14:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-04  1:09 [PATCHv4 00/13] VIC DT binding and MULTI_IRQ_HANDLER Jamie Iles
2011-11-04  1:09 ` [PATCHv4 01/13] ARM: Make global handler and CONFIG_MULTI_IRQ_HANDLER mutually exclusive Jamie Iles
2011-11-04  1:09 ` [PATCHv4 02/13] ARM: vic: device tree binding Jamie Iles
2011-11-10 14:46   ` Jamie Iles [this message]
2011-11-10 15:20     ` Marc Zyngier
2011-11-10 16:28       ` Jamie Iles
2011-11-04  1:10 ` [PATCHv4 03/13] ARM: vic: MULTI_IRQ_HANDLER handler Jamie Iles
2011-11-04  1:10 ` [PATCHv4 04/13] ARM: ep93xx: convert to MULTI_IRQ_HANDLER Jamie Iles
2011-11-04  1:10 ` [PATCHv4 05/13] ARM: netx: " Jamie Iles
2011-11-04  1:10 ` [PATCHv4 06/13] ARM: nomadik: " Jamie Iles
2011-11-04  1:10 ` [PATCHv4 07/13] ARM: s3c64xx: " Jamie Iles
2011-11-09 11:25   ` Thomas Abraham
2011-11-09 11:34     ` Thomas Abraham
2011-11-09 11:54     ` Jamie Iles
2011-11-09 12:30       ` Thomas Abraham
2011-11-10 14:53         ` Jamie Iles
2011-11-10 16:19           ` Thomas Abraham
2011-11-09 14:50       ` Rob Herring
2011-11-09 14:55         ` Jamie Iles
2011-11-04  1:10 ` [PATCHv4 08/13] ARM: spear: " Jamie Iles
2011-11-09 10:15   ` Viresh Kumar
2011-11-04  1:10 ` [PATCHv4 09/13] ARM: u300: " Jamie Iles
2011-11-04  1:10 ` [PATCHv4 10/13] ARM: versatile: " Jamie Iles
2011-11-09 10:25   ` Marc Zyngier
2011-11-04  1:10 ` [PATCHv4 11/13] ARM: samsung: " Jamie Iles
2011-11-04  1:10 ` [PATCHv4 12/13] ARM: picoxcell: " Jamie Iles
2011-11-04  1:10 ` [PATCHv4 13/13] ARM: VIC: remove non MULTI_IRQ_HANDLER support Jamie Iles
2011-11-09 10:01 ` [PATCHv4 00/13] VIC DT binding and MULTI_IRQ_HANDLER Jamie Iles

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=20111110144648.GC16018@totoro \
    --to=jamie@jamieiles.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).