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: [PATCH v2] ARM: at91: pit add DT support
Date: Thu, 5 Jan 2012 14:56:29 +0000	[thread overview]
Message-ID: <20120105145629.GB10530@page> (raw)
In-Reply-To: <4F05B8A1.2010003@atmel.com>

On Thu, Jan 05, 2012 at 03:50:09PM +0100, Nicolas Ferre wrote:
> On 01/05/2012 01:00 PM, Jamie Iles :
> > Hi Nicolas, Jean-Christophe,
> > 
> > On Thu, Jan 05, 2012 at 02:48:28PM +0100, Nicolas Ferre wrote:
> >> From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >>
> >> Retreive registers address and IRQ from device tree entry. Fall back
> >> to built-in values if an error occurs.
> >>
> >> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >> [nicolas.ferre at atmel.com: change error path and interrupts property handling]
> >> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> >> ---
> > [...]
> >> diff --git a/arch/arm/mach-at91/at91sam926x_time.c 
> >> b/arch/arm/mach-at91/at91sam926x_time.c
> >> index d89ead7..5d4c308 100644
> >> --- a/arch/arm/mach-at91/at91sam926x_time.c
> >> +++ b/arch/arm/mach-at91/at91sam926x_time.c
> >> @@ -14,6 +14,8 @@
> > [...]
> >> +static int __init of_at91sam926x_pit_init(void)
> >> +{
> >> +	struct device_node *np;
> >> +
> >> +	np = of_find_matching_node(NULL, timer_ids);
> >> +	if (!np)
> >> +		goto err;
> >> +
> >> +	pit_base_addr = of_iomap(np, 0);
> >> +	if (!pit_base_addr)
> >> +		goto node_err;
> >> +
> >> +	/* Get the interrupts property */
> >> +	if (of_property_read_u32(np, "interrupts", &at91sam926x_pit_irq.irq))
> >> +		goto ioremap_err;
> > 
> > I think you want:
> > 
> > 	at91sam926x_pit_irq.irq = irq_of_parse_and_map(np, 0);
> > 
> > to make sure the IRQ is converted to a Linux IRQ and not a hwirq.
> 
> Yes, that definitively makes sense. BTW, without a DT entry, how should
> I map a hwirq, with the irq_domain_to_irq() helper? But I will need
> access to the interrupt controller "struct irq_domain"...

If you aren't booting with DT then at the moment I think on AT91 you 
have statically assigned irq_descs and IRQ numbers so you don't need to 
map them, you just know what IRQ number to request at compile time.

Jamie

  reply	other threads:[~2012-01-05 14:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20111016210819.GM1459@game.jcrosoft.org>
2011-10-16 21:18 ` [PATCH 1/4] ARM: at91: add at91sam9g20 dtsi Jean-Christophe PLAGNIOL-VILLARD
2011-10-16 21:18 ` [PATCH 2/4] ARM: at91: add Calao USB A9G20 DT support Jean-Christophe PLAGNIOL-VILLARD
2011-10-16 21:18 ` [PATCH 3/4] ARM: at91/smc: add " Jean-Christophe PLAGNIOL-VILLARD
2011-10-16 21:18 ` [PATCH 4/4] ARM: at91/pit: " Jean-Christophe PLAGNIOL-VILLARD
2012-01-05 13:48   ` [PATCH v2] ARM: at91: pit " Nicolas Ferre
2012-01-05 12:00     ` Jamie Iles
2012-01-05 14:50       ` Nicolas Ferre
2012-01-05 14:56         ` Jamie Iles [this message]
2012-01-05 17:25     ` [PATCH v3] " Nicolas Ferre
2012-01-05 15:34       ` Jamie Iles
2012-01-05 16:42       ` Rob Herring
2012-01-06 13:36         ` Nicolas Ferre
2012-01-05 18:00       ` Grant Likely
2012-01-06 13:37         ` Nicolas Ferre
2012-01-06 16:20       ` [PATCH v4] " Nicolas Ferre
2012-01-06 15:47         ` Rob Herring
2012-01-06 17:28           ` Nicolas Ferre
2012-01-09 17:39           ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-10  8:34             ` Nicolas Ferre
2012-02-22 14:32         ` [PATCH v5 1/2] " Nicolas Ferre
2012-02-22 14:32           ` [PATCH v5 2/2] ARM: at91/pit: add traces in case of error Nicolas Ferre

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=20120105145629.GB10530@page \
    --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).