Commit Graph

5 Commits (8a59f5d2526593c6bc1a0754c3a16ccc9ed41ce3)

Author SHA1 Message Date
Magnus Damm 2dcec7a988 sh: intc: set_irq_wake() support
Add set_irq_wake() support to intc using sysdev and suspend.

The intc controllers are put on a list at registration time
and registered as sysdev devices later on during the boot.

The sysdev class suspend callback is used to find irqs with
wakeup enabled belonging to our intc controller. Such irqs
are simply enabled so wakeup interrupts may reach the cpu.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 11:19:57 +09:00
Magnus Damm f7dd2548c4 sh: intc: install enable, disable and shutdown callbacks
Modify the intc code to install a disable callback. The current
solution without a disable callback results in use of the
generic default_disable() function. This function is a no-op
so suspend_device_irqs() will not disable any intc interrupts
at suspend time without this patch. Also, install enable and
shutdown callbacks while at it.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 11:19:29 +09:00
Paul Mundt f033599aac sh: intc: Make missing unique IRQ mask warning more verbose.
This includes the IRQ number in addition to the vector, as not all
platforms wrap in with INTC_VECT().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 17:56:58 +09:00
Magnus Damm bdaa6e8062 sh: multiple vectors per irq - base
Instead of keeping the single vector -> single linux irq mapping
we extend the intc code to support merging of vectors to a single
linux irq. This helps processors such as sh7750, sh7780 and sh7785
which have more vectors than masking ability. With this patch in
place we can modify the intc tables to use one irq per maskable
irq source. Please note the following:

 - If multiple vectors share the same enum then only the
   first vector will be available as a linux irq.

 - Drivers may need to be rewritten to get pending irq
   source from the hardware block instead of irq number.

This patch together with the sh7785 specific intc tables solves
DMA controller irq issues related to buggy interrupt masking.

Reported-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:53:50 +09:00
Paul Mundt bbfbd8b151 sh: Move the shared INTC code out to drivers/sh/
The INTC code will be re-used across different architectures, so move
this out to drivers/sh/ and include/linux/sh_intc.h respectively.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01 16:13:54 +09:00