summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2013-03-29 14:00:13 +0100
committerAnatolij Gustschin <agust@denx.de>2013-03-29 14:29:39 +0100
commit1d3dea12e21275eab5af1b50ef4a3be89cfffc15 (patch)
treedc2903a944e0dc24696c007d3e112c770acd830a /common
parentd0f34f10f14853ebe3f75371533708aa0639d830 (diff)
downloadu-boot-imx-1d3dea12e21275eab5af1b50ef4a3be89cfffc15.zip
u-boot-imx-1d3dea12e21275eab5af1b50ef4a3be89cfffc15.tar.gz
u-boot-imx-1d3dea12e21275eab5af1b50ef4a3be89cfffc15.tar.bz2
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>
Diffstat (limited to 'common')
-rw-r--r--common/lcd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/lcd.c b/common/lcd.c
index b98eea6..edae835 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -493,6 +493,18 @@ static int lcd_init(void *lcdbase)
debug("[LCD] Initializing LCD frambuffer at %p\n", lcdbase);
lcd_ctrl_init(lcdbase);
+
+ /*
+ * lcd_ctrl_init() of some drivers (i.e. bcm2835 on rpi_b) ignores
+ * the 'lcdbase' argument and uses custom lcd base address
+ * by setting up gd->fb_base. Check for this condition and fixup
+ * 'lcd_base' address.
+ */
+ if ((unsigned long)lcdbase != gd->fb_base)
+ lcd_base = (void *)gd->fb_base;
+
+ debug("[LCD] Using LCD frambuffer at %p\n", lcd_base);
+
lcd_get_size(&lcd_line_length);
lcd_line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8;
lcd_is_enabled = 1;