summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-04-09 09:25:51 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-04-09 09:25:51 +0000
commitdaa9e84e97dfba89abbf0f0b245cf7b047f00550 (patch)
treec0970026a5b278b9f88d7dd5fdc2f1cc8eefc2dd /sys/dev/fdt
parent8d8ff3b3e9491d9d652fdbff92f8716744aafa0f (diff)
Assign and enable clocks; RK3328 has them.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/rkrng.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/fdt/rkrng.c b/sys/dev/fdt/rkrng.c
index 1c2cc1f07fe..68d682e2e22 100644
--- a/sys/dev/fdt/rkrng.c
+++ b/sys/dev/fdt/rkrng.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rkrng.c,v 1.1 2020/04/03 16:29:17 kettenis Exp $ */
+/* $OpenBSD: rkrng.c,v 1.2 2020/04/09 09:25:50 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
@@ -25,6 +25,7 @@
#include <dev/rndvar.h>
#include <dev/ofw/openfirm.h>
+#include <dev/ofw/ofw_clock.h>
#include <dev/ofw/fdt.h>
/* Registers */
@@ -90,6 +91,9 @@ rkrng_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
+ clock_set_assigned(faa->fa_node);
+ clock_enable_all(faa->fa_node);
+
timeout_set(&sc->sc_to, rkrng_rnd, sc);
rkrng_rnd(sc);
}