linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 37/37] nvmem: stm32: fix OPTEE dependency
Date: Fri, 27 Jan 2023 11:16:05 +0000	[thread overview]
Message-ID: <20230127111605.25958-38-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20230127111605.25958-1-srinivas.kandagatla@linaro.org>

From: Arnd Bergmann <arnd@arndb.de>

The stm32 nvmem driver fails to link as built-in when OPTEE
is a loadable module:

aarch64-linux-ld: drivers/nvmem/stm32-bsec-optee-ta.o: in function `stm32_bsec:
stm32-bsec-optee-ta.c:(.text+0xc8): undefined reference to `tee_client_open_session'
aarch64-linux-ld: drivers/nvmem/stm32-bsec-optee-ta.o: in function `stm32_bsec:
stm32-bsec-optee-ta.c:(.text+0x1fc): undefined reference to `tee_client_open_context'

Change the CONFIG_NVMEM_STM32_ROMEM definition so it can only
be built-in if OPTEE is either built-in or disabled, and
make NVMEM_STM32_BSEC_OPTEE_TA a hidden symbol instead.

Fixes: ae46fd89cc0cc ("nvmem: stm32: add OP-TEE support for STM32MP13x")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/nvmem/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index ed8ef7460be2..ae2c5257ed97 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -295,8 +295,7 @@ config NVMEM_SPRD_EFUSE
 	  will be called nvmem-sprd-efuse.
 
 config NVMEM_STM32_BSEC_OPTEE_TA
-	bool "STM32MP BSEC OP-TEE TA support for nvmem-stm32-romem driver"
-	depends on OPTEE
+	def_bool NVMEM_STM32_ROMEM && OPTEE
 	help
 	  Say y here to enable the accesses to STM32MP SoC OTPs by the OP-TEE
 	  trusted application STM32MP BSEC.
@@ -307,7 +306,7 @@ config NVMEM_STM32_BSEC_OPTEE_TA
 config NVMEM_STM32_ROMEM
 	tristate "STMicroelectronics STM32 factory-programmed memory support"
 	depends on ARCH_STM32 || COMPILE_TEST
-	imply NVMEM_STM32_BSEC_OPTEE_TA
+	depends on OPTEE || !OPTEE
 	help
 	  Say y here to enable read-only access for STMicroelectronics STM32
 	  factory-programmed memory area.
-- 
2.25.1


  parent reply	other threads:[~2023-01-27 11:20 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 11:15 [PATCH 00/37] nvmem: patches for 6.3 Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 01/37] nvmem: sunxi_sid: Drop the workaround on A64 Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 02/37] dt-bindings: nvmem: Fix qcom,qfprom compatibles enum ordering Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 03/37] dt-bindings: nvmem: Add compatible for MSM8976 Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 04/37] dt-bindings: nvmem: qfprom: add sdm670 compatible Srinivas Kandagatla
2023-01-27 23:39   ` Richard Acayan
2023-01-27 11:15 ` [PATCH 05/37] dt-bindings: nvmem: Add compatible for SM8150 Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 06/37] dt-bindings: nvmem: Add compatible for SM8250 Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 07/37] nvmem: core: remove spurious white space Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 08/37] net: add helper eth_addr_add() Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 09/37] of: base: add of_parse_phandle_with_optional_args() Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 10/37] of: property: make #.*-cells optional for simple props Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 11/37] of: property: add #nvmem-cell-cells property Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 12/37] nvmem: core: add an index parameter to the cell Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 13/37] nvmem: core: move struct nvmem_cell_info to nvmem-provider.h Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 14/37] nvmem: core: drop the removal of the cells in nvmem_add_cells() Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 15/37] nvmem: core: add nvmem_add_one_cell() Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 16/37] nvmem: core: use nvmem_add_one_cell() in nvmem_add_cells_from_of() Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 17/37] nvmem: core: introduce NVMEM layouts Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 18/37] nvmem: core: add per-cell post processing Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 19/37] nvmem: core: allow to modify a cell before adding it Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 20/37] nvmem: imx-ocotp: replace global post processing with layouts Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 21/37] nvmem: cell: drop global cell_post_process Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 22/37] nvmem: core: provide own priv pointer in post process callback Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 23/37] nvmem: layouts: add sl28vpd layout Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 24/37] MAINTAINERS: add myself as sl28vpd nvmem layout driver Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 25/37] nvmem: layouts: Add ONIE tlv " Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 26/37] MAINTAINERS: Add myself as ONIE tlv NVMEM layout maintainer Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 27/37] nvmem: core: return -ENOENT if nvmem cell is not found Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 28/37] nvmem: layouts: Fix spelling mistake "platforn" -> "platform" Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 29/37] dt-bindings: nvmem: " Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 30/37] nvmem: core: fix nvmem_layout_get_match_data() Srinivas Kandagatla
2023-01-27 11:15 ` [PATCH 31/37] nvmem: stm32: add OP-TEE support for STM32MP13x Srinivas Kandagatla
2023-01-27 11:16 ` [PATCH 32/37] nvmem: stm32: detect bsec pta presence for STM32MP15x Srinivas Kandagatla
2023-01-27 11:16 ` [PATCH 33/37] nvmem: rave-sp-eeprm: fix kernel-doc bad line warning Srinivas Kandagatla
2023-01-27 11:16 ` [PATCH 34/37] of: property: fix #nvmem-cell-cells parsing Srinivas Kandagatla
2023-01-27 11:16 ` [PATCH 35/37] nvmem: qcom-spmi-sdam: register at device init time Srinivas Kandagatla
2023-01-27 11:16 ` [PATCH 36/37] dt-bindings: nvmem: qfprom: add IPQ8074 compatible Srinivas Kandagatla
2023-01-27 11:16 ` Srinivas Kandagatla [this message]
2023-01-28 13:43 ` [PATCH 00/37] nvmem: patches for 6.3 Greg KH
2023-01-30 11:27   ` Srinivas Kandagatla
2023-01-30 11:59     ` Greg KH
2023-01-30 15:54       ` Srinivas Kandagatla
2023-02-06  7:45         ` Greg KH
2023-02-06  7:46           ` Greg KH
2023-02-06 10:13             ` Srinivas Kandagatla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230127111605.25958-38-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).