Lines Matching +full:clk +full:- +full:mgr

1 /* SPDX-License-Identifier: GPL-2.0
3 * Copyright 2016-2019 HabanaLabs, Ltd.
18 #include <linux/dma-direction.h>
26 * bits[63:62] - Encode mmap type
27 * bits[45:0] - mmap offset value
32 #define HL_MMAP_TYPE_SHIFT (62 - PAGE_SHIFT)
76 #define IS_POWER_OF_2(n) (n != 0 && ((n & (n - 1)) == 0))
84 * struct pgt_info - MMU hop page info.
85 * @node: hash linked-list node for the pgts shadow hash of pgts.
108 * enum hl_pci_match_mode - pci match mode per region
118 * enum hl_fw_component - F/W components to read version through registers.
119 * @FW_COMP_UBOOT: u-boot.
128 * enum hl_queue_type - Supported QUEUE types.
153 * struct hl_inbound_pci_region - inbound region descriptor
169 * struct hl_outbound_pci_region - outbound region descriptor
179 * struct hl_hw_sob - H/W SOB info.
193 * struct hw_queue_properties - queue information.
209 * enum vm_type_t - virtual memory mapping request information.
219 * enum hl_device_hw_state - H/W device state. use this to understand whether
231 * struct hl_mmu_properties - ASIC specific MMU address translation properties.
269 * struct asic_fixed_properties - ASIC specific immutable properties.
271 * @cpucp_info: received various information from CPU-CP regarding the H/W, e.g.
273 * @uboot_ver: F/W U-boot version.
281 * @sram_user_base_address - SRAM physical start address for user access.
379 * struct hl_fence - software synchronization primitive
392 * struct hl_cs_compl - command submission completion object.
398 * @type: type of the CS - signal/wait.
416 * struct hl_cb_mgr - describes a Command Buffer Manager.
426 * struct hl_cb - describes a Command Buffer.
489 /* Host <-> CPU-CP shared memory size */
493 * struct hl_hw_queue - describes a H/W transport queue.
535 * struct hl_cq - describes a completion queue
557 * struct hl_eq - describes the event queue (single one per device)
576 * enum hl_asic_type - supported ASIC types.
590 * enum hl_pm_mng_profile - power management profile.
602 * enum hl_pll_frequency - PLL frequency.
623 * struct hl_asic_funcs - ASIC specific functions that are can be called from
627 * @late_init: sets up late driver/hw state (post hw_init) - Optional.
628 * @late_fini: tears down what was done in late_init (pre hw_fini) - Optional.
640 * @pqe_write: Write the PQ entry to the PQ. This is ASIC-specific
660 * @hl_dma_unmap_sg: DMA unmap scatter-gather list.
662 * @asic_dma_map_sg: DMA map scatter-gather list.
671 * @handle_eqe: handle event queue entry (IRQ) from CPU-CP.
679 * ASID-VA-size mask.
680 * @send_heartbeat: send is-alive packet to CPU-CP and verify response.
829 * struct hl_va_range - virtual addresses range.
843 * struct hl_ctx - user/kernel context.
905 * struct hl_ctx_mgr - for handling multiple contexts.
921 * struct hl_userptr - memory mapping chunk information
923 * @job_node: linked-list node for hanging the object on the Job's list.
925 * @sgt: pointer to the scatter-gather table that holds the pages.
928 * @addr: user-space virtual address of the start of the memory area.
945 * struct hl_cs - command submission.
989 * struct hl_cs_job - command submission job.
996 * @userptr_list: linked-list of userptr mappings that belong to this job and
1005 * handle to a kernel-allocated CB object, false
1032 * struct hl_cs_parser - command submission parser properties.
1036 * @job_userptr_list: linked-list of userptr mappings that belong to the related
1046 * handle to a kernel-allocated CB object, false
1076 * struct hl_vm_hash_node - hash element from virtual address to virtual
1090 * struct hl_vm_phys_pg_pack - physical page pack.
1120 * struct hl_vm_va_block - virtual range block information.
1134 * struct hl_vm - virtual memory manager for MMU.
1156 * struct hl_debug_params - Coresight debug parameters.
1178 * struct hl_fpriv - process information stored in FD private data.
1211 * struct hl_info_list - debugfs file ops.
1224 * struct hl_debugfs_entry - debugfs dentry wrapper.
1236 * struct hl_dbg_device_entry - ASIC specific debugfs manager.
1300 #define RREG32(reg) hdev->asic_funcs->rreg(hdev, (reg))
1301 #define WREG32(reg, v) hdev->asic_funcs->wreg(hdev, (reg), (v))
1303 hdev->asic_funcs->rreg(hdev, (reg)))
1338 if (hdev->pdev) \
1356 (cond) ? 0 : -ETIMEDOUT; \
1369 * might need to be byte-swapped before returning value to caller.
1375 if (hdev->pdev) \
1399 (cond) ? 0 : -ETIMEDOUT; \
1406 if (hdev->pdev) \
1424 (cond) ? 0 : -ETIMEDOUT; \
1430 * struct hl_device_reset_work - reset workqueue task wrapper.
1440 * struct hl_device_idle_busy_ts - used for calculating device utilization rate.
1451 * struct hl_mmu_priv - used for holding per-device mmu internal information.
1461 * struct hl_mmu_funcs - Device related MMU functions.
1488 * struct hl_device - habanalabs device structure.
1499 * @work_heartbeat: delayed work for CPU-CP is-alive check.
1511 * @event_queue: event queue for IRQ from CPU-CP.
1513 * @cpu_accessible_dma_mem: Host <-> CPU-CP shared memory CPU address.
1514 * @cpu_accessible_dma_address: Host <-> CPU-CP shared memory DMA address.
1515 * @cpu_accessible_dma_pool: Host <-> CPU-CP shared memory pool.
1518 * @send_cpu_message_lock: enforces only one message in Host <-> CPU-CP queue.
1540 * and vice-versa
1542 * @mmu_priv: device-specific MMU data.
1543 * @mmu_func: device-related MMU functions.
1547 * value is saved so in case of hard-reset, the driver will restore
1548 * this value and update the F/W after the re-initialization
1550 * different engines. See debugfs-driver-habanalabs for
1563 * @clk_throttling_reason: bitmask represents the current clk throttling reasons
1566 * @cpu_pci_msb_addr: 50-bit extension bits for the device CPU's 40-bit
1572 * @heartbeat: is heartbeat sanity check towards CPU-CP enabled.
1586 * @power9_64bit_dma_enable: true to enable 64-bit DMA mask support. Relevant
1696 /* Parameters for bring-up */
1718 * typedef hl_ioctl_t - typedef for ioctl function in the driver
1728 * struct hl_ioctl_desc - describes an IOCTL entry of the driver.
1743 * hl_mem_area_inside_range() - Checks whether address+size are inside a range.
1765 * hl_mem_area_crosses_range() - Checks whether address+size crossing a range.
1813 #define hl_pi_2_offset(pi) ((pi) & (HL_QUEUE_LENGTH - 1))
1837 void hl_ctx_mgr_init(struct hl_ctx_mgr *mgr);
1838 void hl_ctx_mgr_fini(struct hl_device *hdev, struct hl_ctx_mgr *mgr);
1860 int hl_cb_create(struct hl_device *hdev, struct hl_cb_mgr *mgr,
1863 int hl_cb_destroy(struct hl_device *hdev, struct hl_cb_mgr *mgr, u64 cb_handle);
1865 struct hl_cb *hl_cb_get(struct hl_device *hdev, struct hl_cb_mgr *mgr,
1868 void hl_cb_mgr_init(struct hl_cb_mgr *mgr);
1869 void hl_cb_mgr_fini(struct hl_device *hdev, struct hl_cb_mgr *mgr);