habanalabs/gaudi: handle reset when f/w is in preboot
authorOded Gabbay <ogabbay@kernel.org>
Thu, 26 Nov 2020 16:11:05 +0000 (18:11 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:37 +0000 (10:47 +0200)
commita63c3fb37b157b56d713a386dc024bf6deb9c7cf
tree8ac258b1b1f2703a2997208d7b87d6abd09d1ebe
parentee3287798d49bbe5a9597d51ec914144179c03e8
habanalabs/gaudi: handle reset when f/w is in preboot

Currently, if the f/w is in preboot/u-boot they don't perform the new
reset mechanism. Therefore, the driver needs to reset the device.
To prevent reset of PCI_IF, the driver needs to first configure the
reset units.

If the security is enabled, the driver can't configure the reset units.
In that situation, don't reset the card.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi/gaudi.c