From patchwork Wed Mar 31 23:01: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: 1460773 X-Patchwork-Delegate: trini@ti.com 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=K0yVIl3V; 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 4F9hfn6hzZz9sRf for ; Thu, 1 Apr 2021 10:02:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7998B828E1; Thu, 1 Apr 2021 01:02:24 +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="K0yVIl3V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 668DF828F8; Thu, 1 Apr 2021 01:02:18 +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-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (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 6DDE3828EE for ; Thu, 1 Apr 2021 01:02: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-x132.google.com with SMTP id b4so7033lfi.6 for ; Wed, 31 Mar 2021 16:02: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=iLoo5aYfVx2Oynit8HtAFdcuqHwi4BRVM84mjFgj40w=; b=K0yVIl3Vqa2VqEA+ZNZd3jZ7pNriQEg7VfsHArIsHfrP/WMOY/dQjXDepDIBAMRYyw 76KjF1iAOCMJiQabknGNP6jeZ+GHLSiyvnKIEKFLzFTOt/vo7qFg7Qe3Z30Ser3mrmIt QnklkFAdLw8jhGwgShdfvmIBBoji7XbRM+L0ZWArGHqVzGXXMLeEYdjahNjNrwIVOSu/ comgnpdNlhROTz3XKNLYLC2q45EYZ3wQA3t3ZRRgLOeGXNF06IVJrXAduNQ+YOqADytq OkZi0mh1QIvVldymu1/t+SOx/Rtsu9ptkNRm8o7K63EKlrS08l4xtkw2O3yg0zStmFNl gW2Q== 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=HIYwJanSoDgPLFvKBzpTWkyYwF/4JSAv8GY5ftfRe2xzueY0q5HtLmyB318xj0RgY7 J9tihFRIZLeaX9uA69i+ZxAh94CCzBpkrpU+QBo97s2j8b5cr6UJs7Cg39CPctXB8dUB PlT9Pe8dhu1+CxYwzfJKwJBEgLFDP3cDH2CY56OKPsZWYm5DRcbNC06TlezYSiJDw2zT y2jn7s4pX1TE6XLik9LaYOxNcqWxPIJtuHOJUjpRCLyuDxgLa5vUTfIaY1QzwKfyGA0Q w7al9q/bOqDHHbKDDQExkYjINjkrqIjP1c3VWEOLx2gRmToEGNHgOhrOcPHPGbKcydLS 4KhQ== X-Gm-Message-State: AOAM530TcyH1+aWRjJe8ns3L6OGlfhEhFmRhKrhppH7zaokk9WIcok0o B8prTXtSBwuw8Z0nZwaJincgxSpd1oQFCWem X-Google-Smtp-Source: ABdhPJwuPs94bgPv2mFLYB0dxOKK36Ct2Li8NcjS9xQ17sb+yWHsdSs1THThpO50WP2eWW2RAdaDpw== X-Received: by 2002:ac2:5e36:: with SMTP id o22mr3660253lfg.525.1617231724604; Wed, 31 Mar 2021 16:02:04 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id d8sm398280ljc.129.2021.03.31.16.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 16:02:03 -0700 (PDT) From: Igor Opaniuk X-Google-Original-From: Igor Opaniuk To: u-boot@lists.denx.de Cc: ricardo@foundries.io, patrick.delaunay@foss.st.com, daiane.angolini@foundries.io, mike@foundries.io, vanessa.maegima@foundries.io, tim.anderson@foundries.io, xypron.glpk@gmx.de, jorge@foundries.io, Igor Opaniuk Subject: [PATCH v4 3/5] sysreset: psci: use psci driver exported functions Date: Thu, 1 Apr 2021 02:01:54 +0300 Message-Id: <20210331230156.1850191-4-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331230156.1850191-1-igor.opaniuk@gmail.com> References: <20210331230156.1850191-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; }