All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <55CB3DFE.8060508@schinagl.nl>

diff --git a/a/1.txt b/N1/1.txt
index 6ba131c..217e466 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -24,3 +24,10 @@ Changed since v1
 changes from that patch
 
 Olliver
+-------------- next part --------------
+A non-text attachment was scrubbed...
+Name: 0001-mmc-sunxi-fix-timeout-in-sunxi_mmc_oclk_onoff.patch
+Type: text/x-patch
+Size: 3023 bytes
+Desc: not available
+URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150812/8931b61f/attachment.bin>
diff --git a/a/2.hdr b/a/2.hdr
deleted file mode 100644
index 3278db9..0000000
--- a/a/2.hdr
+++ /dev/null
@@ -1,5 +0,0 @@
-Content-Type: text/x-patch;
- name="0001-mmc-sunxi-fix-timeout-in-sunxi_mmc_oclk_onoff.patch"
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment;
- filename="0001-mmc-sunxi-fix-timeout-in-sunxi_mmc_oclk_onoff.patch"
diff --git a/a/2.txt b/a/2.txt
deleted file mode 100644
index ba98d94..0000000
--- a/a/2.txt
+++ /dev/null
@@ -1,90 +0,0 @@
->From bb0436dd5e2b3f021f8fcff2c2d25b87b48ab569 Mon Sep 17 00:00:00 2001
-From: Michal Suchanek <hramrach@gmail.com>
-Date: Sun, 24 May 2015 20:07:32 +0200
-Subject: [PATCH 1/1] mmc: sunxi: fix timeout in sunxi_mmc_oclk_onoff
-
-The 250ms timeout is too short.
-
-On my system enabling the oclk takes under 50ms and disabling slightly
-over 100ms when idle. Under load disabling the clock can take over
-350ms.
-
-This does not make mmc clock gating look like good option to have on
-sunxi but the system should not crash with mmc clock gating enabled
-nonetheless.
-
-This patch sets the timeout to 750ms and adds debug prints which show
-how long enabling/disabling the clock took so more data can be collected
-from other systems.
-
-Signed-off-by: Michal Suchanek <hramrach@gmail.com>
-Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
----
- drivers/mmc/host/sunxi-mmc.c | 24 +++++++++++++++++++++---
- 1 file changed, 21 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
-index daa90b7..34d134c 100644
---- a/drivers/mmc/host/sunxi-mmc.c
-+++ b/drivers/mmc/host/sunxi-mmc.c
-@@ -210,6 +210,8 @@
- #define SDXC_IDMAC_DES0_CES	BIT(30) /* card error summary */
- #define SDXC_IDMAC_DES0_OWN	BIT(31) /* 1-idma owns it, 0-host owns it */
- 
-+#define SUNXI_OCLK_ONOFF_TIMEOUT 750
-+
- struct sunxi_idma_des {
- 	u32	config;
- 	u32	buf_size;
-@@ -615,7 +617,7 @@ static irqreturn_t sunxi_mmc_handle_manual_stop(int irq, void *dev_id)
- 
- static int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en)
- {
--	unsigned long expire = jiffies + msecs_to_jiffies(250);
-+	unsigned long start, end;
- 	u32 rval;
- 	int ret;
- 
-@@ -629,6 +631,8 @@ static int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en)
- 	if (oclk_en)
- 		rval |= SDXC_CARD_CLOCK_ON;
- 
-+	start = jiffies;
-+	end = start + msecs_to_jiffies(SUNXI_OCLK_ONOFF_TIMEOUT);
- 	mmc_writel(host, REG_CLKCR, rval);
- 
- 	rval = SDXC_START | SDXC_UPCLK_ONLY | SDXC_WAIT_PRE_OVER;
-@@ -636,15 +640,29 @@ static int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en)
- 
- 	do {
- 		rval = mmc_readl(host, REG_CMDR);
--	} while (time_before(jiffies, expire) && (rval & SDXC_START));
-+	} while (time_before(jiffies, end) && (rval & SDXC_START));
-+	end = jiffies;
- 
- 	/* clear irq status bits set by the command */
- 	mmc_writel(host, REG_RINTR,
- 		   mmc_readl(host, REG_RINTR) & ~SDXC_SDIO_INTERRUPT);
- 
- 	if (rval & SDXC_START) {
--		dev_err(mmc_dev(host->mmc), "fatal err update clk timeout\n");
-+		dev_err(mmc_dev(host->mmc),
-+				"fatal err update oclk timeout. Could not %s in %ims.\n",
-+				oclk_en ? "enable" : "disable",
-+				jiffies_to_msecs(end - start));
- 		return -EIO;
-+	} else {
-+		int msecs = jiffies_to_msecs(end - start);
-+		const char *ing = oclk_en ? "enabling" : "disabling";
-+
-+		if ((msecs > 150) || (oclk_en && (msecs > 50)))
-+			dev_warn(mmc_dev(host->mmc),
-+				 "%s oclk took %ims", ing, msecs);
-+		else
-+			dev_dbg(mmc_dev(host->mmc),
-+				"%s oclk took %ims", ing, msecs);
- 	}
- 
- 	return 0;
--- 
-2.1.4
diff --git a/a/content_digest b/N1/content_digest
index c68d552..16273c4 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,18 +1,8 @@
- "From\0Olliver Schinagl <oliver+list@schinagl.nl>\0"
+ "From\0oliver+list@schinagl.nl (Olliver Schinagl)\0"
  "Subject\0[PATCH v2] mmc: sunxi: fix timeout in sunxi_mmc_oclk_onoff\0"
  "Date\0Wed, 12 Aug 2015 14:37:18 +0200\0"
- "To\0Ulf Hansson <ulf.hansson@linaro.org>"
-  Maxime Ripard <maxime.ripard@free-electrons.com>
- " David Lanzend\303\266rfer <david.lanzendoerfer@o2s.ch>"
-  Hans de Goede <hdegoede@redhat.com>
-  Chen-Yu Tsai <wens@csie.org>
-  Arnd Bergmann <arnd@arndb.de>
-  Peter Griffin <peter.griffin@linaro.org>
- " Michal Suchanek <hramrach@gmail.com>\0"
- "Cc\0linux-mmc@vger.kernel.org"
-  linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
- " linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>\0"
- "\01:1\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
+ "\00:1\0"
  "b\0"
  "Hey all\n"
  "\n"
@@ -39,99 +29,13 @@
  "* Whitespace cleanup as suggested by Maxime Ripard, no functional \n"
  "changes from that patch\n"
  "\n"
- Olliver
- "\01:2\0"
- "fn\00001-mmc-sunxi-fix-timeout-in-sunxi_mmc_oclk_onoff.patch\0"
- "b\0"
- ">From bb0436dd5e2b3f021f8fcff2c2d25b87b48ab569 Mon Sep 17 00:00:00 2001\n"
- "From: Michal Suchanek <hramrach@gmail.com>\n"
- "Date: Sun, 24 May 2015 20:07:32 +0200\n"
- "Subject: [PATCH 1/1] mmc: sunxi: fix timeout in sunxi_mmc_oclk_onoff\n"
- "\n"
- "The 250ms timeout is too short.\n"
- "\n"
- "On my system enabling the oclk takes under 50ms and disabling slightly\n"
- "over 100ms when idle. Under load disabling the clock can take over\n"
- "350ms.\n"
- "\n"
- "This does not make mmc clock gating look like good option to have on\n"
- "sunxi but the system should not crash with mmc clock gating enabled\n"
- "nonetheless.\n"
- "\n"
- "This patch sets the timeout to 750ms and adds debug prints which show\n"
- "how long enabling/disabling the clock took so more data can be collected\n"
- "from other systems.\n"
- "\n"
- "Signed-off-by: Michal Suchanek <hramrach@gmail.com>\n"
- "Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>\n"
- "---\n"
- " drivers/mmc/host/sunxi-mmc.c | 24 +++++++++++++++++++++---\n"
- " 1 file changed, 21 insertions(+), 3 deletions(-)\n"
- "\n"
- "diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c\n"
- "index daa90b7..34d134c 100644\n"
- "--- a/drivers/mmc/host/sunxi-mmc.c\n"
- "+++ b/drivers/mmc/host/sunxi-mmc.c\n"
- "@@ -210,6 +210,8 @@\n"
- " #define SDXC_IDMAC_DES0_CES\tBIT(30) /* card error summary */\n"
- " #define SDXC_IDMAC_DES0_OWN\tBIT(31) /* 1-idma owns it, 0-host owns it */\n"
- " \n"
- "+#define SUNXI_OCLK_ONOFF_TIMEOUT 750\n"
- "+\n"
- " struct sunxi_idma_des {\n"
- " \tu32\tconfig;\n"
- " \tu32\tbuf_size;\n"
- "@@ -615,7 +617,7 @@ static irqreturn_t sunxi_mmc_handle_manual_stop(int irq, void *dev_id)\n"
- " \n"
- " static int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en)\n"
- " {\n"
- "-\tunsigned long expire = jiffies + msecs_to_jiffies(250);\n"
- "+\tunsigned long start, end;\n"
- " \tu32 rval;\n"
- " \tint ret;\n"
- " \n"
- "@@ -629,6 +631,8 @@ static int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en)\n"
- " \tif (oclk_en)\n"
- " \t\trval |= SDXC_CARD_CLOCK_ON;\n"
- " \n"
- "+\tstart = jiffies;\n"
- "+\tend = start + msecs_to_jiffies(SUNXI_OCLK_ONOFF_TIMEOUT);\n"
- " \tmmc_writel(host, REG_CLKCR, rval);\n"
- " \n"
- " \trval = SDXC_START | SDXC_UPCLK_ONLY | SDXC_WAIT_PRE_OVER;\n"
- "@@ -636,15 +640,29 @@ static int sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en)\n"
- " \n"
- " \tdo {\n"
- " \t\trval = mmc_readl(host, REG_CMDR);\n"
- "-\t} while (time_before(jiffies, expire) && (rval & SDXC_START));\n"
- "+\t} while (time_before(jiffies, end) && (rval & SDXC_START));\n"
- "+\tend = jiffies;\n"
- " \n"
- " \t/* clear irq status bits set by the command */\n"
- " \tmmc_writel(host, REG_RINTR,\n"
- " \t\t   mmc_readl(host, REG_RINTR) & ~SDXC_SDIO_INTERRUPT);\n"
- " \n"
- " \tif (rval & SDXC_START) {\n"
- "-\t\tdev_err(mmc_dev(host->mmc), \"fatal err update clk timeout\\n\");\n"
- "+\t\tdev_err(mmc_dev(host->mmc),\n"
- "+\t\t\t\t\"fatal err update oclk timeout. Could not %s in %ims.\\n\",\n"
- "+\t\t\t\toclk_en ? \"enable\" : \"disable\",\n"
- "+\t\t\t\tjiffies_to_msecs(end - start));\n"
- " \t\treturn -EIO;\n"
- "+\t} else {\n"
- "+\t\tint msecs = jiffies_to_msecs(end - start);\n"
- "+\t\tconst char *ing = oclk_en ? \"enabling\" : \"disabling\";\n"
- "+\n"
- "+\t\tif ((msecs > 150) || (oclk_en && (msecs > 50)))\n"
- "+\t\t\tdev_warn(mmc_dev(host->mmc),\n"
- "+\t\t\t\t \"%s oclk took %ims\", ing, msecs);\n"
- "+\t\telse\n"
- "+\t\t\tdev_dbg(mmc_dev(host->mmc),\n"
- "+\t\t\t\t\"%s oclk took %ims\", ing, msecs);\n"
- " \t}\n"
- " \n"
- " \treturn 0;\n"
- "-- \n"
- 2.1.4
+ "Olliver\n"
+ "-------------- next part --------------\n"
+ "A non-text attachment was scrubbed...\n"
+ "Name: 0001-mmc-sunxi-fix-timeout-in-sunxi_mmc_oclk_onoff.patch\n"
+ "Type: text/x-patch\n"
+ "Size: 3023 bytes\n"
+ "Desc: not available\n"
+ URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150812/8931b61f/attachment.bin>
 
-87ed975a4c46d49ad21ade4c51437ba8f23817e11002465aa84f4a5b5f152f85
+b6c853202ae5c86e15f24b34a591411cc36e57c951ca0753002aa7dc6a2e9b84

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.