From patchwork Wed Mar 31 20:16:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1460701 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=85.214.62.61; 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=SgHIIfGP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4F9czd6p5Wz9sRf for ; Thu, 1 Apr 2021 07:17:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EDD39828EB; Wed, 31 Mar 2021 22:16:54 +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="SgHIIfGP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BFA3C828E1; Wed, 31 Mar 2021 22:16:50 +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-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 7870880462 for ; Wed, 31 Mar 2021 22:16:46 +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-x231.google.com with SMTP id 184so25346441ljf.9 for ; Wed, 31 Mar 2021 13:16:46 -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=8Xd+2L5bP8TqtbR+yEs+v21+Qs63C3r73RUR3mYtQB8=; b=SgHIIfGPDHdihbjJlQHNkzH7TwElN9Jxoz/rt0WEPUIiKiAgBKuUbKt3ABeo6Yp9FS 03KmCMTi+cuNJqslaGCrqeYa/ypLZpwnV4+el5/MsgtPAuDt/F8uU2tRVYnse8NP5TVQ M2iUGI/1hMF/2pSsHyAGn94NTQHeIyFVB8EhmPcuAPOy+GgGAUCl3O/20vijueLlGXr4 r5sRYH5+M1SNYtM6ElSed57v676w76yJ1j4XEj2ZuKLfGBxCoZ0i6j3vCVn1jY/rjF0r MQ12hne4fJneweh07afgrP8m+tpZwzXZVGRuosTZ34A4KZQwqSPBzH/fAh9MLRnwSiEk Vmtw== 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=8Xd+2L5bP8TqtbR+yEs+v21+Qs63C3r73RUR3mYtQB8=; b=QmcwCYZ4E/SotQ6wWk+lodPyt/GYcd+DBRXy83SCFMQ5PEGf+yIo6gPKcScq9nnIhb +St1gSnc5ktWk15JfeHxXGBntLhfZFZ8L7eSVv7r5bJ9wqCyLxqnPz88X6GSwvrhx2b4 JSGQeho6H/dECX9rXGtOwtTdithBMlZzKtvKGQEA6rbzzeGcMka2QfHWqS41VrxC5yvw Q7sZJ7w0BNL1sSPTGpzIx7/6rQ5PLV3NnUstkShN+df+scF5V0T2VVo292Rur/yiIGsX 9QSww1TlH6/ofXY0qTULbPRa5rYh9qI2oXCgKJO6ZUNxpPiTmnFTu9xojp8Kurl+0h+x PDIA== X-Gm-Message-State: AOAM533GLUymbn46cx/QvbYgBo1U/ERPxUatr6CYSktOHkuq6B6GbtdJ VzujC6LAW/mRdxtJ9lnCcxm5uXdniHtPzcWZ X-Google-Smtp-Source: ABdhPJwzO7fvORzGNommoyBi1Fi4n58Nk7lskuxBXrcLTKBMcf6fIrvpwLcQcxEaFgBSqnos1SgysQ== X-Received: by 2002:a2e:965a:: with SMTP id z26mr3228340ljh.10.1617221805659; Wed, 31 Mar 2021 13:16:45 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id k2sm321488lfm.174.2021.03.31.13.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 13:16:45 -0700 (PDT) From: Igor Opaniuk X-Google-Original-From: Igor Opaniuk To: u-boot@lists.denx.de Cc: jorge@foundries.io, patrick.delaunay@foss.st.com, daiane.angolini@foundries.io, vanessa.maegima@foundries.io, ricardo@foundries.io, xypron.glpk@gmx.de, mike@foundries.io, tim.anderson@foundries.io, Igor Opaniuk , Bin Meng , Jon Hunter , Masahiro Yamada , Michal Simek , Priyanka Jain , Simon Glass , Yann Gautier Subject: [PATCH v3 0/4] psci: add support for SYSTEM_RESET2 and PSCI_FEATURES Date: Wed, 31 Mar 2021 23:16:37 +0300 Message-Id: <20210331201641.1422171-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=20&view=results Changes in v3: - Drop RFC tag - Add usage doc for reset cmd - Reimplement param handling for reset cmd - Droped updates in reset usage string Changes in v2: - do_reset cmd updates Igor Opaniuk (4): psci: add features/reset2 support sysreset: psci: use psci driver exported functions sysreset: provide type of reset in do_reset cmd doc: usage: add usage details for reset cmd cmd/boot.c | 2 +- doc/usage/index.rst | 1 + doc/usage/reset.rst | 26 ++++++++++++ drivers/firmware/psci.c | 68 ++++++++++++++++++++++++++++++ drivers/sysreset/sysreset-uclass.c | 11 ++++- drivers/sysreset/sysreset_psci.c | 8 +--- include/linux/psci.h | 3 ++ 7 files changed, 111 insertions(+), 8 deletions(-) create mode 100644 doc/usage/reset.rst