]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/lcd.c
Merge branch 'master' of git://git.denx.de/u-boot-sh
[karo-tx-uboot.git] / common / lcd.c
index 217ec9dbd2e9ec3cefdaea4a63e5be2725b445dc..37147af805ce8972081dd7a59420ecb14a2b0453 100644 (file)
@@ -33,7 +33,6 @@
 
 #if defined(CONFIG_CPU_PXA25X) || defined(CONFIG_CPU_PXA27X) || \
        defined(CONFIG_CPU_MONAHANS)
-#define CONFIG_CPU_PXA
 #include <asm/byteorder.h>
 #endif
 
@@ -882,7 +881,7 @@ static void lcd_display_rle8_bitmap(bmp_image_t *bmp, ushort *cmap, uchar *fb,
 }
 #endif
 
-#if defined(CONFIG_MPC823) || defined(CONFIG_MCC200)
+#if defined(CONFIG_MPC823)
 #define FB_PUT_BYTE(fb, from) *(fb)++ = (255 - *(from)++)
 #else
 #define FB_PUT_BYTE(fb, from) *(fb)++ = *(from)++
@@ -907,9 +906,7 @@ static inline void fb_put_word(uchar **fb, uchar **from)
 
 int lcd_display_bitmap(ulong bmp_image, int x, int y)
 {
-#if !defined(CONFIG_MCC200)
        ushort *cmap = NULL;
-#endif
        ushort *cmap_base = NULL;
        ushort i, j;
        uchar *fb;
@@ -957,8 +954,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
        debug("Display-bmp: %d x %d  with %d colors\n",
                (int)width, (int)height, (int)colors);
 
-#if !defined(CONFIG_MCC200)
-       /* MCC200 LCD doesn't need CMAP, supports 1bpp b&w only */
        if (bmp_bpix == 8) {
                cmap = configuration_get_cmap();
                cmap_base = cmap;
@@ -986,24 +981,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 #endif
                }
        }
-#endif
-       /*
-        *  BMP format for Monochrome assumes that the state of a
-        * pixel is described on a per Bit basis, not per Byte.
-        *  So, in case of Monochrome BMP we should align widths
-        * on a byte boundary and convert them from Bit to Byte
-        * units.
-        *  Probably, PXA250 and MPC823 process 1bpp BMP images in
-        * their own ways, so make the converting to be MCC200
-        * specific.
-        */
-#if defined(CONFIG_MCC200)
-       if (bpix == 1) {
-               width = ((width + 7) & ~7) >> 3;
-               x     = ((x + 7) & ~7) >> 3;
-               pwidth= ((pwidth + 7) & ~7) >> 3;
-       }
-#endif
 
        padded_width = (width & 0x3 ? (width & ~0x3) + 4 : width);
 
@@ -1023,7 +1000,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 
        switch (bmp_bpix) {
        case 1: /* pass through */
-       case 8:
+       case 8: {
 #ifdef CONFIG_LCD_BMP_RLE8
                u32 compression = get_unaligned_le32(&bmp->header.compression);
                if (compression == BMP_BI_RLE8) {
@@ -1056,7 +1033,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
                        fb -= byte_width + lcd_line_length;
                }
                break;
-
+       }
 #if defined(CONFIG_BMP_16BPP)
        case 16:
                for (i = 0; i < height; ++i) {