firmware: cs_dsp: Add memory chunk helpers
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 22 Jul 2022 09:48:51 +0000 (10:48 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 22 Jul 2022 12:40:00 +0000 (13:40 +0100)
commita4b976552f122ea851f556769874022cf097741e
treeb0e61e348dee1be63815ff576360fa883aa24698
parentdea997733575c5793ca77e166bbbf89097987eb4
firmware: cs_dsp: Add memory chunk helpers

Add helpers that can be layered on top of a buffer read from or to be
written to the DSP to faciliate accessing datastructures within the DSP
memory. These functions handle adding the padding bytes for the DSP,
converting to big endian, and packing arbitrary length data.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220722094851.92521-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c
include/linux/firmware/cirrus/cs_dsp.h