ARM: psci: add probe function to discover presence of a psci implementation
authorAchin Gupta <achin.gupta@arm.com>
Sun, 16 Dec 2012 23:11:32 +0000 (23:11 +0000)
committerJon Medhurst <tixy@linaro.org>
Mon, 1 Jul 2013 10:05:02 +0000 (11:05 +0100)
commit25366fe14faa30941b28f3d724438d6ec9a7cf4d
tree2c9b04cd2d57dda6cb4b41d54fd2c683ea3b27f9
parent4e57b6c98d568bb411e793cfd85930202bac2649
ARM: psci: add probe function to discover presence of a psci implementation

This patch adds a probe function to check if the secure firmware has an
implementation of the Power State Coordination Interface.

'bL_platform_power_ops' will be implemented by:

a. a native backend when Linux runs in secure world
b. a psci backend which relies on the secure firmware to implement the
   power ops

presence of b. will be indicated by the psci device node in the device tree.
The device node is expected to be populated by the secure firmware if it
supports psci. If the native backend detects a psci node then it bails out
allowing the psci backend to be registered.

Also a dummy 'psci_probe' function is added for the case when psci support
is not included. This prevents the build from breaking for tc2 and the
rtsm platforms.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
arch/arm/include/asm/psci.h
arch/arm/kernel/psci.c