forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
....@@ -25,10 +25,8 @@
2525 #define MLXSW_PCI_CIR_CTRL_STATUS_SHIFT 24
2626 #define MLXSW_PCI_CIR_TIMEOUT_MSECS 1000
2727
28
-#define MLXSW_PCI_SW_RESET 0xF0010
29
-#define MLXSW_PCI_SW_RESET_RST_BIT BIT(0)
30
-#define MLXSW_PCI_SW_RESET_TIMEOUT_MSECS 20000
31
-#define MLXSW_PCI_SW_RESET_WAIT_MSECS 100
28
+#define MLXSW_PCI_SW_RESET_TIMEOUT_MSECS 900000
29
+#define MLXSW_PCI_SW_RESET_WAIT_MSECS 400
3230 #define MLXSW_PCI_FW_READY 0xA1844
3331 #define MLXSW_PCI_FW_READY_MASK 0xFFFF
3432 #define MLXSW_PCI_FW_READY_MAGIC 0x5E
....@@ -43,10 +41,18 @@
4341 #define MLXSW_PCI_DOORBELL(offset, type_offset, num) \
4442 ((offset) + (type_offset) + (num) * 4)
4543
44
+#define MLXSW_PCI_FREE_RUNNING_CLOCK_H(offset) (offset)
45
+#define MLXSW_PCI_FREE_RUNNING_CLOCK_L(offset) ((offset) + 4)
46
+
4647 #define MLXSW_PCI_CQS_MAX 96
4748 #define MLXSW_PCI_EQS_COUNT 2
4849 #define MLXSW_PCI_EQ_ASYNC_NUM 0
4950 #define MLXSW_PCI_EQ_COMP_NUM 1
51
+
52
+#define MLXSW_PCI_SDQS_MIN 2 /* EMAD and control traffic */
53
+#define MLXSW_PCI_SDQ_EMAD_INDEX 0
54
+#define MLXSW_PCI_SDQ_EMAD_TC 0
55
+#define MLXSW_PCI_SDQ_CTL_TC 3
5056
5157 #define MLXSW_PCI_AQ_PAGES 8
5258 #define MLXSW_PCI_AQ_SIZE (MLXSW_PCI_PAGE_SIZE * MLXSW_PCI_AQ_PAGES)
....@@ -170,7 +176,7 @@
170176 /* pci_cqe_trap_id
171177 * Trap ID that captured the packet.
172178 */
173
-MLXSW_ITEM32(pci, cqe, trap_id, 0x08, 0, 9);
179
+MLXSW_ITEM32(pci, cqe, trap_id, 0x08, 0, 10);
174180
175181 /* pci_cqe_crc
176182 * Length include CRC. Indicates the length field includes
....@@ -202,6 +208,16 @@
202208 MLXSW_ITEM32(pci, cqe12, dqn, 0x0C, 1, 6);
203209 mlxsw_pci_cqe_item_helpers(dqn, 0, 12, 12);
204210
211
+/* pci_cqe_user_def_val_orig_pkt_len
212
+ * When trap_id is an ACL: User defined value from policy engine action.
213
+ */
214
+MLXSW_ITEM32(pci, cqe2, user_def_val_orig_pkt_len, 0x14, 0, 20);
215
+
216
+/* pci_cqe_mirror_reason
217
+ * Mirror reason.
218
+ */
219
+MLXSW_ITEM32(pci, cqe2, mirror_reason, 0x18, 24, 8);
220
+
205221 /* pci_cqe_owner
206222 * Ownership bit.
207223 */
....@@ -222,7 +238,7 @@
222238 MLXSW_ITEM32(pci, eqe, event_sub_type, 0x0C, 16, 8);
223239
224240 /* pci_eqe_cqn
225
- * Completion Queue that triggeret this EQE.
241
+ * Completion Queue that triggered this EQE.
226242 */
227243 MLXSW_ITEM32(pci, eqe, cqn, 0x0C, 8, 7);
228244