Lines Matching +full:layer +full:- +full:buffer +full:- +full:offset
1 /*-
10 found at http://www.gnu.org/licenses/gpl-2.0.html
60 /* *INDENT-OFF* */
64 /* *INDENT-ON* */
78 /* Statistics - TBD */
88 /* TX Meta, used by upper layer */
132 /* TX/RX descriptor Target-ID field (in the buffer address 64 bit field) */
158 /** Basic Buffer structure */
160 al_phys_addr_t addr; /**< Buffer physical address */
161 uint32_t len; /**< Buffer lenght in bytes */
170 * Target-ID to be assigned to the block descriptors
171 * Requires Target-ID in descriptor to be enabled for the specific UDMA
194 /** UDMA Q specific parameters from upper layer */
225 /** UDMA parameters from upper layer */
230 const char *name; /**< the upper layer must keep the string area */
247 * equals to size - 1
322 * @param udma_params udma parameters from upper layer
324 * @return 0 on success. -EINVAL otherwise.
336 * -EINVAL if the qid is out of range
337 * -EIO if queue was already initialized
370 * @return 0 on success. -EINVAL otherwise.
407 uint16_t tmp = udma_q->next_cdesc_idx - (udma_q->next_desc_idx + 1); in al_udma_available_get()
408 tmp &= udma_q->size_mask; in al_udma_available_get()
423 if (((udma_q->next_cdesc_idx - udma_q->next_desc_idx) & in al_udma_is_empty()
424 udma_q->size_mask) == 0) in al_udma_is_empty()
443 next_desc_idx = udma_q->next_desc_idx; in al_udma_desc_get()
444 desc = udma_q->desc_base_ptr + next_desc_idx; in al_udma_desc_get()
449 udma_q->next_desc_idx = next_desc_idx & udma_q->size_mask; in al_udma_desc_get()
468 ring_id = udma_q->desc_ring_id; in al_udma_ring_id_get()
472 if (unlikely(udma_q->next_desc_idx) == 0) in al_udma_ring_id_get()
473 udma_q->desc_ring_id = (udma_q->desc_ring_id + 1) & in al_udma_ring_id_get()
478 /* add DMA action - trigger the engine */
493 al_assert((num > 0) && (num <= udma_q->size)); in al_udma_desc_action_add()
495 addr = &udma_q->q_regs->rings.drtp_inc; in al_udma_desc_action_add()
513 * return pointer to the cdesc + offset desciptors. wrap around when needed.
517 * @param offset offset desciptors
523 uint32_t offset) in al_cdesc_next() argument
525 volatile uint8_t *tmp = (volatile uint8_t *) cdesc + offset * udma_q->cdesc_size; in al_cdesc_next()
530 if (unlikely((tmp > udma_q->end_cdesc_ptr))) in al_cdesc_next()
532 (udma_q->cdesc_base_ptr + in al_cdesc_next()
533 (tmp - udma_q->end_cdesc_ptr - udma_q->cdesc_size)); in al_cdesc_next()
553 == udma_q->comp_ring_id) in al_udma_new_cdesc()
574 if (unlikely(((volatile uint8_t *) cdesc == udma_q->end_cdesc_ptr))) { in al_cdesc_next_update()
575 udma_q->comp_ring_id = in al_cdesc_next_update()
576 (udma_q->comp_ring_id + 1) & DMA_RING_ID_MASK; in al_cdesc_next_update()
577 return (union al_udma_cdesc *) udma_q->cdesc_base_ptr; in al_cdesc_next_update()
579 return (volatile union al_udma_cdesc *) ((volatile uint8_t *) cdesc + udma_q->cdesc_size); in al_cdesc_next_update()
597 * considered as used, that means the upper layer is safe to access those
607 ((volatile union al_udma_cdesc *) ((udma_q)->cdesc_base_ptr + \
608 (idx) * (udma_q)->cdesc_size))
620 * considered as used, that means the upper layer is safe to access those
632 udma_q->comp_head_idx = (uint16_t) in al_udma_cdesc_get_all()
633 (al_reg_read32(&udma_q->q_regs->rings.crhp) & in al_udma_cdesc_get_all()
636 count = (udma_q->comp_head_idx - udma_q->next_cdesc_idx) & in al_udma_cdesc_get_all()
637 udma_q->size_mask; in al_udma_cdesc_get_all()
640 *cdesc = al_udma_cdesc_idx_to_ptr(udma_q, udma_q->next_cdesc_idx); in al_udma_cdesc_get_all()
646 * acknowledge the driver that the upper layer completed processing completion
658 udma_q->next_cdesc_idx += num; in al_udma_cdesc_ack()
659 udma_q->next_cdesc_idx &= udma_q->size_mask; in al_udma_cdesc_ack()
664 /* *INDENT-OFF* */
668 /* *INDENT-ON* */