summaryrefslogtreecommitdiff
path: root/drivers/accel/ivpu/ivpu_hw.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2023-10-31 10:54:48 -0300
committerJason Gunthorpe <jgg@nvidia.com>2023-10-31 10:54:48 -0300
commit162e3480246ef69386d4647d2320d86741bf08a2 (patch)
treecaada42ce40114e7abe5e74acb54781ad4aa424a /drivers/accel/ivpu/ivpu_hw.h
parentd4b2d165714c0ce8777d5131f6e0aad617b7adc4 (diff)
parentffc253263a1375a65fa6c9f62a893e9767fbebfa (diff)
Merge tag 'v6.6' into rdma.git for-next
Resolve conflict by taking the spin_lock hunk from for-next: https://lore.kernel.org/r/20230928113851.5197a1ec@canb.auug.org.au Required for the next patch. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/accel/ivpu/ivpu_hw.h')
-rw-r--r--drivers/accel/ivpu/ivpu_hw.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/accel/ivpu/ivpu_hw.h b/drivers/accel/ivpu/ivpu_hw.h
index ab341237bcf9..1079e06255ba 100644
--- a/drivers/accel/ivpu/ivpu_hw.h
+++ b/drivers/accel/ivpu/ivpu_hw.h
@@ -13,6 +13,7 @@ struct ivpu_hw_ops {
int (*power_up)(struct ivpu_device *vdev);
int (*boot_fw)(struct ivpu_device *vdev);
int (*power_down)(struct ivpu_device *vdev);
+ int (*reset)(struct ivpu_device *vdev);
bool (*is_idle)(struct ivpu_device *vdev);
void (*wdt_disable)(struct ivpu_device *vdev);
void (*diagnose_failure)(struct ivpu_device *vdev);
@@ -91,6 +92,13 @@ static inline int ivpu_hw_power_down(struct ivpu_device *vdev)
return vdev->hw->ops->power_down(vdev);
};
+static inline int ivpu_hw_reset(struct ivpu_device *vdev)
+{
+ ivpu_dbg(vdev, PM, "HW reset\n");
+
+ return vdev->hw->ops->reset(vdev);
+};
+
static inline void ivpu_hw_wdt_disable(struct ivpu_device *vdev)
{
vdev->hw->ops->wdt_disable(vdev);