spl: Add a separate silence option for SPL
[platform/kernel/u-boot.git] / common / cyclic.c
index b3c180b..7abb82c 100644 (file)
@@ -85,13 +85,17 @@ void cyclic_run(void)
                        cyclic->cpu_time_us += cpu_time;
 
                        /* Check if cpu-time exceeds max allowed time */
-                       if (cpu_time > CONFIG_CYCLIC_MAX_CPU_TIME_US) {
-                               pr_err("cyclic function %s took too long: %lldus vs %dus max, disabling\n",
+                       if ((cpu_time > CONFIG_CYCLIC_MAX_CPU_TIME_US) &&
+                           (!cyclic->already_warned)) {
+                               pr_err("cyclic function %s took too long: %lldus vs %dus max\n",
                                       cyclic->name, cpu_time,
                                       CONFIG_CYCLIC_MAX_CPU_TIME_US);
 
-                               /* Unregister this cyclic function */
-                               cyclic_unregister(cyclic);
+                               /*
+                                * Don't disable this function, just warn once
+                                * about this exceeding CPU time usage
+                                */
+                               cyclic->already_warned = true;
                        }
                }
        }