]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/omap/rfbi.c
FB: OMAP: DISPC: Allow multiple external IRQ handlers
[linux-2.6-omap-h63xx.git] / drivers / video / omap / rfbi.c
index 789cfd23c36b1477734b59f9e5accdcead17e6fd..29fa368f5221e2bfc97cbe0110958bd8cf52631f 100644 (file)
@@ -2,7 +2,7 @@
  * OMAP2 Remote Frame Buffer Interface support
  *
  * Copyright (C) 2005 Nokia Corporation
- * Author: Juha Yrjölä <juha.yrjola@nokia.com>
+ * Author: Juha Yrj�l� <juha.yrjola@nokia.com>
  *        Imre Deak <imre.deak@nokia.com>
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <asm/arch/omapfb.h>
+#include <mach/omapfb.h>
 
 #include "dispc.h"
 
 
 #define DISPC_BASE             0x48050400
 #define DISPC_CONTROL          0x0040
+#define DISPC_IRQ_FRAMEMASK     0x0001
 
 static struct {
-       u32             base;
+       void __iomem    *base;
        void            (*lcdc_callback)(void *data);
        void            *lcdc_callback_data;
        unsigned long   l4_khz;
@@ -518,7 +519,11 @@ static int rfbi_init(struct omapfb_device *fbdev)
        int r;
 
        rfbi.fbdev = fbdev;
-       rfbi.base = io_p2v(RFBI_BASE);
+       rfbi.base = ioremap(RFBI_BASE, SZ_1K);
+       if (!rfbi.base) {
+               dev_err(fbdev->dev, "can't ioremap RFBI\n");
+               return -ENOMEM;
+       }
 
        if ((r = rfbi_get_clocks()) < 0)
                return r;
@@ -547,7 +552,8 @@ 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) {
+       if ((r = omap_dispc_request_irq(DISPC_IRQ_FRAMEMASK, rfbi_dma_callback,
+                                        NULL)) < 0) {
                dev_err(fbdev->dev, "can't get DISPC irq\n");
                rfbi_enable_clocks(0);
                return r;
@@ -564,8 +570,9 @@ 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);
 }
 
 const struct lcd_ctrl_extif omap2_ext_if = {