[U-Boot] [PATCH 21/31] mpc83xx, kmeter1: autodetect size of DDR II Ram.
Heiko Schocher
hs at denx.de
Thu Jan 29 10:08:07 CET 2009
Hello Kim,
Kim Phillips wrote:
> On Wed, 28 Jan 2009 10:40:20 +0100
> Heiko Schocher <hs at denx.de> wrote:
>
>> Signed-off-by: Heiko Schocher <hs at denx.de>
>> ---
>
> please be more verbose in your commit messages.
>
>> @@ -135,6 +128,24 @@ int fixed_sdram(void)
>> udelay (200);
>> im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
>>
>> + msize = CONFIG_SYS_DDR_SIZE;
>> + msize *= 1024;
>> + msize *= 1024;
>
> can we make these 3 lines one line?
Yes.
>> + disable_addr_trans ();
>> + msize = get_ram_size (CONFIG_SYS_DDR_BASE, msize);
>> + enable_addr_trans ();
>> + msize /= (1024 * 1024);
>> + if (CONFIG_SYS_DDR_SIZE != msize) {
>> + for (ddr_size = msize << 20, ddr_size_log2 = 0;
>> + (ddr_size > 1); ddr_size = ddr_size >> 1, ddr_size_log2++) {
>> + if (ddr_size & 1)
>> + return -1;
>> + }
>
> I realize they existed before, but the braces are not necessary here.
OK
thanks
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
More information about the U-Boot
mailing list