mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: barebox@lists.infradead.org
Subject: Re: [PATCH v3] mtd: nand: add mrvl-nand driver
Date: Fri, 09 Jan 2015 23:07:46 +0100	[thread overview]
Message-ID: <87d26nzjyl.fsf@free.fr> (raw)
In-Reply-To: <1420748521-9890-1-git-send-email-robert.jarzmik@free.fr>

Robert Jarzmik <robert.jarzmik@free.fr> 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2015-01-09 22:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 20:22 Robert Jarzmik
2015-01-09 22:07 ` Robert Jarzmik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d26nzjyl.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox