debug("total_memory by %s = %llu\n", __func__, total_memory);
#if !defined(CONFIG_PHYS_64BIT)
- /* Check for 4G or more. Bad. */
- if ((first_ctrl == 0) && (total_memory >= (1ull << 32))) {
+ /* Check for more than max memory. Bad. */
+ if ((first_ctrl == 0) && (total_memory > CONFIG_MAX_MEM_MAPPED)) {
puts("Detected ");
print_size(total_memory, " of memory\n");
- printf(" This U-Boot only supports < 4G of DDR\n");
- printf(" You could rebuild it with CONFIG_PHYS_64BIT\n");
- printf(" "); /* re-align to match init_dram print */
+#ifndef CONFIG_SPL_BUILD
+ puts(" "); /* re-align to match init_dram print */
+#endif
+ puts("This U-Boot only supports <= ");
+ print_size(CONFIG_MAX_MEM_MAPPED, " of DDR\n");
+#ifndef CONFIG_SPL_BUILD
+ puts(" "); /* re-align to match init_dram print */
+#endif
+ puts("You could rebuild it with CONFIG_PHYS_64BIT\n");
+#ifndef CONFIG_SPL_BUILD
+ puts(" "); /* re-align to match init_dram print */
+#endif
total_memory = CONFIG_MAX_MEM_MAPPED;
}
#endif