• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/qlnx/qlnxe/

Lines Matching defs:p_hwfn

66 void ecore_init_clear_rt_data(struct ecore_hwfn *p_hwfn)
71 p_hwfn->rt_data.b_valid[i] = false;
74 void ecore_init_store_rt_reg(struct ecore_hwfn *p_hwfn,
78 DP_ERR(p_hwfn,
84 p_hwfn->rt_data.init_val[rt_offset] = val;
85 p_hwfn->rt_data.b_valid[rt_offset] = true;
88 void ecore_init_store_rt_agg(struct ecore_hwfn *p_hwfn,
95 DP_ERR(p_hwfn,
103 p_hwfn->rt_data.init_val[rt_offset + i] = p_val[i];
104 p_hwfn->rt_data.b_valid[rt_offset + i] = true;
108 static enum _ecore_status_t ecore_init_rt(struct ecore_hwfn *p_hwfn,
115 u32 *p_init_val = &p_hwfn->rt_data.init_val[rt_offset];
116 bool *p_valid = &p_hwfn->rt_data.b_valid[rt_offset];
131 ecore_wr(p_hwfn, p_ptt, addr + (i << 2),
141 rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
155 enum _ecore_status_t ecore_init_alloc(struct ecore_hwfn *p_hwfn)
157 struct ecore_rt_data *rt_data = &p_hwfn->rt_data;
159 if (IS_VF(p_hwfn->p_dev))
162 rt_data->b_valid = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
167 rt_data->init_val = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
170 OSAL_FREE(p_hwfn->p_dev, rt_data->b_valid);
178 void ecore_init_free(struct ecore_hwfn *p_hwfn)
180 OSAL_FREE(p_hwfn->p_dev, p_hwfn->rt_data.init_val);
181 p_hwfn->rt_data.init_val = OSAL_NULL;
182 OSAL_FREE(p_hwfn->p_dev, p_hwfn->rt_data.b_valid);
183 p_hwfn->rt_data.b_valid = OSAL_NULL;
186 static enum _ecore_status_t ecore_init_array_dmae(struct ecore_hwfn *p_hwfn,
196 if ((CHIP_REV_IS_SLOW(p_hwfn->p_dev) && (size < 16)) ||
205 ecore_wr(p_hwfn, p_ptt, addr + (i << 2), data[i]);
207 rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
217 static enum _ecore_status_t ecore_init_fill_dmae(struct ecore_hwfn *p_hwfn,
228 return ecore_dmae_host2grc(p_hwfn, p_ptt,
233 static void ecore_init_fill(struct ecore_hwfn *p_hwfn,
240 ecore_wr(p_hwfn, p_ptt, addr, fill);
243 static enum _ecore_status_t ecore_init_cmd_array(struct ecore_hwfn *p_hwfn,
255 struct ecore_dev *p_dev = p_hwfn->p_dev;
273 OSAL_MEMSET(p_hwfn->unzip_buf, 0, max_size);
275 output_len = OSAL_UNZIP_DATA(p_hwfn, input_len,
277 max_size, (u8 *)p_hwfn->unzip_buf);
279 rc = ecore_init_array_dmae(p_hwfn, p_ptt, addr, 0,
281 p_hwfn->unzip_buf,
284 DP_NOTICE(p_hwfn, true,
289 DP_NOTICE(p_hwfn, true,
304 rc = ecore_init_array_dmae(p_hwfn, p_ptt, addr,
316 rc = ecore_init_array_dmae(p_hwfn, p_ptt, addr,
327 static enum _ecore_status_t ecore_init_cmd_wr(struct ecore_hwfn *p_hwfn,
339 DP_NOTICE(p_hwfn, true,
348 ecore_wr(p_hwfn, p_ptt, addr, data);
353 rc = ecore_init_fill_dmae(p_hwfn, p_ptt, addr, data);
355 ecore_init_fill(p_hwfn, p_ptt, addr, 0, data);
358 rc = ecore_init_cmd_array(p_hwfn, p_ptt, p_cmd,
362 rc = ecore_init_rt(p_hwfn, p_ptt, addr,
388 static void ecore_init_cmd_rd(struct ecore_hwfn *p_hwfn,
402 if (CHIP_REV_IS_EMUL(p_hwfn->p_dev))
406 val = ecore_rd(p_hwfn, p_ptt, addr);
422 DP_ERR(p_hwfn, "Invalid poll comparison type %08x\n",
432 val = ecore_rd(p_hwfn, p_ptt, addr);
436 DP_ERR(p_hwfn, "Timeout when polling reg: 0x%08x [ Waiting-for: %08x Got: %08x (comparison %08x)]\n",
443 static enum _ecore_status_t ecore_init_cmd_cb(struct ecore_hwfn *p_hwfn,
451 rc = ecore_dmae_sanity(p_hwfn, p_ptt, "engine_phase");
454 DP_NOTICE(p_hwfn, false, "Unexpected init op callback ID %d\n",
462 static u8 ecore_init_cmd_mode_match(struct ecore_hwfn *p_hwfn,
465 struct ecore_dev *p_dev = p_hwfn->p_dev;
473 return ecore_init_cmd_mode_match(p_hwfn, p_offset, modes) ^ 1;
475 arg1 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
476 arg2 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
479 arg1 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
480 arg2 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
488 static u32 ecore_init_cmd_mode(struct ecore_hwfn *p_hwfn,
493 if (ecore_init_cmd_mode_match(p_hwfn, &offset, modes))
514 enum _ecore_status_t ecore_init_run(struct ecore_hwfn *p_hwfn,
520 struct ecore_dev *p_dev = p_hwfn->p_dev;
530 p_hwfn->unzip_buf = OSAL_ZALLOC(p_hwfn->p_dev, GFP_ATOMIC,
532 if (!p_hwfn->unzip_buf) {
533 DP_NOTICE(p_hwfn, true, "Failed to allocate unzip buffer\n");
544 rc = ecore_init_cmd_wr(p_hwfn, p_ptt, &cmd->write,
549 ecore_init_cmd_rd(p_hwfn, p_ptt, &cmd->read);
553 cmd_num += ecore_init_cmd_mode(p_hwfn, &cmd->if_mode,
570 rc = ecore_init_cmd_cb(p_hwfn, p_ptt, &cmd->callback);
578 OSAL_FREE(p_hwfn->p_dev, p_hwfn->unzip_buf);
579 p_hwfn->unzip_buf = OSAL_NULL;
584 void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
591 if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
603 ecore_wr(p_hwfn, p_ptt,
611 ecore_ptt_invalidate(p_hwfn);
612 val = ecore_rd(p_hwfn, p_ptt,
617 DP_ERR(p_hwfn, "PGLUE_B_REG_INIT_DONE didn't complete\n");
626 REG_WR(p_hwfn, gtt_base + i * PXP_GLOBAL_ENTRY_SIZE,