Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm Add function that returns true if PSCI has ...
details: https://anonhg.NetBSD.org/src/rev/92117bb22385
branches: trunk
changeset: 433941:92117bb22385
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Oct 13 00:07:55 2018 +0000
description:
Add function that returns true if PSCI has been initialized
diffstat:
sys/arch/arm/arm/psci.c | 10 ++++++++--
sys/arch/arm/arm/psci.h | 7 ++++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diffs (52 lines):
diff -r f25290452786 -r 92117bb22385 sys/arch/arm/arm/psci.c
--- a/sys/arch/arm/arm/psci.c Fri Oct 12 23:57:00 2018 +0000
+++ b/sys/arch/arm/arm/psci.c Sat Oct 13 00:07:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psci.c,v 1.2 2018/06/15 15:59:20 jakllsch Exp $ */
+/* $NetBSD: psci.c,v 1.3 2018/10/13 00:07:55 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_diagnostic.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: psci.c,v 1.2 2018/06/15 15:59:20 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psci.c,v 1.3 2018/10/13 00:07:55 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -106,6 +106,12 @@
psci_call_fn = fn;
}
+bool
+psci_available(void)
+{
+ return psci_call_fn != NULL;
+}
+
void
psci_clearfunc(void)
{
diff -r f25290452786 -r 92117bb22385 sys/arch/arm/arm/psci.h
--- a/sys/arch/arm/arm/psci.h Fri Oct 12 23:57:00 2018 +0000
+++ b/sys/arch/arm/arm/psci.h Sat Oct 13 00:07:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psci.h,v 1.1 2017/06/28 23:48:23 jmcneill Exp $ */
+/* $NetBSD: psci.h,v 1.2 2018/10/13 00:07:55 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -65,6 +65,11 @@
void psci_init(psci_fn);
/*
+ * Return true if PSCI is available (psci_init has been called).
+ */
+bool psci_available(void);
+
+/*
* PSCI call methods, implemented in psci.S
*/
int psci_call_smc(register_t, register_t, register_t, register_t);
Home |
Main Index |
Thread Index |
Old Index