All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake()
Date: Fri, 10 Jun 2011 02:20:40 +0000	[thread overview]
Message-ID: <20110610022035.GA643@verge.net.au> (raw)
In-Reply-To: <20110609062003.383.67447.sendpatchset@t400s>

On Thu, Jun 09, 2011 at 03:20:03PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Initialize ->irq_set_wake() in gic_arch_extn to unbreak wake
> up from the KEYSC device on AG5EVM in case of Suspend-to-RAM.
> 
> Without this patch "echo mem > /sys/power/state" and a key
> press results in the following message on resume:
> 
> WARNING: at kernel/irq/manage.c:507 irq_set_irq_wake+0x7c/0xd8()                
> Unbalanced IRQ 103 wake disable                                                 
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  arch/arm/mach-shmobile/intc-sh73a0.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> --- 0001/arch/arm/mach-shmobile/intc-sh73a0.c
> +++ work/arch/arm/mach-shmobile/intc-sh73a0.c	2011-06-08 18:42:14.000000000 +0900
> @@ -250,6 +250,11 @@ static irqreturn_t sh73a0_intcs_demux(in
>  	return IRQ_HANDLED;
>  }
>  
> +static int sh73a0_set_wake(struct irq_data *data, unsigned int on)
> +{
> +	return 0; /* always allow wakeup */
> +}
> +

I wonder if a more generic location and name for this would be worthwhile.
It seems to me that that other hardware may also want to do this.

>  void __init sh73a0_init_irq(void)
>  {
>  	void __iomem *gic_dist_base = __io(0xf0001000);
> @@ -257,6 +262,7 @@ void __init sh73a0_init_irq(void)
>  	void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE);
>  
>  	gic_init(0, 29, gic_dist_base, gic_cpu_base);
> +	gic_arch_extn.irq_set_wake = sh73a0_set_wake;
>  
>  	register_intc_controller(&intcs_desc);
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2011-06-10  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09  6:20 [PATCH] ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake() fix Magnus Damm
2011-06-10  2:20 ` Simon Horman [this message]
2011-06-10  5:03 ` Magnus Damm
2011-06-10  6:00 ` [PATCH] ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake() Simon Horman
2011-06-14  6:32 ` [PATCH] ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake() fix Paul Mundt

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=20110610022035.GA643@verge.net.au \
    --to=horms@verge.net.au \
    --cc=linux-sh@vger.kernel.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.