Skip to content

Commit 9b33a4f

Browse files
rfvirgilbroonie
authored andcommitted
firmware: cs_dsp: Add KUnit testing of control cache
Add KUnit test cases for the caching of control content. The test cases can be divided into four groups: 1) The cache is correctly initialized when the firmware is first downloaded. 2) Reads return the correct data. 3) Writes update the registers and cache. 4) If a value has been written to the control it is retained in the cache and written out to the registers when the firmware is started. There are multiple test suites to cover: - V1 and V2 format files on 16-bit and 32-bit ADSP2. - V3 format files on Halo Core DSPs. V1 format files, and some V2 format files, didn't provide access flags for the controls. There are a couple of test cases for unspecified flags to ensure backwards compatibility with the original implementation of these older firmware versions. The obsolete V0 format does not have controls, so no testing of that format is needed. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-9-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 83baecd commit 9b33a4f

2 files changed

Lines changed: 3283 additions & 0 deletions

File tree

drivers/firmware/cirrus/test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ cs_dsp_test_utils-objs := \
1111
cs_dsp_test-objs := \
1212
cs_dsp_test_bin.o \
1313
cs_dsp_test_control_parse.o \
14+
cs_dsp_test_control_cache.o \
1415
cs_dsp_test_wmfw.o \
1516
cs_dsp_tests.o
1617

0 commit comments

Comments
 (0)