Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM / devfreq: tegra30-devfreq: add support for Tegra114

Lets add Tegra114 support to activity monitor device as a preparation to
upcoming EMC controller support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Acked-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: MyungJoo Ham <myungjoo.ham@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/lkml/20260126185423.77786-1-clamor95@gmail.com/

authored by

Svyatoslav Ryhel and committed by
Chanwoo Choi
cd905830 943a872f

+12 -5
+12 -5
drivers/devfreq/tegra30-devfreq.c
··· 941 941 return 0; 942 942 } 943 943 944 + /* 945 + * The activity counter is incremented every 256 memory transactions. However, 946 + * the number of clock cycles required for each transaction varies across 947 + * different SoC generations. For instance, a single transaction takes 2 EMC 948 + * clocks on Tegra30, 1 EMC clock on Tegra114, and 4 EMC clocks on Tegra124. 949 + */ 944 950 static const struct tegra_devfreq_soc_data tegra124_soc = { 945 951 .configs = tegra124_device_configs, 946 - 947 - /* 948 - * Activity counter is incremented every 256 memory transactions, 949 - * and each transaction takes 4 EMC clocks. 950 - */ 951 952 .count_weight = 4 * 256, 953 + }; 954 + 955 + static const struct tegra_devfreq_soc_data tegra114_soc = { 956 + .configs = tegra124_device_configs, 957 + .count_weight = 256, 952 958 }; 953 959 954 960 static const struct tegra_devfreq_soc_data tegra30_soc = { ··· 964 958 965 959 static const struct of_device_id tegra_devfreq_of_match[] = { 966 960 { .compatible = "nvidia,tegra30-actmon", .data = &tegra30_soc, }, 961 + { .compatible = "nvidia,tegra114-actmon", .data = &tegra114_soc, }, 967 962 { .compatible = "nvidia,tegra124-actmon", .data = &tegra124_soc, }, 968 963 { }, 969 964 };