All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tanmay Upadhyay <tanmay.upadhyay@einfochips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Kirkwood: bugfix: DRAM size initialization
Date: Fri, 15 Oct 2010 17:28:28 +0530	[thread overview]
Message-ID: <4CB841E4.3020906@einfochips.com> (raw)
In-Reply-To: <1287060429-14634-1-git-send-email-tanmay.upadhyay@einfochips.com>

Hi All,

I was a bit hasty in providing the patch. Given patch solves u-boot 
stuff, but Linux kernel still has some trouble. I am providing second 
version of this patch which takes care of start address also. This fixes 
Linux kernel issue.

Please ignore this version.

Sorry,

Tanmay

On 10/14/2010 06:17 PM, Tanmay Upadhyay wrote:
> If start of any DRAM bank is greater than total DDR size, remaining
> DDR bank sizes were left un-initialized in dram_init function. This
> could break other functions who uses array 'gd->bd->bi_dram'.Kirkwood
> network driver is one example.
>
> Signed-off-by: Tanmay Upadhyay<tanmay.upadhyay@einfochips.com>
> ---
>   arch/arm/cpu/arm926ejs/kirkwood/dram.c |    7 +++++++
>   1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
> index 7439c87..cb396d1 100644
> --- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
> +++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
> @@ -81,6 +81,13 @@ int dram_init(void)
>   		gd->ram_size += gd->bd->bi_dram[i].size;
>
>   	}
> +
> +	for (; i<  CONFIG_NR_DRAM_BANKS; i++) {
> +		/* If above loop terminated prematurely, we need to set
> +		 * remaining bank sizes as 0 */
> +		gd->bd->bi_dram[i].size = 0;
> +	}
> +
>   	return 0;
>   }
>
>    

      parent reply	other threads:[~2010-10-15 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 12:47 [U-Boot] [PATCH] Kirkwood: bugfix: DRAM size initialization Tanmay Upadhyay
2010-10-14 13:48 ` g_remlin
2010-10-15 11:58 ` Tanmay Upadhyay [this message]

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=4CB841E4.3020906@einfochips.com \
    --to=tanmay.upadhyay@einfochips.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 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.