Commit 6c1bad35 authored by Oded Gabbay's avatar Oded Gabbay

habanalabs: rename late init after reset function

The ASIC-specific soft_reset_late_init() is now called after either
soft-reset or reset-upon-device-release. Therefore, it needs a more
appropriate name.

No need to split it to two functions, as an ASIC either supports
soft-reset or reset-upon-device-release.
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 60e0431f
...@@ -1209,7 +1209,7 @@ int hl_device_reset(struct hl_device *hdev, u32 flags) ...@@ -1209,7 +1209,7 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)
hl_set_max_power(hdev); hl_set_max_power(hdev);
} else { } else {
rc = hdev->asic_funcs->soft_reset_late_init(hdev); rc = hdev->asic_funcs->non_hard_reset_late_init(hdev);
if (rc) { if (rc) {
if (reset_upon_device_release) if (reset_upon_device_release)
dev_err(hdev->dev, dev_err(hdev->dev,
......
...@@ -1153,7 +1153,7 @@ struct fw_load_mgr { ...@@ -1153,7 +1153,7 @@ struct fw_load_mgr {
* @disable_clock_gating: disable clock gating completely * @disable_clock_gating: disable clock gating completely
* @debug_coresight: perform certain actions on Coresight for debugging. * @debug_coresight: perform certain actions on Coresight for debugging.
* @is_device_idle: return true if device is idle, false otherwise. * @is_device_idle: return true if device is idle, false otherwise.
* @soft_reset_late_init: perform certain actions needed after soft reset. * @non_hard_reset_late_init: perform certain actions needed after a reset which is not hard-reset
* @hw_queues_lock: acquire H/W queues lock. * @hw_queues_lock: acquire H/W queues lock.
* @hw_queues_unlock: release H/W queues lock. * @hw_queues_unlock: release H/W queues lock.
* @get_pci_id: retrieve PCI ID. * @get_pci_id: retrieve PCI ID.
...@@ -1289,7 +1289,7 @@ struct hl_asic_funcs { ...@@ -1289,7 +1289,7 @@ struct hl_asic_funcs {
int (*debug_coresight)(struct hl_device *hdev, void *data); int (*debug_coresight)(struct hl_device *hdev, void *data);
bool (*is_device_idle)(struct hl_device *hdev, u64 *mask_arr, bool (*is_device_idle)(struct hl_device *hdev, u64 *mask_arr,
u8 mask_len, struct seq_file *s); u8 mask_len, struct seq_file *s);
int (*soft_reset_late_init)(struct hl_device *hdev); int (*non_hard_reset_late_init)(struct hl_device *hdev);
void (*hw_queues_lock)(struct hl_device *hdev); void (*hw_queues_lock)(struct hl_device *hdev);
void (*hw_queues_unlock)(struct hl_device *hdev); void (*hw_queues_unlock)(struct hl_device *hdev);
u32 (*get_pci_id)(struct hl_device *hdev); u32 (*get_pci_id)(struct hl_device *hdev);
......
...@@ -7819,7 +7819,7 @@ static void gaudi_print_fw_alive_info(struct hl_device *hdev, ...@@ -7819,7 +7819,7 @@ static void gaudi_print_fw_alive_info(struct hl_device *hdev,
fw_alive->thread_id, fw_alive->uptime_seconds); fw_alive->thread_id, fw_alive->uptime_seconds);
} }
static int gaudi_soft_reset_late_init(struct hl_device *hdev) static int gaudi_non_hard_reset_late_init(struct hl_device *hdev)
{ {
struct gaudi_device *gaudi = hdev->asic_specific; struct gaudi_device *gaudi = hdev->asic_specific;
...@@ -9591,7 +9591,7 @@ static const struct hl_asic_funcs gaudi_funcs = { ...@@ -9591,7 +9591,7 @@ static const struct hl_asic_funcs gaudi_funcs = {
.disable_clock_gating = gaudi_disable_clock_gating, .disable_clock_gating = gaudi_disable_clock_gating,
.debug_coresight = gaudi_debug_coresight, .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, .non_hard_reset_late_init = gaudi_non_hard_reset_late_init,
.hw_queues_lock = gaudi_hw_queues_lock, .hw_queues_lock = gaudi_hw_queues_lock,
.hw_queues_unlock = gaudi_hw_queues_unlock, .hw_queues_unlock = gaudi_hw_queues_unlock,
.get_pci_id = gaudi_get_pci_id, .get_pci_id = gaudi_get_pci_id,
......
...@@ -4813,7 +4813,7 @@ static int goya_unmask_irq_arr(struct hl_device *hdev, u32 *irq_arr, ...@@ -4813,7 +4813,7 @@ static int goya_unmask_irq_arr(struct hl_device *hdev, u32 *irq_arr,
return rc; return rc;
} }
static int goya_soft_reset_late_init(struct hl_device *hdev) static int goya_non_hard_reset_late_init(struct hl_device *hdev)
{ {
/* /*
* Unmask all IRQs since some could have been received * Unmask all IRQs since some could have been received
...@@ -5738,7 +5738,7 @@ static const struct hl_asic_funcs goya_funcs = { ...@@ -5738,7 +5738,7 @@ static const struct hl_asic_funcs goya_funcs = {
.disable_clock_gating = goya_disable_clock_gating, .disable_clock_gating = goya_disable_clock_gating,
.debug_coresight = goya_debug_coresight, .debug_coresight = goya_debug_coresight,
.is_device_idle = goya_is_device_idle, .is_device_idle = goya_is_device_idle,
.soft_reset_late_init = goya_soft_reset_late_init, .non_hard_reset_late_init = goya_non_hard_reset_late_init,
.hw_queues_lock = goya_hw_queues_lock, .hw_queues_lock = goya_hw_queues_lock,
.hw_queues_unlock = goya_hw_queues_unlock, .hw_queues_unlock = goya_hw_queues_unlock,
.get_pci_id = goya_get_pci_id, .get_pci_id = goya_get_pci_id,
......
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