int dram_init(void)
{
- char value[32];
struct npcm_gcr *gcr = (struct npcm_gcr *)NPCM_GCR_BA;
int ramsize = (readl(&gcr->intcr3) >> 8) & 0x7;
break;
}
- if (gd->ram_size > 0) {
- sprintf(value, "%ldM", (gd->ram_size / 0x100000));
- env_set("mem", value);
- }
-
return 0;
}
int last_stage_init(void)
{
- board_set_console();
+
+ char value[32];
+ struct udevice *dev = gd->cur_serial_dev;
+
+ if (gd->ram_size > 0) {
+ sprintf(value, "%ldM", (gd->ram_size / 0x100000));
+ env_set("mem", value);
+ }
+
+ if (dev && (dev->seq_ >= 0)) {
+ void *addr;
+ addr = dev_read_addr_ptr(dev);
+ if (addr) {
+ sprintf(value, "uart8250,mmio32,0x%x", (u32)addr);
+ env_set("earlycon", value);
+ }
+ sprintf(value, "ttyS%d,115200n8", dev->seq_);
+ env_set("console", value);
+ board_set_console();
+ }
return 0;
}
"eth2addr=00:00:F7:A0:00:FE\0" \
"eth3addr=00:00:F7:A0:00:FF\0" \
"console=ttyS0,115200n8\0" \
- "earlycon=uart8250,mmio32,0xf0000000\0" \
+ "earlycon=uart8250,mmio32,0xf0001000\0" \
"common_bootargs=setenv bootargs earlycon=${earlycon} root=/dev/ram " \
- "console=${console} mem=${mem} ramdisk_size=48000 basemac=${ethaddr}\0" \
+ "console=${console} mem=${mem} ramdisk_size=48000 basemac=${ethaddr} oops=panic panic=20\0" \
"sd_prog=fatload mmc 0 10000000 image-bmc; cp.b 10000000 80000000 ${filesize}\0" \
"sd_run=fatload mmc 0 10000000 image-bmc; bootm 10200000\0" \
"\0"