public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Laird <danieljlaird@hotmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Booting from NAND Flash Problems
Date: Wed, 17 May 2006 11:32:08 -0700 (PDT)	[thread overview]
Message-ID: <4436349.post@talk.nabble.com> (raw)

I am working on a  board that has a mips processor and only Nand Flash.

This creates a problem as u-boot cannot be run directly from Nand Flash as
only the first 16K of Nand flash can be read by a processor without a Nand
Flash Driver.

This means that a small program has to run first.  This small program is <
16K in size and copies U-Boot from Nand Flash into RAM and then executes it.

In theory this should work fine.

bootprom loads micro bootloader.
bootloader loads u-boot
u-boot starts and relocates itself 
u-boot starts running.

However i am having loads of issues with running u-boot with cache enabled. 
If cache is enabled then the Nand Driver (I am using the latest Linux MTD
based driver)
has problems as it uses a DMA copy to copy to the Nand Flash.
If I implement cache flushing I break u-boot.

This is because it starts to flush the cache when reading the environment
that is located in Nand Flash the problem is that the relocation seems to
have not completed so the stack that is in Cache locked addresses goes wrong
(PCI fails to work).

If I try to run u-boot uncached I fail as well.

I was wondering if anyone has any hints or tips on how u-boot is used in a
system with only Nand Flash and a Mips processor.
I have seen other posts suggesting mips processors should run uncached but
this is obviously slower.
Has the case been consider where relocation is not necessary i.e a small
program just loads the executable to a location and runs it.  I know
relocation can save memory but in my system it means extra copying and
currently extra headaches!!

Hope some people can help
cheers
dan



--
View this message in context: http://www.nabble.com/Booting-from-NAND-Flash-Problems-t1637982.html#a4436349
Sent from the Uboot - Users forum@Nabble.com.

             reply	other threads:[~2006-05-17 18:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 18:32 Daniel Laird [this message]
2006-05-17 22:48 ` [U-Boot-Users] Booting from NAND Flash Problems Wolfgang Denk
2006-05-22  7:35   ` Daniel Laird
2006-05-22  9:38     ` Wolfgang Denk
2006-05-23  7:47       ` Daniel Laird
2006-05-18  4:28 ` Frank

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=4436349.post@talk.nabble.com \
    --to=danieljlaird@hotmail.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