26 Jan, 2017

2 commits

  • commit 73613b16cb5c5d5a659fc8832eff99eead3f9afb upstream.

    This patch fixes the bug of devfreq_add_device(). The devfreq device must
    have the default governor. If find_devfreq_governor() returns error,
    devfreq_add_device() fail to add the devfreq instance.

    Fixes: 1b5c1be2c88e (PM / devfreq: map devfreq drivers to governor using name)
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Chanwoo Choi
     
  • commit 32dd7731699765f21dbe6df9020e613d4ed73fc3 upstream.

    This patch fixes the wrong return value. If devfreq driver requires the wrong
    and non-available governor, it is fail. So, this patch returns the error
    insead of -EPROBE_DEFER.

    Fixes: 403e0689d2a9 (PM / devfreq: exynos: Add support of bus frequency of sub-blocks using passive governor)
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Chanwoo Choi
     

11 Oct, 2016

4 commits


19 Sep, 2016

2 commits

  • Current code uses devm_regulator_get() in .probe so a regulator_put() will
    be automatically called when unload the module. Remove the explictly
    regulator_put() call and then we can also remove rk3399_dmcfreq_remove().

    Signed-off-by: Axel Lin
    Reviewed-by: Chanwoo Choi
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Axel Lin
     
  • The newly added ARM_RK3399_DMC_DEVFREQ driver requires the
    DEVFREQ_EVENT_ROCKCHIP_DFI driver and tries to turn that on through
    a 'select' statement, and that in turn has a dependency on
    PM_DEVFREQ_EVENT, which may be disabled here:

    warning: (ARM_RK3399_DMC_DEVFREQ) selects DEVFREQ_EVENT_ROCKCHIP_DFI which has unmet direct dependencies (PM_DEVFREQ && PM_DEVFREQ_EVENT && ARCH_ROCKCHIP)

    We probably want a 'depends on' here, but other drivers use 'select'
    too, so for consistency I'm doing the same.

    Signed-off-by: Arnd Bergmann
    Fixes: 5a893e31a636 (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc)
    Acked-by: Chanwoo Choi
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Arnd Bergmann
     

15 Sep, 2016

1 commit


06 Sep, 2016

5 commits


06 Jul, 2016

9 commits

  • of_node_put needs to be called when the device node which is got
    from of_parse_phandle has finished using.

    [Commit updated to fix an error by MyungJoo]

    Cc: Chanwoo Choi
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Signed-off-by: Peter Chen
    Acked-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Peter Chen
     
  • of_node_put needs to be called when the device node which is got
    from of_parse_phandle has finished using.

    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Signed-off-by: Peter Chen
    Signed-off-by: MyungJoo Ham

    Peter Chen
     
  • iounmap() needs to be called in case of memory allocation
    (for devfreq-event devices) failure. Fix it.

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Bartlomiej Zolnierkiewicz
     
  • In case of exynos_bus_parse_of() failure the code shouldn't
    try to remove the OPP table and disable+unprepare bus->clk
    as it has been already handled in exynos_bus_parse_of().

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Bartlomiej Zolnierkiewicz
     
  • The Kconfig currently controlling compilation of this code is:

    config DEVFREQ_EVENT_EXYNOS_PPMU
    bool "EXYNOS PPMU (Platform Performance Monitoring Unit) DEVFREQ event Driver"

    ...meaning that it currently is not being built as a module by anyone.

    Rather than rip out the existing modular code, Chanwoo indicated
    that he'd rather see the driver offered as tristate.

    I don't have the hardware for runtime validation, so this change
    is only validated for compile and modpost.

    Signed-off-by: Paul Gortmaker
    Acked-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Paul Gortmaker
     
  • The Kconfig currently controlling compilation of this code is:

    event/Kconfig:config DEVFREQ_EVENT_EXYNOS_NOCP
    event/Kconfig: bool "EXYNOS NoC (Network On Chip) Probe DEVFREQ event Driver"

    ...meaning that it currently is not being built as a module by anyone.

    Rather than rip out the existing modular code, Chanwoo indicated
    that he'd rather see the driver offered as tristate.

    I don't have the hardware for runtime validation, so this change
    is only validated for compile and modpost.

    Signed-off-by: Paul Gortmaker
    Acked-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Paul Gortmaker
     
  • The Kconfig currently controlling compilation of this code is:

    devfreq/Kconfig:config ARM_EXYNOS_BUS_DEVFREQ
    devfreq/Kconfig: bool "ARM EXYNOS Generic Memory Bus DEVFREQ Driver"

    ...meaning that it currently is not being built as a module by anyone.

    Rather than rip out the existing modular code, Chanwoo indicated
    that he'd rather see the driver offered as tristate.

    I don't have the hardware for runtime validation, so this change
    is only validated for compile and modpost.

    Signed-off-by: Paul Gortmaker
    Acked-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Paul Gortmaker
     
  • The Kconfig currently controlling compilation of this code is:

    menuconfig PM_DEVFREQ_EVENT
    bool "DEVFREQ-Event device Support"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the modular code that is essentially orphaned, so that
    when reading the driver there is no doubt it is builtin-only.

    This code wasn't using module_init, so we don't need to be concerned
    with altering the initcall level here.

    We don't replace module.h with init.h since the file already has that.
    But we do add export.h since this file does export some symbols.

    We also delete the MODULE_LICENSE tag etc. since all that information
    is already contained at the top of the file in the comments.

    Signed-off-by: Paul Gortmaker
    Acked-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Paul Gortmaker
     
  • The Kconfig currently controlling compilation of this code is:

    menuconfig PM_DEVFREQ
    bool "Generic Dynamic Voltage and Frequency Scaling (DVFS) support"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the modular code that is essentially orphaned, so that
    when reading the driver there is no doubt it is builtin-only.

    This code wasn't using module_init, so we don't need to be concerned
    with altering the initcall level here.

    We also delete the MODULE_LICENSE tag etc. since all that information
    is already contained at the top of the file in the comments.

    We don't replace module.h with init.h since the file already has that.
    But we do add export.h since this file does export some symbols.

    Signed-off-by: Paul Gortmaker
    Reviewed-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Paul Gortmaker
     

24 Jun, 2016

1 commit


22 Jun, 2016

6 commits


03 May, 2016

9 commits

  • - Typo in comments fixed
    - Unnecessary return statement removed

    Signed-off-by: MyungJoo Ham

    MyungJoo Ham
     
  • This patch use the phandle to find the instance of devfreq-event device in
    Device Tree when calling the devfreq_event_get_edev_by_phandle() because there
    is two type devfreq-event devices as following:

    First case, exynos-ppmu.c driver provides the maximum four event of each PPMU.
    So, when getting the instance of devfreq-event device, using the unique name of
    struct devfreq_event_desc.

    Second case, exynos-nocp.c driver provide the only one event of each NoC Probe
    device. So, when getting the instance of devfreq-event device, using the
    phandle of each NoC probe device.

    Signed-off-by: Chanwoo Choi
    Acked-by: MyungJoo Ham

    Chanwoo Choi
     
  • This patch adds NoC (Network on Chip) Probe driver which provides
    the primitive values to get the performance data. The packets that the Network
    on Chip (NoC) probes detects are transported over the network infrastructure.
    Exynos542x bus has multiple NoC probes to provide bandwidth information about
    behavior of the SoC that you can use while analyzing system performance.

    Signed-off-by: Chanwoo Choi
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Reviewed-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch removes the unused exynos4/5 busfreq driver. Instead,
    generic exynos-bus frequency driver support the all Exynos SoCs.

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the support of bus frequency feature for sub-blocks which share
    the one power line. If each bus depends on the power line, each bus is not able
    to change the voltage by oneself. To optimize the power-consumption on runtime,
    some buses using the same power line should change the source clock and
    regulator at the same time. So, this patch uses the passive governor to support
    the bus frequency for all buses which sharing the one power line.

    For example,

    Exynos3250 include the two power line for AXI buses as following:
    : VDD_MIF : MIF (Memory Interface) provide the DMC (Dynamic Memory Controller)
    with the power (regulator).
    : VDD_INT : INT (Internal) provide the various sub-blocks with the power
    (regulator).

    Each bus is included in as follwoing block. In the case of VDD_MIF, only DMC bus
    use the power line. So, there is no any depencency between buese. But, in the
    case of VDD_INT, various buses share the one power line of VDD_INT. We need to
    make the depenency between buses. When using passive governor, there is no
    problem to support the bus frequency as DVFS for all buses. One bus should be
    operated as the parent bus device which gathering the current load of INT block
    and then decides the new frequency with some governors except of passive
    governor. After deciding the new frequency by the parent bus device, the rest
    bus devices will change the each source clock according to new frequency of the
    parent bus device.

    - MIF (Memory Interface) block
    : VDD_MIF |--- DMC

    - INT (Internal) block
    : VDD_INT |--- LEFTBUS (parent)
    |--- PERIL
    |--- MFC
    |--- G3D
    |--- RIGHTBUS
    |--- FSYS
    |--- LCD0
    |--- PERIR
    |--- ISP
    |--- CAM

    Signed-off-by: Chanwoo Choi
    [tjakobi: Reported debugfs error during booting and cw00.choi fix it.]
    Reported-by: Tobias Jakobi
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the new passive governor for DEVFREQ framework. The following
    governors are already present and used for DVFS (Dynamic Voltage and Frequency
    Scaling) drivers. The following governors are independently used for one device
    driver which don't give the influence to other device drviers and also don't
    receive the effect from other device drivers.
    - ondemand / performance / powersave / userspace

    The passive governor depends on operation of parent driver with specific
    governos extremely and is not able to decide the new frequency by oneself.
    According to the decided new frequency of parent driver with governor,
    the passive governor uses it to decide the appropriate frequency for own
    device driver. The passive governor must need the following information
    from device tree:
    - the source clock and OPP tables
    - the instance of parent device

    For exameple,
    there are one more devfreq device drivers which need to change their source
    clock according to their utilization on runtime. But, they share the same
    power line (e.g., regulator). So, specific device driver is operated as parent
    with ondemand governor and then the rest device driver with passive governor
    is influenced by parent device.

    Suggested-by: Myungjoo Ham
    Signed-off-by: Chanwoo Choi
    [tjakobi: Reported RCU locking issue and cw00.choi fix it]
    Reported-by: Tobias Jakobi
    [linux.amoon: Reported possible recursive locking and cw00.choi fix it]
    Reported-by: Anand Moon
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the new DEVFREQ_TRANSITION_NOTIFIER notifier to send
    the notification when the frequency of device is changed.
    This notifier has two state as following:
    - DEVFREQ_PRECHANGE : Notify it before chaning the frequency of device
    - DEVFREQ_POSTCHANGE : Notify it after changed the frequency of device

    And this patch adds the resourced-managed function to release the resource
    automatically when error happen.

    Signed-off-by: Chanwoo Choi
    [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the new devfreq_get_devfreq_by_phandle() OF helper function
    which can find the instance of devfreq device by using phandle ("devfreq").

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham
    [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the generic exynos bus frequency driver for AMBA AXI bus
    of sub-blocks in exynos SoC with DEVFREQ framework. The Samsung Exynos SoC
    have the common architecture for bus between DRAM and sub-blocks in SoC.
    This driver can support the generic bus frequency driver for Exynos SoCs.

    In devicetree, Each bus block has a bus clock, regulator, operation-point
    and devfreq-event devices which measure the utilization of each bus block.

    Signed-off-by: Chanwoo Choi
    [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     

17 Mar, 2016

1 commit