omapfb: dispc: allow multiple external IRQ handlers
Previously, the only external (to dispc.c) IRQ handler was RFBI's frame
done handler. dispc's IRQ framework was very dumb: you could only have
one handler, and the semantics of {request,free}_irq were odd, to say the
least.
The new framework allows multiple consumers to register arbitrary IRQ
masks.
Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
48a00e7fe9
commit
4c88ef170f
@@ -57,6 +57,7 @@
|
||||
|
||||
#define DISPC_BASE 0x48050400
|
||||
#define DISPC_CONTROL 0x0040
|
||||
#define DISPC_IRQ_FRAMEMASK 0x0001
|
||||
|
||||
static struct {
|
||||
void __iomem *base;
|
||||
@@ -553,7 +554,9 @@ static int rfbi_init(struct omapfb_device *fbdev)
|
||||
l = (0x01 << 2);
|
||||
rfbi_write_reg(RFBI_CONTROL, l);
|
||||
|
||||
if ((r = omap_dispc_request_irq(rfbi_dma_callback, NULL)) < 0) {
|
||||
r = omap_dispc_request_irq(DISPC_IRQ_FRAMEMASK, rfbi_dma_callback,
|
||||
NULL);
|
||||
if (r < 0) {
|
||||
dev_err(fbdev->dev, "can't get DISPC irq\n");
|
||||
rfbi_enable_clocks(0);
|
||||
return r;
|
||||
@@ -570,7 +573,7 @@ static int rfbi_init(struct omapfb_device *fbdev)
|
||||
|
||||
static void rfbi_cleanup(void)
|
||||
{
|
||||
omap_dispc_free_irq();
|
||||
omap_dispc_free_irq(DISPC_IRQ_FRAMEMASK, rfbi_dma_callback, NULL);
|
||||
rfbi_put_clocks();
|
||||
iounmap(rfbi.base);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user