Lines Matching +full:static +full:- +full:enable

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2020-2024 Intel Corporation
69 static int wait_for_ip_bar(struct ivpu_device *vdev) in wait_for_ip_bar()
74 static void host_ss_rst_clr(struct ivpu_device *vdev) in host_ss_rst_clr()
85 static int host_ss_noc_qreqn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check_37xx()
90 return -EIO; in host_ss_noc_qreqn_check_37xx()
95 static int host_ss_noc_qreqn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qreqn_check_40xx()
100 return -EIO; in host_ss_noc_qreqn_check_40xx()
105 static int host_ss_noc_qreqn_check(struct ivpu_device *vdev, u32 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()
118 return -EIO; in host_ss_noc_qacceptn_check_37xx()
123 static int host_ss_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qacceptn_check_40xx()
128 return -EIO; in host_ss_noc_qacceptn_check_40xx()
133 static int host_ss_noc_qacceptn_check(struct ivpu_device *vdev, u32 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()
146 return -EIO; in host_ss_noc_qdeny_check_37xx()
151 static int host_ss_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in host_ss_noc_qdeny_check_40xx()
156 return -EIO; in host_ss_noc_qdeny_check_40xx()
161 static int host_ss_noc_qdeny_check(struct ivpu_device *vdev, u32 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()
175 return -EIO; in top_noc_qrenqn_check_37xx()
180 static int top_noc_qrenqn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qrenqn_check_40xx()
186 return -EIO; in top_noc_qrenqn_check_40xx()
191 static int top_noc_qreqn_check(struct ivpu_device *vdev, u32 exp_val) in top_noc_qreqn_check()
231 static void idle_gen_drive_37xx(struct ivpu_device *vdev, bool enable) in idle_gen_drive_37xx() argument
235 if (enable) in idle_gen_drive_37xx()
243 static void idle_gen_drive_40xx(struct ivpu_device *vdev, bool enable) in idle_gen_drive_40xx() argument
247 if (enable) in idle_gen_drive_40xx()
271 static void pwr_island_delay_set_50xx(struct ivpu_device *vdev) in pwr_island_delay_set_50xx()
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
296 if (enable) in pwr_island_trickle_drive_37xx()
304 static void pwr_island_trickle_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_trickle_drive_40xx() argument
308 if (enable) in pwr_island_trickle_drive_40xx()
315 if (enable) in pwr_island_trickle_drive_40xx()
319 static void pwr_island_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_drive_37xx() argument
323 if (enable) in pwr_island_drive_37xx()
330 if (!enable) in pwr_island_drive_37xx()
334 static void pwr_island_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_drive_40xx() argument
338 if (enable) in pwr_island_drive_40xx()
346 static void pwr_island_enable(struct ivpu_device *vdev) 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()
370 static void pwr_island_isolation_drive_37xx(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive_37xx() argument
374 if (enable) in pwr_island_isolation_drive_37xx()
382 static void pwr_island_isolation_drive_40xx(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive_40xx() argument
386 if (enable) in pwr_island_isolation_drive_40xx()
394 static void pwr_island_isolation_drive(struct ivpu_device *vdev, bool enable) in pwr_island_isolation_drive() argument
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()
407 static void host_ss_clk_drive_37xx(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive_37xx() argument
411 if (enable) { in host_ss_clk_drive_37xx()
424 static void host_ss_clk_drive_40xx(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive_40xx() argument
428 if (enable) { in host_ss_clk_drive_40xx()
441 static void host_ss_clk_drive(struct ivpu_device *vdev, bool enable) in host_ss_clk_drive() argument
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()
454 static void host_ss_rst_drive_37xx(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive_37xx() argument
458 if (enable) { in host_ss_rst_drive_37xx()
471 static void host_ss_rst_drive_40xx(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive_40xx() argument
475 if (enable) { in host_ss_rst_drive_40xx()
488 static void host_ss_rst_drive(struct ivpu_device *vdev, bool enable) in host_ss_rst_drive() argument
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()
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
505 if (enable) in host_ss_noc_qreqn_top_socmmio_drive_37xx()
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
516 if (enable) in host_ss_noc_qreqn_top_socmmio_drive_40xx()
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
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()
550 static void top_noc_qreqn_drive_40xx(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive_40xx() argument
554 if (enable) { in top_noc_qreqn_drive_40xx()
565 static void top_noc_qreqn_drive_37xx(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive_37xx() argument
569 if (enable) { in top_noc_qreqn_drive_37xx()
580 static void top_noc_qreqn_drive(struct ivpu_device *vdev, bool enable) in top_noc_qreqn_drive() argument
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()
593 static int top_noc_qacceptn_check_37xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check_37xx()
599 return -EIO; in top_noc_qacceptn_check_37xx()
604 static int top_noc_qacceptn_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qacceptn_check_40xx()
610 return -EIO; in top_noc_qacceptn_check_40xx()
615 static int top_noc_qacceptn_check(struct ivpu_device *vdev, u32 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()
629 return -EIO; in top_noc_qdeny_check_37xx()
634 static int top_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in top_noc_qdeny_check_40xx()
640 return -EIO; in top_noc_qdeny_check_40xx()
645 static int top_noc_qdeny_check(struct ivpu_device *vdev, u32 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()
677 static void dpu_active_drive_37xx(struct ivpu_device *vdev, bool enable) in dpu_active_drive_37xx() argument
681 if (enable) in dpu_active_drive_37xx()
728 static void ivpu_hw_ip_snoop_disable_37xx(struct ivpu_device *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()
766 static void ivpu_hw_ip_tbu_mmu_enable_37xx(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable_37xx()
778 static void ivpu_hw_ip_tbu_mmu_enable_40xx(struct ivpu_device *vdev) in ivpu_hw_ip_tbu_mmu_enable_40xx()
800 static int soc_cpu_boot_37xx(struct ivpu_device *vdev) in soc_cpu_boot_37xx()
816 val = vdev->fw->entry_point >> 9; 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()
833 return -EIO; in cpu_noc_qacceptn_check_40xx()
838 static int cpu_noc_qdeny_check_40xx(struct ivpu_device *vdev, u32 exp_val) in cpu_noc_qdeny_check_40xx()
843 return -EIO; in cpu_noc_qdeny_check_40xx()
848 static void cpu_noc_top_mmio_drive_40xx(struct ivpu_device *vdev, bool enable) in cpu_noc_top_mmio_drive_40xx() argument
852 if (enable) in cpu_noc_top_mmio_drive_40xx()
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()
878 static int soc_cpu_enable(struct ivpu_device *vdev) in soc_cpu_enable()
883 static int soc_cpu_boot_40xx(struct ivpu_device *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()
896 val64 <<= ffs(VPU_40XX_HOST_SS_VERIFICATION_ADDRESS_LO_IMAGE_LOCATION_MASK) - 1; in soc_cpu_boot_40xx()
917 static void wdt_disable_37xx(struct ivpu_device *vdev) in wdt_disable_37xx()
921 /* Enable writing and set non-zero WDT value */ in wdt_disable_37xx()
925 /* Enable writing and disable watchdog timer */ in wdt_disable_37xx()
935 static void wdt_disable_40xx(struct ivpu_device *vdev) in wdt_disable_40xx()
958 static u32 ipc_rx_count_get_37xx(struct ivpu_device *vdev) in ipc_rx_count_get_37xx()
965 static u32 ipc_rx_count_get_40xx(struct ivpu_device *vdev) in ipc_rx_count_get_40xx()
1002 static void diagnose_failure_37xx(struct ivpu_device *vdev) in diagnose_failure_37xx()
1019 static void diagnose_failure_40xx(struct ivpu_device *vdev) in diagnose_failure_40xx()
1052 static void irq_wdt_nce_handler(struct ivpu_device *vdev) in irq_wdt_nce_handler()
1057 static void irq_wdt_mss_handler(struct ivpu_device *vdev) in irq_wdt_mss_handler()
1063 static void irq_noc_firewall_handler(struct ivpu_device *vdev) in irq_noc_firewall_handler()
1065 atomic_inc(&vdev->hw->firewall_irq_counter); in irq_noc_firewall_handler()
1068 atomic_read(&vdev->hw->firewall_irq_counter)); in irq_noc_firewall_handler()
1139 static void db_set_37xx(struct ivpu_device *vdev, u32 db_id) in db_set_37xx()
1141 u32 reg_stride = VPU_37XX_CPU_SS_DOORBELL_1 - VPU_37XX_CPU_SS_DOORBELL_0; in db_set_37xx()
1147 static void db_set_40xx(struct ivpu_device *vdev, u32 db_id) in db_set_40xx()
1149 u32 reg_stride = VPU_40XX_CPU_SS_DOORBELL_1 - VPU_40XX_CPU_SS_DOORBELL_0; in db_set_40xx()