summaryrefslogtreecommitdiffstats
path: root/include/linux/firmware
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2021-11-17 13:22:53 +0000
committerMark Brown <broonie@kernel.org>2021-11-17 22:16:21 +0000
commit2925748eadc33cba3bded7b69475a1b002b124ac (patch)
treeec7130df3cbf7ab0d164d820a7141374f2585ecf /include/linux/firmware
parent5065cfabec21a4acf562932f1d0a814c119e0a69 (diff)
downloadlinux-2925748eadc33cba3bded7b69475a1b002b124ac.tar.bz2
firmware: cs_dsp: Add version checks on coefficient loading
The firmware coefficient files contain version information that is currently ignored by the cs_dsp code. This information specifies which version of the firmware the coefficient were generated for. Add a check into the code which prints a warning in the case the coefficient and firmware differ in version, in many cases this will be ok but it is not always, so best to let the user know there is a potential issue. Co-authored-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211117132300.1290-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/firmware')
-rw-r--r--include/linux/firmware/cirrus/cs_dsp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/firmware/cirrus/cs_dsp.h b/include/linux/firmware/cirrus/cs_dsp.h
index 3a54b1afc48f..ce54705e2bec 100644
--- a/include/linux/firmware/cirrus/cs_dsp.h
+++ b/include/linux/firmware/cirrus/cs_dsp.h
@@ -54,12 +54,14 @@ struct cs_dsp_region {
* struct cs_dsp_alg_region - Describes a logical algorithm region in DSP address space
* @list: List node for internal use
* @alg: Algorithm id
+ * @ver: Expected algorithm version
* @type: Memory region type
* @base: Address of region
*/
struct cs_dsp_alg_region {
struct list_head list;
unsigned int alg;
+ unsigned int ver;
int type;
unsigned int base;
};