U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilias Apalodimas" <ilias.apalodimas@linaro.org>
To: "Jan Kiszka" <jan.kiszka@siemens.com>,
	"U-Boot Mailing List" <u-boot@lists.u-boot-project.org>
Cc: "Jens Wiklander" <jens.wiklander@oss.qualcomm.com>,
	"Sai Sree Kartheek Adivi" <s-adivi@ti.com>,
	"Alexander Heinisch" <alexander.heinisch@siemens.com>,
	"Tanmay Kathpalia" <tanmay.kathpalia@altera.com>
Subject: Re: [PATCH v2 2/5] tee: optee: Add support for enumerating services that only need RPMB
Date: Tue, 08 Sep 2026 10:25:20 +0300	[thread overview]
Message-ID: <DL9R83CX8TMM.196CDRKC99BU2@linaro.org> (raw)
In-Reply-To: <1794934500e5580309f4a8cb064bd035cb9b23d4.1787514446.git.jan.kiszka@siemens.com>

[...]

On Sun Aug 23, 2026 at 10:47 PM EEST, Jan Kiszka wrote:
> +
>  /**
>   * struct optee_private - OP-TEE driver private data
>   * @rpmb_mmc:		mmc device for the RPMB partition
> diff --git a/drivers/tee/optee/rpmb.c b/drivers/tee/optee/rpmb.c
> index bacced6af6c..f7312d7171c 100644
> --- a/drivers/tee/optee/rpmb.c
> +++ b/drivers/tee/optee/rpmb.c
> @@ -191,3 +191,22 @@ void optee_suppl_rpmb_release(struct udevice *dev)
>  {
>  	release_mmc(dev_get_priv(dev));
>  }
> +
> +void optee_rpmb_available(void)
> +{
> +	struct udevice *dev;
> +	struct uclass *uc;
> +	u32 tee_sess;
> +
> +	uclass_id_foreach_dev(UCLASS_TEE, dev, uc) {
> +		if (strcmp(dev->driver->name, "optee") != 0)
> +			continue;
> +
> +		if (optee_open_enum_session(dev, &tee_sess) != 0)
> +			continue;
> +
> +		optee_bind_services(dev, tee_sess, PTA_CMD_GET_DEVICES_RPMB);

Will this work if devices are bound but not probed? IOW do we need a device_active() check?

> +
> +		tee_close_session(dev, tee_sess);
> +	}
> +}
> diff --git a/include/tee/optee.h b/include/tee/optee.h
> index d1194493780..755533b2c0b 100644
> --- a/include/tee/optee.h
> +++ b/include/tee/optee.h
> @@ -74,4 +74,10 @@ static inline bool is_optee_smc_api(void)
>  }
>  #endif
>
> +#if defined(CONFIG_OPTEE) && defined(CONFIG_SUPPORT_EMMC_RPMB)
> +void optee_rpmb_available(void);
> +#else
> +static inline void optee_rpmb_available(void) {}
> +#endif
> +
>  #endif /* _OPTEE_H */

Thanks
/Ilias

  reply	other threads:[~2026-09-08  7:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-23 19:47 [PATCH v2 0/5] optee: Add support for enumerating RPMB-dependent services Jan Kiszka
2026-08-23 19:47 ` [PATCH v2 1/5] tee: optee: Factor out service enumeration and binding functions Jan Kiszka
2026-09-08  7:08   ` Ilias Apalodimas
2026-09-08  9:47     ` Jan Kiszka
2026-09-08  9:53       ` Jan Kiszka
2026-09-08 10:34         ` Ilias Apalodimas
2026-08-23 19:47 ` [PATCH v2 2/5] tee: optee: Add support for enumerating services that only need RPMB Jan Kiszka
2026-09-08  7:25   ` Ilias Apalodimas [this message]
2026-09-08 10:55     ` Jan Kiszka
2026-09-08 11:55       ` Ilias Apalodimas
2026-08-23 19:47 ` [PATCH v2 3/5] tee: optee: Do not warn about TEE_ERROR_STORAGE_NOT_AVAILABLE Jan Kiszka
2026-09-08  7:15   ` Ilias Apalodimas
2026-09-08 11:01     ` Jan Kiszka
2026-09-08 11:54       ` Ilias Apalodimas
2026-08-23 19:47 ` [PATCH v2 4/5] mmc: Call back to optee after a successful mmc_init Jan Kiszka
2026-08-26  8:44   ` Peng Fan
2026-08-26 10:10     ` Kathpalia, Tanmay
2026-08-23 19:47 ` [PATCH v2 5/5] mmc: Make "MMC Device not found" a debug output Jan Kiszka
2026-08-26  8:44   ` Peng Fan
2026-08-26 10:10     ` Kathpalia, Tanmay
2026-09-08  7:12   ` Ilias Apalodimas
2026-09-08  7:43     ` Kathpalia, Tanmay
2026-09-08  9:36 ` [PATCH v2 0/5] optee: Add support for enumerating RPMB-dependent services Ilias Apalodimas
2026-09-08  9:43   ` Jan Kiszka

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=DL9R83CX8TMM.196CDRKC99BU2@linaro.org \
    --to=ilias.apalodimas@linaro.org \
    --cc=alexander.heinisch@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jens.wiklander@oss.qualcomm.com \
    --cc=s-adivi@ti.com \
    --cc=tanmay.kathpalia@altera.com \
    --cc=u-boot@lists.u-boot-project.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