ufs: Add conftest to check is_ufs_already_enabled

Add conftest to check is_ufs_already_enabled

Change-Id: Ia830afb2a72586f4da2323a4ab7df8e7eb9cc321
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312149
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mallikarjun Kasoju
2025-03-01 09:08:55 +00:00
committed by Jon Hunter
parent 9a4387e137
commit ae290b601b
3 changed files with 36 additions and 12 deletions

View File

@@ -227,6 +227,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += ufs_hba_variant_ops_pwr_change_notify_has_
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ufs_hba_variant_ops_suspend_has_status_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ufshcd_quirks_enum_has_ufshcd_quirk_broken_64bit_address
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ufshcd_quirks_enum_has_ufshcd_quirk_broken_power_seqeunce
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ufshcd_ufs_hba_struct_has_bool_is_ufs_already_enabled
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_connection_struct_present
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_match_type_enum_present
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_subdev_nf_init

View File

@@ -8783,6 +8783,21 @@ compile_test() {
compile_check_conftest "$CODE" "NV_UFSHCD_QUIRKS_ENUM_HAS_UFSHCD_QUIRK_BROKEN_POWER_SEQUENCE" "" "types"
;;
ufshcd_ufs_hba_struct_has_bool_is_ufs_already_enabled)
#
# Determine if the 'ufs_hba' structure has
# bool 'is_ufs_already_enabled'.
#
#
CODE="
#include <ufs/ufshcd.h>
int ufshcd_ufs_hba_struct_has_bool_is_ufs_already_enabled(void) {
return offsetof(struct ufs_hba, is_ufs_already_enabled);
}"
compile_check_conftest "$CODE" "NV_UFS_HBA_STRUCT_HAS_BOOL_IS_UFS_ALREADY_ENABLED" "" "types"
;;
v4l2_async_connection_struct_present)
#
# Determine if the 'struct v4l2_async_connection' present or not.