clk-bpmp: Use conftest to determine clk_hw_determine_rate_no_reparent()

The clock ops needs the determine_rate() callback in clock ops if
set_parent() is needed by commit 33b70fbc4f815f("clk: Introduce
clk_hw_determine_rate_no_reparent()") and commit 326cc42f9fdc3
("clk: Forbid to register a mux without determine_rate")
from Linux 6.4.

Add conftest method to determine if clk_hw_determine_rate_no_reparent()
present.

Bug 4346767

Change-Id: I8e4573e1a045fc76b7741aaa88b571574f14377e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032325
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-11 17:29:28 +00:00
committed by mobile promotions
parent 1fc6fc17f2
commit c3e3d472a3
3 changed files with 23 additions and 0 deletions

View File

@@ -99,6 +99,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += bus_type_struct_uevent_has_const_dev_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_attribute_struct_has_const_struct_class_attribute
NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_create_has_no_owner_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_struct_devnode_has_const_dev_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += clk_hw_determine_rate_no_reparent
NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += device_add_disk_has_int_return_type
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_tegra_core_dev_init_opp_table_common

View File

@@ -6668,6 +6668,23 @@ compile_test() {
compile_check_conftest "$CODE" "NV_CLASS_STRUCT_DEVNODE_HAS_CONST_DEV_ARG" "" "types"
;;
clk_hw_determine_rate_no_reparent)
#
# Determine if the function clk_hw_determine_rate_no_reparent() is present or not.
#
# commit 33b70fbc4f815f("clk: Introduce clk_hw_determine_rate_no_reparent()")
# added the API clk_hw_determine_rate_no_reparent() to implement the clk_set_parent()
# in Linux 6.4
#
CODE="
#include <linux/clk-provider.h>
void conftest_clk_hw_determine_rate_no_reparent(void) {
clk_hw_determine_rate_no_reparent();
}"
compile_check_conftest "$CODE" "NV_CLK_HW_DETERMINE_RATE_NO_REPARENT_PRESENT" "" "functions"
;;
define_semaphore_has_number_arg)
#
# Determine if the macro DEFINE_SEMAPHORE has a number argument.