xref: /openbmc/linux/drivers/video/fbdev/omap/lcdc.h (revision 7ae5c03a)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef LCDC_H
3 #define LCDC_H
4 /*
5  * Copyright (C) 2004 Nokia Corporation
6  * Author: Imre Deak <imre.deak@nokia.com>
7  */
8 #define OMAP_LCDC_BASE			0xfffec000
9 #define OMAP_LCDC_SIZE			256
10 #define OMAP_LCDC_IRQ			INT_LCD_CTRL
11 
12 #define OMAP_LCDC_CONTROL		(OMAP_LCDC_BASE + 0x00)
13 #define OMAP_LCDC_TIMING0		(OMAP_LCDC_BASE + 0x04)
14 #define OMAP_LCDC_TIMING1		(OMAP_LCDC_BASE + 0x08)
15 #define OMAP_LCDC_TIMING2		(OMAP_LCDC_BASE + 0x0c)
16 #define OMAP_LCDC_STATUS		(OMAP_LCDC_BASE + 0x10)
17 #define OMAP_LCDC_SUBPANEL		(OMAP_LCDC_BASE + 0x14)
18 #define OMAP_LCDC_LINE_INT		(OMAP_LCDC_BASE + 0x18)
19 #define OMAP_LCDC_DISPLAY_STATUS	(OMAP_LCDC_BASE + 0x1c)
20 
21 #define OMAP_LCDC_STAT_DONE		(1 << 0)
22 #define OMAP_LCDC_STAT_VSYNC		(1 << 1)
23 #define OMAP_LCDC_STAT_SYNC_LOST	(1 << 2)
24 #define OMAP_LCDC_STAT_ABC		(1 << 3)
25 #define OMAP_LCDC_STAT_LINE_INT		(1 << 4)
26 #define OMAP_LCDC_STAT_FUF		(1 << 5)
27 #define OMAP_LCDC_STAT_LOADED_PALETTE	(1 << 6)
28 
29 #define OMAP_LCDC_CTRL_LCD_EN		(1 << 0)
30 #define OMAP_LCDC_CTRL_LCD_TFT		(1 << 7)
31 #define OMAP_LCDC_CTRL_LINE_IRQ_CLR_SEL	(1 << 10)
32 
33 #define OMAP_LCDC_IRQ_VSYNC		(1 << 2)
34 #define OMAP_LCDC_IRQ_DONE		(1 << 3)
35 #define OMAP_LCDC_IRQ_LOADED_PALETTE	(1 << 4)
36 #define OMAP_LCDC_IRQ_LINE_NIRQ		(1 << 5)
37 #define OMAP_LCDC_IRQ_LINE		(1 << 6)
38 #define OMAP_LCDC_IRQ_MASK		(((1 << 5) - 1) << 2)
39 
40 int omap_lcdc_set_dma_callback(void (*callback)(void *data), void *data);
41 void omap_lcdc_free_dma_callback(void);
42 
43 extern const struct lcd_ctrl omap1_int_ctrl;
44 
45 #endif
46