From nobody Wed Feb 11 17:41:50 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8B3FC61DA4 for ; Mon, 13 Mar 2023 15:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231216AbjCMPvD (ORCPT ); Mon, 13 Mar 2023 11:51:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbjCMPup (ORCPT ); Mon, 13 Mar 2023 11:50:45 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BD2769E0 for ; Mon, 13 Mar 2023 08:50:28 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DEPFBm004637; Mon, 13 Mar 2023 10:50:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=pKF0uI7lm6EPpC6Qzi9YRJ+YwdwwOiOgrKlQyRUjDH0=; b=CMlL9WxR3pyR8kzKB7OUXZpUCiuQpv8In93xtSQsTJJPai3cA8Us1sfIE3Ren0wlYgEt /8zKGZHCj+hMp7fksWtGjFYJ4HQFR9JmNzG/uIJWDa9aP8cqJxm0aYc5wcc4IDzIuSqk YrkhbIEc0KfPt7YcrCpRQV1U1/DpQv/yD31JwFV3JnEm83E+ymJQk6B9R2GEqv+tE+/e Ufr7ksZA9RHAFNlG6N8ZLTzGXLLU0f4OCBFHzrf2XNIni5BY6t3RRvapvY9gQEBJD3Ap AbMlnA9jM4UV2MFs9YLtvXhKKpHLT1RF60lfhGYo0fBKdRmO0Qcm23DNOcn4X2y1vueD /g== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3p8qx7b4rb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 10:50:06 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 13 Mar 2023 10:50:04 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Mon, 13 Mar 2023 10:50:04 -0500 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.64.92]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 60FC211D4; Mon, 13 Mar 2023 15:50:04 +0000 (UTC) From: Richard Fitzgerald To: , CC: , , , , , Simon Trimmer , Richard Fitzgerald Subject: [PATCH v2 1/8] firmware: cs_dsp: Introduce no_core_startstop for self-booting DSPs Date: Mon, 13 Mar 2023 15:49:48 +0000 Message-ID: <20230313154955.4268-2-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230313154955.4268-1-rf@opensource.cirrus.com> References: <20230313154955.4268-1-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: 4iV5sr7HVVva8JLmjRPw3SKDIvJ_LpKx X-Proofpoint-GUID: 4iV5sr7HVVva8JLmjRPw3SKDIvJ_LpKx X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Simon Trimmer There are devices containing Halo Core DSPs that self-boot, cs_dsp is used to manage the running firmware but the host does not have direct control over starting and stopping the DSP and so cs_dsp should consider the DSP to be always running. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- drivers/firmware/cirrus/cs_dsp.c | 14 +++++++++++++- include/linux/firmware/cirrus/cs_dsp.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_= dsp.c index f558b390fbfe..97b73a254380 100644 --- a/drivers/firmware/cirrus/cs_dsp.c +++ b/drivers/firmware/cirrus/cs_dsp.c @@ -301,6 +301,7 @@ struct cs_dsp_ops { static const struct cs_dsp_ops cs_dsp_adsp1_ops; static const struct cs_dsp_ops cs_dsp_adsp2_ops[]; static const struct cs_dsp_ops cs_dsp_halo_ops; +static const struct cs_dsp_ops cs_dsp_halo_ao_ops; =20 struct cs_dsp_buf { struct list_head list; @@ -2821,7 +2822,10 @@ EXPORT_SYMBOL_NS_GPL(cs_dsp_adsp2_init, FW_CS_DSP); */ int cs_dsp_halo_init(struct cs_dsp *dsp) { - dsp->ops =3D &cs_dsp_halo_ops; + if (dsp->no_core_startstop) + dsp->ops =3D &cs_dsp_halo_ao_ops; + else + dsp->ops =3D &cs_dsp_halo_ops; =20 return cs_dsp_common_init(dsp); } @@ -3187,6 +3191,14 @@ static const struct cs_dsp_ops cs_dsp_halo_ops =3D { .stop_core =3D cs_dsp_halo_stop_core, }; =20 +static const struct cs_dsp_ops cs_dsp_halo_ao_ops =3D { + .parse_sizes =3D cs_dsp_adsp2_parse_sizes, + .validate_version =3D cs_dsp_halo_validate_version, + .setup_algs =3D cs_dsp_halo_setup_algs, + .region_to_reg =3D cs_dsp_halo_region_to_reg, + .show_fw_status =3D cs_dsp_halo_show_fw_status, +}; + /** * cs_dsp_chunk_write() - Format data to a DSP memory chunk * @ch: Pointer to the chunk structure diff --git a/include/linux/firmware/cirrus/cs_dsp.h b/include/linux/firmwar= e/cirrus/cs_dsp.h index cad828e21c72..29cd11d5a3cf 100644 --- a/include/linux/firmware/cirrus/cs_dsp.h +++ b/include/linux/firmware/cirrus/cs_dsp.h @@ -156,6 +156,7 @@ struct cs_dsp { unsigned int sysclk_reg; unsigned int sysclk_mask; unsigned int sysclk_shift; + bool no_core_startstop; =20 struct list_head alg_regions; =20 --=20 2.30.2