]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-at91/at91sam9rl_devices.c
atmel_lcdfb: don't initialize a pre-allocated framebuffer
[linux-2.6-omap-h63xx.git] / arch / arm / mach-at91 / at91sam9rl_devices.c
index dbb9a5fc2090250855daa02b7d6f65a9dfce7fe3..054689804e77571213012852f4dc771f5f70501e 100644 (file)
@@ -381,6 +381,20 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
        at91_set_B_periph(AT91_PIN_PC24, 0);    /* LCDD22 */
        at91_set_B_periph(AT91_PIN_PC25, 0);    /* LCDD23 */
 
+#ifdef CONFIG_FB_INTSRAM
+       {
+               void __iomem *fb;
+               struct resource *fb_res = &lcdc_resources[2];
+               size_t fb_len = fb_res->end - fb_res->start + 1;
+
+               fb = ioremap_writecombine(fb_res->start, fb_len);
+               if (fb) {
+                       memset(fb, 0, fb_len);
+                       iounmap(fb, fb_len);
+               }
+       }
+#endif
+
        lcdc_data = *data;
        platform_device_register(&at91_lcdc_device);
 }