forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
....@@ -1,17 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*******************************************************************************
23 Copyright (C) 2007-2009 STMicroelectronics Ltd
34
4
- This program is free software; you can redistribute it and/or modify it
5
- under the terms and conditions of the GNU General Public License,
6
- version 2, as published by the Free Software Foundation.
7
-
8
- This program is distributed in the hope it will be useful, but WITHOUT
9
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
- more details.
12
-
13
- The full GNU General Public License is included in this distribution in
14
- the file called "COPYING".
155
166 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
177 *******************************************************************************/
....@@ -86,10 +76,10 @@
8676 #define LPI_CTRL_STATUS_TLPIEN 0x00000001 /* Transmit LPI Entry */
8777
8878 /* GMAC HW ADDR regs */
89
-#define GMAC_ADDR_HIGH(reg) (((reg > 15) ? 0x00000800 : 0x00000040) + \
90
- (reg * 8))
91
-#define GMAC_ADDR_LOW(reg) (((reg > 15) ? 0x00000804 : 0x00000044) + \
92
- (reg * 8))
79
+#define GMAC_ADDR_HIGH(reg) ((reg > 15) ? 0x00000800 + (reg - 16) * 8 : \
80
+ 0x00000040 + (reg * 8))
81
+#define GMAC_ADDR_LOW(reg) ((reg > 15) ? 0x00000804 + (reg - 16) * 8 : \
82
+ 0x00000044 + (reg * 8))
9383 #define GMAC_MAX_PERFECT_ADDRESSES 1
9484
9585 #define GMAC_PCS_BASE 0x000000c0 /* PCS register base */
....@@ -146,6 +136,7 @@
146136 #define GMAC_FRAME_FILTER_DAIF 0x00000008 /* DA Inverse Filtering */
147137 #define GMAC_FRAME_FILTER_PM 0x00000010 /* Pass all multicast */
148138 #define GMAC_FRAME_FILTER_DBF 0x00000020 /* Disable Broadcast frames */
139
+#define GMAC_FRAME_FILTER_PCF 0x00000080 /* Pass Control frames */
149140 #define GMAC_FRAME_FILTER_SAIF 0x00000100 /* Inverse Filtering */
150141 #define GMAC_FRAME_FILTER_SAF 0x00000200 /* Source Address Filter */
151142 #define GMAC_FRAME_FILTER_HPF 0x00000400 /* Hash or perfect Filter */