14 Dec, 2020

4 commits


10 Sep, 2020

1 commit


24 Jun, 2020

1 commit

  • The Energy Model framework supports not only CPU devices. Drop the CPU
    specific interface with cpumask and add struct device. Add also a return
    value, user might use it. This new interface provides easy way to create
    a simple Energy Model, which then might be used by e.g. thermal subsystem.

    Acked-by: Daniel Lezcano
    Signed-off-by: Lukasz Luba
    Signed-off-by: Rafael J. Wysocki

    Lukasz Luba
     

17 Mar, 2020

1 commit


03 Mar, 2020

2 commits

  • Directly accessing OCOTP registers should be avoided, because
    it could not handle OCOTP clks and could not handle defer
    proper. With nvmem API, it is safe to access OCOTP registers.

    To make sure old dtb could work, the original code still kept.

    Signed-off-by: Peng Fan
    Signed-off-by: Viresh Kumar

    Peng Fan
     
  • When speed checking failed, direclty jumping to put_node label
    is not correct. Need jump to out_free_opp to avoid resources leak.

    Fixes: 2733fb0d0699 ("cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull")
    Signed-off-by: Peng Fan
    Signed-off-by: Viresh Kumar

    Peng Fan
     

12 Feb, 2020

1 commit

  • imx6ul_opp_check_speed_grading is called for both i.MX6UL and i.MX6ULL.
    Since the i.MX6ULL was introduced to a separate ocotp compatible node
    later, it is possible that the i.MX6ULL has also dtbs with
    "fsl,imx6ull-ocotp". On a system without nvmem-cell speed grade a
    missing check on this node causes a driver fail without considering
    the cpu speed grade.

    This patch prevents unwanted cpu overclocking on i.MX6ULL with compatible
    node "fsl,imx6ull-ocotp" in old dtbs without nvmem-cell speed grade.

    Fixes: 2733fb0d0699 ("cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull")
    Signed-off-by: Christoph Niedermaier
    Signed-off-by: Viresh Kumar

    Christoph Niedermaier
     

18 Jul, 2019

1 commit

  • * pm-cpufreq:
    cpufreq: Make cpufreq_generic_init() return void
    cpufreq: imx-cpufreq-dt: Add i.MX8MN support
    cpufreq: Add QoS requests for userspace constraints
    cpufreq: intel_pstate: Reuse refresh_frequency_limits()
    cpufreq: Register notifiers with the PM QoS framework
    PM / QoS: Add support for MIN/MAX frequency constraints
    PM / QOS: Pass request type to dev_pm_qos_read_value()
    PM / QOS: Rename __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value()
    PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier()

    Rafael J. Wysocki
     

16 Jul, 2019

1 commit

  • It always returns 0 (success) and its return type should really be void.

    Over that, many drivers have added error handling code based on its
    return value, which is not required at all.

    Change its return type to void and update all the callers.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

08 Apr, 2019

1 commit

  • The call to of_node_get returns a node pointer with refcount
    incremented thus it must be explicitly decremented after the last
    usage.

    Detected by coccinelle with the following warnings:
    ./drivers/cpufreq/imx6q-cpufreq.c:391:4-10: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 348, but without a corresponding object release within this function.
    ./drivers/cpufreq/imx6q-cpufreq.c:395:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 348, but without a corresponding object release within this function.

    Signed-off-by: Wen Yang
    Cc: "Rafael J. Wysocki"
    Cc: Viresh Kumar
    Cc: Shawn Guo
    Cc: Sascha Hauer
    Cc: Pengutronix Kernel Team
    Cc: Fabio Estevam
    Cc: NXP Linux Team
    Cc: linux-pm@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Viresh Kumar

    Wen Yang
     

04 Mar, 2019

1 commit

  • * pm-opp:
    cpufreq: OMAP: Register an Energy Model
    cpufreq: imx6q: Register an Energy Model
    opp: no need to check return value of debugfs_create functions
    cpufreq: mediatek: Register an Energy Model
    cpufreq: scmi: Register an Energy Model
    cpufreq: arm_big_little: Register an Energy Model
    cpufreq: scpi: Register an Energy Model
    cpufreq: dt: Register an Energy Model

    Rafael J. Wysocki
     

07 Feb, 2019

1 commit


31 Jan, 2019

1 commit


30 Nov, 2018

2 commits


07 Nov, 2018

1 commit


08 Oct, 2018

1 commit


02 Jul, 2018

1 commit

  • The cooling device should be part of the i.MX cpufreq driver, but it
    cannot be removed for the sake of DT stability. So turn the cooling
    device registration into a separate function and perform the
    registration only if the CPU OF node does not have the #cooling-cells
    property.

    Use of_cpufreq_power_cooling_register in imx_thermal code to link the
    cooling device to the device tree node provided.

    This makes it possible to bind the cpufreq cooling device to a custom
    thermal zone via a cooling-maps entry like:

    cooling-maps {
    map0 {
    trip = ;
    cooling-device = ;
    };
    };

    Assuming a cpu node exists with label "cpu0" and #cooling-cells
    property.

    Signed-off-by: Bastian Stender
    Reviewed-by: Lucas Stach
    Signed-off-by: Rafael J. Wysocki

    Bastian Stender
     

13 Jun, 2018

2 commits

  • Pull more power management updates from Rafael Wysocki:
    "These revert a recent PM core change that introduced a regression, fix
    the build when the recently added Kryo cpufreq driver is selected, add
    support for devices attached to multiple power domains to the generic
    power domains (genpd) framework, add support for iowait boosting on
    systens with hardware-managed P-states (HWP) enabled to the
    intel_pstate driver, modify the behavior of the wakeup_count device
    attribute in sysfs, fix a few issues and clean up some ugliness,
    mostly in cpufreq (core and drivers) and in the cpupower utility.

    Specifics:

    - Revert a recent PM core change that attempted to fix an issue
    related to device links, but introduced a regression (Rafael
    Wysocki)

    - Fix build when the recently added cpufreq driver for Kryo
    processors is selected by making it possible to build that driver
    as a module (Arnd Bergmann)

    - Fix the long idle detection mechanism in the out-of-band (ondemand
    and conservative) cpufreq governors (Chen Yu)

    - Add support for devices in multiple power domains to the generic
    power domains (genpd) framework (Ulf Hansson)

    - Add support for iowait boosting on systems with hardware-managed
    P-states (HWP) enabled to the intel_pstate driver and make it use
    that feature on systems with Skylake Xeon processors as it is
    reported to improve performance significantly on those systems
    (Srinivas Pandruvada)

    - Fix and update the acpi_cpufreq, ti-cpufreq and imx6q cpufreq
    drivers (Colin Ian King, Suman Anna, Sébastien Szymanski)

    - Change the behavior of the wakeup_count device attribute in sysfs
    to expose the number of events when the device might have aborted
    system suspend in progress (Ravi Chandra Sadineni)

    - Fix two minor issues in the cpupower utility (Abhishek Goel, Colin
    Ian King)"

    * tag 'pm-4.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    Revert "PM / runtime: Fixup reference counting of device link suppliers at probe"
    cpufreq: imx6q: check speed grades for i.MX6ULL
    cpufreq: governors: Fix long idle detection logic in load calculation
    cpufreq: intel_pstate: enable boost for Skylake Xeon
    PM / wakeup: Export wakeup_count instead of event_count via sysfs
    PM / Domains: Add dev_pm_domain_attach_by_id() to manage multi PM domains
    PM / Domains: Add support for multi PM domains per device to genpd
    PM / Domains: Split genpd_dev_pm_attach()
    PM / Domains: Don't attach devices in genpd with multi PM domains
    PM / Domains: dt: Allow power-domain property to be a list of specifiers
    cpufreq: intel_pstate: New sysfs entry to control HWP boost
    cpufreq: intel_pstate: HWP boost performance on IO wakeup
    cpufreq: intel_pstate: Add HWP boost utility and sched util hooks
    cpufreq: ti-cpufreq: Use devres managed API in probe()
    cpufreq: ti-cpufreq: Fix an incorrect error return value
    cpufreq: ACPI: make function acpi_cpufreq_fast_switch() static
    cpufreq: kryo: allow building as a loadable module
    cpupower : Fix header name to read idle state name
    cpupower: fix spelling mistake: "logilename" -> "logfilename"

    Linus Torvalds
     
  • The devm_kzalloc() function has a 2-factor argument form, devm_kcalloc().
    This patch replaces cases of:

    devm_kzalloc(handle, a * b, gfp)

    with:
    devm_kcalloc(handle, a * b, gfp)

    as well as handling cases of:

    devm_kzalloc(handle, a * b * c, gfp)

    with:

    devm_kzalloc(handle, array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    devm_kcalloc(handle, array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    devm_kzalloc(handle, 4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    Some manual whitespace fixes were needed in this patch, as Coccinelle
    really liked to write "=devm_kcalloc..." instead of "= devm_kcalloc...".

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    expression HANDLE;
    type TYPE;
    expression THING, E;
    @@

    (
    devm_kzalloc(HANDLE,
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression HANDLE;
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    expression HANDLE;
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    expression HANDLE;
    identifier SIZE, COUNT;
    @@

    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression HANDLE;
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression HANDLE;
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    expression HANDLE;
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    devm_kzalloc(HANDLE,
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression HANDLE;
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression HANDLE;
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    devm_kzalloc(HANDLE, sizeof(THING) * C2, ...)
    |
    devm_kzalloc(HANDLE, sizeof(TYPE) * C2, ...)
    |
    devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
    |
    devm_kzalloc(HANDLE, C1 * C2, ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

11 Jun, 2018

1 commit


20 Mar, 2018

1 commit

  • This is a preparatory commit to make policy->suspend_freq independent of
    validation of the cpufreq table, as a later commit would update
    cpufreq_generic_init() to not validate the cpufreq table any longer.

    The driver already assumes the order in which the frequency table is
    sorted and we can get the max frequency easily.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

08 Feb, 2018

1 commit


10 Jan, 2018

1 commit

  • Add 696MHz operating point for i.MX6UL, only for those
    parts with speed grading fuse set to 2b'10 supports
    696MHz operating point, so, speed grading check is also
    added for i.MX6UL in this patch, the clock tree for each
    operating point are as below:

    696MHz:
    pll1 696000000
    pll1_bypass 696000000
    pll1_sys 696000000
    pll1_sw 696000000
    arm 696000000
    528MHz:
    pll2 528000000
    pll2_bypass 528000000
    pll2_bus 528000000
    ca7_secondary_sel 528000000
    step 528000000
    pll1_sw 528000000
    arm 528000000
    396MHz:
    pll2_pfd2_396m 396000000
    ca7_secondary_sel 396000000
    step 396000000
    pll1_sw 396000000
    arm 396000000
    198MHz:
    pll2_pfd2_396m 396000000
    ca7_secondary_sel 396000000
    step 396000000
    pll1_sw 396000000
    arm 198000000

    Signed-off-by: Anson Huang
    Reviewed-by: Fabio Estevam
    Acked-by: Viresh Kumar
    Acked-by: Dong Aisheng
    Signed-off-by: Rafael J. Wysocki

    Anson Huang
     

28 Dec, 2017

1 commit


18 Dec, 2017

1 commit

  • The commit moving the speed grading check to the cpufreq driver introduced
    some additional checks, so the OPP disable is only attempted on SoCs where
    those OPPs are present. The compatible checks are missing the QuadPlus
    compatible, so invalid OPPs are not correctly disabled there.

    Move both checks to a single condition, so we don't need to sprinkle even
    more calls to of_machine_is_compatible().

    Fixes: 2b3d58a3adca (cpufreq: imx6q: Move speed grading check to cpufreq driver)
    Signed-off-by: Lucas Stach
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Lucas Stach
     

11 Oct, 2017

1 commit

  • On some i.MX6 SoCs (like i.MX6SL, i.MX6SX and i.MX6UL) that do not have
    speed grading check, opp table will not be created in platform code,
    so cpufreq driver prints the following error message:

    cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)

    However, this is not really an error in this case because the
    imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count()
    and if it fails, it means that platform code does not provide
    OPP and then dev_pm_opp_of_add_table() will be called.

    In order to avoid such confusing error message, move the speed grading
    check from platform code to the imx6q-cpufreq driver.

    This way the imx6q-cpufreq no longer has to check whether OPP table
    is supplied by platform code.

    Tested on a i.MX6Q and i.MX6UL based boards.

    Signed-off-by: Fabio Estevam
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Fabio Estevam
     

29 Aug, 2017

1 commit

  • This patch contains the minimal changes required to support imx6sx OPP
    of 198 Mhz. Without this patch cpufreq still reports success but the
    frequency is not changed, the "arm" clock will still be at 396000000 in
    clk_summary.

    In order to do this PLL1 needs to be still kept enabled while changing
    the ARM clock. This is a hardware requirement: when ARM_PODF is changed
    in CCM we need to check the busy bit of CCM_CDHIPR bit 16 arm_podf_busy,
    and this bit is sync with PLL1 clock, so if PLL1 NOT enabled, this
    bit will never get clear.

    Keep pll1_sys explicitly enabled until after the rate is change to deal
    with this. Otherwise from the clk framework perspective pll1_sys is
    unused and gets turned off.

    Signed-off-by: Leonard Crestez
    Reviewed-by: Lucas Stach
    Signed-off-by: Rafael J. Wysocki

    Leonard Crestez
     

24 Jun, 2017

1 commit


20 Apr, 2017

3 commits

  • According to the previous error handling code, it is likely that
    'goto out_free_opp' is expected here in order to avoid a memory leak in
    error handling path.

    Signed-off-by: Christophe JAILLET
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Christophe Jaillet
     
  • If the cpufreq driver tries to modify voltage/freq during suspend/resume
    it might need to control an external PMIC via I2C or SPI but those
    devices might be already suspended. This issue is likely to happen
    whenever the LDOs have their vin-supply set.

    To avoid this scenario we just increase cpufreq to the maximum before
    suspend.

    Signed-off-by: Leonard Crestez
    Reviewed-by: Lucas Stach
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Leonard Crestez
     
  • If there are any errors in getting the cpu0 regulators, the driver returns
    -ENOENT. In case the regulators are not yet available, the devm_regulator_get
    calls will return -EPROBE_DEFER, so that the driver can be probed later.
    If we return -ENOENT, the driver will fail its initialization and will
    not try to probe again (when the regulators become available).

    Return the actual error received from regulator_get in probe. Print a
    differentiated message in case we need to probe the device later and
    in case we actually failed. Also add a message to inform when the
    driver has been successfully registered.

    Signed-off-by: Irina Tirdea
    Signed-off-by: Leonard Crestez
    Reviewed-by: Lucas Stach
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Irina Tirdea
     

30 Jan, 2017

1 commit

  • This patch updates dev_pm_opp_find_freq_*() routines to get a reference
    to the OPPs returned by them.

    Also updates the users of dev_pm_opp_find_freq_*() routines to call
    dev_pm_opp_put() after they are done using the OPPs.

    As it is guaranteed the that OPPs wouldn't get freed while being used,
    the RCU read side locking present with the users isn't required anymore.
    Drop it as well.

    This patch also updates all users of devfreq_recommended_opp() which was
    returning an OPP received from the OPP core.

    Note that some of the OPP core routines have gained
    rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
    within them.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Chanwoo Choi [Devfreq]
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

02 Nov, 2015

1 commit

  • * pm-opp:
    PM / OPP: passing NULL to PTR_ERR()
    PM / OPP: Move cpu specific code to opp/cpu.c
    PM / OPP: Move opp core to its own directory
    PM / OPP: Prefix exported opp routines with dev_pm_opp_
    PM / OPP: Rename opp init/free table routines
    PM / OPP: reuse of_parse_phandle()

    Rafael J. Wysocki
     

26 Sep, 2015

1 commit

  • For i.MX6UL, the clock switch flow is slightly different from
    other i.MX6 SOCs. It has a 'secondary_sel' clk that will be used
    when the CPU freq is higher than 396MHz. So the clock switch flow in
    'set_target' callback need to update to support i.MX6UL in the common
    i.MX6 SOC cpufreq driver.

    Signed-off-by: Bai Ping
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Bai Ping
     

15 Sep, 2015

1 commit