aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2009-08-03 08:06:36 -0400
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2009-12-09 05:04:06 -0500
commit91773a00f8235e4b697217867529f73e298298df (patch)
treec0156ddc17e4bb966642b050d57ee85c1171bfe2 /drivers
parentb90f8e7296c39a13225fb0c0dfde1922fcf47ba7 (diff)
OMAP: OMAPFB: split omapfb.h
Split arch/arm/plat-omap/include/mach/omapfb.h into two files: include/linux/omapfb.h - ioctls etc for userspace and some kernel stuff for board files drivers/video/omap/omapfb.h - for omapfb internal use This cleans up omapfb.h and also makes it easier for the upcoming new DSS driver to co-exist with the old driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap/blizzard.c2
-rw-r--r--drivers/video/omap/dispc.c2
-rw-r--r--drivers/video/omap/hwa742.c3
-rw-r--r--drivers/video/omap/lcd_2430sdp.c3
-rw-r--r--drivers/video/omap/lcd_ams_delta.c3
-rw-r--r--drivers/video/omap/lcd_apollon.c3
-rw-r--r--drivers/video/omap/lcd_h3.c2
-rw-r--r--drivers/video/omap/lcd_h4.c2
-rw-r--r--drivers/video/omap/lcd_htcherald.c2
-rw-r--r--drivers/video/omap/lcd_inn1510.c2
-rw-r--r--drivers/video/omap/lcd_inn1610.c2
-rw-r--r--drivers/video/omap/lcd_ldp.c3
-rw-r--r--drivers/video/omap/lcd_mipid.c3
-rw-r--r--drivers/video/omap/lcd_omap2evm.c3
-rw-r--r--drivers/video/omap/lcd_omap3beagle.c4
-rw-r--r--drivers/video/omap/lcd_omap3evm.c3
-rw-r--r--drivers/video/omap/lcd_osk.c2
-rw-r--r--drivers/video/omap/lcd_overo.c3
-rw-r--r--drivers/video/omap/lcd_palmte.c2
-rw-r--r--drivers/video/omap/lcd_palmtt.c2
-rw-r--r--drivers/video/omap/lcd_palmz71.c2
-rw-r--r--drivers/video/omap/lcdc.c3
-rw-r--r--drivers/video/omap/omapfb.h227
-rw-r--r--drivers/video/omap/omapfb_main.c2
-rw-r--r--drivers/video/omap/rfbi.c3
-rw-r--r--drivers/video/omap/sossi.c3
26 files changed, 265 insertions, 26 deletions
diff --git a/drivers/video/omap/blizzard.c b/drivers/video/omap/blizzard.c
index f5d75f22cef9..2ffb34af4c59 100644
--- a/drivers/video/omap/blizzard.c
+++ b/drivers/video/omap/blizzard.c
@@ -27,9 +27,9 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
29#include <plat/dma.h> 29#include <plat/dma.h>
30#include <plat/omapfb.h>
31#include <plat/blizzard.h> 30#include <plat/blizzard.h>
32 31
32#include "omapfb.h"
33#include "dispc.h" 33#include "dispc.h"
34 34
35#define MODULE_NAME "blizzard" 35#define MODULE_NAME "blizzard"
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 7c833db4f9b7..b8f75a7936a2 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -26,9 +26,9 @@
26#include <linux/io.h> 26#include <linux/io.h>
27 27
28#include <plat/sram.h> 28#include <plat/sram.h>
29#include <plat/omapfb.h>
30#include <plat/board.h> 29#include <plat/board.h>
31 30
31#include "omapfb.h"
32#include "dispc.h" 32#include "dispc.h"
33 33
34#define MODULE_NAME "dispc" 34#define MODULE_NAME "dispc"
diff --git a/drivers/video/omap/hwa742.c b/drivers/video/omap/hwa742.c
index 17a975e4c9c9..0016f77cd13f 100644
--- a/drivers/video/omap/hwa742.c
+++ b/drivers/video/omap/hwa742.c
@@ -25,10 +25,11 @@
25#include <linux/fb.h> 25#include <linux/fb.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/interrupt.h>
28 29
29#include <plat/dma.h> 30#include <plat/dma.h>
30#include <plat/omapfb.h>
31#include <plat/hwa742.h> 31#include <plat/hwa742.h>
32#include "omapfb.h"
32 33
33#define HWA742_REV_CODE_REG 0x0 34#define HWA742_REV_CODE_REG 0x0
34#define HWA742_CONFIG_REG 0x2 35#define HWA742_CONFIG_REG 0x2
diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c
index fea7feee0b77..760645d9dbb6 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -28,9 +28,10 @@
28#include <linux/i2c/twl4030.h> 28#include <linux/i2c/twl4030.h>
29 29
30#include <plat/mux.h> 30#include <plat/mux.h>
31#include <plat/omapfb.h>
32#include <asm/mach-types.h> 31#include <asm/mach-types.h>
33 32
33#include "omapfb.h"
34
34#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91 35#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
35#define SDP2430_LCD_PANEL_ENABLE_GPIO 154 36#define SDP2430_LCD_PANEL_ENABLE_GPIO 154
36#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24 37#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24
diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c
index 3d5277252ca3..9340ca3c1c81 100644
--- a/drivers/video/omap/lcd_ams_delta.c
+++ b/drivers/video/omap/lcd_ams_delta.c
@@ -27,7 +27,8 @@
27 27
28#include <plat/board-ams-delta.h> 28#include <plat/board-ams-delta.h>
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <plat/omapfb.h> 30
31#include "omapfb.h"
31 32
32#define AMS_DELTA_DEFAULT_CONTRAST 112 33#define AMS_DELTA_DEFAULT_CONTRAST 112
33 34
diff --git a/drivers/video/omap/lcd_apollon.c b/drivers/video/omap/lcd_apollon.c
index 4c5cefc5153b..2be94eb3bbf5 100644
--- a/drivers/video/omap/lcd_apollon.c
+++ b/drivers/video/omap/lcd_apollon.c
@@ -26,7 +26,8 @@
26 26
27#include <mach/gpio.h> 27#include <mach/gpio.h>
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <plat/omapfb.h> 29
30#include "omapfb.h"
30 31
31/* #define USE_35INCH_LCD 1 */ 32/* #define USE_35INCH_LCD 1 */
32 33
diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c
index 240b4fb10741..8df688748b5a 100644
--- a/drivers/video/omap/lcd_h3.c
+++ b/drivers/video/omap/lcd_h3.c
@@ -24,7 +24,7 @@
24#include <linux/i2c/tps65010.h> 24#include <linux/i2c/tps65010.h>
25 25
26#include <mach/gpio.h> 26#include <mach/gpio.h>
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29#define MODULE_NAME "omapfb-lcd_h3" 29#define MODULE_NAME "omapfb-lcd_h3"
30 30
diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c
index 720625da1f4e..03a06a982750 100644
--- a/drivers/video/omap/lcd_h4.c
+++ b/drivers/video/omap/lcd_h4.c
@@ -22,7 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <plat/omapfb.h> 25#include "omapfb.h"
26 26
27static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 27static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
28{ 28{
diff --git a/drivers/video/omap/lcd_htcherald.c b/drivers/video/omap/lcd_htcherald.c
index 2e0c81ea7483..a9007c5d1fad 100644
--- a/drivers/video/omap/lcd_htcherald.c
+++ b/drivers/video/omap/lcd_htcherald.c
@@ -29,7 +29,7 @@
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31 31
32#include <plat/omapfb.h> 32#include "omapfb.h"
33 33
34static int htcherald_panel_init(struct lcd_panel *panel, 34static int htcherald_panel_init(struct lcd_panel *panel,
35 struct omapfb_device *fbdev) 35 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c
index aafe9b497e2d..3271f1643b26 100644
--- a/drivers/video/omap/lcd_inn1510.c
+++ b/drivers/video/omap/lcd_inn1510.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <plat/fpga.h> 26#include <plat/fpga.h>
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29static int innovator1510_panel_init(struct lcd_panel *panel, 29static int innovator1510_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c
index 0de338264a8a..9fff86f67bde 100644
--- a/drivers/video/omap/lcd_inn1610.c
+++ b/drivers/video/omap/lcd_inn1610.c
@@ -23,7 +23,7 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <mach/gpio.h> 25#include <mach/gpio.h>
26#include <plat/omapfb.h> 26#include "omapfb.h"
27 27
28#define MODULE_NAME "omapfb-lcd_h3" 28#define MODULE_NAME "omapfb-lcd_h3"
29 29
diff --git a/drivers/video/omap/lcd_ldp.c b/drivers/video/omap/lcd_ldp.c
index 6a260dfdadc5..5bb7f6f14601 100644
--- a/drivers/video/omap/lcd_ldp.c
+++ b/drivers/video/omap/lcd_ldp.c
@@ -28,9 +28,10 @@
28 28
29#include <mach/gpio.h> 29#include <mach/gpio.h>
30#include <plat/mux.h> 30#include <plat/mux.h>
31#include <plat/omapfb.h>
32#include <asm/mach-types.h> 31#include <asm/mach-types.h>
33 32
33#include "omapfb.h"
34
34#define LCD_PANEL_BACKLIGHT_GPIO (15 + OMAP_MAX_GPIO_LINES) 35#define LCD_PANEL_BACKLIGHT_GPIO (15 + OMAP_MAX_GPIO_LINES)
35#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) 36#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES)
36 37
diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c
index 2162eb09e0fe..46ca90d1d177 100644
--- a/drivers/video/omap/lcd_mipid.c
+++ b/drivers/video/omap/lcd_mipid.c
@@ -23,9 +23,10 @@
23#include <linux/workqueue.h> 23#include <linux/workqueue.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25 25
26#include <plat/omapfb.h>
27#include <plat/lcd_mipid.h> 26#include <plat/lcd_mipid.h>
28 27
28#include "omapfb.h"
29
29#define MIPID_MODULE_NAME "lcd_mipid" 30#define MIPID_MODULE_NAME "lcd_mipid"
30 31
31#define MIPID_CMD_READ_DISP_ID 0x04 32#define MIPID_CMD_READ_DISP_ID 0x04
diff --git a/drivers/video/omap/lcd_omap2evm.c b/drivers/video/omap/lcd_omap2evm.c
index e1a38abca3e7..006c2fe7360e 100644
--- a/drivers/video/omap/lcd_omap2evm.c
+++ b/drivers/video/omap/lcd_omap2evm.c
@@ -27,9 +27,10 @@
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl4030.h>
28 28
29#include <plat/mux.h> 29#include <plat/mux.h>
30#include <plat/omapfb.h>
31#include <asm/mach-types.h> 30#include <asm/mach-types.h>
32 31
32#include "omapfb.h"
33
33#define LCD_PANEL_ENABLE_GPIO 154 34#define LCD_PANEL_ENABLE_GPIO 154
34#define LCD_PANEL_LR 128 35#define LCD_PANEL_LR 128
35#define LCD_PANEL_UD 129 36#define LCD_PANEL_UD 129
diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c
index ccec084ed647..fc503d8f3c24 100644
--- a/drivers/video/omap/lcd_omap3beagle.c
+++ b/drivers/video/omap/lcd_omap3beagle.c
@@ -26,9 +26,11 @@
26#include <linux/i2c/twl4030.h> 26#include <linux/i2c/twl4030.h>
27 27
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <plat/omapfb.h> 29#include <plat/mux.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31 31
32#include "omapfb.h"
33
32#define LCD_PANEL_ENABLE_GPIO 170 34#define LCD_PANEL_ENABLE_GPIO 170
33 35
34static int omap3beagle_panel_init(struct lcd_panel *panel, 36static int omap3beagle_panel_init(struct lcd_panel *panel,
diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c
index 556eb31db24c..ae2edc4081a8 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -26,9 +26,10 @@
26#include <linux/i2c/twl4030.h> 26#include <linux/i2c/twl4030.h>
27 27
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <plat/omapfb.h>
30#include <asm/mach-types.h> 29#include <asm/mach-types.h>
31 30
31#include "omapfb.h"
32
32#define LCD_PANEL_ENABLE_GPIO 153 33#define LCD_PANEL_ENABLE_GPIO 153
33#define LCD_PANEL_LR 2 34#define LCD_PANEL_LR 2
34#define LCD_PANEL_UD 3 35#define LCD_PANEL_UD 3
diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c
index bb21d7dca39e..b87e8b83f29c 100644
--- a/drivers/video/omap/lcd_osk.c
+++ b/drivers/video/omap/lcd_osk.c
@@ -25,7 +25,7 @@
25 25
26#include <mach/gpio.h> 26#include <mach/gpio.h>
27#include <plat/mux.h> 27#include <plat/mux.h>
28#include <plat/omapfb.h> 28#include "omapfb.h"
29 29
30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
31{ 31{
diff --git a/drivers/video/omap/lcd_overo.c b/drivers/video/omap/lcd_overo.c
index b0f86e514cde..56ee192e9ee2 100644
--- a/drivers/video/omap/lcd_overo.c
+++ b/drivers/video/omap/lcd_overo.c
@@ -25,9 +25,10 @@
25 25
26#include <mach/gpio.h> 26#include <mach/gpio.h>
27#include <plat/mux.h> 27#include <plat/mux.h>
28#include <plat/omapfb.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30 29
30#include "omapfb.h"
31
31#define LCD_ENABLE 144 32#define LCD_ENABLE 144
32 33
33static int overo_panel_init(struct lcd_panel *panel, 34static int overo_panel_init(struct lcd_panel *panel,
diff --git a/drivers/video/omap/lcd_palmte.c b/drivers/video/omap/lcd_palmte.c
index d30289603ce8..4cb301750d02 100644
--- a/drivers/video/omap/lcd_palmte.c
+++ b/drivers/video/omap/lcd_palmte.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <plat/fpga.h> 26#include <plat/fpga.h>
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29static int palmte_panel_init(struct lcd_panel *panel, 29static int palmte_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c
index 557424fb6df1..ff0e6d7ab3a2 100644
--- a/drivers/video/omap/lcd_palmtt.c
+++ b/drivers/video/omap/lcd_palmtt.c
@@ -30,7 +30,7 @@ GPIO13 - screen blanking
30#include <linux/io.h> 30#include <linux/io.h>
31 31
32#include <mach/gpio.h> 32#include <mach/gpio.h>
33#include <plat/omapfb.h> 33#include "omapfb.h"
34 34
35static int palmtt_panel_init(struct lcd_panel *panel, 35static int palmtt_panel_init(struct lcd_panel *panel,
36 struct omapfb_device *fbdev) 36 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_palmz71.c b/drivers/video/omap/lcd_palmz71.c
index 5f4b5b2c1f41..2334e56536bc 100644
--- a/drivers/video/omap/lcd_palmz71.c
+++ b/drivers/video/omap/lcd_palmz71.c
@@ -24,7 +24,7 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <plat/omapfb.h> 27#include "omapfb.h"
28 28
29static int palmz71_panel_init(struct lcd_panel *panel, 29static int palmz71_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c
index 5f32cafbf74c..b831e1df629e 100644
--- a/drivers/video/omap/lcdc.c
+++ b/drivers/video/omap/lcdc.c
@@ -30,10 +30,11 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31 31
32#include <plat/dma.h> 32#include <plat/dma.h>
33#include <plat/omapfb.h>
34 33
35#include <asm/mach-types.h> 34#include <asm/mach-types.h>
36 35
36#include "omapfb.h"
37
37#include "lcdc.h" 38#include "lcdc.h"
38 39
39#define MODULE_NAME "lcdc" 40#define MODULE_NAME "lcdc"
diff --git a/drivers/video/omap/omapfb.h b/drivers/video/omap/omapfb.h
new file mode 100644
index 000000000000..46e4714014e8
--- /dev/null
+++ b/drivers/video/omap/omapfb.h
@@ -0,0 +1,227 @@
1/*
2 * File: drivers/video/omap/omapfb.h
3 *
4 * Framebuffer driver for TI OMAP boards
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#ifndef __OMAPFB_H
25#define __OMAPFB_H
26
27#include <linux/fb.h>
28#include <linux/mutex.h>
29#include <linux/omapfb.h>
30
31#define OMAPFB_EVENT_READY 1
32#define OMAPFB_EVENT_DISABLED 2
33
34#define OMAP_LCDC_INV_VSYNC 0x0001
35#define OMAP_LCDC_INV_HSYNC 0x0002
36#define OMAP_LCDC_INV_PIX_CLOCK 0x0004
37#define OMAP_LCDC_INV_OUTPUT_EN 0x0008
38#define OMAP_LCDC_HSVS_RISING_EDGE 0x0010
39#define OMAP_LCDC_HSVS_OPPOSITE 0x0020
40
41#define OMAP_LCDC_SIGNAL_MASK 0x003f
42
43#define OMAP_LCDC_PANEL_TFT 0x0100
44
45#define OMAPFB_PLANE_XRES_MIN 8
46#define OMAPFB_PLANE_YRES_MIN 8
47
48struct omapfb_device;
49
50struct lcd_panel {
51 const char *name;
52 int config; /* TFT/STN, signal inversion */
53 int bpp; /* Pixel format in fb mem */
54 int data_lines; /* Lines on LCD HW interface */
55
56 int x_res, y_res;
57 int pixel_clock; /* In kHz */
58 int hsw; /* Horizontal synchronization
59 pulse width */
60 int hfp; /* Horizontal front porch */
61 int hbp; /* Horizontal back porch */
62 int vsw; /* Vertical synchronization
63 pulse width */
64 int vfp; /* Vertical front porch */
65 int vbp; /* Vertical back porch */
66 int acb; /* ac-bias pin frequency */
67 int pcd; /* pixel clock divider.
68 Obsolete use pixel_clock instead */
69
70 int (*init) (struct lcd_panel *panel,
71 struct omapfb_device *fbdev);
72 void (*cleanup) (struct lcd_panel *panel);
73 int (*enable) (struct lcd_panel *panel);
74 void (*disable) (struct lcd_panel *panel);
75 unsigned long (*get_caps) (struct lcd_panel *panel);
76 int (*set_bklight_level)(struct lcd_panel *panel,
77 unsigned int level);
78 unsigned int (*get_bklight_level)(struct lcd_panel *panel);
79 unsigned int (*get_bklight_max) (struct lcd_panel *panel);
80 int (*run_test) (struct lcd_panel *panel, int test_num);
81};
82
83struct extif_timings {
84 int cs_on_time;
85 int cs_off_time;
86 int we_on_time;
87 int we_off_time;
88 int re_on_time;
89 int re_off_time;
90 int we_cycle_time;
91 int re_cycle_time;
92 int cs_pulse_width;
93 int access_time;
94
95 int clk_div;
96
97 u32 tim[5]; /* set by extif->convert_timings */
98
99 int converted;
100};
101
102struct lcd_ctrl_extif {
103 int (*init) (struct omapfb_device *fbdev);
104 void (*cleanup) (void);
105 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
106 unsigned long (*get_max_tx_rate)(void);
107 int (*convert_timings) (struct extif_timings *timings);
108 void (*set_timings) (const struct extif_timings *timings);
109 void (*set_bits_per_cycle)(int bpc);
110 void (*write_command) (const void *buf, unsigned int len);
111 void (*read_data) (void *buf, unsigned int len);
112 void (*write_data) (const void *buf, unsigned int len);
113 void (*transfer_area) (int width, int height,
114 void (callback)(void *data), void *data);
115 int (*setup_tearsync) (unsigned pin_cnt,
116 unsigned hs_pulse_time, unsigned vs_pulse_time,
117 int hs_pol_inv, int vs_pol_inv, int div);
118 int (*enable_tearsync) (int enable, unsigned line);
119
120 unsigned long max_transmit_size;
121};
122
123struct omapfb_notifier_block {
124 struct notifier_block nb;
125 void *data;
126 int plane_idx;
127};
128
129typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
130 unsigned long event,
131 void *fbi);
132
133struct lcd_ctrl {
134 const char *name;
135 void *data;
136
137 int (*init) (struct omapfb_device *fbdev,
138 int ext_mode,
139 struct omapfb_mem_desc *req_md);
140 void (*cleanup) (void);
141 void (*bind_client) (struct omapfb_notifier_block *nb);
142 void (*get_caps) (int plane, struct omapfb_caps *caps);
143 int (*set_update_mode)(enum omapfb_update_mode mode);
144 enum omapfb_update_mode (*get_update_mode)(void);
145 int (*setup_plane) (int plane, int channel_out,
146 unsigned long offset,
147 int screen_width,
148 int pos_x, int pos_y, int width,
149 int height, int color_mode);
150 int (*set_rotate) (int angle);
151 int (*setup_mem) (int plane, size_t size,
152 int mem_type, unsigned long *paddr);
153 int (*mmap) (struct fb_info *info,
154 struct vm_area_struct *vma);
155 int (*set_scale) (int plane,
156 int orig_width, int orig_height,
157 int out_width, int out_height);
158 int (*enable_plane) (int plane, int enable);
159 int (*update_window) (struct fb_info *fbi,
160 struct omapfb_update_window *win,
161 void (*callback)(void *),
162 void *callback_data);
163 void (*sync) (void);
164 void (*suspend) (void);
165 void (*resume) (void);
166 int (*run_test) (int test_num);
167 int (*setcolreg) (u_int regno, u16 red, u16 green,
168 u16 blue, u16 transp,
169 int update_hw_mem);
170 int (*set_color_key) (struct omapfb_color_key *ck);
171 int (*get_color_key) (struct omapfb_color_key *ck);
172};
173
174enum omapfb_state {
175 OMAPFB_DISABLED = 0,
176 OMAPFB_SUSPENDED = 99,
177 OMAPFB_ACTIVE = 100
178};
179
180struct omapfb_plane_struct {
181 int idx;
182 struct omapfb_plane_info info;
183 enum omapfb_color_format color_mode;
184 struct omapfb_device *fbdev;
185};
186
187struct omapfb_device {
188 int state;
189 int ext_lcdc; /* Using external
190 LCD controller */
191 struct mutex rqueue_mutex;
192
193 int palette_size;
194 u32 pseudo_palette[17];
195
196 struct lcd_panel *panel; /* LCD panel */
197 const struct lcd_ctrl *ctrl; /* LCD controller */
198 const struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
199 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
200 interface */
201 struct device *dev;
202 struct fb_var_screeninfo new_var; /* for mode changes */
203
204 struct omapfb_mem_desc mem_desc;
205 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
206};
207
208#ifdef CONFIG_ARCH_OMAP1
209extern struct lcd_ctrl omap1_lcd_ctrl;
210#else
211extern struct lcd_ctrl omap2_disp_ctrl;
212#endif
213
214extern void omapfb_register_panel(struct lcd_panel *panel);
215extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
216extern void omapfb_notify_clients(struct omapfb_device *fbdev,
217 unsigned long event);
218extern int omapfb_register_client(struct omapfb_notifier_block *nb,
219 omapfb_notifier_callback_t callback,
220 void *callback_data);
221extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
222extern int omapfb_update_window_async(struct fb_info *fbi,
223 struct omapfb_update_window *win,
224 void (*callback)(void *),
225 void *callback_data);
226
227#endif /* __OMAPFB_H */
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index f900a43db8d7..c7f59a5ccdbc 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -29,8 +29,8 @@
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30 30
31#include <plat/dma.h> 31#include <plat/dma.h>
32#include <plat/omapfb.h>
33 32
33#include "omapfb.h"
34#include "lcdc.h" 34#include "lcdc.h"
35#include "dispc.h" 35#include "dispc.h"
36 36
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c
index c90fa39486b4..fed7b1bda19c 100644
--- a/drivers/video/omap/rfbi.c
+++ b/drivers/video/omap/rfbi.c
@@ -27,8 +27,7 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/io.h> 28#include <linux/io.h>
29 29
30#include <plat/omapfb.h> 30#include "omapfb.h"
31
32#include "dispc.h" 31#include "dispc.h"
33 32
34/* To work around an RFBI transfer rate limitation */ 33/* To work around an RFBI transfer rate limitation */
diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c
index 79dc84f09713..8fb7c708f563 100644
--- a/drivers/video/omap/sossi.c
+++ b/drivers/video/omap/sossi.c
@@ -23,10 +23,11 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/interrupt.h>
26 27
27#include <plat/dma.h> 28#include <plat/dma.h>
28#include <plat/omapfb.h>
29 29
30#include "omapfb.h"
30#include "lcdc.h" 31#include "lcdc.h"
31 32
32#define MODULE_NAME "omapfb-sossi" 33#define MODULE_NAME "omapfb-sossi"