diff options
author | eric miao <eric.miao@marvell.com> | 2008-04-30 03:52:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:31 -0400 |
commit | 84f43c308b73a6a12128288721a1007ba4f1a8da (patch) | |
tree | 650246aced2ea56899f11099846980eeae8885e6 /include/asm-arm/arch-pxa/pxafb.h | |
parent | 2c42dd8ebdd92ad59d9a68f88f0e20ad9f45270a (diff) |
pxafb: introduce register independent LCD connection type for pxafb
Reasons:
1. straight forward: the name "LCD_COLOR_DSTN_16BPP" is much better
than "LCCR0_Pas | LCCR0_Color | LCCR0_Dual"
2. by defining LCD connection types as constants, it allows only
valid possibilities
3. by removing the dependency of register bits definitions, those
can be later moved into the body of pxafb.c, instead of having
a regs-lcd.h around
Currently, only lubbock, mainstone, zylonite and littleton have been
modified to support these types (see coming patches after this).
Other platforms are encouraged to change their way describing the
LCD controller connections.
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-arm/arch-pxa/pxafb.h')
-rw-r--r-- | include/asm-arm/arch-pxa/pxafb.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h index 5cf51a5137b7..41a6c2297f9f 100644 --- a/include/asm-arm/arch-pxa/pxafb.h +++ b/include/asm-arm/arch-pxa/pxafb.h | |||
@@ -16,6 +16,48 @@ | |||
16 | #include <asm/arch/regs-lcd.h> | 16 | #include <asm/arch/regs-lcd.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Supported LCD connections | ||
20 | * | ||
21 | * bits 0 - 3: for LCD panel type: | ||
22 | * | ||
23 | * STN - for passive matrix | ||
24 | * DSTN - for dual scan passive matrix | ||
25 | * TFT - for active matrix | ||
26 | * | ||
27 | * bits 4 - 9 : for bus width | ||
28 | * bits 10-17 : for AC Bias Pin Frequency | ||
29 | * bit 18 : for output enable polarity | ||
30 | * bit 19 : for pixel clock edge | ||
31 | */ | ||
32 | #define LCD_CONN_TYPE(_x) ((_x) & 0x0f) | ||
33 | #define LCD_CONN_WIDTH(_x) (((_x) >> 4) & 0x1f) | ||
34 | |||
35 | #define LCD_TYPE_UNKNOWN 0 | ||
36 | #define LCD_TYPE_MONO_STN 1 | ||
37 | #define LCD_TYPE_MONO_DSTN 2 | ||
38 | #define LCD_TYPE_COLOR_STN 3 | ||
39 | #define LCD_TYPE_COLOR_DSTN 4 | ||
40 | #define LCD_TYPE_COLOR_TFT 5 | ||
41 | #define LCD_TYPE_SMART_PANEL 6 | ||
42 | #define LCD_TYPE_MAX 7 | ||
43 | |||
44 | #define LCD_MONO_STN_4BPP ((4 << 4) | LCD_TYPE_MONO_STN) | ||
45 | #define LCD_MONO_STN_8BPP ((8 << 4) | LCD_TYPE_MONO_STN) | ||
46 | #define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN) | ||
47 | #define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN) | ||
48 | #define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN) | ||
49 | #define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT) | ||
50 | #define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT) | ||
51 | #define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL) | ||
52 | #define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL) | ||
53 | |||
54 | #define LCD_AC_BIAS_FREQ(x) (((x) & 0xff) << 10) | ||
55 | #define LCD_BIAS_ACTIVE_HIGH (0 << 17) | ||
56 | #define LCD_BIAS_ACTIVE_LOW (1 << 17) | ||
57 | #define LCD_PCLK_EDGE_RISE (0 << 18) | ||
58 | #define LCD_PCLK_EDGE_FALL (1 << 18) | ||
59 | |||
60 | /* | ||
19 | * This structure describes the machine which we are running on. | 61 | * 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 | 62 | * 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 | 63 | * of linux/drivers/video/pxafb.c |
@@ -44,6 +86,8 @@ struct pxafb_mach_info { | |||
44 | struct pxafb_mode_info *modes; | 86 | struct pxafb_mode_info *modes; |
45 | unsigned int num_modes; | 87 | unsigned int num_modes; |
46 | 88 | ||
89 | unsigned int lcd_conn; | ||
90 | |||
47 | u_int fixed_modes:1, | 91 | u_int fixed_modes:1, |
48 | cmap_inverse:1, | 92 | cmap_inverse:1, |
49 | cmap_static:1, | 93 | cmap_static:1, |