From: Alex Waterman <awaterman@dawning.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] nand_spl: Fix large page nand_command()
Date: Wed, 06 Apr 2011 16:01:52 -0400 [thread overview]
Message-ID: <4D9CC6B0.6020608@dawning.com> (raw)
In-Reply-To: <20110405184220.GA31867@schlenkerla.am.freescale.net>
Sorry, I screwed up the settings in Thunderbird, hopefully I fixed the
white space/name issues now.
About the patch not applying, I used git format-patch and git apply to
test the stuff locally, was that wrong?
Here is a revised patch, I hope this is better.
- Alex
From: Alex Waterman <awaterman@dawning.com>
Date: Wed, 6 Apr 2011 15:09:57 -0400
Subject: [PATCH] nand_spl: Fix large page nand_command()
This patch changes the large page nand_command() routine to use a word
offset instead of a byte offset. The 'offs' argument gets divided by 2
so that the offset passed to nand_command() is still by byte offset.
Originally, the offset was not shifted and when too high an offset was
requested the nand chip would attempt to read non-existent data.
Changes for v2:
- Moved the offset calculation to outside of the OOB emulation code.
- Hopefully no more whitespace mangling.
Signed-off-by: Alex Waterman <awaterman@dawning.com>
---
nand_spl/nand_boot.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index 76b8566..4a96878 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -90,6 +90,10 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8
cmd = NAND_CMD_READ0;
}
+ /* Shift the offset from byte addressing to word addressing. */
+ if (this->options & NAND_BUSWIDTH_16)
+ offs >>= 1;
+
/* Begin command latch cycle */
this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE);
/* Set ALE and clear CLE to start address cycle */
-- 1.7.3.1
next prev parent reply other threads:[~2011-04-06 20:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 14:41 [U-Boot] [PATCH] nand_spl: Fix large page nand_command() Alex
2011-04-05 18:42 ` Scott Wood
2011-04-06 20:01 ` Alex Waterman [this message]
2011-04-11 18:58 ` [U-Boot] [PATCH v2] " Scott Wood
2011-05-01 14:43 ` Wolfgang Denk
2011-05-03 16:08 ` 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=4D9CC6B0.6020608@dawning.com \
--to=awaterman@dawning.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.