mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] power/reset: remove zte zx driver
@ 2021-01-20 15:08 Arnd Bergmann
  2021-01-28  0:18 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-01-20 15:08 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Arnd Bergmann, Jun Nie, Shawn Guo, linux-kernel, linux-pm

From: Arnd Bergmann <arnd@arndb.de>

The zte zx platform is getting removed, so this driver is no
longer needed.

Cc: Jun Nie <jun.nie@linaro.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/reset/Kconfig     |  7 ---
 drivers/power/reset/Makefile    |  1 -
 drivers/power/reset/zx-reboot.c | 86 ---------------------------------
 3 files changed, 94 deletions(-)
 delete mode 100644 drivers/power/reset/zx-reboot.c

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index b22c4fdb2561..0376a90bec09 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -251,13 +251,6 @@ config POWER_RESET_RMOBILE
 	help
 	  Reboot support for Renesas R-Mobile and SH-Mobile SoCs.
 
-config POWER_RESET_ZX
-	tristate "ZTE SoCs reset driver"
-	depends on ARCH_ZX || COMPILE_TEST
-	depends on HAS_IOMEM
-	help
-	  Reboot support for ZTE SoCs.
-
 config REBOOT_MODE
 	tristate
 
diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile
index 9dc49d3a57ff..46331119c886 100644
--- a/drivers/power/reset/Makefile
+++ b/drivers/power/reset/Makefile
@@ -29,7 +29,6 @@ obj-$(CONFIG_POWER_RESET_KEYSTONE) += keystone-reset.o
 obj-$(CONFIG_POWER_RESET_SYSCON) += syscon-reboot.o
 obj-$(CONFIG_POWER_RESET_SYSCON_POWEROFF) += syscon-poweroff.o
 obj-$(CONFIG_POWER_RESET_RMOBILE) += rmobile-reset.o
-obj-$(CONFIG_POWER_RESET_ZX) += zx-reboot.o
 obj-$(CONFIG_REBOOT_MODE) += reboot-mode.o
 obj-$(CONFIG_SYSCON_REBOOT_MODE) += syscon-reboot-mode.o
 obj-$(CONFIG_POWER_RESET_SC27XX) += sc27xx-poweroff.o
diff --git a/drivers/power/reset/zx-reboot.c b/drivers/power/reset/zx-reboot.c
deleted file mode 100644
index 457950833dba..000000000000
--- a/drivers/power/reset/zx-reboot.c
+++ /dev/null
@@ -1,86 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * ZTE zx296702 SoC reset code
- *
- * Copyright (c) 2015 Linaro Ltd.
- *
- * Author: Jun Nie <jun.nie@linaro.org>
- */
-
-#include <linux/delay.h>
-#include <linux/io.h>
-#include <linux/module.h>
-#include <linux/notifier.h>
-#include <linux/of_address.h>
-#include <linux/platform_device.h>
-#include <linux/reboot.h>
-
-static void __iomem *base;
-static void __iomem *pcu_base;
-
-static int zx_restart_handler(struct notifier_block *this,
-			      unsigned long mode, void *cmd)
-{
-	writel_relaxed(1, base + 0xb0);
-	writel_relaxed(1, pcu_base + 0x34);
-
-	mdelay(50);
-	pr_emerg("Unable to restart system\n");
-
-	return NOTIFY_DONE;
-}
-
-static struct notifier_block zx_restart_nb = {
-	.notifier_call = zx_restart_handler,
-	.priority = 128,
-};
-
-static int zx_reboot_probe(struct platform_device *pdev)
-{
-	struct device_node *np = pdev->dev.of_node;
-	int err;
-
-	base = of_iomap(np, 0);
-	if (!base) {
-		WARN(1, "failed to map base address");
-		return -ENODEV;
-	}
-
-	np = of_find_compatible_node(NULL, NULL, "zte,zx296702-pcu");
-	pcu_base = of_iomap(np, 0);
-	of_node_put(np);
-	if (!pcu_base) {
-		iounmap(base);
-		WARN(1, "failed to map pcu_base address");
-		return -ENODEV;
-	}
-
-	err = register_restart_handler(&zx_restart_nb);
-	if (err) {
-		iounmap(base);
-		iounmap(pcu_base);
-		dev_err(&pdev->dev, "Register restart handler failed(err=%d)\n",
-			err);
-	}
-
-	return err;
-}
-
-static const struct of_device_id zx_reboot_of_match[] = {
-	{ .compatible = "zte,sysctrl" },
-	{}
-};
-MODULE_DEVICE_TABLE(of, zx_reboot_of_match);
-
-static struct platform_driver zx_reboot_driver = {
-	.probe = zx_reboot_probe,
-	.driver = {
-		.name = "zx-reboot",
-		.of_match_table = zx_reboot_of_match,
-	},
-};
-module_platform_driver(zx_reboot_driver);
-
-MODULE_DESCRIPTION("ZTE SoCs reset driver");
-MODULE_AUTHOR("Jun Nie <jun.nie@linaro.org>");
-MODULE_LICENSE("GPL v2");
-- 
2.29.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] power/reset: remove zte zx driver
  2021-01-20 15:08 [PATCH] power/reset: remove zte zx driver Arnd Bergmann
@ 2021-01-28  0:18 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2021-01-28  0:18 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Arnd Bergmann, Jun Nie, Shawn Guo, linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 4284 bytes --]

Hi,

On Wed, Jan 20, 2021 at 04:08:26PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The zte zx platform is getting removed, so this driver is no
> longer needed.
> 
> Cc: Jun Nie <jun.nie@linaro.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/reset/Kconfig     |  7 ---
>  drivers/power/reset/Makefile    |  1 -
>  drivers/power/reset/zx-reboot.c | 86 ---------------------------------
>  3 files changed, 94 deletions(-)
>  delete mode 100644 drivers/power/reset/zx-reboot.c
> 
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index b22c4fdb2561..0376a90bec09 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -251,13 +251,6 @@ config POWER_RESET_RMOBILE
>  	help
>  	  Reboot support for Renesas R-Mobile and SH-Mobile SoCs.
>  
> -config POWER_RESET_ZX
> -	tristate "ZTE SoCs reset driver"
> -	depends on ARCH_ZX || COMPILE_TEST
> -	depends on HAS_IOMEM
> -	help
> -	  Reboot support for ZTE SoCs.
> -
>  config REBOOT_MODE
>  	tristate
>  
> diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile
> index 9dc49d3a57ff..46331119c886 100644
> --- a/drivers/power/reset/Makefile
> +++ b/drivers/power/reset/Makefile
> @@ -29,7 +29,6 @@ obj-$(CONFIG_POWER_RESET_KEYSTONE) += keystone-reset.o
>  obj-$(CONFIG_POWER_RESET_SYSCON) += syscon-reboot.o
>  obj-$(CONFIG_POWER_RESET_SYSCON_POWEROFF) += syscon-poweroff.o
>  obj-$(CONFIG_POWER_RESET_RMOBILE) += rmobile-reset.o
> -obj-$(CONFIG_POWER_RESET_ZX) += zx-reboot.o
>  obj-$(CONFIG_REBOOT_MODE) += reboot-mode.o
>  obj-$(CONFIG_SYSCON_REBOOT_MODE) += syscon-reboot-mode.o
>  obj-$(CONFIG_POWER_RESET_SC27XX) += sc27xx-poweroff.o
> diff --git a/drivers/power/reset/zx-reboot.c b/drivers/power/reset/zx-reboot.c
> deleted file mode 100644
> index 457950833dba..000000000000
> --- a/drivers/power/reset/zx-reboot.c
> +++ /dev/null
> @@ -1,86 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0-only
> -/*
> - * ZTE zx296702 SoC reset code
> - *
> - * Copyright (c) 2015 Linaro Ltd.
> - *
> - * Author: Jun Nie <jun.nie@linaro.org>
> - */
> -
> -#include <linux/delay.h>
> -#include <linux/io.h>
> -#include <linux/module.h>
> -#include <linux/notifier.h>
> -#include <linux/of_address.h>
> -#include <linux/platform_device.h>
> -#include <linux/reboot.h>
> -
> -static void __iomem *base;
> -static void __iomem *pcu_base;
> -
> -static int zx_restart_handler(struct notifier_block *this,
> -			      unsigned long mode, void *cmd)
> -{
> -	writel_relaxed(1, base + 0xb0);
> -	writel_relaxed(1, pcu_base + 0x34);
> -
> -	mdelay(50);
> -	pr_emerg("Unable to restart system\n");
> -
> -	return NOTIFY_DONE;
> -}
> -
> -static struct notifier_block zx_restart_nb = {
> -	.notifier_call = zx_restart_handler,
> -	.priority = 128,
> -};
> -
> -static int zx_reboot_probe(struct platform_device *pdev)
> -{
> -	struct device_node *np = pdev->dev.of_node;
> -	int err;
> -
> -	base = of_iomap(np, 0);
> -	if (!base) {
> -		WARN(1, "failed to map base address");
> -		return -ENODEV;
> -	}
> -
> -	np = of_find_compatible_node(NULL, NULL, "zte,zx296702-pcu");
> -	pcu_base = of_iomap(np, 0);
> -	of_node_put(np);
> -	if (!pcu_base) {
> -		iounmap(base);
> -		WARN(1, "failed to map pcu_base address");
> -		return -ENODEV;
> -	}
> -
> -	err = register_restart_handler(&zx_restart_nb);
> -	if (err) {
> -		iounmap(base);
> -		iounmap(pcu_base);
> -		dev_err(&pdev->dev, "Register restart handler failed(err=%d)\n",
> -			err);
> -	}
> -
> -	return err;
> -}
> -
> -static const struct of_device_id zx_reboot_of_match[] = {
> -	{ .compatible = "zte,sysctrl" },
> -	{}
> -};
> -MODULE_DEVICE_TABLE(of, zx_reboot_of_match);
> -
> -static struct platform_driver zx_reboot_driver = {
> -	.probe = zx_reboot_probe,
> -	.driver = {
> -		.name = "zx-reboot",
> -		.of_match_table = zx_reboot_of_match,
> -	},
> -};
> -module_platform_driver(zx_reboot_driver);
> -
> -MODULE_DESCRIPTION("ZTE SoCs reset driver");
> -MODULE_AUTHOR("Jun Nie <jun.nie@linaro.org>");
> -MODULE_LICENSE("GPL v2");
> -- 
> 2.29.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-28  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 15:08 [PATCH] power/reset: remove zte zx driver Arnd Bergmann
2021-01-28  0:18 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome