Commit 79fc7a9f authored by Omer Shpigelman's avatar Omer Shpigelman Committed by Oded Gabbay

habanalabs: add gaudi profiler module

Add the GAUDI code to initialize the ASIC's profiler. The profile receives
its initialization values from the user, same as in Goya, but the code to
initialize is in the driver because the configuration space of the
device is not directly exposed to the user.
Signed-off-by: default avatarOmer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent 3a3a5bf1
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
subdir-ccflags-y += -I$(src) subdir-ccflags-y += -I$(src)
HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \
\ No newline at end of file gaudi/gaudi_coresight.o
...@@ -7319,7 +7319,7 @@ static const struct hl_asic_funcs gaudi_funcs = { ...@@ -7319,7 +7319,7 @@ static const struct hl_asic_funcs gaudi_funcs = {
.send_heartbeat = gaudi_send_heartbeat, .send_heartbeat = gaudi_send_heartbeat,
.enable_clock_gating = gaudi_enable_clock_gating, .enable_clock_gating = gaudi_enable_clock_gating,
.disable_clock_gating = gaudi_disable_clock_gating, .disable_clock_gating = gaudi_disable_clock_gating,
.debug_coresight = NULL, .debug_coresight = gaudi_debug_coresight,
.is_device_idle = gaudi_is_device_idle, .is_device_idle = gaudi_is_device_idle,
.soft_reset_late_init = gaudi_soft_reset_late_init, .soft_reset_late_init = gaudi_soft_reset_late_init,
.hw_queues_lock = gaudi_hw_queues_lock, .hw_queues_lock = gaudi_hw_queues_lock,
...@@ -7333,7 +7333,7 @@ static const struct hl_asic_funcs gaudi_funcs = { ...@@ -7333,7 +7333,7 @@ static const struct hl_asic_funcs gaudi_funcs = {
.init_iatu = gaudi_init_iatu, .init_iatu = gaudi_init_iatu,
.rreg = hl_rreg, .rreg = hl_rreg,
.wreg = hl_wreg, .wreg = hl_wreg,
.halt_coresight = NULL, .halt_coresight = gaudi_halt_coresight,
.get_clk_rate = gaudi_get_clk_rate, .get_clk_rate = gaudi_get_clk_rate,
.get_queue_id_for_cq = gaudi_get_queue_id_for_cq, .get_queue_id_for_cq = gaudi_get_queue_id_for_cq,
.read_device_fw_version = gaudi_read_device_fw_version, .read_device_fw_version = gaudi_read_device_fw_version,
......
...@@ -252,6 +252,8 @@ void gaudi_init_security(struct hl_device *hdev); ...@@ -252,6 +252,8 @@ void gaudi_init_security(struct hl_device *hdev);
void gaudi_add_device_attr(struct hl_device *hdev, void gaudi_add_device_attr(struct hl_device *hdev,
struct attribute_group *dev_attr_grp); struct attribute_group *dev_attr_grp);
void gaudi_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq); void gaudi_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq);
int gaudi_debug_coresight(struct hl_device *hdev, void *data);
void gaudi_halt_coresight(struct hl_device *hdev);
int gaudi_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk); int gaudi_get_clk_rate(struct hl_device *hdev, u32 *cur_clk, u32 *max_clk);
#endif /* GAUDIP_H_ */ #endif /* GAUDIP_H_ */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment