]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
db410c: replace reset driver with psci
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Wed, 10 Jan 2018 10:34:36 +0000 (11:34 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 15 Jan 2018 21:29:03 +0000 (16:29 -0500)
this should be the norm for armv8 platforms.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
arch/arm/dts/dragonboard410c.dts
board/qualcomm/dragonboard410c/dragonboard410c.c
configs/dragonboard410c_defconfig
drivers/sysreset/Makefile
drivers/sysreset/sysreset_snapdragon.c [deleted file]

index 25aeac46b132f408a26590797ff21ad972140c75..b67e58882a90f3ddfd553784140bc58139c687d7 100644 (file)
                        clock = <&clkc 4>;
                };
 
-               restart@4ab000 {
-                       compatible = "qcom,pshold";
-                       reg = <0x4ab000 0x4>;
-               };
-
                soc_gpios: pinctrl@1000000 {
                        compatible = "qcom,apq8016-pinctrl";
                        reg = <0x1000000 0x300000>;
index 7daf7c8b52fb5f1fc18047487b622a0c3bdd52f6..b9bf55ba31e53bb0ab7d990ec251b588533d8165 100644 (file)
@@ -171,3 +171,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
        return 0;
 }
+
+void reset_cpu(ulong addr)
+{
+       psci_system_reset();
+}
index cfe9be97f35be241c9420ca1d57cedb9a1ba38b4..de923adbc3d435a1bd74db6821aea6371cd1426b 100644 (file)
@@ -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
index 2e9598e300d7d6ebf827e8be12b87e106f225d35..000c288eebc7172021c874a48abbbeb15b26ba6e 100644 (file)
@@ -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 (file)
index 9869813..0000000
+++ /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,
-};