mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
firmware: psci: bind arm smccc features when discovered
Use PSCI device to query Arm SMCCC v1.1 support from secure monitor and if so, bind drivers for the SMCCC features that monitor supports. Drivers willing to be bound from Arm SMCCC features discovery can use macro ARM_SMCCC_FEATURE_DRIVER() to register to smccc feature discovery, providing target driver name and a callback function that returns whether or not the SMCCC feature is supported by the system. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
This commit is contained in:
parent
b1ff399c6e
commit
2fbe47b7e7
4 changed files with 118 additions and 1 deletions
|
@ -11,6 +11,8 @@
|
|||
#ifndef _UAPI_LINUX_PSCI_H
|
||||
#define _UAPI_LINUX_PSCI_H
|
||||
|
||||
#include <linux/arm-smccc.h>
|
||||
|
||||
/*
|
||||
* PSCI v0.1 interface
|
||||
*
|
||||
|
@ -115,6 +117,18 @@
|
|||
#define PSCI_RET_DISABLED -8
|
||||
#define PSCI_RET_INVALID_ADDRESS -9
|
||||
|
||||
/**
|
||||
* struct psci_plat_data - PSCI driver platform data
|
||||
* @method: Selected invocation conduit
|
||||
*/
|
||||
struct psci_plat_data {
|
||||
void (*invoke_fn)(unsigned long arg0, unsigned long arg1,
|
||||
unsigned long arg2, unsigned long arg3,
|
||||
unsigned long arg4, unsigned long arg5,
|
||||
unsigned long arg6, unsigned long arg7,
|
||||
struct arm_smccc_res *res);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARM_PSCI_FW
|
||||
unsigned long invoke_psci_fn(unsigned long a0, unsigned long a1,
|
||||
unsigned long a2, unsigned long a3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue