summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-spi-sh-msiof-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-spi-sh-msiof-fixes.patch')
-rw-r--r--meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-spi-sh-msiof-fixes.patch16
1 files changed, 13 insertions, 3 deletions
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-spi-sh-msiof-fixes.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-spi-sh-msiof-fixes.patch
index d8806ba..411d0ee 100644
--- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-spi-sh-msiof-fixes.patch
+++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-spi-sh-msiof-fixes.patch
@@ -3,7 +3,8 @@ From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Date: Sun, 15 May 2016 21:53:13 +0300
Subject: [PATCH] spi: sh-msiof: fixes
-speed up polling of CTR register
+speed up polling of CTR register and allow scheduling instead of
+busy loop
Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
---
@@ -19,15 +20,24 @@ index d096f5a..6817304 100644
sh_msiof_write(p, CTR, data);
- for (k = 100; k > 0; k--) {
-+ for (k = 1000; k > 0; k--) {
++ for (k = 100000; k > 0; k--) {
if ((sh_msiof_read(p, CTR) & mask) == set)
break;
- udelay(10);
-+ udelay(1);
++ usleep_range(1, 2);
}
return k > 0 ? 0 : -ETIMEDOUT;
+@@ -295,7 +295,7 @@ static void sh_msiof_spi_reset_regs(struct sh_msiof_spi_priv *p)
+ if (!(sh_msiof_read(p, CTR) & mask))
+ break;
+
+- udelay(10);
++ usleep_range(10, 20);
+ }
+ }
+
--
1.9.1