From patchwork Tue Jan 9 09:12:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jorge Ramirez-Ortiz, Gmail" X-Patchwork-Id: 123925 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3974202qgn; Tue, 9 Jan 2018 04:42:23 -0800 (PST) X-Google-Smtp-Source: ACJfBoudH4lD09jIde7sFFvK500Gki693hVmjYhlTLSCpMr6TWuyAfLaswwiYoel+gz3ltGMCRpj X-Received: by 10.80.217.76 with SMTP id u12mr20881755edj.171.1515501743666; Tue, 09 Jan 2018 04:42:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515501743; cv=none; d=google.com; s=arc-20160816; b=bT6kmf6Mafwl6z7eWWipvGNVbdrJoZ+wpdGFInonZkrqHes4MpKTpzsMn8zboYJEfE whIQrgkb5CuEPh8yfW9rfptil4u1fCRkWCzdNZ13Cxorp5rGHQ6jw0H29/JLqRD05izh 60wd0jjBFwiUsmIooh3sHS5vXsBabI3lRtS6aPSZNZbBEBWOfrPe2fb2em5DshWD9jkO S5A3UzDgqcWktUDjVOLY9zxHALoEhjsOkPfzPaLj/ZSFb7jZcMyLseXHfyu1+DN7w3GO Zh27sZ07boD3UEX3ppFgqJiBDiPjyrJWTBBkhOAo4tBU8OYbJdIonIiR38zfFymIOW3I xYIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:arc-authentication-results; bh=z7zcce7DfkfN7hJ5uwwa/VvowkMbgIsOG91lkHD7HFI=; b=j0X5uCvh9Qm+xY8SqhmAYOV/IQqzz6QxTnVGhFMTGzDdR4ZXPdgyEIDg1wzdIRfTWd OIKQc5Xp7jl+NQk9k1XYuz31vw7Mj/lUWbfA/v3WpzVzwM6GlF0MqTVTjB0GcYqrU8OE aywMUmBryZvpJj9oyzjyI13OdUXBIiix00gBqz2PZG3YGW9fx1Mc/SIkRSvPsUOxDT02 d30udP21uw2mBb9b92FQVjksUHrmbnDdCyDOtVWkPbKFGO3EhDzDJjaOmi6oMV/OaL9Z NsosFxwcxSzgBZCH+cjLOFRvmfaHfgWtUUJ4RyVfWzCRPfTgxTEMhbFAuD6Gn8+qe7+K fiGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YaEQhEM0; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id c20si1209350edn.174.2018.01.09.04.42.23; Tue, 09 Jan 2018 04:42:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YaEQhEM0; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: by lists.denx.de (Postfix, from userid 105) id 3F546C21FF6; Tue, 9 Jan 2018 12:39:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4D47AC21FD9; Tue, 9 Jan 2018 12:34:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E0114C22072; Tue, 9 Jan 2018 09:12:41 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by lists.denx.de (Postfix) with ESMTPS id 7CB86C21F98 for ; Tue, 9 Jan 2018 09:12:41 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id n9so3528245wrg.2 for ; Tue, 09 Jan 2018 01:12:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=monA3jbxXyj6wNoGgwanLr0xEIFPtxZFmbzD32Sg2Gc=; b=YaEQhEM0XIfe8Ci3Ewfbwrsf/zcgzzD3bq55GqOjpIreWkm0x1yau+wsvtRT6oNxmA 7ILJgpzilYYrfwcl/38HuasbBcKCkBghvASfdNmD5dGfOZX/LIqaHWG5rP34vfs9IE3R 9R69uynieKdrjAejbK8Rcpa46r+azXuOm5S3DY9bd/gkSMShdFainvbXAxGqK8I2Wanh NWrvRQy5+jPlm27ixZWRSxUc6C3TafjodzN5bHtLDgUItBXmuESzkz+28QgAXuXzTtbu Bj89aQ6dbIIDXcFyxCYM4TM51r9HCf6T4aMxBT9HfJic2hD/i7tI65PCXnTkKtucro1G RrVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=monA3jbxXyj6wNoGgwanLr0xEIFPtxZFmbzD32Sg2Gc=; b=bFvJao4CgDcLDWxSVUnTzCAGW0ECUbxE1XnY8TnZudDm98ZPELIsr4XzjZMXBworWk imC11CLYYgP2hn6uKgvVaGM2wec2ZB4MDdEgB4LrT7L+qN37JSXr1yFJhzQlCYygipO8 8YGfetA46jiIJ4WLX9aTkNzHzX34w+BtW4LOSc+ecrKYxThXCidV7qwPwWpvn8fHWZWI prkpKiqGz4rbw8Rj2y5+6K7qpt4KOd4/dSzT6ayW22c2G/z1EmdrgWrxyGJinqIWAFNo WJaq58R9SKYEaZbEmX5U782YE1fzpclDMf/t6Tl9efpMnV+dhagC7AbpT0KmwHlhcpwn s3UQ== X-Gm-Message-State: AKGB3mLBMgTgup7YLP6zkxVcfs29EMCSOSNVH7ujOUm4824C353V48Jt T6pEVSWY+EI5Q19zPoZaZjg= X-Received: by 10.223.188.75 with SMTP id a11mr13680438wrh.184.1515489161182; Tue, 09 Jan 2018 01:12:41 -0800 (PST) Received: from igloo.80.58.61.254 (141.pool85-51-114.dynamic.orange.es. [85.51.114.141]) by smtp.gmail.com with ESMTPSA id b8sm18496598wma.2.2018.01.09.01.12.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jan 2018 01:12:40 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez.ortiz@gmail.com, pbrobinson@gmail.com, u-boot@lists.denx.de Date: Tue, 9 Jan 2018 10:12:30 +0100 Message-Id: <1515489154-6946-3-git-send-email-jorge.ramirez.ortiz@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515489154-6946-1-git-send-email-jorge.ramirez.ortiz@gmail.com> References: <1515489154-6946-1-git-send-email-jorge.ramirez.ortiz@gmail.com> X-Mailman-Approved-At: Tue, 09 Jan 2018 12:34:32 +0000 Subject: [U-Boot] [PATCH 03/07] db410c: replace reset driver with psci X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Jorge Ramirez-Ortiz this should be the norm for armv8 platforms. Signed-off-by: Jorge Ramirez-Ortiz --- 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 --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 - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include - -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, -};