1.1 --- a/stage2/lcd.c Wed Jun 10 16:06:38 2015 +0200
1.2 +++ b/stage2/lcd.c Wed Jun 10 17:34:49 2015 +0200
1.3 @@ -31,27 +31,8 @@
1.4 #include "sdram.h"
1.5 #include "board.h"
1.6
1.7 -#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
1.8 -#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
1.9 -
1.10 extern vidinfo_t panel_info;
1.11
1.12 -unsigned long lcd_setmem(unsigned long addr)
1.13 -{
1.14 - unsigned long size;
1.15 -
1.16 - size = lcd_get_size();
1.17 -
1.18 - /* Round up to nearest full page, or MMU section if defined */
1.19 - size = ALIGN(size, PAGE_SIZE);
1.20 - addr = ALIGN(addr - PAGE_SIZE + 1, PAGE_SIZE);
1.21 -
1.22 - /* Allocate pages for the frame buffer. */
1.23 - addr -= size;
1.24 -
1.25 - return addr;
1.26 -}
1.27 -
1.28 static void test_pattern(void *lcd_base)
1.29 {
1.30 unsigned short v_max = panel_info.vl_row;
1.31 @@ -85,10 +66,7 @@
1.32 __lcd_display_pin_init();
1.33 __lcd_display_on();
1.34
1.35 - /* Start from the top of memory and obtain a framebuffer region. */
1.36 -
1.37 - lcd_base = (void *) lcd_setmem(get_memory_size());
1.38 - lcd_ctrl_init(lcd_base);
1.39 + lcd_ctrl_init(&lcd_base);
1.40 lcd_clear(lcd_base);
1.41 lcd_enable();
1.42 }