From patchwork Wed Jan 10 10:34:36 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: 124042 Delivered-To: patch@linaro.org Received: by 10.80.140.226 with SMTP id r31csp1491946edr; Wed, 10 Jan 2018 02:41:22 -0800 (PST) X-Google-Smtp-Source: ACJfBosLTlazmPT1cXqGTL6hgu5YtJItStbn1VoxR8CmunuiC39lu/9+zDe5aYgD6ljUiz+iYEbo X-Received: by 10.80.165.21 with SMTP id y21mr1002110edb.148.1515580882425; Wed, 10 Jan 2018 02:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515580882; cv=none; d=google.com; s=arc-20160816; b=Nu9ABXs7ps/YBZP1RR4dXLZLzrrSzrsKWn3aWZ/h3BmSmDM7+UjcsXFW7UmC5FeTbe BP7jl7PVevvdPQ1wYLIi7lM/tZV0zEjMTtDDV5bmbU4RYu3uiSXToy4+RT9qubyueiH6 pPnNpGqGD3LiiwtX9ufaZ4EYeGrRNJ/GpIrzF/Xnva52lxoZdO63Lf7jjKoLLpsI2CAl 3qnnrrPTMqhFGw/NseDGvYiirSGPGk1wjWraKxMRr/eZ7yCpO97UY1efJeN8Y0mgWH8R 6C/36ztZ3JJtSfiBoYIVMsYsLDuaO+D/WYdQUv8j+Gur//hePfP5Rq5Ipgtc5jOi3H0T l5OA== 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=MCKuVSG88D6N7QSbRiZVMiZcS1vvAaZwVSsSiTH4z/+6hyvSY5m9zBfJoMO6Knc4I7 EApb79h3eecQlehO8NCnDyAfxEJvYpwpKhatwGXTziDnL6XMyB6oKYGtB7YyxypO47vM x1W6bSwKE5rdqIfNyIqHAWLMbLJgEGuIKRTJCTFitmXYlngGPzSJpX8bIouG7PCm6vtF jF58d/yfd2OSAonhJVgTmKcrVGb4Lh0Y+V5wMxzYPOUWd6L6OVPwhGu3HtxdVcjm5+iB VRtQ8dzPXWcORrZMVCZcnynI7uLDYq6Nbbx7ixuLRwPyOLEVwqwZYvfhhBcBhLT5PHc2 VnUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ClspthgT; 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 k26si6571891edf.191.2018.01.10.02.41.22; Wed, 10 Jan 2018 02:41:22 -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=ClspthgT; 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 EAE8CC22174; Wed, 10 Jan 2018 10:41:20 +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 AE55CC21E0F; Wed, 10 Jan 2018 10:36:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6433FC2217D; Wed, 10 Jan 2018 10:34:58 +0000 (UTC) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by lists.denx.de (Postfix) with ESMTPS id BA481C22143 for ; Wed, 10 Jan 2018 10:34:51 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id z48so11154909wrz.6 for ; Wed, 10 Jan 2018 02:34:51 -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=ClspthgTz0t+7ILMuykoiOAzeJJGq4iTZdrVSLjrupSfICc+lz7TtRj0KPSf/gnqi/ FZWlhGCSOcR8/68QFcflmGdi3NltWMa9egtiC96HcydmP4xDisaS1qZenr8FiRpo0Vdk b75wv6xlgLtogPS223hwxm1uuY4ZX8aNRwxS87dkqjBOVQHkdjjTDZcBR2uTaB0gbEBA RVmEu1T+eI8/SvI2N3sdHkA1VfHamPdU87TRKAzRWT05aaByX0FxMPl+kM5rSwY1w5Ag dB91cU8oK7QDd/ev1BxfFIG5q/5hI9j56IDm4ijZNIB6foGwCfT/SZg2Q9/TV+yBWmwj ii5A== 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=WBjhxwhYkQ2KbKbKj5qJ98c0MYEuSAOw7xC58BU6EQThQRtIWuTidb/CgImfH60ZeX /1qR/zVZ4xZHicoEN5zl0rwlUrUuQ2PHalbdWyKYLi+CgqSxfE6BfzBUQLS75Gw92I+y MLzNQIGnJZ2Up6Bnu/EqQOJJIaSBp7ndYLJVt323Myig+dJjAr2NdXVx5DKBumYpm3U+ Cw0oIxoNQQmRWri626m8mqrPMNrdU7zqJHMHJ0TOxJz+nL+EpqkUWHkCsWTfpEKvBz8/ ERO9QvAyfZ5yexUuHFqdxEPqkC+67HnVC81VSA7arijCEASDwsNsXb6DcgYIrw5P3DOm nl9Q== X-Gm-Message-State: AKGB3mL1s9ue4c5WIb/AF1rVDTm8dBourqqfJi4bqKSMYpt/ac7v5Jbe 1bp8XVbMOXbAWBvKFaLUJVxRFw== X-Received: by 10.223.198.20 with SMTP id n20mr16086064wrg.191.1515580491233; Wed, 10 Jan 2018 02:34:51 -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 i33sm21484737wri.90.2018.01.10.02.34.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jan 2018 02:34:50 -0800 (PST) From: Jorge Ramirez-Ortiz To: u-boot@lists.denx.de Date: Wed, 10 Jan 2018 11:34:36 +0100 Message-Id: <1515580480-26075-3-git-send-email-jorge.ramirez.ortiz@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515580480-26075-1-git-send-email-jorge.ramirez.ortiz@gmail.com> References: <1515580480-26075-1-git-send-email-jorge.ramirez.ortiz@gmail.com> Subject: [U-Boot] [PATCH v1 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, -};