]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/lcd.c
lcd: cleanup lcd_drawchars
[karo-tx-uboot.git] / common / lcd.c
index 28b3fe79184d627eebbe941e46330955d5092fab..80923e91185f2056f9a0a45f42363fc17e31666b 100644 (file)
@@ -346,19 +346,7 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, int count)
 
                        *d++ = rest | (sym >> off);
                        rest = sym << (8-off);
-#elif LCD_BPP == LCD_COLOR8
-                       for (c = 0; c < 8; ++c) {
-                               *d++ = (bits & 0x80) ?
-                                               lcd_color_fg : lcd_color_bg;
-                               bits <<= 1;
-                       }
-#elif LCD_BPP == LCD_COLOR16
-                       for (c = 0; c < 8; ++c) {
-                               *d++ = (bits & 0x80) ?
-                                               lcd_color_fg : lcd_color_bg;
-                               bits <<= 1;
-                       }
-#elif LCD_BPP == LCD_COLOR32
+#else /* LCD_BPP == LCD_COLOR8 or LCD_COLOR16 or LCD_COLOR32 */
                        for (c = 0; c < 8; ++c) {
                                *d++ = (bits & 0x80) ?
                                                lcd_color_fg : lcd_color_bg;
@@ -530,7 +518,7 @@ static int lcd_init(void *lcdbase)
        lcd_ctrl_init(lcdbase);
 
        /*
-        * lcd_ctrl_init() of some drivers (i.e. bcm2835 on rpi_b) ignores
+        * lcd_ctrl_init() of some drivers (i.e. bcm2835 on rpi) ignores
         * the 'lcdbase' argument and uses custom lcd base address
         * by setting up gd->fb_base. Check for this condition and fixup
         * 'lcd_base' address.
@@ -685,11 +673,7 @@ void bitmap_plot(int x, int y)
                        *(cmap + BMP_LOGO_OFFSET) = lut_entry;
                        cmap++;
 #else /* !CONFIG_ATMEL_LCD */
-#ifdef  CONFIG_SYS_INVERT_COLORS
-                       *cmap++ = 0xffff - colreg;
-#else
                        *cmap++ = colreg;
-#endif
 #endif /* CONFIG_ATMEL_LCD */
                }
 
@@ -967,11 +951,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
                                ( ((cte.red)   << 8) & 0xf800) |
                                ( ((cte.green) << 3) & 0x07e0) |
                                ( ((cte.blue)  >> 3) & 0x001f) ;
-#ifdef CONFIG_SYS_INVERT_COLORS
-                       *cmap = 0xffff - colreg;
-#else
                        *cmap = colreg;
-#endif
 #if defined(CONFIG_MPC823)
                        cmap--;
 #else