diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/fb.c | 47 |
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 | ||
58 | void omapfb_set_platform_data(struct omapfb_platform_data *data) | ||
59 | { | ||
60 | } | ||
61 | |||
58 | static inline int ranges_overlap(unsigned long start1, unsigned long size1, | 62 | static 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 | ||
328 | arch_initcall(omap_init_fb); | 332 | arch_initcall(omap_init_fb); |
329 | 333 | ||
330 | #else | 334 | #elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) |
335 | |||
336 | static u64 omap_fb_dma_mask = ~(u32)0; | ||
337 | static struct omapfb_platform_data omapfb_config; | ||
338 | |||
339 | static 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 | |||
350 | void omapfb_set_platform_data(struct omapfb_platform_data *data) | ||
351 | { | ||
352 | omapfb_config = *data; | ||
353 | } | ||
354 | |||
355 | static inline int omap_init_fb(void) | ||
356 | { | ||
357 | return platform_device_register(&omap_fb_device); | ||
358 | } | ||
359 | |||
360 | arch_initcall(omap_init_fb); | ||
331 | 361 | ||
332 | void omapfb_reserve_sdram(void) {} | 362 | void omapfb_reserve_sdram(void) {} |
333 | unsigned long omapfb_reserve_sram(unsigned long sram_pstart, | 363 | unsigned 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 | |||
374 | void omapfb_set_platform_data(struct omapfb_platform_data *data) | ||
375 | { | ||
376 | } | ||
377 | |||
378 | void omapfb_reserve_sdram(void) {} | ||
379 | unsigned 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 |