From: "\"David Müller (ELSOFT AG)\"" <d.mueller@elsoft.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: Patch s3c2410 nand-boot.
Date: Fri, 19 Sep 2003 12:15:32 +0200 [thread overview]
Message-ID: <3F6AD744.1030107@elsoft.ch> (raw)
In-Reply-To: <3F69A08E.2000907@libero.it>
Hello
Gianluca wrote:
> I have changed NAND code only to remove warning beacuse I don't use
> some variable an then I rewrite "unsigned long nandptr = nand->IO_ADDR;" in
> "unsigned long nandptr; nandptr = nand->IO_ADDR;".
>
Wolfgang and I have agreed, that direct hardware accesses and board
specific implementation details should be removed from "cmd_nand.c", but
should be implemented in a cpu and / or board specific low level NAND
flash driver instead.
Please take a look at the NAND part of the Linux MTD drivers to get an
idea how it should work.
> David, I've forwarded the patch to you. Can you please have a look at
> the implementation details? Thanks.
>
I'm afraid that "bulletproof" booting from a NAND flash is not as simple
as i may look at first. Please keep in mind that NAND flash are not 100%
error free, but contain an arbitrary number of "bad blocks" (and new
ones could appear during lifetime). Only the two first blocks of a NAND
flash device are normally guarantied to be error free. Additionally the
code which can be executed "directly" on the S3C24x0 when booting from a
NAND flash is further limited to 4KB in size.
So a multi stage boot process has to be implemented. After reset,
hardware loads a tiny piece of code from the first two blocks of the
NAND flash. This code has to do:
- minimial initialisation of CPU
- initialisation of SDRAM and NAND flash
- copy rest of boot code (U-Boot) from NAND to SDRAM while taking
care of bad blocks
- jump to an appropriate place to give up control to rest of boot code
Dave
next prev parent reply other threads:[~2003-09-19 10:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3F68D1DF.7020007@libero.it>
2003-09-18 10:31 ` [U-Boot-Users] Re: Patch s3c2410 nand-boot Wolfgang Denk
2003-09-18 12:09 ` Gianluca
2003-09-19 10:15 ` "David Müller (ELSOFT AG)" [this message]
2003-09-19 20:14 ` Wolfgang Denk
2003-09-22 13:22 ` Matt Matoushek
2003-09-20 13:57 Woodruff, Richard
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=3F6AD744.1030107@elsoft.ch \
--to=d.mueller@elsoft.ch \
--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