Lines Matching refs:p_ptt

117 	struct ecore_ptt *p_ptt;
121 p_ptt = &p_hwfn->p_ptt_pool->ptts[i];
122 p_ptt->pxp.offset = ECORE_BAR_INVALID_OFFSET;
137 struct ecore_ptt *p_ptt;
145 p_ptt = OSAL_LIST_FIRST_ENTRY(&p_hwfn->p_ptt_pool->free_list,
147 OSAL_LIST_REMOVE_ENTRY(&p_ptt->list_entry,
153 "allocated ptt %d\n", p_ptt->idx);
155 return p_ptt;
167 struct ecore_ptt *p_ptt) {
172 OSAL_LIST_PUSH_HEAD(&p_ptt->list_entry, &p_hwfn->p_ptt_pool->free_list);
176 static u32 ecore_ptt_get_hw_addr(struct ecore_ptt *p_ptt)
179 return OSAL_LE32_TO_CPU(p_ptt->pxp.offset) << 2;
182 static u32 ecore_ptt_config_addr(struct ecore_ptt *p_ptt)
185 p_ptt->idx * sizeof(struct pxp_ptt_entry);
188 u32 ecore_ptt_get_bar_addr(struct ecore_ptt *p_ptt)
191 p_ptt->idx * PXP_EXTERNAL_BAR_PF_WINDOW_SINGLE_SIZE;
195 struct ecore_ptt *p_ptt,
200 prev_hw_addr = ecore_ptt_get_hw_addr(p_ptt);
208 p_ptt->idx, new_hw_addr);
211 p_ptt->pxp.offset = OSAL_CPU_TO_LE32(new_hw_addr >> 2);
214 ecore_ptt_config_addr(p_ptt) +
216 OSAL_LE32_TO_CPU(p_ptt->pxp.offset));
220 struct ecore_ptt *p_ptt,
223 u32 win_hw_addr = ecore_ptt_get_hw_addr(p_ptt);
228 if (p_ptt->hwfn_id != p_hwfn->my_id)
231 p_ptt->idx, p_ptt->hwfn_id, p_hwfn->my_id);
236 ecore_ptt_set_win(p_hwfn, p_ptt, hw_addr);
240 return ecore_ptt_get_bar_addr(p_ptt) + offset;
256 struct ecore_ptt *p_ptt)
265 bar_addr = ecore_set_ptt(p_hwfn, p_ptt, GRC_REG_TRACE_FIFO_VALID_DATA);
277 void ecore_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 hw_addr,
283 prev_fifo_err = !ecore_is_reg_fifo_empty(p_hwfn, p_ptt);
285 bar_addr = ecore_set_ptt(p_hwfn, p_ptt, hw_addr);
296 OSAL_WARN(!prev_fifo_err && !ecore_is_reg_fifo_empty(p_hwfn, p_ptt),
301 u32 ecore_rd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 hw_addr)
306 prev_fifo_err = !ecore_is_reg_fifo_empty(p_hwfn, p_ptt);
308 bar_addr = ecore_set_ptt(p_hwfn, p_ptt, hw_addr);
320 OSAL_WARN(!prev_fifo_err && !ecore_is_reg_fifo_empty(p_hwfn, p_ptt),
328 struct ecore_ptt *p_ptt,
343 ecore_ptt_set_win(p_hwfn, p_ptt, hw_addr + done);
344 hw_offset = ecore_ptt_get_bar_addr(p_ptt);
366 struct ecore_ptt *p_ptt,
373 ecore_memcpy_hw(p_hwfn, p_ptt, dest, hw_addr, n, false);
377 struct ecore_ptt *p_ptt,
384 ecore_memcpy_hw(p_hwfn, p_ptt, src, hw_addr, n, true);
388 struct ecore_ptt *p_ptt, u16 fid)
405 p_ptt->pxp.pretend.control = OSAL_CPU_TO_LE16(control);
406 p_ptt->pxp.pretend.fid.concrete_fid.fid = OSAL_CPU_TO_LE16(fid);
409 ecore_ptt_config_addr(p_ptt) +
411 *(u32 *)&p_ptt->pxp.pretend);
415 struct ecore_ptt *p_ptt, u8 port_id)
422 p_ptt->pxp.pretend.control = OSAL_CPU_TO_LE16(control);
425 ecore_ptt_config_addr(p_ptt) +
427 *(u32 *)&p_ptt->pxp.pretend);
431 struct ecore_ptt *p_ptt)
439 p_ptt->pxp.pretend.control = OSAL_CPU_TO_LE16(control);
442 ecore_ptt_config_addr(p_ptt) +
444 *(u32 *)&p_ptt->pxp.pretend);
467 struct ecore_ptt *p_ptt,
483 lock_status = ecore_rd(p_hwfn, p_ptt, hw_lock_cntr_reg);
494 ecore_wr(p_hwfn, p_ptt, hw_lock_cntr_reg + sizeof(u32), resource);
498 lock_status = ecore_rd(p_hwfn, p_ptt, hw_lock_cntr_reg);
518 ecore_wr(p_hwfn, p_ptt, hw_lock_cntr_reg, resource);
524 struct ecore_ptt *p_ptt,
538 lock_status = ecore_rd(p_hwfn, p_ptt, hw_lock_cntr_reg);
549 ecore_wr(p_hwfn, p_ptt, hw_lock_cntr_reg, resource);
650 struct ecore_ptt *p_ptt)
696 ecore_wr(p_hwfn, p_ptt,
702 ecore_wr(p_hwfn, p_ptt,
827 struct ecore_ptt *p_ptt,
881 ecore_dmae_post_command(p_hwfn, p_ptt);
912 struct ecore_ptt *p_ptt,
990 p_ptt,
1010 struct ecore_ptt *p_ptt,
1021 rc = ecore_dmae_execute_command(p_hwfn, p_ptt, source_addr,
1033 struct ecore_ptt *p_ptt,
1044 rc = ecore_dmae_execute_command(p_hwfn, p_ptt, grc_addr_in_dw,
1055 struct ecore_ptt *p_ptt,
1065 rc = ecore_dmae_execute_command(p_hwfn, p_ptt, source_addr,
1092 struct ecore_ptt *p_ptt,
1127 rc = ecore_dmae_host2host(p_hwfn, p_ptt, p_phys, p_phys + size,
1160 void ecore_ppfid_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1165 ecore_fid_pretend(p_hwfn, p_ptt,
1167 ecore_wr(p_hwfn, p_ptt, hw_addr, val);
1168 ecore_fid_pretend(p_hwfn, p_ptt,
1173 u32 ecore_ppfid_rd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1179 ecore_fid_pretend(p_hwfn, p_ptt,
1181 val = ecore_rd(p_hwfn, p_ptt, hw_addr);
1182 ecore_fid_pretend(p_hwfn, p_ptt,