void of_add_memory_bank(struct device_node *node, bool dump, int r, u64 base, u64 size) { static char str[12]; if (IS_ENABLED(CONFIG_MMU)) { sprintf(str, "kseg0_ram%d", r); barebox_add_memory_bank(str, CKSEG0 | base, size); } else { sprintf(str, "kseg1_ram%d", r); barebox_add_memory_bank(str, CKSEG1 | base, size); } if (dump) pr_info("%s: %s: 0x%llx@0x%llx\n", node->name, str, size, base); }
static int mem_init(void) { unsigned long sdramsize; sdramsize = mpc5200_get_sdram_size(0) + mpc5200_get_sdram_size(1); barebox_add_memory_bank("ram0", 0x0, sdramsize); return 0; }
static int mem_init(void) { barebox_add_memory_bank("ram0", 0x0, 1024 << 20); return 0; }
static int da923rc_mem_init(void) { barebox_add_memory_bank("ram0", 0x0, fsl_get_effective_memsize()); return 0; }