From patchwork Fri Jan 5 10:29:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 123498 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp640270qgn; Fri, 5 Jan 2018 02:39:31 -0800 (PST) X-Google-Smtp-Source: ACJfBosFq9tf2Bc68HY6MUQb+XZE5gP245HCrmM+xOk2t7WDo2Dmz3iX5FMHRHV21asKrF3GQvku X-Received: by 10.80.180.18 with SMTP id b18mr3496611edh.260.1515148771358; Fri, 05 Jan 2018 02:39:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515148771; cv=none; d=google.com; s=arc-20160816; b=LBuljBexSrA7zn0A3qK2lvKJSC4tqLVOxP1vtCTnA216+rs39XFxqwg3UKutDtrhm5 urB1kdkoxd+rN4V3ZGufnTqeKgsuopFCykpheNRAxMryvlUOUd8AvyvjOu0ZyvQn4jsJ apPxYOeJNU9KnO2u/sjPi6Mkon3d1Fg3zqI0LUW9CX5D4XRWrk1RXkuAJD+krHLCRh/Q 2UDryBozkpEDotTxxqeAFanXVScOz4zDKI6dgsM4V7xkhg9uGsBF6kb0xZLxTadrl86E wSw1WFaIbTEcNunDC3udlQCnSDVcKmHkHIf9XhrbXFKk6NCHLv1zgqX7anFXd742zKb8 5taQ== 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=gQVu+WyqdqBt9OsAfiIbI8mucXO9GteOZPDn6M7CK2o=; b=wSkB4QYT7R8xY1E4Dg5Rc4luNGir4h2zgw3gtCUISZx8Jd18fmdjc1cuxuRqmJ7veX LpwHsd3kqTQuTsNGe42kNm6wxEo5HrqnfrZH/6QVRUldU2HQHexW1M32u5OuswFhQuDJ Uyn8d+WabFb7j00xneeRXD0UY4bkI//xgrSHE9+5SoChUIvlfZ2Wa5Q5OJqaQ6GrUW6w hGtUGi24kDsrdjbNHLjOtoDPLtNZlzFEjdBuau/pKwqtHldjB1cngCk1w81LpKgRZ1TU CJgaGMhvMpRYeL8UthEZkGfbhFuVkYsp6DFECaizrh6TIsqoQNBEGi/vT6WCyDeGKEZl NOqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TNl1MGFW; 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=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 94si1489507edo.485.2018.01.05.02.39.31; Fri, 05 Jan 2018 02:39:31 -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=@linaro.org header.s=google header.b=TNl1MGFW; 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=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id EA324C21E3E; Fri, 5 Jan 2018 10:36:27 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 E1637C21E64; Fri, 5 Jan 2018 10:31:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 06443C21E31; Fri, 5 Jan 2018 10:31:34 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 1AF63C21EAE for ; Fri, 5 Jan 2018 10:30:05 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id g75so1597094wme.0 for ; Fri, 05 Jan 2018 02:30:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jdlN9v1ai5qwPJoq4mJk4OLXHYNPr+A+MIMueHLys20=; b=TNl1MGFWVeG1HyksGxQ7fIW+yNMjKMuLdPEhRVJubjA0FSwJ/TYaTsqhvdbEl97Upv Dh8Du5JY+AO0nTiUVarfrfrenNIhsiDxGl7U0fvOZGtJAItB5WWVMBCan0TkzN40jxPU AYodBV+vP6ePGiF8wVlrSbLIbqAf5VRemQETg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jdlN9v1ai5qwPJoq4mJk4OLXHYNPr+A+MIMueHLys20=; b=qaDJP3A8voMWrxclDw7IJl9xkmgtd6Wt9+gYUly3LlQ/6YjmW87z94PjW01vF+vc8f pSvDg1g1dbUoSCy8V4g6Qd2zy0oLBpEeh0xcj0gLJL8nKcCEFNXrQmnLIZqHqUTm5wfh 2IW/s0H7BxNisZ/ENe92ANTvP4UNR+HpjQYdiyQ3iZeQuJkbsJszr3azOaFhlFj0m/VF Iw+j/9TG7zSMW+X8fsmo3v4MMpm+7UnAUMHew9Jq6QwdJkBIrnzhWBHrFlKtwcaNxp4U JXsguLp/c9u/6zYnJ2K3VOOJdda+Wx71Do4bg2s/oBOeh7CrCOXSXwLTRDxKQfBZXzx7 7YAg== X-Gm-Message-State: AKGB3mIk9opLgg4p6bsa+ofPM85aKuB0tfbYZMQxHnQU+XZMxvnLvIW9 TUdrvzAOMoD9Ap6NZKsl55yiXw== X-Received: by 10.28.1.196 with SMTP id 187mr2077961wmb.154.1515148204594; Fri, 05 Jan 2018 02:30:04 -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 w40sm3719020wrc.79.2018.01.05.02.30.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jan 2018 02:30:03 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, u-boot@lists.denx.de Date: Fri, 5 Jan 2018 11:29:53 +0100 Message-Id: <1515148197-30234-3-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515148197-30234-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1515148197-30234-1-git-send-email-jorge.ramirez-ortiz@linaro.org> 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" 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, -};