diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-04 11:33:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-04 11:33:21 -0400 |
commit | 3230ca9dc656a2354b679e2e62ee7740485563a9 (patch) | |
tree | b5659a952454efe7ef18e6f34bf123e948ae413e /drivers/video | |
parent | 7dbb25a579fe1f068358a19928ada4f9be62e60d (diff) | |
parent | 6b794743b2c5e21825d35b5d5dd57d6fcc388198 (diff) |
Merge branch 'unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32
* 'unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32:
unicore32 framebuffer fix: get videomemory by __get_free_pages() and make it floatable
unicore32 core architecture: remove duplicated #include
unicore32 rtc driver fix: cleanup irq_set_freq and irq_set_state
unicore32 fix: remove arch-specific futex support
unicore32 ldscript fix: add cacheline parameter to PERCPU() macro
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fb-puv3.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/video/fb-puv3.c b/drivers/video/fb-puv3.c index dbd2dc4745d1..27f2c57e06e9 100644 --- a/drivers/video/fb-puv3.c +++ b/drivers/video/fb-puv3.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/vmalloc.h> | ||
17 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
18 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
19 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
@@ -531,7 +530,7 @@ static int unifb_set_par(struct fb_info *info) | |||
531 | return -EINVAL; | 530 | return -EINVAL; |
532 | } | 531 | } |
533 | 532 | ||
534 | writel(PKUNITY_UNIGFX_MMAP_BASE, UDE_FSA); | 533 | writel(info->fix.smem_start, UDE_FSA); |
535 | writel(info->var.yres, UDE_LS); | 534 | writel(info->var.yres, UDE_LS); |
536 | writel(get_line_length(info->var.xres, | 535 | writel(get_line_length(info->var.xres, |
537 | info->var.bits_per_pixel) >> 3, UDE_PS); | 536 | info->var.bits_per_pixel) >> 3, UDE_PS); |
@@ -680,13 +679,27 @@ static int unifb_probe(struct platform_device *dev) | |||
680 | struct fb_info *info; | 679 | struct fb_info *info; |
681 | u32 unifb_regs[UNIFB_REGS_NUM]; | 680 | u32 unifb_regs[UNIFB_REGS_NUM]; |
682 | int retval = -ENOMEM; | 681 | int retval = -ENOMEM; |
683 | struct resource *iomem, *mapmem; | 682 | struct resource *iomem; |
683 | void *videomemory; | ||
684 | |||
685 | videomemory = (void *)__get_free_pages(GFP_KERNEL | __GFP_COMP, | ||
686 | get_order(UNIFB_MEMSIZE)); | ||
687 | if (!videomemory) | ||
688 | goto err; | ||
689 | |||
690 | memset(videomemory, 0, UNIFB_MEMSIZE); | ||
691 | |||
692 | unifb_fix.smem_start = virt_to_phys(videomemory); | ||
693 | unifb_fix.smem_len = UNIFB_MEMSIZE; | ||
694 | |||
695 | iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); | ||
696 | unifb_fix.mmio_start = iomem->start; | ||
684 | 697 | ||
685 | info = framebuffer_alloc(sizeof(u32)*256, &dev->dev); | 698 | info = framebuffer_alloc(sizeof(u32)*256, &dev->dev); |
686 | if (!info) | 699 | if (!info) |
687 | goto err; | 700 | goto err; |
688 | 701 | ||
689 | info->screen_base = (char __iomem *)KUSER_UNIGFX_BASE; | 702 | info->screen_base = (char __iomem *)videomemory; |
690 | info->fbops = &unifb_ops; | 703 | info->fbops = &unifb_ops; |
691 | 704 | ||
692 | retval = fb_find_mode(&info->var, info, NULL, | 705 | retval = fb_find_mode(&info->var, info, NULL, |
@@ -695,13 +708,6 @@ static int unifb_probe(struct platform_device *dev) | |||
695 | if (!retval || (retval == 4)) | 708 | if (!retval || (retval == 4)) |
696 | info->var = unifb_default; | 709 | info->var = unifb_default; |
697 | 710 | ||
698 | iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); | ||
699 | unifb_fix.mmio_start = iomem->start; | ||
700 | |||
701 | mapmem = platform_get_resource(dev, IORESOURCE_MEM, 1); | ||
702 | unifb_fix.smem_start = mapmem->start; | ||
703 | unifb_fix.smem_len = UNIFB_MEMSIZE; | ||
704 | |||
705 | info->fix = unifb_fix; | 711 | info->fix = unifb_fix; |
706 | info->pseudo_palette = info->par; | 712 | info->pseudo_palette = info->par; |
707 | info->par = NULL; | 713 | info->par = NULL; |