OP-TEE is also available for RISC-V, so let's replace the asm/optee.h header with a generic tee/optee.h header.
Signed-off-by: Ahmad Fatoum <a.fat...@barebox.org> --- arch/arm/boards/tqma6ulx/board.c | 1 - arch/arm/include/asm/optee.h | 18 ------------------ arch/arm/mach-imx/imx9.c | 1 - arch/arm/mach-rockchip/rockchip.c | 2 +- drivers/soc/imx/soc-imx8m.c | 1 - drivers/tee/optee/of_fixup.c | 1 - include/tee/optee.h | 17 +++++++++++++++++ 7 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 arch/arm/include/asm/optee.h diff --git a/arch/arm/boards/tqma6ulx/board.c b/arch/arm/boards/tqma6ulx/board.c index 0c1af3c18f8d..c4222920d450 100644 --- a/arch/arm/boards/tqma6ulx/board.c +++ b/arch/arm/boards/tqma6ulx/board.c @@ -12,7 +12,6 @@ #include <of.h> #include <string.h> #include <linux/clk.h> -#include <asm/optee.h> #include <asm-generic/memory_layout.h> #include "tqma6ulx.h" diff --git a/arch/arm/include/asm/optee.h b/arch/arm/include/asm/optee.h deleted file mode 100644 index f8eb7b4a8b0f..000000000000 --- a/arch/arm/include/asm/optee.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __ARM_OPTEE_H__ -#define __ARM_OPTEE_H__ - -#include <linux/types.h> - -struct device_node; - -struct of_optee_fixup_data { - const char *method; - size_t shm_size; -}; - -int of_optee_fixup(struct device_node *root, void *fixup_data); - -#endif /* __ARM_OPTEE_H__ */ - diff --git a/arch/arm/mach-imx/imx9.c b/arch/arm/mach-imx/imx9.c index 220951fd1920..dd4fbf099e60 100644 --- a/arch/arm/mach-imx/imx9.c +++ b/arch/arm/mach-imx/imx9.c @@ -9,7 +9,6 @@ #include <mach/imx/imx9-regs.h> #include <tee/optee.h> #include <asm-generic/memory_layout.h> -#include <asm/optee.h> #include <mach/imx/scratch.h> #define SPEED_GRADING_MASK GENMASK(11, 6) diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c index 3d2ef791d20f..532d794fead1 100644 --- a/arch/arm/mach-rockchip/rockchip.c +++ b/arch/arm/mach-rockchip/rockchip.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only #include <common.h> #include <init.h> -#include <asm/optee.h> +#include <tee/optee.h> #include <asm-generic/memory_layout.h> #include <mach/rockchip/rockchip.h> #include <mach/rockchip/bootrom.h> diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c index 1b47c914de8e..3b83284fcbfd 100644 --- a/drivers/soc/imx/soc-imx8m.c +++ b/drivers/soc/imx/soc-imx8m.c @@ -10,7 +10,6 @@ #include <of_address.h> #include <pm_domain.h> -#include <asm/optee.h> #include <asm-generic/memory_layout.h> #include <linux/io.h> diff --git a/drivers/tee/optee/of_fixup.c b/drivers/tee/optee/of_fixup.c index f3ccff31e68a..5a3eb094f22d 100644 --- a/drivers/tee/optee/of_fixup.c +++ b/drivers/tee/optee/of_fixup.c @@ -3,7 +3,6 @@ #include <of.h> #include <linux/ioport.h> #include <asm/barebox-arm.h> -#include <asm/optee.h> #include <tee/optee.h> int of_optee_fixup(struct device_node *root, void *_data) diff --git a/include/tee/optee.h b/include/tee/optee.h index 943dbb8fdab6..10e829c04f88 100644 --- a/include/tee/optee.h +++ b/include/tee/optee.h @@ -61,4 +61,21 @@ int imx6ul_start_optee_early(void *fdt, void *tee, void *data_location, #endif /* __PBL__ */ +struct device_node; + +struct of_optee_fixup_data { + const char *method; + size_t shm_size; +}; + +#ifdef CONFIG_OF_FIXUP_OPTEE +int of_optee_fixup(struct device_node *root, void *fixup_data); +#else +static inline int of_optee_fixup(struct device_node *root, void *fixup_data) +{ + return -ENOSYS; +} +#endif + + #endif /* _OPTEE_H */ -- 2.39.5