arm64: power: Add new PSCI PowerOps provider
authorJulius Werner <jwerner@chromium.org>
Thu, 7 Jul 2016 23:57:43 +0000 (16:57 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 8 Jul 2016 07:21:45 +0000 (00:21 -0700)
commit9e39dad1cf2a69d4eef01f4f6620af3108c505b4
tree9f3746ad3adf1cd0fc4e5e9e9aa461b163bef678
parent35bc2fd214aac62418b89d447839484dc013d099
arm64: power: Add new PSCI PowerOps provider

ARM64 systems are by design required to support power-off and reboot
functionality in ARM Trusted Firmware through PSCI calls. Rather than
reimplement the same functionality in depthcharge for every individual
board, we can leverage this by just calling the same code with an SMC.

This patch adds rudimentary SMC functionality to depthcharge and uses it
to implement a PSCI PowerOps provider using the SYSTEM_RESET and
SYSTEM_OFF PSCI calls to reboot and power down, respectively.

BRANCH=None
BUG=None
TEST=Triggered reboot and power-off reasons on Kevin, observed how
system reacted correctly (with follow-up patch).

Change-Id: I5983b19229cdaa3c8e8fb5e49c778d534d8acbb1
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/358922
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
src/arch/arm/Makefile.inc
src/arch/arm/smc.S [new file with mode: 0644]
src/arch/arm/smc.h [new file with mode: 0644]
src/drivers/power/Makefile.inc
src/drivers/power/psci.c [new file with mode: 0644]
src/drivers/power/psci.h [new file with mode: 0644]