[U-Boot-Users] [PATCH 6/7 v6] NAND: add NAND driver for S3C64XX

Scott Wood scottwood at freescale.com
Fri Aug 8 00:15:15 CEST 2008


On Wed, Aug 06, 2008 at 09:42:27PM +0200, Guennadi Liakhovetski wrote:
> +	if (ctrl & NAND_CTRL_CHANGE) {
> +		if (ctrl & NAND_CLE)
> +			this->IO_ADDR_W = (void __iomem *)NFCMMD;
> +		else if (ctrl & NAND_ALE)
> +			this->IO_ADDR_W = (void __iomem *)NFADDR;
> +		else
> +			this->IO_ADDR_W = (void __iomem *)NFDATA;
> +		if (ctrl & NAND_NCE)
> +			s3c_nand_select_chip(mtd, 0);
> +		else
> +			s3c_nand_select_chip(mtd, -1);

What if select_chip(mtd, 1) had been called?

> +/*
> + * Function for checking device ready pin
> + * Written by jsgood
> + */
> +static int s3c_nand_device_ready(struct mtd_info *mtdinfo)
> +{
> +	while (!(readl(NFSTAT) & NFSTAT_RnB)) {}
> +	return 1;
> +}

Might want a timeout here.

> +	u_char err_type, repared;

repaired

-Scott




More information about the U-Boot mailing list