X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fvideo%2Fmpc8xx_lcd.c;h=b08576eab203f3ef6a6f6ab4ab348128fdff38da;hb=58332f89b63de484024deae402feeafefc9a43e1;hp=add7215992dfbfc924f8f5db63503fa5ff2b93e0;hpb=4608f37918e5d93d6b2b6909b325a5e6fb0a2346;p=oweals%2Fu-boot.git diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c index add7215992..b08576eab2 100644 --- a/drivers/video/mpc8xx_lcd.c +++ b/drivers/video/mpc8xx_lcd.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -357,6 +356,35 @@ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue) /*----------------------------------------------------------------------*/ +ushort *configuration_get_cmap(void) +{ + immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; + cpm8xx_t *cp = &(immr->im_cpm); + return (ushort *)&(cp->lcd_cmap[255 * sizeof(ushort)]); +} + +#if defined(CONFIG_MPC823) +void fb_put_byte(uchar **fb, uchar **from) +{ + *(*fb)++ = (255 - *(*from)++); +} +#endif + +#ifdef CONFIG_LCD_LOGO +#include +void lcd_logo_set_cmap(void) +{ + int i; + ushort *cmap; + immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; + cpm8xx_t *cp = &(immr->im_cpm); + cmap = (ushort *)&(cp->lcd_cmap[BMP_LOGO_OFFSET * sizeof(ushort)]); + + for (i = 0; i < BMP_LOGO_COLORS; ++i) + *cmap++ = bmp_logo_palette[i]; +} +#endif + void lcd_enable (void) { volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;