18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef BCM63XX_IUDMA_H_ 38c2ecf20Sopenharmony_ci#define BCM63XX_IUDMA_H_ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/types.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* 88c2ecf20Sopenharmony_ci * rx/tx dma descriptor 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_cistruct bcm_enet_desc { 118c2ecf20Sopenharmony_ci u32 len_stat; 128c2ecf20Sopenharmony_ci u32 address; 138c2ecf20Sopenharmony_ci}; 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* control */ 168c2ecf20Sopenharmony_ci#define DMADESC_LENGTH_SHIFT 16 178c2ecf20Sopenharmony_ci#define DMADESC_LENGTH_MASK (0xfff << DMADESC_LENGTH_SHIFT) 188c2ecf20Sopenharmony_ci#define DMADESC_OWNER_MASK (1 << 15) 198c2ecf20Sopenharmony_ci#define DMADESC_EOP_MASK (1 << 14) 208c2ecf20Sopenharmony_ci#define DMADESC_SOP_MASK (1 << 13) 218c2ecf20Sopenharmony_ci#define DMADESC_ESOP_MASK (DMADESC_EOP_MASK | DMADESC_SOP_MASK) 228c2ecf20Sopenharmony_ci#define DMADESC_WRAP_MASK (1 << 12) 238c2ecf20Sopenharmony_ci#define DMADESC_USB_NOZERO_MASK (1 << 1) 248c2ecf20Sopenharmony_ci#define DMADESC_USB_ZERO_MASK (1 << 0) 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* status */ 278c2ecf20Sopenharmony_ci#define DMADESC_UNDER_MASK (1 << 9) 288c2ecf20Sopenharmony_ci#define DMADESC_APPEND_CRC (1 << 8) 298c2ecf20Sopenharmony_ci#define DMADESC_OVSIZE_MASK (1 << 4) 308c2ecf20Sopenharmony_ci#define DMADESC_RXER_MASK (1 << 2) 318c2ecf20Sopenharmony_ci#define DMADESC_CRC_MASK (1 << 1) 328c2ecf20Sopenharmony_ci#define DMADESC_OV_MASK (1 << 0) 338c2ecf20Sopenharmony_ci#define DMADESC_ERR_MASK (DMADESC_UNDER_MASK | \ 348c2ecf20Sopenharmony_ci DMADESC_OVSIZE_MASK | \ 358c2ecf20Sopenharmony_ci DMADESC_RXER_MASK | \ 368c2ecf20Sopenharmony_ci DMADESC_CRC_MASK | \ 378c2ecf20Sopenharmony_ci DMADESC_OV_MASK) 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#endif /* ! BCM63XX_IUDMA_H_ */ 40