[U-Boot] [PATCH V2 1/4] Add linux framebuffer header include/linux/fb.h

Stefano Babic sbabic at denx.de
Fri Oct 22 08:23:47 CEST 2010


On 10/22/2010 12:35 AM, Timur Tabi wrote:
> On Wed, Oct 13, 2010 at 5:14 AM, Stefano Babic <sbabic at denx.de> wrote:
>> [port of linux 2.6.34 commit 6a9ee8af344e3bd7dbd61e67037096cdf7f83289]
>>
>> Signed-off-by: Stefano Babic <sbabic at denx.de>
>> ---
>> Changes since V1:
>>  - added precise reference to the kernel version used for porting
>>   in the commit message
> 
> Why are we adding this header file?

Hi Timur,

the main reason is to simplify the porting of Linux framebuffer's
drivers and to not reinvent new structures to set up the LCD parameters,
as well as avoiding to hard-coding their values as some drivers
currently do (I can point to the mx3fb.c driver for MX31).

IMHO using the fb.h makes a reference to a documented (in linux) header
file, that it is easier to understand for someone adding a new custom
board.

I have checked now and I see that some other drivers are requiring these
kind of stuctures: the fsl_diu.c for mpc512x has a custom header file
("board/freescale/common/fsl_diu_fb.h"), where a couple of these
structures are defined from Linux and that are part of fb.h. Really
there is nothing in this header that is suitable only for Freescale's
board, but it points to the fact that a general header is required.

Then, as it is supposed other drivers can have the same requirements,
why do not take the header directly from Linux instead of redefining the
same structures again ?

Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list