return 0;
}
-/* Get the region_idx`th region from board config/ATAG and convert it to
+/*
+ * Get the region_idx`th region from board config/ATAG and convert it to
* our internal format.
*/
static int get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
return -ENOENT;
paddr = conf->start;
- /* Low bits encode the page allocation mode, if high bits
+ /*
+ * Low bits encode the page allocation mode, if high bits
* are zero. Otherwise we need a page aligned fixed
* address.
*/
unsigned long mem_start,
unsigned long mem_size)
{
- /* Check if the configuration specifies the type explicitly.
+ /*
+ * Check if the configuration specifies the type explicitly.
* type = 0 && paddr = 0, a default don't care case maps to
* the SDRAM type.
*/
/* Allocate this dynamically, leave paddr 0 for now. */
return 0;
- /* Fixed region for the given RAM range. Check if it's already
+ /*
+ * Fixed region for the given RAM range. Check if it's already
* reserved by the FB code or someone else.
*/
if (fbmem_region_reserved(paddr, size) ||
return 0;
}
-/* Called from map_io. We need to call to this early enough so that we
+/*
+ * 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;
return;
}
if (rg.paddr)
- reserve_bootmem(rg.paddr, rg.size);
+ reserve_bootmem(rg.paddr, rg.size, BOOTMEM_DEFAULT);
reserved += rg.size;
omapfb_config.mem_desc.region[i] = rg;
configured_regions++;
reserved);
}
-/* Called at sram init time, before anything is pushed to the SRAM stack.
+/*
+ * Called at sram init time, before anything is pushed to the SRAM stack.
* Because of the stack scheme, we will allocate everything from the
* start of the lowest address region to the end of SRAM. This will also
* include padding for page alignment and possible holes between regions.
size_avail = (size_avail - rg.size) & PAGE_MASK;
rg.paddr = pstart_avail + size_avail;
}
- /* Reserve everything above the start of the region.
- */
+ /* Reserve everything above the start of the region. */
if (pend_avail - rg.paddr > reserved)
reserved = pend_avail - rg.paddr;
size_avail = pend_avail - reserved - pstart_avail;
- /* We have a kernel mapping for this already, so the
+ /*
+ * We have a kernel mapping for this already, so the
* driver won't have to make one.
*/
rg.vaddr = (void *)(sram_vstart + rg.paddr - sram_pstart);