From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Problem in writing downloaded image to NAND device
Date: Wed, 28 Nov 2007 12:00:24 +0100 [thread overview]
Message-ID: <200711281200.25153.sr@denx.de> (raw)
In-Reply-To: <794354.44331.qm@web94811.mail.in2.yahoo.com>
On Wednesday 28 November 2007, Dharmosoth Seetharam wrote:
> I have one doubt in NAND write/read PATH.
>
> > > nand_write() --> nand_write_ecc() -->
> > > nand_write_page() --> nand_write_buf() -->
> > >
> > >
> > > in nand_write_buf() :
> > >
> > > for (i=0; i<len; i++) {
> > > writeb(buf[i], this->IO_ADDR_W);
> > >
> > > << writeb is defined as
> > > (*(volatile unsigned char *)(a) = (v)) >>
>
> How can be "n" (where n=len) characters are
> going to written this->IO_ADDR_W.
>
>
> As per the above fro loop, I am getting confuse
> that is - for each character from buf ( ie. buf[i])
> the dest. address will be the same. So, there will be
> a overwriting to the same dest. address in NAND.
>
> Is there any logic behind this stmt ??
Yes. This is the way is supposed to work. NAND FLASH chips don't have a "flat
address" model like NOR chips do. They don't have address signals at all. You
have to write the address using the data signals before writing the data
itself. This is done in conjunction with some control signals. So the data
signals are in reality multiplexed address/data pins.
> Please suggest me the right way to understand the
> NAND write PATH from U-Boot code.
I suggest you take a look at a NAND chip data sheet to understand how NAND
chips are used.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2007-11-28 11:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 9:04 [U-Boot-Users] Problem in writing downloaded image to NAND device Dharmosoth Seetharam
2007-11-27 9:23 ` Stefan Roese
2007-11-27 15:40 ` Dharmosoth Seetharam
2007-11-27 18:31 ` Stefan Roese
2007-11-27 22:08 ` Wolfgang Denk
2007-11-28 10:45 ` Dharmosoth Seetharam
2007-11-28 11:00 ` Stefan Roese [this message]
2007-11-29 11:04 ` Dharmosoth Seetharam
2007-11-29 11:21 ` Stefan Roese
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=200711281200.25153.sr@denx.de \
--to=sr@denx.de \
--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