diff options
-rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 14 | ||||
-rw-r--r-- | arch/avr32/kernel/setup.c | 2 | ||||
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 8 |
4 files changed, 34 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 37cd547855b1..728bb8f39441 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -539,6 +539,17 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) | |||
539 | at91_set_B_periph(AT91_PIN_PB28, 0); /* LCDD23 */ | 539 | at91_set_B_periph(AT91_PIN_PB28, 0); /* LCDD23 */ |
540 | #endif | 540 | #endif |
541 | 541 | ||
542 | if (ARRAY_SIZE(lcdc_resources) > 2) { | ||
543 | void __iomem *fb; | ||
544 | struct resource *fb_res = &lcdc_resources[2]; | ||
545 | size_t fb_len = fb_res->end - fb_res->start + 1; | ||
546 | |||
547 | fb = ioremap_writecombine(fb_res->start, fb_len); | ||
548 | if (fb) { | ||
549 | memset(fb, 0, fb_len); | ||
550 | iounmap(fb, fb_len); | ||
551 | } | ||
552 | } | ||
542 | lcdc_data = *data; | 553 | lcdc_data = *data; |
543 | platform_device_register(&at91_lcdc_device); | 554 | platform_device_register(&at91_lcdc_device); |
544 | } | 555 | } |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index dbb9a5fc2090..054689804e77 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -381,6 +381,20 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) | |||
381 | at91_set_B_periph(AT91_PIN_PC24, 0); /* LCDD22 */ | 381 | at91_set_B_periph(AT91_PIN_PC24, 0); /* LCDD22 */ |
382 | at91_set_B_periph(AT91_PIN_PC25, 0); /* LCDD23 */ | 382 | at91_set_B_periph(AT91_PIN_PC25, 0); /* LCDD23 */ |
383 | 383 | ||
384 | #ifdef CONFIG_FB_INTSRAM | ||
385 | { | ||
386 | void __iomem *fb; | ||
387 | struct resource *fb_res = &lcdc_resources[2]; | ||
388 | size_t fb_len = fb_res->end - fb_res->start + 1; | ||
389 | |||
390 | fb = ioremap_writecombine(fb_res->start, fb_len); | ||
391 | if (fb) { | ||
392 | memset(fb, 0, fb_len); | ||
393 | iounmap(fb, fb_len); | ||
394 | } | ||
395 | } | ||
396 | #endif | ||
397 | |||
384 | lcdc_data = *data; | 398 | lcdc_data = *data; |
385 | platform_device_register(&at91_lcdc_device); | 399 | platform_device_register(&at91_lcdc_device); |
386 | } | 400 | } |
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index 2687b730e2d0..ce48c14f4349 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
@@ -274,6 +274,8 @@ static int __init early_parse_fbmem(char *p) | |||
274 | printk(KERN_WARNING | 274 | printk(KERN_WARNING |
275 | "Failed to allocate framebuffer memory\n"); | 275 | "Failed to allocate framebuffer memory\n"); |
276 | fbmem_size = 0; | 276 | fbmem_size = 0; |
277 | } else { | ||
278 | memset(__va(fbmem_start), 0, fbmem_size); | ||
277 | } | 279 | } |
278 | } | 280 | } |
279 | 281 | ||
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index fc65c02306dd..4d68b1b880d6 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -250,6 +250,8 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo) | |||
250 | return -ENOMEM; | 250 | return -ENOMEM; |
251 | } | 251 | } |
252 | 252 | ||
253 | memset(info->screen_base, 0, info->fix.smem_len); | ||
254 | |||
253 | return 0; | 255 | return 0; |
254 | } | 256 | } |
255 | 257 | ||
@@ -634,7 +636,6 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo) | |||
634 | struct fb_info *info = sinfo->info; | 636 | struct fb_info *info = sinfo->info; |
635 | int ret = 0; | 637 | int ret = 0; |
636 | 638 | ||
637 | memset_io(info->screen_base, 0, info->fix.smem_len); | ||
638 | info->var.activate |= FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW; | 639 | info->var.activate |= FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW; |
639 | 640 | ||
640 | dev_info(info->device, | 641 | dev_info(info->device, |
@@ -764,6 +765,11 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
764 | info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); | 765 | info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); |
765 | if (!info->screen_base) | 766 | if (!info->screen_base) |
766 | goto release_intmem; | 767 | goto release_intmem; |
768 | |||
769 | /* | ||
770 | * Don't clear the framebuffer -- someone may have set | ||
771 | * up a splash image. | ||
772 | */ | ||
767 | } else { | 773 | } else { |
768 | /* alocate memory buffer */ | 774 | /* alocate memory buffer */ |
769 | ret = atmel_lcdfb_alloc_video_memory(sinfo); | 775 | ret = atmel_lcdfb_alloc_video_memory(sinfo); |