ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake() fix
Magnus Damm
maintainerPATCH 1/1 ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake() fix
From: Magnus Damm <[email protected]>
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
---
arch/arm/mach-shmobile/intc-sh73a0.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-shmobile/intc-sh73a0.c +6 -0
@@ -250,6 +250,11 @@ static irqreturn_t sh73a0_intcs_demux(inreturn IRQ_HANDLED ; } +static int sh73a0_set_wake (struct irq_data *data,unsigned int on) +{ +return 0 ;/* always allow wakeup */ +} +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);
Re: [PATCH] ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake()
Quoted 20 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Initialize ->irq_set_wake() in
gic_arch_extnto 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 <[email protected]>---
arch/arm/mach-shmobile/intc-sh73a0.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-shmobile/intc-sh73a0.c static irqreturn_t sh73a0_intcs_demux(in · line 257
Quoted 8 lines
arch/arm/mach-shmobile/intc-sh73a0.c +5
-0@@ -250,6 +250,11 @@ static irqreturn_t sh73a0_intcs_demux(inreturn 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.
Quoted 16 lines
arch/arm/mach-shmobile/intc-sh73a0.c +1
-1void __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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Magnus Damm
maintainerQuoted 24 lines · Simon Horman
Quoted 23 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Initialize ->irq_set_wake() in
gic_arch_extnto 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 <[email protected]>---
arch/arm/mach-shmobile/intc-sh73a0.c | 6 ++++++
1 file changed, 6 insertions(+)arch/arm/mach-shmobile/intc-sh73a0.c 2011-06-08 18:42:14.000000000 +0900 renamed from arch/arm/mach-shmobile/intc-sh73a0.c +0
-0@@ -250,6 +250,11 @@ static irqreturn_t sh73a0_intcs_demux(in return IRQ_HANDLED; }
Quoted 8 lines
arch/arm/mach-shmobile/intc-sh73a0.c 2011-06-08 18:42:14.000000000 +0900 static irqreturn_t sh73a0_intcs_demux(in · line 257
Quoted 5 lines
arch/arm/mach-shmobile/intc-sh73a0.c 2011-06-08 18:42:14.000000000 +0900 renamed from arch/arm/mach-shmobile/intc-sh73a0.c +5
-0+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.
Not so sure about that. It all depends on what other hardware platforms need to do in their sleep code. Do you have any particular hardware platform in mind?
Without this callback in place set_irq_wake_real() will return -ENXIO. Which is fine if you don't support Suspend-to-RAM with IRQ wake up. On sh73a0 we do support Suspend-to-RAM in linux-3.0-rc and without this patch we trigger a warning. So to properly support sh73a0 in 3.0-rc we need some kind of fix.
For now we don't implement deep enough sleep modes to require any special code in sh73a0_set_wake(). In the future we want to add more advanced sleep modes, which will require us to extend the sh73a0_set_wake() function.
Other SH and SH-Mobile ARM SoCs use INTC as interrupt controller instead of GIC. This kind of fix is not needed for those SoCs.
/ magnus
Re: [PATCH] ARM: mach-shmobile: sh73a0 gic_arch_extn.irq_set_wake()
In reply to Magnus DammQuoted 34 lines · Magnus Damm
Quoted 24 lines · Simon Horman
Quoted 23 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Initialize ->irq_set_wake() in
gic_arch_extnto 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 <[email protected]>---
arch/arm/mach-shmobile/intc-sh73a0.c | 6 ++++++
1 file changed, 6 insertions(+)arch/arm/mach-shmobile/intc-sh73a0.c 2011-06-08 18:42:14.000000000 +0900 renamed from arch/arm/mach-shmobile/intc-sh73a0.c +0
-0@@ -250,6 +250,11 @@ static irqreturn_t sh73a0_intcs_demux(in return IRQ_HANDLED; }Quoted 8 lines
arch/arm/mach-shmobile/intc-sh73a0.c 2011-06-08 18:42:14.000000000 +0900 static irqreturn_t sh73a0_intcs_demux(in · line 257
Quoted 5 lines
arch/arm/mach-shmobile/intc-sh73a0.c 2011-06-08 18:42:14.000000000 +0900 renamed from arch/arm/mach-shmobile/intc-sh73a0.c +5
-0+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.
Quoted 3 lines
Not so sure about that. It all depends on what other hardware platforms need to do in their sleep code. Do you have any particular hardware platform in mind?
No, I don't have any other hardware in mind.
Quoted 8 lines · Magnus Damm
Initialize ->irq_set_wake() in
gic_arch_extnto 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
Quoted 8 lines · Magnus Damm
Fix the recently added
SH_DMAC_MAX_CHANNELShandling code in 300e5f9 dmaengine: shdma: FixSH_DMAC_MAX_CHANNELShandlingWithout this fix the shdma driver outputs silly messages in case
SH_DMAC_MAX_CHANNELShappens to match the platform data:sh-dma-engine sh-dma-engine.0: Attempting to register 20 DMA channels when a max imum of 20 are supported.
Quoted 4 lines · Magnus Damm
Add a flag for SDHI1 to enable SDIO IRQ, and remove DMA Engine slave id:s to disable DMA as a workaround.
Tested on sh73a0/AG5EVM with a BCM4318-based SDIO card.
Quoted 5 lines · Magnus Damm
Extend the SH / SH-Mobile ARM clock framework to only resume clocks that has been enabled.
Without this fix divide-by-zero is triggering on sh7372 FSIDIV during system wide resume of Suspend-to-RAM.
All applied, thanks.