Lines Matching defs:fmw
3 // tasdevice-fmw.c -- TASDEVICE firmware support
207 int tasdevice_rca_parser(void *context, const struct firmware *fmw)
221 if (!fmw || !fmw->data) {
228 buf = (unsigned char *)fmw->data;
232 if (fw_hdr->img_sz != fmw->size) {
234 "File size not match, %d %u", (int)fmw->size,
320 struct tasdev_blk *block, const struct firmware *fmw, int offset)
322 const unsigned char *data = fmw->data;
324 if (offset + 16 > fmw->size) {
354 if (offset + block->blk_size > fmw->size) {
372 struct tasdevice_data *img_data, const struct firmware *fmw,
375 const unsigned char *data = fmw->data;
379 if (offset + 4 > fmw->size) {
396 offset = fw_parse_block_data_kernel(tas_fmw, blk, fmw, offset);
409 const struct firmware *fmw, int offset)
416 if (offset + 72 > fmw->size) {
425 fmw, offset);
436 struct tasdevice_fw *tas_fmw, const struct firmware *fmw, int offset)
438 const unsigned char *data = fmw->data;
444 if (offset + 80 > fmw->size) {
454 fmw, offset);
464 struct tasdevice_priv *tas_priv, const struct firmware *fmw,
467 struct tasdevice_fw *tas_fmw = tas_priv->fmw;
471 const unsigned char *buf = fmw->data;
475 if (offset + 12 + 4 * TASDEVICE_MAXPROGRAM_NUM_KERNEL > fmw->size) {
548 if (offset + 4 * max_confs > fmw->size) {
771 struct tasdevice_dspfw_hdr *fw_hdr = &(tasdevice->fmw->fw_hdr);
928 const struct firmware *fmw, int offset)
930 const unsigned char *buf = fmw->data;
935 if (offset + len + 8 > fmw->size) {
966 *tas_priv, const struct firmware *fmw, int offset)
968 struct tasdevice_fw *tas_fmw = tas_priv->fmw;
971 offset = fw_parse_variable_hdr(tas_priv, fw_hdr, fmw, offset);
986 struct tasdev_blk *block, const struct firmware *fmw, int offset)
988 unsigned char *data = (unsigned char *)fmw->data;
991 if (offset + 8 > fmw->size) {
1000 if (offset + 8 > fmw->size) {
1025 if (offset + n > fmw->size) {
1028 __func__, (unsigned long)fmw->size, offset, n);
1048 struct tasdevice_data *img_data, const struct firmware *fmw,
1051 const unsigned char *data = (unsigned char *)fmw->data;
1056 if (offset + 64 > fmw->size) {
1066 if (offset + n + 2 > fmw->size) {
1083 offset = fw_parse_block_data(tas_fmw, blk, fmw, offset);
1098 struct tasdevice_fw *tas_fmw, const struct firmware *fmw, int offset)
1100 unsigned char *buf = (unsigned char *)fmw->data;
1104 if (offset + 2 > fmw->size) {
1130 if (offset + 64 > fmw->size) {
1140 if (offset + n > fmw->size) {
1148 offset = fw_parse_data(tas_fmw, &(program->dev_data), fmw,
1164 const struct firmware *fmw, int offset)
1166 unsigned char *data = (unsigned char *)fmw->data;
1171 if (offset + 2 > fmw->size) {
1192 if (offset + 64 > fmw->size) {
1202 if (offset + n > fmw->size) {
1211 fmw, offset);
1786 struct tasdevice_fw *tas_fmw, const struct firmware *fmw, int offset)
1791 const unsigned char *buf = (unsigned char *)fmw->data;
1793 if (offset + 92 > fmw->size) {
1810 if (fw_fixed_hdr->fwsize != fmw->size) {
1812 (unsigned long)fmw->size, fw_fixed_hdr->fwsize);
1827 struct tasdevice_fw *tas_fmw, const struct firmware *fmw, int offset)
1831 offset = fw_parse_variable_hdr(tas_priv, fw_hdr, fmw, offset);
1850 struct tasdevice_fw *tas_fmw, const struct firmware *fmw, int offset)
1853 unsigned char *data = (unsigned char *)fmw->data;
1856 if (offset + 2 > fmw->size) {
1878 if (offset + 64 > fmw->size) {
1889 if (offset + n > fmw->size) {
1896 offset = fw_parse_data(tas_fmw, &(calibration->dev_data), fmw,
1913 struct firmware fmw;
1930 fmw.size = fw_entry->size;
1931 fmw.data = fw_entry->data;
1940 offset = fw_parse_header(tas_priv, tas_fmw, &fmw, offset);
1946 offset = fw_parse_variable_hdr_cal(tas_priv, tas_fmw, &fmw, offset);
1953 offset = fw_parse_program_data(tas_priv, tas_fmw, &fmw, offset);
1959 offset = fw_parse_configuration_data(tas_priv, tas_fmw, &fmw, offset);
1965 offset = fw_parse_calibration_data(tas_priv, tas_fmw, &fmw, offset);
1980 static int tasdevice_dspfw_ready(const struct firmware *fmw,
1989 if (!fmw || !fmw->data) {
1996 tas_priv->fmw = kzalloc(sizeof(struct tasdevice_fw), GFP_KERNEL);
1997 if (!tas_priv->fmw) {
2001 tas_fmw = tas_priv->fmw;
2003 offset = fw_parse_header(tas_priv, tas_fmw, fmw, offset);
2044 offset = tas_priv->fw_parse_variable_header(tas_priv, fmw, offset);
2049 offset = tas_priv->fw_parse_program_data(tas_priv, tas_fmw, fmw,
2056 tas_fmw, fmw, offset);
2190 struct tasdevice_fw *tas_fmw = tas_priv->fmw;
2299 struct tasdevice_fw *tas_fmw = tas_priv->fmw;
2344 struct tasdevice_fw *tas_fmw = tas_priv->fmw;
2403 struct tasdevice_fw *tas_fmw = tas_priv->fmw;