From patchwork Wed Mar 31 20:18:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1460710 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=i0M3QZHh; 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9d264nmKz9sRf for ; Thu, 1 Apr 2021 07:19:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D8EBE82786; Wed, 31 Mar 2021 22:19:07 +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="i0M3QZHh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DCF20828EB; Wed, 31 Mar 2021 22:19:03 +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 ABA8180462 for ; Wed, 31 Mar 2021 22:18:59 +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 a1so25397140ljp.2 for ; Wed, 31 Mar 2021 13:18:59 -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=f2265opa91sPyiRr1E9flsYtiFdQoqhm93Hsj+FTfF0=; b=i0M3QZHhD4iCClq714jdxtoApYex+ZrsKeJSsYsgvt6hcgPg5W1W+JYcrBdQMMZSM8 tSRhANOwc4AqxddyXmYOek8KS/SFB9dIX1vmCVeHTKvKFdkoHd0Y0yi4Qlw6ei7dgKkP rB8LClZyQQCJIDkoW42DETS5bxrS4/+fF1E1bnycyLknLI/2a14o1J3Yckr0Wu24/A2r w+2FQBgBAWM4dYZobMB4o1/HqfbPvRRvCvZKQZsS8ZsPXC3wmxqYtCWYCtaCw7/mtGUI bnRnD/w7m4G2jgL+9lMvlfJiHEw7oFFqnrDctzmFFYjN8Nhlm7t5rNh3FQc4avAKsi1d XJ0g== 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=f2265opa91sPyiRr1E9flsYtiFdQoqhm93Hsj+FTfF0=; b=BokJCUfRZoUFTh5Ceb1Y5l3MgIpGw/4D44kJV5phgF2eky2yEGwENyUvo90XIClJHr jfJ8U3YsO2bpp8OnBCs2UztQhXtBp1+6Ulz8/Ekg3sg0WISXlKIzBgMPkReLNXgJSRjP 0dzEcFQqo2PNgNblOlhNLlg/H6CYznStuJGPk3L5SZMZOokT/TXjp/sYlyu6uwWICEqg JJARklI8yFxvkrWSmKlmcHfOi3AZeuU1SMa2mJp2QeyNrIPtrAw6Xu5ZaxMuz+ZOKOTh edsznHOwytiFiTEQcPXR9nS/I58ddJ3tHBin5Pd3lDiEYFVjqeE0H69StUAGvU8H80nf fV+g== X-Gm-Message-State: AOAM531cmh2Z0l0QFcsVm6SNhcUC3eCSMoVudrTROdK3EZUd0BIH8xbF OyUI3+FB0yFGKKVNKEZ9D/8CobLrNEH5CsWC X-Google-Smtp-Source: ABdhPJzirQXYRsk54l4+jqclDcRmHTyU599cP7mu+nN+fHWAL+jl9UnqmrbcErUns6n4U2kUlgzuEA== X-Received: by 2002:a2e:b60d:: with SMTP id r13mr3184240ljn.30.1617221939023; Wed, 31 Mar 2021 13:18:59 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id j1sm321538lfu.47.2021.03.31.13.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 13:18:58 -0700 (PDT) From: Igor Opaniuk X-Google-Original-From: Igor Opaniuk To: u-boot@lists.denx.de Cc: xypron.glpk@gmx.de, ricardo@foundries.io, tim.anderson@foundries.io, mike@foundries.io, patrick.delaunay@foss.st.com, jorge@foundries.io, vanessa.maegima@foundries.io, daiane.angolini@foundries.io, Igor Opaniuk , Bin Meng , Jon Hunter , Masahiro Yamada , Michal Simek , Priyanka Jain , Simon Glass , Yann Gautier Subject: [RESEND PATCH v3 0/5] psci: add support for SYSTEM_RESET2 and PSCI_FEATURES Date: Wed, 31 Mar 2021 23:18:50 +0300 Message-Id: <20210331201855.1425276-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 (5): 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 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 | 31 ++++++++++++++ 7 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 doc/usage/reset.rst