Lines Matching full:1

14 #define TIMER_BLOCK_SCALE(s)    ((((s) & 0xff) + 1) * 10)
17 clock_step(TIMER_BLOCK_SCALE(scaler) * (int64_t)(steps_nb) + 1)
26 #define TIMER_CONTROL_ENABLE (1 << 0)
27 #define TIMER_CONTROL_PERIODIC (1 << 1)
28 #define TIMER_CONTROL_IT_ENABLE (1 << 2)
31 #define PERIODIC 1
61 writel(TIMER_BASE_PHYS + TIMER_INTSTAT, 1); in timer_int_clr()
108 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_oneshot()
148 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_pause()
188 clock_step(TIMER_BLOCK_SCALE(scaler) * (101 + repeat) + 1); in test_timer_periodic()
191 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_periodic()
193 clock_step(TIMER_BLOCK_SCALE(scaler) * (101 - repeat) - 1); in test_timer_periodic()
215 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_oneshot_to_periodic()
236 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_periodic_to_oneshot()
247 g_assert_cmpuint(timer_counter(), ==, 1); in test_timer_prescaler()
250 TIMER_BLOCK_STEP(NOSCALE, 1); in test_timer_prescaler()
253 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_prescaler()
261 g_assert_cmpuint(timer_counter(), ==, 1); in test_timer_prescaler()
264 TIMER_BLOCK_STEP(0xAB, 1); in test_timer_prescaler()
267 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_prescaler()
297 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_oneshot_counter_to_0()
299 g_assert_cmpuint(timer_counter(), ==, UINT32_MAX - 1); in test_timer_set_oneshot_counter_to_0()
318 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_periodic_counter_to_0()
320 g_assert_cmpuint(timer_counter(), ==, UINT32_MAX - 1); in test_timer_set_periodic_counter_to_0()
325 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_periodic_counter_to_0()
327 g_assert_cmpuint(timer_counter(), ==, UINT32_MAX - (scaler ? 0 : 1)); in test_timer_set_periodic_counter_to_0()
334 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_periodic_counter_to_0()
336 g_assert_cmpuint(timer_counter(), ==, UINT32_MAX - 1); in test_timer_set_periodic_counter_to_0()
341 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_periodic_counter_to_0()
354 TIMER_BLOCK_STEP(scaler, 1); in test_timer_noload_oneshot()
359 TIMER_BLOCK_STEP(scaler, 1); in test_timer_noload_oneshot()
372 TIMER_BLOCK_STEP(scaler, 1); in test_timer_noload_periodic()
377 TIMER_BLOCK_STEP(scaler, 1); in test_timer_noload_periodic()
390 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_oneshot()
397 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_oneshot()
402 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_oneshot()
415 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_periodic()
422 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_periodic()
427 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_periodic()
440 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_oneshot_to_nonzero()
447 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_oneshot_to_nonzero()
457 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_oneshot_to_nonzero()
468 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_periodic_to_nonzero()
475 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_periodic_to_nonzero()
482 for (i = 1; i < 10; i++) { in test_timer_zero_load_periodic_to_nonzero()
486 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_periodic_to_nonzero()
498 TIMER_BLOCK_STEP(scaler, 1); in test_timer_nonzero_load_oneshot_to_zero()
519 TIMER_BLOCK_STEP(scaler, 1); in test_timer_nonzero_load_periodic_to_zero()
561 TIMER_BLOCK_STEP(scaler, 1); in test_timer_enable_and_set_counter()
646 g_assert_cmpuint(timer_counter(), ==, UINT32_MAX + (scaler ? 1 : 0) - 100); in test_timer_periodic_with_counter_0_on_start()
650 g_assert_cmpuint(timer_counter(), ==, UINT32_MAX + (scaler ? 1 : 0) - 200); in test_timer_periodic_with_counter_0_on_start()
660 TIMER_BLOCK_STEP(scaler, 1); in test_timer_periodic_with_counter_0_on_start()
666 TIMER_BLOCK_STEP(scaler, 1); in test_timer_periodic_with_counter_0_on_start()
670 for (i = 2 - (!!scaler ? 1 : 0); i < 10; i++) { in test_timer_periodic_with_counter_0_on_start()
674 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_periodic_with_counter_0_on_start()
689 clock_step(1); in test_periodic_counter()
705 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_counter_periodic_with_zero_load()
709 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_counter_periodic_with_zero_load()
718 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_set_counter_periodic_with_zero_load()
720 TIMER_BLOCK_STEP(scaler, 1); in test_timer_set_counter_periodic_with_zero_load()
790 TIMER_BLOCK_STEP(255, 1); in test_deferred_trigger()
792 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_deferred_trigger()
802 TIMER_BLOCK_STEP(255, 1); in test_deferred_trigger()
806 TIMER_BLOCK_STEP(255, 1); in test_deferred_trigger()
808 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_deferred_trigger()
824 TIMER_BLOCK_STEP(255, 1); in test_deferred_trigger()
826 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_deferred_trigger()
842 TIMER_BLOCK_STEP(255, 1); in test_deferred_trigger()
844 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_deferred_trigger()
860 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_mode_switch()
865 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_mode_switch()
869 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_mode_switch()
874 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_mode_switch()
879 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_mode_switch()
883 TIMER_BLOCK_STEP(scaler, 1); in test_timer_zero_load_mode_switch()
895 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
898 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
901 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
904 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
907 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
911 TIMER_BLOCK_STEP(NOSCALE, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
914 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
917 TIMER_BLOCK_STEP(NOSCALE, 1); in test_timer_zero_load_prescaled_periodic_to_nonscaled_oneshot()
929 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_prescaled_oneshot_to_nonscaled_periodic()
932 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_prescaled_oneshot_to_nonscaled_periodic()
937 TIMER_BLOCK_STEP(NOSCALE, 1); in test_timer_zero_load_prescaled_oneshot_to_nonscaled_periodic()
949 TIMER_BLOCK_STEP(NOSCALE, 1); in test_timer_zero_load_nonscaled_oneshot_to_prescaled_periodic()
956 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_nonscaled_oneshot_to_prescaled_periodic()
959 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_nonscaled_oneshot_to_prescaled_periodic()
962 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_nonscaled_oneshot_to_prescaled_periodic()
965 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_nonscaled_oneshot_to_prescaled_periodic()
975 TIMER_BLOCK_STEP(NOSCALE, 1); in test_timer_zero_load_nonscaled_periodic_to_prescaled_oneshot()
982 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_nonscaled_periodic_to_prescaled_oneshot()
985 g_assert_cmpuint(timer_get_and_clr_int_sts(), ==, 1); in test_timer_zero_load_nonscaled_periodic_to_prescaled_oneshot()
988 TIMER_BLOCK_STEP(255, 1); in test_timer_zero_load_nonscaled_periodic_to_prescaled_oneshot()