habanalabs: set max power according to card type
authorOded Gabbay <oded.gabbay@gmail.com>
Sat, 8 Aug 2020 20:34:47 +0000 (23:34 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Sat, 22 Aug 2020 09:47:57 +0000 (12:47 +0300)
commit58361aae4b0eed388680a89ac153d27177f40510
treed94843a54bd11a91d0927d4deba43d32ee63c790
parent36545279f076afeb77104f5ffeab850da3b6d107
habanalabs: set max power according to card type

In Gaudi, the default max power setting is different between PCI and PMC
cards. Therefore, the driver need to set the default after knowing what is
the card type.

The current code has a bug where it limits the maximum power of the PMC
card to 200W after a reset occurs.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/sysfs.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/gaudi/gaudiP.h