aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-Revert-ASoC-rsnd-ssi-wait-maximum-5ms-for-status-che.patch
blob: 521631b079bd79c7e790fae54db9beaaa380d704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From a0e2d5ab917de4d8fce6bed4a5c87b729be30ca7 Mon Sep 17 00:00:00 2001
From: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Date: Sat, 1 Dec 2018 23:48:49 +1100
Subject: [PATCH] Revert: ASoC: rsnd: ssi: wait maximum 5ms for status check

By waiting only a maximum of 5ms, we break the Renesas
ADSP firmware's ability to access the SSI directly.
This functionality is currently used by the Fiberdyne DSP.

Since we shouldn't use udelay() for 50us
(linux/Documentation/timers/timers-howto.txt), we instead increase
the loop length to 1024*10 (5ms*10=50ms).

Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
---
 sound/soc/sh/rcar/ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 9538f76f8e20..0395e33bebdd 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -166,7 +166,7 @@ static void rsnd_ssi_status_check(struct rsnd_mod *mod,
 	u32 status;
 	int i;
 
-	for (i = 0; i < 1024; i++) {
+	for (i = 0; i < (10*1024); i++) {
 		status = rsnd_ssi_status_get(mod);
 		if (status & bit)
 			return;
-- 
2.17.1