diff options
author | Nikita Kiryanov <nikita@compulab.co.il> | 2015-02-03 11:32:21 (GMT) |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2015-02-10 12:25:08 (GMT) |
commit | 38b550877fd819ce7842b73530dcbacc098c9f0f (patch) | |
tree | 1701a3a9aa0e55548ceab3791c83c4e571ee175a /drivers/video/mpc8xx_lcd.c | |
parent | baaa7dd7061521509792ca158508b2c4554a7184 (diff) | |
download | u-boot-38b550877fd819ce7842b73530dcbacc098c9f0f.tar.xz |
lcd: split configuration_get_cmap
configuration_get_cmap() is multiple platform-specific functions stuffed into
one function. Split it into multiple versions, and move each version to the
appropriate driver to reduce the #ifdef complexity.
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: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video/mpc8xx_lcd.c')
-rw-r--r-- | drivers/video/mpc8xx_lcd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c index add7215..9d2e5ed 100644 --- a/drivers/video/mpc8xx_lcd.c +++ b/drivers/video/mpc8xx_lcd.c @@ -357,6 +357,13 @@ 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)]); +} + void lcd_enable (void) { volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR; |