From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>, <pierre-louis.bossart@linux.intel.com>
Cc: <peter.ujfalusi@linux.intel.com>,
<yung-chuan.liao@linux.intel.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>,
Simon Trimmer <simont@opensource.cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>
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 [thread overview]
Message-ID: <20230313154955.4268-2-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20230313154955.4268-1-rf@opensource.cirrus.com>
From: Simon Trimmer <simont@opensource.cirrus.com>
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 <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
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;
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 = &cs_dsp_halo_ops;
+ if (dsp->no_core_startstop)
+ dsp->ops = &cs_dsp_halo_ao_ops;
+ else
+ dsp->ops = &cs_dsp_halo_ops;
return cs_dsp_common_init(dsp);
}
@@ -3187,6 +3191,14 @@ static const struct cs_dsp_ops cs_dsp_halo_ops = {
.stop_core = cs_dsp_halo_stop_core,
};
+static const struct cs_dsp_ops cs_dsp_halo_ao_ops = {
+ .parse_sizes = cs_dsp_adsp2_parse_sizes,
+ .validate_version = cs_dsp_halo_validate_version,
+ .setup_algs = cs_dsp_halo_setup_algs,
+ .region_to_reg = cs_dsp_halo_region_to_reg,
+ .show_fw_status = 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/firmware/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;
struct list_head alg_regions;
--
2.30.2
next prev parent reply other threads:[~2023-03-13 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 15:49 [PATCH v2 0/8] ASoC: Initial support for Cirrus Logic CS35L56 Richard Fitzgerald
2023-03-13 15:49 ` Richard Fitzgerald [this message]
2023-03-13 15:49 ` [PATCH v2 2/8] ASoC: wm_adsp: Use no_core_startstop to prevent creating preload control Richard Fitzgerald
2023-03-13 15:49 ` [PATCH v2 3/8] firmware: cs_dsp: Support DSPs that don't require firmware download Richard Fitzgerald
2023-03-13 15:49 ` [PATCH v2 4/8] ASoC: wm_adsp: " Richard Fitzgerald
2023-03-13 15:49 ` [PATCH v2 5/8] ASoC: wm_adsp: Expose the DSP boot work actions as wm_adsp_power_up() Richard Fitzgerald
2023-03-13 15:49 ` [PATCH v2 6/8] ASoC: wm_adsp: Add support for loading bin files without wmfw Richard Fitzgerald
2023-03-13 15:49 ` [PATCH v2 7/8] ASoC: wm_adsp: Simplify the logging of requested firmware files Richard Fitzgerald
2023-03-13 15:49 ` [PATCH v2 8/8] ASoC: cs35l56: Add driver for Cirrus Logic CS35L56 Richard Fitzgerald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230313154955.4268-2-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=simont@opensource.cirrus.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox