summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-03-29 12:33:43 +0200
committerWolfgang Denk <wd@denx.de>2010-03-29 12:33:43 +0200
commit0020db3f0da61f3e2c8a459a87598e07594dc8ac (patch)
tree2fe0852444f2412149130186bc740914f4ba794f /common
parent0d41ad7edcd23b6f23a1cf4e07b2d773493306fd (diff)
parent2883cc2d48e99fd1873ef8af03fee7966611b735 (diff)
downloadblackbird-obmc-uboot-0020db3f0da61f3e2c8a459a87598e07594dc8ac.tar.gz
blackbird-obmc-uboot-0020db3f0da61f3e2c8a459a87598e07594dc8ac.zip
Merge remote branch 'origin/master' into next
Diffstat (limited to 'common')
-rw-r--r--common/cmd_usb.c4
-rw-r--r--common/lcd.c24
2 files changed, 22 insertions, 6 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 9de515c323..6b5c582550 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -601,7 +601,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
ok++;
if (devno)
printf("\n");
- printf("print_part of %x\n", devno);
+ debug("print_part of %x\n", devno);
print_part(stor_dev);
}
}
@@ -610,7 +610,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
stor_dev = usb_stor_get_dev(devno);
if (stor_dev->type != DEV_TYPE_UNKNOWN) {
ok++;
- printf("print_part of %x\n", devno);
+ debug("print_part of %x\n", devno);
print_part(stor_dev);
}
}
diff --git a/common/lcd.c b/common/lcd.c
index db799db6b2..64fb1c6408 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -63,7 +63,7 @@
/************************************************************************/
#ifdef CONFIG_LCD_LOGO
# include <bmp_logo.h> /* Get logo data, width and height */
-# if (CONSOLE_COLOR_WHITE >= BMP_LOGO_OFFSET)
+# if (CONSOLE_COLOR_WHITE >= BMP_LOGO_OFFSET) && (LCD_BPP != LCD_COLOR16)
# error Default Color Map overlaps with Logo Color Map
# endif
#endif
@@ -218,8 +218,12 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
for (row=0; row < VIDEO_FONT_HEIGHT; ++row, dest += lcd_line_length) {
uchar *s = str;
- uchar *d = dest;
int i;
+#if LCD_BPP == LCD_COLOR16
+ ushort *d = (ushort *)dest;
+#else
+ uchar *d = dest;
+#endif
#if LCD_BPP == LCD_MONOCHROME
uchar rest = *d & -(1 << (8-off));
@@ -244,7 +248,7 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
bits <<= 1;
}
#elif LCD_BPP == LCD_COLOR16
- for (c=0; c<16; ++c) {
+ for (c=0; c<8; ++c) {
*d++ = (bits & 0x80) ?
lcd_color_fg : lcd_color_bg;
bits <<= 1;
@@ -521,6 +525,13 @@ void bitmap_plot (int x, int y)
cmap = (ushort *)&(cp->lcd_cmap[BMP_LOGO_OFFSET*sizeof(ushort)]);
#elif defined(CONFIG_ATMEL_LCD)
cmap = (uint *) (panel_info.mmio + ATMEL_LCDC_LUT(0));
+#else
+ /*
+ * default case: generic system with no cmap (most likely 16bpp)
+ * We set cmap to the source palette, so no change is done.
+ * This avoids even more ifdef in the next stanza
+ */
+ cmap = bmp_logo_palette;
#endif
WATCHDOG_RESET();
@@ -559,10 +570,15 @@ void bitmap_plot (int x, int y)
}
}
else { /* true color mode */
+ u16 col16;
fb16 = (ushort *)(lcd_base + y * lcd_line_length + x);
for (i=0; i<BMP_LOGO_HEIGHT; ++i) {
for (j=0; j<BMP_LOGO_WIDTH; j++) {
- fb16[j] = bmp_logo_palette[(bmap[j])];
+ col16 = bmp_logo_palette[(bmap[j]-16)];
+ fb16[j] =
+ ((col16 & 0x000F) << 1) |
+ ((col16 & 0x00F0) << 3) |
+ ((col16 & 0x0F00) << 4);
}
bmap += BMP_LOGO_WIDTH;
fb16 += panel_info.vl_col;
OpenPOWER on IntegriCloud