From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Agner Date: Fri, 22 Jun 2018 11:09:29 +0200 Subject: [U-Boot] [PATCH] imx: mx7: psci: Add support for version command In-Reply-To: <20180531181335.27241-1-tpiepho@impinj.com> References: <20180531181335.27241-1-tpiepho@impinj.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 31.05.2018 20:13, Trent Piepho wrote: > This command should be supported for PSCI 1.0. Current code results in > this message from the kernel: "PSCIv65535.65535 detected in firmware." > > This will mess up a kernel check of the PSCI version. Currently the > kernel only cares if the version is at least 1.0 so it doesn't break > anything, as the incorrect version and correct version are both >= 1.0, > but as soon as a check for > 1.0 goes in it will fail. The right direction, it can also be done in C though: unsigned int __secure psci_version(u32 function_id) { return ARM_PSCI_VER_1_0; } But this is not complete though, since also other callbacks need to be supported for proper PSCI 1.0 support. See also this discussion: https://www.spinics.net/lists/arm-kernel/msg640337.html I try to come up with a proper fix for this. -- Stefan > > CC: Anson Huang > Cc: Fabio Estevam > Cc: Peng Fan > Cc: Stefano Babic > Signed-off-by: Trent Piepho > --- > arch/arm/mach-imx/mx7/psci.S | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/arm/mach-imx/mx7/psci.S b/arch/arm/mach-imx/mx7/psci.S > index 89dcf880e8..7035f6093b 100644 > --- a/arch/arm/mach-imx/mx7/psci.S > +++ b/arch/arm/mach-imx/mx7/psci.S > @@ -57,4 +57,14 @@ psci_system_off: > 3: wfi > b 3b > > +.globl psci_version > +psci_version: > +#if defined(CONFIG_ARMV7_PSCI_1_0) > + ldr r0, =ARM_PSCI_VER_1_0 > +#else > +#error "add support for your PSCI version" > +#endif > + > + bx lr > + > .popsection