Lines Matching refs:dsp_code
34 short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, in hpi_dsp_code_open() argument
83 dsp_code->pvt = kmalloc(sizeof(*dsp_code->pvt), GFP_KERNEL); in hpi_dsp_code_open()
84 if (!dsp_code->pvt) { in hpi_dsp_code_open()
89 dsp_code->pvt->dev = dev; in hpi_dsp_code_open()
90 dsp_code->pvt->firmware = firmware; in hpi_dsp_code_open()
91 dsp_code->header = header; in hpi_dsp_code_open()
92 dsp_code->block_length = header.size / sizeof(u32); in hpi_dsp_code_open()
93 dsp_code->word_count = sizeof(header) / sizeof(u32); in hpi_dsp_code_open()
99 dsp_code->block_length = 0; in hpi_dsp_code_open()
104 void hpi_dsp_code_close(struct dsp_code *dsp_code) in hpi_dsp_code_close() argument
107 release_firmware(dsp_code->pvt->firmware); in hpi_dsp_code_close()
108 kfree(dsp_code->pvt); in hpi_dsp_code_close()
112 void hpi_dsp_code_rewind(struct dsp_code *dsp_code) in hpi_dsp_code_rewind() argument
115 dsp_code->word_count = sizeof(struct code_header) / sizeof(u32); in hpi_dsp_code_rewind()
119 short hpi_dsp_code_read_word(struct dsp_code *dsp_code, u32 *pword) in hpi_dsp_code_read_word() argument
121 if (dsp_code->word_count + 1 > dsp_code->block_length) in hpi_dsp_code_read_word()
124 *pword = ((u32 *)(dsp_code->pvt->firmware->data))[dsp_code-> in hpi_dsp_code_read_word()
126 dsp_code->word_count++; in hpi_dsp_code_read_word()
132 struct dsp_code *dsp_code, u32 **ppblock) in hpi_dsp_code_read_block() argument
134 if (dsp_code->word_count + words_requested > dsp_code->block_length) in hpi_dsp_code_read_block()
138 ((u32 *)(dsp_code->pvt->firmware->data)) + in hpi_dsp_code_read_block()
139 dsp_code->word_count; in hpi_dsp_code_read_block()
140 dsp_code->word_count += words_requested; in hpi_dsp_code_read_block()