From c6c198b77c509ecbac181543b6b4698d63d2d82f Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 23 Apr 2021 12:49:53 +0000 Subject: [PATCH] enable syscon(4) on riscv64 makes reboot and poweroff work with qemu ok kettenis@ --- sys/arch/riscv64/conf/GENERIC | 1 + sys/arch/riscv64/conf/RAMDISK | 3 ++- sys/dev/fdt/syscon.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/arch/riscv64/conf/GENERIC b/sys/arch/riscv64/conf/GENERIC index fc44e7d66e8..cbbb50dde2d 100644 --- a/sys/arch/riscv64/conf/GENERIC +++ b/sys/arch/riscv64/conf/GENERIC @@ -47,6 +47,7 @@ simplebus* at mainbus0 early 1 # Platform Level Interrupt Controller plic* at simplebus? early 1 +syscon* at fdt? early 1 scsibus* at scsi? sd* at scsibus? diff --git a/sys/arch/riscv64/conf/RAMDISK b/sys/arch/riscv64/conf/RAMDISK index b24f6475718..59bc6918df9 100644 --- a/sys/arch/riscv64/conf/RAMDISK +++ b/sys/arch/riscv64/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.1 2021/04/23 02:42:16 drahn Exp $ +# $OpenBSD: RAMDISK,v 1.2 2021/04/23 12:49:53 jsg Exp $ # # GENERIC machine description file # @@ -66,6 +66,7 @@ simplebus* at mainbus0 early 1 # Platform Level Interrupt Controller plic* at simplebus? early 1 +syscon* at fdt? early 1 scsibus* at scsi? sd* at scsibus? diff --git a/sys/dev/fdt/syscon.c b/sys/dev/fdt/syscon.c index 0116d5960d0..acb5e5ab050 100644 --- a/sys/dev/fdt/syscon.c +++ b/sys/dev/fdt/syscon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscon.c,v 1.5 2021/04/23 12:38:00 kettenis Exp $ */ +/* $OpenBSD: syscon.c,v 1.6 2021/04/23 12:49:53 jsg Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * @@ -28,6 +28,8 @@ #ifdef __armv7__ #include +#elif defined(__riscv64__) +#include #else #include #endif -- 2.20.1