public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Testing rewrite of NAND code?
Date: Mon, 26 Sep 2005 17:39:25 +0200	[thread overview]
Message-ID: <20050926153925.GA6462@orphique> (raw)
In-Reply-To: <f870da1805092607525c7159a8@mail.gmail.com>

On Mon, Sep 26, 2005 at 04:52:13PM +0200, Mike Rapoport wrote:
> When I tried to write data to the NAND flash using the command
> => nand write.jffs2 400000 200000 400000
> 
> the system hanged right after printing:
> "NAND write: device 0 offset 2097152, size 4194304 ...  4194304 bytes
> written: OK"

This is really strange. Code reads:

i = strncmp(cmd, "read", 4) == 0;       /* 1 = read, 0 = write */
printf("\nNAND %s: device %d offset %u, size %u ... ",
       i ? "read" : "write", nand_curr_device, off, size);
if (i)
	ret = nand_read(nand, off, &size, (u_char *)addr);
else
	ret = nand_write(nand, off, &size, (u_char *)addr);
printf(" %d bytes %s: %s\n", size,
       i ? "read" : "written", ret ? "ERROR" : "OK");
return ret == 0 ? 0 : 1;

So it seems nand_write returned sucessfuly. Could you debug it a bit
more? Perhaps stack corruption?

Thanks,
	ladis

  reply	other threads:[~2005-09-26 15:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22  9:40 [U-Boot-Users] Testing rewrite of NAND code? Wolfgang Denk
2005-09-26  9:45 ` [U-Boot-Users] " Hoda
2005-09-26 11:01   ` Hoda
2005-09-26 14:52 ` [U-Boot-Users] " Mike Rapoport
2005-09-26 15:39   ` Ladislav Michl [this message]
2005-10-02 12:44     ` Mike Rapoport
2005-09-28  8:21 ` [U-Boot-Users] " Hoda

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=20050926153925.GA6462@orphique \
    --to=ladis@linux-mips.org \
    --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