summaryrefslogtreecommitdiff
path: root/drivers/firmware/scmi/optee_agent.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-10-14 10:47:52 -0400
committerTom Rini <trini@konsulko.com>2023-10-14 10:47:52 -0400
commit25edd247a84a31298c22a34ec5cf2851cbf61f70 (patch)
tree636b2beef8d9056926eee1d61b94d90e800b3b58 /drivers/firmware/scmi/optee_agent.c
parentab9fbac81670478feccd439a5d84a67bd14d581d (diff)
parent66abf2bba36f8c5f3929b6de6fa377350d52bdd8 (diff)
Merge branch '2023-10-13-firmware-scmi-updates'
- Fix a memset call in the optee_agent code. Then to quote the author for the rest of the changes: This patch series allows users to access SCMI base protocol provided by SCMI server (platform). See SCMI specification document v3.2 beta[1] for more details about SCMI base protocol. What is currently not implemented is - SCMI_BASE_NOTIFY_ERRORS command and notification callback mechanism This feature won't be very useful in the current U-Boot environment. [1] https://developer.arm.com/documentation/den0056/e/?lang=en
Diffstat (limited to 'drivers/firmware/scmi/optee_agent.c')
-rw-r--r--drivers/firmware/scmi/optee_agent.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/firmware/scmi/optee_agent.c b/drivers/firmware/scmi/optee_agent.c
index db927fb2140..48dbb88a3fb 100644
--- a/drivers/firmware/scmi/optee_agent.c
+++ b/drivers/firmware/scmi/optee_agent.c
@@ -149,7 +149,7 @@ static int open_channel(struct udevice *dev, struct scmi_optee_channel *chan,
struct tee_param param[1] = { };
int ret;
- memset(sess, 0, sizeof(sess));
+ memset(sess, 0, sizeof(*sess));
sess->tee = tee_find_device(NULL, NULL, NULL, NULL);
if (!sess->tee)
@@ -324,6 +324,7 @@ static int setup_channel(struct udevice *dev, struct scmi_optee_channel *chan)
}
static int scmi_optee_get_channel(struct udevice *dev,
+ struct udevice *protocol,
struct scmi_channel **channel)
{
struct scmi_optee_channel *base_chan = dev_get_plat(dev);
@@ -331,7 +332,7 @@ static int scmi_optee_get_channel(struct udevice *dev,
u32 channel_id;
int ret;
- if (dev_read_u32(dev, "linaro,optee-channel-id", &channel_id)) {
+ if (dev_read_u32(protocol, "linaro,optee-channel-id", &channel_id)) {
/* Uses agent base channel */
*channel = container_of(base_chan, struct scmi_channel, ref);
@@ -343,7 +344,7 @@ static int scmi_optee_get_channel(struct udevice *dev,
if (!chan)
return -ENOMEM;
- ret = setup_channel(dev, chan);
+ ret = setup_channel(protocol, chan);
if (ret) {
free(chan);
return ret;