LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Mike Hench" <mhench@engagenet.com>
To: "Scott Wood" <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org, linux-mtd@lists.infradead.org,
	dwmw2@infradead.org
Subject: [[PATCH] corrected MPC8313 NAND fixes
Date: Wed, 19 Mar 2008 12:40:15 -0500	[thread overview]
Message-ID: <6629C06B144F5C4098DFF95C4FF9DAF702BA1D11@mailsrv.engagenet.com> (raw)

Fix a race condition in fsl_elbc_run_command
Fix incorrect usage of clearbits32 that bashed option register
Remove work around for bashed register

Signed-off-by: Mike Hench <mhench@elutions.com>

---

--- linux-2.6.25-rc5.orig/drivers/mtd/nand/fsl_elbc_nand.c
2008-03-10 00:22:27.000000000 -0500
+++ linux-2.6.25-rc5/drivers/mtd/nand/fsl_elbc_nand.c	2008-03-19
12:34:36.000000000 -0500
@@ -379,11 +379,11 @@ static int fsl_elbc_run_command(struct m
 	         in_be32(&lbc->fbar), in_be32(&lbc->fpar),
 	         in_be32(&lbc->fbcr), priv->bank);
=20
+	ctrl->irq_status =3D 0;
 	/* execute special operation */
 	out_be32(&lbc->lsor, priv->bank);
=20
 	/* wait for FCM complete flag or timeout */
-	ctrl->irq_status =3D 0;
 	wait_event_timeout(ctrl->irq_wait, ctrl->irq_status,
 	                   FCM_TIMEOUT_MSECS * HZ/1000);
 	ctrl->status =3D ctrl->irq_status;
@@ -861,7 +861,7 @@ static int fsl_elbc_chip_init_tail(struc
 	/* adjust Option Register and ECC to match Flash page size */
 	if (mtd->writesize =3D=3D 512) {
 		priv->page_size =3D 0;
-		clrbits32(&lbc->bank[priv->bank].or, ~OR_FCM_PGS);
+		clrbits32(&lbc->bank[priv->bank].or, OR_FCM_PGS);
 	} else if (mtd->writesize =3D=3D 2048) {
 		priv->page_size =3D 1;
 		setbits32(&lbc->bank[priv->bank].or, OR_FCM_PGS);
@@ -882,11 +882,6 @@ static int fsl_elbc_chip_init_tail(struc
 		return -1;
 	}
=20
-	/* The default u-boot configuration on MPC8313ERDB causes
errors;
-	 * more delay is needed.  This should be safe for other boards
-	 * as well.
-	 */
-	setbits32(&lbc->bank[priv->bank].or, 0x70);
 	return 0;
 }

             reply	other threads:[~2008-03-19 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 17:40 Mike Hench [this message]
2008-03-19 17:41 ` [PATCH] corrected MPC8313 NAND fixes Scott Wood

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=6629C06B144F5C4098DFF95C4FF9DAF702BA1D11@mailsrv.engagenet.com \
    --to=mhench@engagenet.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    /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