public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Please pull u-boot-83xx.git
Date: Mon, 27 Nov 2006 15:26:17 -0600	[thread overview]
Message-ID: <456B57F9.9070405@freescale.com> (raw)
In-Reply-To: <20061127211041.B4463353CA6@atlas.denx.de>

Wolfgang Denk wrote:

> The problem is that I don't want to see any  such  hard-coded  sizes.
> What  I want is documented in the (very old!) "System Initialization"
> section in the README: we may have to configure for a  maximum  size,
> but  except  from that, U-Boot should auto-adjust to different seizes
> of RAM and flash memory.

If I knew how to auto-adjust, I would have coded it that way.  To my knowledge, 
there is no generic way to query to amount of flash on the system when the code 
in start.S is being run.  The flash configuration code (e.g. flash_init()) is 
executed much later in the boot process.

> What exactly is the meaning of CFG_FLASH_SIZE in your code?

It is the size of flash, in megabytes.

> Is  this  a  _maximum_  size  which  is  supported  by   this   board
> configuration, or the exact size that must be presen on the board? 

The maximum size.  The value is used to program LBLAWAR1, so it determines the 
size of the memory window.  I'm not expert on these things, but I presume that 
the window determines what memory can be accessed.  That is, if you have 16MB of 
flash, but you program the window to be 8MB, then you will not be able to access 
the upper half of flash.

This issue becomes interesting when it's the other way around - 8MB of flash, 
and the window is 16MB.  In most cases, I believe this is mostly harmless.

So one suggested to me a while back that I should just program LBLAWAR1 to 16MB 
for everyone.  But then what do I do if a new system comes out with 32MB of 
flash?  Or more?  LBLAWAR1 supports up to 2GB of flash.

So I decided to make it board configurable.  If your board has multiple 
variations, such as some boards with 8MB and some with 16MB, and it's okay to 
program LBLAWAR1 to 16MB for all these boards, then by all means, set 
CFG_FLASH_SIZE to 16 and you're finished.

 > If
> the  board  comes  with  a different flash size, what will the U-Boot
> start messages report, and what size will  be  actually  mapped  once
> U-Boot enters interactive mode?

U-Boot will report whatever flash_init() says, which is typically calculated by 
querying the hardware.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

  reply	other threads:[~2006-11-27 21:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-04  2:11 [U-Boot-Users] Please pull u-boot-83xx.git Kim Phillips
2006-11-16 23:55 ` Joakim Tjernlund
2006-11-26 13:46 ` Stefan Roese
2006-11-26 20:02   ` Wolfgang Denk
2006-11-27 16:41     ` Timur Tabi
2006-11-27 21:10       ` Wolfgang Denk
2006-11-27 21:26         ` Timur Tabi [this message]
2006-11-27 21:36           ` Wolfgang Denk
2006-11-27 21:48             ` Timur Tabi
2006-11-27 21:53               ` Wolfgang Denk
2006-11-27 21:55                 ` Timur Tabi
2006-11-27 22:56                   ` Wolfgang Denk
2006-11-28  0:25               ` Dan Malek
2006-11-28 15:18                 ` Timur Tabi
2006-11-27 16:55   ` Timur Tabi
2006-11-27 22:45   ` Timur Tabi
2006-11-27 22:59     ` Wolfgang Denk
2006-11-29  7:18   ` Kim Phillips
2006-11-30 17:07     ` Wolfgang Denk
2006-11-30 17:49       ` Kim Phillips
2006-11-30 18:13       ` Timur Tabi
2006-11-30 21:14         ` [U-Boot-Users] ERROR: Cannot determine a common read delay k b
2006-12-02 12:02           ` Stefan Roese
2006-11-30 23:09         ` [U-Boot-Users] Please pull u-boot-83xx.git Wolfgang Denk
2006-11-26 13:49 ` [U-Boot-Users] Please pull u-boot-83xx.git (I2C rework) Stefan Roese
2006-11-27  2:45   ` Ben Warren
2006-11-27  6:22     ` Stefan Roese
2006-11-27 17:28   ` Timur Tabi
  -- strict thread matches above, loose matches on Subject: below --
2008-01-29 18:10 [U-Boot-Users] Please pull u-boot-83xx.git Kim Phillips
2008-02-11 23:57 ` Wolfgang Denk

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=456B57F9.9070405@freescale.com \
    --to=timur@freescale.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