accel/habanalabs/gaudi2: use single function to compare FW versions

Currently, the code contains 2 types of FW version comparison functions:
- hl_is_fw_sw_ver_[below/equal_or_greater]()
- gaudi2 specific function of the type

Moreover, some functions use the inner FW version which should be only
stage during development but not version dependencies.

This commit aligns all APIs to a single function that just compares the
version and return an integers indicator (similar in some way to

In addition, this generic function now considers also the sub-minor FW

Signed-off-by: Ohad Sharabi <>
Reviewed-by: Oded Gabbay <>
Signed-off-by: Oded Gabbay <>
3 files changed