History log of /include/linux/sh_intc.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0f55239348aa85021d8bf8b63d84a796fcc142a4 17-Jan-2012 Rob Herring <rob.herring@calxeda.com> sh: intc: remove dependency on NR_IRQS

SH intc has a compile time dependency on NR_IRQS. Make this dependency a
local define so that shmobile (and ARM in general) can have run-time
NR_IRQS setting.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
/include/linux/sh_intc.h
7f1e76370b717be264f0af54719182a96fb8f36d 17-Jan-2012 Rob Herring <rob.herring@calxeda.com> sh: intc: unify evt2irq/irq2evt macros for sh and arm

Move evt2irq and irq2evt macros definitions out of sh and arm includes
into a common location.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
/include/linux/sh_intc.h
0f966d74cf77a9140a025464a287e1d2fee8a1fc 23-Dec-2011 Rafael J. Wysocki <rjw@sisk.pl> PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume

Since the SH7372's INTCS in included into syscore suspend/resume,
which causes the chip to be accessed when PM domains have been
turned off during system suspend, the A4R domain containing the
INTCS has to stay on during system sleep, which is suboptimal
from the power consumption point of view.

For this reason, add a new INTC flag, skip_syscore_suspend, to mark
the INTCS for intc_suspend() and intc_resume(), so that they don't
touch it. This allows the A4R domain to be turned off during
system suspend and the INTCS state is resrored during system
resume by the A4R's "power on" code.

Suggested-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
/include/linux/sh_intc.h
99870bd784ff9eb2405eab060125c0ded74968cd 08-Nov-2010 Paul Mundt <lethal@linux-sh.org> sh: intc: Fix up initializers for gcc 4.5.

The _INTC_ARRAY() initializer presently does a NULL test which blows up
as a non-constant initializer under gcc 4.5. This switches over to a type
test to account for NULL initializers explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
38ab13441c36c0c470b7e4e3b30ec2fb6beba253 26-Oct-2010 Paul Mundt <lethal@linux-sh.org> sh: Switch dynamic IRQ creation to generic irq allocator.

Now that the genirq code provides an IRQ bitmap of its own and the
necessary API to manipulate it, there's no need to keep our own version
around anymore.

In the process we kill off some unused IRQ reservation code, with future
users now having to tie in to the genirq API as normal.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
2be6bb0c79c7fbda3425b65ee51c558bbaf4cf91 05-Oct-2010 Paul Mundt <lethal@linux-sh.org> sh: intc: Split up the INTC code.

This splits up the sh intc core in to something more vaguely resembling
a subsystem. Most of the functionality was alread fairly well
compartmentalized, and there were only a handful of interdependencies
that needed to be resolved in the process.

This also serves as future-proofing for the genirq and sparseirq rework,
which will make some of the split out functionality wholly generic,
allowing things to be killed off in place with minimal migration pain.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
d74310d3b18aabbb7d0549ea9e3fd3259c1dce00 05-Oct-2010 Paul Mundt <lethal@linux-sh.org> sh: intc: Handle early lookups of subgroup IRQs.

If lookups happen while the radix node still points to a subgroup
mapping, an IRQ hasn't yet been made available for the specified id, so
error out accordingly. Once the slot is replaced with an IRQ mapping and
the tag is discarded, lookup can commence as normal.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
c1e30ad98fe210688edca872686db4a715c2fb23 04-Oct-2010 Paul Mundt <lethal@linux-sh.org> sh: intc: Support virtual mappings for IRQ subgroups.

Many interrupts that share a single mask source but are on different
hardware vectors will have an associated register tied to an INTEVT that
denotes the precise cause for the interrupt exception being triggered.

This introduces the concept of IRQ subgroups in the intc core, where
a virtual IRQ map is constructed for each of the pre-defined cause bits,
and a higher level chained handler takes control of the parent INTEVT.
This enables CPUs with heavily muxed IRQ vectors (especially across
disjoint blocks) to break things out in to a series of managed chained
handlers while being able to dynamically lookup and adopt the IRQs
created for them.

This is largely an opt-in interface, requiring CPUs to manually submit
IRQs for subgroup splitting, in addition to providing identifiers in
their enum maps that can be used for lazy lookup via the radix tree.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
44629f57accccbb8e6d443246fe6f51b42f7f781 23-Sep-2010 Paul Mundt <lethal@linux-sh.org> sh: intc: Implement reverse mapping for IRQs to per-controller IDs.

This implements a scheme roughly analogous to the PowerPC virtual to
hardware IRQ mapping, which we use for IRQ to per-controller ID mapping.
This makes it possible for drivers to use the IDs directly for lookup
instead of hardcoding the vector.

The main motivation for this work is as a building block for dynamically
allocating virtual IRQs for demuxing INTC events sharing a single INTEVT
in addition to a common masking source.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
4bacd796ccd6976b03dd490708a1abc291d5521e 02-Oct-2010 Paul Mundt <lethal@linux-sh.org> sh: Support early IRQ vector map reservation for delayed controllers.

Some controllers will need to be initialized lazily due to pinmux
constraints, while others may simply have no need to be brought online if
there are no backing devices for them attached. In this case it's still
necessary to be able to reserve their hardware vector map before dynamic
IRQs get a hold of them.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
dc825b17904a06bbd2f79d720b23156e4c01a22f 15-Apr-2010 Paul Mundt <lethal@linux-sh.org> sh: intc: IRQ auto-distribution support.

This implements support for hardware-managed IRQ balancing as implemented
by SH-X3 cores (presently only hooked up for SH7786, but can probably be
carried over to other SH-X3 cores, too).

CPUs need to specify their distribution register along with the mask
definitions, as these follow the same format. Peripheral IRQs that don't
opt out of balancing will be automatically distributed at the whim of the
hardware block, while each CPU needs to verify whether it is handling the
IRQ or not, especially before clearing the mask.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
43b8774dc409ea5d9369b978e2e7bc79289f0522 13-Apr-2010 Paul Mundt <lethal@linux-sh.org> sh: intc: userimask support.

This adds support for hardware-assisted userspace irq masking for
special priority levels. Due to the SR.IMASK interactivity, only some
platforms implement this in hardware (including but not limited to
SH-4A interrupt controllers, and ARM-based SH-Mobile CPUs). Each CPU
needs to wire this up on its own, for now only SH7786 is wired up as an
example.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
dec710b77c2cf04bf512acada3c14a16f11708d9 19-Mar-2010 Magnus Damm <damm@opensource.se> sh: INTC ioremap support

Extend the INTC code with ioremap() support V2.

Support INTC controllers that are not accessible through
a 1:1 virt:phys window. Needed by SH-Mobile ARM INTCS.

The INTC code behaves as usual if the io window resource
is omitted. The slow phys->virt lookup only happens during
setup. The fast path code operates on virtual addresses.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
01e9651a21bc0e6731da733593e4aaf4cf46b5e5 10-Mar-2010 Magnus Damm <damm@opensource.se> sh: add INTC out of memory error handling

Extend the INTC code to warn and return an error code
in the case of memory allocation failure.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
d85429a31790361b9e952be3817134c23b3b758a 15-Feb-2010 Magnus Damm <damm@opensource.se> sh: extend INTC with force_disable

Extend the shared INTC code with force_disable support to
allow keeping mask bits statically disabled. Needed for
SDHI support to mask out unsupported interrupt sources.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
d519095344fda705c9840a579acf6aa6205c37cc 09-Feb-2010 Magnus Damm <damm@opensource.se> sh: extend INTC with force_enable

Extend the shared INTC code with force_enable support to
allow keeping mask bits statically enabled. Needed by
upcoming INTC SDHI patches that mux together a bunch of
vectors to a single linux interrupt which is masked by
a priority register, but needs individual mask bits
constantly enabled.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
577cd7584cf5199f1ea22cca0ad1fa129a98effa 09-Feb-2010 Magnus Damm <damm@opensource.se> sh: extend INTC with struct intc_hw_desc

This patch updates the INTC code by moving all vectors,
groups and registers from struct intc_desc to struct
intc_hw_desc.

The idea is that INTC tables should go from using the
macro(s) DECLARE_INTC_DESC..() only to using struct
intc_desc with name and hw initialized using the macro
INTC_HW_DESC(). This move makes it easy to initialize
an extended struct intc_desc in the future.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
45b9deaf14e74543371aa8faea69c14e27b038c6 02-Nov-2009 Paul Mundt <lethal@linux-sh.org> sh: intc: Handle legacy IRQ reservation in vector map.

Different CPUs will have different starting vectors, with varying
amounts of reserved or unusable vector space prior to the first slot.
This introduces a legacy vector reservation system that inserts itself in
between the CPU vector map registration and the platform specific IRQ
setup. This works fine in practice as the only new vectors that boards
need to establish on their own should be dynamically allocated rather
than arbitrarily assigned. As a plus, this also makes all of the
converted platforms sparseirq ready.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
9b798d50df3a98d22a6cbae565d9f4f630d161a6 27-Oct-2009 Paul Mundt <lethal@linux-sh.org> sh: intc: Make ack_regs generally available.

Currently this is ifdef'ed under SH-3 and SH-4A, but there are other CPUs
that will need this as well. Given the size of the existing data
structures, this doesn't cause any additional cacheline utilization for
the existing users, so has no direct impact on the data structures.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
05ecd5a1f76c183cca381705b3adb7d77c9a0439 24-Aug-2009 Pawel Moll <pawel.moll@st.com> sh: Simplify "multi-evt" interrupt handling.

This patch changes the way in which "multi-evt" interrups are handled.
The intc_evt2irq_table and related intc_evt2irq() have been removed and
the "redirecting" handler is installed for the coupled interrupts.

Thanks to that the do_IRQ() function don't have to use another level
of indirection for all the interrupts...

Signed-off-by: Pawel Moll <pawel.moll@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
/include/linux/sh_intc.h
bdaa6e8062d7f8085d8ed94ff88c99406ad53d79 24-Feb-2009 Magnus Damm <damm@igel.co.jp> 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>
/include/linux/sh_intc.h
bbfbd8b151fe35c9a1180a7f5254c5d6b8387cc0 01-Oct-2008 Paul Mundt <lethal@linux-sh.org> 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>
/include/linux/sh_intc.h