FB: OMAP: Add support for framebuffer
[pandora-kernel.git] / drivers / video / omap / lcd_inn1510.c
1 /*
2  * File: drivers/video/omap_new/lcd-inn1510.c
3  *
4  * LCD panel support for the TI OMAP1510 Innovator board
5  *
6  * Copyright (C) 2004 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
24 #include <linux/module.h>
25
26 #include <asm/io.h>
27
28 #include <asm/arch/fpga.h>
29
30 #include "omapfb.h"
31
32 // #define OMAPFB_DBG 1
33
34 #include "debug.h"
35
36 static int innovator1510_panel_init(struct lcd_panel *panel)
37 {
38         DBGENTER(1);
39         DBGLEAVE(1);
40         return 0;
41 }
42
43 static void innovator1510_panel_cleanup(struct lcd_panel *panel)
44 {
45         DBGENTER(1);
46         DBGLEAVE(1);
47 }
48
49 static int innovator1510_panel_enable(struct lcd_panel *panel)
50 {
51         DBGENTER(1);
52
53         fpga_write(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
54
55         DBGLEAVE(1);
56         return 0;
57 }
58
59 static void innovator1510_panel_disable(struct lcd_panel *panel)
60 {
61         DBGENTER(1);
62
63         fpga_write(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
64
65         DBGLEAVE(1);
66 }
67
68 static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel)
69 {
70         return 0;
71 }
72
73 static struct lcdc_video_mode mode240x320 = {
74         .x_res = 240,
75         .y_res = 320,
76         .pixel_clock = 12500,
77         .bpp = 16,
78         .hsw = 40,
79         .hfp = 40,
80         .hbp = 72,
81         .vsw = 1,
82         .vfp = 1,
83         .vbp = 0,
84         .pcd = 12,
85 };
86
87 struct lcd_panel innovator1510_panel = {
88         .name       = "inn1510",
89         .config     = LCD_PANEL_TFT,
90         .video_mode = &mode240x320,
91
92         .init    = innovator1510_panel_init,
93         .cleanup = innovator1510_panel_cleanup,
94         .enable  = innovator1510_panel_enable,
95         .disable = innovator1510_panel_disable,
96         .get_caps= innovator1510_panel_get_caps,
97 };
98