Skip to content

Commit 0e3bb6e

Browse files
bentheredonethatJassi Brar
authored andcommitted
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 <[email protected]> Acked-by: Michal Simek <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent cbf5009 commit 0e3bb6e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/mailbox/zynqmp-ipi-mailbox.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@
6464

6565
#define MAX_SGI 16
6666

67+
/*
68+
* Module parameters
69+
*/
70+
static int tx_poll_period = 5;
71+
module_param_named(tx_poll_period, tx_poll_period, int, 0644);
72+
MODULE_PARM_DESC(tx_poll_period, "Poll period waiting for ack after send.");
73+
6774
/**
6875
* struct zynqmp_ipi_mchan - Description of a Xilinx ZynqMP IPI mailbox channel
6976
* @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,
537544
mbox->num_chans = 2;
538545
mbox->txdone_irq = false;
539546
mbox->txdone_poll = true;
540-
mbox->txpoll_period = 5;
547+
mbox->txpoll_period = tx_poll_period;
541548
mbox->of_xlate = zynqmp_ipi_of_xlate;
542549
chans = devm_kzalloc(mdev, 2 * sizeof(*chans), GFP_KERNEL);
543550
if (!chans)

0 commit comments

Comments
 (0)