aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-10-20 15:51:21 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-10-20 15:51:21 +0200
commitf641471498ddda011f95a840c09907d75259b70a (patch)
tree4f588813983824cdda8bda970cc8227ed6f102a3
parent6a0766ed22b8f65ac9e740a43aed36e35ea8bca5 (diff)
downloadu-boot-linaro-stable-f641471498ddda011f95a840c09907d75259b70a.tar.gz
MCC200: Fix uninitialized variable problem in LCD driver
-rw-r--r--CHANGELOG2
-rw-r--r--common/lcd.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 51af5e6ab..7f0b6121a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@
Changes since U-Boot 1.1.4:
======================================================================
+* MCC200: Fix uninitialized variable problem in LCD driver
+
* Add board/cpu specific NAND chip select function to 440 NDFC
Based on idea and implementation from Jeff Mann
Patch by Stefan Roese, 20 Oct 2006
diff --git a/common/lcd.c b/common/lcd.c
index df31ca9b8..eaed2abd8 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -578,7 +578,9 @@ void bitmap_plot (int x, int y)
*/
int lcd_display_bitmap(ulong bmp_image, int x, int y)
{
+#if !defined(CONFIG_MCC200)
ushort *cmap;
+#endif
ushort i, j;
uchar *fb;
bmp_image_t *bmp=(bmp_image_t *)bmp_image;
@@ -624,13 +626,13 @@ 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 (bpix==8) {
#if defined(CONFIG_PXA250)
cmap = (ushort *)fbi->palette;
#elif defined(CONFIG_MPC823)
cmap = (ushort *)&(cp->lcd_cmap[255*sizeof(ushort)]);
-#elif defined(CONFIG_MCC200)
- /* MCC200 LCD doesn't need CMAP, supports 1bpp b&w only */
#else
# error "Don't know location of color map"
#endif
@@ -654,6 +656,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
#endif
}
}
+#endif
/*
* BMP format for Monochrome assumes that the state of a