diff options
author | Rajaravi Krishna Katta <rkatta@habana.ai> | 2021-08-24 16:39:16 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-10-18 12:05:46 +0300 |
commit | 7457269136043fdbb7ff28bbc82d9655ad6012d7 (patch) | |
tree | cdc696b431820b43093964da0967250279e57ce6 /drivers/misc/habanalabs/include | |
parent | 4be9fb53039ab1327f058e09039404ad33926adb (diff) |
habanalabs: create static map of f/w hwmon enums
Instead of using the Linux kernel HWMON enums definition when
communicating with the firmware, use proprietary HWMON based enums
i.e. map hwmon.h header enum to cpucp_if.h based enum while.
This is needed because the HWMON enums are not forcing backward
compatibility and therefore changes can break compatibility between
newer driver and older firmware.
The driver will check for CPU_BOOT_DEV_STS0_MAP_HWMON_EN bit to
validate if f/w supports cpucp->hwmon enum mapping to support older
firmware where this mapping won't be available.
Signed-off-by: Rajaravi Krishna Katta <rkatta@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/include')
-rw-r--r-- | drivers/misc/habanalabs/include/common/hl_boot_if.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/include/common/hl_boot_if.h b/drivers/misc/habanalabs/include/common/hl_boot_if.h index 3099653234e4..8837925b5d85 100644 --- a/drivers/misc/habanalabs/include/common/hl_boot_if.h +++ b/drivers/misc/habanalabs/include/common/hl_boot_if.h @@ -252,6 +252,11 @@ * where a bit is set if the engine is not idle. * Initialized in: linux * + * CPU_BOOT_DEV_STS0_MAP_HWMON_EN + * If set, means f/w supports proprietary + * HWMON enum mapping to cpucp enums. + * Initialized in: linux + * * CPU_BOOT_DEV_STS0_ENABLED Device status register enabled. * This is a main indication that the * running FW populates the device status @@ -287,6 +292,7 @@ #define CPU_BOOT_DEV_STS0_FW_NIC_STAT_XPCS91_EN (1 << 23) #define CPU_BOOT_DEV_STS0_FW_NIC_STAT_EXT_EN (1 << 24) #define CPU_BOOT_DEV_STS0_IS_IDLE_CHECK_EN (1 << 25) +#define CPU_BOOT_DEV_STS0_MAP_HWMON_EN (1 << 26) #define CPU_BOOT_DEV_STS0_ENABLED (1 << 31) #define CPU_BOOT_DEV_STS1_ENABLED (1 << 31) |