diff options
author | Jun Nie <jun.nie@linaro.org> | 2021-05-20 15:24:09 +0800 |
---|---|---|
committer | Jun Nie <jun.nie@linaro.org> | 2021-05-20 15:24:09 +0800 |
commit | 811be48ff325958e77f7526acf00d8d9e2ef3d38 (patch) | |
tree | 4947e7bf222331e7750644ac3010df8e0ad89e13 | |
parent | f0691ac4725dbd6f0aff0ef3520be2f69483f687 (diff) |
plat: imx8m: Add fake SOC IDimx_lf_v2.4+bl2
Add fake SOC ID to pass the check in Linux
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Change-Id: I656d4a1a3791b2d075b5599a10277bfa1bb050e0
-rw-r--r-- | plat/imx/common/imx8_common.c | 46 | ||||
-rw-r--r-- | plat/imx/imx8m/imx8mp/platform.mk | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/plat/imx/common/imx8_common.c b/plat/imx/common/imx8_common.c new file mode 100644 index 000000000..643893944 --- /dev/null +++ b/plat/imx/common/imx8_common.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2021, Linaro Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <assert.h> + +#include <common/debug.h> +#include <lib/mmio.h> +#include <lib/smccc.h> +#include <lib/xlat_tables/xlat_tables_compat.h> +#include <platform_def.h> +#include <services/arm_arch_svc.h> + +#include <plat/common/platform.h> + +/***************************************************************************** + * plat_is_smccc_feature_available() - This function checks whether SMCCC + * feature is availabile for platform. + * @fid: SMCCC function id + * + * Return SMC_ARCH_CALL_SUCCESS if SMCCC feature is available and + * SMC_ARCH_CALL_NOT_SUPPORTED otherwise. + *****************************************************************************/ +int32_t plat_is_smccc_feature_available(u_register_t fid) +{ + switch (fid) { + case SMCCC_ARCH_SOC_ID: + return SMC_ARCH_CALL_SUCCESS; + default: + return SMC_ARCH_CALL_NOT_SUPPORTED; + } +} + +/* Get SOC version */ +int32_t plat_get_soc_version(void) +{ + return 0x5678; +} + +/* Get SOC revision */ +int32_t plat_get_soc_revision(void) +{ + return 0x1234; +} diff --git a/plat/imx/imx8m/imx8mp/platform.mk b/plat/imx/imx8m/imx8mp/platform.mk index e0e886a3d..30ea0f874 100644 --- a/plat/imx/imx8m/imx8mp/platform.mk +++ b/plat/imx/imx8m/imx8mp/platform.mk @@ -40,6 +40,7 @@ BL31_SOURCES += plat/imx/common/imx8_helpers.S \ plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c \ plat/imx/imx8m/imx8mp/imx8mp_psci.c \ plat/imx/imx8m/imx8mp/gpc.c \ + plat/imx/common/imx8_common.c \ plat/imx/common/imx8_topology.c \ plat/imx/common/imx_sip_handler.c \ plat/imx/common/imx_sip_svc.c \ |