From patchwork Tue Mar 30 21:16:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1460252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=gPW7N8Uv; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F92Mk2FHRz9sW0 for ; Wed, 31 Mar 2021 08:17:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 80D7682974; Tue, 30 Mar 2021 23:17:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="gPW7N8Uv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 39E7D8296F; Tue, 30 Mar 2021 23:17:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EFE5E82957 for ; Tue, 30 Mar 2021 23:17:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@foundries.io Received: by mail-lj1-x235.google.com with SMTP id y1so21414476ljm.10 for ; Tue, 30 Mar 2021 14:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RJqPdiF6OBDbuJocQG72XrUUWjuaZogV4rGuG1RyKkE=; b=gPW7N8UvvrFFVdgjpFTiggximRSFuTB0NayqLU2Zk3lN/tofA6qwUL2+QmjMcjDYPO iotRzOUpWMxzUfQWvwhsaoOeCaot0ndxK3qVg8RQWJji5j5snZwtXj6ka9gxeV3vQHhx Y0ebjbiDdK6JiTRZ87296NR+4YMx3o88lC/A8ZSoBeoJfuEHbDDM4twiSKbId2whUX39 V/6pnGfVy7zB6WCF8Y1tDhz/EeJLsa4SWNSqvwvjQdX6LPAd+1VokBT90l/dd8PkvYPw /hD0/3UqzlI9SM5uSaPkv3oQS+Jokiy9mYXM/UeR51eXgSzVZKnmbhslftFrNOs/hylj dJHg== 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:mime-version :content-transfer-encoding; bh=RJqPdiF6OBDbuJocQG72XrUUWjuaZogV4rGuG1RyKkE=; b=WZNWN04a/wT+fVLe/Zkah98GBSl52cxrquFX/5YL8BlkeAc858AfxKULu7kI+v1Vtj Jhffl7HC0TVXReDyYISxdNLxcTsz5FuBcXx2C9Ji/hHkiEIYBKgb5OKs8ca09V66qawk TrUXUDjjdLJ915s/fPxt9pE+E/58A/2FPtnjyVpRX4otPmZqv125cJQsgmkTdxPtd1JD k9rkOinw2YbBZ+1VEng19+amDqTVWqzcmAcWxKQKx/9mt8P4B80kp0D5zhvKsuH+fAdp ch4PSF3LK5xbTMxnMS0VcMX5nneqn3deh2Og/QXE25OtXq+SGv5ifteLrCDhrosuUiBk Ocnw== X-Gm-Message-State: AOAM533SvU4gNZqh7Wdl3vK1K1lhEDso5pgLIMV7QEP3+HFqC/P2dAv9 n4B+G50Mxz0hSGFMDdGGuIeyN54Xm85yMnvv X-Google-Smtp-Source: ABdhPJwK9xvav7JznxwmvlFw0tDiBqUAJtR/ij89s/fxiWZUnzoWb71oXcNbHjkmAj2JK+HUc0ISMA== X-Received: by 2002:a2e:b0f2:: with SMTP id h18mr85680ljl.396.1617139024104; Tue, 30 Mar 2021 14:17:04 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id p13sm2896422ljg.116.2021.03.30.14.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 14:17:03 -0700 (PDT) From: Igor Opaniuk X-Google-Original-From: Igor Opaniuk To: u-boot@lists.denx.de Cc: jorge@foundries.io, mike@foundries.io, ricardo@foundries.io, vanessa.maegima@foundries.io, tim.anderson@foundries.io, daiane.angolini@foundries.io, Igor Opaniuk , Bin Meng , Heinrich Schuchardt , Jon Hunter , Masahiro Yamada , Michal Simek , Patrick Delaunay , Priyanka Jain , Simon Glass , Yann Gautier Subject: [RFC PATCH v2 0/4] psci: add support for SYSTEM_RESET2 and PSCI_FEATURES Date: Wed, 31 Mar 2021 00:16:55 +0300 Message-Id: <20210330211659.1260518-1-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean From: Igor Opaniuk 1. Adds support for: * PSCI_FEATURES, introduced in PSCI 1.0. This provides API that allows discovering whether a specific PSCI function is implemented and its features. * SYSTEM_RESET2, introduced in PSCI 1.1, which extends existing SYSTEM_RESET. It provides support for vendor-specific resets, providing reset_type as an additional param. 2. PSCI sysreset driver is refactored to use new API. 3. do_reset cmd is extended, optional param added for providing type of reset CI: https://dev.azure.com/igoropaniuk/u-boot/_build/results?buildId=19&view=results v2: - do_reset cmd updates Igor Opaniuk (4): psci: add v1.0/v1.1 definitions from Linux psci: add features/reset2 support sysreset: psci: use psci driver exported functions sysreset: provide type of reset in do_reset cmd cmd/boot.c | 6 ++- drivers/firmware/psci.c | 70 ++++++++++++++++++++++++++++++ drivers/sysreset/sysreset-uclass.c | 23 +++++++++- drivers/sysreset/sysreset_psci.c | 8 +--- include/linux/psci.h | 31 +++++++++++++ 5 files changed, 130 insertions(+), 8 deletions(-)