From: Dharmosoth Seetharam <seetharam_21@yahoo.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Problem in writing downloaded image to NAND device
Date: Tue, 27 Nov 2007 09:04:41 +0000 (GMT) [thread overview]
Message-ID: <596799.22980.qm@web94812.mail.in2.yahoo.com> (raw)
Hi all,
I have a problem in writing to NAND device.
U-Boot 1.2.0 (Nov 27 2007 - 13:18:12)
Board - atmel
cpu - arm926ejs
fs - cramfs
Os - Linux, ARM based OS
64MB SDRAM and 256 MB NAND device.
What i am trying to achieve is:
To copy the downloaded kernel image and fs image
to NAND device.
What I have done is:
1) Downloaded the kernel image and fs image
using tftp download command at U-Boot.
*) tftp 0x22200000 kernel.img
## Checking Image at 22200000 ...
Image Name: Linux 2.6.22
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1872572 Bytes = 1.8 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
U-Boot>
kernel image is downloaded to SDRAM.
Now want to write this kernel image to NAND device.
U-Boot> nand device
Device 0: NAND 256MiB 3,3V 8-bit
U-Boot> nand write 0x22200000 0x0 0x200000
NAND write: device 0 offset 0x0, size 0x200000
2097152 bytes written: OK
U-Boot> nboot 0x22200000 0
Loading from NAND 256MiB 3,3V 8-bit, offset 0x0
Magic Number : 0x0 , required : 0x27051956
Image Name:
Image Type: Invalid CPU Invalid OS Invalid Image
(uncompressed)
Data Size: 0 Bytes = 0 kB
Load Address: 00000000
Entry Point: 00000000
U-Boot>
I have looked @ the code for NAND write
nand_write() --> nand_write_ecc() -->
nand_write_page() --> nand_write_buf() --> writeb()
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)) >>
As per the above for loop every character (ie.
buf[i])
going to written @ the address this->IO_ADDR_W (??).
But, What we need is, start address and len to
write into the NAND device.
Can you please look at this and help me in this
regard.
My main goal here is to write to NAND device.
I wrote my own function to write to NAND device, but
somehow they are getting modified once the command
finishes the execution.
I have testes all these values in the memory using
md command.
<< md memory-addess >>
Please suggest me if i am doing wrong !!
Thanks,
Seetharam
Bollywood, fun, friendship, sports and more. You name it, we have it on http://in.promos.yahoo.com/groups
next reply other threads:[~2007-11-27 9:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 9:04 Dharmosoth Seetharam [this message]
2007-11-27 9:23 ` [U-Boot-Users] Problem in writing downloaded image to NAND device 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
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=596799.22980.qm@web94812.mail.in2.yahoo.com \
--to=seetharam_21@yahoo.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