aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/fb.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-12-07 16:58:10 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-08 15:36:31 -0400
commitc40fae9525e6c29c87a4f4361ff0a8d67a36e448 (patch)
tree00c3e0008b3e963c5a622245b951f1135e456c24 /arch/arm/plat-omap/fb.c
parentf4e4c324a5f81f18156499d1ade3732ba1f5b523 (diff)
ARM: OMAP: Sync core code with linux-omap
This patch syncs omap specific core code with linux-omap. Most of the changes are needed to fix bitrot caused by driver updates in linux-omap tree. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/fb.c')
-rw-r--r--arch/arm/plat-omap/fb.c72
1 files changed, 56 insertions, 16 deletions
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 91ebdafcca39..a302d9194f57 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -1,3 +1,26 @@
1/*
2 * File: arch/arm/plat-omap/fb.c
3 *
4 * Framebuffer device registration for TI OMAP platforms
5 *
6 * Copyright (C) 2006 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
1#include <linux/module.h> 24#include <linux/module.h>
2#include <linux/kernel.h> 25#include <linux/kernel.h>
3#include <linux/init.h> 26#include <linux/init.h>
@@ -34,25 +57,42 @@ static struct platform_device omap_fb_device = {
34void omapfb_reserve_mem(void) 57void omapfb_reserve_mem(void)
35{ 58{
36 const struct omap_fbmem_config *fbmem_conf; 59 const struct omap_fbmem_config *fbmem_conf;
60 unsigned long total_size;
61 int i;
62
63 if (!omap_fb_sram_valid) {
64 /* FBMEM SRAM configuration was already found to be invalid.
65 * Ignore the whole configuration block. */
66 omapfb_config.mem_desc.region_cnt = 0;
67 return;
68 }
69
70 i = 0;
71 total_size = 0;
72 while ((fbmem_conf = omap_get_nr_config(OMAP_TAG_FBMEM,
73 struct omap_fbmem_config, i)) != NULL) {
74 unsigned long start;
75 unsigned long size;
37 76
38 omapfb_config.fbmem.fb_sram_start = omap_fb_sram_start; 77 if (i == OMAPFB_PLANE_NUM) {
39 omapfb_config.fbmem.fb_sram_size = omap_fb_sram_size; 78 printk(KERN_ERR "ignoring extra plane info\n");
40 79 break;
41 fbmem_conf = omap_get_config(OMAP_TAG_FBMEM, struct omap_fbmem_config);
42
43 if (fbmem_conf != NULL) {
44 /* indicate that the bootloader already initialized the
45 * fb device, so we'll skip that part in the fb driver
46 */
47 omapfb_config.fbmem.fb_sdram_start = fbmem_conf->fb_sdram_start;
48 omapfb_config.fbmem.fb_sdram_size = fbmem_conf->fb_sdram_size;
49 if (fbmem_conf->fb_sdram_size) {
50 pr_info("Reserving %u bytes SDRAM for frame buffer\n",
51 fbmem_conf->fb_sdram_size);
52 reserve_bootmem(fbmem_conf->fb_sdram_start,
53 fbmem_conf->fb_sdram_size);
54 } 80 }
81 start = fbmem_conf->start;
82 size = fbmem_conf->size;
83 omapfb_config.mem_desc.region[i].paddr = start;
84 omapfb_config.mem_desc.region[i].size = size;
85 if (omap_fb_sram_plane != i && start) {
86 reserve_bootmem(start, size);
87 total_size += size;
88 }
89 i++;
55 } 90 }
91 omapfb_config.mem_desc.region_cnt = i;
92 if (total_size)
93 pr_info("Reserving %lu bytes SDRAM for frame buffer\n",
94 total_size);
95
56} 96}
57 97
58void omapfb_set_ctrl_platform_data(void *data) 98void omapfb_set_ctrl_platform_data(void *data)