]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/video/atmel_lcdfb.c
video: ipu: initialize g_ipu_clk, g_ldb_clk statically
[karo-tx-uboot.git] / drivers / video / atmel_lcdfb.c
index dea126c95f790a87a10c013022e29633628ffa09..d43d8a59d3b78606ea242b0334dac690d511e0b4 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
 #include <lcd.h>
+#include <bmp_layout.h>
 #include <atmel_lcdc.h>
 
 /* configurable parameters */
@@ -80,6 +81,16 @@ void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue)
 #endif
 }
 
+void lcd_set_cmap(struct bmp_image *bmp, unsigned colors)
+{
+       int i;
+
+       for (i = 0; i < colors; ++i) {
+               struct bmp_color_table_entry cte = bmp->color_table[i];
+               lcd_setcolreg(i, cte.red, cte.green, cte.blue);
+       }
+}
+
 void lcd_ctrl_init(void *lcdbase)
 {
        unsigned long value;