aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/fb.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/plat-omap/fb.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/plat-omap/fb.c')
-rw-r--r--arch/arm/plat-omap/fb.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 0054b9501a53..c9e5d7298c40 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -36,6 +36,8 @@
36#include <plat/board.h> 36#include <plat/board.h>
37#include <plat/sram.h> 37#include <plat/sram.h>
38 38
39#include "fb.h"
40
39#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) 41#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
40 42
41static struct omapfb_platform_data omapfb_config; 43static struct omapfb_platform_data omapfb_config;
@@ -94,7 +96,7 @@ static int fbmem_region_reserved(unsigned long start, size_t size)
94 * Get the region_idx`th region from board config/ATAG and convert it to 96 * Get the region_idx`th region from board config/ATAG and convert it to
95 * our internal format. 97 * our internal format.
96 */ 98 */
97static int get_fbmem_region(int region_idx, struct omapfb_mem_region *rg) 99static int __init get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
98{ 100{
99 const struct omap_fbmem_config *conf; 101 const struct omap_fbmem_config *conf;
100 u32 paddr; 102 u32 paddr;
@@ -126,7 +128,7 @@ static int set_fbmem_region_type(struct omapfb_mem_region *rg, int mem_type,
126 * type = 0 && paddr = 0, a default don't care case maps to 128 * type = 0 && paddr = 0, a default don't care case maps to
127 * the SDRAM type. 129 * the SDRAM type.
128 */ 130 */
129 if (rg->type || (!rg->type && !rg->paddr)) 131 if (rg->type || !rg->paddr)
130 return 0; 132 return 0;
131 if (ranges_overlap(rg->paddr, rg->size, mem_start, mem_size)) { 133 if (ranges_overlap(rg->paddr, rg->size, mem_start, mem_size)) {
132 rg->type = mem_type; 134 rg->type = mem_type;
@@ -173,11 +175,7 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
173 175
174static int valid_sdram(unsigned long addr, unsigned long size) 176static int valid_sdram(unsigned long addr, unsigned long size)
175{ 177{
176 struct memblock_property res; 178 return memblock_is_region_memory(addr, size);
177
178 res.base = addr;
179 res.size = size;
180 return !memblock_find(&res) && res.base == addr && res.size == size;
181} 179}
182 180
183static int reserve_sdram(unsigned long addr, unsigned long size) 181static int reserve_sdram(unsigned long addr, unsigned long size)
@@ -262,7 +260,7 @@ void __init omapfb_reserve_sdram_memblock(void)
262 * this point, since the driver built as a module would have problem with 260 * this point, since the driver built as a module would have problem with
263 * freeing / reallocating the regions. 261 * freeing / reallocating the regions.
264 */ 262 */
265unsigned long omapfb_reserve_sram(unsigned long sram_pstart, 263unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
266 unsigned long sram_vstart, 264 unsigned long sram_vstart,
267 unsigned long sram_size, 265 unsigned long sram_size,
268 unsigned long pstart_avail, 266 unsigned long pstart_avail,
@@ -336,7 +334,7 @@ void omapfb_set_ctrl_platform_data(void *data)
336 omapfb_config.ctrl_platform_data = data; 334 omapfb_config.ctrl_platform_data = data;
337} 335}
338 336
339static inline int omap_init_fb(void) 337static int __init omap_init_fb(void)
340{ 338{
341 const struct omap_lcd_config *conf; 339 const struct omap_lcd_config *conf;
342 340
@@ -381,7 +379,7 @@ void omapfb_set_platform_data(struct omapfb_platform_data *data)
381 omapfb_config = *data; 379 omapfb_config = *data;
382} 380}
383 381
384static inline int omap_init_fb(void) 382static int __init omap_init_fb(void)
385{ 383{
386 return platform_device_register(&omap_fb_device); 384 return platform_device_register(&omap_fb_device);
387} 385}
@@ -392,7 +390,7 @@ void omapfb_reserve_sdram_memblock(void)
392{ 390{
393} 391}
394 392
395unsigned long omapfb_reserve_sram(unsigned long sram_pstart, 393unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
396 unsigned long sram_vstart, 394 unsigned long sram_vstart,
397 unsigned long sram_size, 395 unsigned long sram_size,
398 unsigned long start_avail, 396 unsigned long start_avail,
@@ -411,7 +409,7 @@ void omapfb_reserve_sdram_memblock(void)
411{ 409{
412} 410}
413 411
414unsigned long omapfb_reserve_sram(unsigned long sram_pstart, 412unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
415 unsigned long sram_vstart, 413 unsigned long sram_vstart,
416 unsigned long sram_size, 414 unsigned long sram_size,
417 unsigned long start_avail, 415 unsigned long start_avail,