blob: 5cf51a5137b76398e56a998f0e0c642d5c08bf44 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-arm/arch-pxa/pxafb.h
3 *
4 * Support for the xscale frame buffer.
5 *
6 * Author: Jean-Frederic Clere
7 * Created: Sep 22, 2003
8 * Copyright: jfclere@sinix.net
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
Richard Purdied14b2722006-09-20 22:54:21 +010015#include <linux/fb.h>
eric miaoce4fb7b2008-04-30 00:52:21 -070016#include <asm/arch/regs-lcd.h>
Richard Purdied14b2722006-09-20 22:54:21 +010017
Linus Torvalds1da177e2005-04-16 15:20:36 -070018/*
19 * This structure describes the machine which we are running on.
20 * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
21 * of linux/drivers/video/pxafb.c
22 */
Richard Purdied14b2722006-09-20 22:54:21 +010023struct pxafb_mode_info {
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 u_long pixclock;
25
26 u_short xres;
27 u_short yres;
28
29 u_char bpp;
30 u_char hsync_len;
31 u_char left_margin;
32 u_char right_margin;
33
34 u_char vsync_len;
35 u_char upper_margin;
36 u_char lower_margin;
37 u_char sync;
38
39 u_int cmap_greyscale:1,
Richard Purdied14b2722006-09-20 22:54:21 +010040 unused:31;
41};
42
43struct pxafb_mach_info {
44 struct pxafb_mode_info *modes;
45 unsigned int num_modes;
46
47 u_int fixed_modes:1,
Linus Torvalds1da177e2005-04-16 15:20:36 -070048 cmap_inverse:1,
49 cmap_static:1,
50 unused:29;
51
52 /* The following should be defined in LCCR0
53 * LCCR0_Act or LCCR0_Pas Active or Passive
54 * LCCR0_Sngl or LCCR0_Dual Single/Dual panel
55 * LCCR0_Mono or LCCR0_Color Mono/Color
56 * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode)
57 * LCCR0_DMADel(Tcpu) (optional) DMA request delay
58 *
59 * The following should not be defined in LCCR0:
60 * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM
61 * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB
62 */
63 u_int lccr0;
64 /* The following should be defined in LCCR3
65 * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity
66 * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type
67 * LCCR3_Acb(X) AB Bias pin frequency
68 * LCCR3_DPC (optional) Double Pixel Clock mode (untested)
69 *
70 * The following should not be defined in LCCR3
71 * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp
72 */
73 u_int lccr3;
Hans J. Koch9ffa7392007-10-16 01:28:41 -070074 /* The following should be defined in LCCR4
75 * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2
76 *
77 * All other bits in LCCR4 should be left alone.
78 */
79 u_int lccr4;
Linus Torvalds1da177e2005-04-16 15:20:36 -070080 void (*pxafb_backlight_power)(int);
Richard Purdied14b2722006-09-20 22:54:21 +010081 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070082
83};
84void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
Richard Purdiecb38c562005-10-14 16:07:25 +010085void set_pxa_fb_parent(struct device *parent_dev);
Richard Purdieba44cd22005-09-09 13:10:03 -070086unsigned long pxafb_get_hsync_time(struct device *dev);