Lines Matching refs:hal_soc
32 void hal_qca6290_attach(struct hal_soc *hal);
35 void hal_qca8074_attach(struct hal_soc *hal);
39 void hal_qca8074v2_attach(struct hal_soc *hal);
42 void hal_qca6390_attach(struct hal_soc *hal);
45 void hal_qca6490_attach(struct hal_soc *hal);
48 void hal_qcn9000_attach(struct hal_soc *hal);
51 void hal_qcn9224v2_attach(struct hal_soc *hal);
54 void hal_qcn6122_attach(struct hal_soc *hal);
57 void hal_qcn6432_attach(struct hal_soc *hal);
60 void hal_qca6750_attach(struct hal_soc *hal);
63 void hal_qca5018_attach(struct hal_soc *hal);
66 void hal_qca5332_attach(struct hal_soc *hal);
69 void hal_kiwi_attach(struct hal_soc *hal);
84 void hal_reg_wr_fail_history_add(struct hal_soc *hal_soc, in hal_reg_wr_fail_history_add() argument
91 idx = hal_history_get_next_index(&hal_soc->reg_wr_fail_hist->index, in hal_reg_wr_fail_history_add()
94 record = &hal_soc->reg_wr_fail_hist->record[idx]; in hal_reg_wr_fail_history_add()
102 static void hal_reg_write_fail_history_init(struct hal_soc *hal) in hal_reg_write_fail_history_init()
109 static void hal_reg_write_fail_history_init(struct hal_soc *hal) in hal_reg_write_fail_history_init()
123 static int hal_get_srng_ring_id(struct hal_soc *hal, int ring_type, in hal_get_srng_ring_id()
152 static struct hal_srng *hal_get_srng(struct hal_soc *hal, int ring_id) in hal_get_srng()
161 static void hal_update_srng_hp_tp_address(struct hal_soc *hal_soc, in hal_update_srng_hp_tp_address() argument
169 HAL_SRNG_CONFIG(hal_soc, ring_type); in hal_update_srng_hp_tp_address()
171 ring_id = hal_get_srng_ring_id(hal_soc, ring_type, ring_num, 0); in hal_update_srng_hp_tp_address()
175 srng = hal_get_srng(hal_soc, ring_id); in hal_update_srng_hp_tp_address()
179 + hal_soc->dev_base_addr; in hal_update_srng_hp_tp_address()
181 srng->u.dst_ring.tp_addr, hal_soc->dev_base_addr, in hal_update_srng_hp_tp_address()
185 + hal_soc->dev_base_addr; in hal_update_srng_hp_tp_address()
188 hal_soc->dev_base_addr, shadow_config_index); in hal_update_srng_hp_tp_address()
195 void hal_set_one_target_reg_config(struct hal_soc *hal, in hal_set_one_target_reg_config()
211 QDF_STATUS hal_set_shadow_regs(void *hal_soc) in hal_set_shadow_regs() argument
214 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_set_shadow_regs()
220 reo_reg_base = hal_get_reo_reg_base_offset(hal_soc); in hal_set_shadow_regs()
240 QDF_STATUS hal_construct_shadow_regs(void *hal_soc) in hal_construct_shadow_regs() argument
242 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_construct_shadow_regs()
271 QDF_STATUS hal_set_one_shadow_config(void *hal_soc, in hal_set_one_shadow_config() argument
276 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_set_one_shadow_config()
298 hal_update_srng_hp_tp_address(hal_soc, shadow_config_index, ring_type, in hal_set_one_shadow_config()
312 QDF_STATUS hal_construct_srng_shadow_regs(void *hal_soc) in hal_construct_srng_shadow_regs() argument
315 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_construct_srng_shadow_regs()
331 hal_set_one_shadow_config(hal_soc, ring_type, ring_num); in hal_construct_srng_shadow_regs()
340 QDF_STATUS hal_construct_srng_shadow_regs(void *hal_soc) in hal_construct_srng_shadow_regs() argument
347 QDF_STATUS hal_set_one_shadow_config(void *hal_soc, int ring_type, in hal_set_one_shadow_config() argument
355 void hal_get_shadow_config(void *hal_soc, in hal_get_shadow_config() argument
359 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_get_shadow_config()
368 void hal_get_shadow_v3_config(void *hal_soc, in hal_get_shadow_v3_config() argument
372 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_get_shadow_v3_config()
381 static bool hal_validate_shadow_register(struct hal_soc *hal, in hal_validate_shadow_register()
412 static void hal_target_based_configure(struct hal_soc *hal) in hal_target_based_configure()
563 struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; in hal_get_target_type() local
565 hif_get_target_info_handle(hal_soc->hif_handle); in hal_get_target_type()
579 static inline bool hal_is_reg_write_tput_level_high(struct hal_soc *hal) in hal_is_reg_write_tput_level_high()
604 struct hal_soc *hal = (struct hal_soc *)hal_soc_hdl; in hal_dump_reg_write_srng_stats()
630 struct hal_soc *hal = (struct hal_soc *)hal_soc_hdl; in hal_dump_reg_write_stats()
656 int hal_get_reg_write_pending_work(void *hal_soc) in hal_get_reg_write_pending_work() argument
658 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_get_reg_write_pending_work()
699 void hal_srng_check_and_update_hptp(struct hal_soc *hal_soc, in hal_srng_check_and_update_hptp() argument
715 hal_write_address_32_mb(hal_soc, srng->u.src_ring.hp_addr, in hal_srng_check_and_update_hptp()
724 hal_write_address_32_mb(hal_soc, srng->u.dst_ring.tp_addr, in hal_srng_check_and_update_hptp()
730 qdf_atomic_inc(&hal_soc->stats.wstats.direct); in hal_srng_check_and_update_hptp()
750 hal_process_reg_write_q_elem(struct hal_soc *hal, in hal_process_reg_write_q_elem()
792 static inline void hal_reg_write_fill_sched_delay_hist(struct hal_soc *hal, in hal_reg_write_fill_sched_delay_hist()
824 struct hal_soc *hal; in hal_reg_write_need_delay()
831 hal = srng->hal_soc; in hal_reg_write_need_delay()
878 struct hal_soc *hal = arg; in hal_reg_write_work()
972 static void __hal_flush_reg_write_work(struct hal_soc *hal) in __hal_flush_reg_write_work()
979 { __hal_flush_reg_write_work((struct hal_soc *)hal_handle); in hal_flush_reg_write_work()
993 static void hal_reg_write_enqueue(struct hal_soc *hal_soc, in hal_reg_write_enqueue() argument
1004 qdf_atomic_inc(&hal_soc->stats.wstats.coalesces); in hal_reg_write_enqueue()
1009 write_idx = qdf_atomic_inc_return(&hal_soc->write_idx); in hal_reg_write_enqueue()
1013 q_elem = &hal_soc->reg_write_queue[write_idx]; in hal_reg_write_enqueue()
1021 qdf_atomic_inc(&hal_soc->stats.wstats.enqueues); in hal_reg_write_enqueue()
1024 qdf_atomic_inc(&hal_soc->stats.wstats.q_depth); in hal_reg_write_enqueue()
1053 qdf_atomic_inc(&hal_soc->active_work_cnt); in hal_reg_write_enqueue()
1058 qdf_queue_work(hal_soc->qdf_dev, hal_soc->reg_write_wq, in hal_reg_write_enqueue()
1059 &hal_soc->reg_write_work); in hal_reg_write_enqueue()
1071 static QDF_STATUS hal_delayed_reg_write_init(struct hal_soc *hal) in hal_delayed_reg_write_init()
1099 static void hal_delayed_reg_write_deinit(struct hal_soc *hal) in hal_delayed_reg_write_deinit()
1109 static inline QDF_STATUS hal_delayed_reg_write_init(struct hal_soc *hal) in hal_delayed_reg_write_init()
1114 static inline void hal_delayed_reg_write_deinit(struct hal_soc *hal) in hal_delayed_reg_write_deinit()
1153 void hal_delayed_reg_write(struct hal_soc *hal_soc, in hal_delayed_reg_write() argument
1164 vote_access = hif_get_ep_vote_access(hal_soc->hif_handle, in hal_delayed_reg_write()
1169 pld_get_mhi_state(hal_soc->qdf_dev->dev))) { in hal_delayed_reg_write()
1170 hal_write_address_32_mb(hal_soc, addr, value, false); in hal_delayed_reg_write()
1173 qdf_atomic_inc(&hal_soc->stats.wstats.direct); in hal_delayed_reg_write()
1176 hal_reg_write_enqueue(hal_soc, srng, addr, value); in hal_delayed_reg_write()
1180 if (hif_get_ep_vote_access(hal_soc->hif_handle, in hal_delayed_reg_write()
1183 hal_is_reg_write_tput_level_high(hal_soc) || in hal_delayed_reg_write()
1185 pld_get_mhi_state(hal_soc->qdf_dev->dev)) { in hal_delayed_reg_write()
1186 hal_write_address_32_mb(hal_soc, addr, value, false); in hal_delayed_reg_write()
1188 qdf_atomic_inc(&hal_soc->stats.wstats.direct); in hal_delayed_reg_write()
1191 hal_reg_write_enqueue(hal_soc, srng, addr, value); in hal_delayed_reg_write()
1198 void hal_delayed_reg_write(struct hal_soc *hal_soc, in hal_delayed_reg_write() argument
1203 if (hal_is_reg_write_tput_level_high(hal_soc) || in hal_delayed_reg_write()
1204 pld_is_device_awake(hal_soc->qdf_dev->dev)) { in hal_delayed_reg_write()
1205 qdf_atomic_inc(&hal_soc->stats.wstats.direct); in hal_delayed_reg_write()
1207 hal_write_address_32_mb(hal_soc, addr, value, false); in hal_delayed_reg_write()
1211 hal_reg_write_enqueue(hal_soc, srng, addr, value); in hal_delayed_reg_write()
1220 inline void hal_free_srng_history(struct hal_soc *hal) in hal_free_srng_history()
1228 inline bool hal_alloc_srng_history(struct hal_soc *hal) in hal_alloc_srng_history()
1245 inline void hal_free_srng_history(struct hal_soc *hal) in hal_free_srng_history()
1249 inline bool hal_alloc_srng_history(struct hal_soc *hal) in hal_alloc_srng_history()
1257 struct hal_soc *hal; in hal_attach()
1357 struct hal_soc *hal = (struct hal_soc *)hal_soc_hdl; in hal_get_meminfo()
1370 void hal_detach(void *hal_soc) in hal_detach() argument
1372 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_detach()
1405 static inline void hal_ce_dst_setup(struct hal_soc *hal, struct hal_srng *srng, in hal_ce_dst_setup()
1443 struct hal_soc *hal = (struct hal_soc *)hal_soc_hdl; in hal_reo_read_write_ctrl_ix()
1521 void hal_srng_dst_init_hp(struct hal_soc_handle *hal_soc, in hal_srng_dst_init_hp() argument
1526 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_srng_dst_init_hp()
1547 void hal_srng_dst_update_hp_addr(struct hal_soc_handle *hal_soc, in hal_srng_dst_update_hp_addr() argument
1558 hal_get_hw_hptp(hal_soc, hal_ring_hdl, &hw_hp, &hw_tp, in hal_srng_dst_update_hp_addr()
1575 static inline void hal_srng_hw_init(struct hal_soc *hal, in hal_srng_hw_init()
1585 bool hal_srng_is_near_full_irq_supported(hal_soc_handle_t hal_soc, in hal_srng_is_near_full_irq_supported() argument
1588 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_srng_is_near_full_irq_supported()
1711 void *hal_srng_setup_idx(void *hal_soc, int ring_type, int ring_num, int mac_id, in hal_srng_setup_idx() argument
1716 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_srng_setup_idx()
1724 ring_id = hal_get_srng_ring_id(hal_soc, ring_type, ring_num, mac_id); in hal_srng_setup_idx()
1730 srng = hal_get_srng(hal_soc, ring_id); in hal_srng_setup_idx()
1761 srng->hal_soc = hal_soc; in hal_srng_setup_idx()
1954 void *hal_srng_setup(void *hal_soc, int ring_type, int ring_num, in hal_srng_setup() argument
1958 return hal_srng_setup_idx(hal_soc, ring_type, ring_num, mac_id, in hal_srng_setup()
1963 void hal_srng_cleanup(void *hal_soc, hal_ring_handle_t hal_ring_hdl, in hal_srng_cleanup() argument
1970 hal_srng_hw_disable(hal_soc, srng); in hal_srng_cleanup()
1974 uint32_t hal_srng_get_entrysize(void *hal_soc, int ring_type) in hal_srng_get_entrysize() argument
1976 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_srng_get_entrysize()
1983 uint32_t hal_srng_max_entries(void *hal_soc, int ring_type) in hal_srng_max_entries() argument
1985 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_srng_max_entries()
1993 enum hal_srng_dir hal_srng_get_dir(void *hal_soc, int ring_type) in hal_srng_get_dir() argument
1995 struct hal_soc *hal = (struct hal_soc *)hal_soc; in hal_srng_get_dir()
2063 struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; in hal_srng_rtpm_access_end() local
2071 if (hif_system_pm_state_check(hal_soc->hif_handle)) { in hal_srng_rtpm_access_end()
2093 struct hal_soc *hal_soc = (struct hal_soc *)soc; in hal_set_init_phase() local
2094 hal_soc->init_phase = init_phase; in hal_set_init_phase()