Lines Matching refs:tsk
50 struct bcom_task *tsk; in bcom_task_alloc() local
72 tsk = kzalloc(sizeof(struct bcom_task) + priv_size, GFP_KERNEL); in bcom_task_alloc()
73 if (!tsk) in bcom_task_alloc()
76 tsk->tasknum = tasknum; in bcom_task_alloc()
78 tsk->priv = (void*)tsk + sizeof(struct bcom_task); in bcom_task_alloc()
81 tsk->irq = irq_of_parse_and_map(bcom_eng->ofnode, tsk->tasknum); in bcom_task_alloc()
82 if (!tsk->irq) in bcom_task_alloc()
87 tsk->cookie = kmalloc_array(bd_count, sizeof(void *), in bcom_task_alloc()
89 if (!tsk->cookie) in bcom_task_alloc()
92 tsk->bd = bcom_sram_alloc(bd_count * bd_size, 4, &tsk->bd_pa); in bcom_task_alloc()
93 if (!tsk->bd) in bcom_task_alloc()
95 memset_io(tsk->bd, 0x00, bd_count * bd_size); in bcom_task_alloc()
97 tsk->num_bd = bd_count; in bcom_task_alloc()
98 tsk->bd_size = bd_size; in bcom_task_alloc()
101 return tsk; in bcom_task_alloc()
104 if (tsk) { in bcom_task_alloc()
105 if (tsk->irq) in bcom_task_alloc()
106 irq_dispose_mapping(tsk->irq); in bcom_task_alloc()
107 bcom_sram_free(tsk->bd); in bcom_task_alloc()
108 kfree(tsk->cookie); in bcom_task_alloc()
109 kfree(tsk); in bcom_task_alloc()
119 bcom_task_free(struct bcom_task *tsk) in bcom_task_free() argument
122 bcom_disable_task(tsk->tasknum); in bcom_task_free()
125 bcom_eng->tdt[tsk->tasknum].start = 0; in bcom_task_free()
126 bcom_eng->tdt[tsk->tasknum].stop = 0; in bcom_task_free()
129 irq_dispose_mapping(tsk->irq); in bcom_task_free()
130 bcom_sram_free(tsk->bd); in bcom_task_free()
131 kfree(tsk->cookie); in bcom_task_free()
132 kfree(tsk); in bcom_task_free()
234 bcom_enable(struct bcom_task *tsk) in bcom_enable() argument
236 bcom_enable_task(tsk->tasknum); in bcom_enable()
241 bcom_disable(struct bcom_task *tsk) in bcom_disable() argument
243 bcom_disable_task(tsk->tasknum); in bcom_disable()