[U-Boot] [PATCH 1/2] BLOCK: Add freescale IMX51 PATA driver

Stefano Babic sbabic at denx.de
Thu Jan 13 09:55:05 CET 2011


On 01/12/2011 11:46 PM, Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> ---
>  drivers/block/Makefile  |    1 +
>  drivers/block/mxc_ata.c |  149 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 150 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/block/mxc_ata.c

Hi Marek,

> +
> +/* PIO timing table */
> +#define	NR_PIO_SPECS	5
> +uint16_t pio_t0[NR_PIO_SPECS]		= { 600, 383, 240, 180, 120 };
> +uint16_t pio_t1[NR_PIO_SPECS]		= { 70,  50,  30,  30,  25 };
> +uint16_t pio_t2_8[NR_PIO_SPECS]		= { 290, 290, 290, 80,  70 };
> +uint16_t pio_t2_16[NR_PIO_SPECS]	= { 165, 125, 100, 80,  70 };
> +uint16_t pio_t2i[NR_PIO_SPECS]		= { 40,  0,   0,   0,   0 };
> +uint16_t pio_t4[NR_PIO_SPECS]		= { 30,  20,  15,  10,  10 };
> +uint16_t pio_t9[NR_PIO_SPECS]		= { 20,  15,  10,  10,  10 };
> +uint16_t pio_tA[NR_PIO_SPECS]		= { 50,  50,  50,  50,  50 };

As these array are only used here, they should be static.

> +
> +	/* Write TIME_2R/AX/RDX/4 */
> +	val =	(((pio_t2_8[mode] + T) / T) << REG2OFF(&ata_cfg_regs->time_2r)) |

Line too long, please fix globally.

> +		(((pio_tA[mode] + T) / T + 2) << REG2OFF(&ata_cfg_regs->time_ax)) |

Ditto.

Best regards,
Stefano Babic

-- 
=====================================================================
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