Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9025437rwl; Tue, 10 Jan 2023 23:59:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXS4KKTBPE0THxUD0DN4/Hb+5bmYZ3PNy/YjFICD6hUFjf8Xi14lq/Q7KvhcOP38nv2tC2 X-Received: by 2002:a17:906:a1d7:b0:815:8942:dde with SMTP id bx23-20020a170906a1d700b0081589420ddemr73002726ejb.23.1673423940649; Tue, 10 Jan 2023 23:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673423940; cv=none; d=google.com; s=arc-20160816; b=Go+RMHG+LREwLhkNqCKLAZnKiCOqYnOjS2MC0n/GTwsyvXAcz9GOhit/tm5gkhhe1w 7CmmhFn4A3+eUC7IqmpG5pXClTVzJGIZ0X/1IhRF9Bdy/wFDg6I/3rEkvObNoI4s0B8w 5DDq27LTcN865lBLCg43LvemnslRcNAp1SDFF6wd2CtPijfKuezvGXgMMoG+vRc2L4ak u+RIC5r3EMMmTqrNggHcIxrN982Q3wDzrO8XyJZgv2ARceJ0VIz44OWMpjRgAHt6dzgw gh3SsMgzjN3NJawXcmQpv/cF22/A48NVye1JfY8Vub6IbIgISpxP5V3l7U6D1PLMM7qq vW8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xoap/k5iBvhP1h15PeE1oi3mbQfqzU4RcOAgAgwn+qY=; b=D+icwEXc0EYN55WHENEZ/GemwuxiIxNsxqEwwhanVP8EPCYmVuJeb/lDnrMhgCpTT0 gga4DH7Uwp4GPRvkRcDTEF1YwdpWA1QfKdkDws05AYH8OhEdNaxZVaDpm+Mdep5JDLqM s5iEHm6zdut0f5oI335nIylQSMQ9/HiA6FeFK1UEC09uvZFYoQJzRf4y6FsRBHeOUmi3 S4DsJ2fHQksNIemyHVRLdOWvEo9vn1KsBVQVXjqArpOkJp3rutMiNPKGNGK31F4SwQm/ HOwsJ/Ryeh44r7/oj6r1H6Ap42CJ8x8V/2aA85lgQrOQEXQEeC/Nuap4r35/CwGMiog+ AxcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=j7e15xNw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ft31-20020a170907801f00b007bfacfbd8b8si10184625ejc.140.2023.01.10.23.58.48; Tue, 10 Jan 2023 23:59:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=j7e15xNw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbjAKHqA (ORCPT + 53 others); Wed, 11 Jan 2023 02:46:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235452AbjAKHpq (ORCPT ); Wed, 11 Jan 2023 02:45:46 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A388E1182C; Tue, 10 Jan 2023 23:45:41 -0800 (PST) X-UUID: ec91c206918311ed945fc101203acc17-20230111 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=xoap/k5iBvhP1h15PeE1oi3mbQfqzU4RcOAgAgwn+qY=; b=j7e15xNwrhQhJEk/ABbtCoDd+ou3+9r7j64PnY0/VgPzeWjDIFlfSNc8+tybQy4ZWoMezr2MY9bFb9gUj2OPE1StIEY0FxAjZs0tqCrMQklH0iOFEAxV+6d0JPbLdwMdDNS5ilm0+XbUZgOVP2MRyvi/Ya2kZoxqnsELn6sy2AU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:0a95fbcd-9534-42a9-8ecd-025fe06de41c,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:543e81c,CLOUDID:7c99ee8b-8530-4eff-9f77-222cf6e2895b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0,NGT X-UUID: ec91c206918311ed945fc101203acc17-20230111 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 194049977; Wed, 11 Jan 2023 15:45:31 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Wed, 11 Jan 2023 15:45:30 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Wed, 11 Jan 2023 15:45:30 +0800 From: Roger Lu To: Matthias Brugger , Enric Balletbo Serra , Kevin Hilman , Nicolas Boichat CC: Fan Chen , Roger Lu , Jia-wei Chang , , , , , , Subject: [PATCH v4 02/14] soc: mediatek: mtk-svs: reset svs when svs_resume() fail Date: Wed, 11 Jan 2023 15:45:16 +0800 Message-ID: <20230111074528.29354-3-roger.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230111074528.29354-1-roger.lu@mediatek.com> References: <20230111074528.29354-1-roger.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add svs reset when svs_resume() fail. Fixes: a825d72f74a3 ("soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()") Signed-off-by: Roger Lu --- drivers/soc/mediatek/mtk-svs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index 2df30a6bca28..a803b92afc3d 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -1614,12 +1614,16 @@ static int svs_resume(struct device *dev) ret = svs_init02(svsp); if (ret) - goto out_of_resume; + goto svs_resume_reset_assert; svs_mon_mode(svsp); return 0; +svs_resume_reset_assert: + dev_err(svsp->dev, "assert reset: %d\n", + reset_control_assert(svsp->rst)); + out_of_resume: clk_disable_unprepare(svsp->main_clk); return ret; -- 2.18.0