lib: optee: remove the duplicate CONFIG_OPTEE
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 2 Sep 2021 09:56:16 +0000 (11:56 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 5 Oct 2021 12:44:48 +0000 (08:44 -0400)
commit51827f9a8be3def01b837a2809094e2fd2703b6a
tree5924b4b104f6d3681ae5e2dee506f1c65d63746f
parentfd921d20379b2c4544f62a94d642be6aeeb481f0
lib: optee: remove the duplicate CONFIG_OPTEE

The configuration CONFIG_OPTEE is defined 2 times:
1- in lib/optee/Kconfig for support of OPTEE images loaded by bootm command
2- in drivers/tee/optee/Kconfig for support of OP-TEE driver.

It is abnormal to have the same CONFIG define for 2 purpose;
and it is difficult to managed correctly their dependencies.

Moreover CONFIG_SPL_OPTEE is defined in common/spl/Kconfig
to manage OPTEE image load in SPL.

This definition causes an issue with the macro CONFIG_IS_ENABLED(OPTEE)
to test the availability of the OP-TEE driver.

This patch cleans the configuration dependency with:
- CONFIG_OPTEE_IMAGE (renamed) => support of OP-TEE image in U-Boot
- CONFIG_SPL_OPTEE_IMAGE (renamed) => support of OP-TEE image in SPL
- CONFIG_OPTEE (same) => support of OP-TEE driver in U-Boot
- CONFIG_OPTEE_LIB (new) => support of OP-TEE library

After this patch, the macro have the correct behavior:
- CONFIG_IS_ENABLED(OPTEE_IMAGE) => Load of OP-TEE image is supported
- CONFIG_IS_ENABLED(OPTEE) => OP-TEE driver is supported

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
12 files changed:
arch/arm/mach-rockchip/sdram.c
common/spl/Kconfig
common/spl/Makefile
common/spl/spl.c
configs/evb-rk3229_defconfig
configs/evb-rk3288_defconfig
configs/odroid-go2_defconfig
include/tee/optee.h
lib/Makefile
lib/optee/Kconfig
lib/optee/Makefile
lib/optee/optee.c