firmware/br-ext-chip-allwinner/board/v83x/kernel/patches/00000-drivers_cpufreq_cpufr...

37 lines
1.0 KiB
Diff

diff -drupN a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
--- a/drivers/cpufreq/cpufreq-dt.c 2018-08-06 17:23:04.000000000 +0300
+++ b/drivers/cpufreq/cpufreq-dt.c 2022-06-12 05:28:14.000000000 +0300
@@ -280,6 +280,13 @@ static int cpufreq_init(struct cpufreq_p
policy->cpuinfo.transition_latency = transition_latency;
+ /*
+ * Android: set default parameters for parity between schedutil and
+ * schedfreq
+ */
+ policy->up_transition_delay_us = transition_latency / NSEC_PER_USEC;
+ policy->down_transition_delay_us = 50000; /* 50ms */
+
return 0;
out_free_cpufreq_table:
@@ -389,9 +396,18 @@ static int dt_cpufreq_remove(struct plat
return 0;
}
+static const struct of_device_id cpufreq_match[] = {
+ {
+ .compatible = "sunxi,cpufreq",
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, cpufreq_match);
+
static struct platform_driver dt_cpufreq_platdrv = {
.driver = {
.name = "cpufreq-dt",
+ .of_match_table = cpufreq_match,
},
.probe = dt_cpufreq_probe,
.remove = dt_cpufreq_remove,