From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] integratorap: fixup SDRAM memory size detection
Date: Thu, 14 Jul 2011 15:53:38 +0400 [thread overview]
Message-ID: <4E1ED8C2.9000003@mvista.com> (raw)
In-Reply-To: <1310598276-9741-1-git-send-email-linus.walleij@linaro.org>
Hello.
On 14-07-2011 3:04, Linus Walleij wrote:
> This fixes up the SDRAM memory detection code to work with the
> latest relocation code, moves it all into dram_init() and
> activates memory size detection for the Integrator AP.
> Signed-off-by: Linus Walleij<linus.walleij@linaro.org>
> ---
> board/armltd/integrator/integrator.c | 17 +++++++----------
> include/configs/integratorap.h | 2 +-
> 2 files changed, 8 insertions(+), 11 deletions(-)
> diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
> index a0d8de7..931a916 100644
> --- a/board/armltd/integrator/integrator.c
> +++ b/board/armltd/integrator/integrator.c
> @@ -86,17 +86,9 @@ int misc_init_r (void)
> return (0);
> }
>
> -void dram_init_banksize(void)
> -{
> - gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> - gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
> -}
> -
> int dram_init (void)
> {
> - gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
> - PHYS_SDRAM_1_SIZE);
> -
> + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
> #ifdef CONFIG_CM_SPD_DETECT
> {
> extern void dram_query(void);
> @@ -120,8 +112,13 @@ extern void dram_query(void);
> */
> sdram_shift = ((cm_reg_sdram& 0x0000001C)/4)%4;
> gd->bd->bi_dram[0].size = 0x01000000<< sdram_shift;
> -
> + gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
> + 0x01000000<< sdram_shift);
> }
> +#else
> + gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
How about fixing the indentation here to use tab?
> + gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
> + PHYS_SDRAM_1_SIZE);
> #endif /* CM_SPD_DETECT */
>
> return 0;
WBR, Sergei
prev parent reply other threads:[~2011-07-14 11:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 23:04 [U-Boot] [PATCH 2/2] integratorap: fixup SDRAM memory size detection Linus Walleij
2011-07-14 11:43 ` Wolfgang Denk
2011-07-14 11:53 ` Sergei Shtylyov [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=4E1ED8C2.9000003@mvista.com \
--to=sshtylyov@mvista.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