@@ -333,7 +333,18 @@ void board_init_f(ulong bootflag)
gd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;
#endif
+#if defined(PHYS_SDRAM_2) && defined(PHYS_SDRAM_2_SIZE)
+ if ( CONFIG_NR_DRAM_BANKS > 1 &&
+ (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE) != PHYS_SDRAM_2 )
+ addr = PHYS_SDRAM_2 + PHYS_SDRAM_2_SIZE;
+ else
+ addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
+#else
addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
+#endif
+
---------------------------------------------------------
I know that some arch use more than 2 banks but implementing all macros
checks to PHYS_SDRAM_* leads to some macro hell. So the point here is: