From: "Arnd Bergmann" <arnd@arndb.de>
To: "Patrick Delaunay" <patrick.delaunay@foss.st.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>
Cc: "Etienne CARRIERE" <etienne.carriere@linaro.org>,
"Fabrice GASNIER" <fabrice.gasnier@foss.st.com>,
"Amelie DELAUNAY" <amelie.delaunay@foss.st.com>,
"Lionel DEBIEVE" <lionel.debieve@foss.st.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH v6 0/3] nvmem: stm32: add OP-TEE support for STM32MP13x
Date: Thu, 26 Jan 2023 22:02:43 +0100 [thread overview]
Message-ID: <077f90df-0e0b-4844-8492-1d825262a0f6@app.fastmail.com> (raw)
In-Reply-To: <20230118172940.841094-1-patrick.delaunay@foss.st.com>
On Wed, Jan 18, 2023, at 18:29, Patrick Delaunay wrote:
>
> +config NVMEM_STM32_BSEC_OPTEE_TA
> + bool "STM32MP BSEC OP-TEE TA support for nvmem-stm32-romem driver"
> + depends on OPTEE
> + help
> + Say y here to enable the accesses to STM32MP SoC OTPs by the OP-TEE
> + trusted application STM32MP BSEC.
> +
> + This library is a used by stm32-romem driver or included in the
> module
> + called nvmem-stm32-romem.
> +
> config NVMEM_STM32_ROMEM
> tristate "STMicroelectronics STM32 factory-programmed memory support"
> depends on ARCH_STM32 || COMPILE_TEST
> + imply NVMEM_STM32_BSEC_OPTEE_TA
> help
> Say y here to enable read-only access for STMicroelectronics STM32
> factory-programmed memory area.
This is now causing a link failure with CONFIG_OPTEE=m if
NVMEM_STM32_ROMEM is built-in. My guess is that you saw something
like that earlier and someone recommended using the 'imply' keyword
without understanding what it does (no worries, nobody understands it).
I've prepared a patch now based on the most likely interpretation
of what you actually meant here:
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.
This enables NVMEM_STM32_BSEC_OPTEE_TA whenever OPTEE is
available, but prevents the link error by forcing NVMEM_STM32_ROMEM
to also be a loadable module if that is how OPTEE is built.
I'll send that if it passes the randconfig builds over night.
Arnd
prev parent reply other threads:[~2023-01-26 21:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 17:29 Patrick Delaunay
2023-01-18 17:29 ` [PATCH v6 1/3] ARM: dts: stm32mp13: fix compatible for BSEC Patrick Delaunay
2023-01-19 12:06 ` [Linux-stm32] " Ahmad Fatoum
2023-02-02 12:31 ` Alexandre TORGUE
2023-01-18 17:29 ` [PATCH v6 2/3] nvmem: stm32: add OP-TEE support for STM32MP13x Patrick Delaunay
2023-01-20 17:42 ` Srinivas Kandagatla
2023-01-18 17:29 ` [PATCH v6 3/3] nvmem: stm32: detect bsec pta presence for STM32MP15x Patrick Delaunay
2023-01-20 17:42 ` Srinivas Kandagatla
2023-01-26 21:02 ` Arnd Bergmann [this message]
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=077f90df-0e0b-4844-8492-1d825262a0f6@app.fastmail.com \
--to=arnd@arndb.de \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=devicetree@vger.kernel.org \
--cc=etienne.carriere@linaro.org \
--cc=fabrice.gasnier@foss.st.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lionel.debieve@foss.st.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=patrick.delaunay@foss.st.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.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
all inboxes | Powered by JetHome®