Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1122200rdb; Fri, 16 Feb 2024 06:09:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUOJnw73s2n35dzT+vGsV6gT4DuVruczs0yMzqqYAqMF5Xzt7GLTJLIti4FrUvNchAuJmPD3XdTLoIrT0/ezgbHdiUxDwvKerYTVLesyA== X-Google-Smtp-Source: AGHT+IGffw/gBzNgFBs4KeNUIbZgEBVa/QIEeREDJZwfU6Kv43K4CrymdkmVuF4XVumoblAB8mkP X-Received: by 2002:a05:620a:4590:b0:787:3519:d27d with SMTP id bp16-20020a05620a459000b007873519d27dmr7310312qkb.36.1708092560855; Fri, 16 Feb 2024 06:09:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708092560; cv=pass; d=google.com; s=arc-20160816; b=ppBLuM0Fob48UyZlEV4DeuCorKD5EI7mx8MaUtU7zqpSQMfePSNVFpWAjY2UCLYXn+ FT8ouOsVH/at++VPKZFCrXKjIsNBvATb14Z+AgU+aBHB4hz1d8OhjT/aPhwP8yrFKcWg K630PE3+HHwj8iJM5DMICANwVyyq/XXu9yevc3xYgrKFrwJgVbpBRDO5QCVqaorxFFOF M6gvpbnDXYutkOtoX2ZT0mKcz2IYkuujHU3xTdapQ3/K9y4kjHFyjfWKA8/HsuYtMQwM iCWNnvtOjXwn3HL91lQaSgvnhQrcpmSqALDm/+5wtJf4ib4MBWbDOFYtrJz6tV7PbWWe dDpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Dw280V9Ji8JnDWHiX49rYuBF9Ede07pNOdQW29T5Qag=; fh=Nd1U+TCR5vj/z8fBK7QForLA2lSjTNgmNLOKOIZv0Mg=; b=cCOfPRpqdmDdLxB8sQk0Lieu9zZ69Fj8PdZFZv5IiyTKP4mgRRm2M0Oooe6i41d02I PcGtfPiaxzS2eqGyqbpm1+4+qN7o6Q/xPhUGq3oQXvDt47dA8goj2pMfLMEnZ7ImoaOs uRsUwvlcN/m+K/fOQIKzXQzjUgFVM2XmwcP8wOZtpssiWmT7O4FOgMzj/2/R+QuNR605 RbSbe9Bb6lMgENIoQQoqvsqLxFlqCmzx9p/qcfuGq0ZTu/Z03Vmm6e90g5g5pSvClcRW 1wzgLLxer0ZRN2XAacdOSrhS2gHhpy8bd9WXcfjbm9r7i0GjPogA9RLxAFuulgSW1627 IvTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=F4OzVQbF; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-68705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68705-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o9-20020a05620a110900b00785d6a7b7e9si3929866qkk.40.2024.02.16.06.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 06:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=F4OzVQbF; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-68705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68705-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 29EF01C26170 for ; Fri, 16 Feb 2024 14:07:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7008D12CDAE; Fri, 16 Feb 2024 14:05:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="F4OzVQbF" Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0253E175A6; Fri, 16 Feb 2024 14:05:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708092358; cv=none; b=bb7hVTLiuIM+qUNlsjsr+n4XnwtnAPCLKwdAKaIapVXeUtBRDLVm8mbbV5hbgv4ZuB4HgFLxH8RY7zi7KuPqUj2Q85TdybHtcCtj0QcF0qmJxoVeHvlL0RI3k+QRtk/QvWf+OUHnuIOGPQGuXTld9e0JWKMbSzPJSjw/X91ibZw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708092358; c=relaxed/simple; bh=E6q5xrMcVV+0iqJ33ckm74DzEhM3R6Lm5oDsVEfUaZs=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=A4Ay+3rAE7thwbxBtU7zQ1HZKE3KKuLIbDPMgJDphxXLKEWdIDEZ7b7YVGf+FM5qO16djpZ+HTQJj8YWlYTdFCRYdFY8Qi8/YZA+Y7x2eHbNv1j9q76sXsYmdoxZUuyNKibqmNvHh30gpNOTfbeLlWWL/yqE/YdQwG4Zjqpn+I4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=F4OzVQbF; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G5u5hg027308; Fri, 16 Feb 2024 08:05:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=D w280V9Ji8JnDWHiX49rYuBF9Ede07pNOdQW29T5Qag=; b=F4OzVQbFi4ewdFUlT uU1W+e+bVKsiFUa31R6u5z4IXVO27zdEmSOltdY5Iw+YBDHCYfKgI+BNTVv2m0sQ +BPskYVslty0imzHDz/rFu9mxnUjPiGcohi/EOzqpU6W/6N+6ytpwttGbUVh+TOE w5NB1ogPposbebzRFBJ67zw/kbA6gFnqe5ZjAUAlrKeSgF5NmltUlzWa+Ka8g3vb HQYQXno0cP2/mOeIhQl1Wy7kZhmL0ewC7ZiFnQVVAgrt5wakA61yHCOaq1F0La0Y A/Pw89vj0ZboxE9wI/TR9/GtCkXucbD7Ctp8zxw4RJ+1VMcR/djaVzqCbdekpcLC ojMag== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3w67e2738b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 08:05:37 -0600 (CST) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 16 Feb 2024 14:05:35 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40 via Frontend Transport; Fri, 16 Feb 2024 14:05:35 +0000 Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.18]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 5FA17820242; Fri, 16 Feb 2024 14:05:35 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , , "Richard Fitzgerald" Subject: [PATCH] ASoC: cs35l56: Must clear HALO_STATE before issuing SYSTEM_RESET Date: Fri, 16 Feb 2024 14:05:35 +0000 Message-ID: <20240216140535.1434933-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: _z1cWPfNfG1gpNOCgIy6EkY_CyfG-Cwr X-Proofpoint-GUID: _z1cWPfNfG1gpNOCgIy6EkY_CyfG-Cwr X-Proofpoint-Spam-Reason: safe The driver must write 0 to HALO_STATE before sending the SYSTEM_RESET command to the firmware. HALO_STATE is in DSP memory, which is preserved across a soft reset. The SYSTEM_RESET command does not change the value of HALO_STATE. There is period of time while the CS35L56 is resetting, before the firmware has started to boot, where a read of HALO_STATE will return the value it had before the SYSTEM_RESET. If the driver does not clear HALO_STATE, this would return BOOT_DONE status even though the firmware has not booted. Signed-off-by: Richard Fitzgerald Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") --- sound/soc/codecs/cs35l56-shared.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c index 995d979b6d87..cb4e83126b08 100644 --- a/sound/soc/codecs/cs35l56-shared.c +++ b/sound/soc/codecs/cs35l56-shared.c @@ -335,6 +335,7 @@ void cs35l56_wait_min_reset_pulse(void) EXPORT_SYMBOL_NS_GPL(cs35l56_wait_min_reset_pulse, SND_SOC_CS35L56_SHARED); static const struct reg_sequence cs35l56_system_reset_seq[] = { + REG_SEQ0(CS35L56_DSP1_HALO_STATE, 0), REG_SEQ0(CS35L56_DSP_VIRTUAL1_MBOX_1, CS35L56_MBOX_CMD_SYSTEM_RESET), }; -- 2.30.2