From: Michael Roth <mroth@nessie.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] Stamp9261 board support
Date: Thu, 05 Feb 2009 15:07:31 +0100 [thread overview]
Message-ID: <498AF2A3.2000004@nessie.de> (raw)
In-Reply-To: <20090204160554.118A08322908@gemini.denx.de>
Wolfgang Denk schrieb:
>> +int dram_init(void)
>> +{
>> + gd->bd->bi_dram[0].start = PHYS_SDRAM;
>> + gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
>> + return 0;
>> +}
>
> You should auto-size the RAM instead of hardcoding it.
[...]
>> +#define CONFIG_NR_DRAM_BANKS 1
>> +#define PHYS_SDRAM 0x20000000
>> +#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
>
> Please use get_ram_size() instead.
On this board U-Boot runs from the same memory which get_ram_size()
should probe for its actual size.
Currently, as far as I can see, the implementation of get_ram_size()
don't hit itself (by fortune?) while probing. But maybe the algorithm
will change in some feature.
Additionally the fixed RAM size is (implicit) needed in several
other places for example CONFIG_SYS_MEMTEST_END and lowlevel
initialization of SDRAM, relocation to TEXT_BASE and so on.
Normally autoconf is a good thing (TM) but in this case I'm not sure.
Michael Roth
next prev parent reply other threads:[~2009-02-05 14:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-04 14:29 [U-Boot] [PATCH 0/2] Initial Stamp9261 board support Michael Roth
2009-02-04 14:29 ` [U-Boot] [PATCH 1/2] Allow board specific overwriting of library code Michael Roth
2009-02-04 14:29 ` [U-Boot] [PATCH 2/2] Stamp9261 board support Michael Roth
2009-02-04 16:05 ` Wolfgang Denk
2009-02-05 14:07 ` Michael Roth [this message]
2009-02-04 14:48 ` [U-Boot] [PATCH 1/2] Allow board specific overwriting of library code Jerry Van Baren
2009-02-04 15:36 ` Wolfgang Denk
2009-02-04 16:00 ` Michael Roth
2009-02-04 16:08 ` Wolfgang Denk
2009-02-04 16:18 ` Michael Roth
2009-02-04 16:23 ` Mike Frysinger
2009-02-04 21:12 ` 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=498AF2A3.2000004@nessie.de \
--to=mroth@nessie.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.