Lines Matching refs:module

90 static int skl_get_pvtid_map(struct uuid_module *module, int instance_id)
94 for (pvt_id = 0; pvt_id < module->max_instance; pvt_id++) {
95 if (module->instance_id[pvt_id] == instance_id)
104 struct uuid_module *module;
106 list_for_each_entry(module, &skl->uuid_list, list) {
107 if (module->id == module_id)
108 return skl_get_pvtid_map(module, instance_id);
115 static inline int skl_getid_32(struct uuid_module *module, u64 *val,
121 max_inst = module->max_instance;
136 static inline int skl_pvtid_128(struct uuid_module *module)
144 pvt_id = skl_getid_32(module, &module->pvt_id[j],
150 if ((word1_mask + word2_mask) >= module->max_instance)
155 if (word2_mask >= module->max_instance)
163 * skl_get_pvt_id: generate a private id for use as module id
166 * @uuid_mod: module's uuid
167 * @instance_id: module's instance id
169 * This generates a 128 bit private unique id for a module TYPE so that
170 * module instance is unique
174 struct uuid_module *module;
177 list_for_each_entry(module, &skl->uuid_list, list) {
178 if (guid_equal(uuid_mod, &module->uuid)) {
180 pvt_id = skl_pvtid_128(module);
182 module->instance_id[pvt_id] = instance_id;
197 * @uuid_mod: module's uuid
198 * @pvt_id: module pvt id
205 struct uuid_module *module;
207 list_for_each_entry(module, &skl->uuid_list, list) {
208 if (guid_equal(uuid_mod, &module->uuid)) {
215 module->pvt_id[i] &= ~(1 << (*pvt_id));
226 * Parse the firmware binary to get the UUID, module id
237 struct uuid_module *module;
259 /* check 1st module entry is in file */
262 dev_err(ctx->dev, "Small fw file size, No module entry\n");
283 * for the module.
287 module = kzalloc(sizeof(*module), GFP_KERNEL);
288 if (!module) {
293 import_guid(&module->uuid, mod_entry->uuid);
295 module->id = (i | (index << 12));
296 module->is_loadable = mod_entry->type.load_type;
297 module->max_instance = mod_entry->instance_max_count;
299 module->instance_id = devm_kzalloc(ctx->dev, size, GFP_KERNEL);
300 if (!module->instance_id) {
302 kfree(module);
306 list_add_tail(&module->list, &skl->uuid_list);
310 &module->uuid, module->id, module->is_loadable);
334 * Get the module id for the module by checking
335 * the table for the UUID for the module