Re: [PATCH v3] mtd: nand: add mrvl-nand driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Jarzmik <robert.jarzmik@xxxxxxx> writes:

> +static int mrvl_nand_ready(struct mtd_info *mtd)
> +{
> +	struct mrvl_nand_host *host = mtd_info_to_host(mtd);
> +	u32 ndcr;
> +
> +	ndcr = nand_readl(host, NDSR);
> +	if (host->cmd_ongoing == NAND_CMD_RESET)
> +		if (host->cs == 0)
> +			return ndcr & NDSR_FLASH_RDY;
> +		if (host->cs == 1)
> +			return ndcr & NDSR_RDY;
> +	if (host->cs == 0)
> +		return ndcr & NDSR_CS0_CMDD;
> +	if (host->cs == 1)
> +		return ndcr & NDSR_CS1_CMDD;
> +	return 1;
> +}

This function should be purified, and the NAND_CMD_RESET test thrown away. In a
multiple write or erase case, this function should really wait for the NAND to
be ready. For v4.

Cheers.

--
Robert

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux