
Dear Prafulla Wadaskar,
In message 1285869240-17251-1-git-send-email-prafulla@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