From nobody Wed Dec 17 15:41:28 2025 Received: from fllvem-ot03.ext.ti.com (fllvem-ot03.ext.ti.com [198.47.19.245]) (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 E1DED1E8356; Tue, 13 May 2025 05:46:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.245 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747115202; cv=none; b=ekenKk723MLyYZgEJ2o5KeE010ezAt0/TiyCXi/ZpJJHzKt50g+y+ngyylFozahPl+un0gCVceckQtnN5OdPUY+jtBu81naJyU4winiIltbE/MP9pB8JF3flxgiyrQBPriQQKrkDzNgMQolqSEVm/fud1DkMm86i64WuMxkBMTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747115202; c=relaxed/simple; bh=Cb6qucv1yT9mYi1132/A/JKnGmSekIULBmoJnbOKR6A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NS6tJgjHCI7LEmA3BkPPEPYEG+hr3akNeUxzD6W9D70HmFynyHXWqKYwbA5aXsOkKi9SuOIf7UTulC7YOmx12nZLdj3VpLvGFVs920fQFl+4pfSLZ8rsy8DqLmbBPMtfIKFEG4b0HlfVh7MRcc0UFifgE9v45p5xcd5ly+LfLz4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=m3ifn2Hg; arc=none smtp.client-ip=198.47.19.245 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="m3ifn2Hg" Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllvem-ot03.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 54D5kUrQ2210859 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 May 2025 00:46:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1747115190; bh=tlT5YSd8xcSMONdwid2Fmp+NNb8aA4tBsSGL5HENjK8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=m3ifn2HgvVBUuiYPANCowMZ0jCka/NVsEJ5gv6ZlKsdBo/2ZZp45wNp3r2r53QO9a Iqzq8g2aHhlip9KPql6aGqOlMFHdlPGxSNZpVWO6TBG30jm3HiM2Mut32CPmb4fx/w KeFGkwbqFzE2Iz2f8aq2WNL3YoN1Xzg6ivf8KN64= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 54D5kU7X063407 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 May 2025 00:46:30 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 13 May 2025 00:46:29 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 13 May 2025 00:46:29 -0500 Received: from uda0510294.dhcp.ti.com (uda0510294.dhcp.ti.com [172.24.227.151]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 54D5jAqR131001; Tue, 13 May 2025 00:46:26 -0500 From: Beleswar Padhi To: , CC: , , , , , , , , , , Subject: [PATCH v12 18/36] remoteproc: k3-dsp: Correct Reset deassert logic for devices w/o lresets Date: Tue, 13 May 2025 11:14:52 +0530 Message-ID: <20250513054510.3439842-19-b-padhi@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250513054510.3439842-1-b-padhi@ti.com> References: <20250513054510.3439842-1-b-padhi@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" The k3_dsp_rproc_release() function erroneously deasserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly deassert only the global reset for devices that do not have a local reset. Signed-off-by: Beleswar Padhi Tested-by: Judith Mendez Reviewed-by: Andrew Davis --- v12: Changelog: 1. Carried R/B tag. Link to v11: https://lore.kernel.org/all/20250425104135.830255-18-b-padhi@ti.com/ v11: Changelog: 1. Put if-else block for code path with lreset and w/o lreset. [Andrew] 2. Carried T/B tag. Link to v10: https://lore.kernel.org/all/20250417182001.3903905-17-b-padhi@ti.com/ v10: Changelog: 1. Split [v9 13/26] into [v10 16/33] and [v10 17/33] patches.=20 Link to v9: https://lore.kernel.org/all/20250317120622.1746415-14-b-padhi@ti.com/ drivers/remoteproc/ti_k3_dsp_remoteproc.c | 30 ++++++++++------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc= /ti_k3_dsp_remoteproc.c index f8a5282df5b71..08e6dde3ea267 100644 --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c @@ -30,23 +30,19 @@ static int k3_dsp_rproc_release(struct k3_rproc *kproc) struct device *dev =3D kproc->dev; int ret; =20 - if (kproc->data->uses_lreset) - goto lreset; - - ret =3D kproc->ti_sci->ops.dev_ops.get_device(kproc->ti_sci, - kproc->ti_sci_id); - if (ret) { - dev_err(dev, "module-reset deassert failed (%pe)\n", ERR_PTR(ret)); - return ret; - } - -lreset: - ret =3D reset_control_deassert(kproc->reset); - if (ret) { - dev_err(dev, "local-reset deassert failed, (%pe)\n", ERR_PTR(ret)); - if (kproc->ti_sci->ops.dev_ops.put_device(kproc->ti_sci, - kproc->ti_sci_id)) - dev_warn(dev, "module-reset assert back failed\n"); + if (kproc->data->uses_lreset) { + ret =3D reset_control_deassert(kproc->reset); + if (ret) { + dev_err(dev, "local-reset deassert failed, (%pe)\n", ERR_PTR(ret)); + if (kproc->ti_sci->ops.dev_ops.put_device(kproc->ti_sci, + kproc->ti_sci_id)) + dev_warn(dev, "module-reset assert back failed\n"); + } + } else { + ret =3D kproc->ti_sci->ops.dev_ops.get_device(kproc->ti_sci, + kproc->ti_sci_id); + if (ret) + dev_err(dev, "module-reset deassert failed (%pe)\n", ERR_PTR(ret)); } =20 return ret; --=20 2.34.1