Lines Matching refs:tsk
53 struct bcom_task *tsk; in bcom_task_alloc() local
75 tsk = kzalloc(sizeof(struct bcom_task) + priv_size, GFP_KERNEL); in bcom_task_alloc()
76 if (!tsk) in bcom_task_alloc()
79 tsk->tasknum = tasknum; in bcom_task_alloc()
81 tsk->priv = (void*)tsk + sizeof(struct bcom_task); in bcom_task_alloc()
84 tsk->irq = irq_of_parse_and_map(bcom_eng->ofnode, tsk->tasknum); in bcom_task_alloc()
85 if (tsk->irq == NO_IRQ) in bcom_task_alloc()
90 tsk->cookie = kmalloc(sizeof(void*) * bd_count, GFP_KERNEL); in bcom_task_alloc()
91 if (!tsk->cookie) in bcom_task_alloc()
94 tsk->bd = bcom_sram_alloc(bd_count * bd_size, 4, &tsk->bd_pa); in bcom_task_alloc()
95 if (!tsk->bd) in bcom_task_alloc()
97 memset(tsk->bd, 0x00, bd_count * bd_size); in bcom_task_alloc()
99 tsk->num_bd = bd_count; in bcom_task_alloc()
100 tsk->bd_size = bd_size; in bcom_task_alloc()
103 return tsk; in bcom_task_alloc()
106 if (tsk) { in bcom_task_alloc()
107 if (tsk->irq != NO_IRQ) in bcom_task_alloc()
108 irq_dispose_mapping(tsk->irq); in bcom_task_alloc()
109 bcom_sram_free(tsk->bd); in bcom_task_alloc()
110 kfree(tsk->cookie); in bcom_task_alloc()
111 kfree(tsk); in bcom_task_alloc()
121 bcom_task_free(struct bcom_task *tsk) in bcom_task_free() argument
124 bcom_disable_task(tsk->tasknum); in bcom_task_free()
127 bcom_eng->tdt[tsk->tasknum].start = 0; in bcom_task_free()
128 bcom_eng->tdt[tsk->tasknum].stop = 0; in bcom_task_free()
131 irq_dispose_mapping(tsk->irq); in bcom_task_free()
132 bcom_sram_free(tsk->bd); in bcom_task_free()
133 kfree(tsk->cookie); in bcom_task_free()
134 kfree(tsk); in bcom_task_free()
236 bcom_enable(struct bcom_task *tsk) in bcom_enable() argument
238 bcom_enable_task(tsk->tasknum); in bcom_enable()
243 bcom_disable(struct bcom_task *tsk) in bcom_disable() argument
245 bcom_disable_task(tsk->tasknum); in bcom_disable()