public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 21/31] mpc83xx, kmeter1: autodetect size of DDR II Ram.
Date: Wed, 28 Jan 2009 20:10:36 -0600	[thread overview]
Message-ID: <20090128201036.dbd42934.kim.phillips@freescale.com> (raw)
In-Reply-To: <49802804.7060806@denx.de>

On Wed, 28 Jan 2009 10:40:20 +0100
Heiko Schocher <hs@denx.de> wrote:

> Signed-off-by: Heiko Schocher <hs@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?

> +	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.

Kim

  reply	other threads:[~2009-01-29  2:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28  9:40 [U-Boot] [PATCH 21/31] mpc83xx, kmeter1: autodetect size of DDR II Ram Heiko Schocher
2009-01-29  2:10 ` Kim Phillips [this message]
2009-01-29  9:08   ` Heiko Schocher

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=20090128201036.dbd42934.kim.phillips@freescale.com \
    --to=kim.phillips@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