Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Handle 'console=serial' passed from the b...
details: https://anonhg.NetBSD.org/src/rev/08dc6ae5dc16
branches: trunk
changeset: 360943:08dc6ae5dc16
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sat Apr 07 18:06:27 2018 +0000
description:
Handle 'console=serial' passed from the bootargs. ok jmcneill@
diffstat:
sys/arch/arm/sunxi/sunxi_platform.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (47 lines):
diff -r b3d2cca4fa7f -r 08dc6ae5dc16 sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c Sat Apr 07 18:05:08 2018 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c Sat Apr 07 18:06:27 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.22 2018/04/01 04:35:04 ryo Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.23 2018/04/07 18:06:27 bouyer Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
#include "opt_fdt_arm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.22 2018/04/01 04:35:04 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.23 2018/04/07 18:06:27 bouyer Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -176,12 +176,15 @@
static void
sunxi_platform_bootstrap(void)
{
+ void *fdt_data = __UNCONST(fdtbus_get_data());
+ const int chosen_off = fdt_path_offset(fdt_data, "/chosen");
+ if (chosen_off < 0)
+ return;
+
if (match_bootconf_option(boot_args, "console", "fb")) {
- void *fdt_data = __UNCONST(fdtbus_get_data());
- const int chosen_off = fdt_path_offset(fdt_data, "/chosen");
const int framebuffer_off =
fdt_path_offset(fdt_data, "/chosen/framebuffer");
- if (chosen_off >= 0 && framebuffer_off >= 0) {
+ if (framebuffer_off >= 0) {
const char *status = fdt_getprop(fdt_data,
framebuffer_off, "status", NULL);
if (status == NULL || strncmp(status, "ok", 2) == 0) {
@@ -189,6 +192,9 @@
"stdout-path", "/chosen/framebuffer");
}
}
+ } else if (match_bootconf_option(boot_args, "console", "serial")) {
+ fdt_setprop_string(fdt_data, chosen_off,
+ "stdout-path", "serial0:115200n8");
}
}
Home |
Main Index |
Thread Index |
Old Index