summaryrefslogtreecommitdiff
path: root/drivers/firmware/cirrus
diff options
context:
space:
mode:
authorSimon Trimmer <simont@opensource.cirrus.com>2023-03-20 14:22:40 +0300
committerMark Brown <broonie@kernel.org>2023-03-21 15:13:19 +0300
commit107c167419e75213e078e4f2468c0f2f55fdd11a (patch)
tree4fa768a0ae494f06a32a73c9a1bc197128e1e886 /drivers/firmware/cirrus
parent0cd1fd571719e19bd6824a98855382a70e47d932 (diff)
downloadlinux-107c167419e75213e078e4f2468c0f2f55fdd11a.tar.xz
firmware: cs_dsp: Support DSPs that don't require firmware download
When a DSP can self-boot from ROM it is not necessary to download firmware during the powering up sequence. A DSP that required firmware download would fail in a previous configuration step if firmware was not available. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230320112245.115720-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/firmware/cirrus')
-rw-r--r--drivers/firmware/cirrus/cs_dsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 97b73a254380..513136a924cf 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -1301,6 +1301,9 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
int regions = 0;
int ret, offset, type;
+ if (!firmware)
+ return 0;
+
ret = -EINVAL;
pos = sizeof(*header) + sizeof(*adsp1_sizes) + sizeof(*footer);