summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-01-20 16:08:26 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-01-25 01:00:06 +0100
commit9483b961ad085fbacee2f69f11411a6134c00f22 (patch)
tree8a8d372e109db7e74d231fbf655df67b7cfa14f1 /drivers/power
parent79bcb02b20ff308b1ccbf9617d1af890e5b58e12 (diff)
downloadlinux-9483b961ad085fbacee2f69f11411a6134c00f22.tar.bz2
power/reset: remove zte zx driver
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> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/reset/Kconfig7
-rw-r--r--drivers/power/reset/Makefile1
-rw-r--r--drivers/power/reset/zx-reboot.c86
3 files changed, 0 insertions, 94 deletions
diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 1737e227b16e..4d1192062508 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -258,13 +258,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 b4601c0a96ed..4f959b697606 100644
--- a/drivers/power/reset/Makefile
+++ b/drivers/power/reset/Makefile
@@ -30,7 +30,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");