ARM: OMAP: enable mailbox irq per instance

The machine-specific omap2_mbox_startup is called only once
to initialize the whole mbox module, and as a result,
enabling the mbox irq at that point only works for the very first
mailbox instance opened.

Instead, this patch makes sure enable_irq() is called every
time a new mbox instance is opened. In addition, we're now
enabling the mbox's irq only after its notifier_block is registered,
to avoid possible race of receiving an interrupt without invoking
the user's notifier callback.

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
[ohad@wizery.com: slightly reworded the commit log]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
ARM: OMAP4: fix irq and clock name for dsp-iommu

Irq and clock names were wrong for dsp iommu configuration
for omap4.

- Renamed tesla_ick to dsp_fck:
   This is required because the new naming convention introduced
   by: commit 0e43327 "OMAP4 clock: Fix clock names and align
   with hwmod names"

- Renamed INT_44XX_DSP_MMU to OMAP44XX_IRQ_TESLA_MMU.
   Naming convention adopted since: commit e927f8d "omap4: Add
   auto-generated irq and dma headers"

- dsp-iommu is enabled by default.

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
ARM: OMAP4: hwspinlocks_init() should be static

Sparse found out that hwspinlocks_init() wasn't marked static,
and it should've been.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Merge branch 'for-tony' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/linux into fixes-omap4-dsp
sh: mach-se: Migrate 7724SE off of deprecated dynamic IRQ API.

The generic hardirq layer provides all of the routines that we need these
days, so we don't require any of the dynamic IRQ API wrapping, and can
call in to irq_alloc_descs() directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: hd64461: Migrate off of deprecated dynamic IRQ API.

Switches from create_irq_nr() to irq_alloc_descs().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: dreamcast: Migrate off of deprecated dynamic IRQ API.

Switches from create_irq_nr() to irq_alloc_descs().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
spi: Add "spi:" prefix to modalias attribute of spi devices

The modalias attribute of spi devices doesn't have the "spi:" prefix
that is used in the UEVENT and in spi device drivers.  This patch adds
the prefix so the modprobe can correctly match modules to devices.

Reported-by: David Daney <david.daney@cavium.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drm/i915: All members of gen4 have hotplug, so unconditionally enable its irq

Also as we set the HOTPLUG_EN to 0 during pre-install, we can simply set
it during post-install, and nor do we wish to enable unwanted hotplug
events.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915: Inspect the right status bits for DP/HDMI hotplug on gen4

The status bits corresponding to the interrupt enable bits are the
"live" hotplug status bits, and reflect the current status of the port
(high for a detected connection, low for a disconnect). The actual bits
corresponding to the interrupt source are elsewhere. The actual event is
then determined by a combination of the interrupt flag and the current
live status (if the interrupt is active, but the current status is not,
then we have detected a disconnect.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915: SDVO hotplug have different interrupt status bits for i915/i965/g4x

Note that gen3 is the only platform where we've got the bit
definitions right, hence the workaround of disabling sdvo hotplug
support on i945g/gm is not due to misdiagnosis of broken hotplug irq
handling ...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: add some blurb about sdvo hotplug fail on i945g/gm I've
wondered about while reviewing.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915/hdmi: Query the live connector status bit for G4x

Similar to g4x_dp_detect() we should probe the PORT_HOTPLUG_STATUS as to
whether the connector is active prior to attempting to retrieve the EDID.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915/dp: For consistency use the DP hotplug synonyms

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915: clarify preferred sdvo input mode code

- kill intel_sdvo->input_dtd, it's only used as a temporary variable,
  we store the preferred input mode in the adjusted mode at mode_fixup
  time.
- rename the function to make it clear what we want it to do (get the
  preferred mode) and say in a comment what it unfortunately does as a
  side-effect (set the new output timings).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drm/i915: don't silently ignore sdvo mode_set failures

Unfortunately we can't abort a mode_set, but at least tell the user
that something might have gone wrong when setting the sdvo input or
output timing fails.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
sh: Kill off now unused arch_probe_nr_irqs().

Now that legacy pre-allocation is done away with, we can just use the
generic stub in kernel/softirq.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh64: Convert to unwinder API.

This switches over to use the sh unwinder API which brings it all in line
with the general sh routines (which we shuffle around at the same time),
and lets us kill off more sh64-specific cruft.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh64: Ensure KALLSYMS is enabled for unwinder use.

Since sh64 depends on kallsyms unconditionally for its stack unwinding to
be of any use, make sure it's selected. In practice we don't have any
case where it's disabled anyways, so moving to this to a select is fine.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: mach-x3proto: Migrate to linear irq domain.

In the interest of getting off of the create_irq() API we can get all of
the functionality we're interested in through a linear IRQ domain. Fairly
straightforward conversion utilizing a single linear domain.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: se722: Move FPGA IRQs to irqdomain and generic irq chip.

This implements a total rewrite of the rather buggy SE7722 FPGA IRQ code,
utilizing a linear irq domain as well as the generic irq chip type.

While the interaction between the two APIs is a bit clunky (ie, revmap
lookup for gc irq_base), they work well enough together that it's easy
enough to work with going forward.

While we're at it, deal with irq_mask_ack/unmask of the chained IRQ in
the demux handler to prevent smc91x screaming about spurious interrupts.

There's also some more improvement that can be made to the irqdomain code
to create backing irqdescs for the entire linear range in one bang
instead of iterating over the number of hwirqs and doing it
irq-at-a-time. This is easily dealt with at a later point, though.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>