common/lcd.c: cleanup use of global variables

lcd_color_fg and lcd_color_bg had to be declared in board specific
code, but were not actually used there; in addition, we have getter /
setter functions for these, which were not used either.

Get rid of the global variables, and use the getter function where
needed (so far no setter calls are needed).

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: also fixed cm_t35 board while rebasing]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
lcd, amba: remove this driver since it is not used

Since CONFIG_VIDEO_AMBA is not set by any board, it does not seem
to be used, so remove it since there is no way to (compile) test it.

cc: Alessandro Rubini <rubini@unipv.it>
cc: Anatolij Gustschin <agust@denx.de>
Acked-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
lcd, tegra: remove unused cursor functions

cc: Anatolij Gustschin <agust@denx.de>
cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
lcd, mpc8xx: move the mpc8xx driver to drivers/video

Since the lcd code was compiled unconditionally in arch also
add CONFIG_MPC8XX_LCD to the boards using this driver.

cc: Anatolij Gustschin <agust@denx.de>
cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
lcd, pxafb: move the pxafb to drivers/video

Since the lcd code was compiled unconditionally for pxa also add
CONFIG_PXA_LCD to the boards using this framebuffer. Since
driver/video contains video and lcd drivers, add lcd to the name
to make clear it belongs to common/lcd.c.

cc: Anatolij Gustschin <agust@denx.de>
cc: Cliff Brake <cliff.brake@gmail.com>
cc: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common/lcd.c: cleanup use of global variables

console_col, console_row, lcd_line_length, lcd_console_address had
to be declared in board / driver specific code, but were not actually
used there on many boards. Get rid of the global variables.

for completeness, the ack of Bo Shen is for the atmel part
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: rebased and fixed cm_t35 board]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
common/lcd.c: remove global lcd_base

lcd_base is available as gd->fb_base as well, there is no need
to keep a seperate copy.

For completeness the ack of Bo Shen is for the atmel part.
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Tom Warren <twarren@nvidia.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: also fix cm_t35 board while rebasing]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
common/lcd: cosmetic: clean up a bit

 - Make the brackets of the function calls more consistent
 - Remove really unnecessary brackets
 - Removes the extern from the function definitions
 - Remove curly brackets from single line statements
 - Remove lcd_setmem proto since it is already in common.h
 - Cleanup comments, remove useless comments
 - Remove NOT_USED_SO_FAR ifdef
 - Cleanup coding style

cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[agust: rebased the original patch]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
lcd, fb: remove duplicated prototypes and unused code

cc: Anatolij Gustschin <agust@denx.de>
cc: Cliff Brake <cliff.brake@gmail.com>
cc: John Zhan <zhanz@sinovee.com>
cc: Marek Vasut <marek.vasut@gmail.com>
cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
api/api_display: use the getters for console size info

cc: Che-Liang Chiou <clchiou@chromium.org>
Acked-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common/lcd.c: move the macro's to the c file

Hide the console macros since some reference global data which is
no longer present.

cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Fix bitmap offsets for non 8-bit LCDs

Currently bitmap logos don't interpret the X coordinate
correctly if the bpp is anything other than 8.

Signed-off-by: Andre Renaud <andre@bluewatersys.com>
video: Fix splash screen alignment

commit d484b52 "video: Skip bitmaps which do not fit into the screen in
cfb_console" breaks splash screen alignment which is passed in as magic
(BMP_ALIGN_CENTER) x/y coordinates. Moving the check after the alignment block
fixes this.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Acked-by: Simon Glass <sjg@chromium.org>
Merge branch 'for-v2013.04'

Conflicts:
	drivers/video/Makefile

Signed-off-by: Anatolij Gustschin <agust@denx.de>
video: bcm2835: fix build issues

After merging LCD patches for v2013.04 the bcm2835 video
driver building is broken due to removal of many global
variables. Fix the driver.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>