1. 09 Jul, 2024 5 commits
    • Rafael J. Wysocki's avatar
      Merge tag 'cpufreq-arm-updates-6.11' of... · 7ad9eab9
      Rafael J. Wysocki authored
      Merge tag 'cpufreq-arm-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
      
      Merge ARM cpufreq updates for 6.11 from Viresh Kumar:
      
      "- cpufreq: Add Loongson-3 CPUFreq driver support (Huacai Chen).
       - Make exit() callback return void (Lizhe and Viresh Kumar).
       - Minor cleanups and fixes in several drivers (Bryan Brattlof,
         Javier Carrasco, Jagadeesh Kona, Jeff Johnson, Nícolas F. R. A. Prado,
         Primoz Fiser, Raphael Gallais-Pou, and Riwen Lu)."
      
      * tag 'cpufreq-arm-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (21 commits)
        cpufreq: sti: fix build warning
        cpufreq: mediatek: Use dev_err_probe in every error path in probe
        cpufreq: Add Loongson-3 CPUFreq driver support
        cpufreq: Make cpufreq_driver->exit() return void
        cpufreq: pcc: Remove empty exit() callback
        cpufreq: loongson2: Remove empty exit() callback
        cpufreq: nforce2: Remove empty exit() callback
        cpufreq: sti: add missing MODULE_DEVICE_TABLE entry for stih418
        cpufreq: ti: update OPP table for AM62Px SoCs
        cpufreq: ti: update OPP table for AM62Ax SoCs
        cpufreq: sun50i: add Allwinner H700 speed bin
        cpufreq/cppc: Don't compare desired_perf in target()
        OPP: ti: Fix ti_opp_supply_probe wrong return values
        cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe()
        cpufreq: dt-platdev: add missing MODULE_DESCRIPTION() macro
        cpufreq: longhaul: Fix kernel-doc param for longhaul_setstate
        cpufreq: qcom-nvmem: eliminate uses of of_node_put()
        cpufreq: qcom-nvmem: fix memory leaks in probe error paths
        cpufreq: scmi: Avoid overflow of target_freq in fast switch
        cpufreq: sun50i: replace of_node_put() with automatic cleanup handler
        ...
      7ad9eab9
    • Raphael Gallais-Pou's avatar
      cpufreq: sti: fix build warning · d992f881
      Raphael Gallais-Pou authored
      Building this driver yields the following:
      
      .../drivers/cpufreq/sti-cpufreq.c:215:50: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
        215 |         snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode);
            |                                                  ^~
      .../drivers/cpufreq/sti-cpufreq.c:215:44: note: directive argument in the range [0, 2147483647]
        215 |         snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode);
            |                                            ^~~~~~~~~
      .../drivers/cpufreq/sti-cpufreq.c:215:9: note: ‘snprintf’ output between 7 and 16 bytes into a destination of size 7
        215 |         snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode);
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Fix the buffer size to avoid the warning at build time.
      Signed-off-by: default avatarRaphael Gallais-Pou <rgallaispou@gmail.com>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      d992f881
    • Nícolas F. R. A. Prado's avatar
      cpufreq: mediatek: Use dev_err_probe in every error path in probe · ce879748
      Nícolas F. R. A. Prado authored
      Use the dev_err_probe() helper to log the errors on every error path in
      the probe function and its sub-functions. This includes
      * adding error messages where there was none
      * converting over dev_err/dev_warn
      * removing the top-level error message after mtk_cpu_dvfs_info_init() is
        called, since every error path inside that function already logs the
        error reason. This gets rid of the misleading error message when probe
        is deferred:
      
          mtk-cpufreq mtk-cpufreq: failed to initialize dvfs info for cpu0
      Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Signed-off-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      ce879748
    • Huacai Chen's avatar
      cpufreq: Add Loongson-3 CPUFreq driver support · ccf51454
      Huacai Chen authored
      Some of LoongArch processors (Loongson-3 series) support DVFS, their
      IOCSR.FEATURES has IOCSRF_FREQSCALE set. And they has a micro-core in
      the package called SMC (System Management Controller), which can be
      used to detect temperature, control fans, scale frequency and voltage,
      etc.
      
      The Loongson-3 CPUFreq driver is very simple now, it communicate with
      SMC, get DVFS info, set target frequency from CPUFreq core, and so on.
      
      There is a command list to interact with SMC, widely-used commands in
      the CPUFreq driver include:
      
      CMD_GET_VERSION: Get SMC firmware version.
      
      CMD_GET_FEATURE: Get enabled SMC features.
      
      CMD_SET_FEATURE: Enable SMC features, such as basic DVFS, BOOST.
      
      CMD_GET_FREQ_LEVEL_NUM: Get the number of all frequency levels.
      
      CMD_GET_FREQ_BOOST_LEVEL: Get the first boost frequency level.
      
      CMD_GET_FREQ_LEVEL_INFO: Get the detail info of a frequency level.
      
      CMD_GET_FREQ_INFO: Get the current frequency.
      
      CMD_SET_FREQ_INFO: Set the target frequency.
      
      In future we will add automatic frequency scaling, which is similar to
      Intel's HWP (HardWare P-State).
      Signed-off-by: default avatarBinbin Zhou <zhoubinbin@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      [ Viresh: Minor formatting cleanups, change return type of exit() to
      	  void and use devm_mutex_init() ]
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      ccf51454
    • Lizhe's avatar
      cpufreq: Make cpufreq_driver->exit() return void · b4b1ddc9
      Lizhe authored
      The cpufreq core doesn't check the return type of the exit() callback
      and there is not much the core can do on failures at that point. Just
      drop the returned value and make it return void.
      Signed-off-by: default avatarLizhe <sensor1010@163.com>
      [ Viresh: Reworked the patches to fix all missing changes together. ]
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> # Mediatek
      Acked-by: Sudeep Holla <sudeep.holla@arm.com> # scpi, scmi, vexpress
      Acked-by: Mario Limonciello <mario.limonciello@amd.com> # amd
      Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> # bmips
      Acked-by: default avatarRafael J. Wysocki <rafael@kernel.org>
      Acked-by: Kevin Hilman <khilman@baylibre.com> # omap
      b4b1ddc9
  2. 08 Jul, 2024 1 commit
  3. 07 Jul, 2024 2 commits
  4. 05 Jul, 2024 3 commits
  5. 02 Jul, 2024 1 commit
  6. 28 Jun, 2024 3 commits
  7. 27 Jun, 2024 2 commits
  8. 26 Jun, 2024 5 commits
  9. 25 Jun, 2024 4 commits
  10. 24 Jun, 2024 4 commits
  11. 23 Jun, 2024 8 commits
  12. 22 Jun, 2024 2 commits