aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/psci
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2015-08-11 13:42:58 +0000
committerAndrew Turner <andrew@FreeBSD.org>2015-08-11 13:42:58 +0000
commit6e3244f59424f8d4d6ecde240a81728010c74923 (patch)
tree808f6c95a7f707400b411074aff527c7a3c55d53 /sys/dev/psci
parent0447c1367a819a8d0e3cfb2183b8f8e3e23eba28 (diff)
downloadsrc-6e3244f59424f8d4d6ecde240a81728010c74923.tar.gz
src-6e3244f59424f8d4d6ecde240a81728010c74923.zip
Start to support PSCI 1.0. For all the functions we currently support this
can be seen as the same as 0.2. There are changes with the data passed to CPU_SUSPEND, however we don't yet use this call. Sponsored by: ABT Systems Ltd
Notes
Notes: svn path=/head/; revision=286630
Diffstat (limited to 'sys/dev/psci')
-rw-r--r--sys/dev/psci/psci.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c
index 4554fa6cd0fd..c5fe0fbc443e 100644
--- a/sys/dev/psci/psci.c
+++ b/sys/dev/psci/psci.c
@@ -288,20 +288,21 @@ psci_v0_2_init(device_t dev)
if (version == PSCI_RETVAL_NOT_SUPPORTED)
return (1);
- if ((PSCI_VER_MAJOR(version) != 0) && (PSCI_VER_MINOR(version) != 2)) {
- device_printf(dev, "PSCI version number mismatched with DT\n");
- return (1);
+ if ((PSCI_VER_MAJOR(version) == 0 && PSCI_VER_MINOR(version) == 2) ||
+ (PSCI_VER_MAJOR(version) == 1 && PSCI_VER_MINOR(version) == 0)) {
+ if (bootverbose)
+ device_printf(dev, "PSCI version 0.2 available\n");
+
+ /*
+ * We only register this for v0.2 since v0.1 doesn't support
+ * system_reset.
+ */
+ EVENTHANDLER_REGISTER(shutdown_final, psci_shutdown, sc,
+ SHUTDOWN_PRI_LAST);
+
+ return (0);
}
- if (bootverbose)
- device_printf(dev, "PSCI version 0.2 available\n");
-
- /*
- * We only register this for v0.2 since v0.1 doesn't support
- * system_reset.
- */
- EVENTHANDLER_REGISTER(shutdown_final, psci_shutdown, sc,
- SHUTDOWN_PRI_LAST);
-
- return (0);
+ device_printf(dev, "PSCI version number mismatched with DT\n");
+ return (1);
}