• Home
  • Raw
  • Download

Lines Matching refs:trans

73 void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val)  in iwl_write8()  argument
75 trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val); in iwl_write8()
76 iwl_trans_write8(trans, ofs, val); in iwl_write8()
80 void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_write32() argument
82 trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val); in iwl_write32()
83 iwl_trans_write32(trans, ofs, val); in iwl_write32()
87 void iwl_write64(struct iwl_trans *trans, u64 ofs, u64 val) in iwl_write64() argument
89 trace_iwlwifi_dev_iowrite64(trans->dev, ofs, val); in iwl_write64()
90 iwl_trans_write32(trans, ofs, lower_32_bits(val)); in iwl_write64()
91 iwl_trans_write32(trans, ofs + 4, upper_32_bits(val)); in iwl_write64()
95 u32 iwl_read32(struct iwl_trans *trans, u32 ofs) in iwl_read32() argument
97 u32 val = iwl_trans_read32(trans, ofs); in iwl_read32()
99 trace_iwlwifi_dev_ioread32(trans->dev, ofs, val); in iwl_read32()
106 int iwl_poll_bit(struct iwl_trans *trans, u32 addr, in iwl_poll_bit() argument
112 if ((iwl_read32(trans, addr) & mask) == (bits & mask)) in iwl_poll_bit()
122 u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg) in iwl_read_direct32() argument
126 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_read_direct32()
127 value = iwl_read32(trans, reg); in iwl_read_direct32()
128 iwl_trans_release_nic_access(trans, &flags); in iwl_read_direct32()
135 void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value) in iwl_write_direct32() argument
139 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_write_direct32()
140 iwl_write32(trans, reg, value); in iwl_write_direct32()
141 iwl_trans_release_nic_access(trans, &flags); in iwl_write_direct32()
146 void iwl_write_direct64(struct iwl_trans *trans, u64 reg, u64 value) in iwl_write_direct64() argument
150 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_write_direct64()
151 iwl_write64(trans, reg, value); in iwl_write_direct64()
152 iwl_trans_release_nic_access(trans, &flags); in iwl_write_direct64()
157 int iwl_poll_direct_bit(struct iwl_trans *trans, u32 addr, u32 mask, in iwl_poll_direct_bit() argument
163 if ((iwl_read_direct32(trans, addr) & mask) == mask) in iwl_poll_direct_bit()
173 u32 iwl_read_prph_no_grab(struct iwl_trans *trans, u32 ofs) in iwl_read_prph_no_grab() argument
175 u32 val = iwl_trans_read_prph(trans, ofs); in iwl_read_prph_no_grab()
176 trace_iwlwifi_dev_ioread_prph32(trans->dev, ofs, val); in iwl_read_prph_no_grab()
181 void iwl_write_prph_no_grab(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_write_prph_no_grab() argument
183 trace_iwlwifi_dev_iowrite_prph32(trans->dev, ofs, val); in iwl_write_prph_no_grab()
184 iwl_trans_write_prph(trans, ofs, val); in iwl_write_prph_no_grab()
188 void iwl_write_prph64_no_grab(struct iwl_trans *trans, u64 ofs, u64 val) in iwl_write_prph64_no_grab() argument
190 trace_iwlwifi_dev_iowrite_prph64(trans->dev, ofs, val); in iwl_write_prph64_no_grab()
191 iwl_write_prph_no_grab(trans, ofs, val & 0xffffffff); in iwl_write_prph64_no_grab()
192 iwl_write_prph_no_grab(trans, ofs + 4, val >> 32); in iwl_write_prph64_no_grab()
196 u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs) in iwl_read_prph() argument
201 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_read_prph()
202 val = iwl_read_prph_no_grab(trans, ofs); in iwl_read_prph()
203 iwl_trans_release_nic_access(trans, &flags); in iwl_read_prph()
209 void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_write_prph() argument
213 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_write_prph()
214 iwl_write_prph_no_grab(trans, ofs, val); in iwl_write_prph()
215 iwl_trans_release_nic_access(trans, &flags); in iwl_write_prph()
220 int iwl_poll_prph_bit(struct iwl_trans *trans, u32 addr, in iwl_poll_prph_bit() argument
226 if ((iwl_read_prph(trans, addr) & mask) == (bits & mask)) in iwl_poll_prph_bit()
235 void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask) in iwl_set_bits_prph() argument
239 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_set_bits_prph()
240 iwl_write_prph_no_grab(trans, ofs, in iwl_set_bits_prph()
241 iwl_read_prph_no_grab(trans, ofs) | in iwl_set_bits_prph()
243 iwl_trans_release_nic_access(trans, &flags); in iwl_set_bits_prph()
248 void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs, in iwl_set_bits_mask_prph() argument
253 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_set_bits_mask_prph()
254 iwl_write_prph_no_grab(trans, ofs, in iwl_set_bits_mask_prph()
255 (iwl_read_prph_no_grab(trans, ofs) & in iwl_set_bits_mask_prph()
257 iwl_trans_release_nic_access(trans, &flags); in iwl_set_bits_mask_prph()
262 void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask) in iwl_clear_bits_prph() argument
267 if (iwl_trans_grab_nic_access(trans, &flags)) { in iwl_clear_bits_prph()
268 val = iwl_read_prph_no_grab(trans, ofs); in iwl_clear_bits_prph()
269 iwl_write_prph_no_grab(trans, ofs, (val & ~mask)); in iwl_clear_bits_prph()
270 iwl_trans_release_nic_access(trans, &flags); in iwl_clear_bits_prph()
275 void iwl_force_nmi(struct iwl_trans *trans) in iwl_force_nmi() argument
277 if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_9000) in iwl_force_nmi()
278 iwl_write_prph(trans, DEVICE_SET_NMI_REG, in iwl_force_nmi()
280 else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210) in iwl_force_nmi()
281 iwl_write_umac_prph(trans, UREG_NIC_SET_NMI_DRIVER, in iwl_force_nmi()
284 iwl_write_umac_prph(trans, UREG_DOORBELL_TO_ISR6, in iwl_force_nmi()
320 static int iwl_dump_rfh(struct iwl_trans *trans, char **buf) in iwl_dump_rfh() argument
323 int num_q = trans->num_rx_queues; in iwl_dump_rfh()
362 iwl_read_prph(trans, rfh_tbl[i])); in iwl_dump_rfh()
372 iwl_read_prph(trans, addr)); in iwl_dump_rfh()
379 IWL_ERR(trans, "RFH register values:\n"); in iwl_dump_rfh()
381 IWL_ERR(trans, " %34s: 0X%08x\n", in iwl_dump_rfh()
383 iwl_read_prph(trans, rfh_tbl[i])); in iwl_dump_rfh()
390 IWL_ERR(trans, " %34s(q %d): 0X%08x\n", in iwl_dump_rfh()
392 iwl_read_prph(trans, addr)); in iwl_dump_rfh()
416 int iwl_dump_fh(struct iwl_trans *trans, char **buf) in iwl_dump_fh() argument
431 if (trans->trans_cfg->mq_rx_supported) in iwl_dump_fh()
432 return iwl_dump_rfh(trans, buf); in iwl_dump_fh()
450 iwl_read_direct32(trans, fh_tbl[i])); in iwl_dump_fh()
456 IWL_ERR(trans, "FH register values:\n"); in iwl_dump_fh()
458 IWL_ERR(trans, " %34s: 0X%08x\n", in iwl_dump_fh()
460 iwl_read_direct32(trans, fh_tbl[i])); in iwl_dump_fh()
465 int iwl_finish_nic_init(struct iwl_trans *trans, in iwl_finish_nic_init() argument
479 iwl_set_bit(trans, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); in iwl_finish_nic_init()
489 err = iwl_poll_bit(trans, CSR_GP_CNTRL, in iwl_finish_nic_init()
494 IWL_DEBUG_INFO(trans, "Failed to wake NIC\n"); in iwl_finish_nic_init()