summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2015-02-03 13:32:23 +0200
committerAnatolij Gustschin <agust@denx.de>2015-02-10 13:26:53 +0100
commit27fad01b7fca1ed9ae946ced37c3d4bde828ba14 (patch)
tree2f947839a02c67d5ed68a17ed3c3573f6ba85de6 /drivers/video
parentb3d12e9bca1b23a537d77af2ae019cddc59f2031 (diff)
downloadu-boot-imx-27fad01b7fca1ed9ae946ced37c3d4bde828ba14.zip
u-boot-imx-27fad01b7fca1ed9ae946ced37c3d4bde828ba14.tar.gz
u-boot-imx-27fad01b7fca1ed9ae946ced37c3d4bde828ba14.tar.bz2
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mpc8xx_lcd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c
index 9d2e5ed..190c05a 100644
--- a/drivers/video/mpc8xx_lcd.c
+++ b/drivers/video/mpc8xx_lcd.c
@@ -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;