Skip to content

Commit

Permalink
ARM: at91: add sam_linux_is_optee_available() function
Browse files Browse the repository at this point in the history
Add sam_linux_is_optee_available() which allows to know if OP-TEE is
available for Linux. This function is used by code which needs to
know if we running with OP-TEE available or not.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
[claudiu.beznea: edit commit title and message, renamed
 sam_linux_is_in_normal_world() into sam_linux_is_optee_available()]
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220606145701.185552-2-clement.leger@bootlin.com
  • Loading branch information
Clément Léger authored and Claudiu Beznea committed Jul 20, 2022
1 parent f2906aa commit c71572a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-at91/sam_secure.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ struct arm_smccc_res sam_smccc_call(u32 fn, u32 arg0, u32 arg1)
return res;
}

bool sam_linux_is_optee_available(void)
{
/* If optee has been detected, then we are running in normal world */
return optee_available;
}

void __init sam_secure_init(void)
{
struct device_node *np;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/sam_secure.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@

void __init sam_secure_init(void);
struct arm_smccc_res sam_smccc_call(u32 fn, u32 arg0, u32 arg1);
bool sam_linux_is_optee_available(void);

#endif /* SAM_SECURE_H */

0 comments on commit c71572a

Please sign in to comment.