From patchwork Thu Apr 18 15:16:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1087668 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=st.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.b="ZdA0N0Hi"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44lN4l653jz9s4Y for ; Fri, 19 Apr 2019 01:17:11 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 79101C21DF3; Thu, 18 Apr 2019 15:17:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=5.0 tests=TVD_SUBJ_WIPE_DEBT, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B88A2C21C50; Thu, 18 Apr 2019 15:16:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 333A8C21BE5; Thu, 18 Apr 2019 15:16:39 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id 7CE24C21C51 for ; Thu, 18 Apr 2019 15:16:34 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3IFCQZw032723; Thu, 18 Apr 2019 17:16:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=v4ekA4xh9L6zEKEVx+1jzFYPukrz13VBHGueFEH8iV4=; b=ZdA0N0HiN7UPc/k4/tuVL3mCcbVCVM9Or7YY/mM9Vc/iJ30JwETlb1VI5MGtx2aJbNyz xcOV+zwsvyyxxxmmLFfeMPzTzHjEsTQpatNb4fvmBcysbk1Ko0r+wW/LXgYEGXScbwSR jYeEwb18Pga60PrPC6AGR4S1JCtA9qH0D+i8UDDyaV6bpy7uQiOGQoJQcso1Vx8guaZF xRoQb5U5iRtjTcTD1sXmvCMRYyo+JdNwwpJTDRWlfhlSCI7TMCwZy7339xC8p/ZkGUlh sDDPEXGZ2RfzaDjREd7JYqhAGpvAdFrijMxJnb+bp6VECwVkDkp/bl2SReIFjh6+WAWU yQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2ru6nh6tt1-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 18 Apr 2019 17:16:34 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3CA5234; Thu, 18 Apr 2019 15:16:32 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 41765299B; Thu, 18 Apr 2019 15:16:32 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 18 Apr 2019 17:16:32 +0200 Received: from localhost (10.201.23.85) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Apr 2019 17:16:31 +0200 From: Patrick Delaunay To: Date: Thu, 18 Apr 2019 17:16:21 +0200 Message-ID: <1555600582-29790-1-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-18_07:, , signatures=0 Cc: U-Boot STM32 Subject: [U-Boot] [PATCH] sysreset: syscon: remove POWER reset cause X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The sysreset of 'POWER' type is a PMIC reset defined as 'remove and restore power'. So normally only COLD/WARN is supported by sysreset_syscon. This modification allows to use the function sysreset_walk(SYSRESET_POWER) when it is supported by PMIC driver (see example in stpmic1). Signed-off-by: Patrick Delaunay --- drivers/sysreset/sysreset_syscon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c index 3fb39b9..1028160 100644 --- a/drivers/sysreset/sysreset_syscon.c +++ b/drivers/sysreset/sysreset_syscon.c @@ -24,6 +24,9 @@ static int syscon_reboot_request(struct udevice *dev, enum sysreset_t type) { struct syscon_reboot_priv *priv = dev_get_priv(dev); + if (type == SYSRESET_POWER) + return -EPROTONOSUPPORT; + regmap_write(priv->regmap, priv->offset, priv->mask); return -EINPROGRESS;