Lines Matching +full:self +full:- +full:describing
7 * ( by Andrey Volkov <avolkov@varma-el.com> )
8 * Copyright (C) 2003-2004 MontaVista, Software, Inc.
20 * struct bcom_bd - Structure describing a generic BestComm buffer descriptor
38 * struct bcom_task - Structure describing a loaded BestComm task
40 * This structure is never built by the driver it self. It's built and
67 * bcom_enable - Enable a BestComm task
76 * bcom_disable - Disable a BestComm task
86 * bcom_get_task_irq - Returns the irq number of a BestComm task
91 return tsk->irq; in bcom_get_task_irq()
100 /** _bcom_next_index - Get next input index.
108 return ((tsk->index + 1) == tsk->num_bd) ? 0 : tsk->index + 1; in _bcom_next_index()
111 /** _bcom_next_outdex - Get next output index.
119 return ((tsk->outdex + 1) == tsk->num_bd) ? 0 : tsk->outdex + 1; in _bcom_next_outdex()
123 * bcom_queue_empty - Checks if a BestComm task BD queue is empty
129 return tsk->index == tsk->outdex; in bcom_queue_empty()
133 * bcom_queue_full - Checks if a BestComm task BD queue is full
139 return tsk->outdex == _bcom_next_index(tsk); in bcom_queue_full()
143 * bcom_get_bd - Get a BD from the queue
152 return ((void *)tsk->bd) + (index * tsk->bd_size); in bcom_get_bd()
156 * bcom_buffer_done - Checks if a BestComm
166 bd = bcom_get_bd(tsk, tsk->outdex); in bcom_buffer_done()
167 return !(bd->status & BCOM_BD_READY); in bcom_buffer_done()
171 * bcom_prepare_next_buffer - clear status of next available buffer.
181 bd = bcom_get_bd(tsk, tsk->index); in bcom_prepare_next_buffer()
182 bd->status = 0; /* cleanup last status */ in bcom_prepare_next_buffer()
189 struct bcom_bd *bd = bcom_get_bd(tsk, tsk->index); in bcom_submit_next_buffer()
191 tsk->cookie[tsk->index] = cookie; in bcom_submit_next_buffer()
192 mb(); /* ensure the bd is really up-to-date */ in bcom_submit_next_buffer()
193 bd->status |= BCOM_BD_READY; in bcom_submit_next_buffer()
194 tsk->index = _bcom_next_index(tsk); in bcom_submit_next_buffer()
195 if (tsk->flags & BCOM_FLAGS_ENABLE_TASK) in bcom_submit_next_buffer()
202 void *cookie = tsk->cookie[tsk->outdex]; in bcom_retrieve_buffer()
203 struct bcom_bd *bd = bcom_get_bd(tsk, tsk->outdex); in bcom_retrieve_buffer()
206 *p_status = bd->status; in bcom_retrieve_buffer()
209 tsk->outdex = _bcom_next_outdex(tsk); in bcom_retrieve_buffer()