diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-11-28 03:44:19 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-29 07:01:20 -0500 |
commit | a4c1d7e66719b326431c6e617da07cab0caedbca (patch) | |
tree | 453e958bdb52c05d33687980285da908b75b1da9 /sound/soc/codecs/sigmadsp.c | |
parent | 48afc5272eec2e1a7cf17aee0d2949810a45994a (diff) |
ASoC: SigmaDSP: Move private structs and functions to C file
Move the structs and functions only used by SigmaDSP firmware loader itself
from the header to the C file.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/sigmadsp.c')
-rw-r--r-- | sound/soc/codecs/sigmadsp.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sound/soc/codecs/sigmadsp.c b/sound/soc/codecs/sigmadsp.c index c0ad88516f30..aa223c56b2b6 100644 --- a/sound/soc/codecs/sigmadsp.c +++ b/sound/soc/codecs/sigmadsp.c | |||
@@ -15,6 +15,42 @@ | |||
15 | 15 | ||
16 | #include "sigmadsp.h" | 16 | #include "sigmadsp.h" |
17 | 17 | ||
18 | #define SIGMA_MAGIC "ADISIGM" | ||
19 | |||
20 | struct sigma_firmware_header { | ||
21 | unsigned char magic[7]; | ||
22 | u8 version; | ||
23 | __le32 crc; | ||
24 | } __packed; | ||
25 | |||
26 | enum { | ||
27 | SIGMA_ACTION_WRITEXBYTES = 0, | ||
28 | SIGMA_ACTION_WRITESINGLE, | ||
29 | SIGMA_ACTION_WRITESAFELOAD, | ||
30 | SIGMA_ACTION_DELAY, | ||
31 | SIGMA_ACTION_PLLWAIT, | ||
32 | SIGMA_ACTION_NOOP, | ||
33 | SIGMA_ACTION_END, | ||
34 | }; | ||
35 | |||
36 | struct sigma_action { | ||
37 | u8 instr; | ||
38 | u8 len_hi; | ||
39 | __le16 len; | ||
40 | __be16 addr; | ||
41 | unsigned char payload[]; | ||
42 | } __packed; | ||
43 | |||
44 | struct sigma_firmware { | ||
45 | const struct firmware *fw; | ||
46 | size_t pos; | ||
47 | }; | ||
48 | |||
49 | static inline u32 sigma_action_len(struct sigma_action *sa) | ||
50 | { | ||
51 | return (sa->len_hi << 16) | le16_to_cpu(sa->len); | ||
52 | } | ||
53 | |||
18 | static size_t sigma_action_size(struct sigma_action *sa) | 54 | static size_t sigma_action_size(struct sigma_action *sa) |
19 | { | 55 | { |
20 | size_t payload = 0; | 56 | size_t payload = 0; |