linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: at91: fix drivers broken because of sparse irq support
Date: Tue, 14 Aug 2012 04:28:30 +0200	[thread overview]
Message-ID: <20120814022830.GB8836@game.jcrosoft.org> (raw)
In-Reply-To: <1344872334-1532-2-git-send-email-ludovic.desroches@atmel.com>

On 17:38 Mon 13 Aug     , ludovic.desroches at atmel.com wrote:
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
> 
> Some drivers directly use AT91_ID_SYS as virq so they are broken because of
> the NR_IRQS_LEGACY virq offset introduced with sparse irq support.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> Cc: stable at vger.kernel.org
> ---
>  arch/arm/mach-at91/at91rm9200_time.c |  2 +-
>  drivers/rtc/rtc-at91sam9.c           | 11 ++++++-----
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
> index 104ca40..aaa443b 100644
> --- a/arch/arm/mach-at91/at91rm9200_time.c
> +++ b/arch/arm/mach-at91/at91rm9200_time.c
> @@ -197,7 +197,7 @@ void __init at91rm9200_timer_init(void)
>  	at91_st_read(AT91_ST_SR);
>  
>  	/* Make IRQs happen for the system timer */
> -	setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq);
> +	setup_irq(NR_IRQS_LEGACY + AT91_ID_SYS, &at91rm9200_timer_irq);
>  
>  	/* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used
>  	 * directly for the clocksource and all clockevents, after adjusting
> diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
> index 8318689..2969047 100644
> --- a/drivers/rtc/rtc-at91sam9.c
> +++ b/drivers/rtc/rtc-at91sam9.c
> @@ -345,11 +345,12 @@ static int __devinit at91_rtc_probe(struct platform_device *pdev)
>  	}
>  
>  	/* register irq handler after we know what name we'll use */
> -	ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt,
> +	ret = request_irq(NR_IRQS_LEGACY + AT91_ID_SYS, at91_rtc_interrupt,
the irq need to be pass by resources and not hardcoded

Best Regrds,
J.

      parent reply	other threads:[~2012-08-14  2:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 15:38 [PATCH 0/1] ARM: at91: fix drivers broken because of sparse irq support ludovic.desroches at atmel.com
2012-08-13 15:38 ` [PATCH] " ludovic.desroches at atmel.com
2012-08-13 17:37   ` Joachim Eastwood
2012-08-14  2:28   ` Jean-Christophe PLAGNIOL-VILLARD [this message]

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=20120814022830.GB8836@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.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).