18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * Copyright 2019-2020 HabanaLabs, Ltd. 48c2ecf20Sopenharmony_ci * All Rights Reserved. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef GAUDIP_H_ 98c2ecf20Sopenharmony_ci#define GAUDIP_H_ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <uapi/misc/habanalabs.h> 128c2ecf20Sopenharmony_ci#include "../common/habanalabs.h" 138c2ecf20Sopenharmony_ci#include "../include/common/hl_boot_if.h" 148c2ecf20Sopenharmony_ci#include "../include/gaudi/gaudi_packets.h" 158c2ecf20Sopenharmony_ci#include "../include/gaudi/gaudi.h" 168c2ecf20Sopenharmony_ci#include "../include/gaudi/gaudi_async_events.h" 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define NUMBER_OF_EXT_HW_QUEUES 12 198c2ecf20Sopenharmony_ci#define NUMBER_OF_CMPLT_QUEUES NUMBER_OF_EXT_HW_QUEUES 208c2ecf20Sopenharmony_ci#define NUMBER_OF_CPU_HW_QUEUES 1 218c2ecf20Sopenharmony_ci#define NUMBER_OF_INT_HW_QUEUES 100 228c2ecf20Sopenharmony_ci#define NUMBER_OF_HW_QUEUES (NUMBER_OF_EXT_HW_QUEUES + \ 238c2ecf20Sopenharmony_ci NUMBER_OF_CPU_HW_QUEUES + \ 248c2ecf20Sopenharmony_ci NUMBER_OF_INT_HW_QUEUES) 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* 278c2ecf20Sopenharmony_ci * Number of MSI interrupts IDS: 288c2ecf20Sopenharmony_ci * Each completion queue has 1 ID 298c2ecf20Sopenharmony_ci * The event queue has 1 ID 308c2ecf20Sopenharmony_ci */ 318c2ecf20Sopenharmony_ci#define NUMBER_OF_INTERRUPTS (NUMBER_OF_CMPLT_QUEUES + \ 328c2ecf20Sopenharmony_ci NUMBER_OF_CPU_HW_QUEUES) 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#if (NUMBER_OF_INTERRUPTS > GAUDI_MSI_ENTRIES) 358c2ecf20Sopenharmony_ci#error "Number of MSI interrupts must be smaller or equal to GAUDI_MSI_ENTRIES" 368c2ecf20Sopenharmony_ci#endif 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#define CORESIGHT_TIMEOUT_USEC 100000 /* 100 ms */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define GAUDI_MAX_CLK_FREQ 2200000000ull /* 2200 MHz */ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define MAX_POWER_DEFAULT_PCI 200000 /* 200W */ 438c2ecf20Sopenharmony_ci#define MAX_POWER_DEFAULT_PMC 350000 /* 350W */ 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define GAUDI_CPU_TIMEOUT_USEC 30000000 /* 30s */ 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#define TPC_ENABLED_MASK 0xFF 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#define GAUDI_HBM_SIZE_32GB 0x800000000ull 508c2ecf20Sopenharmony_ci#define GAUDI_HBM_DEVICES 4 518c2ecf20Sopenharmony_ci#define GAUDI_HBM_CHANNELS 8 528c2ecf20Sopenharmony_ci#define GAUDI_HBM_CFG_BASE (mmHBM0_BASE - CFG_BASE) 538c2ecf20Sopenharmony_ci#define GAUDI_HBM_CFG_OFFSET (mmHBM1_BASE - mmHBM0_BASE) 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#define DMA_MAX_TRANSFER_SIZE U32_MAX 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#define GAUDI_DEFAULT_CARD_NAME "HL2000" 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define GAUDI_MAX_PENDING_CS 1024 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#if !IS_MAX_PENDING_CS_VALID(GAUDI_MAX_PENDING_CS) 628c2ecf20Sopenharmony_ci#error "GAUDI_MAX_PENDING_CS must be power of 2 and greater than 1" 638c2ecf20Sopenharmony_ci#endif 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#define PCI_DMA_NUMBER_OF_CHNLS 3 668c2ecf20Sopenharmony_ci#define HBM_DMA_NUMBER_OF_CHNLS 5 678c2ecf20Sopenharmony_ci#define DMA_NUMBER_OF_CHNLS (PCI_DMA_NUMBER_OF_CHNLS + \ 688c2ecf20Sopenharmony_ci HBM_DMA_NUMBER_OF_CHNLS) 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci#define MME_NUMBER_OF_SLAVE_ENGINES 2 718c2ecf20Sopenharmony_ci#define MME_NUMBER_OF_ENGINES (MME_NUMBER_OF_MASTER_ENGINES + \ 728c2ecf20Sopenharmony_ci MME_NUMBER_OF_SLAVE_ENGINES) 738c2ecf20Sopenharmony_ci#define MME_NUMBER_OF_QMANS (MME_NUMBER_OF_MASTER_ENGINES * \ 748c2ecf20Sopenharmony_ci QMAN_STREAMS) 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci#define QMAN_STREAMS 4 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci#define DMA_QMAN_OFFSET (mmDMA1_QM_BASE - mmDMA0_QM_BASE) 798c2ecf20Sopenharmony_ci#define TPC_QMAN_OFFSET (mmTPC1_QM_BASE - mmTPC0_QM_BASE) 808c2ecf20Sopenharmony_ci#define MME_QMAN_OFFSET (mmMME1_QM_BASE - mmMME0_QM_BASE) 818c2ecf20Sopenharmony_ci#define NIC_MACRO_QMAN_OFFSET (mmNIC1_QM0_BASE - mmNIC0_QM0_BASE) 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci#define TPC_CFG_OFFSET (mmTPC1_CFG_BASE - mmTPC0_CFG_BASE) 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#define DMA_CORE_OFFSET (mmDMA1_CORE_BASE - mmDMA0_CORE_BASE) 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci#define QMAN_LDMA_SRC_OFFSET (mmDMA0_CORE_SRC_BASE_LO - mmDMA0_CORE_CFG_0) 888c2ecf20Sopenharmony_ci#define QMAN_LDMA_DST_OFFSET (mmDMA0_CORE_DST_BASE_LO - mmDMA0_CORE_CFG_0) 898c2ecf20Sopenharmony_ci#define QMAN_LDMA_SIZE_OFFSET (mmDMA0_CORE_DST_TSIZE_0 - mmDMA0_CORE_CFG_0) 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci#define QMAN_CPDMA_SRC_OFFSET (mmDMA0_QM_CQ_PTR_LO_4 - mmDMA0_CORE_CFG_0) 928c2ecf20Sopenharmony_ci#define QMAN_CPDMA_DST_OFFSET (mmDMA0_CORE_DST_BASE_LO - mmDMA0_CORE_CFG_0) 938c2ecf20Sopenharmony_ci#define QMAN_CPDMA_SIZE_OFFSET (mmDMA0_QM_CQ_TSIZE_4 - mmDMA0_CORE_CFG_0) 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define SIF_RTR_CTRL_OFFSET (mmSIF_RTR_CTRL_1_BASE - mmSIF_RTR_CTRL_0_BASE) 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#define NIF_RTR_CTRL_OFFSET (mmNIF_RTR_CTRL_1_BASE - mmNIF_RTR_CTRL_0_BASE) 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define MME_ACC_OFFSET (mmMME1_ACC_BASE - mmMME0_ACC_BASE) 1008c2ecf20Sopenharmony_ci#define SRAM_BANK_OFFSET (mmSRAM_Y0_X1_RTR_BASE - mmSRAM_Y0_X0_RTR_BASE) 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci#define NUM_OF_SOB_IN_BLOCK \ 1038c2ecf20Sopenharmony_ci (((mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_SOB_OBJ_2047 - \ 1048c2ecf20Sopenharmony_ci mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_SOB_OBJ_0) + 4) >> 2) 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci#define NUM_OF_MONITORS_IN_BLOCK \ 1078c2ecf20Sopenharmony_ci (((mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_MON_STATUS_511 - \ 1088c2ecf20Sopenharmony_ci mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_MON_STATUS_0) + 4) >> 2) 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci/* DRAM Memory Map */ 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#define CPU_FW_IMAGE_SIZE 0x10000000 /* 256MB */ 1148c2ecf20Sopenharmony_ci#define MMU_PAGE_TABLES_SIZE 0x0BF00000 /* 191MB */ 1158c2ecf20Sopenharmony_ci#define MMU_CACHE_MNG_SIZE 0x00100000 /* 1MB */ 1168c2ecf20Sopenharmony_ci#define RESERVED 0x04000000 /* 64MB */ 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define CPU_FW_IMAGE_ADDR DRAM_PHYS_BASE 1198c2ecf20Sopenharmony_ci#define MMU_PAGE_TABLES_ADDR (CPU_FW_IMAGE_ADDR + CPU_FW_IMAGE_SIZE) 1208c2ecf20Sopenharmony_ci#define MMU_CACHE_MNG_ADDR (MMU_PAGE_TABLES_ADDR + MMU_PAGE_TABLES_SIZE) 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci#define DRAM_DRIVER_END_ADDR (MMU_CACHE_MNG_ADDR + MMU_CACHE_MNG_SIZE +\ 1238c2ecf20Sopenharmony_ci RESERVED) 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci#define DRAM_BASE_ADDR_USER 0x20000000 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci#if (DRAM_DRIVER_END_ADDR > DRAM_BASE_ADDR_USER) 1288c2ecf20Sopenharmony_ci#error "Driver must reserve no more than 512MB" 1298c2ecf20Sopenharmony_ci#endif 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci/* Internal QMANs PQ sizes */ 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci#define MME_QMAN_LENGTH 1024 1348c2ecf20Sopenharmony_ci#define MME_QMAN_SIZE_IN_BYTES (MME_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE) 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci#define HBM_DMA_QMAN_LENGTH 1024 1378c2ecf20Sopenharmony_ci#define HBM_DMA_QMAN_SIZE_IN_BYTES \ 1388c2ecf20Sopenharmony_ci (HBM_DMA_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE) 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci#define TPC_QMAN_LENGTH 1024 1418c2ecf20Sopenharmony_ci#define TPC_QMAN_SIZE_IN_BYTES (TPC_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE) 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci#define SRAM_USER_BASE_OFFSET GAUDI_DRIVER_SRAM_RESERVED_SIZE_FROM_START 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci/* Virtual address space */ 1468c2ecf20Sopenharmony_ci#define VA_HOST_SPACE_START 0x1000000000000ull /* 256TB */ 1478c2ecf20Sopenharmony_ci#define VA_HOST_SPACE_END 0x3FF8000000000ull /* 1PB - 1TB */ 1488c2ecf20Sopenharmony_ci#define VA_HOST_SPACE_SIZE (VA_HOST_SPACE_END - \ 1498c2ecf20Sopenharmony_ci VA_HOST_SPACE_START) /* 767TB */ 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci#define HW_CAP_PLL BIT(0) 1528c2ecf20Sopenharmony_ci#define HW_CAP_HBM BIT(1) 1538c2ecf20Sopenharmony_ci#define HW_CAP_MMU BIT(2) 1548c2ecf20Sopenharmony_ci#define HW_CAP_MME BIT(3) 1558c2ecf20Sopenharmony_ci#define HW_CAP_CPU BIT(4) 1568c2ecf20Sopenharmony_ci#define HW_CAP_PCI_DMA BIT(5) 1578c2ecf20Sopenharmony_ci#define HW_CAP_MSI BIT(6) 1588c2ecf20Sopenharmony_ci#define HW_CAP_CPU_Q BIT(7) 1598c2ecf20Sopenharmony_ci#define HW_CAP_HBM_DMA BIT(8) 1608c2ecf20Sopenharmony_ci#define HW_CAP_CLK_GATE BIT(9) 1618c2ecf20Sopenharmony_ci#define HW_CAP_SRAM_SCRAMBLER BIT(10) 1628c2ecf20Sopenharmony_ci#define HW_CAP_HBM_SCRAMBLER BIT(11) 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci#define HW_CAP_TPC0 BIT(24) 1658c2ecf20Sopenharmony_ci#define HW_CAP_TPC1 BIT(25) 1668c2ecf20Sopenharmony_ci#define HW_CAP_TPC2 BIT(26) 1678c2ecf20Sopenharmony_ci#define HW_CAP_TPC3 BIT(27) 1688c2ecf20Sopenharmony_ci#define HW_CAP_TPC4 BIT(28) 1698c2ecf20Sopenharmony_ci#define HW_CAP_TPC5 BIT(29) 1708c2ecf20Sopenharmony_ci#define HW_CAP_TPC6 BIT(30) 1718c2ecf20Sopenharmony_ci#define HW_CAP_TPC7 BIT(31) 1728c2ecf20Sopenharmony_ci#define HW_CAP_TPC_MASK GENMASK(31, 24) 1738c2ecf20Sopenharmony_ci#define HW_CAP_TPC_SHIFT 24 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci#define GAUDI_CPU_PCI_MSB_ADDR(addr) (((addr) & GENMASK_ULL(49, 39)) >> 39) 1768c2ecf20Sopenharmony_ci#define GAUDI_PCI_TO_CPU_ADDR(addr) \ 1778c2ecf20Sopenharmony_ci do { \ 1788c2ecf20Sopenharmony_ci (addr) &= ~GENMASK_ULL(49, 39); \ 1798c2ecf20Sopenharmony_ci (addr) |= BIT_ULL(39); \ 1808c2ecf20Sopenharmony_ci } while (0) 1818c2ecf20Sopenharmony_ci#define GAUDI_CPU_TO_PCI_ADDR(addr, extension) \ 1828c2ecf20Sopenharmony_ci do { \ 1838c2ecf20Sopenharmony_ci (addr) &= ~GENMASK_ULL(49, 39); \ 1848c2ecf20Sopenharmony_ci (addr) |= (u64) (extension) << 39; \ 1858c2ecf20Sopenharmony_ci } while (0) 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_cienum gaudi_dma_channels { 1888c2ecf20Sopenharmony_ci GAUDI_PCI_DMA_1, 1898c2ecf20Sopenharmony_ci GAUDI_PCI_DMA_2, 1908c2ecf20Sopenharmony_ci GAUDI_PCI_DMA_3, 1918c2ecf20Sopenharmony_ci GAUDI_HBM_DMA_1, 1928c2ecf20Sopenharmony_ci GAUDI_HBM_DMA_2, 1938c2ecf20Sopenharmony_ci GAUDI_HBM_DMA_3, 1948c2ecf20Sopenharmony_ci GAUDI_HBM_DMA_4, 1958c2ecf20Sopenharmony_ci GAUDI_HBM_DMA_5, 1968c2ecf20Sopenharmony_ci GAUDI_DMA_MAX 1978c2ecf20Sopenharmony_ci}; 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_cienum gaudi_tpc_mask { 2008c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC0 = 0x01, 2018c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC1 = 0x02, 2028c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC2 = 0x04, 2038c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC3 = 0x08, 2048c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC4 = 0x10, 2058c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC5 = 0x20, 2068c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC6 = 0x40, 2078c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_TPC7 = 0x80, 2088c2ecf20Sopenharmony_ci GAUDI_TPC_MASK_ALL = 0xFF 2098c2ecf20Sopenharmony_ci}; 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci/** 2128c2ecf20Sopenharmony_ci * struct gaudi_internal_qman_info - Internal QMAN information. 2138c2ecf20Sopenharmony_ci * @pq_kernel_addr: Kernel address of the PQ memory area in the host. 2148c2ecf20Sopenharmony_ci * @pq_dma_addr: DMA address of the PQ memory area in the host. 2158c2ecf20Sopenharmony_ci * @pq_size: Size of allocated host memory for PQ. 2168c2ecf20Sopenharmony_ci */ 2178c2ecf20Sopenharmony_cistruct gaudi_internal_qman_info { 2188c2ecf20Sopenharmony_ci void *pq_kernel_addr; 2198c2ecf20Sopenharmony_ci dma_addr_t pq_dma_addr; 2208c2ecf20Sopenharmony_ci size_t pq_size; 2218c2ecf20Sopenharmony_ci}; 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci/** 2248c2ecf20Sopenharmony_ci * struct gaudi_device - ASIC specific manage structure. 2258c2ecf20Sopenharmony_ci * @cpucp_info_get: get information on device from CPU-CP 2268c2ecf20Sopenharmony_ci * @hw_queues_lock: protects the H/W queues from concurrent access. 2278c2ecf20Sopenharmony_ci * @clk_gate_mutex: protects code areas that require clock gating to be disabled 2288c2ecf20Sopenharmony_ci * temporarily 2298c2ecf20Sopenharmony_ci * @internal_qmans: Internal QMANs information. The array size is larger than 2308c2ecf20Sopenharmony_ci * the actual number of internal queues because they are not in 2318c2ecf20Sopenharmony_ci * consecutive order. 2328c2ecf20Sopenharmony_ci * @hbm_bar_cur_addr: current address of HBM PCI bar. 2338c2ecf20Sopenharmony_ci * @max_freq_value: current max clk frequency. 2348c2ecf20Sopenharmony_ci * @events: array that holds all event id's 2358c2ecf20Sopenharmony_ci * @events_stat: array that holds histogram of all received events. 2368c2ecf20Sopenharmony_ci * @events_stat_aggregate: same as events_stat but doesn't get cleared on reset 2378c2ecf20Sopenharmony_ci * @hw_cap_initialized: This field contains a bit per H/W engine. When that 2388c2ecf20Sopenharmony_ci * engine is initialized, that bit is set by the driver to 2398c2ecf20Sopenharmony_ci * signal we can use this engine in later code paths. 2408c2ecf20Sopenharmony_ci * Each bit is cleared upon reset of its corresponding H/W 2418c2ecf20Sopenharmony_ci * engine. 2428c2ecf20Sopenharmony_ci * @multi_msi_mode: whether we are working in multi MSI single MSI mode. 2438c2ecf20Sopenharmony_ci * Multi MSI is possible only with IOMMU enabled. 2448c2ecf20Sopenharmony_ci * @mmu_cache_inv_pi: PI for MMU cache invalidation flow. The H/W expects an 2458c2ecf20Sopenharmony_ci * 8-bit value so use u8. 2468c2ecf20Sopenharmony_ci */ 2478c2ecf20Sopenharmony_cistruct gaudi_device { 2488c2ecf20Sopenharmony_ci int (*cpucp_info_get)(struct hl_device *hdev); 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci /* TODO: remove hw_queues_lock after moving to scheduler code */ 2518c2ecf20Sopenharmony_ci spinlock_t hw_queues_lock; 2528c2ecf20Sopenharmony_ci struct mutex clk_gate_mutex; 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci struct gaudi_internal_qman_info internal_qmans[GAUDI_QUEUE_ID_SIZE]; 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci u64 hbm_bar_cur_addr; 2578c2ecf20Sopenharmony_ci u64 max_freq_value; 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ci u32 events[GAUDI_EVENT_SIZE]; 2608c2ecf20Sopenharmony_ci u32 events_stat[GAUDI_EVENT_SIZE]; 2618c2ecf20Sopenharmony_ci u32 events_stat_aggregate[GAUDI_EVENT_SIZE]; 2628c2ecf20Sopenharmony_ci u32 hw_cap_initialized; 2638c2ecf20Sopenharmony_ci u8 multi_msi_mode; 2648c2ecf20Sopenharmony_ci u8 mmu_cache_inv_pi; 2658c2ecf20Sopenharmony_ci}; 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_civoid gaudi_init_security(struct hl_device *hdev); 2688c2ecf20Sopenharmony_civoid gaudi_add_device_attr(struct hl_device *hdev, 2698c2ecf20Sopenharmony_ci struct attribute_group *dev_attr_grp); 2708c2ecf20Sopenharmony_civoid gaudi_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq); 2718c2ecf20Sopenharmony_ciint gaudi_debug_coresight(struct hl_device *hdev, void *data); 2728c2ecf20Sopenharmony_civoid gaudi_halt_coresight(struct hl_device *hdev); 2738c2ecf20Sopenharmony_ciint gaudi_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk); 2748c2ecf20Sopenharmony_civoid gaudi_mmu_prepare_reg(struct hl_device *hdev, u64 reg, u32 asid); 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci#endif /* GAUDIP_H_ */ 277