From: Angelos Manousarides <amanous@inaccessnetworks.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Dynamic location of the environment sector
Date: Wed, 14 Jun 2006 14:55:01 +0300 [thread overview]
Message-ID: <448FF915.5060306@inaccessnetworks.com> (raw)
I have a board that comes in three flash confirurations:
- 32MB
- 64MB
- 128MB
The cfi code can safely detect the flash sizes, banks and widths at boot
time. I have however the problem that the flash chips are "top" type and
the small sectors are at the end of the address space. So I want to make
the last sector (a small sector) to contain the environment. The last
sector though is in a different address (and has a different size)
depending on the flash configuration.
Currently the defines for the environment expect raw numerical values.
Is there an infrastructure somewhere to define the flash size at
runtime? I tried to print the flash sizes in the board specific codes,
for instance:
extern flash_info_t flash_info[];
printf("flash 0 : %d %x\n", flash_info[0].size,
flash_info[0].start[flash_info[0].sector_count-1]);
...
prints:
Flash: 64 MB
In: serial
Out: serial
Err: serial
flash 0 : 67108864 3ff0000
(the second number is the address of the last sector)
And all sizes are detected correctly. I want to use these values to
calculate the location of the environment dynamically at runtime. This
way I can have a single u-boot image for all flash configurations!
--
Angelos Manousaridis
next reply other threads:[~2006-06-14 11:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-14 11:55 Angelos Manousarides [this message]
2006-06-14 14:31 ` [U-Boot-Users] Dynamic location of the environment sector Wolfgang Denk
2006-06-21 10:48 ` Angelos Manousarides
2006-06-21 14:11 ` Wolfgang Denk
2006-06-21 17:16 ` Angelos Manousarides
2006-06-21 17:21 ` Angelos Manousarides
2006-06-21 20:47 ` Wolfgang Denk
2006-06-21 20:46 ` Wolfgang Denk
2006-06-22 10:21 ` Angelos Manousarides
2006-06-22 10:44 ` Wolfgang Denk
2006-06-22 11:02 ` Angelos Manousarides
2006-06-26 14:57 ` Angelos Manousarides
2006-06-26 21:10 ` Wolfgang Denk
2006-06-27 9:20 ` Angelos Manousarides
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=448FF915.5060306@inaccessnetworks.com \
--to=amanous@inaccessnetworks.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