From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/3] mpc5121: determine RAM size using get_ram_size()
Date: Thu, 15 Apr 2010 14:20:25 +0200 [thread overview]
Message-ID: <20100415142025.5c75e8eb@wker> (raw)
In-Reply-To: <20100414153147.0DD22E85054@gemini.denx.de>
Hello Wolfgang,
On Wed, 14 Apr 2010 17:31:47 +0200
Wolfgang Denk <wd@denx.de> wrote:
> In message <1271254909-20398-2-git-send-email-agust@denx.de> you wrote:
> > Configure 1GiB address range in DDR LAW and
> > determine the RAM size. Fix DDR LAW afterwards.
>
> Why 1 GiB? Where is this linit coming from? It seems pretty artificial
> to me?
It is the base address for NAND which is 0x40000000 (1GiB) for all
mpc512x boards in the U-Boot tree. But now I see that it is also
wrong as some boards use 0x30000000 for SRAM base. The upper limit
is 2GiB.
> > - u32 msize = CONFIG_SYS_DDR_SIZE * 1024 * 1024;
> > + u32 msize = 1024 * 1024 * 1024;
>
> I'd rather see a (#define'd) constant used here, espeaically as the
> vlue is used again furhter doewn in the code...
Will fix.
> > u32 i;
> >
> > @@ -148,5 +148,10 @@ long int fixed_sdram(ddr512x_config_t *mddrc_config,
> > out_be32(&im->mddrc.ddr_time_config0, mddrc_config->ddr_time_config0);
> > out_be32(&im->mddrc.ddr_sys_config, mddrc_config->ddr_sys_config);
> >
> > + msize = get_ram_size(CONFIG_SYS_DDR_BASE, 0x40000000);
>
> ... i. e. here. Using two different notations for the same number
> makes the code even hearder to read and understand.
>
> I suggest we use CONFIG_SYS_MAX_RAM_SIZE like we do in so many other
> boards, and leave it to the board maintainer to set a usefule default
> value.
Ok, I will submit next patch version with this fix. Thanks!
Best regards,
Anatolij
next prev parent reply other threads:[~2010-04-15 12:20 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 16:10 [U-Boot] [PATCH v2 0/7] Add support for PDM360NG board Anatolij Gustschin
2010-03-16 16:10 ` [U-Boot] [PATCH v2 1/7] mpc512x: make MEM IO Control configuration a board config option Anatolij Gustschin
2010-03-16 16:10 ` [U-Boot] [PATCH v2 2/7] mpc512x: add multi serial PSC support Anatolij Gustschin
2010-03-16 16:10 ` [U-Boot] [PATCH v2 3/7] mpc5121: add PSC serial communication routines Anatolij Gustschin
2010-03-16 16:10 ` [U-Boot] [PATCH v2 4/7] fdt_support: add partitions fixup in mtd node Anatolij Gustschin
2010-03-16 16:10 ` [U-Boot] [PATCH v2 5/7] mpc5121: add common post_word_load/store code Anatolij Gustschin
2010-03-16 16:10 ` [U-Boot] [PATCH v2 6/7] mpc5121: add support for PDM360NG board Anatolij Gustschin
2010-03-16 16:10 ` [U-Boot] [PATCH v2 7/7] mpc5121: cpu/mpc512x/diu.c: fix warnings Anatolij Gustschin
2010-03-21 19:24 ` Wolfgang Denk
2010-03-21 19:23 ` [U-Boot] [PATCH v2 6/7] mpc5121: add support for PDM360NG board Wolfgang Denk
2010-04-14 10:39 ` Anatolij Gustschin
2010-04-14 14:21 ` [U-Boot] [PATCH v3 0/3] Add " Anatolij Gustschin
2010-04-14 14:21 ` [U-Boot] [PATCH v3 1/3] mpc5121: determine RAM size using get_ram_size() Anatolij Gustschin
2010-04-14 14:21 ` [U-Boot] [PATCH v3 2/3] mpc5121: add support for PDM360NG board Anatolij Gustschin
2010-04-14 14:21 ` [U-Boot] [PATCH v3 3/3] mpc5121: pdm360ng: add coprocessor POST Anatolij Gustschin
2010-04-14 15:40 ` Wolfgang Denk
2010-04-15 9:18 ` Detlev Zundel
2010-04-15 9:25 ` Anatolij Gustschin
2010-04-15 11:48 ` Wolfgang Denk
2010-04-15 11:46 ` Wolfgang Denk
2010-04-15 10:24 ` Anatolij Gustschin
2010-04-15 11:54 ` Wolfgang Denk
2010-04-14 15:48 ` [U-Boot] [PATCH v3 2/3] mpc5121: add support for PDM360NG board Wolfgang Denk
2010-04-15 12:32 ` Anatolij Gustschin
2010-04-15 12:43 ` Stefan Roese
2010-04-15 15:18 ` Wolfgang Denk
2010-04-14 15:31 ` [U-Boot] [PATCH v3 1/3] mpc5121: determine RAM size using get_ram_size() Wolfgang Denk
2010-04-15 12:20 ` Anatolij Gustschin [this message]
2010-03-21 19:09 ` [U-Boot] [PATCH v2 5/7] mpc5121: add common post_word_load/store code Wolfgang Denk
2010-03-21 19:08 ` [U-Boot] [PATCH v2 4/7] fdt_support: add partitions fixup in mtd node Wolfgang Denk
2010-03-21 19:05 ` [U-Boot] [PATCH v2 3/7] mpc5121: add PSC serial communication routines Wolfgang Denk
2010-03-21 19:04 ` [U-Boot] [PATCH v2 2/7] mpc512x: add multi serial PSC support Wolfgang Denk
2010-03-21 19:03 ` [U-Boot] [PATCH v2 1/7] mpc512x: make MEM IO Control configuration a board config option Wolfgang Denk
2010-03-21 19:00 ` [U-Boot] [PATCH v2 0/7] Add support for PDM360NG board 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=20100415142025.5c75e8eb@wker \
--to=agust@denx.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.