All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20131031062959.813485972@linux.com>

diff --git a/a/1.txt b/N1/1.txt
index 5b2dc8e..9997762 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,145 +1,3 @@
-From: Domenico Andreoli <domenico.andreoli@linux.com>
-
-Proof of concept: vexpress as provider of reset hooks.
-
-Platform hooks implementation.
-
-Cc: Russell King <linux@arm.linux.org.uk>
-Cc: Arnd Bergmann <arnd@arndb.de>
-Cc: Olof Johansson <olof@lixom.net>
-Cc: linux-arm-kernel@lists.infradead.org
-Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
----
- drivers/power/reset/Kconfig             |    1 +
- drivers/power/reset/vexpress-poweroff.c |   54 +++++++++++++++++++++++---------
- 2 files changed, 39 insertions(+), 16 deletions(-)
-
-Index: b/drivers/power/reset/Kconfig
-===================================================================
---- a/drivers/power/reset/Kconfig
-+++ b/drivers/power/reset/Kconfig
-@@ -41,6 +41,7 @@ config POWER_RESET_VEXPRESS
- 	bool "ARM Versatile Express power-off and reset driver"
- 	depends on ARM || ARM64
- 	depends on POWER_RESET && VEXPRESS_CONFIG
-+	select MACHINE_RESET
- 	help
- 	  Power off and reset support for the ARM Ltd. Versatile
- 	  Express boards.
-Index: b/drivers/power/reset/vexpress-poweroff.c
-===================================================================
---- a/drivers/power/reset/vexpress-poweroff.c
-+++ b/drivers/power/reset/vexpress-poweroff.c
-@@ -19,7 +19,8 @@
- #include <linux/vexpress.h>
- #include <linux/machine_reset.h>
- 
--#include <asm/system_misc.h>
-+static enum reset_func vexpress_get_func(struct platform_device *pdev);
-+static int vexpress_set_hook(struct platform_device *pdev);
- 
- static void vexpress_reset_do(struct device *dev, const char *what)
- {
-@@ -40,34 +41,40 @@ static void vexpress_reset_do(struct dev
- 	dev_emerg(dev, "Unable to %s (%d)\n", what, err);
- }
- 
--static struct device *vexpress_power_off_device;
--
--static void vexpress_power_off(void)
-+static void vexpress_power_off(void *dev)
- {
--	vexpress_reset_do(vexpress_power_off_device, "power off");
-+	vexpress_reset_do(dev, "power off");
- }
- 
--static struct device *vexpress_restart_device;
--
--static void vexpress_restart(enum reboot_mode reboot_mode, const char *cmd)
-+static void vexpress_restart(void *dev, enum reboot_mode reboot_mode,
-+	const char *cmd)
- {
--	vexpress_reset_do(vexpress_restart_device, "restart");
-+	vexpress_reset_do(dev, "restart");
- }
- 
- static ssize_t vexpress_reset_active_show(struct device *dev,
- 		struct device_attribute *attr, char *buf)
- {
--	return sprintf(buf, "%d\n", vexpress_restart_device == dev);
-+	struct platform_device *pdev;
-+	enum reset_func func;
-+
-+	pdev = container_of(dev, struct platform_device, dev);
-+	func = vexpress_get_func(pdev);
-+
-+	return sprintf(buf, "%d\n", isset_machine_reset(func, dev));
- }
- 
- static ssize_t vexpress_reset_active_store(struct device *dev,
- 		struct device_attribute *attr, const char *buf, size_t count)
- {
- 	long value;
-+	struct platform_device *pdev;
- 	int err = kstrtol(buf, 0, &value);
- 
-+	pdev = container_of(dev, struct platform_device, dev);
-+
- 	if (!err && value)
--		vexpress_restart_device = dev;
-+		vexpress_set_hook(pdev);
- 
- 	return err ? err : count;
- }
-@@ -90,7 +97,7 @@ static struct of_device_id vexpress_rese
- 	{}
- };
- 
--static int vexpress_reset_probe(struct platform_device *pdev)
-+static enum reset_func vexpress_get_func(struct platform_device *pdev)
- {
- 	enum reset_func func;
- 	const struct of_device_id *match =
-@@ -101,23 +108,38 @@ static int vexpress_reset_probe(struct p
- 	else
- 		func = pdev->id_entry->driver_data;
- 
-+	return func;
-+}
-+
-+static int vexpress_set_hook(struct platform_device *pdev)
-+{
-+	enum reset_func func;
-+	struct reset_hook hook;
-+
-+	func = vexpress_get_func(pdev);
-+	reset_hook_init(&hook);
-+
- 	switch (func) {
- 	case RESET_POWER_OFF:
--		vexpress_power_off_device = &pdev->dev;
--		pm_power_off = vexpress_power_off;
-+		hook.power_off = vexpress_power_off;
- 		break;
- 	case RESET_RESTART:
--		vexpress_restart_device = &pdev->dev;
--		arm_pm_restart = vexpress_restart;
-+		hook.restart = vexpress_restart;
- 		device_create_file(&pdev->dev, &dev_attr_active);
- 		break;
- 	default:
- 		return -EINVAL;
- 	};
- 
-+	set_machine_reset(func, &hook, &pdev->dev);
- 	return 0;
- }
- 
-+static int vexpress_reset_probe(struct platform_device *pdev)
-+{
-+	return vexpress_set_hook(pdev);
-+}
-+
- static const struct platform_device_id vexpress_reset_id_table[] = {
- 	{ .name = "vexpress-reset", .driver_data = RESET_RESTART, },
- 	{ .name = "vexpress-shutdown", .driver_data = RESET_POWER_OFF, },
+An embedded and charset-unspecified text was scrubbed...
+Name: arm-machine-reset-vexpress-hooks.patch
+URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131031/d00492e7/attachment.ksh>
diff --git a/a/content_digest b/N1/content_digest
index 681c8ac..fc30ced 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,162 +1,12 @@
  "ref\020131031062708.520968323@linux.com\0"
- "From\0Domenico Andreoli <domenico.andreoli@linux.com>\0"
+ "From\0domenico.andreoli@linux.com (Domenico Andreoli)\0"
  "Subject\0[PATCH 06/11] ARM: vexpress: use the common machine reset handling\0"
  "Date\0Thu, 31 Oct 2013 07:27:14 +0100\0"
- "To\0linux-arch@vger.kernel.org\0"
- "Cc\0linux-arm-kernel@lists.infradead.org"
-  linux-mips@lvger.kernel.org
-  Russell King <linux@arm.linux.org.uk>
-  Arnd Bergmann <arnd@arndb.de>
-  Olof Johansson <olof@lixom.net>
-  Ralf Baechle <ralf@linux-mips.org>
- " Domenico Andreoli <domenico.andreoli@linux.com>\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
- "fn\0arm-machine-reset-vexpress-hooks.patch\0"
  "b\0"
- "From: Domenico Andreoli <domenico.andreoli@linux.com>\n"
- "\n"
- "Proof of concept: vexpress as provider of reset hooks.\n"
- "\n"
- "Platform hooks implementation.\n"
- "\n"
- "Cc: Russell King <linux@arm.linux.org.uk>\n"
- "Cc: Arnd Bergmann <arnd@arndb.de>\n"
- "Cc: Olof Johansson <olof@lixom.net>\n"
- "Cc: linux-arm-kernel@lists.infradead.org\n"
- "Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>\n"
- "---\n"
- " drivers/power/reset/Kconfig             |    1 +\n"
- " drivers/power/reset/vexpress-poweroff.c |   54 +++++++++++++++++++++++---------\n"
- " 2 files changed, 39 insertions(+), 16 deletions(-)\n"
- "\n"
- "Index: b/drivers/power/reset/Kconfig\n"
- "===================================================================\n"
- "--- a/drivers/power/reset/Kconfig\n"
- "+++ b/drivers/power/reset/Kconfig\n"
- "@@ -41,6 +41,7 @@ config POWER_RESET_VEXPRESS\n"
- " \tbool \"ARM Versatile Express power-off and reset driver\"\n"
- " \tdepends on ARM || ARM64\n"
- " \tdepends on POWER_RESET && VEXPRESS_CONFIG\n"
- "+\tselect MACHINE_RESET\n"
- " \thelp\n"
- " \t  Power off and reset support for the ARM Ltd. Versatile\n"
- " \t  Express boards.\n"
- "Index: b/drivers/power/reset/vexpress-poweroff.c\n"
- "===================================================================\n"
- "--- a/drivers/power/reset/vexpress-poweroff.c\n"
- "+++ b/drivers/power/reset/vexpress-poweroff.c\n"
- "@@ -19,7 +19,8 @@\n"
- " #include <linux/vexpress.h>\n"
- " #include <linux/machine_reset.h>\n"
- " \n"
- "-#include <asm/system_misc.h>\n"
- "+static enum reset_func vexpress_get_func(struct platform_device *pdev);\n"
- "+static int vexpress_set_hook(struct platform_device *pdev);\n"
- " \n"
- " static void vexpress_reset_do(struct device *dev, const char *what)\n"
- " {\n"
- "@@ -40,34 +41,40 @@ static void vexpress_reset_do(struct dev\n"
- " \tdev_emerg(dev, \"Unable to %s (%d)\\n\", what, err);\n"
- " }\n"
- " \n"
- "-static struct device *vexpress_power_off_device;\n"
- "-\n"
- "-static void vexpress_power_off(void)\n"
- "+static void vexpress_power_off(void *dev)\n"
- " {\n"
- "-\tvexpress_reset_do(vexpress_power_off_device, \"power off\");\n"
- "+\tvexpress_reset_do(dev, \"power off\");\n"
- " }\n"
- " \n"
- "-static struct device *vexpress_restart_device;\n"
- "-\n"
- "-static void vexpress_restart(enum reboot_mode reboot_mode, const char *cmd)\n"
- "+static void vexpress_restart(void *dev, enum reboot_mode reboot_mode,\n"
- "+\tconst char *cmd)\n"
- " {\n"
- "-\tvexpress_reset_do(vexpress_restart_device, \"restart\");\n"
- "+\tvexpress_reset_do(dev, \"restart\");\n"
- " }\n"
- " \n"
- " static ssize_t vexpress_reset_active_show(struct device *dev,\n"
- " \t\tstruct device_attribute *attr, char *buf)\n"
- " {\n"
- "-\treturn sprintf(buf, \"%d\\n\", vexpress_restart_device == dev);\n"
- "+\tstruct platform_device *pdev;\n"
- "+\tenum reset_func func;\n"
- "+\n"
- "+\tpdev = container_of(dev, struct platform_device, dev);\n"
- "+\tfunc = vexpress_get_func(pdev);\n"
- "+\n"
- "+\treturn sprintf(buf, \"%d\\n\", isset_machine_reset(func, dev));\n"
- " }\n"
- " \n"
- " static ssize_t vexpress_reset_active_store(struct device *dev,\n"
- " \t\tstruct device_attribute *attr, const char *buf, size_t count)\n"
- " {\n"
- " \tlong value;\n"
- "+\tstruct platform_device *pdev;\n"
- " \tint err = kstrtol(buf, 0, &value);\n"
- " \n"
- "+\tpdev = container_of(dev, struct platform_device, dev);\n"
- "+\n"
- " \tif (!err && value)\n"
- "-\t\tvexpress_restart_device = dev;\n"
- "+\t\tvexpress_set_hook(pdev);\n"
- " \n"
- " \treturn err ? err : count;\n"
- " }\n"
- "@@ -90,7 +97,7 @@ static struct of_device_id vexpress_rese\n"
- " \t{}\n"
- " };\n"
- " \n"
- "-static int vexpress_reset_probe(struct platform_device *pdev)\n"
- "+static enum reset_func vexpress_get_func(struct platform_device *pdev)\n"
- " {\n"
- " \tenum reset_func func;\n"
- " \tconst struct of_device_id *match =\n"
- "@@ -101,23 +108,38 @@ static int vexpress_reset_probe(struct p\n"
- " \telse\n"
- " \t\tfunc = pdev->id_entry->driver_data;\n"
- " \n"
- "+\treturn func;\n"
- "+}\n"
- "+\n"
- "+static int vexpress_set_hook(struct platform_device *pdev)\n"
- "+{\n"
- "+\tenum reset_func func;\n"
- "+\tstruct reset_hook hook;\n"
- "+\n"
- "+\tfunc = vexpress_get_func(pdev);\n"
- "+\treset_hook_init(&hook);\n"
- "+\n"
- " \tswitch (func) {\n"
- " \tcase RESET_POWER_OFF:\n"
- "-\t\tvexpress_power_off_device = &pdev->dev;\n"
- "-\t\tpm_power_off = vexpress_power_off;\n"
- "+\t\thook.power_off = vexpress_power_off;\n"
- " \t\tbreak;\n"
- " \tcase RESET_RESTART:\n"
- "-\t\tvexpress_restart_device = &pdev->dev;\n"
- "-\t\tarm_pm_restart = vexpress_restart;\n"
- "+\t\thook.restart = vexpress_restart;\n"
- " \t\tdevice_create_file(&pdev->dev, &dev_attr_active);\n"
- " \t\tbreak;\n"
- " \tdefault:\n"
- " \t\treturn -EINVAL;\n"
- " \t};\n"
- " \n"
- "+\tset_machine_reset(func, &hook, &pdev->dev);\n"
- " \treturn 0;\n"
- " }\n"
- " \n"
- "+static int vexpress_reset_probe(struct platform_device *pdev)\n"
- "+{\n"
- "+\treturn vexpress_set_hook(pdev);\n"
- "+}\n"
- "+\n"
- " static const struct platform_device_id vexpress_reset_id_table[] = {\n"
- " \t{ .name = \"vexpress-reset\", .driver_data = RESET_RESTART, },\n"
- " \t{ .name = \"vexpress-shutdown\", .driver_data = RESET_POWER_OFF, },"
+ "An embedded and charset-unspecified text was scrubbed...\n"
+ "Name: arm-machine-reset-vexpress-hooks.patch\n"
+ URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131031/d00492e7/attachment.ksh>
 
-fe0b87392f70dae0f38fc2dc241c1e36ba63e00f8919d8bf87a3a97f6ef1d7b5
+e1781d4e40346d274eb0f4033fb6615dd9125d317829ee0f6fb326ba509ac9cb

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.