From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] NetStar: Fix NAND
Date: Tue, 17 Mar 2009 14:10:05 -0500 [thread overview]
Message-ID: <49BFF58D.1050407@freescale.com> (raw)
In-Reply-To: <20090317195053.GA2126@localhost.localdomain>
Ladislav Michl wrote:
> On Tue, Mar 17, 2009 at 12:17:30PM -0500, Scott Wood wrote:
>> On Mon, Mar 16, 2009 at 11:28:24PM +0100, Ladislav Michl wrote:
>>> Fix NAND support broken during new NAND code merge. Move those few lines of
>>> code to board/netstar/netstar.c
>> What was the breakage?
>
> Blocks being considered bad during read. I did not make any deeper analysis,
> just copied proven code.
I think I see the issue -- if NAND_CTRL_CHANGE is not set, it will reset
IO_ADDR_W rather than leaving it alone. There's also a bug for 64-bit
platforms if I/O is over 4GiB, but that's not applicable here.
> The code above is identical to that found in linux driver. I'm considering
> useful to keep it in sync for sake of easier future upgrades.
> Sure it could be written as
> if (ctrl & NAND_CLE)
> mask = 0x02;
> else
> mask = 0;
> if (ctrl & NAND_ALE)
> mask |= 0x04;
> but the former is a bit shorter.
I was thinking more along the lines of:
unsigned long mask = 0;
if (ctrl & NAND_CLE)
mask |= 2;
if (ctrl & NAND_ALE)
mask |= 4;
...simple and symmetric. But it doesn't matter overly much; keeping in
sync with the Linux driver is more important.
ACK, though I would like to see the argument to writeb cast to a pointer
before passing it (or else you'll get warnings if the accessor ever
changes from a macro to an inline function).
-Scott
next prev parent reply other threads:[~2009-03-17 19:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 13:31 [U-Boot] [PATCH] Update board NetStar Ladislav Michl
2009-03-16 22:26 ` Ladislav Michl
2009-03-16 22:27 ` [U-Boot] [PATCH 1/5] NetStar: config reindentation Ladislav Michl
2009-03-18 19:42 ` Wolfgang Denk
2009-03-16 22:28 ` [U-Boot] [PATCH 2/5] NetStar: Fix NAND Ladislav Michl
2009-03-17 17:17 ` Scott Wood
2009-03-17 19:50 ` Ladislav Michl
2009-03-17 19:10 ` Scott Wood [this message]
2009-03-16 22:29 ` [U-Boot] [PATCH 3/5] NetStar: use generic flash driver Ladislav Michl
2009-03-18 19:44 ` Wolfgang Denk
2009-03-25 0:14 ` Ladislav Michl
2009-03-16 22:30 ` [U-Boot] [PATCH 4/5] NetStar: add RTC support Ladislav Michl
2009-03-16 22:31 ` [U-Boot] [PATCH 5/5] NetStar: update crcit utility Ladislav Michl
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=49BFF58D.1050407@freescale.com \
--to=scottwood@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox