blob: baa86a0fe29e534914965700b8fc5b1a44198850 [file] [log] [blame]
Sascha Hauer7c2f891c2005-05-01 08:59:24 -07001/*
2 * linux/drivers/video/imxfb.h
3 *
4 * Freescale i.MX Frame Buffer device driver
5 *
6 * Copyright (C) 2004 S.Hauer, Pengutronix
7 *
8 * Copyright (C) 1999 Eric A. Thomas
9 * Based on acornfb.c Copyright (C) Russell King.
10 *
11 * This file is subject to the terms and conditions of the GNU General Public
12 * License. See the file COPYING in the main directory of this archive
13 * for more details.
14 */
15
16/*
17 * These are the bitfields for each
18 * display depth that we support.
19 */
20struct imxfb_rgb {
21 struct fb_bitfield red;
22 struct fb_bitfield green;
23 struct fb_bitfield blue;
24 struct fb_bitfield transp;
25};
26
27#define RGB_16 (0)
28#define RGB_8 (1)
29#define NR_RGB 2
30
31struct imxfb_info {
Juergen Beisert72330b02008-12-16 11:44:07 +010032 void __iomem *regs;
33
Sascha Hauer7c2f891c2005-05-01 08:59:24 -070034 struct imxfb_rgb *rgb[NR_RGB];
35
36 u_int max_bpp;
37 u_int max_xres;
38 u_int max_yres;
39
40 /*
41 * These are the addresses we mapped
42 * the framebuffer memory region to.
43 */
44 dma_addr_t map_dma;
45 u_char * map_cpu;
46 u_int map_size;
47
48 u_char * screen_cpu;
49 dma_addr_t screen_dma;
50 u_int palette_size;
51
52 dma_addr_t dbar1;
53 dma_addr_t dbar2;
54
55 u_int pcr;
56 u_int pwmr;
57 u_int lscr1;
Sascha Hauer772a9e62005-07-17 20:15:36 +010058 u_int dmacr;
Sascha Hauer7c2f891c2005-05-01 08:59:24 -070059 u_int cmap_inverse:1,
60 cmap_static:1,
61 unused:30;
62
63 void (*lcd_power)(int);
64 void (*backlight_power)(int);
65};
66
67#define IMX_NAME "IMX"
68
69/*
70 * Minimum X and Y resolutions
71 */
72#define MIN_XRES 64
73#define MIN_YRES 64
74