From: Dharmosoth Seetharam Date: Thu, 29 Nov 2007 11:04:08 +0000 (GMT) Subject: [U-Boot-Users] Problem in writing downloaded image to NAND device In-Reply-To: <200711281200.25153.sr@denx.de> Message-ID: <510912.56258.qm@web94801.mail.in2.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, I have gone thorugh the nand write code in u-boot. But, i didn't get any problem in that. Does it work for you guys (ie.writing to NAND device) ?? Or Problem with my NAND device itself ?? NAND devie : Samsung, 256 MB. Any one tried the following command ??? >>nand write 0x22200000 0x0 0x800 (???) >>md 0x22200000 (??) Thanks, Seetharam --- Stefan Roese wrote: > 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 > > > 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 > ===================================================================== > Download prohibited? No problem. CHAT from any browser, without download. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/