Lines Matching +full:tx +full:- +full:enable
1 /* SPDX-License-Identifier: GPL-2.0 */
15 #define GLOB_MSIZE 0x0cUL /* Local-memory Size */
22 #define GLOB_CTRL_EPAR 0x00000020 /* Enable parity */
45 /* The following registers are for per-qe channel information/status. */
49 #define CREG_TXDS 0x0cUL /* TX descriptor ring ptr */
51 #define CREG_TIMASK 0x14UL /* TX Interrupt Mask */
56 #define CREG_TXWBUFPTR 0x28UL /* Local memory tx write ptr */
57 #define CREG_TXRBUFPTR 0x2cUL /* Local memory tx read ptr */
59 #define CREG_PIPG 0x34UL /* Inter-Frame Gap */
69 #define CREG_STAT_LCOLL 0x02000000 /* Late TX Collision */
74 #define CREG_STAT_CCOFLOW 0x00100000 /* TX Coll-counter Overflow */
75 #define CREG_STAT_TXDERROR 0x00080000 /* TX Descriptor is bogus */
79 #define CREG_STAT_RCCOFLOW 0x00001000 /* RX Coll-counter Overflow */
85 #define CREG_STAT_CECOFLOW 0x00000040 /* CRC Error-counter Overflow*/
104 #define CREG_QMASK_TXLERR 0x00040000 /* TX late error */
105 #define CREG_QMASK_TXPERR 0x00020000 /* TX parity error */
106 #define CREG_QMASK_TXSERR 0x00010000 /* TX sbus error ack */
121 #define CREG_MMASK_RXCOLL 0x00000400 /* RX Coll-Cntr overflow */
125 #define CREG_PIPG_TENAB 0x00000020 /* Enable Throttle */
129 /* Per-channel AMD 79C940 MACE registers. */
146 #define MREGS_CHIPID1 0x10UL /* Chip-ID, low bits */
147 #define MREGS_CHIPID2 0x11UL /* Chip-ID, high bits */
165 #define MREGS_TXFCNTL_DFCS 0x08 /* Disable TX FCS */
166 #define MREGS_TXFCNTL_AUTOPAD 0x01 /* TX auto pad */
168 #define MREGS_TXFSTAT_VALID 0x80 /* TX valid */
169 #define MREGS_TXFSTAT_UNDERFLOW 0x40 /* TX underflow */
170 #define MREGS_TXFSTAT_LCOLL 0x20 /* TX late collision */
171 #define MREGS_TXFSTAT_MRETRY 0x10 /* TX > 1 retries */
172 #define MREGS_TXFSTAT_ORETRY 0x08 /* TX 1 retry */
173 #define MREGS_TXFSTAT_PDEFER 0x04 /* TX pkt deferred */
174 #define MREGS_TXFSTAT_CLOSS 0x02 /* TX carrier lost */
175 #define MREGS_TXFSTAT_RERROR 0x01 /* TX retry error */
177 #define MREGS_TXRCNT_EDEFER 0x80 /* TX Excess defers */
178 #define MREGS_TXRCNT_CMASK 0x0f /* TX retry count */
191 #define MREGS_FFCNT_TX 0x0f /* TX FIFO frame cnt */
200 #define MREGS_IREG_TXIRQ 0x01 /* IRQ TX'd a packet */
206 #define MREGS_IMASK_TXIRQ 0x01 /* IMASK TX interrupts */
208 #define MREGS_POLL_TXVALID 0x80 /* TX is valid */
209 #define MREGS_POLL_TDTR 0x40 /* TX data transfer request */
217 #define MREGS_BCONFIG_RESET 0x01 /* SW-Reset the MACE */
219 #define MREGS_FCONFIG_TXF8 0x00 /* TX fifo 8 write cycles */
220 #define MREGS_FCONFIG_TXF32 0x80 /* TX fifo 32 write cycles */
221 #define MREGS_FCONFIG_TXF16 0x40 /* TX fifo 16 write cycles */
225 #define MREGS_FCONFIG_TFWU 0x08 /* TX fifo watermark update */
227 #define MREGS_FCONFIG_TBENAB 0x02 /* TX burst enable */
228 #define MREGS_FCONFIG_RBENAB 0x01 /* RX burst enable */
230 #define MREGS_MCONFIG_PROMISC 0x80 /* Promiscuous mode enable */
231 #define MREGS_MCONFIG_TPDDISAB 0x40 /* TX 2part deferral enable */
232 #define MREGS_MCONFIG_MBAENAB 0x20 /* Modified backoff enable */
235 #define MREGS_MCONFIG_TXENAB 0x02 /* Enable transmitter */
236 #define MREGS_MCONFIG_RXENAB 0x01 /* Enable receiver */
238 #define MREGS_PLSCONFIG_TXMS 0x08 /* TX mode select */
243 #define MREGS_PLSCONFIG_IOENAB 0x01 /* PLS I/O enable */
250 #define MREGS_PHYCONFIG_AUTO 0x04 /* Connector port auto-sel */
258 #define MREGS_UTEST_RTRENAB 0x80 /* Enable resv test register */
262 #define MREGS_UTEST_FCSENAB 0x08 /* Enable FCS on RX */
294 #define NEXT_RX(num) (((num) + 1) & (RX_RING_MAXSIZE - 1))
295 #define NEXT_TX(num) (((num) + 1) & (TX_RING_MAXSIZE - 1))
296 #define PREV_RX(num) (((num) - 1) & (RX_RING_MAXSIZE - 1))
297 #define PREV_TX(num) (((num) - 1) & (TX_RING_MAXSIZE - 1))
300 (((qp)->tx_old <= (qp)->tx_new) ? \
301 (qp)->tx_old + (TX_RING_SIZE - 1) - (qp)->tx_new : \
302 (qp)->tx_old - (qp)->tx_new - 1)
310 ((__u32)((unsigned long)(&(((struct qe_init_block *)0)->mem[elem]))))
332 ((__u32)((unsigned long)(&(((struct sunqe_buffers *)0)->mem[elem][0]))))
335 void __iomem *qcregs; /* QEC per-channel Registers */
336 void __iomem *mregs; /* Per-channel MACE Registers */
337 struct qe_init_block *qe_block; /* RX and TX descriptors */
338 dma_addr_t qblock_dvma; /* RX and TX descriptors */
341 int tx_new, tx_old; /* TX ring extents */