]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/fb.c
OMAPFB: fix printing of reserved memory
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / fb.c
index 469f580ca057c184424698534ee916f8ed95499d..7af9e91ee677c46fb24e8d76a58751491ff0b3ba 100644 (file)
 
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/bootmem.h>
 
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/io.h>
-#include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
-#include <asm/arch/board.h>
-#include <asm/arch/sram.h>
-#include <asm/arch/omapfb.h>
+#include <mach/board.h>
+#include <mach/sram.h>
+#include <mach/omapfb.h>
 
 #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
 
@@ -171,7 +171,7 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
  * Called from map_io. We need to call to this early enough so that we
  * can reserve the fixed SDRAM regions before VM could get hold of them.
  */
-void omapfb_reserve_sdram(void)
+void __init omapfb_reserve_sdram(void)
 {
        struct bootmem_data     *bdata;
        unsigned long           sdram_start, sdram_size;
@@ -182,7 +182,7 @@ void omapfb_reserve_sdram(void)
                return;
 
        bdata = NODE_DATA(0)->bdata;
-       sdram_start = bdata->node_boot_start;
+       sdram_start = bdata->node_min_pfn << PAGE_SHIFT;
        sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start;
        reserved = 0;
        for (i = 0; ; i++) {
@@ -206,9 +206,10 @@ void omapfb_reserve_sdram(void)
                        config_invalid = 1;
                        return;
                }
-               if (rg.paddr)
-                       reserve_bootmem(rg.paddr, rg.size);
-               reserved += rg.size;
+               if (rg.paddr) {
+                       reserve_bootmem(rg.paddr, rg.size, BOOTMEM_DEFAULT);
+                       reserved += rg.size;
+               }
                omapfb_config.mem_desc.region[i] = rg;
                configured_regions++;
        }
@@ -333,9 +334,10 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
                                  unsigned long sram_vstart,
                                  unsigned long sram_size,
                                  unsigned long start_avail,
-                                 unsigned long size_avail) {}
+                                 unsigned long size_avail)
+{
+       return 0;
+}
 
 
 #endif
-
-