[PATCH 04/12] firmware: stratix10-svc: increase msg arg size
From: tien . sung . ang
Date: Thu Jun 22 2023 - 23:22:13 EST
From: Ang Tien Sung <tien.sung.ang@xxxxxxxxx>
Increase args array from 3 to 6, which is used for args to be passed
via registers and not physically mapped buffer. This is to cater
for the new SDM crypto commands that requires the extra arguments
to contain the physical address of shared buffers.
Signed-off-by: Ang Tien Sung <tien.sung.ang@xxxxxxxxx>
---
drivers/firmware/stratix10-svc.c | 6 ++++--
include/linux/firmware/intel/stratix10-svc-client.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index d7a11f7a43f3..37f188a1e927 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -117,7 +117,7 @@ struct stratix10_svc_data {
size_t size_output;
u32 command;
u32 flag;
- u64 arg[3];
+ u64 arg[6];
};
/**
@@ -1084,7 +1084,9 @@ int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg)
p_data->arg[0] = p_msg->arg[0];
p_data->arg[1] = p_msg->arg[1];
p_data->arg[2] = p_msg->arg[2];
- p_data->size = p_msg->payload_length;
+ p_data->arg[3] = p_msg->arg[3];
+ p_data->arg[4] = p_msg->arg[4];
+ p_data->arg[5] = p_msg->arg[5];
p_data->chan = chan;
pr_debug("%s: put to FIFO pa=0x%016x, cmd=%x, size=%u\n", __func__,
(unsigned int)p_data->paddr, p_data->command,
diff --git a/include/linux/firmware/intel/stratix10-svc-client.h b/include/linux/firmware/intel/stratix10-svc-client.h
index 2d4a016468ae..bdcdc895993d 100644
--- a/include/linux/firmware/intel/stratix10-svc-client.h
+++ b/include/linux/firmware/intel/stratix10-svc-client.h
@@ -216,7 +216,7 @@ struct stratix10_svc_client_msg {
void *payload_output;
size_t payload_length_output;
enum stratix10_svc_command_code command;
- u64 arg[3];
+ u64 arg[6];
};
/**
--
2.25.1