Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4704706iob; Sun, 8 May 2022 22:39:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc2MZXE1bssrlMGD5MJmAfHV7/5fnVhlyRaBKr91aafoUJ+zBhzZQjJvrVHVZ+17EdiuSi X-Received: by 2002:a17:90a:bf0a:b0:1db:d98d:7ce9 with SMTP id c10-20020a17090abf0a00b001dbd98d7ce9mr16352001pjs.155.1652074758040; Sun, 08 May 2022 22:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652074758; cv=none; d=google.com; s=arc-20160816; b=knaPCd4bYV0t/TUK1PSjdjFsjsyPtpZCCzQ2roM1LxizSKzkQJJzwykLjbuttMayEG WoEl/Cn3y9dHCXTtF0jAv2EDQqPuSM46qktnW1cGILOucCGRCyHHgjg4N0ZrTvDViZDp hrYcNcmgFmlVUNu9EeNa8fq8dyHiK+emC9XzCh/2k5OhEkujj0r2GWTgy2wFbMdWcTqm fjNeEp89E1orlz9S8Uss7lC9UEOm2ZV/atGZe9gR8L10c9hN1ch7CvmX6nfw7hVv45Rl x/J6wvL/bgmY8n7FTpNcXQVTswwjxlNOgTUmJ/5fFR5tcSH80O1lSK1EYI/xqbYflyv1 XLog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=zL9wAnNTKEgo7mxIDBrUIE5ft2KNlW33lMRbcQXTic8=; b=zvIYPsx+I0KDJxnqWUa29OFjYK07y/VEM86FKHNrwf/C8w1DWTdgiaDGF6rKUpxdXc oAHUIEwBHxVsiojZN/zrOCmj+YsZeEW6DRK2ds9LU2VNHttRAtauQYdMu23qT1+kuyQr py/Q15W8tHXM4i8dkPq854mDYY1VShU9ZEJwospgSEKC4iuIHB005LM3UYKEnUV5anYI vymNa/CVzwD54OFcXkvDK0hnJ5a/difqCjQif3sjvaCBbEVKXblRJ0Ab4Z+9H6M0UwEi 1c3XeC6iX8fNjdFndFRiU6Whp0dqpCTbeEGss9gn7m8jPxeB9F0+WcR8UJfzlFObuzkI J1sA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a12-20020a056a000c8c00b0050df0383302si15492457pfv.255.2022.05.08.22.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 22:39:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B9358158F89; Sun, 8 May 2022 22:38:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384682AbiEGMaM (ORCPT + 99 others); Sat, 7 May 2022 08:30:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231705AbiEGMaH (ORCPT ); Sat, 7 May 2022 08:30:07 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C86FF3AA56 for ; Sat, 7 May 2022 05:26:20 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D5BAB1A07E0; Sat, 7 May 2022 14:26:18 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A7B7B1A07DC; Sat, 7 May 2022 14:26:18 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 29469180031D; Sat, 7 May 2022 20:26:17 +0800 (+08) From: Shengjiu Wang To: nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ASoc: fsl_micfil: explicitly clear CHnF flags Date: Sat, 7 May 2022 20:14:14 +0800 Message-Id: <1651925654-32060-2-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1651925654-32060-1-git-send-email-shengjiu.wang@nxp.com> References: <1651925654-32060-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 There may be failure when start 1 channel recording after 8 channels recording. The reason is that the CHnF flags are not cleared successfully by software reset. This issue is triggerred by the change of clearing software reset bit. CHnF flags are write 1 clear bits. Clear them by force write. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_micfil.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 2149fac0dcc6..e4d1da55293e 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -190,6 +190,14 @@ static int fsl_micfil_reset(struct device *dev) if (ret) return ret; + /* + * Set SRES should clear CHnF flags, But even add delay here + * the CHnF may not be cleared sometimes, so clear CHnF explicitly. + */ + ret = regmap_write_bits(micfil->regmap, REG_MICFIL_STAT, 0xFF, 0xFF); + if (ret) + return ret; + return 0; } -- 2.17.1