net/octeontx2: setup link config based on BP level
[dpdk.git] / drivers / net / qede / base / ecore_hw.c
index 6a79db5..1db39d6 100644 (file)
@@ -12,6 +12,8 @@
 #include "reg_addr.h"
 #include "ecore_utils.h"
 #include "ecore_iov_api.h"
+#include "ecore_gtt_values.h"
+#include "ecore_dev_api.h"
 
 #ifndef ASIC_ONLY
 #define ECORE_EMUL_FACTOR 2000
@@ -78,6 +80,20 @@ enum _ecore_status_t ecore_ptt_pool_alloc(struct ecore_hwfn *p_hwfn)
        return ECORE_SUCCESS;
 }
 
+void ecore_gtt_init(struct ecore_hwfn *p_hwfn)
+{
+       u32 gtt_base;
+       u32 i;
+
+       /* Set the global windows */
+       gtt_base = PXP_PF_WINDOW_ADMIN_START + PXP_PF_WINDOW_ADMIN_GLOBAL_START;
+
+       for (i = 0; i < OSAL_ARRAY_SIZE(pxp_global_win); i++)
+               if (pxp_global_win[i])
+                       REG_WR(p_hwfn, gtt_base + i * PXP_GLOBAL_ENTRY_SIZE,
+                              pxp_global_win[i]);
+}
+
 void ecore_ptt_invalidate(struct ecore_hwfn *p_hwfn)
 {
        struct ecore_ptt *p_ptt;
@@ -696,7 +712,7 @@ static enum _ecore_status_t ecore_dmae_operation_wait(struct ecore_hwfn *p_hwfn)
        while (*p_hwfn->dmae_info.p_completion_word != DMAE_COMPLETION_VAL) {
                OSAL_UDELAY(DMAE_MIN_WAIT_TIME);
                if (++wait_cnt > wait_cnt_limit) {
-                       DP_NOTICE(p_hwfn->p_dev, ECORE_MSG_HW,
+                       DP_NOTICE(p_hwfn->p_dev, false,
                                  "Timed-out waiting for operation to"
                                  " complete. Completion word is 0x%08x"
                                  " expected 0x%08x.\n",
@@ -789,7 +805,7 @@ ecore_dmae_execute_sub_operation(struct ecore_hwfn *p_hwfn,
                              length_dw * sizeof(u32), true);
 
        if (ecore_status != ECORE_SUCCESS) {
-               DP_NOTICE(p_hwfn, ECORE_MSG_HW,
+               DP_NOTICE(p_hwfn, false,
                          "Wait Failed. source_addr 0x%lx, grc_addr 0x%lx, size_in_dwords 0x%x, intermediate buffer 0x%lx.\n",
                          (unsigned long)src_addr, (unsigned long)dst_addr,
                          length_dw,