]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/mcc200/lcd.c
imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
[karo-tx-uboot.git] / board / mcc200 / lcd.c
index b2625160a5eeb1f36d199d213b8d30648b45ee2c..726366ddf0dccd4086efc033017a1c7a90f2ce5e 100755 (executable)
 
 #ifdef CONFIG_LCD
 
-#define SWAPPED_LCD
+#undef SWAPPED_LCD /* For the previous h/w version */
 /*
  *  The name of the device used for communication
  * with the PSoC.
  */
 #define PSOC_PSC       MPC5XXX_PSC2
-#define PSOC_BAUD      500000UL
+#define PSOC_BAUD      230400UL
 
 #define RTS_ASSERT     1
 #define RTS_NEGATE     0
@@ -180,11 +180,32 @@ void lcd_enable (void)
                        break;
                udelay (PSOC_WAIT_TIME);
        }
-       if (!retries) {
-               printf ("%s Error: PSoC doesn't respond on "
-                       "RTS NEGATE\n", __FUNCTION__);
-       }
 
        return;
 }
+#ifdef CONFIG_PROGRESSBAR
+
+#define FONT_WIDTH      8 /* the same as VIDEO_FONT_WIDTH in video_font.h */
+void show_progress (int size, int tot)
+{
+       int cnt;
+       int i;
+       static int rc = 0;
+
+       rc += size;
+
+       cnt = ((LCD_WIDTH/FONT_WIDTH) * rc) / tot;
+
+       rc -= (cnt * tot) / (LCD_WIDTH/FONT_WIDTH);
+
+       for (i = 0; i < cnt; i++) {
+               lcd_putc(0xdc);
+       }
+
+       if (cnt) {
+               lcd_enable(); /* MCC200-specific - send the framebuffer to PSoC */
+       }
+}
+
+#endif
 #endif /* CONFIG_LCD */