Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2018 12:32:05 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335055 - head/sys/dev/psci
Message-ID:  <201806131232.w5DCW5Qk006572@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Wed Jun 13 12:32:04 2018
New Revision: 335055
URL: https://svnweb.freebsd.org/changeset/base/335055

Log:
  Find and cache the PSCI version on driver attach.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/dev/psci/psci.c

Modified: head/sys/dev/psci/psci.c
==============================================================================
--- head/sys/dev/psci/psci.c	Wed Jun 13 12:26:37 2018	(r335054)
+++ head/sys/dev/psci/psci.c	Wed Jun 13 12:32:04 2018	(r335055)
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
 struct psci_softc {
 	device_t        dev;
 
+	uint32_t	psci_version;
 	uint32_t	psci_fnids[PSCI_FN_MAX];
 };
 
@@ -493,6 +494,7 @@ psci_v0_1_init(device_t dev)
 		sc->psci_fnids[PSCI_FN_MIGRATE] = psci_fnid;
 	}
 
+	sc->psci_version = (0 << 16) | 1;
 	if (bootverbose)
 		device_printf(dev, "PSCI version 0.1 available\n");
 
@@ -523,6 +525,7 @@ psci_v0_2_init(device_t dev)
 	if (version == PSCI_RETVAL_NOT_SUPPORTED)
 		return (1);
 
+	sc->psci_version = version;
 	if ((PSCI_VER_MAJOR(version) == 0 && PSCI_VER_MINOR(version) == 2) ||
 	    PSCI_VER_MAJOR(version) == 1) {
 		if (bootverbose)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806131232.w5DCW5Qk006572>