Lines Matching full:vdev

69 static int wait_for_ip_bar(struct ivpu_device *vdev)  in wait_for_ip_bar()  argument
74 static void host_ss_rst_clr(struct ivpu_device *vdev) in host_ss_rst_clr() argument
85 static int host_ss_noc_qreqn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check_37xx() argument
95 static int host_ss_noc_qreqn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check_40xx() argument
105 static int host_ss_noc_qreqn_check(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check() argument
107 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qreqn_check()
108 return host_ss_noc_qreqn_check_37xx(vdev, exp_val); in host_ss_noc_qreqn_check()
110 return host_ss_noc_qreqn_check_40xx(vdev, exp_val); in host_ss_noc_qreqn_check()
113 static int host_ss_noc_qacceptn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qacceptn_check_37xx() argument
123 static int host_ss_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qacceptn_check_40xx() argument
133 static int host_ss_noc_qacceptn_check(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qacceptn_check() argument
135 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qacceptn_check()
136 return host_ss_noc_qacceptn_check_37xx(vdev, exp_val); in host_ss_noc_qacceptn_check()
138 return host_ss_noc_qacceptn_check_40xx(vdev, exp_val); in host_ss_noc_qacceptn_check()
141 static int host_ss_noc_qdeny_check_37xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qdeny_check_37xx() argument
151 static int host_ss_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qdeny_check_40xx() argument
161 static int host_ss_noc_qdeny_check(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qdeny_check() argument
163 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qdeny_check()
164 return host_ss_noc_qdeny_check_37xx(vdev, exp_val); in host_ss_noc_qdeny_check()
166 return host_ss_noc_qdeny_check_40xx(vdev, exp_val); in host_ss_noc_qdeny_check()
169 static int top_noc_qrenqn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qrenqn_check_37xx() argument
180 static int top_noc_qrenqn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qrenqn_check_40xx() argument
191 static int top_noc_qreqn_check(struct ivpu_device *vdev, u32 exp_val) in top_noc_qreqn_check() argument
193 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qreqn_check()
194 return top_noc_qrenqn_check_37xx(vdev, exp_val); in top_noc_qreqn_check()
196 return top_noc_qrenqn_check_40xx(vdev, exp_val); in top_noc_qreqn_check()
199 int ivpu_hw_ip_host_ss_configure(struct ivpu_device *vdev) in ivpu_hw_ip_host_ss_configure() argument
203 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in ivpu_hw_ip_host_ss_configure()
204 ret = wait_for_ip_bar(vdev); in ivpu_hw_ip_host_ss_configure()
206 ivpu_err(vdev, "Timed out waiting for NPU IP bar\n"); in ivpu_hw_ip_host_ss_configure()
209 host_ss_rst_clr(vdev); in ivpu_hw_ip_host_ss_configure()
212 ret = host_ss_noc_qreqn_check(vdev, 0x0); in ivpu_hw_ip_host_ss_configure()
214 ivpu_err(vdev, "Failed qreqn check: %d\n", ret); in ivpu_hw_ip_host_ss_configure()
218 ret = host_ss_noc_qacceptn_check(vdev, 0x0); in ivpu_hw_ip_host_ss_configure()
220 ivpu_err(vdev, "Failed qacceptn check: %d\n", ret); in ivpu_hw_ip_host_ss_configure()
224 ret = host_ss_noc_qdeny_check(vdev, 0x0); in ivpu_hw_ip_host_ss_configure()
226 ivpu_err(vdev, "Failed qdeny check %d\n", ret); in ivpu_hw_ip_host_ss_configure()
231 static void idle_gen_drive_37xx(struct ivpu_device *vdev, bool enable) in idle_gen_drive_37xx() argument
243 static void idle_gen_drive_40xx(struct ivpu_device *vdev, bool enable) in idle_gen_drive_40xx() argument
255 void ivpu_hw_ip_idle_gen_enable(struct ivpu_device *vdev) in ivpu_hw_ip_idle_gen_enable() argument
257 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_idle_gen_enable()
258 idle_gen_drive_37xx(vdev, true); in ivpu_hw_ip_idle_gen_enable()
260 idle_gen_drive_40xx(vdev, true); in ivpu_hw_ip_idle_gen_enable()
263 void ivpu_hw_ip_idle_gen_disable(struct ivpu_device *vdev) in ivpu_hw_ip_idle_gen_disable() argument
265 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_idle_gen_disable()
266 idle_gen_drive_37xx(vdev, false); in ivpu_hw_ip_idle_gen_disable()
268 idle_gen_drive_40xx(vdev, false); in ivpu_hw_ip_idle_gen_disable()
271 static void pwr_island_delay_set_50xx(struct ivpu_device *vdev) in pwr_island_delay_set_50xx() argument
275 if (vdev->hw->pll.profiling_freq == PLL_PROFILING_FREQ_DEFAULT) { in pwr_island_delay_set_50xx()
292 static void pwr_island_trickle_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_trickle_drive_37xx() argument
304 static void pwr_island_trickle_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_trickle_drive_40xx() argument
319 static void pwr_island_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_drive_37xx() argument
334 static void pwr_island_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_drive_40xx() argument
346 static void pwr_island_enable(struct ivpu_device *vdev) in pwr_island_enable() argument
348 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in pwr_island_enable()
349 pwr_island_trickle_drive_37xx(vdev, true); in pwr_island_enable()
350 pwr_island_drive_37xx(vdev, true); in pwr_island_enable()
352 pwr_island_trickle_drive_40xx(vdev, true); in pwr_island_enable()
353 pwr_island_drive_40xx(vdev, true); in pwr_island_enable()
357 static int wait_for_pwr_island_status(struct ivpu_device *vdev, u32 exp_val) in wait_for_pwr_island_status() argument
362 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in wait_for_pwr_island_status()
370 static void pwr_island_isolation_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive_37xx() argument
382 static void pwr_island_isolation_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive_40xx() argument
394 static void pwr_island_isolation_drive(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive() argument
396 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in pwr_island_isolation_drive()
397 pwr_island_isolation_drive_37xx(vdev, enable); in pwr_island_isolation_drive()
399 pwr_island_isolation_drive_40xx(vdev, enable); in pwr_island_isolation_drive()
402 static void pwr_island_isolation_disable(struct ivpu_device *vdev) in pwr_island_isolation_disable() argument
404 pwr_island_isolation_drive(vdev, false); in pwr_island_isolation_disable()
407 static void host_ss_clk_drive_37xx(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive_37xx() argument
424 static void host_ss_clk_drive_40xx(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive_40xx() argument
441 static void host_ss_clk_drive(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive() argument
443 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_clk_drive()
444 host_ss_clk_drive_37xx(vdev, enable); in host_ss_clk_drive()
446 host_ss_clk_drive_40xx(vdev, enable); in host_ss_clk_drive()
449 static void host_ss_clk_enable(struct ivpu_device *vdev) in host_ss_clk_enable() argument
451 host_ss_clk_drive(vdev, true); in host_ss_clk_enable()
454 static void host_ss_rst_drive_37xx(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive_37xx() argument
471 static void host_ss_rst_drive_40xx(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive_40xx() argument
488 static void host_ss_rst_drive(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive() argument
490 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_rst_drive()
491 host_ss_rst_drive_37xx(vdev, enable); in host_ss_rst_drive()
493 host_ss_rst_drive_40xx(vdev, enable); in host_ss_rst_drive()
496 static void host_ss_rst_enable(struct ivpu_device *vdev) in host_ss_rst_enable() argument
498 host_ss_rst_drive(vdev, true); in host_ss_rst_enable()
501 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
512 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
523 static void host_ss_noc_qreqn_top_socmmio_drive(struct ivpu_device *vdev, bool enable) in host_ss_noc_qreqn_top_socmmio_drive() argument
525 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in host_ss_noc_qreqn_top_socmmio_drive()
526 host_ss_noc_qreqn_top_socmmio_drive_37xx(vdev, enable); in host_ss_noc_qreqn_top_socmmio_drive()
528 host_ss_noc_qreqn_top_socmmio_drive_40xx(vdev, enable); in host_ss_noc_qreqn_top_socmmio_drive()
531 static int host_ss_axi_drive(struct ivpu_device *vdev, bool enable) in host_ss_axi_drive() argument
535 host_ss_noc_qreqn_top_socmmio_drive(vdev, enable); in host_ss_axi_drive()
537 ret = host_ss_noc_qacceptn_check(vdev, enable ? 0x1 : 0x0); in host_ss_axi_drive()
539 ivpu_err(vdev, "Failed HOST SS NOC QACCEPTN check: %d\n", ret); in host_ss_axi_drive()
543 ret = host_ss_noc_qdeny_check(vdev, 0x0); in host_ss_axi_drive()
545 ivpu_err(vdev, "Failed HOST SS NOC QDENY check: %d\n", ret); in host_ss_axi_drive()
550 static void top_noc_qreqn_drive_40xx(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive_40xx() argument
565 static void top_noc_qreqn_drive_37xx(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive_37xx() argument
580 static void top_noc_qreqn_drive(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive() argument
582 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qreqn_drive()
583 top_noc_qreqn_drive_37xx(vdev, enable); in top_noc_qreqn_drive()
585 top_noc_qreqn_drive_40xx(vdev, enable); in top_noc_qreqn_drive()
588 int ivpu_hw_ip_host_ss_axi_enable(struct ivpu_device *vdev) in ivpu_hw_ip_host_ss_axi_enable() argument
590 return host_ss_axi_drive(vdev, true); in ivpu_hw_ip_host_ss_axi_enable()
593 static int top_noc_qacceptn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check_37xx() argument
604 static int top_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check_40xx() argument
615 static int top_noc_qacceptn_check(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check() argument
617 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qacceptn_check()
618 return top_noc_qacceptn_check_37xx(vdev, exp_val); in top_noc_qacceptn_check()
620 return top_noc_qacceptn_check_40xx(vdev, exp_val); in top_noc_qacceptn_check()
623 static int top_noc_qdeny_check_37xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qdeny_check_37xx() argument
634 static int top_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qdeny_check_40xx() argument
645 static int top_noc_qdeny_check(struct ivpu_device *vdev, u32 exp_val) in top_noc_qdeny_check() argument
647 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in top_noc_qdeny_check()
648 return top_noc_qdeny_check_37xx(vdev, exp_val); in top_noc_qdeny_check()
650 return top_noc_qdeny_check_40xx(vdev, exp_val); in top_noc_qdeny_check()
653 static int top_noc_drive(struct ivpu_device *vdev, bool enable) in top_noc_drive() argument
657 top_noc_qreqn_drive(vdev, enable); in top_noc_drive()
659 ret = top_noc_qacceptn_check(vdev, enable ? 0x1 : 0x0); in top_noc_drive()
661 ivpu_err(vdev, "Failed TOP NOC QACCEPTN check: %d\n", ret); in top_noc_drive()
665 ret = top_noc_qdeny_check(vdev, 0x0); in top_noc_drive()
667 ivpu_err(vdev, "Failed TOP NOC QDENY check: %d\n", ret); in top_noc_drive()
672 int ivpu_hw_ip_top_noc_enable(struct ivpu_device *vdev) in ivpu_hw_ip_top_noc_enable() argument
674 return top_noc_drive(vdev, true); in ivpu_hw_ip_top_noc_enable()
677 static void dpu_active_drive_37xx(struct ivpu_device *vdev, bool enable) in dpu_active_drive_37xx() argument
689 int ivpu_hw_ip_pwr_domain_enable(struct ivpu_device *vdev) in ivpu_hw_ip_pwr_domain_enable() argument
693 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_50XX) in ivpu_hw_ip_pwr_domain_enable()
694 pwr_island_delay_set_50xx(vdev); in ivpu_hw_ip_pwr_domain_enable()
696 pwr_island_enable(vdev); in ivpu_hw_ip_pwr_domain_enable()
698 ret = wait_for_pwr_island_status(vdev, 0x1); in ivpu_hw_ip_pwr_domain_enable()
700 ivpu_err(vdev, "Timed out waiting for power island status\n"); in ivpu_hw_ip_pwr_domain_enable()
704 ret = top_noc_qreqn_check(vdev, 0x0); in ivpu_hw_ip_pwr_domain_enable()
706 ivpu_err(vdev, "Failed TOP NOC QREQN check %d\n", ret); in ivpu_hw_ip_pwr_domain_enable()
710 host_ss_clk_enable(vdev); in ivpu_hw_ip_pwr_domain_enable()
711 pwr_island_isolation_disable(vdev); in ivpu_hw_ip_pwr_domain_enable()
712 host_ss_rst_enable(vdev); in ivpu_hw_ip_pwr_domain_enable()
714 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_pwr_domain_enable()
715 dpu_active_drive_37xx(vdev, true); in ivpu_hw_ip_pwr_domain_enable()
720 u64 ivpu_hw_ip_read_perf_timer_counter(struct ivpu_device *vdev) in ivpu_hw_ip_read_perf_timer_counter() argument
722 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_read_perf_timer_counter()
728 static void ivpu_hw_ip_snoop_disable_37xx(struct ivpu_device *vdev) in ivpu_hw_ip_snoop_disable_37xx() argument
735 if (ivpu_is_force_snoop_enabled(vdev)) in ivpu_hw_ip_snoop_disable_37xx()
743 static void ivpu_hw_ip_snoop_disable_40xx(struct ivpu_device *vdev) in ivpu_hw_ip_snoop_disable_40xx() argument
750 if (ivpu_is_force_snoop_enabled(vdev)) in ivpu_hw_ip_snoop_disable_40xx()
758 void ivpu_hw_ip_snoop_disable(struct ivpu_device *vdev) in ivpu_hw_ip_snoop_disable() argument
760 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_snoop_disable()
761 return ivpu_hw_ip_snoop_disable_37xx(vdev); in ivpu_hw_ip_snoop_disable()
763 return ivpu_hw_ip_snoop_disable_40xx(vdev); in ivpu_hw_ip_snoop_disable()
766 static void ivpu_hw_ip_tbu_mmu_enable_37xx(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable_37xx() argument
778 static void ivpu_hw_ip_tbu_mmu_enable_40xx(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable_40xx() argument
792 void ivpu_hw_ip_tbu_mmu_enable(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable() argument
794 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_tbu_mmu_enable()
795 return ivpu_hw_ip_tbu_mmu_enable_37xx(vdev); in ivpu_hw_ip_tbu_mmu_enable()
797 return ivpu_hw_ip_tbu_mmu_enable_40xx(vdev); in ivpu_hw_ip_tbu_mmu_enable()
800 static int soc_cpu_boot_37xx(struct ivpu_device *vdev) in soc_cpu_boot_37xx() argument
816 val = vdev->fw->entry_point >> 9; in soc_cpu_boot_37xx()
822 ivpu_dbg(vdev, PM, "Booting firmware, mode: %s\n", in soc_cpu_boot_37xx()
823 vdev->fw->entry_point == vdev->fw->cold_boot_entry_point ? "cold boot" : "resume"); in soc_cpu_boot_37xx()
828 static int cpu_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in cpu_noc_qacceptn_check_40xx() argument
838 static int cpu_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in cpu_noc_qdeny_check_40xx() argument
848 static void cpu_noc_top_mmio_drive_40xx(struct ivpu_device *vdev, bool enable) in cpu_noc_top_mmio_drive_40xx() argument
859 static int soc_cpu_drive_40xx(struct ivpu_device *vdev, bool enable) in soc_cpu_drive_40xx() argument
863 cpu_noc_top_mmio_drive_40xx(vdev, enable); in soc_cpu_drive_40xx()
865 ret = cpu_noc_qacceptn_check_40xx(vdev, enable ? 0x1 : 0x0); in soc_cpu_drive_40xx()
867 ivpu_err(vdev, "Failed qacceptn check: %d\n", ret); in soc_cpu_drive_40xx()
871 ret = cpu_noc_qdeny_check_40xx(vdev, 0x0); in soc_cpu_drive_40xx()
873 ivpu_err(vdev, "Failed qdeny check: %d\n", ret); in soc_cpu_drive_40xx()
878 static int soc_cpu_enable(struct ivpu_device *vdev) in soc_cpu_enable() argument
880 return soc_cpu_drive_40xx(vdev, true); in soc_cpu_enable()
883 static int soc_cpu_boot_40xx(struct ivpu_device *vdev) in soc_cpu_boot_40xx() argument
889 ret = soc_cpu_enable(vdev); in soc_cpu_boot_40xx()
891 ivpu_err(vdev, "Failed to enable SOC CPU: %d\n", ret); in soc_cpu_boot_40xx()
895 val64 = vdev->fw->entry_point; in soc_cpu_boot_40xx()
903 ivpu_dbg(vdev, PM, "Booting firmware, mode: %s\n", in soc_cpu_boot_40xx()
904 ivpu_fw_is_cold_boot(vdev) ? "cold boot" : "resume"); in soc_cpu_boot_40xx()
909 int ivpu_hw_ip_soc_cpu_boot(struct ivpu_device *vdev) in ivpu_hw_ip_soc_cpu_boot() argument
911 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_soc_cpu_boot()
912 return soc_cpu_boot_37xx(vdev); in ivpu_hw_ip_soc_cpu_boot()
914 return soc_cpu_boot_40xx(vdev); in ivpu_hw_ip_soc_cpu_boot()
917 static void wdt_disable_37xx(struct ivpu_device *vdev) in wdt_disable_37xx() argument
935 static void wdt_disable_40xx(struct ivpu_device *vdev) in wdt_disable_40xx() argument
950 void ivpu_hw_ip_wdt_disable(struct ivpu_device *vdev) in ivpu_hw_ip_wdt_disable() argument
952 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_wdt_disable()
953 return wdt_disable_37xx(vdev); in ivpu_hw_ip_wdt_disable()
955 return wdt_disable_40xx(vdev); in ivpu_hw_ip_wdt_disable()
958 static u32 ipc_rx_count_get_37xx(struct ivpu_device *vdev) in ipc_rx_count_get_37xx() argument
965 static u32 ipc_rx_count_get_40xx(struct ivpu_device *vdev) in ipc_rx_count_get_40xx() argument
972 u32 ivpu_hw_ip_ipc_rx_count_get(struct ivpu_device *vdev) in ivpu_hw_ip_ipc_rx_count_get() argument
974 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_ipc_rx_count_get()
975 return ipc_rx_count_get_37xx(vdev); in ivpu_hw_ip_ipc_rx_count_get()
977 return ipc_rx_count_get_40xx(vdev); in ivpu_hw_ip_ipc_rx_count_get()
980 void ivpu_hw_ip_irq_enable(struct ivpu_device *vdev) in ivpu_hw_ip_irq_enable() argument
982 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in ivpu_hw_ip_irq_enable()
991 void ivpu_hw_ip_irq_disable(struct ivpu_device *vdev) in ivpu_hw_ip_irq_disable() argument
993 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) { in ivpu_hw_ip_irq_disable()
1002 static void diagnose_failure_37xx(struct ivpu_device *vdev) in diagnose_failure_37xx() argument
1006 if (ipc_rx_count_get_37xx(vdev)) in diagnose_failure_37xx()
1007 ivpu_err(vdev, "IPC FIFO queue not empty, missed IPC IRQ"); in diagnose_failure_37xx()
1010 ivpu_err(vdev, "WDT MSS timeout detected\n"); in diagnose_failure_37xx()
1013 ivpu_err(vdev, "WDT NCE timeout detected\n"); in diagnose_failure_37xx()
1016 ivpu_err(vdev, "NOC Firewall irq detected\n"); in diagnose_failure_37xx()
1019 static void diagnose_failure_40xx(struct ivpu_device *vdev) in diagnose_failure_40xx() argument
1023 if (ipc_rx_count_get_40xx(vdev)) in diagnose_failure_40xx()
1024 ivpu_err(vdev, "IPC FIFO queue not empty, missed IPC IRQ"); in diagnose_failure_40xx()
1027 ivpu_err(vdev, "WDT MSS timeout detected\n"); in diagnose_failure_40xx()
1030 ivpu_err(vdev, "WDT NCE timeout detected\n"); in diagnose_failure_40xx()
1033 ivpu_err(vdev, "NOC Firewall irq detected\n"); in diagnose_failure_40xx()
1036 void ivpu_hw_ip_diagnose_failure(struct ivpu_device *vdev) in ivpu_hw_ip_diagnose_failure() argument
1038 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_diagnose_failure()
1039 diagnose_failure_37xx(vdev); in ivpu_hw_ip_diagnose_failure()
1041 diagnose_failure_40xx(vdev); in ivpu_hw_ip_diagnose_failure()
1044 void ivpu_hw_ip_irq_clear(struct ivpu_device *vdev) in ivpu_hw_ip_irq_clear() argument
1046 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_irq_clear()
1052 static void irq_wdt_nce_handler(struct ivpu_device *vdev) in irq_wdt_nce_handler() argument
1054 ivpu_pm_trigger_recovery(vdev, "WDT NCE IRQ"); in irq_wdt_nce_handler()
1057 static void irq_wdt_mss_handler(struct ivpu_device *vdev) in irq_wdt_mss_handler() argument
1059 ivpu_hw_ip_wdt_disable(vdev); in irq_wdt_mss_handler()
1060 ivpu_pm_trigger_recovery(vdev, "WDT MSS IRQ"); in irq_wdt_mss_handler()
1063 static void irq_noc_firewall_handler(struct ivpu_device *vdev) in irq_noc_firewall_handler() argument
1065 atomic_inc(&vdev->hw->firewall_irq_counter); in irq_noc_firewall_handler()
1067 ivpu_dbg(vdev, IRQ, "NOC Firewall interrupt detected, counter %d\n", in irq_noc_firewall_handler()
1068 atomic_read(&vdev->hw->firewall_irq_counter)); in irq_noc_firewall_handler()
1072 bool ivpu_hw_ip_irq_handler_37xx(struct ivpu_device *vdev, int irq) in ivpu_hw_ip_irq_handler_37xx() argument
1082 ivpu_mmu_irq_evtq_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1085 ivpu_ipc_irq_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1088 ivpu_dbg(vdev, IRQ, "MMU sync complete\n"); in ivpu_hw_ip_irq_handler_37xx()
1091 ivpu_mmu_irq_gerr_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1094 irq_wdt_mss_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1097 irq_wdt_nce_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1100 irq_noc_firewall_handler(vdev); in ivpu_hw_ip_irq_handler_37xx()
1106 bool ivpu_hw_ip_irq_handler_40xx(struct ivpu_device *vdev, int irq) in ivpu_hw_ip_irq_handler_40xx() argument
1116 ivpu_mmu_irq_evtq_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1119 ivpu_ipc_irq_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1122 ivpu_dbg(vdev, IRQ, "MMU sync complete\n"); in ivpu_hw_ip_irq_handler_40xx()
1125 ivpu_mmu_irq_gerr_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1128 irq_wdt_mss_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1131 irq_wdt_nce_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1134 irq_noc_firewall_handler(vdev); in ivpu_hw_ip_irq_handler_40xx()
1139 static void db_set_37xx(struct ivpu_device *vdev, u32 db_id) in db_set_37xx() argument
1147 static void db_set_40xx(struct ivpu_device *vdev, u32 db_id) in db_set_40xx() argument
1155 void ivpu_hw_ip_db_set(struct ivpu_device *vdev, u32 db_id) in ivpu_hw_ip_db_set() argument
1157 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_db_set()
1158 db_set_37xx(vdev, db_id); in ivpu_hw_ip_db_set()
1160 db_set_40xx(vdev, db_id); in ivpu_hw_ip_db_set()
1163 u32 ivpu_hw_ip_ipc_rx_addr_get(struct ivpu_device *vdev) in ivpu_hw_ip_ipc_rx_addr_get() argument
1165 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_ipc_rx_addr_get()
1171 void ivpu_hw_ip_ipc_tx_set(struct ivpu_device *vdev, u32 vpu_addr) in ivpu_hw_ip_ipc_tx_set() argument
1173 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) in ivpu_hw_ip_ipc_tx_set()