@@ -760,65 +760,9 @@ static void clk_range_test_multiple_set_range_rate_maximized(struct kunit *test)
760760 clk_put (user1 );
761761}
762762
763- /*
764- * Test that if we have several subsequent calls to
765- * clk_set_rate_range(), across multiple users, the core will reevaluate
766- * whether a new rate is needed, including when a user drop its clock.
767- *
768- * With clk_dummy_maximize_rate_ops, this means that the rate will
769- * trail along the maximum as it evolves.
770- */
771- static void clk_range_test_multiple_set_range_rate_put_maximized (struct kunit * test )
772- {
773- struct clk_dummy_context * ctx = test -> priv ;
774- struct clk_hw * hw = & ctx -> hw ;
775- struct clk * clk = hw -> clk ;
776- struct clk * user1 , * user2 ;
777- unsigned long rate ;
778-
779- user1 = clk_hw_get_clk (hw , NULL );
780- KUNIT_ASSERT_NOT_ERR_OR_NULL (test , user1 );
781-
782- user2 = clk_hw_get_clk (hw , NULL );
783- KUNIT_ASSERT_NOT_ERR_OR_NULL (test , user2 );
784-
785- KUNIT_ASSERT_EQ (test ,
786- clk_set_rate (clk , DUMMY_CLOCK_RATE_2 + 1000 ),
787- 0 );
788-
789- KUNIT_ASSERT_EQ (test ,
790- clk_set_rate_range (user1 ,
791- 0 ,
792- DUMMY_CLOCK_RATE_2 ),
793- 0 );
794-
795- rate = clk_get_rate (clk );
796- KUNIT_ASSERT_GT (test , rate , 0 );
797- KUNIT_EXPECT_EQ (test , rate , DUMMY_CLOCK_RATE_2 );
798-
799- KUNIT_ASSERT_EQ (test ,
800- clk_set_rate_range (user2 ,
801- 0 ,
802- DUMMY_CLOCK_RATE_1 ),
803- 0 );
804-
805- rate = clk_get_rate (clk );
806- KUNIT_ASSERT_GT (test , rate , 0 );
807- KUNIT_EXPECT_EQ (test , rate , DUMMY_CLOCK_RATE_1 );
808-
809- clk_put (user2 );
810-
811- rate = clk_get_rate (clk );
812- KUNIT_ASSERT_GT (test , rate , 0 );
813- KUNIT_EXPECT_EQ (test , rate , DUMMY_CLOCK_RATE_2 );
814-
815- clk_put (user1 );
816- }
817-
818763static struct kunit_case clk_range_maximize_test_cases [] = {
819764 KUNIT_CASE (clk_range_test_set_range_rate_maximized ),
820765 KUNIT_CASE (clk_range_test_multiple_set_range_rate_maximized ),
821- KUNIT_CASE (clk_range_test_multiple_set_range_rate_put_maximized ),
822766 {}
823767};
824768
@@ -933,61 +877,9 @@ static void clk_range_test_multiple_set_range_rate_minimized(struct kunit *test)
933877 clk_put (user1 );
934878}
935879
936- /*
937- * Test that if we have several subsequent calls to
938- * clk_set_rate_range(), across multiple users, the core will reevaluate
939- * whether a new rate is needed, including when a user drop its clock.
940- *
941- * With clk_dummy_minimize_rate_ops, this means that the rate will
942- * trail along the minimum as it evolves.
943- */
944- static void clk_range_test_multiple_set_range_rate_put_minimized (struct kunit * test )
945- {
946- struct clk_dummy_context * ctx = test -> priv ;
947- struct clk_hw * hw = & ctx -> hw ;
948- struct clk * clk = hw -> clk ;
949- struct clk * user1 , * user2 ;
950- unsigned long rate ;
951-
952- user1 = clk_hw_get_clk (hw , NULL );
953- KUNIT_ASSERT_NOT_ERR_OR_NULL (test , user1 );
954-
955- user2 = clk_hw_get_clk (hw , NULL );
956- KUNIT_ASSERT_NOT_ERR_OR_NULL (test , user2 );
957-
958- KUNIT_ASSERT_EQ (test ,
959- clk_set_rate_range (user1 ,
960- DUMMY_CLOCK_RATE_1 ,
961- ULONG_MAX ),
962- 0 );
963-
964- rate = clk_get_rate (clk );
965- KUNIT_ASSERT_GT (test , rate , 0 );
966- KUNIT_EXPECT_EQ (test , rate , DUMMY_CLOCK_RATE_1 );
967-
968- KUNIT_ASSERT_EQ (test ,
969- clk_set_rate_range (user2 ,
970- DUMMY_CLOCK_RATE_2 ,
971- ULONG_MAX ),
972- 0 );
973-
974- rate = clk_get_rate (clk );
975- KUNIT_ASSERT_GT (test , rate , 0 );
976- KUNIT_EXPECT_EQ (test , rate , DUMMY_CLOCK_RATE_2 );
977-
978- clk_put (user2 );
979-
980- rate = clk_get_rate (clk );
981- KUNIT_ASSERT_GT (test , rate , 0 );
982- KUNIT_EXPECT_EQ (test , rate , DUMMY_CLOCK_RATE_1 );
983-
984- clk_put (user1 );
985- }
986-
987880static struct kunit_case clk_range_minimize_test_cases [] = {
988881 KUNIT_CASE (clk_range_test_set_range_rate_minimized ),
989882 KUNIT_CASE (clk_range_test_multiple_set_range_rate_minimized ),
990- KUNIT_CASE (clk_range_test_multiple_set_range_rate_put_minimized ),
991883 {}
992884};
993885
0 commit comments