vserver 1.9.5.x5
[linux-2.6.git] / arch / arm / mach-integrator / impd1.c
index 0859557..c3c2f17 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/errno.h>
+#include <linux/mm.h>
 
 #include <asm/io.h>
 #include <asm/hardware/icst525.h>
@@ -34,7 +35,7 @@ module_param_named(lmid, module_id, int, 0444);
 MODULE_PARM_DESC(lmid, "logic module stack position");
 
 struct impd1_module {
-       void            *base;
+       void __iomem    *base;
        struct clk      vcos[2];
 };
 
@@ -259,6 +260,17 @@ static int impd1fb_clcd_setup(struct clcd_fb *fb)
        return ret;
 }
 
+static int impd1fb_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
+{
+       unsigned long start, size;
+
+       start = vma->vm_pgoff + (fb->fb.fix.smem_start >> PAGE_SHIFT);
+       size = vma->vm_end - vma->vm_start;
+
+       return remap_pfn_range(vma, vma->vm_start, start, size,
+                              vma->vm_page_prot);
+}
+
 static void impd1fb_clcd_remove(struct clcd_fb *fb)
 {
        iounmap(fb->fb.screen_base);
@@ -272,6 +284,7 @@ static struct clcd_board impd1_clcd_data = {
        .disable        = impd1fb_clcd_disable,
        .enable         = impd1fb_clcd_enable,
        .setup          = impd1fb_clcd_setup,
+       .mmap           = impd1fb_clcd_mmap,
        .remove         = impd1fb_clcd_remove,
 };