diff options
Diffstat (limited to 'boot')
-rw-r--r-- | boot/Kconfig | 2 | ||||
-rw-r--r-- | boot/bootflow.c | 8 | ||||
-rw-r--r-- | boot/image-fdt.c | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/boot/Kconfig b/boot/Kconfig index b9287c60685..7dd30a030e3 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1699,7 +1699,7 @@ config FDT_SIMPLEFB memory config ARCH_FIXUP_FDT_MEMORY - bool "Enable arch_fixup_memory_banks() call" + bool "Enable fdt_fixup_memory_banks() call" default y help Enable FDT memory map syncup before OS boot. This feature can be diff --git a/boot/bootflow.c b/boot/bootflow.c index 59d77d2385f..d8807eb109d 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -936,11 +936,15 @@ int bootflow_cmdline_auto(struct bootflow *bflow, const char *arg) return ret; *buf = '\0'; - if (!strcmp("earlycon", arg)) { + if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) { snprintf(buf, sizeof(buf), "uart8250,mmio32,%#lx,%dn8", info.addr, info.baudrate); - } else if (!strcmp("console", arg)) { + } else if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_PL01X) { + snprintf(buf, sizeof(buf), + "pl011,mmio32,%#lx,%dn8", info.addr, + info.baudrate); + } else if (!strcmp("console", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) { snprintf(buf, sizeof(buf), "ttyS0,%dn8", info.baudrate); } diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 8eda521693d..3d5b6f9e2dc 100644 --- a/boot/image-fdt.c +++ b/boot/image-fdt.c @@ -73,7 +73,7 @@ static void boot_fdt_reserve_region(u64 addr, u64 size, enum lmb_flags flags) long ret; ret = lmb_reserve_flags(addr, size, flags); - if (ret >= 0) { + if (!ret) { debug(" reserving fdt memory region: addr=%llx size=%llx flags=%x\n", (unsigned long long)addr, (unsigned long long)size, flags); @@ -110,7 +110,7 @@ void boot_fdt_add_mem_rsv_regions(void *fdt_blob) for (i = 0; i < total; i++) { if (fdt_get_mem_rsv(fdt_blob, i, &addr, &size) != 0) continue; - boot_fdt_reserve_region(addr, size, LMB_NONE); + boot_fdt_reserve_region(addr, size, LMB_NOOVERWRITE); } /* process reserved-memory */ @@ -122,7 +122,7 @@ void boot_fdt_add_mem_rsv_regions(void *fdt_blob) ret = fdt_get_resource(fdt_blob, subnode, "reg", 0, &res); if (!ret && fdtdec_get_is_enabled(fdt_blob, subnode)) { - flags = LMB_NONE; + flags = LMB_NOOVERWRITE; if (fdtdec_get_bool(fdt_blob, subnode, "no-map")) flags = LMB_NOMAP; |