Lines Matching refs:p
16 struct dma_desc *p, void __iomem *ioaddr) in enh_desc_get_tx_status() argument
18 unsigned int tdes0 = le32_to_cpu(p->des0); in enh_desc_get_tx_status()
79 static int enh_desc_get_tx_len(struct dma_desc *p) in enh_desc_get_tx_len() argument
81 return (le32_to_cpu(p->des1) & ETDES1_BUFFER1_SIZE_MASK); in enh_desc_get_tx_len()
118 struct dma_extended_desc *p) in enh_desc_get_ext_status() argument
120 unsigned int rdes0 = le32_to_cpu(p->basic.des0); in enh_desc_get_ext_status()
121 unsigned int rdes4 = le32_to_cpu(p->des4); in enh_desc_get_ext_status()
182 struct dma_desc *p) in enh_desc_get_rx_status() argument
184 unsigned int rdes0 = le32_to_cpu(p->des0); in enh_desc_get_rx_status()
252 static void enh_desc_init_rx_desc(struct dma_desc *p, int disable_rx_ic, in enh_desc_init_rx_desc() argument
257 p->des0 |= cpu_to_le32(RDES0_OWN); in enh_desc_init_rx_desc()
260 p->des1 |= cpu_to_le32(bfsize1 & ERDES1_BUFFER1_SIZE_MASK); in enh_desc_init_rx_desc()
263 ehn_desc_rx_set_on_chain(p); in enh_desc_init_rx_desc()
265 ehn_desc_rx_set_on_ring(p, end, bfsize); in enh_desc_init_rx_desc()
268 p->des1 |= cpu_to_le32(ERDES1_DISABLE_IC); in enh_desc_init_rx_desc()
271 static void enh_desc_init_tx_desc(struct dma_desc *p, int mode, int end) in enh_desc_init_tx_desc() argument
273 p->des0 &= cpu_to_le32(~ETDES0_OWN); in enh_desc_init_tx_desc()
275 enh_desc_end_tx_desc_on_chain(p); in enh_desc_init_tx_desc()
277 enh_desc_end_tx_desc_on_ring(p, end); in enh_desc_init_tx_desc()
280 static int enh_desc_get_tx_owner(struct dma_desc *p) in enh_desc_get_tx_owner() argument
282 return (le32_to_cpu(p->des0) & ETDES0_OWN) >> 31; in enh_desc_get_tx_owner()
285 static void enh_desc_set_tx_owner(struct dma_desc *p) in enh_desc_set_tx_owner() argument
287 p->des0 |= cpu_to_le32(ETDES0_OWN); in enh_desc_set_tx_owner()
290 static void enh_desc_set_rx_owner(struct dma_desc *p, int disable_rx_ic) in enh_desc_set_rx_owner() argument
292 p->des0 |= cpu_to_le32(RDES0_OWN); in enh_desc_set_rx_owner()
295 static int enh_desc_get_tx_ls(struct dma_desc *p) in enh_desc_get_tx_ls() argument
297 return (le32_to_cpu(p->des0) & ETDES0_LAST_SEGMENT) >> 29; in enh_desc_get_tx_ls()
300 static void enh_desc_release_tx_desc(struct dma_desc *p, int mode) in enh_desc_release_tx_desc() argument
302 int ter = (le32_to_cpu(p->des0) & ETDES0_END_RING) >> 21; in enh_desc_release_tx_desc()
304 memset(p, 0, offsetof(struct dma_desc, des2)); in enh_desc_release_tx_desc()
306 enh_desc_end_tx_desc_on_chain(p); in enh_desc_release_tx_desc()
308 enh_desc_end_tx_desc_on_ring(p, ter); in enh_desc_release_tx_desc()
311 static void enh_desc_prepare_tx_desc(struct dma_desc *p, int is_fs, int len, in enh_desc_prepare_tx_desc() argument
315 unsigned int tdes0 = le32_to_cpu(p->des0); in enh_desc_prepare_tx_desc()
318 enh_set_tx_desc_len_on_chain(p, len); in enh_desc_prepare_tx_desc()
320 enh_set_tx_desc_len_on_ring(p, len); in enh_desc_prepare_tx_desc()
346 p->des0 = cpu_to_le32(tdes0); in enh_desc_prepare_tx_desc()
349 static void enh_desc_set_tx_ic(struct dma_desc *p) in enh_desc_set_tx_ic() argument
351 p->des0 |= cpu_to_le32(ETDES0_INTERRUPT); in enh_desc_set_tx_ic()
354 static int enh_desc_get_rx_frame_len(struct dma_desc *p, int rx_coe_type) in enh_desc_get_rx_frame_len() argument
366 return (((le32_to_cpu(p->des0) & RDES0_FRAME_LEN_MASK) in enh_desc_get_rx_frame_len()
370 static void enh_desc_enable_tx_timestamp(struct dma_desc *p) in enh_desc_enable_tx_timestamp() argument
372 p->des0 |= cpu_to_le32(ETDES0_TIME_STAMP_ENABLE); in enh_desc_enable_tx_timestamp()
375 static int enh_desc_get_tx_timestamp_status(struct dma_desc *p) in enh_desc_get_tx_timestamp_status() argument
377 return (le32_to_cpu(p->des0) & ETDES0_TIME_STAMP_STATUS) >> 17; in enh_desc_get_tx_timestamp_status()
385 struct dma_extended_desc *p = (struct dma_extended_desc *)desc; in enh_desc_get_timestamp() local
386 ns = le32_to_cpu(p->des6); in enh_desc_get_timestamp()
388 ns += le32_to_cpu(p->des7) * 1000000000ULL; in enh_desc_get_timestamp()
390 struct dma_desc *p = (struct dma_desc *)desc; in enh_desc_get_timestamp() local
391 ns = le32_to_cpu(p->des2); in enh_desc_get_timestamp()
392 ns += le32_to_cpu(p->des3) * 1000000000ULL; in enh_desc_get_timestamp()
402 struct dma_extended_desc *p = (struct dma_extended_desc *)desc; in enh_desc_get_rx_timestamp_status() local
403 return (le32_to_cpu(p->basic.des0) & RDES0_IPC_CSUM_ERROR) >> 7; in enh_desc_get_rx_timestamp_status()
405 struct dma_desc *p = (struct dma_desc *)desc; in enh_desc_get_rx_timestamp_status() local
406 if ((le32_to_cpu(p->des2) == 0xffffffff) && in enh_desc_get_rx_timestamp_status()
407 (le32_to_cpu(p->des3) == 0xffffffff)) in enh_desc_get_rx_timestamp_status()
438 static void enh_desc_set_addr(struct dma_desc *p, dma_addr_t addr) in enh_desc_set_addr() argument
440 p->des2 = cpu_to_le32(addr); in enh_desc_set_addr()
443 static void enh_desc_clear(struct dma_desc *p) in enh_desc_clear() argument
445 p->des2 = 0; in enh_desc_clear()