void __init prom_init(void) { bd_t *bd = gd->bd; int memsize; #ifdef CONFIG_SERIAL_ADM8668_CONSOLE register_console(&early_console); #endif memsize = bd->bi_memsize; printk("Board info:\n"); printk(" RAM size: %d MB\n", (int)memsize/(1024*1024)); printk(" NOR start: %#lx\n", bd->bi_flashstart); printk(" NOR size: %#lx\n", bd->bi_flashsize); prom_setup_cmdline(); add_memory_region(0, memsize, BOOT_MEM_RAM); }
void __init prom_init(void) { DDR_t ddr = (DDR_t) DDR_VirtualAddress; /* define the pointer to the DDR registers */ phys_t memsize = 0-ddr->ddrmask; /* this should be the very first message, even before serial is properly initialized */ prom_setup_cmdline(); setup_serial_port(); mips_machgroup = MACH_GROUP_MIKROTIK; soft_reboot = read_c0_status() & SR_NMI; pm_power_off = NULL; /* * give all RAM to boot allocator, * except for the first 0x400 and the last 0x200 bytes */ add_memory_region(ddr->ddrbase + 0x400, memsize - 0x600, BOOT_MEM_RAM); }
void __init prom_init(void) { struct ddr_ram __iomem *ddr; phys_t memsize; phys_t ddrbase; ddr = ioremap_nocache(ddr_reg[0].start, ddr_reg[0].end - ddr_reg[0].start); if (!ddr) { printk(KERN_ERR "Unable to remap DDR register\n"); return; } ddrbase = (phys_t)&ddr->ddrbase; memsize = (phys_t)&ddr->ddrmask; memsize = 0 - memsize; prom_setup_cmdline(); /* give all RAM to boot allocator, * except for the first 0x400 and the last 0x200 bytes */ add_memory_region(ddrbase + 0x400, memsize - 0x600, BOOT_MEM_RAM); }