All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: aoss: Reduce the AOP ACK wait time
@ 2020-01-10 10:07 Arun Kumar Neelakantam
  0 siblings, 0 replies; only message in thread
From: Arun Kumar Neelakantam @ 2020-01-10 10:07 UTC (permalink / raw)
  To: bjorn.andersson, clew
  Cc: Arun Kumar Neelakantam, Andy Gross,
	open list:ARM/QUALCOMM SUPPORT, open list

AOP send ACK immediately before wait thread can start waiting.
In this case the probe call is blocked for default time 1sec and
causing bootup delay.

Reduce the default wait time to 20ms to avoid delay in IRQ miss case.

Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
---
 drivers/soc/qcom/qcom_aoss.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c
index 006ac40..2cf2393 100644
--- a/drivers/soc/qcom/qcom_aoss.c
+++ b/drivers/soc/qcom/qcom_aoss.c
@@ -44,6 +44,8 @@
 
 #define QMP_NUM_COOLING_RESOURCES	2
 
+#define QMP_ACK_TIMEOUT			msecs_to_jiffies(10)
+
 static bool qmp_cdev_max_state = 1;
 
 struct qmp_cooling_device {
@@ -150,7 +152,8 @@ static int qmp_open(struct qmp *qmp)
 
 	qmp_kick(qmp);
 
-	ret = wait_event_timeout(qmp->event, qmp_link_acked(qmp), HZ);
+	ret = wait_event_timeout(qmp->event, qmp_link_acked(qmp),
+				 QMP_ACK_TIMEOUT);
 	if (!ret) {
 		dev_err(qmp->dev, "ucore didn't ack link\n");
 		goto timeout_close_link;
@@ -160,7 +163,8 @@ static int qmp_open(struct qmp *qmp)
 
 	qmp_kick(qmp);
 
-	ret = wait_event_timeout(qmp->event, qmp_ucore_channel_up(qmp), HZ);
+	ret = wait_event_timeout(qmp->event, qmp_ucore_channel_up(qmp),
+				 QMP_ACK_TIMEOUT);
 	if (!ret) {
 		dev_err(qmp->dev, "ucore didn't open channel\n");
 		goto timeout_close_channel;
@@ -171,7 +175,8 @@ static int qmp_open(struct qmp *qmp)
 
 	qmp_kick(qmp);
 
-	ret = wait_event_timeout(qmp->event, qmp_mcore_channel_acked(qmp), HZ);
+	ret = wait_event_timeout(qmp->event, qmp_mcore_channel_acked(qmp),
+				 QMP_ACK_TIMEOUT);
 	if (!ret) {
 		dev_err(qmp->dev, "ucore didn't ack channel\n");
 		goto timeout_close_channel;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-10 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10 10:07 [PATCH] soc: qcom: aoss: Reduce the AOP ACK wait time Arun Kumar Neelakantam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.