pxafb: enable VIDEO support (CONFIG_VIDEO).
PATCH 1/1 pxafb: enable VIDEO support (CONFIG_VIDEO).
Signed-off-by Rodolfo Giometti <[email protected]>
--- common/lcd.c | 34 ---------------------------------- cpu/pxa/pxafb.c | 4 ++-- lib_arm/board.c | 37 +++++++++++++++++++++++++++++++++++-- 3 files changed, 37 insertions(+), 38 deletions(-)
common/lcd.c +0 -34
@@ -39,7 +39,6 @@#if defined(CONFIG_POST )#include <post.h> #endif -#include <lcd.h> #include <watchdog.h> #if defined(CONFIG_PXA250 ) || defined(CONFIG_PXA27X )
@@ -73,8 +72,6 @@DECLARE_GLOBAL_DATA_PTR ; -ulong lcd_setmem (ulong addr); -static void lcd_drawchars (ushort x,ushort y,uchar *str,int count);static inline void lcd_puts_xy (ushort x,ushort y,uchar *s);static inline void lcd_putc_xy (ushort x,ushort y,uchar c);
@@ -447,37 +444,6 @@ static int lcd_init (void *lcdbase) } -/************************************************************************/ -/* ** ROM capable initialization part - needed to reserve FB memory */ -/************************************************************************/ -/* -* This is called early in the system initialization to grab memory -* for the LCD controller. -* Returns new address for monitor, after reserving LCD buffer memory -* -* Note that this is running from ROM, so no write access to global data. -*/ -ulong lcd_setmem (ulong addr) -{ -ulong size; -int line_length = (panel_info.vl_col *NBITS (panel_info.vl_bpix)) /8 ; - -debug ("LCD panel info: %d x %d, %d bit/pix\n" , - panel_info.vl_col, panel_info.vl_row,NBITS (panel_info.vl_bpix) ); - - size = line_length * panel_info.vl_row; - -/* Round up to nearest full page */ - size = (size + (PAGE_SIZE -1 )) & ~(PAGE_SIZE -1 ); - -/* Allocate pages for the frame buffer. */ - addr -= size; - -debug ("Reserving %ldk for LCD Framebuffer at: %08lx\n" , size>>10 , addr); - -return (addr); -} -/*----------------------------------------------------------------------*/ static void lcd_setfgcolor (int color)
cpu/pxa/pxafb.c +2 -2
@@ -38,7 +38,7 @@/* #define DEBUG */ -#ifdef CONFIG_LCD +#if defined(CONFIG_LCD ) || defined(CONFIG_VIDEO )/*----------------------------------------------------------------------*/ /*
@@ -507,4 +507,4 @@ static int pxafb_init (vidinfo_t *vid)/************************************************************************/ /************************************************************************/ -#endif /* CONFIG_LCD */ +#endif /* CONFIG_LCD || CONFIG_VIDEO */
lib_arm/board.c +35 -2
@@ -44,6 +44,7 @@#include <devices.h> #include <version.h> #include <net.h> +#include <lcd.h> #ifdef CONFIG_DRIVER_SMC91111 #include "../drivers/smc91111.h"
@@ -98,6 +99,38 @@ void mem_malloc_init (ulong dest_addr) mem_malloc_end - mem_malloc_start); } +/************************************************************************/ +/* ** ROM capable initialization part - needed to reserve FB memory */ +/************************************************************************/ +/* +* This is called early in the system initialization to grab memory +* for the LCD controller. +* Returns new address for monitor, after reserving LCD buffer memory +* +* Note that this is running from ROM, so no write access to global data. +*/ +static +ulong lcd_setmem (ulong addr) +{ +ulong size; +int line_length = (panel_info.vl_col *NBITS (panel_info.vl_bpix)) /8 ; + +debug ("LCD panel info: %d x %d, %d bit/pix\n" , + panel_info.vl_col, panel_info.vl_row,NBITS (panel_info.vl_bpix) ); + + size = line_length * panel_info.vl_row; + +/* Round up to nearest full page */ + size = (size + (PAGE_SIZE -1 )) & ~(PAGE_SIZE -1 ); + +/* Allocate pages for the frame buffer. */ + addr -= size; + +debug ("Reserving %ldk for LCD Framebuffer at: %08lx\n" , size>>10 , addr); + +return (addr); +} +void *sbrk (ptrdiff_t increment) {ulong old = mem_malloc_brk;
@@ -240,7 +273,7 @@ void start_armboot (void)#ifndef CFG_NO_FLASH ulong size;#endif -#if defined(CONFIG_VFD ) || defined(CONFIG_LCD ) +#if defined(CONFIG_VFD ) || defined(CONFIG_LCD ) || defined(CONFIG_VIDEO )unsigned long addr;#endif
@@ -280,7 +313,7 @@ void start_armboot (void) gd->fb_base = addr;#endif /* CONFIG_VFD */ -#ifdef CONFIG_LCD +#if defined(CONFIG_LCD ) || defined(CONFIG_VIDEO )# ifndef PAGE_SIZE # define PAGE_SIZE 4096# endif
Signature · 1 line
1.5.1.1