Commit ebc7c1a2 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Thierry Reding

ARM: trusted_foundations: Provide information about whether firmware is registered

Add a helper that provides information about whether Trusted Foundations
firmware operations have been registered.
Tested-by: default avatarRobert Yang <decatf@gmail.com>
Tested-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 96446e21
......@@ -167,3 +167,8 @@ void of_register_trusted_foundations(void)
panic("Trusted Foundation: missing version-minor property\n");
register_trusted_foundations(&pdata);
}
bool trusted_foundations_registered(void)
{
return firmware_ops == &trusted_foundations_ops;
}
......@@ -31,6 +31,7 @@
#include <linux/of.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/types.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/outercache.h>
......@@ -50,6 +51,7 @@ struct trusted_foundations_platform_data {
void register_trusted_foundations(struct trusted_foundations_platform_data *pd);
void of_register_trusted_foundations(void);
bool trusted_foundations_registered(void);
#else /* CONFIG_TRUSTED_FOUNDATIONS */
static inline void tf_dummy_write_sec(unsigned long val, unsigned int reg)
......@@ -84,6 +86,11 @@ static inline void of_register_trusted_foundations(void)
if (of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations"))
register_trusted_foundations(NULL);
}
static inline bool trusted_foundations_registered(void)
{
return false;
}
#endif /* CONFIG_TRUSTED_FOUNDATIONS */
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment