From patchwork Wed Mar 31 20:18:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1460711 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=ZD9v6LAp; 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9d2G4h65z9sRf for ; Thu, 1 Apr 2021 07:19:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1FDCA828FB; Wed, 31 Mar 2021 22:19:14 +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="ZD9v6LAp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E0BD828EE; Wed, 31 Mar 2021 22:19:06 +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,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 EB1E581FBA for ; Wed, 31 Mar 2021 22:19:00 +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-lf1-x12d.google.com with SMTP id w28so9957801lfn.2 for ; Wed, 31 Mar 2021 13:19:00 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=eDmNGR8l48uqqQIOud4GGqMfVh64gM50CSV4bqw2CEw=; b=ZD9v6LApWLFmHrEN4Q7Io4B0gglU+P7tpwtvBpzevf20kRChP8XnSBMCpdVWo5UbtY R4a5oDPnSylg6Jqr+SemG7f8EgANEY7etXSgaUk65q/G1bFleS+RrxUcsgJvkIrRG8H+ 7MaZSeDfzvwW8NGyvPxWK3skQnLyOKYWRQzqgdpCD+sLccZm0Vc+JcAnDA4rzO1b89iK RK863lgNs6HLg2d/cDTTB63VTQ18wCpxOkEdvQwqMsMmwqux9P2dG0w6Zkh30GrrmuuN NzHnH/pEvT4IPA9zcrOiKM9vEeX0f+vrJzXZHfk8h49c16GbwDO5abpd4B3YdxtOTSaA /jpA== 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:mime-version:content-transfer-encoding; bh=eDmNGR8l48uqqQIOud4GGqMfVh64gM50CSV4bqw2CEw=; b=qpJyXPqgBsw75yzn1ucINOaUGxhWlWH7r2Rsq7FFaHOZ2E5CQ/ERZcOR7/iMH5eD/0 o+Ik2Si80psv1vir0BmEDgMXIhyYJoignNfc4/Fg1BhhYi/q91lRGGBQqpmbFDAAZMjY 0qgnan3wrZLQ6MGohznvFvajklv7uSA0RN2F6JD0Mu57us1C4NqmtVFoe4WnatNw7A78 pSxw4A2TpGziETql4iEPAnuqvFJK0keC2hnlGx+yru2Cd0s2jhtRXst3NI/Zf1Sj7HwD t7DbuNtLakLFLlpBUQPOTAYV0JXXv8TENQezRK6eK6qNCjS+rVtf14f1gCbBshK417/P oMnA== X-Gm-Message-State: AOAM532IbhGIO1o5tkdkPrJcUbHclgvqG4f/CFPm62qLi2hH0gC5A0cz Le+HiuDQthTL6l5Rg7wW7SG79ruu26nR/7Hb X-Google-Smtp-Source: ABdhPJyyiw8/WjsTggfocGYnfk+hCwkbpOsYwJ611tzWrV5oT92PIrc1QjP6ekBT9wNo0SdixZamGA== X-Received: by 2002:a19:2216:: with SMTP id i22mr3136398lfi.57.1617221940189; Wed, 31 Mar 2021 13:19:00 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id y22sm353212ljg.32.2021.03.31.13.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 13:18:59 -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 , Masahiro Yamada Subject: [RESEND PATCH v3 1/5] psci: add v1.0/v1.1 definitions from Linux Date: Wed, 31 Mar 2021 23:18:51 +0300 Message-Id: <20210331201855.1425276-2-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331201855.1425276-1-igor.opaniuk@gmail.com> References: <20210331201855.1425276-1-igor.opaniuk@gmail.com> 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 Sync and add PSCI API versions 1.0/1.1 definitions from Linux. Signed-off-by: Igor Opaniuk --- include/linux/psci.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/linux/psci.h b/include/linux/psci.h index 841dbc8da7..38edde3137 100644 --- a/include/linux/psci.h +++ b/include/linux/psci.h @@ -46,6 +46,14 @@ #define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5) #define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7) +#define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10) +#define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14) +#define PSCI_1_0_FN_SET_SUSPEND_MODE PSCI_0_2_FN(15) +#define PSCI_1_1_FN_SYSTEM_RESET2 PSCI_0_2_FN(18) + +#define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) +#define PSCI_1_1_FN64_SYSTEM_RESET2 PSCI_0_2_FN64(18) + /* PSCI v0.2 power state encoding for CPU_SUSPEND function */ #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff #define PSCI_0_2_POWER_STATE_ID_SHIFT 0 @@ -56,6 +64,13 @@ #define PSCI_0_2_POWER_STATE_AFFL_MASK \ (0x3 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) +/* PSCI extended power state encoding for CPU_SUSPEND function */ +#define PSCI_1_0_EXT_POWER_STATE_ID_MASK 0xfffffff +#define PSCI_1_0_EXT_POWER_STATE_ID_SHIFT 0 +#define PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT 30 +#define PSCI_1_0_EXT_POWER_STATE_TYPE_MASK \ + (0x1 << PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT) + /* PSCI v0.2 affinity level state returned by AFFINITY_INFO */ #define PSCI_0_2_AFFINITY_LEVEL_ON 0 #define PSCI_0_2_AFFINITY_LEVEL_OFF 1 @@ -75,6 +90,18 @@ (((ver) & PSCI_VERSION_MAJOR_MASK) >> PSCI_VERSION_MAJOR_SHIFT) #define PSCI_VERSION_MINOR(ver) \ ((ver) & PSCI_VERSION_MINOR_MASK) +#define PSCI_VERSION(maj, min) \ + ((((maj) << PSCI_VERSION_MAJOR_SHIFT) & PSCI_VERSION_MAJOR_MASK) | \ + ((min) & PSCI_VERSION_MINOR_MASK)) + +/* PSCI features decoding (>=1.0) */ +#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT 1 +#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \ + (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT) + +#define PSCI_1_0_OS_INITIATED BIT(0) +#define PSCI_1_0_SUSPEND_MODE_PC 0 +#define PSCI_1_0_SUSPEND_MODE_OSI 1 /* PSCI return values (inclusive of all PSCI versions) */ #define PSCI_RET_SUCCESS 0 @@ -86,6 +113,7 @@ #define PSCI_RET_INTERNAL_FAILURE -6 #define PSCI_RET_NOT_PRESENT -7 #define PSCI_RET_DISABLED -8 +#define PSCI_RET_INVALID_ADDRESS -9 #ifdef CONFIG_ARM_PSCI_FW unsigned long invoke_psci_fn(unsigned long a0, unsigned long a1, From patchwork Wed Mar 31 20:18:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1460714 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=iRH0UqIH; 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 4F9d2v3gN1z9sRf for ; Thu, 1 Apr 2021 07:19:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B44888293E; Wed, 31 Mar 2021 22:19:19 +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="iRH0UqIH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 31DE482903; Wed, 31 Mar 2021 22:19:10 +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-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 3FCFF82898 for ; Wed, 31 Mar 2021 22:19:02 +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-lf1-x12b.google.com with SMTP id d12so9880018lfv.11 for ; Wed, 31 Mar 2021 13:19:02 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=VZuUD3mp+5hJaVkqbjkbiKYtp/TZ9NXPqx5FEKgHYcY=; b=iRH0UqIHUMZvKYkgEgDPAis59OG0eKA+Q/7AjIo7gvrtugHk1OHDqi7SGnWGtd88kN hOEvsS3RzXpOSbnrO2tMVKfeT8njkdJ847TxZrlxva6gkH9rTwXWyidKubHmdpYvYiCc SR4VdrWryvRjol3kw8ogdNJUSKDk8UvjSe5oDcwd+R3Z1ix2YunImGzVtVuJ1SJmsrTE QvwpGCT4tG5lJK27di0ptUPkJIyD95PViDQ/lVYbPAwO8czMnNd7Xy8d0YfRKQ8FbIT8 /+/frMkOpurTSzVlBRJpxcVhF2T58N6MbxLqd6IafwCvd1KJ96xOJruxnl8eKgx1IdJI fJuQ== 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:mime-version:content-transfer-encoding; bh=VZuUD3mp+5hJaVkqbjkbiKYtp/TZ9NXPqx5FEKgHYcY=; b=ABKabNUtdIgiWtjtlmNotBQrbyINWkCSeSDBRdCglY81mtXcQ5O7N9WBnLZDfdttFq ndHiSW1bke1JcXFNAz6EsGjv55dRDgZrC8r/+bV24RdcDlLYGumJ3nurmtAEekwsMMWi Efuq+ArlEMP8J2FFYQSJqwbJD2SWXJ+OuNhzylH0y97beF/fW661ti0stKnEZzqB/by9 37VxEvYHXSIt5ELK+HVcMOMWLUqbsgzaQq00JOrueaoA0IEYLtC7TjHMER/PeAYX9qYw hd7O0+yfIMdKLRRtuDWUYxh82k093xrCTr2jEu69kK0Wr8XhVyjLlBIK+bJ0amGvOmha KLxQ== X-Gm-Message-State: AOAM533remiK2FaVYxzTM4lLpMS49X5hJ9eRT8RaseZjMBuHWShqkYTK zKtL0GaNxnhmWO6qCYjAfTW+7dv0LI9Nrydp X-Google-Smtp-Source: ABdhPJwb60MDCPvBEwSZmMEi0MY/LUBeWmXmySa9YaJr7dbleZDAIGIxJq6PF6VGsU2mJsD2ie7/+A== X-Received: by 2002:a05:6512:2026:: with SMTP id s6mr3107022lfs.43.1617221941386; Wed, 31 Mar 2021 13:19:01 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id q25sm324249lfn.42.2021.03.31.13.19.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 13:19:00 -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 , Jon Hunter , Masahiro Yamada , Michal Simek , Simon Glass , Yann Gautier Subject: [RESEND PATCH v3 2/5] psci: add features/reset2 support Date: Wed, 31 Mar 2021 23:18:52 +0300 Message-Id: <20210331201855.1425276-3-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331201855.1425276-1-igor.opaniuk@gmail.com> References: <20210331201855.1425276-1-igor.opaniuk@gmail.com> 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 Adds support for: * PSCI_FEATURES, which was introduced in PSCI 1.0. This provides API that allows discovering whether a specific PSCI function is implemented and its features. * SYSTEM_RESET2, which was introduced in PSCI 1.1, which extends existing SYSTEM_RESET. It provides support for vendor-specific resets, providing reset_type as an additional param. For additional details visit [1]. Implementations of some functions were borrowed from Linux PSCI driver code [2]. [1] https://developer.arm.com/documentation/den0022/latest/ [2] drivers/firmware/psci/psci.c Signed-off-by: Igor Opaniuk --- drivers/firmware/psci.c | 68 +++++++++++++++++++++++++++++++++++++++++ include/linux/psci.h | 3 ++ 2 files changed, 71 insertions(+) diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index 68953cc4f4..be57552aba 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,18 @@ #define PSCI_METHOD_HVC 1 #define PSCI_METHOD_SMC 2 +/* + * While a 64-bit OS can make calls with SMC32 calling conventions, for some + * calls it is necessary to use SMC64 to pass or return 64-bit values. + * For such calls PSCI_FN_NATIVE(version, name) will choose the appropriate + * (native-width) function ID. + */ +#if defined(CONFIG_ARM64) +#define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN64_##name +#else +#define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN_##name +#endif + #if CONFIG_IS_ENABLED(EFI_LOADER) int __efi_runtime_data psci_method; #else @@ -53,6 +66,34 @@ unsigned long __efi_runtime invoke_psci_fn return res.a0; } +static int psci_features(u32 psci_func_id) +{ + return invoke_psci_fn(PSCI_1_0_FN_PSCI_FEATURES, + psci_func_id, 0, 0); +} + +static u32 psci_0_2_get_version(void) +{ + return invoke_psci_fn(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0); +} + +static bool psci_is_system_reset2_supported(void) +{ + int ret; + u32 ver; + + ver = psci_0_2_get_version(); + + if (PSCI_VERSION_MAJOR(ver) >= 1) { + ret = psci_features(PSCI_FN_NATIVE(1_1, SYSTEM_RESET2)); + + if (ret != PSCI_RET_NOT_SUPPORTED) + return true; + } + + return false; +} + static int psci_bind(struct udevice *dev) { /* No SYSTEM_RESET support for PSCI 0.1 */ @@ -141,6 +182,33 @@ void reset_misc(void) } #endif /* CONFIG_PSCI_RESET */ +void psci_sys_reset(u32 type) +{ + bool reset2_supported; + + do_psci_probe(); + + reset2_supported = psci_is_system_reset2_supported(); + + if (type == SYSRESET_WARM && reset2_supported) { + /* + * reset_type[31] = 0 (architectural) + * reset_type[30:0] = 0 (SYSTEM_WARM_RESET) + * cookie = 0 (ignored by the implementation) + */ + invoke_psci_fn(PSCI_FN_NATIVE(1_1, SYSTEM_RESET2), 0, 0, 0); + } else { + invoke_psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0); + } +} + +void psci_sys_poweroff(void) +{ + do_psci_probe(); + + invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0); +} + #ifdef CONFIG_CMD_POWEROFF int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/include/linux/psci.h b/include/linux/psci.h index 38edde3137..c78c1079a8 100644 --- a/include/linux/psci.h +++ b/include/linux/psci.h @@ -118,6 +118,9 @@ #ifdef CONFIG_ARM_PSCI_FW unsigned long invoke_psci_fn(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3); +void psci_sys_reset(u32 type); +void psci_sys_poweroff(void); + #else static inline unsigned long invoke_psci_fn(unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3) From patchwork Wed Mar 31 20:18:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1460713 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=lb90FJoP; 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9d2g4hn8z9sX5 for ; Thu, 1 Apr 2021 07:19:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 75E108291A; Wed, 31 Mar 2021 22:19:17 +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="lb90FJoP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 981D5828FB; Wed, 31 Mar 2021 22:19:09 +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-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 70CD9828A4 for ; Wed, 31 Mar 2021 22:19:03 +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-lf1-x136.google.com with SMTP id w28so9957950lfn.2 for ; Wed, 31 Mar 2021 13:19:03 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=iLoo5aYfVx2Oynit8HtAFdcuqHwi4BRVM84mjFgj40w=; b=lb90FJoPDLF8U0tUyhmDn6oXmfyeaBBbBGSQJOf12s3IK7jlrKp48hBcu3wBvCe8CL 7sxVtAnCmOeLdmIb6kvlqwS+087eo94pYK6t44hBSiQKL3CNIse6iuGMIz6iD7QlmQmP 0gVT1nNsNv6hQY7g3FAclh+xXPkPwIlIllhyv+6HAPxfzjBWj3bAR9iGFaPC5VKRvQGa ghmoOjrxwfGo9O3DQ+MKq/KaR3Pm7g+xnqHh1AkKOKpa7I9MeJXYPkGoNAuN9kOmtYMr hw6zx0Lh1kLTRGir1u6kf+aNWor1nS1hbHE75dn/aWJ3p/DLGIiG31cmQkiqm6XiiMeO 1qkA== 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:mime-version:content-transfer-encoding; bh=iLoo5aYfVx2Oynit8HtAFdcuqHwi4BRVM84mjFgj40w=; b=sHynOHvvhlzWHggvq8LUfQY1asPxf2YDr2YhzhdjYlqdfperuM9ame6n0go0Ken1vP IH/u7HRiCJcnKAvqdAvPt6YNHh7ZGHqBMuIGVoIJWK8c8uhGziwL8QWyupUJiO9ryEPm jJbdQOX4nf1ho6xzhcv4BfkfmJ2C/FbH4nrlzNfoncAMY2BHT9ZYz8ksuoKEpjoC0oW7 eLI+b2H3IW7l/7dEHgaf2SYLgCew/2Yg0779+N4J4bmJpB3yVnqxR8LAOpVsI/gEafAf qX93vxI0kkMJk0ykkoiWHtS0xqmv42U3/+hR+zq//8Bn2PKtV9AR1Mh/hao/BL2shiXZ iMDw== X-Gm-Message-State: AOAM531n3R8h/C47nEpPg45nSBrpemlBgUnQPedpIHzFh6m2Jf313NfG 9njrJggVDasws0ksoDb4iXvXegCwcagMJBi3 X-Google-Smtp-Source: ABdhPJxG/nveJ7nKsaCnSYhuvmdDV7gqfutwwKL023medgTvMh98N+tre+G+bB2t6ml+LP7JPqgdgg== X-Received: by 2002:ac2:46d5:: with SMTP id p21mr3453789lfo.295.1617221942666; Wed, 31 Mar 2021 13:19:02 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id 200sm318990lfm.215.2021.03.31.13.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 13:19:02 -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 Subject: [RESEND PATCH v3 3/5] sysreset: psci: use psci driver exported functions Date: Wed, 31 Mar 2021 23:18:53 +0300 Message-Id: <20210331201855.1425276-4-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331201855.1425276-1-igor.opaniuk@gmail.com> References: <20210331201855.1425276-1-igor.opaniuk@gmail.com> 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 Use psci driver exported functions for reset/poweroff, instead of invoking directly invoke_psci_fn. Signed-off-by: Igor Opaniuk --- drivers/sysreset/sysreset_psci.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/sysreset/sysreset_psci.c b/drivers/sysreset/sysreset_psci.c index c7907b3226..83ecbcb9d2 100644 --- a/drivers/sysreset/sysreset_psci.c +++ b/drivers/sysreset/sysreset_psci.c @@ -11,22 +11,18 @@ static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type) { - unsigned long function_id; - switch (type) { case SYSRESET_WARM: case SYSRESET_COLD: - function_id = PSCI_0_2_FN_SYSTEM_RESET; + psci_sys_reset(type); break; case SYSRESET_POWER_OFF: - function_id = PSCI_0_2_FN_SYSTEM_OFF; + psci_sys_poweroff(); break; default: return -ENOSYS; } - invoke_psci_fn(function_id, 0, 0, 0); - return -EINPROGRESS; } From patchwork Wed Mar 31 20:18:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1460712 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=eV5zaZM+; 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 4F9d2T01KNz9sRf for ; Thu, 1 Apr 2021 07:19:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E618D828E1; Wed, 31 Mar 2021 22:19:15 +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="eV5zaZM+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 623BB82909; Wed, 31 Mar 2021 22:19:09 +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-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 9128B80462 for ; Wed, 31 Mar 2021 22:19: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-lf1-x130.google.com with SMTP id i26so30864283lfl.1 for ; Wed, 31 Mar 2021 13:19: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=A+zTVYtrqMU3tGEdAWgJ6NWcI6UmlZR3d2orcQu2W/A=; b=eV5zaZM+zFslgUJjRb+0Q/95xd+Dj0+gncW6AGaDiGF5p76I++4B4u3gmKPbhror4B 6gbw1pm4Ha93blFwCdMEms+XqxXu0z8dOcG/tIRdrD3KgZVpuyDA+4HIXZk53cEWMpGM uBevGSBN0OuVbPBJlD3atKZFqqyJl+VyoJBYLFLGM7ZK2UOL2+DG2DIrrf4ge70acM1W cl4s3xXpfldfbSA6PtK3a1/YPltIH3EYr4/SJxFIWAzsE+yUNb7pwzXWEK32mJd7NaUi 7LIiqv7DH7Fq0Vw3SGt2EKCayk+Xdtem9gG7p7FbFj7Dy1DXBbgTDoAE8fTm6o1RWoSs CYSQ== 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:mime-version:content-transfer-encoding; bh=A+zTVYtrqMU3tGEdAWgJ6NWcI6UmlZR3d2orcQu2W/A=; b=KB3RspUMZ5z2epuJq1nbsP+u1iRkmNJDTNIya5svVpOREp+QBDXv2sA/CBQyJvjgoP dtzsiyINOu773N7O03eR4YKMCUD18VDCAfQn6Oj/ZP3sKcdgFE7fNXfevRbYVf1CVBAF rXM27mURf8iR/C1HQeUmXEElcxDW5cETDpa6+wAvHEt/YW+DIdCOWzHqL41Vs7WtOfPC +/cKlZ6sw2kDyQj6aM4mtEb4wEPfDgYBFUd0X2RoAb2r7pueipiJWL3Z3k8qQvC3KzND nT7zDkRawUR3t6Jfq9IJZGNjIoFzDxJ0hGpV55Ra5P6bfscbL4TNe/rBZ4ca6UGelzrZ anVw== X-Gm-Message-State: AOAM533wDltKqEfFTRb1qtUTVVQTAIywBD9NfD3m4M+fGrZiLgimQqFp laTi66SKX512q3uqA5G83+LLrklSadXzWfy6 X-Google-Smtp-Source: ABdhPJzcUXO9Mkr4/P/vdLXiTmi9wEwoWXGlQKipYZq3v9H3eGbvQQE0KJc2W9RSeL3yMI8ERA36jQ== X-Received: by 2002:a19:b81:: with SMTP id 123mr3189550lfl.553.1617221943860; Wed, 31 Mar 2021 13:19:03 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id m27sm338711ljc.109.2021.03.31.13.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 13:19:03 -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 , Priyanka Jain , Simon Glass Subject: [RESEND PATCH v3 4/5] sysreset: provide type of reset in do_reset cmd Date: Wed, 31 Mar 2021 23:18:54 +0300 Message-Id: <20210331201855.1425276-5-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331201855.1425276-1-igor.opaniuk@gmail.com> References: <20210331201855.1425276-1-igor.opaniuk@gmail.com> 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 Add additional param for reset cmd, which provides type of reset. Signed-off-by: Igor Opaniuk --- cmd/boot.c | 2 +- drivers/sysreset/sysreset-uclass.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/boot.c b/cmd/boot.c index 36aba22b30..b84c0ed89e 100644 --- a/cmd/boot.c +++ b/cmd/boot.c @@ -56,7 +56,7 @@ U_BOOT_CMD( #endif U_BOOT_CMD( - reset, 1, 0, do_reset, + reset, 2, 0, do_reset, "Perform RESET of the CPU", "" ); diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c index 6c9dc7a384..0412c4a29b 100644 --- a/drivers/sysreset/sysreset-uclass.c +++ b/drivers/sysreset/sysreset-uclass.c @@ -122,10 +122,19 @@ void reset_cpu(ulong addr) #if IS_ENABLED(CONFIG_SYSRESET_CMD_RESET) int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { + enum sysreset_t reset_type = SYSRESET_COLD; + + if (argc > 2) + return CMD_RET_USAGE; + + if (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'w') { + reset_type = SYSRESET_WARM; + } + printf("resetting ...\n"); mdelay(100); - sysreset_walk_halt(SYSRESET_COLD); + sysreset_walk_halt(reset_type); return 0; } From patchwork Wed Mar 31 20:18: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: 1460715 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=cd06LDGV; 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F9d3706wJz9sRf for ; Thu, 1 Apr 2021 07:20:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D73ED8294C; Wed, 31 Mar 2021 22:19:21 +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="cd06LDGV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 220A2828A4; Wed, 31 Mar 2021 22:19:11 +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-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 C477A828E1 for ; Wed, 31 Mar 2021 22:19:05 +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-lf1-x133.google.com with SMTP id g8so30946086lfv.12 for ; Wed, 31 Mar 2021 13:19:05 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=zx+14J9P5ZAWkVYYArLclqNITW4x5YiFW5wv3Rsfn3E=; b=cd06LDGVUSaSQCmdlW5gWeefvyCpMhAR4FOnKvYPBn11DQr9g1aBYGPqCXPKngMQuw 7Oz/DN37TlUyuTLXg7KcXybOBvRsUzIgy8lJfIiXimTXXW+x1USmWzOwubBt/cK5+Kvu Q75zHvz0wAd/oEpw6nGp5sWoEux1acW1lDgvDzV4OCLskAJKr9wHpOtcUivBH7WQg5sW PZ2ywEysu0tJSsPAYXJlfGnpQaZKOyeutoq9vlbIC4M7/dsw3FtcCY7GQ0BEgLzabsuJ QUytKErq9vgFOl0GU8SrHnGhJcS/2E1VcgexkhM3kbslH1QPIWvRvVGndCLX55yCGNXn 08nQ== 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:mime-version:content-transfer-encoding; bh=zx+14J9P5ZAWkVYYArLclqNITW4x5YiFW5wv3Rsfn3E=; b=TfSy2LOCVxobYaXppzS4tHdkQnHqiAXbsEN8B3UEiRaxEmaYt/MPJ4HY+M0TC8d1W2 owE1Y+uaKUZqT5sG72l/kKeetgVkY1KxIbzf0HWMIHVVlgvwITLs6ste2nvTUhgTg6o8 h1/TFKr15dD6XIWf3rZi6FxfWhdAjEhtUVeocqEexOQjnusrnu5VhFqgK6zM5Q8kX8yi tobnHCC6Loist09/eLZpfgovsTSvHo2gIoBcWQUX+mahxXZJSW7cNSOa3f6QTVaPX8I8 CcF8h6I+X6RF98T0gPFb6bNerEO4VtGnSVwNq748tYhrSHj041JRqM1uTT5B+RA6RaPn tHSg== X-Gm-Message-State: AOAM532/M6awX+GlWpqD/la9XZj4Oe7rP2AyguYqL01x5Vm8AoCsz8vl BVcOuuJLiYy8P1CDsi6XRZPENQhFbE2tQOYD X-Google-Smtp-Source: ABdhPJwneiFQ/LsG6dlxkE0hQ2hEd/TQHPDGa3EVrIfEN3k2IH8G1y9L45BhPFT0AN8odMv1N4hzAA== X-Received: by 2002:ac2:5a1b:: with SMTP id q27mr3034045lfn.189.1617221945089; Wed, 31 Mar 2021 13:19:05 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id w19sm320025lfl.199.2021.03.31.13.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 13:19:04 -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 , Simon Glass Subject: [RESEND PATCH v3 5/5] doc: usage: add usage details for reset cmd Date: Wed, 31 Mar 2021 23:18:55 +0300 Message-Id: <20210331201855.1425276-6-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331201855.1425276-1-igor.opaniuk@gmail.com> References: <20210331201855.1425276-1-igor.opaniuk@gmail.com> 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 Add usage details for reset command. Signed-off-by: Igor Opaniuk --- doc/usage/index.rst | 1 + doc/usage/reset.rst | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 doc/usage/reset.rst diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 6c59bbadab..b1181011ae 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -34,3 +34,4 @@ Shell commands qfw sbi true + reset diff --git a/doc/usage/reset.rst b/doc/usage/reset.rst new file mode 100644 index 0000000000..f8cf3579c8 --- /dev/null +++ b/doc/usage/reset.rst @@ -0,0 +1,26 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +reset command +============ + +Synopsis +-------- + +:: + + reset [-w] + +Description +----------- + +Perform reset of the CPU. By default does COLD reset, which resets CPU, +DDR and peripherals, on some boards also resets external PMIC. + +-w + Do warm WARM, reset CPU but keep peripheral/DDR/PMIC active. + + +Return value +------------ + +The return value $? is always set to 0 (true).