Commit 1d3dea12e21275eab5af1b50ef4a3be89cfffc15
1 parent
d0f34f10f1
Exists in
master
and in
53 other branches
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>
Showing 2 changed files with 12 additions and 11 deletions Side-by-side Diff
common/lcd.c
... | ... | @@ -493,6 +493,18 @@ |
493 | 493 | debug("[LCD] Initializing LCD frambuffer at %p\n", lcdbase); |
494 | 494 | |
495 | 495 | lcd_ctrl_init(lcdbase); |
496 | + | |
497 | + /* | |
498 | + * lcd_ctrl_init() of some drivers (i.e. bcm2835 on rpi_b) ignores | |
499 | + * the 'lcdbase' argument and uses custom lcd base address | |
500 | + * by setting up gd->fb_base. Check for this condition and fixup | |
501 | + * 'lcd_base' address. | |
502 | + */ | |
503 | + if ((unsigned long)lcdbase != gd->fb_base) | |
504 | + lcd_base = (void *)gd->fb_base; | |
505 | + | |
506 | + debug("[LCD] Using LCD frambuffer at %p\n", lcd_base); | |
507 | + | |
496 | 508 | lcd_get_size(&lcd_line_length); |
497 | 509 | lcd_line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8; |
498 | 510 | lcd_is_enabled = 1; |
drivers/video/bcm2835.c
... | ... | @@ -23,17 +23,7 @@ |
23 | 23 | DECLARE_GLOBAL_DATA_PTR; |
24 | 24 | |
25 | 25 | /* Global variables that lcd.c expects to exist */ |
26 | -int lcd_line_length; | |
27 | -int lcd_color_fg; | |
28 | -int lcd_color_bg; | |
29 | -void *lcd_base; | |
30 | -void *lcd_console_address; | |
31 | -short console_col; | |
32 | -short console_row; | |
33 | 26 | vidinfo_t panel_info; |
34 | -char lcd_cursor_enabled; | |
35 | -ushort lcd_cursor_width; | |
36 | -ushort lcd_cursor_height; | |
37 | 27 | |
38 | 28 | struct msg_query { |
39 | 29 | struct bcm2835_mbox_hdr hdr; |
... | ... | @@ -119,7 +109,6 @@ |
119 | 109 | panel_info.vl_bpix = LCD_COLOR16; |
120 | 110 | |
121 | 111 | gd->fb_base = msg_setup->allocate_buffer.body.resp.fb_address; |
122 | - lcd_base = (void *)gd->fb_base; | |
123 | 112 | } |
124 | 113 | |
125 | 114 | void lcd_enable(void) |