habanalabs/gaudi: disable CGM at HW initialization
authorOded Gabbay <ogabbay@kernel.org>
Sat, 5 Dec 2020 20:55:09 +0000 (22:55 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Dec 2020 06:47:38 +0000 (08:47 +0200)
commit0024c094851f718ccb0b797255292bdce850a01f
tree460d579994cf17fc3eed0d85834eadcc3dbc0258
parent7a585dfc32110a106f70474c6fa822d912a92c7e
habanalabs/gaudi: disable CGM at HW initialization

In case the clock gating was enabled in preboot we need to disable it
at the H/W initialization stage before touching the MME/TPC registers.
Otherwise, the ASIC can get stuck. If the security is enabled in
the firmware level, the CGM is always disabled and the driver can't
enable it.

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