[U-Boot] [PATCH 2/4] MX51: Add IPU driver for video support

Wolfgang Denk wd at denx.de
Tue Oct 12 13:30:53 CEST 2010


Dear Stefano Babic,

In message <1286875504-9058-3-git-send-email-sbabic at denx.de> you wrote:
> The patch is a porting of the IPU Linux driver
> developed by Freescale to have framebuffer
> functionalities in u-boot.
> Most features are dropped from the original driver and
> only LCD support is the goal of this porting.

I don't know how close this is to the original Linux driver;
eventually you should add a more precise reference to the original
version in the commit message here, too.

> --- /dev/null
> +++ b/drivers/video/ipu.h
> @@ -0,0 +1,316 @@
...
> +typedef unsigned char bool;
> +#define true 1
> +#define false 0

An, no.  Can we please drop that.

> +#define IDMA_CHAN_INVALID	0xFF
> +#define HIGH_RESOLUTION_WIDTH	1024
> +
> +struct clk {
> +	const char *name;
> +	int id;
> +	/* Source clock this clk depends on */
> +	struct clk *parent;
> +	/* Secondary clock to enable/disable with this clock */
> +	struct clk *secondary;
> +	/* Current clock rate */
> +	unsigned long rate;
> +	/* Reference count of clock enable/disable */
> +	__s8 usecount;
> +	/* Register bit position for clock's enable/disable control. */
> +	u8 enable_shift;
> +	/* Register address for clock's enable/disable control. */
> +	void *enable_reg;
> +	u32 flags;
> +	/* Function ptr to recalculate the clock's rate based on parent
> +	   clock's rate */
> +	void (*recalc) (struct clk *);
> +	/* Function ptr to set the clock to a new rate. The rate must match a
> +	   supported rate returned from round_rate. Leave blank if clock is not
> +	   programmable */
> +	int (*set_rate) (struct clk *, unsigned long);
> +	/* Function ptr to round the requested clock rate to the nearest
> +	   supported rate that is less than or equal to the requested rate. */
> +	unsigned long (*round_rate) (struct clk *, unsigned long);
> +	/* Function ptr to enable the clock. Leave blank if clock can not
> +	   be gated. */
> +	int (*enable) (struct clk *);
> +	/* Function ptr to disable the clock. Leave blank if clock can not
> +	   be gated. */
> +	void (*disable) (struct clk *);
> +	/* Function ptr to set the parent clock of the clock. */
> +	int (*set_parent) (struct clk *, struct clk *);

Incorrect multi-line comment style. Please fix globally. [or is the
whole file a verbatim copy of the Linux file?]


> +/* @} */
> +/* @name YUV Planar Formats */
> +/* @{ */

Oops. What's that?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I distrust all systematisers, and avoid them. The will  to  a  system
shows a lack of honesty.
- Friedrich Wilhelm Nietzsche _Götzen-Dämmerung [The Twilight of  the
Idols]_ ``Maxims and Missiles'' no. 26


More information about the U-Boot mailing list