aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/fb.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2009-08-04 09:12:50 -0400
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2009-12-09 05:12:44 -0500
commitb39a982ddecf1d95ed96f8457c39d3ea11df93f6 (patch)
tree07d233ede4b49bddb2776ee013cbdf5621e7845b /arch/arm/plat-omap/fb.c
parent3de7a1dc0c9d29b138713ecb85df4b6ca3af2ef3 (diff)
OMAP: DSS2: omapfb driver
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'arch/arm/plat-omap/fb.c')
-rw-r--r--arch/arm/plat-omap/fb.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 18cf1d4b7931..d3eea4f47533 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -55,6 +55,10 @@ static struct platform_device omap_fb_device = {
55 .num_resources = 0, 55 .num_resources = 0,
56}; 56};
57 57
58void omapfb_set_platform_data(struct omapfb_platform_data *data)
59{
60}
61
58static inline int ranges_overlap(unsigned long start1, unsigned long size1, 62static inline int ranges_overlap(unsigned long start1, unsigned long size1,
59 unsigned long start2, unsigned long size2) 63 unsigned long start2, unsigned long size2)
60{ 64{
@@ -327,7 +331,33 @@ static inline int omap_init_fb(void)
327 331
328arch_initcall(omap_init_fb); 332arch_initcall(omap_init_fb);
329 333
330#else 334#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
335
336static u64 omap_fb_dma_mask = ~(u32)0;
337static struct omapfb_platform_data omapfb_config;
338
339static struct platform_device omap_fb_device = {
340 .name = "omapfb",
341 .id = -1,
342 .dev = {
343 .dma_mask = &omap_fb_dma_mask,
344 .coherent_dma_mask = ~(u32)0,
345 .platform_data = &omapfb_config,
346 },
347 .num_resources = 0,
348};
349
350void omapfb_set_platform_data(struct omapfb_platform_data *data)
351{
352 omapfb_config = *data;
353}
354
355static inline int omap_init_fb(void)
356{
357 return platform_device_register(&omap_fb_device);
358}
359
360arch_initcall(omap_init_fb);
331 361
332void omapfb_reserve_sdram(void) {} 362void omapfb_reserve_sdram(void) {}
333unsigned long omapfb_reserve_sram(unsigned long sram_pstart, 363unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
@@ -339,5 +369,20 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
339 return 0; 369 return 0;
340} 370}
341 371
372#else
373
374void omapfb_set_platform_data(struct omapfb_platform_data *data)
375{
376}
377
378void omapfb_reserve_sdram(void) {}
379unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
380 unsigned long sram_vstart,
381 unsigned long sram_size,
382 unsigned long start_avail,
383 unsigned long size_avail)
384{
385 return 0;
386}
342 387
343#endif 388#endif