aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-07-04 00:03:16 +0000
committerwdenk <wdenk>2005-07-04 00:03:16 +0000
commit88804d19e2bf36c9eaefadbd7199c093c900953b (patch)
treeab6beea61b136eb98b0e9e87c7903cc05c52860a /common
parent3c71f3e8aa4d74bc5b43dc55f9be893afbc13497 (diff)
* Patch by Detlev Zundel, 30 Jun 2005:LABEL_2005_07_04_0202
Fix LCD logo for lwmon board which got lost in the merge of 8xx and PXA LCD code
Diffstat (limited to 'common')
-rw-r--r--common/lcd.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/common/lcd.c b/common/lcd.c
index 66506381a..a85599dd7 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -58,6 +58,15 @@
/************************************************************************/
#include <video_font.h> /* Get font data, width and height */
+/************************************************************************/
+/* ** LOGO DATA */
+/************************************************************************/
+#ifdef CONFIG_LCD_LOGO
+# include <bmp_logo.h> /* Get logo data, width and height */
+# if (CONSOLE_COLOR_WHITE >= BMP_LOGO_OFFSET)
+# error Default Color Map overlaps with Logo Color Map
+# endif
+#endif
ulong lcd_setmem (ulong addr);
@@ -269,7 +278,7 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
static inline void lcd_puts_xy (ushort x, ushort y, uchar *s)
{
-#if defined(CONFIG_LCD_LOGO) && !defined(LCD_INFO_BELOW_LOGO)
+#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
lcd_drawchars (x, y+BMP_LOGO_HEIGHT, s, strlen (s));
#else
lcd_drawchars (x, y, s, strlen (s));
@@ -280,7 +289,7 @@ static inline void lcd_puts_xy (ushort x, ushort y, uchar *s)
static inline void lcd_putc_xy (ushort x, ushort y, uchar c)
{
-#if defined(CONFIG_LCD_LOGO) && !defined(LCD_INFO_BELOW_LOGO)
+#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
lcd_drawchars (x, y+BMP_LOGO_HEIGHT, &c, 1);
#else
lcd_drawchars (x, y, &c, 1);
@@ -420,7 +429,7 @@ static int lcd_init (void *lcdbase)
/* Initialize the console */
console_col = 0;
-#ifdef LCD_INFO_BELOW_LOGO
+#ifdef CONFIG_LCD_INFO_BELOW_LOGO
console_row = 7 + BMP_LOGO_HEIGHT / VIDEO_FONT_HEIGHT;
#else
console_row = 1; /* leave 1 blank line below logo */
@@ -673,12 +682,12 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
static void *lcd_logo (void)
{
-#ifdef LCD_INFO
+#ifdef CONFIG_LCD_INFO
DECLARE_GLOBAL_DATA_PTR;
char info[80];
char temp[32];
-#endif /* LCD_INFO */
+#endif /* CONFIG_LCD_INFO */
#ifdef CONFIG_SPLASH_SCREEN
char *s;
@@ -700,7 +709,7 @@ static void *lcd_logo (void)
#endif /* CONFIG_LCD_LOGO */
#ifdef CONFIG_MPC823
-#ifdef LCD_INFO
+# ifdef CONFIG_LCD_INFO
sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__);
lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, info, strlen(info));
@@ -711,7 +720,7 @@ static void *lcd_logo (void)
sprintf (info, " Wolfgang DENK, wd@denx.de");
lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2,
info, strlen(info));
-#ifdef LCD_INFO_BELOW_LOGO
+# ifdef CONFIG_LCD_INFO_BELOW_LOGO
sprintf (info, "MPC823 CPU at %s MHz",
strmhz(temp, gd->cpu_clk));
lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3,
@@ -721,7 +730,7 @@ static void *lcd_logo (void)
gd->bd->bi_flashsize >> 20 );
lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 4,
info, strlen(info));
-#else
+# else
/* leave one blank line */
sprintf (info, "MPC823 CPU at %s MHz, %ld MB RAM, %ld MB Flash",
@@ -731,15 +740,15 @@ static void *lcd_logo (void)
lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 4,
info, strlen(info));
+# endif /* CONFIG_LCD_INFO_BELOW_LOGO */
+# endif /* CONFIG_LCD_INFO */
#endif /* CONFIG_MPC823 */
-#endif /* LCD_INFO_BELOW_LOGO */
-#endif /* LCD_INFO */
-#if defined(CONFIG_LCD_LOGO) && !defined(LCD_INFO_BELOW_LOGO)
+#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
return ((void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length));
#else
return ((void *)lcd_base);
-#endif /* CONFIG_LCD_LOGO */
+#endif /* CONFIG_LCD_LOGO && !CONFIG_LCD_INFO_BELOW_LOGO */
}
/************************************************************************/