29 Sep, 2020
1 commit
-
Previously, devfreq core support 'devfreq-events' property in order to get
the devfreq-event device by phandle. But, 'devfreq-events' property name is
not proper on devicetree binding because this name doesn't mean
the any h/w attribute.The devfreq-event core hand over the rights to decide the property name
for getting the devfreq-event device on devicetree. Each devfreq-event driver
will decide the property name on devicetree binding and then pass
the their own property name to devfreq_event_get_edev_by_phandle function.And change the prototype of devfreq_event_get_edev_count function
because of used deprecated 'devfreq-events' property.Acked-by: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi
30 Jul, 2020
1 commit
-
Booting a recent kernel on a rk3399-based system (nanopc-t4),
equipped with a recent u-boot and ATF results in an Oops due
to a NULL pointer dereference.This turns out to be due to the rk3399-dmc driver looking for
an *undocumented* property (rockchip,pmu), and happily using
a NULL pointer when the property isn't there.Instead, make most of what was brought in with 9173c5ceb035
("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters
to TF-A.") conditioned on finding this property in the device-tree,
preventing the driver from exploding.Cc: stable@vger.kernel.org
Fixes: 9173c5ceb035 ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.")
Signed-off-by: Marc Zyngier
Signed-off-by: Chanwoo Choi
30 Dec, 2019
2 commits
-
The probe process may fail, but the devfreq event device remains
enabled. Call devfreq_event_disable_edev on the error return path.Signed-off-by: Yangtao Li
Signed-off-by: Chanwoo Choi -
of_node_put() needs to be called when the device node which is got
from of_parse_phandle has finished using.Signed-off-by: Yangtao Li
Signed-off-by: Chanwoo Choi
24 Aug, 2019
1 commit
-
Reorder 'i' and 'v' in "drvier".
Signed-off-by: Gaël PORTAY
Reviewed-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham
05 Jun, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms and conditions of the gnu general public license
version 2 as published by the free software foundation this program
is distributed in the hope it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more detailsextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 263 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Alexios Zavras
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.208660670@linutronix.de
Signed-off-by: Greg Kroah-Hartman
16 Apr, 2019
2 commits
-
Trusted Firmware-A (TF-A) for rk3399 implements a SiP call to get the
on-die termination (ODT) and auto power down parameters from kernel,
this patch adds the functionality to do this. Also, if DDR clock
frequency is lower than the on-die termination (ODT) disable frequency
this driver should disable the DDR ODT.Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Chanwoo Choi
Signed-off-by: Gaël PORTAY
Signed-off-by: MyungJoo Ham -
The semicolon is unneeded, so remove it.
Signed-off-by: Yangtao Li
Reviewed-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham
18 Jul, 2018
4 commits
-
The opp table is not removed when the driver is unloaded neither when
there is an error within probe, so if the driver is reloaded the opp
core shows the following warning:rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
200000000, volt: 900000, enabled: 1. New: freq: 200000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
400000000, volt: 900000, enabled: 1. New: freq: 400000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
666000000, volt: 900000, enabled: 1. New: freq: 666000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
800000000, volt: 900000, enabled: 1. New: freq: 800000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
928000000, volt: 900000, enabled: 1. New: freq: 928000000,
volt: 900000, enabled: 1This patch fixes the error path in the probe function and adds a .remove
function to properly cleanup the opp table on unloading.Fixes: 5a893e31a636c (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc)
Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
Fix some spelling mistakes in error and debug messages.
Signed-off-by: Enric Balletbo i Serra
Signed-off-by: MyungJoo Ham -
We just return -EPROBE_DEFER error code to caller and do not
print error message when try to get center logic regulator
and DMC clock defer.Signed-off-by: Lin Huang
Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
We have already wait dcf done in ATF, so don't need wait dcf irq
in kernel, besides, clear dcf irq in kernel will import competiton
between kernel and ATF, only handle dcf irq in ATF is a better way.Signed-off-by: Lin Huang
Signed-off-by: Enric Balletbo i Serra
Reviewed-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham
26 Oct, 2017
1 commit
-
Prior to that, the devfreq device uses the governor name when adding
the itself. In order to prevent the mistake used the wrong governor name,
this patch defines the governor name as a constant and then uses them
instead of using the string directly.Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham
Cc: Kukjin Kim
Cc: Krzysztof Kozlowski
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
06 Jul, 2017
1 commit
-
platform_get_irq() returns an error code, but the rk3399_dmc
driver ignores it and always returns -EINVAL. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly.Notice that platform_get_irq() no longer returns 0 on error:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92afPrint and propagate the return value of platform_get_irq on failure.
Reviewed-by: Chanwoo Choi
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: MyungJoo Ham
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
08 Dec, 2016
2 commits
-
The OPP structures are abused to the best here, without understanding
how the OPP core and RCU locks work.In short, the OPP pointer saved in 'rk3399_dmcfreq' can become invalid
under your nose, as the OPP core may free it.Fix various abuses around OPP structures and calls.
Reviewed-by: Chanwoo Choi
Signed-off-by: Viresh Kumar
Signed-off-by: Rafael J. Wysocki -
This call never had the rcu_read_lock() counterpart. Remove the unlock
part as well.Signed-off-by: Viresh Kumar
Reviewed-by: Chanwoo Choi
Signed-off-by: Rafael J. Wysocki
17 Nov, 2016
2 commits
-
This patch uses the resource-managed to add the devfreq device.
This function will make it easy to handle the devfreq device.- struct devfreq *devm_devfreq_add_device(struct device *dev,
struct devfreq_dev_profile *profile,
const char *governor_name,
void *data);Signed-off-by: Chanwoo Choi
Signed-off-by: MyungJoo Ham -
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/rk3399_dmc.ko | grep alias
$After this patch:
$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
alias: of:N*T*Crockchip,rk3399-dmcC*
alias: of:N*T*Crockchip,rk3399-dmcSigned-off-by: Javier Martinez Canillas
Signed-off-by: MyungJoo Ham
19 Sep, 2016
1 commit
-
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
06 Sep, 2016
1 commit
-
base on dfi result, we do ddr frequency scaling, register
dmc driver to devfreq framework, and use simple-ondemand
policy.Signed-off-by: Lin Huang
Signed-off-by: MyngJoo Ham
Reviewed-by: Chanwoo Choi