WIP FPC-III support
[linux/fpc-iii.git] / drivers / firmware / smccc / smccc.c
blob00c88b809c0c53623e05ceeeb35e339d32ae123b
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright (C) 2020 Arm Limited
4 */
6 #define pr_fmt(fmt) "smccc: " fmt
8 #include <linux/init.h>
9 #include <linux/arm-smccc.h>
11 static u32 smccc_version = ARM_SMCCC_VERSION_1_0;
12 static enum arm_smccc_conduit smccc_conduit = SMCCC_CONDUIT_NONE;
14 void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit)
16 smccc_version = version;
17 smccc_conduit = conduit;
20 enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void)
22 if (smccc_version < ARM_SMCCC_VERSION_1_1)
23 return SMCCC_CONDUIT_NONE;
25 return smccc_conduit;
27 EXPORT_SYMBOL_GPL(arm_smccc_1_1_get_conduit);
29 u32 arm_smccc_get_version(void)
31 return smccc_version;
33 EXPORT_SYMBOL_GPL(arm_smccc_get_version);