summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-09-30 20:47:39 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-09-30 20:47:39 +0000
commit4a389a44d5afbf98a181c6b60fefdbdc786e19d8 (patch)
tree5afaca87a640a29cb6f5826a72147367d116236b /sys/arch
parentbd7dd4da3e52ca491e59dec2a384e81edb0fc337 (diff)
Enable CPU voltage regulators. The firmware I built for my odroid-n2
(based on mainline U-Boot and a proprietary primary loader and ATF) doesn't actually enable the regulator for one of the CPU clusters. ok patrick@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/arm/cpu.c5
-rw-r--r--sys/arch/arm64/arm64/cpu.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/cpu.c b/sys/arch/arm/arm/cpu.c
index 73f4b03ba42..b2ab59a75ca 100644
--- a/sys/arch/arm/arm/cpu.c
+++ b/sys/arch/arm/arm/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.49 2019/09/29 10:36:52 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.50 2019/09/30 20:47:38 kettenis Exp $ */
/* $NetBSD: cpu.c,v 1.56 2004/04/14 04:01:49 bsh Exp $ */
@@ -613,6 +613,9 @@ cpu_opp_mountroot(struct device *self)
if (ot->ot_master && ot->ot_master != ci)
continue;
+ /* PWM regulators may need to be explicitly enabled. */
+ regulator_enable(ci->ci_cpu_supply);
+
curr_hz = clock_get_frequency(ci->ci_node, NULL);
curr_microvolt = regulator_get_voltage(ci->ci_cpu_supply);
diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c
index 665f3f2009a..9fb76c756d6 100644
--- a/sys/arch/arm64/arm64/cpu.c
+++ b/sys/arch/arm64/arm64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.35 2019/09/01 15:34:15 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.36 2019/09/30 20:47:38 kettenis Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -724,6 +724,9 @@ cpu_opp_mountroot(struct device *self)
if (ot->ot_master && ot->ot_master != ci)
continue;
+ /* PWM regulators may need to be explicitly enabled. */
+ regulator_enable(ci->ci_cpu_supply);
+
curr_hz = clock_get_frequency(ci->ci_node, NULL);
curr_microvolt = regulator_get_voltage(ci->ci_cpu_supply);