Lines Matching +full:reg +full:- +full:spacing
1 // SPDX-License-Identifier: GPL-2.0-only
11 * idpf_ctlq_reg_init - initialize default mailbox registers
21 switch (ccq->type) { in idpf_ctlq_reg_init()
24 ccq->reg.head = PF_FW_ATQH; in idpf_ctlq_reg_init()
25 ccq->reg.tail = PF_FW_ATQT; in idpf_ctlq_reg_init()
26 ccq->reg.len = PF_FW_ATQLEN; in idpf_ctlq_reg_init()
27 ccq->reg.bah = PF_FW_ATQBAH; in idpf_ctlq_reg_init()
28 ccq->reg.bal = PF_FW_ATQBAL; in idpf_ctlq_reg_init()
29 ccq->reg.len_mask = PF_FW_ATQLEN_ATQLEN_M; in idpf_ctlq_reg_init()
30 ccq->reg.len_ena_mask = PF_FW_ATQLEN_ATQENABLE_M; in idpf_ctlq_reg_init()
31 ccq->reg.head_mask = PF_FW_ATQH_ATQH_M; in idpf_ctlq_reg_init()
35 ccq->reg.head = PF_FW_ARQH; in idpf_ctlq_reg_init()
36 ccq->reg.tail = PF_FW_ARQT; in idpf_ctlq_reg_init()
37 ccq->reg.len = PF_FW_ARQLEN; in idpf_ctlq_reg_init()
38 ccq->reg.bah = PF_FW_ARQBAH; in idpf_ctlq_reg_init()
39 ccq->reg.bal = PF_FW_ARQBAL; in idpf_ctlq_reg_init()
40 ccq->reg.len_mask = PF_FW_ARQLEN_ARQLEN_M; in idpf_ctlq_reg_init()
41 ccq->reg.len_ena_mask = PF_FW_ARQLEN_ARQENABLE_M; in idpf_ctlq_reg_init()
42 ccq->reg.head_mask = PF_FW_ARQH_ARQH_M; in idpf_ctlq_reg_init()
51 * idpf_mb_intr_reg_init - Initialize mailbox interrupt register
56 struct idpf_intr_reg *intr = &adapter->mb_vector.intr_reg; in idpf_mb_intr_reg_init()
57 u32 dyn_ctl = le32_to_cpu(adapter->caps.mailbox_dyn_ctl); in idpf_mb_intr_reg_init()
59 intr->dyn_ctl = idpf_get_reg_addr(adapter, dyn_ctl); in idpf_mb_intr_reg_init()
60 intr->dyn_ctl_intena_m = PF_GLINT_DYN_CTL_INTENA_M; in idpf_mb_intr_reg_init()
61 intr->dyn_ctl_itridx_m = PF_GLINT_DYN_CTL_ITR_INDX_M; in idpf_mb_intr_reg_init()
62 intr->icr_ena = idpf_get_reg_addr(adapter, PF_INT_DIR_OICR_ENA); in idpf_mb_intr_reg_init()
63 intr->icr_ena_ctlq_m = PF_INT_DIR_OICR_ENA_M; in idpf_mb_intr_reg_init()
67 * idpf_intr_reg_init - Initialize interrupt registers
72 struct idpf_adapter *adapter = vport->adapter; in idpf_intr_reg_init()
73 int num_vecs = vport->num_q_vectors; in idpf_intr_reg_init()
79 total_vecs = idpf_get_reserved_vecs(vport->adapter); in idpf_intr_reg_init()
83 return -ENOMEM; in idpf_intr_reg_init()
87 err = -EINVAL; in idpf_intr_reg_init()
92 struct idpf_q_vector *q_vector = &vport->q_vectors[i]; in idpf_intr_reg_init()
93 u16 vec_id = vport->q_vector_idxs[i] - IDPF_MBX_Q_VEC; in idpf_intr_reg_init()
94 struct idpf_intr_reg *intr = &q_vector->intr_reg; in idpf_intr_reg_init()
95 u32 spacing; in idpf_intr_reg_init() local
97 intr->dyn_ctl = idpf_get_reg_addr(adapter, in idpf_intr_reg_init()
99 intr->dyn_ctl_intena_m = PF_GLINT_DYN_CTL_INTENA_M; in idpf_intr_reg_init()
100 intr->dyn_ctl_intena_msk_m = PF_GLINT_DYN_CTL_INTENA_MSK_M; in idpf_intr_reg_init()
101 intr->dyn_ctl_itridx_s = PF_GLINT_DYN_CTL_ITR_INDX_S; in idpf_intr_reg_init()
102 intr->dyn_ctl_intrvl_s = PF_GLINT_DYN_CTL_INTERVAL_S; in idpf_intr_reg_init()
103 intr->dyn_ctl_wb_on_itr_m = PF_GLINT_DYN_CTL_WB_ON_ITR_M; in idpf_intr_reg_init()
105 spacing = IDPF_ITR_IDX_SPACING(reg_vals[vec_id].itrn_index_spacing, in idpf_intr_reg_init()
109 spacing); in idpf_intr_reg_init()
112 spacing); in idpf_intr_reg_init()
113 intr->rx_itr = idpf_get_reg_addr(adapter, rx_itr); in idpf_intr_reg_init()
114 intr->tx_itr = idpf_get_reg_addr(adapter, tx_itr); in idpf_intr_reg_init()
124 * idpf_reset_reg_init - Initialize reset registers
129 adapter->reset_reg.rstat = idpf_get_reg_addr(adapter, PFGEN_RSTAT); in idpf_reset_reg_init()
130 adapter->reset_reg.rstat_m = PFGEN_RSTAT_PFR_STATE_M; in idpf_reset_reg_init()
134 * idpf_trigger_reset - trigger reset
149 * idpf_reg_ops_init - Initialize register API function pointers
154 adapter->dev_ops.reg_ops.ctlq_reg_init = idpf_ctlq_reg_init; in idpf_reg_ops_init()
155 adapter->dev_ops.reg_ops.intr_reg_init = idpf_intr_reg_init; in idpf_reg_ops_init()
156 adapter->dev_ops.reg_ops.mb_intr_reg_init = idpf_mb_intr_reg_init; in idpf_reg_ops_init()
157 adapter->dev_ops.reg_ops.reset_reg_init = idpf_reset_reg_init; in idpf_reg_ops_init()
158 adapter->dev_ops.reg_ops.trigger_reset = idpf_trigger_reset; in idpf_reg_ops_init()
162 * idpf_dev_ops_init - Initialize device API function pointers