diff options
author | andrew <andrew@FreeBSD.org> | 2015-08-11 13:42:58 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2015-08-11 13:42:58 +0000 |
commit | 7edabeab2f8c6428f91f899973cc76560b3bdbd5 (patch) | |
tree | 808f6c95a7f707400b411074aff527c7a3c55d53 /sys/dev/psci/psci.c | |
parent | 0c24547a6601393b02ca3eda7ccc3fd0c26ff55c (diff) | |
download | FreeBSD-src-7edabeab2f8c6428f91f899973cc76560b3bdbd5.zip FreeBSD-src-7edabeab2f8c6428f91f899973cc76560b3bdbd5.tar.gz |
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
Diffstat (limited to 'sys/dev/psci/psci.c')
-rw-r--r-- | sys/dev/psci/psci.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c index 4554fa6..c5fe0fb 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); } |