diff mbox series

[03/07] db410c: replace reset driver with psci

Message ID 1515148197-30234-3-git-send-email-jorge.ramirez-ortiz@linaro.org
State Accepted
Commit 0689eb74700178d6e95b4c780a36473db8901453
Headers show
Series [01/07] db410c: configs: increase gunzip buffer size for the kernel | expand

Commit Message

Jorge Ramirez-Ortiz Jan. 5, 2018, 10:29 a.m. UTC
this should be the norm for armv8 platforms.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
 arch/arm/dts/dragonboard410c.dts                 |  5 ---
 board/qualcomm/dragonboard410c/dragonboard410c.c |  5 +++
 configs/dragonboard410c_defconfig                |  2 +-
 drivers/sysreset/Makefile                        |  2 --
 drivers/sysreset/sysreset_snapdragon.c           | 40 ------------------------
 5 files changed, 6 insertions(+), 48 deletions(-)
 delete mode 100644 drivers/sysreset/sysreset_snapdragon.c
diff mbox series

Patch

diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index 25aeac4..b67e588 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -48,11 +48,6 @@ 
 			clock = <&clkc 4>;
 		};
 
-		restart@4ab000 {
-			compatible = "qcom,pshold";
-			reg = <0x4ab000 0x4>;
-		};
-
 		soc_gpios: pinctrl@1000000 {
 			compatible = "qcom,apq8016-pinctrl";
 			reg = <0x1000000 0x300000>;
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 99fc91b..8ef4338 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -171,3 +171,8 @@  int ft_board_setup(void *blob, bd_t *bd)
 
 	return 0;
 }
+
+void reset_cpu(ulong addr)
+{
+	psci_system_reset();
+}
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index cfe9be9..de923ad 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -30,7 +30,6 @@  CONFIG_DM_PMIC=y
 CONFIG_PMIC_PM8916=y
 CONFIG_MSM_SERIAL=y
 CONFIG_SPMI_MSM=y
-CONFIG_SYSRESET=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
@@ -47,3 +46,4 @@  CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_OF_BOARD_SETUP=y
+CONFIG_PSCI_RESET=y
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
index 2e9598e..000c288 100644
--- a/drivers/sysreset/Makefile
+++ b/drivers/sysreset/Makefile
@@ -8,10 +8,8 @@  obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
 obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
 obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
 obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
-
 obj-$(CONFIG_ARCH_ROCKCHIP) += sysreset_rockchip.o
 obj-$(CONFIG_SANDBOX) += sysreset_sandbox.o
-obj-$(CONFIG_ARCH_SNAPDRAGON) += sysreset_snapdragon.o
 obj-$(CONFIG_ARCH_STI) += sysreset_sti.o
 obj-$(CONFIG_TARGET_XTFPGA) += sysreset_xtfpga.o
 obj-$(CONFIG_ARCH_ASPEED) += sysreset_ast.o
diff --git a/drivers/sysreset/sysreset_snapdragon.c b/drivers/sysreset/sysreset_snapdragon.c
deleted file mode 100644
index 9869813..0000000
--- a/drivers/sysreset/sysreset_snapdragon.c
+++ /dev/null
@@ -1,40 +0,0 @@ 
-/*
- * Qualcomm APQ8016 reset controller driver
- *
- * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#include <common.h>
-#include <dm.h>
-#include <errno.h>
-#include <sysreset.h>
-#include <asm/io.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static int msm_sysreset_request(struct udevice *dev, enum sysreset_t type)
-{
-	phys_addr_t addr = devfdt_get_addr(dev);
-	if (!addr)
-		return -EINVAL;
-	writel(0, addr);
-	return -EINPROGRESS;
-}
-
-static struct sysreset_ops msm_sysreset_ops = {
-	.request	= msm_sysreset_request,
-};
-
-static const struct udevice_id msm_sysreset_ids[] = {
-	{ .compatible = "qcom,pshold" },
-	{ }
-};
-
-U_BOOT_DRIVER(msm_reset) = {
-	.name		= "msm_sysreset",
-	.id		= UCLASS_SYSRESET,
-	.of_match	= msm_sysreset_ids,
-	.ops		= &msm_sysreset_ops,
-};