Re: [PATCH 3/4] mmc: Call back to optee after a successful mmc_init

"Kathpalia, Tanmay" <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <334f6456-6765-4cf9-b005-1668fdb6960f__3231.98405546776$1787496524$gmane$org@altera.com>
Hi Jan,

On 21-08-2026 14:59, Jan Kiszka wrote:
> From: Jan Kiszka<[email protected]>
>
> This is needed to that OP-TEE can re-enumerate services which need RPMB
> access that may have become available now.
>
> Signed-off-by: Jan Kiszka<[email protected]>
> ---
> CC: Peng Fan<[email protected]>
> CC: Jaehoon Chung<[email protected]>
> ---
>   drivers/mmc/mmc.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 670e92ee12b..2463e50cd3c 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -27,6 +27,7 @@
>   #include <linux/list.h>
>   #include <linux/printk.h>
>   #include <div64.h>
> +#include <tee/optee.h>

The include is unconditional while the call is not.

>   #include "mmc_private.h"
>   
>   #define DEFAULT_CMD6_TIMEOUT_MS  500
> @@ -3168,6 +3169,9 @@ int mmc_init(struct mmc *mmc)
>   				mmc->cfg->name);
>   	}
>   
> +	if (CONFIG_IS_ENABLED(OPTEE) && mmc->capacity_rpmb > 0)

It will fail to link when OPTEE=y and SUPPORT_EMMC_RPMB=n. Add
SUPPORT_EMMC_RPMB (or stub the symbol when RPMB is off).

> +		optee_rpmb_available();
> +
>   	return err;
>   }
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.