/* SPDX-License-Identifier: GPL-2.0-only */ /******************************************************************************* Header File to describe Normal/enhanced descriptor functions used for RING and CHAINED modes.
Copyright(C) 2011 STMicroelectronics Ltd
It defines all the functions used to handle the normal/enhanced descriptors in case of the DMA is configured to work in chained or in ring mode.
Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
*******************************************************************************/
#ifndef __DESC_COM_H__ #define __DESC_COM_H__
/* Specific functions used for Ring mode */
/* Enhanced descriptors */ staticinlinevoid ehn_desc_rx_set_on_ring(struct dma_desc *p, int end, int bfsize)
{ if (bfsize == BUF_SIZE_16KiB)
p->des1 |= cpu_to_le32((BUF_SIZE_8KiB
<< ERDES1_BUFFER2_SIZE_SHIFT)
& ERDES1_BUFFER2_SIZE_MASK);
if (end)
p->des1 |= cpu_to_le32(ERDES1_END_RING);
}
staticinlinevoid enh_desc_end_tx_desc_on_ring(struct dma_desc *p, int end)
{ if (end)
p->des0 |= cpu_to_le32(ETDES0_END_RING); else
p->des0 &= cpu_to_le32(~ETDES0_END_RING);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.