Lines Matching defs:hl_asic_funcs
1537 struct hl_asic_funcs { struct
1538 int (*early_init)(struct hl_device *hdev);
1539 int (*early_fini)(struct hl_device *hdev);
1540 int (*late_init)(struct hl_device *hdev);
1541 void (*late_fini)(struct hl_device *hdev);
1542 int (*sw_init)(struct hl_device *hdev);
1543 int (*sw_fini)(struct hl_device *hdev);
1544 int (*hw_init)(struct hl_device *hdev);
1545 void (*hw_fini)(struct hl_device *hdev, bool hard_reset, bool fw_reset);
1546 void (*halt_engines)(struct hl_device *hdev, bool hard_reset, bool fw_reset);
1547 int (*suspend)(struct hl_device *hdev);
1548 int (*resume)(struct hl_device *hdev);
1549 int (*mmap)(struct hl_device *hdev, struct vm_area_struct *vma,
1551 void (*ring_doorbell)(struct hl_device *hdev, u32 hw_queue_id, u32 pi);
1552 void (*pqe_write)(struct hl_device *hdev, __le64 *pqe,
1554 void* (*asic_dma_alloc_coherent)(struct hl_device *hdev, size_t size,
1556 void (*asic_dma_free_coherent)(struct hl_device *hdev, size_t size,
1558 int (*scrub_device_mem)(struct hl_device *hdev);
1559 int (*scrub_device_dram)(struct hl_device *hdev, u64 val);
1560 void* (*get_int_queue_base)(struct hl_device *hdev, u32 queue_id,
1562 int (*test_queues)(struct hl_device *hdev);
1563 void* (*asic_dma_pool_zalloc)(struct hl_device *hdev, size_t size,
1565 void (*asic_dma_pool_free)(struct hl_device *hdev, void *vaddr,
1567 void* (*cpu_accessible_dma_pool_alloc)(struct hl_device *hdev,
1569 void (*cpu_accessible_dma_pool_free)(struct hl_device *hdev,
1571 void (*asic_dma_unmap_single)(struct hl_device *hdev,
1574 dma_addr_t (*asic_dma_map_single)(struct hl_device *hdev,
1577 void (*hl_dma_unmap_sgtable)(struct hl_device *hdev,
1580 int (*cs_parser)(struct hl_device *hdev, struct hl_cs_parser *parser);
1581 int (*asic_dma_map_sgtable)(struct hl_device *hdev, struct sg_table *sgt,
1583 void (*add_end_of_cb_packets)(struct hl_device *hdev,
1588 void (*update_eq_ci)(struct hl_device *hdev, u32 val);
1589 int (*context_switch)(struct hl_device *hdev, u32 asid);
1590 void (*restore_phase_topology)(struct hl_device *hdev);
1591 int (*debugfs_read_dma)(struct hl_device *hdev, u64 addr, u32 size,
1593 void (*add_device_attr)(struct hl_device *hdev, struct attribute_group *dev_clk_attr_grp,
1595 void (*handle_eqe)(struct hl_device *hdev,
1597 void* (*get_events_stat)(struct hl_device *hdev, bool aggregate,
1599 u64 (*read_pte)(struct hl_device *hdev, u64 addr);
1600 void (*write_pte)(struct hl_device *hdev, u64 addr, u64 val);
1601 int (*mmu_invalidate_cache)(struct hl_device *hdev, bool is_hard,
1603 int (*mmu_invalidate_cache_range)(struct hl_device *hdev, bool is_hard,
1605 int (*mmu_prefetch_cache_range)(struct hl_ctx *ctx, u32 flags, u32 asid, u64 va, u64 size);
1606 int (*send_heartbeat)(struct hl_device *hdev);
1607 int (*debug_coresight)(struct hl_device *hdev, struct hl_ctx *ctx, void *data);
1608 bool (*is_device_idle)(struct hl_device *hdev, u64 *mask_arr, u8 mask_len,
1610 int (*compute_reset_late_init)(struct hl_device *hdev);
1611 void (*hw_queues_lock)(struct hl_device *hdev);
1612 void (*hw_queues_unlock)(struct hl_device *hdev);
1613 u32 (*get_pci_id)(struct hl_device *hdev);
1614 int (*get_eeprom_data)(struct hl_device *hdev, void *data, size_t max_size);
1615 int (*get_monitor_dump)(struct hl_device *hdev, void *data);
1616 int (*send_cpu_message)(struct hl_device *hdev, u32 *msg,
1618 int (*pci_bars_map)(struct hl_device *hdev);
1619 int (*init_iatu)(struct hl_device *hdev);
1620 u32 (*rreg)(struct hl_device *hdev, u32 reg);
1621 void (*wreg)(struct hl_device *hdev, u32 reg, u32 val);
1622 void (*halt_coresight)(struct hl_device *hdev, struct hl_ctx *ctx);
1623 int (*ctx_init)(struct hl_ctx *ctx);
1624 void (*ctx_fini)(struct hl_ctx *ctx);
1625 int (*pre_schedule_cs)(struct hl_cs *cs);
1626 u32 (*get_queue_id_for_cq)(struct hl_device *hdev, u32 cq_idx);
1627 int (*load_firmware_to_device)(struct hl_device *hdev);
1628 int (*load_boot_fit_to_device)(struct hl_device *hdev);
1629 u32 (*get_signal_cb_size)(struct hl_device *hdev);
1630 u32 (*get_wait_cb_size)(struct hl_device *hdev);
1631 u32 (*gen_signal_cb)(struct hl_device *hdev, void *data, u16 sob_id,
1633 u32 (*gen_wait_cb)(struct hl_device *hdev,
1635 void (*reset_sob)(struct hl_device *hdev, void *data);
1636 void (*reset_sob_group)(struct hl_device *hdev, u16 sob_group);
1637 u64 (*get_device_time)(struct hl_device *hdev);
1638 void (*pb_print_security_errors)(struct hl_device *hdev,
1640 int (*collective_wait_init_cs)(struct hl_cs *cs);
1641 int (*collective_wait_create_jobs)(struct hl_device *hdev,
1645 u32 (*get_dec_base_addr)(struct hl_device *hdev, u32 core_id);
1646 u64 (*scramble_addr)(struct hl_device *hdev, u64 addr);
1647 u64 (*descramble_addr)(struct hl_device *hdev, u64 addr);
1648 void (*ack_protection_bits_errors)(struct hl_device *hdev);
1649 int (*get_hw_block_id)(struct hl_device *hdev, u64 block_addr,
1651 int (*hw_block_mmap)(struct hl_device *hdev, struct vm_area_struct *vma,
1653 void (*enable_events_from_fw)(struct hl_device *hdev);
1654 int (*ack_mmu_errors)(struct hl_device *hdev, u64 mmu_cap_mask);
1655 void (*get_msi_info)(__le32 *table);
1656 int (*map_pll_idx_to_fw_idx)(u32 pll_idx);
1657 void (*init_firmware_preload_params)(struct hl_device *hdev);
1658 void (*init_firmware_loader)(struct hl_device *hdev);
1659 void (*init_cpu_scrambler_dram)(struct hl_device *hdev);
1660 void (*state_dump_init)(struct hl_device *hdev);
1661 u32 (*get_sob_addr)(struct hl_device *hdev, u32 sob_id);
1662 void (*set_pci_memory_regions)(struct hl_device *hdev);
1663 u32* (*get_stream_master_qid_arr)(void);
1664 void (*check_if_razwi_happened)(struct hl_device *hdev);
1665 int (*mmu_get_real_page_size)(struct hl_device *hdev, struct hl_mmu_properties *mmu_prop,
1667 int (*access_dev_mem)(struct hl_device *hdev, enum pci_region region_type,
1669 u64 (*set_dram_bar_base)(struct hl_device *hdev, u64 addr);
1670 int (*set_engine_cores)(struct hl_device *hdev, u32 *core_ids,
1672 int (*send_device_activity)(struct hl_device *hdev, bool open);