summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2021-11-25 15:07:30 +0000
committerSudeep Holla <sudeep.holla@arm.com>2021-11-29 14:32:30 +0000
commitafc9c1e26bc7d3145bd1112d74bbe8d0152da934 (patch)
treea66657326604eebbee784e59bfe99fa8b7912512 /drivers/firmware
parent61bc76be367e9928c2c49fbde9783f4821446482 (diff)
downloadlinux-stable-afc9c1e26bc7d3145bd1112d74bbe8d0152da934.tar.gz
linux-stable-afc9c1e26bc7d3145bd1112d74bbe8d0152da934.tar.bz2
linux-stable-afc9c1e26bc7d3145bd1112d74bbe8d0152da934.zip
firmware: arm_scmi: optee: Drop the support for the OPTEE shared dynamic buffer
The shared memory buffer allocated by the optee driver is normal cached memory and can't be used with IOMEM APIs used in shmem_*. We currently support only IO memory for shared memory and supporting normal cached memory needs more changes and needs to be thought through properly. So for now, let us drop the support for this OPTEE shared buffer. Link: https://lore.kernel.org/r/20211125150730.188487-1-sudeep.holla@arm.com Cc: Cristian Marussi <cristian.marussi@arm.com> Cc: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/arm_scmi/optee.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c
index 901737c9f5f8..175b39bcd470 100644
--- a/drivers/firmware/arm_scmi/optee.c
+++ b/drivers/firmware/arm_scmi/optee.c
@@ -282,23 +282,6 @@ static void scmi_optee_clear_channel(struct scmi_chan_info *cinfo)
shmem_clear_channel(channel->shmem);
}
-static int setup_dynamic_shmem(struct device *dev, struct scmi_optee_channel *channel)
-{
- const size_t msg_size = SCMI_OPTEE_MAX_MSG_SIZE;
-
- channel->tee_shm = tee_shm_alloc_kernel_buf(scmi_optee_private->tee_ctx, msg_size);
- if (IS_ERR(channel->tee_shm)) {
- dev_err(channel->cinfo->dev, "shmem allocation failed\n");
- return -ENOMEM;
- }
-
- channel->shmem = (void *)tee_shm_get_va(channel->tee_shm, 0);
- memset(channel->shmem, 0, msg_size);
- shmem_clear_channel(channel->shmem);
-
- return 0;
-}
-
static int setup_static_shmem(struct device *dev, struct scmi_chan_info *cinfo,
struct scmi_optee_channel *channel)
{
@@ -342,7 +325,7 @@ static int setup_shmem(struct device *dev, struct scmi_chan_info *cinfo,
if (of_find_property(cinfo->dev->of_node, "shmem", NULL))
return setup_static_shmem(dev, cinfo, channel);
else
- return setup_dynamic_shmem(dev, channel);
+ return -ENOMEM;
}
static int scmi_optee_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, bool tx)