Lines Matching defs:hl_asic_funcs

1641 struct hl_asic_funcs {  struct
1642 int (*early_init)(struct hl_device *hdev);
1643 int (*early_fini)(struct hl_device *hdev);
1644 int (*late_init)(struct hl_device *hdev);
1645 void (*late_fini)(struct hl_device *hdev);
1646 int (*sw_init)(struct hl_device *hdev);
1647 int (*sw_fini)(struct hl_device *hdev);
1648 int (*hw_init)(struct hl_device *hdev);
1649 int (*hw_fini)(struct hl_device *hdev, bool hard_reset, bool fw_reset);
1650 void (*halt_engines)(struct hl_device *hdev, bool hard_reset, bool fw_reset);
1651 int (*suspend)(struct hl_device *hdev);
1652 int (*resume)(struct hl_device *hdev);
1653 int (*mmap)(struct hl_device *hdev, struct vm_area_struct *vma,
1655 void (*ring_doorbell)(struct hl_device *hdev, u32 hw_queue_id, u32 pi);
1656 void (*pqe_write)(struct hl_device *hdev, __le64 *pqe,
1658 void* (*asic_dma_alloc_coherent)(struct hl_device *hdev, size_t size,
1660 void (*asic_dma_free_coherent)(struct hl_device *hdev, size_t size,
1662 int (*scrub_device_mem)(struct hl_device *hdev);
1663 int (*scrub_device_dram)(struct hl_device *hdev, u64 val);
1664 void* (*get_int_queue_base)(struct hl_device *hdev, u32 queue_id,
1666 int (*test_queues)(struct hl_device *hdev);
1667 void* (*asic_dma_pool_zalloc)(struct hl_device *hdev, size_t size,
1669 void (*asic_dma_pool_free)(struct hl_device *hdev, void *vaddr,
1671 void* (*cpu_accessible_dma_pool_alloc)(struct hl_device *hdev,
1673 void (*cpu_accessible_dma_pool_free)(struct hl_device *hdev,
1675 void (*dma_unmap_sgtable)(struct hl_device *hdev, struct sg_table *sgt,
1677 int (*dma_map_sgtable)(struct hl_device *hdev, struct sg_table *sgt,
1679 int (*cs_parser)(struct hl_device *hdev, struct hl_cs_parser *parser);
1680 void (*add_end_of_cb_packets)(struct hl_device *hdev,
1685 void (*update_eq_ci)(struct hl_device *hdev, u32 val);
1686 int (*context_switch)(struct hl_device *hdev, u32 asid);
1687 void (*restore_phase_topology)(struct hl_device *hdev);
1688 int (*debugfs_read_dma)(struct hl_device *hdev, u64 addr, u32 size,
1690 void (*add_device_attr)(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp,
1692 void (*handle_eqe)(struct hl_device *hdev,
1694 void* (*get_events_stat)(struct hl_device *hdev, bool aggregate,
1696 u64 (*read_pte)(struct hl_device *hdev, u64 addr);
1697 void (*write_pte)(struct hl_device *hdev, u64 addr, u64 val);
1698 int (*mmu_invalidate_cache)(struct hl_device *hdev, bool is_hard,
1700 int (*mmu_invalidate_cache_range)(struct hl_device *hdev, bool is_hard,
1702 int (*mmu_prefetch_cache_range)(struct hl_ctx *ctx, u32 flags, u32 asid, u64 va, u64 size);
1703 int (*send_heartbeat)(struct hl_device *hdev);
1704 int (*debug_coresight)(struct hl_device *hdev, struct hl_ctx *ctx, void *data);
1705 bool (*is_device_idle)(struct hl_device *hdev, u64 *mask_arr, u8 mask_len,
1707 int (*compute_reset_late_init)(struct hl_device *hdev);
1708 void (*hw_queues_lock)(struct hl_device *hdev);
1709 void (*hw_queues_unlock)(struct hl_device *hdev);
1710 u32 (*get_pci_id)(struct hl_device *hdev);
1711 int (*get_eeprom_data)(struct hl_device *hdev, void *data, size_t max_size);
1712 int (*get_monitor_dump)(struct hl_device *hdev, void *data);
1713 int (*send_cpu_message)(struct hl_device *hdev, u32 *msg,
1715 int (*pci_bars_map)(struct hl_device *hdev);
1716 int (*init_iatu)(struct hl_device *hdev);
1717 u32 (*rreg)(struct hl_device *hdev, u32 reg);
1718 void (*wreg)(struct hl_device *hdev, u32 reg, u32 val);
1719 void (*halt_coresight)(struct hl_device *hdev, struct hl_ctx *ctx);
1720 int (*ctx_init)(struct hl_ctx *ctx);
1721 void (*ctx_fini)(struct hl_ctx *ctx);
1722 int (*pre_schedule_cs)(struct hl_cs *cs);
1723 u32 (*get_queue_id_for_cq)(struct hl_device *hdev, u32 cq_idx);
1724 int (*load_firmware_to_device)(struct hl_device *hdev);
1725 int (*load_boot_fit_to_device)(struct hl_device *hdev);
1726 u32 (*get_signal_cb_size)(struct hl_device *hdev);
1727 u32 (*get_wait_cb_size)(struct hl_device *hdev);
1728 u32 (*gen_signal_cb)(struct hl_device *hdev, void *data, u16 sob_id,
1730 u32 (*gen_wait_cb)(struct hl_device *hdev,
1732 void (*reset_sob)(struct hl_device *hdev, void *data);
1733 void (*reset_sob_group)(struct hl_device *hdev, u16 sob_group);
1734 u64 (*get_device_time)(struct hl_device *hdev);
1735 void (*pb_print_security_errors)(struct hl_device *hdev,
1737 int (*collective_wait_init_cs)(struct hl_cs *cs);
1738 int (*collective_wait_create_jobs)(struct hl_device *hdev,
1742 u32 (*get_dec_base_addr)(struct hl_device *hdev, u32 core_id);
1743 u64 (*scramble_addr)(struct hl_device *hdev, u64 addr);
1744 u64 (*descramble_addr)(struct hl_device *hdev, u64 addr);
1745 void (*ack_protection_bits_errors)(struct hl_device *hdev);
1746 int (*get_hw_block_id)(struct hl_device *hdev, u64 block_addr,
1748 int (*hw_block_mmap)(struct hl_device *hdev, struct vm_area_struct *vma,
1750 void (*enable_events_from_fw)(struct hl_device *hdev);
1751 int (*ack_mmu_errors)(struct hl_device *hdev, u64 mmu_cap_mask);
1752 void (*get_msi_info)(__le32 *table);
1753 int (*map_pll_idx_to_fw_idx)(u32 pll_idx);
1754 void (*init_firmware_preload_params)(struct hl_device *hdev);
1755 void (*init_firmware_loader)(struct hl_device *hdev);
1756 void (*init_cpu_scrambler_dram)(struct hl_device *hdev);
1757 void (*state_dump_init)(struct hl_device *hdev);
1758 u32 (*get_sob_addr)(struct hl_device *hdev, u32 sob_id);
1759 void (*set_pci_memory_regions)(struct hl_device *hdev);
1760 u32* (*get_stream_master_qid_arr)(void);
1761 void (*check_if_razwi_happened)(struct hl_device *hdev);
1762 int (*mmu_get_real_page_size)(struct hl_device *hdev, struct hl_mmu_properties *mmu_prop,
1764 int (*access_dev_mem)(struct hl_device *hdev, enum pci_region region_type,
1766 u64 (*set_dram_bar_base)(struct hl_device *hdev, u64 addr);
1767 int (*set_engine_cores)(struct hl_device *hdev, u32 *core_ids,
1769 int (*set_engines)(struct hl_device *hdev, u32 *engine_ids,
1771 int (*send_device_activity)(struct hl_device *hdev, bool open);
1772 int (*set_dram_properties)(struct hl_device *hdev);
1773 int (*set_binning_masks)(struct hl_device *hdev);