forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/soc/fsl/qe/ucc_fast.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Internal header file for UCC FAST unit routines.
34 *
....@@ -5,11 +6,6 @@
56 *
67 * Authors: Shlomi Gridish <gridish@freescale.com>
78 * 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.
139 */
1410 #ifndef __UCC_FAST_H__
1511 #define __UCC_FAST_H__
....@@ -41,8 +37,12 @@
4137 #define R_L_S 0x0800 /* last */
4238 #define R_F_S 0x0400 /* first */
4339 #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 */
4443 #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 */
4646
4747 /* transmit BD's status */
4848 #define T_R_S 0x8000 /* ready bit */
....@@ -51,6 +51,8 @@
5151 #define T_L_S 0x0800 /* last */
5252 #define T_TC_S 0x0400 /* crc */
5353 #define T_TM_S 0x0200 /* continuous mode */
54
+#define T_UN_S 0x0002 /* hdlc underrun */
55
+#define T_CT_S 0x0001 /* hdlc carrier lost */
5456
5557 /* Rx Data buffer must be 4 bytes aligned in most cases */
5658 #define UCC_FAST_RX_ALIGN 4
....@@ -176,19 +178,19 @@
176178 struct ucc_fast_private {
177179 struct ucc_fast_info *uf_info;
178180 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. */
181183 #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 */
183185 #endif
184186 int enabled_tx; /* Whether channel is enabled for Tx (ENT) */
185187 int enabled_rx; /* Whether channel is enabled for Rx (ENR) */
186188 int stopped_tx; /* Whether channel has been stopped for Tx
187189 (STOP_TX, etc.) */
188190 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
190192 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
192194 virtual fifo */
193195 #ifdef STATISTICS
194196 u32 tx_frames; /* Transmitted frames counter. */