summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Levinsky <ben.levinsky@amd.com>2024-07-18 13:40:57 -0700
committerJassi Brar <jassisinghbrar@gmail.com>2024-07-19 21:23:16 -0500
commit0e3bb6ee88874fc052a6f7a8eb18463faea0a63d (patch)
tree01e06682dd8023989e3a7d9500cba1ca674bbc97
parentcbf5009580c7c86e9822b3e675df1762ea0a5a0a (diff)
mailbox: zynqmp-ipi: Make polling period configurable
There are cases where remote that is acking mailbox message can take longer than the default tx_poll_period value. Therefore, enable this to be mutable. Added tx_poll_period field while inserting the module to set the poll period for ack after sending mailbox message. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com> Acked-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
-rw-r--r--drivers/mailbox/zynqmp-ipi-mailbox.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
index 4acf5612487c..521d08b9ab47 100644
--- a/drivers/mailbox/zynqmp-ipi-mailbox.c
+++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
@@ -64,6 +64,13 @@
#define MAX_SGI 16
+/*
+ * Module parameters
+ */
+static int tx_poll_period = 5;
+module_param_named(tx_poll_period, tx_poll_period, int, 0644);
+MODULE_PARM_DESC(tx_poll_period, "Poll period waiting for ack after send.");
+
/**
* struct zynqmp_ipi_mchan - Description of a Xilinx ZynqMP IPI mailbox channel
* @is_opened: indicate if the IPI channel is opened
@@ -537,7 +544,7 @@ static int zynqmp_ipi_mbox_probe(struct zynqmp_ipi_mbox *ipi_mbox,
mbox->num_chans = 2;
mbox->txdone_irq = false;
mbox->txdone_poll = true;
- mbox->txpoll_period = 5;
+ mbox->txpoll_period = tx_poll_period;
mbox->of_xlate = zynqmp_ipi_of_xlate;
chans = devm_kzalloc(mdev, 2 * sizeof(*chans), GFP_KERNEL);
if (!chans)