summaryrefslogtreecommitdiff
path: root/drivers/devfreq/event
AgeCommit message (Collapse)Author
2017-06-12PM / devfreq: exynos-ppmu: Staticize event listKrzysztof Kozlowski
The ppmu_events array is accessed only in this compilation unit so it can be made static. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2017-06-12PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enableArvind Yadav
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2017-06-12PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enableArvind Yadav
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2017-01-31PM / devfreq: exynos-ppmu: Show the registred device for ppmu deviceChanwoo Choi
This patch just adds the simple log to show the PPMU device's registration during the kernel booting. Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Javier Martinez Canillas <javier@osg.samsung.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2017-01-31PM / devfreq: exynos-ppmu: Use the regmap interface to handle the registersChanwoo Choi
This patch uses the regmap interface to read and write the registers for exynos PPMU device instead of the legacy memory map functions. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-11-17PM / devfreq: exynos-ppmu: Remove unused mutex from struct exynos_ppmuAxel Lin
The mutex is not used at all, remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-11-17PM / devfreq: exynos-ppmu: ppmu_events array should not be NULL terminatedAxel Lin
The rest of the code uses ARRAY_SIZE to count the number of entries in ppmu_events array. The NULL terminated entry makes ARRAY_SIZE return off-by-one value. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-11-17PM / devfreq: exynos-ppmu: Fix module autoloadJavier Martinez Canillas
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/devfreq/event/exynos-ppmu.ko | grep alias $ After this patch: $ modinfo drivers/devfreq/event/exynos-ppmu.ko | grep alias alias: of:N*T*Csamsung,exynos-ppmu-v2C* alias: of:N*T*Csamsung,exynos-ppmu-v2 alias: of:N*T*Csamsung,exynos-ppmuC* alias: of:N*T*Csamsung,exynos-ppmu Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-11-17PM / devfreq: rockchip-dfi: Fix module autoloadJavier Martinez Canillas
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/devfreq/event/rockchip-dfi.ko | grep alias $ After this patch: $ modinfo drivers/devfreq/event/rockchip-dfi.ko | grep alias alias: of:N*T*Crockchip,rk3399-dfiC* alias: of:N*T*Crockchip,rk3399-dfi Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-11-17PM / devfreq: exynos-nocp: Fix module autoloadJavier Martinez Canillas
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/devfreq/event/exynos-nocp.ko | grep alias $ After this patch: $ modinfo drivers/devfreq/event/exynos-nocp.ko | grep alias alias: of:N*T*Csamsung,exynos5420-nocpC* alias: of:N*T*Csamsung,exynos5420-nocp Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-10-10PM / devfreq: exynos-nocp: Remove redundant codeAxel Lin
load_count/total_count are reset by devfreq_event_get_event(), so remove the redundant code in exynos_nocp_get_event(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> [ rjw: Subject/changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-10-10PM / devfreq: exynos-nocp: Select REGMAP_MMIOAxel Lin
This driver uses devm_regmap_init_mmio(), so select REGMAP_MMIO to avoid build failure. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-09-06PM / devfreq: event: support rockchip dfi controllerLin Huang
on rk3399 platform, there is dfi conroller can monitor ddr load, base on this result, we can do ddr freqency scaling. Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
2016-09-06PM / devfreq: Add COMPILE_TEST for build coverageKrzysztof Kozlowski
The SoC-specific devfreq and devfreq-event drivers can be build tested on all architectures. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-09-06PM / devfreq: exynos-ppmu: remove unneeded of_node_put()Wei Yongjun
for_each_child_of_node() performs an of_node_put() on each iteration, so putting an of_node_put() before a continue results in a double put. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-07-06PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe()Bartlomiej Zolnierkiewicz
iounmap() needs to be called in case of memory allocation (for devfreq-event devices) failure. Fix it. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-07-06PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU tristatePaul Gortmaker
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 <paul.gortmaker@windriver.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-07-06PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP tristatePaul 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 <paul.gortmaker@windriver.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-06-22PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() checkDan Carpenter
Smatch complains because platform_get_resource() returns NULL on error and not an error pointer so the check is wrong. Julia Lawall pointed out that normally we don't check these, because devm_ioremap_resource() has a check for NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-05-03PM / devfreq: event: Add new Exynos NoC probe driverChanwoo 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 <cw00.choi@samsung.com> Tested-by: Markus Reichl <m.reichl@fivetechno.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2015-09-11PM / devfreq: exynos-ppmu: bit-wise operation bugfix.MyungJoo Ham
Make it u64 before left-shifting 32bits. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2015-09-11PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433Chanwoo Choi
This patch adds the support for PPMU (Platform Performance Monitoring Unit) version 2.0 for Exynos5433 SoC. Exynos5433 SoC must need PPMUv2 which is quite different from PPMUv1.1. The exynos-ppmu.c driver supports both PPMUv1.1 and PPMUv2. Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-03-30PM / devfreq: event: Add const keyword for devfreq_event_ops structureChanwoo Choi
This patch adds the const keyword for devfreq_event_ops structure because the ops of devfreq_event_desc structure should not be changed after initialization. Cc: Myungjoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2015-02-12PM / devfreq: event: testing the wrong variableDan Carpenter
There is a typo here so we test "edev" but we intended to test "edev[i]". Fixes: f262f28c1470 ('PM / devfreq: event: Add devfreq_event class') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-01-30PM / devfreq: event: Add devfreq_event classChanwoo Choi
This patch adds a new class in devfreq, devfreq_event, which provides raw data (e.g., memory bus utilization, GPU utilization) for devfreq governors. - devfreq_event device : Provides raw data for a governor of a devfreq device - devfreq device : Monitors device state and changes frequency/voltage of the device using the raw data from its devfreq_event device. A devfreq device dertermines performance states (normally the frequency and the voltage vlues) based on the results its designtated devfreq governor: e.g., ondemand, performance, powersave. In order to give such results required by a devfreq device, the devfreq governor requires data that indicates the performance requirement given to the devfreq device. The conventional (previous) implementatino of devfreq subsystem requires a devfreq device driver to implement its own mechanism to acquire performance requirement for its governor. However, there had been issues with such requirements: 1. Although performance requirement of such devices is usually acquired from common devices (PMU/PPMU), we do not have any abstract structure to represent them properly. 2. Such performance requirement devices (PMU/PPMU) are actual hardware pieces that may be represented by Device Tree directly while devfreq device itself is a virtual entity that are not considered to be represented by Device Tree according to Device Tree folks. In order to address such issues, a devferq_event device (represented by this patch) provides a template for device drivers representing performance monitoring unit, which gives the basic or raw data for preformance requirement, which in turn, is required by devfreq governors. The following description explains the feature of two kind of devfreq class: - devfreq class (existing) : devfreq consumer device use raw data from devfreq_event device for determining proper current system state and change voltage/frequency dynamically using various governors. - devfreq_event class (new) : Provide measured raw data to devfreq device for governor Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> [Commit message rewritten & conflict resolved by MyungJoo] Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>