.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Internal header file for UCC FAST unit routines. |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Authors: Shlomi Gridish <gridish@freescale.com> |
---|
7 | 8 | * Li Yang <leoli@freescale.com> |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify it |
---|
10 | | - * under the terms of the GNU General Public License as published by the |
---|
11 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
12 | | - * option) any later version. |
---|
13 | 9 | */ |
---|
14 | 10 | #ifndef __UCC_FAST_H__ |
---|
15 | 11 | #define __UCC_FAST_H__ |
---|
.. | .. |
---|
41 | 37 | #define R_L_S 0x0800 /* last */ |
---|
42 | 38 | #define R_F_S 0x0400 /* first */ |
---|
43 | 39 | #define R_CM_S 0x0200 /* continuous mode */ |
---|
| 40 | +#define R_LG_S 0x0020 /* frame length */ |
---|
| 41 | +#define R_NO_S 0x0010 /* nonoctet */ |
---|
| 42 | +#define R_AB_S 0x0008 /* abort */ |
---|
44 | 43 | #define R_CR_S 0x0004 /* crc */ |
---|
45 | | -#define R_OV_S 0x0002 /* crc */ |
---|
| 44 | +#define R_OV_S 0x0002 /* overrun */ |
---|
| 45 | +#define R_CD_S 0x0001 /* carrier detect */ |
---|
46 | 46 | |
---|
47 | 47 | /* transmit BD's status */ |
---|
48 | 48 | #define T_R_S 0x8000 /* ready bit */ |
---|
.. | .. |
---|
51 | 51 | #define T_L_S 0x0800 /* last */ |
---|
52 | 52 | #define T_TC_S 0x0400 /* crc */ |
---|
53 | 53 | #define T_TM_S 0x0200 /* continuous mode */ |
---|
| 54 | +#define T_UN_S 0x0002 /* hdlc underrun */ |
---|
| 55 | +#define T_CT_S 0x0001 /* hdlc carrier lost */ |
---|
54 | 56 | |
---|
55 | 57 | /* Rx Data buffer must be 4 bytes aligned in most cases */ |
---|
56 | 58 | #define UCC_FAST_RX_ALIGN 4 |
---|
.. | .. |
---|
176 | 178 | struct ucc_fast_private { |
---|
177 | 179 | struct ucc_fast_info *uf_info; |
---|
178 | 180 | struct ucc_fast __iomem *uf_regs; /* a pointer to the UCC regs. */ |
---|
179 | | - u32 __iomem *p_ucce; /* a pointer to the event register in memory. */ |
---|
180 | | - u32 __iomem *p_uccm; /* a pointer to the mask register in memory. */ |
---|
| 181 | + __be32 __iomem *p_ucce; /* a pointer to the event register in memory. */ |
---|
| 182 | + __be32 __iomem *p_uccm; /* a pointer to the mask register in memory. */ |
---|
181 | 183 | #ifdef CONFIG_UGETH_TX_ON_DEMAND |
---|
182 | | - u16 __iomem *p_utodr; /* pointer to the transmit on demand register */ |
---|
| 184 | + __be16 __iomem *p_utodr;/* pointer to the transmit on demand register */ |
---|
183 | 185 | #endif |
---|
184 | 186 | int enabled_tx; /* Whether channel is enabled for Tx (ENT) */ |
---|
185 | 187 | int enabled_rx; /* Whether channel is enabled for Rx (ENR) */ |
---|
186 | 188 | int stopped_tx; /* Whether channel has been stopped for Tx |
---|
187 | 189 | (STOP_TX, etc.) */ |
---|
188 | 190 | int stopped_rx; /* Whether channel has been stopped for Rx */ |
---|
189 | | - u32 ucc_fast_tx_virtual_fifo_base_offset;/* pointer to base of Tx |
---|
| 191 | + s32 ucc_fast_tx_virtual_fifo_base_offset;/* pointer to base of Tx |
---|
190 | 192 | virtual fifo */ |
---|
191 | | - u32 ucc_fast_rx_virtual_fifo_base_offset;/* pointer to base of Rx |
---|
| 193 | + s32 ucc_fast_rx_virtual_fifo_base_offset;/* pointer to base of Rx |
---|
192 | 194 | virtual fifo */ |
---|
193 | 195 | #ifdef STATISTICS |
---|
194 | 196 | u32 tx_frames; /* Transmitted frames counter. */ |
---|