[U-Boot] [PATCH] Kirkwood: dram_init is moved to dram.c
Wolfgang Denk
wd at denx.de
Thu Sep 30 19:29:35 CEST 2010
Dear Prafulla Wadaskar,
In message <1285869240-17251-1-git-send-email-prafulla at marvell.com> you wrote:
> For all Kirkwood boards so far dram_init function is duplicated
> dram_init function is moved to dram.c and relevant code from all
> board specific files removed
>
> If any board needs specific dram init handling than standard one,
> then, a macro CONFIG_SYS_BOARD_DRAM_INIT should be defined in
> board config header file and the dram_init function can be put
> in board specific source file
> For ex. keymile boards
Thanks, I really appreciate this patch, but I have a minor request for
change:
> +#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
> + gd->ram_size = 0;
> +#endif
> + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> + gd->bd->bi_dram[i].start = kw_sdram_bar(i);
> + gd->bd->bi_dram[i].size = kw_sdram_bs(i);
> +#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
> + gd->ram_size += gd->bd->bi_dram[i].size;
> +#endif
When you touch this board now and make it work with
CONFIG_SYS_ARM_WITHOUT_RELOC not defined, we should also drop all
references to CONFIG_SYS_ARM_WITHOUT_RELOC from the code to make it
obvious that this board has been adapted.
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anyone who doesn't believe in miracles is not a realist.
- David Ben Gurion
More information about the U-Boot
mailing list