[PATCH 1/5] video: add atmel lcdc frambuffer support

Sascha Hauer s.hauer at pengutronix.de
Sun Sep 23 07:00:00 EDT 2012


On Sat, Sep 22, 2012 at 08:26:44PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> This IP is present on the at91sam9 until the sam9g45, on the sam9x5 we use a
> new IP.
> 
> This driver is based on the linux one.
> 
> +
> +/* Way LCD wires are connected to the chip:
> + * Some Atmel chips use BGR color mode (instead of standard RGB)
> + * A swapped wiring onboard can bring to RGB mode.
> + */
> +#define ATMEL_LCDC_WIRING_BGR	0
> +#define ATMEL_LCDC_WIRING_RGB	1
> +#define ATMEL_LCDC_WIRING_RGB555	2
> +
> +
> + /* LCD Controller info data structure, stored in device platform_data */
> +struct atmel_lcdfb_info {
> +	struct fb_info		*info;
> +	void __iomem		*mmio;
> +	struct device_d		*device;
> +
> +	unsigned int		guard_time;
> +	unsigned int		smem_len;
> +	struct clk		*bus_clk;
> +	struct clk		*lcdc_clk;
> +
> +	bool			lcdcon_is_backlight;
> +	bool			lcdcon_pol_negative;
> +	u8			saved_lcdcon;
> +
> +	u8			default_bpp;
> +	u8			lcd_wiring_mode;
> +	unsigned int		default_lcdcon2;
> +	unsigned int		default_dmacon;
> +	void (*atmel_lcdfb_power_control)(int on);
> +	struct fb_videomode	*mode_list;
> +	unsigned		num_modes;
> +	u32			pseudo_palette[16];
> +};

Honestly, Passing in the driver internal data as platform_data is completely
rubbish. If you want to have it the-same-like-in-Linux, then fix it in Linux
first.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list