lcd: mpc8xx: move mpc823-specific fb_put_byte to mpc8xx_lcd.c

Reduce the amount of platform-specific code in common/lcd.c by moving MPC823
implementation of fb_put_byte() to mpc8xx_lcd.c. Since we must also have a
default implementation for everybody else, make the remainder of the code
into a weak function.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
Nikita Kiryanov
2015-02-03 13:32:23 +02:00
committed by Anatolij Gustschin
parent b3d12e9bca
commit 27fad01b7f
2 changed files with 12 additions and 6 deletions

View File

@@ -364,6 +364,13 @@ ushort *configuration_get_cmap(void)
return (ushort *)&(cp->lcd_cmap[255 * sizeof(ushort)]);
}
#if defined(CONFIG_MPC823)
void fb_put_byte(uchar **fb, uchar **from)
{
*(*fb)++ = (255 - *(*from)++);
}
#endif
void lcd_enable (void)
{
volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;