All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <4DA27245.6@vscht.cz>

diff --git a/a/2.hdr b/a/2.hdr
deleted file mode 100644
index cd8ddfe..0000000
--- a/a/2.hdr
+++ /dev/null
@@ -1,4 +0,0 @@
-Content-Type: text/x-patch; name="0001-nand-Fix-S3C-NAND-clock-stop.patch"
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment;
-	filename="0001-nand-Fix-S3C-NAND-clock-stop.patch"
diff --git a/a/2.txt b/a/2.txt
deleted file mode 100644
index c7eef68..0000000
--- a/a/2.txt
+++ /dev/null
@@ -1,156 +0,0 @@
->From 4fd7086f28d6452f1edafa903e7becd5a0f017c6 Mon Sep 17 00:00:00 2001
-From: Jiri Pinkava <jiri.pinkava@vscht.cz>
-Date: Mon, 11 Apr 2011 03:20:33 +0200
-Subject: [PATCH] nand: Fix S3C NAND clock stop
-
-Current implementation of s3c2410_nand_select_chip call
-clk_disable every time when chip = -1 (de-select). This happend
-multiple times even if chip was already de-selected. This causes
-disabling clock even if they are already disabled and due to
-nature of clock subsytem implementation this causes nand clock
-to be disabled and newer enabled again.
-
-Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
----
- drivers/mtd/nand/s3c2410.c |   57 +++++++++++++++++++++++++++++++------------
- 1 files changed, 41 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
-index 33d832d..fbc37dc 100644
---- a/drivers/mtd/nand/s3c2410.c
-+++ b/drivers/mtd/nand/s3c2410.c
-@@ -54,8 +54,14 @@ static int hardware_ecc = 1;
- static int hardware_ecc = 0;
- #endif
- 
-+#define CLOCK_DISABLE	0
-+#define CLOCK_ENABLE	1
-+#define CLOCK_SUSPEND	2
-+
-+static int clock_state = CLOCK_DISABLE;
-+
- #ifdef CONFIG_MTD_NAND_S3C2410_CLKSTOP
--static int clock_stop = 1;
-+static const int clock_stop = 1;
- #else
- static const int clock_stop = 0;
- #endif
-@@ -159,11 +165,33 @@ static struct s3c2410_platform_nand *to_nand_plat(struct platform_device *dev)
- 	return dev->dev.platform_data;
- }
- 
--static inline int allow_clk_stop(struct s3c2410_nand_info *info)
-+static inline int allow_clk_suspend(struct s3c2410_nand_info *info)
- {
- 	return clock_stop;
- }
- 
-+/**
-+ * s3c2410_nand_clk_set_state - Enable, disable or suspend NAND clock.
-+ * @info: The controller instance.
-+ * @new_state: State to which clock should be set.
-+ */
-+static void s3c2410_nand_clk_set_state(struct s3c2410_nand_info *info,
-+		int new_state)
-+{
-+	if (!allow_clk_suspend(info) && new_state == CLOCK_SUSPEND)
-+		return;
-+
-+	if (clock_state == CLOCK_ENABLE) {
-+		if (new_state != CLOCK_ENABLE)
-+			clk_disable(info->clk);
-+	} else {
-+		if (new_state == CLOCK_ENABLE)
-+			clk_enable(info->clk);
-+	}
-+
-+	clock_state = new_state;
-+}
-+
- /* timing calculations */
- 
- #define NS_IN_KHZ 1000000
-@@ -333,8 +361,8 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip)
- 	nmtd = this->priv;
- 	info = nmtd->info;
- 
--	if (chip != -1 && allow_clk_stop(info))
--		clk_enable(info->clk);
-+	if (chip != -1)
-+		s3c2410_nand_clk_set_state(info, CLOCK_ENABLE);
- 
- 	cur = readl(info->sel_reg);
- 
-@@ -356,8 +384,8 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip)
- 
- 	writel(cur, info->sel_reg);
- 
--	if (chip == -1 && allow_clk_stop(info))
--		clk_disable(info->clk);
-+	if (chip == -1)
-+		s3c2410_nand_clk_set_state(info, CLOCK_SUSPEND);
- }
- 
- /* s3c2410_nand_hwcontrol
-@@ -694,8 +722,7 @@ static int s3c24xx_nand_remove(struct platform_device *pdev)
- 	/* free the common resources */
- 
- 	if (info->clk != NULL && !IS_ERR(info->clk)) {
--		if (!allow_clk_stop(info))
--			clk_disable(info->clk);
-+		s3c2410_nand_clk_set_state(info, CLOCK_DISABLE);
- 		clk_put(info->clk);
- 	}
- 
-@@ -947,7 +974,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
- 		goto exit_error;
- 	}
- 
--	clk_enable(info->clk);
-+	s3c2410_nand_clk_set_state(info, CLOCK_ENABLE);
- 
- 	/* allocate and map the resource */
- 
-@@ -1026,9 +1053,9 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
- 		goto exit_error;
- 	}
- 
--	if (allow_clk_stop(info)) {
-+	if (allow_clk_suspend(info)) {
- 		dev_info(&pdev->dev, "clock idle support enabled\n");
--		clk_disable(info->clk);
-+		s3c2410_nand_clk_set_state(info, CLOCK_SUSPEND);
- 	}
- 
- 	pr_debug("initialised ok\n");
-@@ -1059,8 +1086,7 @@ static int s3c24xx_nand_suspend(struct platform_device *dev, pm_message_t pm)
- 
- 		writel(info->save_sel | info->sel_bit, info->sel_reg);
- 
--		if (!allow_clk_stop(info))
--			clk_disable(info->clk);
-+		s3c2410_nand_clk_set_state(info, CLOCK_DISABLE);
- 	}
- 
- 	return 0;
-@@ -1072,7 +1098,7 @@ static int s3c24xx_nand_resume(struct platform_device *dev)
- 	unsigned long sel;
- 
- 	if (info) {
--		clk_enable(info->clk);
-+		s3c2410_nand_clk_set_state(info, CLOCK_ENABLE);
- 		s3c2410_nand_inithw(info);
- 
- 		/* Restore the state of the nFCE line. */
-@@ -1082,8 +1108,7 @@ static int s3c24xx_nand_resume(struct platform_device *dev)
- 		sel |= info->save_sel & info->sel_bit;
- 		writel(sel, info->sel_reg);
- 
--		if (allow_clk_stop(info))
--			clk_disable(info->clk);
-+		s3c2410_nand_clk_set_state(info, CLOCK_SUSPEND);
- 	}
- 
- 	return 0;
--- 
-1.7.4.4
diff --git a/a/content_digest b/N1/content_digest
index 3f483e2..3abf0bd 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,16 +1,10 @@
  "ref\01302485262-8401-1-git-send-email-jiri.pinkava@vscht.cz\0"
  "ref\04DA261DA.2050404@oracle.com\0"
- "From\0Ji\305\231\303\255 Pinkava <Jiri.Pinkava@vscht.cz>\0"
- "Subject\0Re: [PATCH] nand: Fix S3C NAND clock stop\0"
+ "From\0Jiri.Pinkava@vscht.cz (Ji\305\231\303\255 Pinkava)\0"
+ "Subject\0[PATCH] nand: Fix S3C NAND clock stop\0"
  "Date\0Mon, 11 Apr 2011 05:15:17 +0200\0"
- "To\0Randy Dunlap <randy.dunlap@oracle.com>\0"
- "Cc\0kgene.kim@samsung.com <kgene.kim@samsung.com>"
-  linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
-  linux-mtd@lists.infradead.org <linux-mtd@lists.infradead.org>
-  ben-linux@fluff.org <ben-linux@fluff.org>
-  dwmw2@infradead.org <dwmw2@infradead.org>
- " linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>\0"
- "\01:1\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
+ "\00:1\0"
  "b\0"
  "Current implementation of s3c2410_nand_select_chip call\n"
  "clk_disable every time when chip = -1 (de-select). This happend\n"
@@ -173,164 +167,5 @@
  "  \treturn 0;\n"
  "-- \n"
  1.7.4.4
- "\01:2\0"
- "fn\00001-nand-Fix-S3C-NAND-clock-stop.patch\0"
- "b\0"
- ">From 4fd7086f28d6452f1edafa903e7becd5a0f017c6 Mon Sep 17 00:00:00 2001\n"
- "From: Jiri Pinkava <jiri.pinkava@vscht.cz>\n"
- "Date: Mon, 11 Apr 2011 03:20:33 +0200\n"
- "Subject: [PATCH] nand: Fix S3C NAND clock stop\n"
- "\n"
- "Current implementation of s3c2410_nand_select_chip call\n"
- "clk_disable every time when chip = -1 (de-select). This happend\n"
- "multiple times even if chip was already de-selected. This causes\n"
- "disabling clock even if they are already disabled and due to\n"
- "nature of clock subsytem implementation this causes nand clock\n"
- "to be disabled and newer enabled again.\n"
- "\n"
- "Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>\n"
- "---\n"
- " drivers/mtd/nand/s3c2410.c |   57 +++++++++++++++++++++++++++++++------------\n"
- " 1 files changed, 41 insertions(+), 16 deletions(-)\n"
- "\n"
- "diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c\n"
- "index 33d832d..fbc37dc 100644\n"
- "--- a/drivers/mtd/nand/s3c2410.c\n"
- "+++ b/drivers/mtd/nand/s3c2410.c\n"
- "@@ -54,8 +54,14 @@ static int hardware_ecc = 1;\n"
- " static int hardware_ecc = 0;\n"
- " #endif\n"
- " \n"
- "+#define CLOCK_DISABLE\t0\n"
- "+#define CLOCK_ENABLE\t1\n"
- "+#define CLOCK_SUSPEND\t2\n"
- "+\n"
- "+static int clock_state = CLOCK_DISABLE;\n"
- "+\n"
- " #ifdef CONFIG_MTD_NAND_S3C2410_CLKSTOP\n"
- "-static int clock_stop = 1;\n"
- "+static const int clock_stop = 1;\n"
- " #else\n"
- " static const int clock_stop = 0;\n"
- " #endif\n"
- "@@ -159,11 +165,33 @@ static struct s3c2410_platform_nand *to_nand_plat(struct platform_device *dev)\n"
- " \treturn dev->dev.platform_data;\n"
- " }\n"
- " \n"
- "-static inline int allow_clk_stop(struct s3c2410_nand_info *info)\n"
- "+static inline int allow_clk_suspend(struct s3c2410_nand_info *info)\n"
- " {\n"
- " \treturn clock_stop;\n"
- " }\n"
- " \n"
- "+/**\n"
- "+ * s3c2410_nand_clk_set_state - Enable, disable or suspend NAND clock.\n"
- "+ * @info: The controller instance.\n"
- "+ * @new_state: State to which clock should be set.\n"
- "+ */\n"
- "+static void s3c2410_nand_clk_set_state(struct s3c2410_nand_info *info,\n"
- "+\t\tint new_state)\n"
- "+{\n"
- "+\tif (!allow_clk_suspend(info) && new_state == CLOCK_SUSPEND)\n"
- "+\t\treturn;\n"
- "+\n"
- "+\tif (clock_state == CLOCK_ENABLE) {\n"
- "+\t\tif (new_state != CLOCK_ENABLE)\n"
- "+\t\t\tclk_disable(info->clk);\n"
- "+\t} else {\n"
- "+\t\tif (new_state == CLOCK_ENABLE)\n"
- "+\t\t\tclk_enable(info->clk);\n"
- "+\t}\n"
- "+\n"
- "+\tclock_state = new_state;\n"
- "+}\n"
- "+\n"
- " /* timing calculations */\n"
- " \n"
- " #define NS_IN_KHZ 1000000\n"
- "@@ -333,8 +361,8 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip)\n"
- " \tnmtd = this->priv;\n"
- " \tinfo = nmtd->info;\n"
- " \n"
- "-\tif (chip != -1 && allow_clk_stop(info))\n"
- "-\t\tclk_enable(info->clk);\n"
- "+\tif (chip != -1)\n"
- "+\t\ts3c2410_nand_clk_set_state(info, CLOCK_ENABLE);\n"
- " \n"
- " \tcur = readl(info->sel_reg);\n"
- " \n"
- "@@ -356,8 +384,8 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip)\n"
- " \n"
- " \twritel(cur, info->sel_reg);\n"
- " \n"
- "-\tif (chip == -1 && allow_clk_stop(info))\n"
- "-\t\tclk_disable(info->clk);\n"
- "+\tif (chip == -1)\n"
- "+\t\ts3c2410_nand_clk_set_state(info, CLOCK_SUSPEND);\n"
- " }\n"
- " \n"
- " /* s3c2410_nand_hwcontrol\n"
- "@@ -694,8 +722,7 @@ static int s3c24xx_nand_remove(struct platform_device *pdev)\n"
- " \t/* free the common resources */\n"
- " \n"
- " \tif (info->clk != NULL && !IS_ERR(info->clk)) {\n"
- "-\t\tif (!allow_clk_stop(info))\n"
- "-\t\t\tclk_disable(info->clk);\n"
- "+\t\ts3c2410_nand_clk_set_state(info, CLOCK_DISABLE);\n"
- " \t\tclk_put(info->clk);\n"
- " \t}\n"
- " \n"
- "@@ -947,7 +974,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)\n"
- " \t\tgoto exit_error;\n"
- " \t}\n"
- " \n"
- "-\tclk_enable(info->clk);\n"
- "+\ts3c2410_nand_clk_set_state(info, CLOCK_ENABLE);\n"
- " \n"
- " \t/* allocate and map the resource */\n"
- " \n"
- "@@ -1026,9 +1053,9 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)\n"
- " \t\tgoto exit_error;\n"
- " \t}\n"
- " \n"
- "-\tif (allow_clk_stop(info)) {\n"
- "+\tif (allow_clk_suspend(info)) {\n"
- " \t\tdev_info(&pdev->dev, \"clock idle support enabled\\n\");\n"
- "-\t\tclk_disable(info->clk);\n"
- "+\t\ts3c2410_nand_clk_set_state(info, CLOCK_SUSPEND);\n"
- " \t}\n"
- " \n"
- " \tpr_debug(\"initialised ok\\n\");\n"
- "@@ -1059,8 +1086,7 @@ static int s3c24xx_nand_suspend(struct platform_device *dev, pm_message_t pm)\n"
- " \n"
- " \t\twritel(info->save_sel | info->sel_bit, info->sel_reg);\n"
- " \n"
- "-\t\tif (!allow_clk_stop(info))\n"
- "-\t\t\tclk_disable(info->clk);\n"
- "+\t\ts3c2410_nand_clk_set_state(info, CLOCK_DISABLE);\n"
- " \t}\n"
- " \n"
- " \treturn 0;\n"
- "@@ -1072,7 +1098,7 @@ static int s3c24xx_nand_resume(struct platform_device *dev)\n"
- " \tunsigned long sel;\n"
- " \n"
- " \tif (info) {\n"
- "-\t\tclk_enable(info->clk);\n"
- "+\t\ts3c2410_nand_clk_set_state(info, CLOCK_ENABLE);\n"
- " \t\ts3c2410_nand_inithw(info);\n"
- " \n"
- " \t\t/* Restore the state of the nFCE line. */\n"
- "@@ -1082,8 +1108,7 @@ static int s3c24xx_nand_resume(struct platform_device *dev)\n"
- " \t\tsel |= info->save_sel & info->sel_bit;\n"
- " \t\twritel(sel, info->sel_reg);\n"
- " \n"
- "-\t\tif (allow_clk_stop(info))\n"
- "-\t\t\tclk_disable(info->clk);\n"
- "+\t\ts3c2410_nand_clk_set_state(info, CLOCK_SUSPEND);\n"
- " \t}\n"
- " \n"
- " \treturn 0;\n"
- "-- \n"
- 1.7.4.4
 
-dbc99fcb7de1f46f93a347b5d2ae7fb1aaf22db454624d8005bc32aa9cd67ad0
+6b4612674dbfb4c380b527d06097e3535c55c70cd3b3e502a86f4c127dcd88c0

diff --git a/a/content_digest b/N2/content_digest
index 3f483e2..103d9dc 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -4,12 +4,12 @@
  "Subject\0Re: [PATCH] nand: Fix S3C NAND clock stop\0"
  "Date\0Mon, 11 Apr 2011 05:15:17 +0200\0"
  "To\0Randy Dunlap <randy.dunlap@oracle.com>\0"
- "Cc\0kgene.kim@samsung.com <kgene.kim@samsung.com>"
-  linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
-  linux-mtd@lists.infradead.org <linux-mtd@lists.infradead.org>
-  ben-linux@fluff.org <ben-linux@fluff.org>
+ "Cc\0ben-linux@fluff.org <ben-linux@fluff.org>"
+  kgene.kim@samsung.com <kgene.kim@samsung.com>
   dwmw2@infradead.org <dwmw2@infradead.org>
- " linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>\0"
+  linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>
+  linux-mtd@lists.infradead.org <linux-mtd@lists.infradead.org>
+ " linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>\0"
  "\01:1\0"
  "b\0"
  "Current implementation of s3c2410_nand_select_chip call\n"
@@ -333,4 +333,4 @@
  "-- \n"
  1.7.4.4
 
-dbc99fcb7de1f46f93a347b5d2ae7fb1aaf22db454624d8005bc32aa9cd67ad0
+1597948503c570eca6b89e97e971dab6cd9e47c8d6f0b9a66871a98be1824158

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.