Lines Matching full:vdev

66 static int wait_for_ip_bar(struct ivpu_device *vdev)  in wait_for_ip_bar()  argument
71 static void host_ss_rst_clr(struct ivpu_device *vdev) in host_ss_rst_clr() argument
82 static int host_ss_noc_qreqn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check_37xx() argument
92 static int host_ss_noc_qreqn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check_40xx() argument
102 static int host_ss_noc_qreqn_check(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check() argument
104 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qreqn_check()
105 return host_ss_noc_qreqn_check_37xx(vdev, exp_val); in host_ss_noc_qreqn_check()
107 return host_ss_noc_qreqn_check_40xx(vdev, exp_val); in host_ss_noc_qreqn_check()
110 static int host_ss_noc_qacceptn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qacceptn_check_37xx() argument
120 static int host_ss_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qacceptn_check_40xx() argument
130 static int host_ss_noc_qacceptn_check(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qacceptn_check() argument
132 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qacceptn_check()
133 return host_ss_noc_qacceptn_check_37xx(vdev, exp_val); in host_ss_noc_qacceptn_check()
135 return host_ss_noc_qacceptn_check_40xx(vdev, exp_val); in host_ss_noc_qacceptn_check()
138 static int host_ss_noc_qdeny_check_37xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qdeny_check_37xx() argument
148 static int host_ss_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qdeny_check_40xx() argument
158 static int host_ss_noc_qdeny_check(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qdeny_check() argument
160 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qdeny_check()
161 return host_ss_noc_qdeny_check_37xx(vdev, exp_val); in host_ss_noc_qdeny_check()
163 return host_ss_noc_qdeny_check_40xx(vdev, exp_val); in host_ss_noc_qdeny_check()
166 static int top_noc_qrenqn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qrenqn_check_37xx() argument
177 static int top_noc_qrenqn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qrenqn_check_40xx() argument
188 static int top_noc_qreqn_check(struct ivpu_device *vdev, u32 exp_val) in top_noc_qreqn_check() argument
190 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qreqn_check()
191 return top_noc_qrenqn_check_37xx(vdev, exp_val); in top_noc_qreqn_check()
193 return top_noc_qrenqn_check_40xx(vdev, exp_val); in top_noc_qreqn_check()
196 int ivpu_hw_ip_host_ss_configure(struct ivpu_device *vdev) in ivpu_hw_ip_host_ss_configure() argument
200 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in ivpu_hw_ip_host_ss_configure()
201 ret = wait_for_ip_bar(vdev); in ivpu_hw_ip_host_ss_configure()
203 ivpu_err(vdev, "Timed out waiting for NPU IP bar\n"); in ivpu_hw_ip_host_ss_configure()
206 host_ss_rst_clr(vdev); in ivpu_hw_ip_host_ss_configure()
209 ret = host_ss_noc_qreqn_check(vdev, 0x0); in ivpu_hw_ip_host_ss_configure()
211 ivpu_err(vdev, "Failed qreqn check: %d\n", ret); in ivpu_hw_ip_host_ss_configure()
215 ret = host_ss_noc_qacceptn_check(vdev, 0x0); in ivpu_hw_ip_host_ss_configure()
217 ivpu_err(vdev, "Failed qacceptn check: %d\n", ret); in ivpu_hw_ip_host_ss_configure()
221 ret = host_ss_noc_qdeny_check(vdev, 0x0); in ivpu_hw_ip_host_ss_configure()
223 ivpu_err(vdev, "Failed qdeny check %d\n", ret); in ivpu_hw_ip_host_ss_configure()
228 static void idle_gen_drive_37xx(struct ivpu_device *vdev, bool enable) in idle_gen_drive_37xx() argument
240 static void idle_gen_drive_40xx(struct ivpu_device *vdev, bool enable) in idle_gen_drive_40xx() argument
252 void ivpu_hw_ip_idle_gen_enable(struct ivpu_device *vdev) in ivpu_hw_ip_idle_gen_enable() argument
254 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_idle_gen_enable()
255 idle_gen_drive_37xx(vdev, true); in ivpu_hw_ip_idle_gen_enable()
257 idle_gen_drive_40xx(vdev, true); in ivpu_hw_ip_idle_gen_enable()
260 void ivpu_hw_ip_idle_gen_disable(struct ivpu_device *vdev) in ivpu_hw_ip_idle_gen_disable() argument
262 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_idle_gen_disable()
263 idle_gen_drive_37xx(vdev, false); in ivpu_hw_ip_idle_gen_disable()
265 idle_gen_drive_40xx(vdev, false); in ivpu_hw_ip_idle_gen_disable()
269 pwr_island_delay_set_50xx(struct ivpu_device *vdev, u32 post, u32 post1, u32 post2, u32 status) in pwr_island_delay_set_50xx() argument
284 static void pwr_island_trickle_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_trickle_drive_37xx() argument
296 static void pwr_island_trickle_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_trickle_drive_40xx() argument
308 static void pwr_island_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_drive_37xx() argument
320 static void pwr_island_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_drive_40xx() argument
332 static void pwr_island_enable(struct ivpu_device *vdev) in pwr_island_enable() argument
334 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in pwr_island_enable()
335 pwr_island_trickle_drive_37xx(vdev, true); in pwr_island_enable()
337 pwr_island_drive_37xx(vdev, true); in pwr_island_enable()
339 pwr_island_trickle_drive_40xx(vdev, true); in pwr_island_enable()
341 pwr_island_drive_40xx(vdev, true); in pwr_island_enable()
345 static int wait_for_pwr_island_status(struct ivpu_device *vdev, u32 exp_val) in wait_for_pwr_island_status() argument
350 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in wait_for_pwr_island_status()
358 static void pwr_island_isolation_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive_37xx() argument
370 static void pwr_island_isolation_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive_40xx() argument
382 static void pwr_island_isolation_drive(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive() argument
384 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in pwr_island_isolation_drive()
385 pwr_island_isolation_drive_37xx(vdev, enable); in pwr_island_isolation_drive()
387 pwr_island_isolation_drive_40xx(vdev, enable); in pwr_island_isolation_drive()
390 static void pwr_island_isolation_disable(struct ivpu_device *vdev) in pwr_island_isolation_disable() argument
392 pwr_island_isolation_drive(vdev, false); in pwr_island_isolation_disable()
395 static void host_ss_clk_drive_37xx(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive_37xx() argument
412 static void host_ss_clk_drive_40xx(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive_40xx() argument
429 static void host_ss_clk_drive(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive() argument
431 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_clk_drive()
432 host_ss_clk_drive_37xx(vdev, enable); in host_ss_clk_drive()
434 host_ss_clk_drive_40xx(vdev, enable); in host_ss_clk_drive()
437 static void host_ss_clk_enable(struct ivpu_device *vdev) in host_ss_clk_enable() argument
439 host_ss_clk_drive(vdev, true); in host_ss_clk_enable()
442 static void host_ss_rst_drive_37xx(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive_37xx() argument
459 static void host_ss_rst_drive_40xx(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive_40xx() argument
476 static void host_ss_rst_drive(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive() argument
478 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_rst_drive()
479 host_ss_rst_drive_37xx(vdev, enable); in host_ss_rst_drive()
481 host_ss_rst_drive_40xx(vdev, enable); in host_ss_rst_drive()
484 static void host_ss_rst_enable(struct ivpu_device *vdev) in host_ss_rst_enable() argument
486 host_ss_rst_drive(vdev, true); in host_ss_rst_enable()
489 static void host_ss_noc_qreqn_top_socmmio_drive_37xx(struct ivpu_device *vdev, bool enable) in host_ss_noc_qreqn_top_socmmio_drive_37xx() argument
500 static void host_ss_noc_qreqn_top_socmmio_drive_40xx(struct ivpu_device *vdev, bool enable) in host_ss_noc_qreqn_top_socmmio_drive_40xx() argument
511 static void host_ss_noc_qreqn_top_socmmio_drive(struct ivpu_device *vdev, bool enable) in host_ss_noc_qreqn_top_socmmio_drive() argument
513 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qreqn_top_socmmio_drive()
514 host_ss_noc_qreqn_top_socmmio_drive_37xx(vdev, enable); in host_ss_noc_qreqn_top_socmmio_drive()
516 host_ss_noc_qreqn_top_socmmio_drive_40xx(vdev, enable); in host_ss_noc_qreqn_top_socmmio_drive()
519 static int host_ss_axi_drive(struct ivpu_device *vdev, bool enable) in host_ss_axi_drive() argument
523 host_ss_noc_qreqn_top_socmmio_drive(vdev, enable); in host_ss_axi_drive()
525 ret = host_ss_noc_qacceptn_check(vdev, enable ? 0x1 : 0x0); in host_ss_axi_drive()
527 ivpu_err(vdev, "Failed HOST SS NOC QACCEPTN check: %d\n", ret); in host_ss_axi_drive()
531 ret = host_ss_noc_qdeny_check(vdev, 0x0); in host_ss_axi_drive()
533 ivpu_err(vdev, "Failed HOST SS NOC QDENY check: %d\n", ret); in host_ss_axi_drive()
538 static void top_noc_qreqn_drive_40xx(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive_40xx() argument
553 static void top_noc_qreqn_drive_37xx(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive_37xx() argument
568 static void top_noc_qreqn_drive(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive() argument
570 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qreqn_drive()
571 top_noc_qreqn_drive_37xx(vdev, enable); in top_noc_qreqn_drive()
573 top_noc_qreqn_drive_40xx(vdev, enable); in top_noc_qreqn_drive()
576 int ivpu_hw_ip_host_ss_axi_enable(struct ivpu_device *vdev) in ivpu_hw_ip_host_ss_axi_enable() argument
578 return host_ss_axi_drive(vdev, true); in ivpu_hw_ip_host_ss_axi_enable()
581 static int top_noc_qacceptn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check_37xx() argument
592 static int top_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check_40xx() argument
603 static int top_noc_qacceptn_check(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check() argument
605 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qacceptn_check()
606 return top_noc_qacceptn_check_37xx(vdev, exp_val); in top_noc_qacceptn_check()
608 return top_noc_qacceptn_check_40xx(vdev, exp_val); in top_noc_qacceptn_check()
611 static int top_noc_qdeny_check_37xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qdeny_check_37xx() argument
622 static int top_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qdeny_check_40xx() argument
633 static int top_noc_qdeny_check(struct ivpu_device *vdev, u32 exp_val) in top_noc_qdeny_check() argument
635 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qdeny_check()
636 return top_noc_qdeny_check_37xx(vdev, exp_val); in top_noc_qdeny_check()
638 return top_noc_qdeny_check_40xx(vdev, exp_val); in top_noc_qdeny_check()
641 static int top_noc_drive(struct ivpu_device *vdev, bool enable) in top_noc_drive() argument
645 top_noc_qreqn_drive(vdev, enable); in top_noc_drive()
647 ret = top_noc_qacceptn_check(vdev, enable ? 0x1 : 0x0); in top_noc_drive()
649 ivpu_err(vdev, "Failed TOP NOC QACCEPTN check: %d\n", ret); in top_noc_drive()
653 ret = top_noc_qdeny_check(vdev, 0x0); in top_noc_drive()
655 ivpu_err(vdev, "Failed TOP NOC QDENY check: %d\n", ret); in top_noc_drive()
660 int ivpu_hw_ip_top_noc_enable(struct ivpu_device *vdev) in ivpu_hw_ip_top_noc_enable() argument
662 return top_noc_drive(vdev, true); in ivpu_hw_ip_top_noc_enable()
665 static void dpu_active_drive_37xx(struct ivpu_device *vdev, bool enable) in dpu_active_drive_37xx() argument
677 static void pwr_island_delay_set(struct ivpu_device *vdev) in pwr_island_delay_set() argument
679 bool high = vdev->hw->pll.profiling_freq == PLL_PROFILING_FREQ_HIGH; in pwr_island_delay_set()
682 if (ivpu_hw_ip_gen(vdev) < IVPU_HW_IP_50XX) in pwr_island_delay_set()
685 switch (ivpu_device_id(vdev)) { in pwr_island_delay_set()
695 ivpu_err(vdev, "Unknown device ID\n"); in pwr_island_delay_set()
699 pwr_island_delay_set_50xx(vdev, post, post1, post2, status); in pwr_island_delay_set()
702 int ivpu_hw_ip_pwr_domain_enable(struct ivpu_device *vdev) in ivpu_hw_ip_pwr_domain_enable() argument
706 pwr_island_delay_set(vdev); in ivpu_hw_ip_pwr_domain_enable()
707 pwr_island_enable(vdev); in ivpu_hw_ip_pwr_domain_enable()
709 ret = wait_for_pwr_island_status(vdev, 0x1); in ivpu_hw_ip_pwr_domain_enable()
711 ivpu_err(vdev, "Timed out waiting for power island status\n"); in ivpu_hw_ip_pwr_domain_enable()
715 ret = top_noc_qreqn_check(vdev, 0x0); in ivpu_hw_ip_pwr_domain_enable()
717 ivpu_err(vdev, "Failed TOP NOC QREQN check %d\n", ret); in ivpu_hw_ip_pwr_domain_enable()
721 host_ss_clk_enable(vdev); in ivpu_hw_ip_pwr_domain_enable()
722 pwr_island_isolation_disable(vdev); in ivpu_hw_ip_pwr_domain_enable()
723 host_ss_rst_enable(vdev); in ivpu_hw_ip_pwr_domain_enable()
725 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_pwr_domain_enable()
726 dpu_active_drive_37xx(vdev, true); in ivpu_hw_ip_pwr_domain_enable()
731 u64 ivpu_hw_ip_read_perf_timer_counter(struct ivpu_device *vdev) in ivpu_hw_ip_read_perf_timer_counter() argument
733 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_read_perf_timer_counter()
739 static void ivpu_hw_ip_snoop_disable_37xx(struct ivpu_device *vdev) in ivpu_hw_ip_snoop_disable_37xx() argument
746 if (ivpu_is_force_snoop_enabled(vdev)) in ivpu_hw_ip_snoop_disable_37xx()
754 static void ivpu_hw_ip_snoop_disable_40xx(struct ivpu_device *vdev) in ivpu_hw_ip_snoop_disable_40xx() argument
761 if (ivpu_is_force_snoop_enabled(vdev)) in ivpu_hw_ip_snoop_disable_40xx()
769 void ivpu_hw_ip_snoop_disable(struct ivpu_device *vdev) in ivpu_hw_ip_snoop_disable() argument
771 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_snoop_disable()
772 return ivpu_hw_ip_snoop_disable_37xx(vdev); in ivpu_hw_ip_snoop_disable()
774 return ivpu_hw_ip_snoop_disable_40xx(vdev); in ivpu_hw_ip_snoop_disable()
777 static void ivpu_hw_ip_tbu_mmu_enable_37xx(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable_37xx() argument
789 static void ivpu_hw_ip_tbu_mmu_enable_40xx(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable_40xx() argument
803 void ivpu_hw_ip_tbu_mmu_enable(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable() argument
805 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_tbu_mmu_enable()
806 return ivpu_hw_ip_tbu_mmu_enable_37xx(vdev); in ivpu_hw_ip_tbu_mmu_enable()
808 return ivpu_hw_ip_tbu_mmu_enable_40xx(vdev); in ivpu_hw_ip_tbu_mmu_enable()
811 static int soc_cpu_boot_37xx(struct ivpu_device *vdev) in soc_cpu_boot_37xx() argument
827 val = vdev->fw->entry_point >> 9; in soc_cpu_boot_37xx()
833 ivpu_dbg(vdev, PM, "Booting firmware, mode: %s\n", in soc_cpu_boot_37xx()
834 vdev->fw->entry_point == vdev->fw->cold_boot_entry_point ? "cold boot" : "resume"); in soc_cpu_boot_37xx()
839 static int cpu_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in cpu_noc_qacceptn_check_40xx() argument
849 static int cpu_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in cpu_noc_qdeny_check_40xx() argument
859 static void cpu_noc_top_mmio_drive_40xx(struct ivpu_device *vdev, bool enable) in cpu_noc_top_mmio_drive_40xx() argument
870 static int soc_cpu_drive_40xx(struct ivpu_device *vdev, bool enable) in soc_cpu_drive_40xx() argument
874 cpu_noc_top_mmio_drive_40xx(vdev, enable); in soc_cpu_drive_40xx()
876 ret = cpu_noc_qacceptn_check_40xx(vdev, enable ? 0x1 : 0x0); in soc_cpu_drive_40xx()
878 ivpu_err(vdev, "Failed qacceptn check: %d\n", ret); in soc_cpu_drive_40xx()
882 ret = cpu_noc_qdeny_check_40xx(vdev, 0x0); in soc_cpu_drive_40xx()
884 ivpu_err(vdev, "Failed qdeny check: %d\n", ret); in soc_cpu_drive_40xx()
889 static int soc_cpu_enable(struct ivpu_device *vdev) in soc_cpu_enable() argument
891 return soc_cpu_drive_40xx(vdev, true); in soc_cpu_enable()
894 static int soc_cpu_boot_40xx(struct ivpu_device *vdev) in soc_cpu_boot_40xx() argument
900 ret = soc_cpu_enable(vdev); in soc_cpu_boot_40xx()
902 ivpu_err(vdev, "Failed to enable SOC CPU: %d\n", ret); in soc_cpu_boot_40xx()
906 val64 = vdev->fw->entry_point; in soc_cpu_boot_40xx()
914 ivpu_dbg(vdev, PM, "Booting firmware, mode: %s\n", in soc_cpu_boot_40xx()
915 ivpu_fw_is_cold_boot(vdev) ? "cold boot" : "resume"); in soc_cpu_boot_40xx()
920 int ivpu_hw_ip_soc_cpu_boot(struct ivpu_device *vdev) in ivpu_hw_ip_soc_cpu_boot() argument
922 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_soc_cpu_boot()
923 return soc_cpu_boot_37xx(vdev); in ivpu_hw_ip_soc_cpu_boot()
925 return soc_cpu_boot_40xx(vdev); in ivpu_hw_ip_soc_cpu_boot()
928 static void wdt_disable_37xx(struct ivpu_device *vdev) in wdt_disable_37xx() argument
946 static void wdt_disable_40xx(struct ivpu_device *vdev) in wdt_disable_40xx() argument
961 void ivpu_hw_ip_wdt_disable(struct ivpu_device *vdev) in ivpu_hw_ip_wdt_disable() argument
963 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_wdt_disable()
964 return wdt_disable_37xx(vdev); in ivpu_hw_ip_wdt_disable()
966 return wdt_disable_40xx(vdev); in ivpu_hw_ip_wdt_disable()
969 static u32 ipc_rx_count_get_37xx(struct ivpu_device *vdev) in ipc_rx_count_get_37xx() argument
976 static u32 ipc_rx_count_get_40xx(struct ivpu_device *vdev) in ipc_rx_count_get_40xx() argument
983 u32 ivpu_hw_ip_ipc_rx_count_get(struct ivpu_device *vdev) in ivpu_hw_ip_ipc_rx_count_get() argument
985 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_ipc_rx_count_get()
986 return ipc_rx_count_get_37xx(vdev); in ivpu_hw_ip_ipc_rx_count_get()
988 return ipc_rx_count_get_40xx(vdev); in ivpu_hw_ip_ipc_rx_count_get()
991 void ivpu_hw_ip_irq_enable(struct ivpu_device *vdev) in ivpu_hw_ip_irq_enable() argument
993 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in ivpu_hw_ip_irq_enable()
1002 void ivpu_hw_ip_irq_disable(struct ivpu_device *vdev) in ivpu_hw_ip_irq_disable() argument
1004 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in ivpu_hw_ip_irq_disable()
1013 static void diagnose_failure_37xx(struct ivpu_device *vdev) in diagnose_failure_37xx() argument
1017 if (ipc_rx_count_get_37xx(vdev)) in diagnose_failure_37xx()
1018 ivpu_err(vdev, "IPC FIFO queue not empty, missed IPC IRQ"); in diagnose_failure_37xx()
1021 ivpu_err(vdev, "WDT MSS timeout detected\n"); in diagnose_failure_37xx()
1024 ivpu_err(vdev, "WDT NCE timeout detected\n"); in diagnose_failure_37xx()
1027 ivpu_err(vdev, "NOC Firewall irq detected\n"); in diagnose_failure_37xx()
1030 static void diagnose_failure_40xx(struct ivpu_device *vdev) in diagnose_failure_40xx() argument
1034 if (ipc_rx_count_get_40xx(vdev)) in diagnose_failure_40xx()
1035 ivpu_err(vdev, "IPC FIFO queue not empty, missed IPC IRQ"); in diagnose_failure_40xx()
1038 ivpu_err(vdev, "WDT MSS timeout detected\n"); in diagnose_failure_40xx()
1041 ivpu_err(vdev, "WDT NCE timeout detected\n"); in diagnose_failure_40xx()
1044 ivpu_err(vdev, "NOC Firewall irq detected\n"); in diagnose_failure_40xx()
1047 void ivpu_hw_ip_diagnose_failure(struct ivpu_device *vdev) in ivpu_hw_ip_diagnose_failure() argument
1049 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_diagnose_failure()
1050 diagnose_failure_37xx(vdev); in ivpu_hw_ip_diagnose_failure()
1052 diagnose_failure_40xx(vdev); in ivpu_hw_ip_diagnose_failure()
1055 void ivpu_hw_ip_irq_clear(struct ivpu_device *vdev) in ivpu_hw_ip_irq_clear() argument
1057 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_irq_clear()
1063 static void irq_wdt_nce_handler(struct ivpu_device *vdev) in irq_wdt_nce_handler() argument
1065 ivpu_pm_trigger_recovery(vdev, "WDT NCE IRQ"); in irq_wdt_nce_handler()
1068 static void irq_wdt_mss_handler(struct ivpu_device *vdev) in irq_wdt_mss_handler() argument
1070 ivpu_hw_ip_wdt_disable(vdev); in irq_wdt_mss_handler()
1071 ivpu_pm_trigger_recovery(vdev, "WDT MSS IRQ"); in irq_wdt_mss_handler()
1074 static void irq_noc_firewall_handler(struct ivpu_device *vdev) in irq_noc_firewall_handler() argument
1076 atomic_inc(&vdev->hw->firewall_irq_counter); in irq_noc_firewall_handler()
1078 ivpu_dbg(vdev, IRQ, "NOC Firewall interrupt detected, counter %d\n", in irq_noc_firewall_handler()
1079 atomic_read(&vdev->hw->firewall_irq_counter)); in irq_noc_firewall_handler()
1083 bool ivpu_hw_ip_irq_handler_37xx(struct ivpu_device *vdev, int irq) in ivpu_hw_ip_irq_handler_37xx() argument
1093 ivpu_mmu_irq_evtq_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1096 ivpu_ipc_irq_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1099 ivpu_dbg(vdev, IRQ, "MMU sync complete\n"); in ivpu_hw_ip_irq_handler_37xx()
1102 ivpu_mmu_irq_gerr_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1105 irq_wdt_mss_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1108 irq_wdt_nce_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1111 irq_noc_firewall_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1117 bool ivpu_hw_ip_irq_handler_40xx(struct ivpu_device *vdev, int irq) in ivpu_hw_ip_irq_handler_40xx() argument
1127 ivpu_mmu_irq_evtq_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1130 ivpu_ipc_irq_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1133 ivpu_dbg(vdev, IRQ, "MMU sync complete\n"); in ivpu_hw_ip_irq_handler_40xx()
1136 ivpu_mmu_irq_gerr_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1139 irq_wdt_mss_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1142 irq_wdt_nce_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1145 irq_noc_firewall_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1150 static void db_set_37xx(struct ivpu_device *vdev, u32 db_id) in db_set_37xx() argument
1158 static void db_set_40xx(struct ivpu_device *vdev, u32 db_id) in db_set_40xx() argument
1166 void ivpu_hw_ip_db_set(struct ivpu_device *vdev, u32 db_id) in ivpu_hw_ip_db_set() argument
1168 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_db_set()
1169 db_set_37xx(vdev, db_id); in ivpu_hw_ip_db_set()
1171 db_set_40xx(vdev, db_id); in ivpu_hw_ip_db_set()
1174 u32 ivpu_hw_ip_ipc_rx_addr_get(struct ivpu_device *vdev) in ivpu_hw_ip_ipc_rx_addr_get() argument
1176 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_ipc_rx_addr_get()
1182 void ivpu_hw_ip_ipc_tx_set(struct ivpu_device *vdev, u32 vpu_addr) in ivpu_hw_ip_ipc_tx_set() argument
1184 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_ipc_tx_set()