habanalabs: skip valid test for boot_dev_sts regs
authorOhad Sharabi <osharabi@habana.ai>
Sat, 29 May 2021 20:26:10 +0000 (23:26 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:41 +0000 (15:23 +0300)
commit6a785e368a675008dc7a09938480a07ac1aa8956
tree1d4bdeeafcfd2fb1005fd27afed502ba908ca17e
parent84586de496103453c0c8dbf5c233f10381644cf5
habanalabs: skip valid test for boot_dev_sts regs

Get rid of the need to check if boot_dev_sts is valid on every access
to value read from these registers.

This is done by storing the register value in hdev props ONLY if
register is enabled.

This way if register is NOT enabled all capability bits will not be set.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/firmware_if.c
drivers/misc/habanalabs/gaudi/gaudi.c