Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/fdt If enable-method is missing, try psci
details: https://anonhg.NetBSD.org/src/rev/78ce3057200f
branches: trunk
changeset: 1010858:78ce3057200f
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Jun 10 19:29:48 2020 +0000
description:
If enable-method is missing, try psci
diffstat:
sys/arch/arm/fdt/cpu_fdt.c | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diffs (64 lines):
diff -r 712db8b5d856 -r 78ce3057200f sys/arch/arm/fdt/cpu_fdt.c
--- a/sys/arch/arm/fdt/cpu_fdt.c Wed Jun 10 18:53:31 2020 +0000
+++ b/sys/arch/arm/fdt/cpu_fdt.c Wed Jun 10 19:29:48 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_fdt.c,v 1.35 2020/02/21 13:15:54 skrll Exp $ */
+/* $NetBSD: cpu_fdt.c,v 1.36 2020/06/10 19:29:48 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
#include "psci_fdt.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.35 2020/02/21 13:15:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.36 2020/06/10 19:29:48 jmcneill Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -191,6 +191,20 @@
#ifdef MULTIPROCESSOR
static struct arm_cpu_method *
+arm_fdt_cpu_enable_method_byname(const char *method)
+{
+ __link_set_decl(arm_cpu_methods, struct arm_cpu_method);
+ struct arm_cpu_method * const *acmp;
+
+ __link_set_foreach(acmp, arm_cpu_methods) {
+ if (strcmp(method, (*acmp)->acm_compat) == 0)
+ return *acmp;
+ }
+
+ return NULL;
+}
+
+static struct arm_cpu_method *
arm_fdt_cpu_enable_method(int phandle)
{
const char *method;
@@ -199,14 +213,7 @@
if (method == NULL)
return NULL;
- __link_set_decl(arm_cpu_methods, struct arm_cpu_method);
- struct arm_cpu_method * const *acmp;
- __link_set_foreach(acmp, arm_cpu_methods) {
- if (strcmp(method, (*acmp)->acm_compat) == 0)
- return *acmp;
- }
-
- return NULL;
+ return arm_fdt_cpu_enable_method_byname(method);
}
static int
@@ -251,6 +258,8 @@
if (acm == NULL)
acm = arm_fdt_cpu_enable_method(cpus);
if (acm == NULL)
+ acm = arm_fdt_cpu_enable_method_byname("psci");
+ if (acm == NULL)
continue;
error = arm_fdt_cpu_enable(child, acm);
Home |
Main Index |
Thread Index |
Old Index