FreeBSD kernel iwm device code
|
Go to the source code of this file.
Functions | |
uint32_t | iwm_read_prph (struct iwm_softc *sc, uint32_t addr) |
void | iwm_write_prph (struct iwm_softc *sc, uint32_t addr, uint32_t val) |
void | iwm_write_prph64 (struct iwm_softc *sc, uint64_t addr, uint64_t val) |
int | iwm_poll_prph (struct iwm_softc *sc, uint32_t addr, uint32_t bits, uint32_t mask, int timeout) |
int | iwm_read_mem (struct iwm_softc *sc, uint32_t addr, void *buf, int dwords) |
int | iwm_write_mem (struct iwm_softc *sc, uint32_t addr, const void *buf, int dwords) |
int | iwm_write_mem32 (struct iwm_softc *sc, uint32_t addr, uint32_t val) |
int | iwm_poll_bit (struct iwm_softc *sc, int reg, uint32_t bits, uint32_t mask, int timo) |
int | iwm_nic_lock (struct iwm_softc *sc) |
void | iwm_nic_unlock (struct iwm_softc *sc) |
void | iwm_set_bits_mask_prph (struct iwm_softc *sc, uint32_t reg, uint32_t bits, uint32_t mask) |
void | iwm_set_bits_prph (struct iwm_softc *sc, uint32_t reg, uint32_t bits) |
void | iwm_clear_bits_prph (struct iwm_softc *sc, uint32_t reg, uint32_t bits) |
void | iwm_enable_rfkill_int (struct iwm_softc *sc) |
int | iwm_check_rfkill (struct iwm_softc *sc) |
int | iwm_set_hw_ready (struct iwm_softc *sc) |
int | iwm_prepare_card_hw (struct iwm_softc *sc) |
void | iwm_apm_config (struct iwm_softc *sc) |
int | iwm_apm_init (struct iwm_softc *sc) |
void | iwm_apm_stop (struct iwm_softc *sc) |
int | iwm_start_hw (struct iwm_softc *sc) |
void | iwm_set_pwr (struct iwm_softc *sc) |
int | iwm_pcie_rx_stop (struct iwm_softc *sc) |
int | iwm_pcie_set_cmd_in_flight (struct iwm_softc *sc) |
void | iwm_pcie_clear_cmd_in_flight (struct iwm_softc *sc) |
void iwm_apm_config | ( | struct iwm_softc * | sc | ) |
Definition at line 432 of file if_iwm_pcie_trans.c.
References IWM_CLRBITS, IWM_CSR_GIO_REG, IWM_CSR_GIO_REG_VAL_L0S_ENABLED, IWM_DPRINTF, IWM_SETBITS, iwm_softc::sc_dev, and iwm_softc::sc_ltr_enabled.
Referenced by iwm_apm_init().
int iwm_apm_init | ( | struct iwm_softc * | sc | ) |
Definition at line 475 of file if_iwm_pcie_trans.c.
References iwm_softc::cfg, iwm_cfg::device_family, iwm_cfg::host_interrupt_operation_mode, iwm_apm_config(), IWM_APMG_CLK_EN_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT, IWM_APMG_PCIDEV_STT_REG, IWM_APMG_PCIDEV_STT_VAL_L1_ACT_DIS, IWM_APMG_RTC_INT_STT_REG, IWM_APMG_RTC_INT_STT_RFKILL, IWM_CSR_ANA_PLL_CFG, IWM_CSR_DBG_HPET_MEM_REG, IWM_CSR_DBG_HPET_MEM_REG_VAL, IWM_CSR_GIO_CHICKEN_BITS, IWM_CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER, IWM_CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_INIT_DONE, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, IWM_CSR_HW_IF_CONFIG_REG, IWM_CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A, IWM_DEVICE_FAMILY_7000, IWM_DEVICE_FAMILY_8000, IWM_DPRINTF, iwm_nic_lock(), iwm_nic_unlock(), IWM_OSC_CLK, IWM_OSC_CLK_FORCE_CONTROL, iwm_poll_bit(), iwm_read_prph(), iwm_set_bits_prph(), IWM_SETBITS, iwm_write_prph(), and iwm_softc::sc_dev.
Referenced by iwm_nic_init(), and iwm_start_hw().
void iwm_apm_stop | ( | struct iwm_softc * | sc | ) |
Definition at line 595 of file if_iwm_pcie_trans.c.
References IWM_CLRBITS, IWM_CSR_DBG_LINK_PWR_MGMT_REG, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_INIT_DONE, IWM_CSR_HW_IF_CONFIG_REG, IWM_CSR_HW_IF_CONFIG_REG_ENABLE_PME, IWM_CSR_HW_IF_CONFIG_REG_PREPARE, IWM_CSR_RESET, IWM_CSR_RESET_LINK_PWR_MGMT_DISABLED, IWM_CSR_RESET_REG_FLAG_MASTER_DISABLED, IWM_CSR_RESET_REG_FLAG_STOP_MASTER, IWM_DPRINTF, iwm_poll_bit(), IWM_SETBITS, and iwm_softc::sc_dev.
Referenced by iwm_stop_device().
int iwm_check_rfkill | ( | struct iwm_softc * | sc | ) |
Definition at line 354 of file if_iwm_pcie_trans.c.
References IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW, IWM_FLAG_RFKILL, IWM_READ, and iwm_softc::sc_flags.
Referenced by iwm_parent(), iwm_rftoggle_task(), iwm_start_hw(), and iwm_stop_device().
void iwm_clear_bits_prph | ( | struct iwm_softc * | sc, |
uint32_t | reg, | ||
uint32_t | bits | ||
) |
Definition at line 335 of file if_iwm_pcie_trans.c.
References iwm_set_bits_mask_prph().
Referenced by iwm_enable_txq(), iwm_pcie_load_section(), and iwm_trans_pcie_fw_alive().
void iwm_enable_rfkill_int | ( | struct iwm_softc * | sc | ) |
Definition at line 345 of file if_iwm_pcie_trans.c.
References IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_RFKILL_WAKE_L1A_EN, IWM_CSR_INT_BIT_RF_KILL, IWM_CSR_INT_MASK, IWM_SETBITS, IWM_WRITE, and iwm_softc::sc_intmask.
Referenced by iwm_start_hw(), and iwm_stop_device().
int iwm_nic_lock | ( | struct iwm_softc * | sc | ) |
Definition at line 275 of file if_iwm_pcie_trans.c.
References iwm_softc::cfg, iwm_softc::cmd_hold_nic_awake, iwm_cfg::device_family, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, IWM_CSR_RESET, IWM_CSR_RESET_REG_FLAG_FORCE_NMI, IWM_DEVICE_FAMILY_8000, IWM_DPRINTF, iwm_poll_bit(), IWM_SETBITS, and IWM_WRITE.
Referenced by iwm_apm_init(), iwm_attach(), iwm_enable_txq(), iwm_load_ucode_wait_alive(), iwm_nic_rx_legacy_init(), iwm_nic_rx_mq_init(), iwm_nic_tx_init(), iwm_pcie_load_cpu_sections_8000(), iwm_pcie_load_firmware_chunk(), iwm_pcie_load_given_ucode(), iwm_pcie_load_given_ucode_8000(), iwm_pcie_rx_stop(), iwm_set_bits_mask_prph(), iwm_stop_device(), iwm_trans_pcie_fw_alive(), and iwm_write_mem().
void iwm_nic_unlock | ( | struct iwm_softc * | sc | ) |
Definition at line 304 of file if_iwm_pcie_trans.c.
References iwm_softc::cmd_hold_nic_awake, IWM_CLRBITS, IWM_CSR_GP_CNTRL, and IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ.
Referenced by iwm_apm_init(), iwm_attach(), iwm_enable_txq(), iwm_load_ucode_wait_alive(), iwm_nic_rx_legacy_init(), iwm_nic_rx_mq_init(), iwm_nic_tx_init(), iwm_pcie_load_cpu_sections_8000(), iwm_pcie_load_firmware_chunk(), iwm_pcie_load_given_ucode(), iwm_pcie_load_given_ucode_8000(), iwm_pcie_rx_stop(), iwm_set_bits_mask_prph(), iwm_stop_device(), iwm_trans_pcie_fw_alive(), and iwm_write_mem().
void iwm_pcie_clear_cmd_in_flight | ( | struct iwm_softc * | sc | ) |
Definition at line 684 of file if_iwm_pcie_trans.c.
References iwm_cfg::apmg_wake_up_wa, iwm_softc::cfg, iwm_softc::cmd_hold_nic_awake, IWM_CLRBITS, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ, and iwm_softc::sc_dev.
Referenced by iwm_cmd_done(), and iwm_reset_tx_ring().
int iwm_pcie_rx_stop | ( | struct iwm_softc * | sc | ) |
Definition at line 661 of file if_iwm_pcie_trans.c.
References iwm_softc::cfg, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, IWM_FH_MEM_RSSR_RX_STATUS_REG, IWM_FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, iwm_nic_lock(), iwm_nic_unlock(), iwm_poll_bit(), iwm_poll_prph(), IWM_RFH_GEN_STATUS, IWM_RFH_RXF_DMA_CFG, IWM_RXF_DMA_IDLE, IWM_WRITE, iwm_write_prph(), and iwm_cfg::mqrx_supported.
Referenced by iwm_nic_rx_legacy_init(), and iwm_stop_device().
int iwm_pcie_set_cmd_in_flight | ( | struct iwm_softc * | sc | ) |
Definition at line 701 of file if_iwm_pcie_trans.c.
References iwm_cfg::apmg_wake_up_wa, iwm_softc::cfg, iwm_softc::cmd_hold_nic_awake, IWM_CLRBITS, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, iwm_poll_bit(), IWM_SETBITS, and iwm_softc::sc_dev.
Referenced by iwm_send_cmd().
int iwm_poll_bit | ( | struct iwm_softc * | sc, |
int | reg, | ||
uint32_t | bits, | ||
uint32_t | mask, | ||
int | timo | ||
) |
Definition at line 259 of file if_iwm_pcie_trans.c.
References IWM_READ.
Referenced by iwm_apm_init(), iwm_apm_stop(), iwm_attach(), iwm_nic_lock(), iwm_pcie_rx_stop(), iwm_pcie_set_cmd_in_flight(), iwm_set_hw_ready(), and iwm_stop_device().
int iwm_poll_prph | ( | struct iwm_softc * | sc, |
uint32_t | addr, | ||
uint32_t | bits, | ||
uint32_t | mask, | ||
int | timeout | ||
) |
Definition at line 196 of file if_iwm_pcie_trans.c.
References iwm_read_prph().
Referenced by iwm_pcie_rx_stop().
int iwm_prepare_card_hw | ( | struct iwm_softc * | sc | ) |
Definition at line 400 of file if_iwm_pcie_trans.c.
References IWM_CSR_DBG_LINK_PWR_MGMT_REG, IWM_CSR_HW_IF_CONFIG_REG, IWM_CSR_HW_IF_CONFIG_REG_PREPARE, IWM_CSR_RESET_LINK_PWR_MGMT_DISABLED, IWM_DPRINTF, iwm_set_hw_ready(), and IWM_SETBITS.
Referenced by iwm_attach(), iwm_start_fw(), iwm_start_hw(), and iwm_stop_device().
int iwm_read_mem | ( | struct iwm_softc * | sc, |
uint32_t | addr, | ||
void * | buf, | ||
int | dwords | ||
) |
uint32_t iwm_read_prph | ( | struct iwm_softc * | sc, |
uint32_t | addr | ||
) |
Definition at line 171 of file if_iwm_pcie_trans.c.
References IWM_BARRIER_READ_WRITE, IWM_HBUS_TARG_PRPH_RADDR, IWM_HBUS_TARG_PRPH_RDAT, IWM_READ, and IWM_WRITE.
Referenced by iwm_apm_init(), iwm_attach(), iwm_load_ucode_wait_alive(), iwm_poll_prph(), iwm_set_bits_mask_prph(), iwm_set_hw_address_family_8000(), and iwm_trans_pcie_fw_alive().
void iwm_set_bits_mask_prph | ( | struct iwm_softc * | sc, |
uint32_t | reg, | ||
uint32_t | bits, | ||
uint32_t | mask | ||
) |
Definition at line 314 of file if_iwm_pcie_trans.c.
References iwm_nic_lock(), iwm_nic_unlock(), iwm_read_prph(), and iwm_write_prph().
Referenced by iwm_clear_bits_prph(), iwm_nic_config(), iwm_set_bits_prph(), and iwm_set_pwr().
void iwm_set_bits_prph | ( | struct iwm_softc * | sc, |
uint32_t | reg, | ||
uint32_t | bits | ||
) |
Definition at line 329 of file if_iwm_pcie_trans.c.
References iwm_set_bits_mask_prph().
Referenced by iwm_apm_init(), iwm_nic_tx_init(), and iwm_pcie_load_section().
int iwm_set_hw_ready | ( | struct iwm_softc * | sc | ) |
Definition at line 380 of file if_iwm_pcie_trans.c.
References IWM_CSR_HW_IF_CONFIG_REG, IWM_CSR_HW_IF_CONFIG_REG_BIT_NIC_READY, IWM_CSR_MBOX_SET_REG, IWM_CSR_MBOX_SET_REG_OS_ALIVE, IWM_HW_READY_TIMEOUT, iwm_poll_bit(), and IWM_SETBITS.
Referenced by iwm_prepare_card_hw().
void iwm_set_pwr | ( | struct iwm_softc * | sc | ) |
Definition at line 653 of file if_iwm_pcie_trans.c.
References IWM_APMG_PS_CTRL_MSK_PWR_SRC, IWM_APMG_PS_CTRL_REG, IWM_APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, and iwm_set_bits_mask_prph().
Referenced by iwm_nic_init().
int iwm_start_hw | ( | struct iwm_softc * | sc | ) |
Definition at line 627 of file if_iwm_pcie_trans.c.
References iwm_softc::cfg, iwm_apm_init(), iwm_check_rfkill(), IWM_CSR_RESET, IWM_CSR_RESET_REG_FLAG_SW_RESET, iwm_enable_rfkill_int(), iwm_prepare_card_hw(), IWM_UREG_CHICK, IWM_UREG_CHICK_MSI_ENABLE, IWM_WRITE, iwm_write_prph(), and iwm_cfg::mqrx_supported.
Referenced by iwm_init_hw(), and iwm_preinit().
int iwm_write_mem | ( | struct iwm_softc * | sc, |
uint32_t | addr, | ||
const void * | buf, | ||
int | dwords | ||
) |
Definition at line 231 of file if_iwm_pcie_trans.c.
References IWM_DPRINTF, IWM_HBUS_TARG_MEM_WADDR, IWM_HBUS_TARG_MEM_WDAT, iwm_nic_lock(), iwm_nic_unlock(), and IWM_WRITE.
Referenced by iwm_trans_pcie_fw_alive(), and iwm_write_mem32().
int iwm_write_mem32 | ( | struct iwm_softc * | sc, |
uint32_t | addr, | ||
uint32_t | val | ||
) |
Definition at line 253 of file if_iwm_pcie_trans.c.
References iwm_write_mem().
Referenced by iwm_enable_txq().
void iwm_write_prph | ( | struct iwm_softc * | sc, |
uint32_t | addr, | ||
uint32_t | val | ||
) |
Definition at line 180 of file if_iwm_pcie_trans.c.
References IWM_BARRIER_WRITE, IWM_HBUS_TARG_PRPH_WADDR, IWM_HBUS_TARG_PRPH_WDAT, and IWM_WRITE.
Referenced by iwm_apm_init(), iwm_attach(), iwm_enable_txq(), iwm_nic_rx_mq_init(), iwm_nic_tx_init(), iwm_pcie_load_given_ucode(), iwm_pcie_load_given_ucode_8000(), iwm_pcie_rx_stop(), iwm_set_bits_mask_prph(), iwm_start_hw(), iwm_stop_device(), iwm_trans_pcie_fw_alive(), and iwm_write_prph64().
void iwm_write_prph64 | ( | struct iwm_softc * | sc, |
uint64_t | addr, | ||
uint64_t | val | ||
) |
Definition at line 189 of file if_iwm_pcie_trans.c.
References iwm_write_prph().
Referenced by iwm_nic_rx_mq_init().