summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-03-14 18:17:06 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 15:00:31 +0800
commit2b899b9c52fb82ce9a8f3599c8e4799c974bc68b (patch)
tree9915e7480b9a6cdbdde7f87b88d94fc1a4d7e1f9 /include
parentfe02c2c77fa7b29b1a073cc08ecea34af6d87fd2 (diff)
downloadu-boot-imx-2b899b9c52fb82ce9a8f3599c8e4799c974bc68b.zip
u-boot-imx-2b899b9c52fb82ce9a8f3599c8e4799c974bc68b.tar.gz
u-boot-imx-2b899b9c52fb82ce9a8f3599c8e4799c974bc68b.tar.bz2
MLK-10774-31 lcd: add LCD_MONOCHROME
LCD_MONOCHROME is removed in commit f4469f50b0367820121ef2d313517d422ed70e1d. Add related code back to support epdc. In this patch, also include crm_regs.h in mx6slevk.c to make epdc code be compiled ok. COLOR_MASK is also added from commit a7de2953f51e70754190d3516167d58d27d17219 Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/lcd.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/lcd.h b/include/lcd.h
index bd580be..ddcd53c 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -25,6 +25,7 @@ extern struct vidinfo panel_info;
void lcd_ctrl_init(void *lcdbase);
void lcd_enable(void);
void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue);
+void lcd_initcolregs (void);
struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
void **alloc_addr);
@@ -99,6 +100,11 @@ typedef struct vidinfo {
ushort *cmap;
struct epdc_data_struct epdc_data;
} vidinfo_t;
+
+static __maybe_unused ushort *configuration_get_cmap(void)
+{
+ return panel_info.cmap;
+}
#else
typedef struct vidinfo {
ushort vl_col; /* Number of columns (i.e. 160) */
@@ -214,6 +220,16 @@ void lcd_sync(void);
#define LCD_BPP LCD_COLOR8
#endif
+#if LCD_BPP == LCD_MONOCHROME
+# define COLOR_MASK(c) ((c) | (c) << 1 | (c) << 2 | (c) << 3 | \
+ (c) << 4 | (c) << 5 | (c) << 6 | (c) << 7)
+#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16) || \
+ (LCD_BPP == LCD_COLOR32)
+# define COLOR_MASK(c) (c)
+#else
+#error Unsupported LCD BPP.
+#endif
+
#ifndef LCD_DF
#define LCD_DF 1
#endif
@@ -222,7 +238,14 @@ void lcd_sync(void);
#define NBITS(bit_code) (1 << (bit_code))
#define NCOLORS(bit_code) (1 << NBITS(bit_code))
-#if LCD_BPP == LCD_COLOR8
+#if LCD_BPP == LCD_MONOCHROME
+/*
+ * Simple black/white definitions
+ */
+# define CONSOLE_COLOR_BLACK 0
+# define CONSOLE_COLOR_WHITE 1 /* Must remain last / highest */
+
+#elif LCD_BPP == LCD_COLOR8
# define CONSOLE_COLOR_BLACK 0
# define CONSOLE_COLOR_RED 1
# define CONSOLE_COLOR_GREEN 2