[U-Boot] [PATCH] Add inverted clock polarity support for Atmel LCD driver

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun Jul 19 11:34:23 CEST 2009


> This definition in struct vidinfo for Atmel LCD
> 	/* LCD configuration register */
>         u_long vl_sync;         /* Horizontal / vertical sync */
>         u_long vl_bpix;         /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8,
> 				 4 = 16 */
>         u_long vl_tft;          /* 0 = passive, 1 = TFT */
> 
> is confusing. If these fields are supposed to contain flags
> for LCD configuration register LCDCON2 then we should define
> only one "u_long lcdcon2" field containing all the flags/fields
> for sync polarity, bpp, clock polarity, scan mode, display type,
> interface width, LCDD, LCDDEN polarities, LCDDOTCLK mode and memory
> ordering format. We are wasting tree u_longs here and are not even
> able to use half of the possible settings for LCDCON2 register.
> I would rather fix the struct vidinfo for Atmel LCD so that
> people could set needed flags in the board code, e.g.:
> 
> vidinfo_t panel_info = {
> 	...
> 	lcdcon2:	ATMEL_LCDC_INVLINE_INVERTED |
>                         ATMEL_LCDC_INVFRAME_INVERTED |
> 			ATMEL_LCDC_INVCLK_INVERTED;
> 	...
> }
I disagree here we must not make the panel_info atmel specific that way
we can add fields to pass atmel specific info which are pass via
struct atmel_lcdfb_info in Linux
But we need to be sync with linux as possible to simplify port and bugfix.

btw on Linux you do not specify it directly you specific this
FB_SYNC_HOR_HIGH_ACT	=> ATMEL_LCDC_INVLINE_INVERTED
FB_SYNC_VERT_HIGH_ACT	=> ATMEL_LCDC_INVFRAME_INVERTED

Best Regards,
J.


More information about the U-Boot mailing list