Date   

[PATCH 4.4.y-cip 16/23] cpufreq: dt: No need to allocate resources anymore

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit dd02a3d920083b6cb0ee4f0eaf2c599b740bf5fe upstream.

OPP layer manages it now and cpufreq-dt driver doesn't need it. But, we
still need to check for availability of resources for deferred probing.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 112 ++++++++++++++---------------------
1 file changed, 45 insertions(+), 67 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index bbafd7b63d1a2..f951f911786e0 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -31,7 +31,6 @@
=20
struct private_data {
struct device *cpu_dev;
- struct regulator *cpu_reg;
struct thermal_cooling_device *cdev;
const char *reg_name;
};
@@ -88,73 +87,59 @@ node_put:
return name;
}
=20
-static int allocate_resources(int cpu, struct device **cdev,
- struct regulator **creg, struct clk **cclk)
+static int resources_available(void)
{
struct device *cpu_dev;
struct regulator *cpu_reg;
struct clk *cpu_clk;
int ret =3D 0;
- char *reg_cpu0 =3D "cpu0", *reg_cpu =3D "cpu", *reg;
+ const char *name;
=20
- cpu_dev =3D get_cpu_device(cpu);
+ cpu_dev =3D get_cpu_device(0);
if (!cpu_dev) {
- pr_err("failed to get cpu%d device\n", cpu);
+ pr_err("failed to get cpu0 device\n");
return -ENODEV;
}
=20
- /* Try "cpu0" for older DTs */
- if (!cpu)
- reg =3D reg_cpu0;
- else
- reg =3D reg_cpu;
-
-try_again:
- cpu_reg =3D regulator_get_optional(cpu_dev, reg);
- ret =3D PTR_ERR_OR_ZERO(cpu_reg);
+ cpu_clk =3D clk_get(cpu_dev, NULL);
+ ret =3D PTR_ERR_OR_ZERO(cpu_clk);
if (ret) {
/*
- * If cpu's regulator supply node is present, but regulator is
- * not yet registered, we should try defering probe.
+ * If cpu's clk node is present, but clock is not yet
+ * registered, we should try defering probe.
*/
- if (ret =3D=3D -EPROBE_DEFER) {
- dev_dbg(cpu_dev, "cpu%d regulator not ready, retry\n",
- cpu);
- return ret;
- }
-
- /* Try with "cpu-supply" */
- if (reg =3D=3D reg_cpu0) {
- reg =3D reg_cpu;
- goto try_again;
- }
+ if (ret =3D=3D -EPROBE_DEFER)
+ dev_dbg(cpu_dev, "clock not ready, retry\n");
+ else
+ dev_err(cpu_dev, "failed to get clock: %d\n", ret);
=20
- dev_dbg(cpu_dev, "no regulator for cpu%d: %d\n", cpu, ret);
+ return ret;
}
=20
- cpu_clk =3D clk_get(cpu_dev, NULL);
- ret =3D PTR_ERR_OR_ZERO(cpu_clk);
- if (ret) {
- /* put regulator */
- if (!IS_ERR(cpu_reg))
- regulator_put(cpu_reg);
+ clk_put(cpu_clk);
+
+ name =3D find_supply_name(cpu_dev);
+ /* Platform doesn't require regulator */
+ if (!name)
+ return 0;
=20
+ cpu_reg =3D regulator_get_optional(cpu_dev, name);
+ ret =3D PTR_ERR_OR_ZERO(cpu_reg);
+ if (ret) {
/*
- * If cpu's clk node is present, but clock is not yet
- * registered, we should try defering probe.
+ * If cpu's regulator supply node is present, but regulator is
+ * not yet registered, we should try defering probe.
*/
if (ret =3D=3D -EPROBE_DEFER)
- dev_dbg(cpu_dev, "cpu%d clock not ready, retry\n", cpu);
+ dev_dbg(cpu_dev, "cpu0 regulator not ready, retry\n");
else
- dev_err(cpu_dev, "failed to get cpu%d clock: %d\n", cpu,
- ret);
- } else {
- *cdev =3D cpu_dev;
- *creg =3D cpu_reg;
- *cclk =3D cpu_clk;
+ dev_dbg(cpu_dev, "no regulator for cpu0: %d\n", ret);
+
+ return ret;
}
=20
- return ret;
+ regulator_put(cpu_reg);
+ return 0;
}
=20
static int cpufreq_init(struct cpufreq_policy *policy)
@@ -162,7 +147,6 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
struct cpufreq_frequency_table *freq_table;
struct private_data *priv;
struct device *cpu_dev;
- struct regulator *cpu_reg;
struct clk *cpu_clk;
struct dev_pm_opp *suspend_opp;
unsigned int transition_latency;
@@ -170,9 +154,16 @@ static int cpufreq_init(struct cpufreq_policy *polic=
y)
const char *name;
int ret;
=20
- ret =3D allocate_resources(policy->cpu, &cpu_dev, &cpu_reg, &cpu_clk);
- if (ret) {
- pr_err("%s: Failed to allocate resources: %d\n", __func__, ret);
+ cpu_dev =3D get_cpu_device(policy->cpu);
+ if (!cpu_dev) {
+ pr_err("failed to get cpu%d device\n", policy->cpu);
+ return -ENODEV;
+ }
+
+ cpu_clk =3D clk_get(cpu_dev, NULL);
+ if (IS_ERR(cpu_clk)) {
+ ret =3D PTR_ERR(cpu_clk);
+ dev_err(cpu_dev, "%s: failed to get clk: %d\n", __func__, ret);
return ret;
}
=20
@@ -186,7 +177,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
if (ret =3D=3D -ENOENT)
opp_v1 =3D true;
else
- goto out_put_reg_clk;
+ goto out_put_clk;
}
=20
/*
@@ -199,7 +190,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
if (ret) {
dev_err(cpu_dev, "Failed to set regulator for cpu%d: %d\n",
policy->cpu, ret);
- goto out_put_reg_clk;
+ goto out_put_clk;
}
}
=20
@@ -257,9 +248,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
}
=20
priv->cpu_dev =3D cpu_dev;
- priv->cpu_reg =3D cpu_reg;
policy->driver_data =3D priv;
-
policy->clk =3D cpu_clk;
=20
rcu_read_lock();
@@ -300,10 +289,8 @@ out_free_opp:
dev_pm_opp_of_cpumask_remove_table(policy->cpus);
if (name)
dev_pm_opp_put_regulator(cpu_dev);
-out_put_reg_clk:
+out_put_clk:
clk_put(cpu_clk);
- if (!IS_ERR(cpu_reg))
- regulator_put(cpu_reg);
=20
return ret;
}
@@ -319,8 +306,6 @@ static int cpufreq_exit(struct cpufreq_policy *policy=
)
dev_pm_opp_put_regulator(priv->cpu_dev);
=20
clk_put(policy->clk);
- if (!IS_ERR(priv->cpu_reg))
- regulator_put(priv->cpu_reg);
kfree(priv);
=20
return 0;
@@ -373,9 +358,6 @@ static struct cpufreq_driver dt_cpufreq_driver =3D {
=20
static int dt_cpufreq_probe(struct platform_device *pdev)
{
- struct device *cpu_dev;
- struct regulator *cpu_reg;
- struct clk *cpu_clk;
int ret;
=20
/*
@@ -385,19 +367,15 @@ static int dt_cpufreq_probe(struct platform_device =
*pdev)
*
* FIXME: Is checking this only for CPU0 sufficient ?
*/
- ret =3D allocate_resources(0, &cpu_dev, &cpu_reg, &cpu_clk);
+ ret =3D resources_available();
if (ret)
return ret;
=20
- clk_put(cpu_clk);
- if (!IS_ERR(cpu_reg))
- regulator_put(cpu_reg);
-
dt_cpufreq_driver.driver_data =3D dev_get_platdata(&pdev->dev);
=20
ret =3D cpufreq_register_driver(&dt_cpufreq_driver);
if (ret)
- dev_err(cpu_dev, "failed register driver: %d\n", ret);
+ dev_err(&pdev->dev, "failed register driver: %d\n", ret);
=20
return ret;
}
--=20
2.27.0


[PATCH 4.4.y-cip 08/23] cpufreq: dt: Convert few pr_debug/err() calls to dev_dbg/err()

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 896d6a4c0f41a93809b83f9e58aad73874a89d99 upstream.

We have the device structure available now, lets use it for better print
messages.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 0ca74d0700583..ace0168274d4b 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -246,7 +246,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
*/
ret =3D dev_pm_opp_get_opp_count(cpu_dev);
if (ret <=3D 0) {
- pr_debug("OPP table is not ready, deferring probe\n");
+ dev_dbg(cpu_dev, "OPP table is not ready, deferring probe\n");
ret =3D -EPROBE_DEFER;
goto out_free_opp;
}
@@ -325,7 +325,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
=20
ret =3D dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table);
if (ret) {
- pr_err("failed to init cpufreq table: %d\n", ret);
+ dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret);
goto out_free_priv;
}
=20
--=20
2.27.0


[PATCH 4.4.y-cip 14/23] cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 78c3ba5df96c875b1668e1cd3ee0a69e62454f32 upstream.

OPP core supports frequency/voltage changes based on the target
frequency now, use that instead of open coding the same in cpufreq-dt
driver.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 73 +-----------------------------------
1 file changed, 2 insertions(+), 71 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 6f80ce56b4eca..150a172c7d0a7 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -45,79 +45,10 @@ static struct freq_attr *cpufreq_dt_attr[] =3D {
=20
static int set_target(struct cpufreq_policy *policy, unsigned int index)
{
- struct dev_pm_opp *opp;
- struct cpufreq_frequency_table *freq_table =3D policy->freq_table;
- struct clk *cpu_clk =3D policy->clk;
struct private_data *priv =3D policy->driver_data;
- struct device *cpu_dev =3D priv->cpu_dev;
- struct regulator *cpu_reg =3D priv->cpu_reg;
- unsigned long volt =3D 0, tol =3D 0;
- int volt_old =3D 0;
- unsigned int old_freq, new_freq;
- long freq_Hz, freq_exact;
- int ret;
-
- freq_Hz =3D clk_round_rate(cpu_clk, freq_table[index].frequency * 1000)=
;
- if (freq_Hz <=3D 0)
- freq_Hz =3D freq_table[index].frequency * 1000;
-
- freq_exact =3D freq_Hz;
- new_freq =3D freq_Hz / 1000;
- old_freq =3D clk_get_rate(cpu_clk) / 1000;
-
- if (!IS_ERR(cpu_reg)) {
- unsigned long opp_freq;
-
- rcu_read_lock();
- opp =3D dev_pm_opp_find_freq_ceil(cpu_dev, &freq_Hz);
- if (IS_ERR(opp)) {
- rcu_read_unlock();
- dev_err(cpu_dev, "failed to find OPP for %ld\n",
- freq_Hz);
- return PTR_ERR(opp);
- }
- volt =3D dev_pm_opp_get_voltage(opp);
- opp_freq =3D dev_pm_opp_get_freq(opp);
- rcu_read_unlock();
- tol =3D volt * priv->voltage_tolerance / 100;
- volt_old =3D regulator_get_voltage(cpu_reg);
- dev_dbg(cpu_dev, "Found OPP: %ld kHz, %ld uV\n",
- opp_freq / 1000, volt);
- }
-
- dev_dbg(cpu_dev, "%u MHz, %d mV --> %u MHz, %ld mV\n",
- old_freq / 1000, (volt_old > 0) ? volt_old / 1000 : -1,
- new_freq / 1000, volt ? volt / 1000 : -1);
-
- /* scaling up? scale voltage before frequency */
- if (!IS_ERR(cpu_reg) && new_freq > old_freq) {
- ret =3D regulator_set_voltage_tol(cpu_reg, volt, tol);
- if (ret) {
- dev_err(cpu_dev, "failed to scale voltage up: %d\n",
- ret);
- return ret;
- }
- }
-
- ret =3D clk_set_rate(cpu_clk, freq_exact);
- if (ret) {
- dev_err(cpu_dev, "failed to set clock rate: %d\n", ret);
- if (!IS_ERR(cpu_reg) && volt_old > 0)
- regulator_set_voltage_tol(cpu_reg, volt_old, tol);
- return ret;
- }
=20
- /* scaling down? scale voltage after frequency */
- if (!IS_ERR(cpu_reg) && new_freq < old_freq) {
- ret =3D regulator_set_voltage_tol(cpu_reg, volt, tol);
- if (ret) {
- dev_err(cpu_dev, "failed to scale voltage down: %d\n",
- ret);
- clk_set_rate(cpu_clk, old_freq * 1000);
- }
- }
-
- return ret;
+ return dev_pm_opp_set_rate(priv->cpu_dev,
+ policy->freq_table[index].frequency * 1000);
}
=20
/*
--=20
2.27.0


[PATCH 4.4.y-cip 09/23] cpufreq: dt: Rename 'need_update' to 'opp_v1'

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 457e99e60a8f5a40b7da204c0bfc8a86ad2161b9 upstream.

That's the real purpose of this field, i.e. to take special care of old
OPP V1 bindings. Lets name it accordingly, so that it can be used
elsewhere.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index ace0168274d4b..0047d20803db7 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -199,7 +199,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
struct dev_pm_opp *suspend_opp;
unsigned long min_uV =3D ~0, max_uV =3D 0;
unsigned int transition_latency;
- bool need_update =3D false;
+ bool opp_v1 =3D false;
int ret;
=20
ret =3D allocate_resources(policy->cpu, &cpu_dev, &cpu_reg, &cpu_clk);
@@ -223,7 +223,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
* finding shared-OPPs for backward compatibility.
*/
if (ret =3D=3D -ENOENT)
- need_update =3D true;
+ opp_v1 =3D true;
else
goto out_node_put;
}
@@ -251,7 +251,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
goto out_free_opp;
}
=20
- if (need_update) {
+ if (opp_v1) {
struct cpufreq_dt_platform_data *pd =3D cpufreq_get_driver_data();
=20
if (!pd || !pd->independent_clocks)
--=20
2.27.0


[PATCH 4.4.y-cip 13/23] cpufreq: dt: Reuse dev_pm_opp_get_max_transition_latency()

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 755b888ff098c9f762717a9fbda7e05b16619069 upstream.

OPP layer has all the information now to calculate transition latency
(clock_latency + voltage_latency). Lets reuse the OPP layer helper
dev_pm_opp_get_max_transition_latency() instead of open coding the same
in cpufreq-dt driver.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 48 +++---------------------------------
1 file changed, 4 insertions(+), 44 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index c3fe89461ff45..6f80ce56b4eca 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -222,7 +222,6 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
struct regulator *cpu_reg;
struct clk *cpu_clk;
struct dev_pm_opp *suspend_opp;
- unsigned long min_uV =3D ~0, max_uV =3D 0;
unsigned int transition_latency;
bool opp_v1 =3D false;
const char *name;
@@ -316,49 +315,6 @@ static int cpufreq_init(struct cpufreq_policy *polic=
y)
priv->reg_name =3D name;
of_property_read_u32(np, "voltage-tolerance", &priv->voltage_tolerance)=
;
=20
- transition_latency =3D dev_pm_opp_get_max_clock_latency(cpu_dev);
- if (!transition_latency)
- transition_latency =3D CPUFREQ_ETERNAL;
-
- if (!IS_ERR(cpu_reg)) {
- unsigned long opp_freq =3D 0;
-
- /*
- * Disable any OPPs where the connected regulator isn't able to
- * provide the specified voltage and record minimum and maximum
- * voltage levels.
- */
- while (1) {
- struct dev_pm_opp *opp;
- unsigned long opp_uV, tol_uV;
-
- rcu_read_lock();
- opp =3D dev_pm_opp_find_freq_ceil(cpu_dev, &opp_freq);
- if (IS_ERR(opp)) {
- rcu_read_unlock();
- break;
- }
- opp_uV =3D dev_pm_opp_get_voltage(opp);
- rcu_read_unlock();
-
- tol_uV =3D opp_uV * priv->voltage_tolerance / 100;
- if (regulator_is_supported_voltage(cpu_reg,
- opp_uV - tol_uV,
- opp_uV + tol_uV)) {
- if (opp_uV < min_uV)
- min_uV =3D opp_uV;
- if (opp_uV > max_uV)
- max_uV =3D opp_uV;
- }
-
- opp_freq++;
- }
-
- ret =3D regulator_set_voltage_time(cpu_reg, min_uV, max_uV);
- if (ret > 0)
- transition_latency +=3D ret * 1000;
- }
-
ret =3D dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table);
if (ret) {
dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret);
@@ -393,6 +349,10 @@ static int cpufreq_init(struct cpufreq_policy *polic=
y)
cpufreq_dt_attr[1] =3D &cpufreq_freq_attr_scaling_boost_freqs;
}
=20
+ transition_latency =3D dev_pm_opp_get_max_transition_latency(cpu_dev);
+ if (!transition_latency)
+ transition_latency =3D CPUFREQ_ETERNAL;
+
policy->cpuinfo.transition_latency =3D transition_latency;
=20
of_node_put(np);
--=20
2.27.0


[PATCH 4.4.y-cip 10/23] cpufreq: dt: OPP layers handles clock-latency for V1 bindings as well

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 391d9aef8145204e0a5d67be3bd1fc45c5396dae upstream.

"clock-latency" is handled by OPP layer for all bindings and so there is
no need to make special calls for V1 bindings. Use
dev_pm_opp_get_max_clock_latency() for both the cases.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 0047d20803db7..4c9f8a828f6f1 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -265,10 +265,6 @@ static int cpufreq_init(struct cpufreq_policy *polic=
y)
if (ret)
dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n",
__func__, ret);
-
- of_property_read_u32(np, "clock-latency", &transition_latency);
- } else {
- transition_latency =3D dev_pm_opp_get_max_clock_latency(cpu_dev);
}
=20
priv =3D kzalloc(sizeof(*priv), GFP_KERNEL);
@@ -279,6 +275,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
=20
of_property_read_u32(np, "voltage-tolerance", &priv->voltage_tolerance)=
;
=20
+ transition_latency =3D dev_pm_opp_get_max_clock_latency(cpu_dev);
if (!transition_latency)
transition_latency =3D CPUFREQ_ETERNAL;
=20
--=20
2.27.0


[PATCH 4.4.y-cip 11/23] cpufreq: dt: Pass regulator name to the OPP core

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 050794aaebbb9f2c2c50b340b6998273e7c64189 upstream.

OPP core can handle the regulators by itself, and but it needs to know
the name of the regulator to fetch. Add support for that.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 46 ++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 4c9f8a828f6f1..2af75f8088bbb 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -34,6 +34,7 @@ struct private_data {
struct regulator *cpu_reg;
struct thermal_cooling_device *cdev;
unsigned int voltage_tolerance; /* in percentage */
+ const char *reg_name;
};
=20
static struct freq_attr *cpufreq_dt_attr[] =3D {
@@ -119,6 +120,30 @@ static int set_target(struct cpufreq_policy *policy,=
unsigned int index)
return ret;
}
=20
+/*
+ * An earlier version of opp-v1 bindings used to name the regulator
+ * "cpu0-supply", we still need to handle that for backwards compatibili=
ty.
+ */
+static const char *find_supply_name(struct device *dev, struct device_no=
de *np)
+{
+ struct property *pp;
+ int cpu =3D dev->id;
+
+ /* Try "cpu0" for older DTs */
+ if (!cpu) {
+ pp =3D of_find_property(np, "cpu0-supply", NULL);
+ if (pp)
+ return "cpu0";
+ }
+
+ pp =3D of_find_property(np, "cpu-supply", NULL);
+ if (pp)
+ return "cpu";
+
+ dev_dbg(dev, "no regulator for cpu%d\n", cpu);
+ return NULL;
+}
+
static int allocate_resources(int cpu, struct device **cdev,
struct regulator **creg, struct clk **cclk)
{
@@ -200,6 +225,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
unsigned long min_uV =3D ~0, max_uV =3D 0;
unsigned int transition_latency;
bool opp_v1 =3D false;
+ const char *name;
int ret;
=20
ret =3D allocate_resources(policy->cpu, &cpu_dev, &cpu_reg, &cpu_clk);
@@ -228,6 +254,20 @@ static int cpufreq_init(struct cpufreq_policy *polic=
y)
goto out_node_put;
}
=20
+ /*
+ * OPP layer will be taking care of regulators now, but it needs to kno=
w
+ * the name of the regulator first.
+ */
+ name =3D find_supply_name(cpu_dev, np);
+ if (name) {
+ ret =3D dev_pm_opp_set_regulator(cpu_dev, name);
+ if (ret) {
+ dev_err(cpu_dev, "Failed to set regulator for cpu%d: %d\n",
+ policy->cpu, ret);
+ goto out_node_put;
+ }
+ }
+
/*
* Initialize OPP tables for all policy->cpus. They will be shared by
* all CPUs which have marked their CPUs shared with OPP bindings.
@@ -273,6 +313,7 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
goto out_free_opp;
}
=20
+ priv->reg_name =3D name;
of_property_read_u32(np, "voltage-tolerance", &priv->voltage_tolerance)=
;
=20
transition_latency =3D dev_pm_opp_get_max_clock_latency(cpu_dev);
@@ -366,6 +407,8 @@ out_free_priv:
kfree(priv);
out_free_opp:
dev_pm_opp_of_cpumask_remove_table(policy->cpus);
+ if (name)
+ dev_pm_opp_put_regulator(cpu_dev);
out_node_put:
of_node_put(np);
out_put_reg_clk:
@@ -383,6 +426,9 @@ static int cpufreq_exit(struct cpufreq_policy *policy=
)
cpufreq_cooling_unregister(priv->cdev);
dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table);
dev_pm_opp_of_cpumask_remove_table(policy->related_cpus);
+ if (priv->reg_name)
+ dev_pm_opp_put_regulator(priv->cpu_dev);
+
clk_put(policy->clk);
if (!IS_ERR(priv->cpu_reg))
regulator_put(priv->cpu_reg);
--=20
2.27.0


[PATCH 4.4.y-cip 12/23] cpufreq: dt: Unsupported OPPs are already disabled

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 6def6ea75e6dea45f01a16ae3cfb5b5ce48dd5e9 upstream.

The core already have a valid regulator set for the device opp and the
unsupported OPPs are already disabled by the core. There is no need to
repeat that in the user drivers, get rid of it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/cpufreq/cpufreq-dt.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 2af75f8088bbb..c3fe89461ff45 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -349,8 +349,6 @@ static int cpufreq_init(struct cpufreq_policy *policy=
)
min_uV =3D opp_uV;
if (opp_uV > max_uV)
max_uV =3D opp_uV;
- } else {
- dev_pm_opp_disable(cpu_dev, opp_freq);
}
=20
opp_freq++;
--=20
2.27.0


[PATCH 4.4.y-cip 06/23] PM / OPP: Manage device clk

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit d54974c2513f487e9e70fbdc79c5da51c53e23da upstream.

OPP core has got almost everything now to manage device's OPP
transitions, the only thing left is device's clk. Get that as well.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/base/power/opp/core.c | 15 +++++++++++++++
drivers/base/power/opp/opp.h | 3 +++
2 files changed, 18 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.=
c
index e1f214fc75555..4fd3a59060e30 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -13,6 +13,7 @@
=20
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
=20
+#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/slab.h>
@@ -583,6 +584,7 @@ static struct device_opp *_add_device_opp(struct devi=
ce *dev)
struct device_opp *dev_opp;
struct device_list_opp *list_dev;
struct device_node *np;
+ int ret;
=20
/* Check for existing list for 'dev' first */
dev_opp =3D _find_device_opp(dev);
@@ -620,6 +622,15 @@ static struct device_opp *_add_device_opp(struct dev=
ice *dev)
of_node_put(np);
}
=20
+ /* Find clk for the device */
+ dev_opp->clk =3D clk_get(dev, NULL);
+ if (IS_ERR(dev_opp->clk)) {
+ ret =3D PTR_ERR(dev_opp->clk);
+ if (ret !=3D -EPROBE_DEFER)
+ dev_dbg(dev, "%s: Couldn't find clock: %d\n", __func__,
+ ret);
+ }
+
srcu_init_notifier_head(&dev_opp->srcu_head);
INIT_LIST_HEAD(&dev_opp->opp_list);
=20
@@ -661,6 +672,10 @@ static void _remove_device_opp(struct device_opp *de=
v_opp)
if (!IS_ERR_OR_NULL(dev_opp->regulator))
return;
=20
+ /* Release clk */
+ if (!IS_ERR(dev_opp->clk))
+ clk_put(dev_opp->clk);
+
list_dev =3D list_first_entry(&dev_opp->dev_list, struct device_list_op=
p,
node);
=20
diff --git a/drivers/base/power/opp/opp.h b/drivers/base/power/opp/opp.h
index fe44beb404ba2..4f1bdfc7da03b 100644
--- a/drivers/base/power/opp/opp.h
+++ b/drivers/base/power/opp/opp.h
@@ -22,6 +22,7 @@
#include <linux/rculist.h>
#include <linux/rcupdate.h>
=20
+struct clk;
struct regulator;
=20
/* Lock to allow exclusive modification to the device and opp lists */
@@ -134,6 +135,7 @@ struct device_list_opp {
* @supported_hw: Array of version number to support.
* @supported_hw_count: Number of elements in supported_hw array.
* @prop_name: A name to postfix to many DT properties, while parsing th=
em.
+ * @clk: Device's clock handle
* @regulator: Supply regulator
* @dentry: debugfs dentry pointer of the real device directory (not lin=
ks).
* @dentry_name: Name of the real dentry.
@@ -168,6 +170,7 @@ struct device_opp {
unsigned int *supported_hw;
unsigned int supported_hw_count;
const char *prop_name;
+ struct clk *clk;
struct regulator *regulator;
=20
#ifdef CONFIG_DEBUG_FS
--=20
2.27.0


[PATCH 4.4.y-cip 07/23] PM / OPP: Add dev_pm_opp_set_rate()

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 6a0712f6f199e737aa5913d28ec4bd3a25de9660 upstream.

This adds a routine, dev_pm_opp_set_rate(), responsible for configuring
power-supply and clock source for an OPP.

The OPP is found by matching against the target_freq passed to the
routine. This shall replace similar code present in most of the OPP
users and help simplify them a lot.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/base/power/opp/core.c | 176 ++++++++++++++++++++++++++++++++++
include/linux/pm_opp.h | 6 ++
2 files changed, 182 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.=
c
index 4fd3a59060e30..91b4cc261d84a 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -529,6 +529,182 @@ struct dev_pm_opp *dev_pm_opp_find_freq_floor(struc=
t device *dev,
}
EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_floor);
=20
+/*
+ * The caller needs to ensure that device_opp (and hence the clk) isn't =
freed,
+ * while clk returned here is used.
+ */
+static struct clk *_get_opp_clk(struct device *dev)
+{
+ struct device_opp *dev_opp;
+ struct clk *clk;
+
+ rcu_read_lock();
+
+ dev_opp =3D _find_device_opp(dev);
+ if (IS_ERR(dev_opp)) {
+ dev_err(dev, "%s: device opp doesn't exist\n", __func__);
+ clk =3D ERR_CAST(dev_opp);
+ goto unlock;
+ }
+
+ clk =3D dev_opp->clk;
+ if (IS_ERR(clk))
+ dev_err(dev, "%s: No clock available for the device\n",
+ __func__);
+
+unlock:
+ rcu_read_unlock();
+ return clk;
+}
+
+static int _set_opp_voltage(struct device *dev, struct regulator *reg,
+ unsigned long u_volt, unsigned long u_volt_min,
+ unsigned long u_volt_max)
+{
+ int ret;
+
+ /* Regulator not available for device */
+ if (IS_ERR(reg)) {
+ dev_dbg(dev, "%s: regulator not available: %ld\n", __func__,
+ PTR_ERR(reg));
+ return 0;
+ }
+
+ dev_dbg(dev, "%s: voltages (mV): %lu %lu %lu\n", __func__, u_volt_min,
+ u_volt, u_volt_max);
+
+ ret =3D regulator_set_voltage_triplet(reg, u_volt_min, u_volt,
+ u_volt_max);
+ if (ret)
+ dev_err(dev, "%s: failed to set voltage (%lu %lu %lu mV): %d\n",
+ __func__, u_volt_min, u_volt, u_volt_max, ret);
+
+ return ret;
+}
+
+/**
+ * dev_pm_opp_set_rate() - Configure new OPP based on frequency
+ * @dev: device for which we do this operation
+ * @target_freq: frequency to achieve
+ *
+ * This configures the power-supplies and clock source to the levels spe=
cified
+ * by the OPP corresponding to the target_freq.
+ *
+ * Locking: This function takes rcu_read_lock().
+ */
+int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
+{
+ struct device_opp *dev_opp;
+ struct dev_pm_opp *old_opp, *opp;
+ struct regulator *reg;
+ struct clk *clk;
+ unsigned long freq, old_freq;
+ unsigned long u_volt, u_volt_min, u_volt_max;
+ unsigned long ou_volt, ou_volt_min, ou_volt_max;
+ int ret;
+
+ if (unlikely(!target_freq)) {
+ dev_err(dev, "%s: Invalid target frequency %lu\n", __func__,
+ target_freq);
+ return -EINVAL;
+ }
+
+ clk =3D _get_opp_clk(dev);
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
+
+ freq =3D clk_round_rate(clk, target_freq);
+ if ((long)freq <=3D 0)
+ freq =3D target_freq;
+
+ old_freq =3D clk_get_rate(clk);
+
+ /* Return early if nothing to do */
+ if (old_freq =3D=3D freq) {
+ dev_dbg(dev, "%s: old/new frequencies (%lu Hz) are same, nothing to do=
\n",
+ __func__, freq);
+ return 0;
+ }
+
+ rcu_read_lock();
+
+ dev_opp =3D _find_device_opp(dev);
+ if (IS_ERR(dev_opp)) {
+ dev_err(dev, "%s: device opp doesn't exist\n", __func__);
+ rcu_read_unlock();
+ return PTR_ERR(dev_opp);
+ }
+
+ old_opp =3D dev_pm_opp_find_freq_ceil(dev, &old_freq);
+ if (!IS_ERR(old_opp)) {
+ ou_volt =3D old_opp->u_volt;
+ ou_volt_min =3D old_opp->u_volt_min;
+ ou_volt_max =3D old_opp->u_volt_max;
+ } else {
+ dev_err(dev, "%s: failed to find current OPP for freq %lu (%ld)\n",
+ __func__, old_freq, PTR_ERR(old_opp));
+ }
+
+ opp =3D dev_pm_opp_find_freq_ceil(dev, &freq);
+ if (IS_ERR(opp)) {
+ ret =3D PTR_ERR(opp);
+ dev_err(dev, "%s: failed to find OPP for freq %lu (%d)\n",
+ __func__, freq, ret);
+ rcu_read_unlock();
+ return ret;
+ }
+
+ u_volt =3D opp->u_volt;
+ u_volt_min =3D opp->u_volt_min;
+ u_volt_max =3D opp->u_volt_max;
+
+ reg =3D dev_opp->regulator;
+
+ rcu_read_unlock();
+
+ /* Scaling up? Scale voltage before frequency */
+ if (freq > old_freq) {
+ ret =3D _set_opp_voltage(dev, reg, u_volt, u_volt_min,
+ u_volt_max);
+ if (ret)
+ goto restore_voltage;
+ }
+
+ /* Change frequency */
+
+ dev_dbg(dev, "%s: switching OPP: %lu Hz --> %lu Hz\n",
+ __func__, old_freq, freq);
+
+ ret =3D clk_set_rate(clk, freq);
+ if (ret) {
+ dev_err(dev, "%s: failed to set clock rate: %d\n", __func__,
+ ret);
+ goto restore_voltage;
+ }
+
+ /* Scaling down? Scale voltage after frequency */
+ if (freq < old_freq) {
+ ret =3D _set_opp_voltage(dev, reg, u_volt, u_volt_min,
+ u_volt_max);
+ if (ret)
+ goto restore_freq;
+ }
+
+ return 0;
+
+restore_freq:
+ if (clk_set_rate(clk, old_freq))
+ dev_err(dev, "%s: failed to restore old-freq (%lu Hz)\n",
+ __func__, old_freq);
+restore_voltage:
+ /* This shouldn't harm even if the voltages weren't updated earlier */
+ if (!IS_ERR(old_opp))
+ _set_opp_voltage(dev, reg, ou_volt, ou_volt_min, ou_volt_max);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_set_rate);
+
/* List-dev Helpers */
static void _kfree_list_dev_rcu(struct rcu_head *head)
{
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 59da3d9e11ea3..cccaf4a29e9f0 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -64,6 +64,7 @@ int dev_pm_opp_set_prop_name(struct device *dev, const =
char *name);
void dev_pm_opp_put_prop_name(struct device *dev);
int dev_pm_opp_set_regulator(struct device *dev, const char *name);
void dev_pm_opp_put_regulator(struct device *dev);
+int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq);
#else
static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *op=
p)
{
@@ -172,6 +173,11 @@ static inline int dev_pm_opp_set_regulator(struct de=
vice *dev, const char *name)
=20
static inline void dev_pm_opp_put_regulator(struct device *dev) {}
=20
+static inline int dev_pm_opp_set_rate(struct device *dev, unsigned long =
target_freq)
+{
+ return -EINVAL;
+}
+
#endif /* CONFIG_PM_OPP */
=20
#if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
--=20
2.27.0


[PATCH 4.4.y-cip 05/23] PM / OPP: Parse clock-latency and voltage-tolerance for v1 bindings

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 50f8cfbd5897ca182d43f4caf19937153f17a604 uptream.

V2 bindings have better support for clock-latency and voltage-tolerance
and doesn't need special care. To use callbacks, like
dev_pm_opp_get_max_{transition|volt}_latency(), irrespective of the
bindings, the core needs to know clock-latency/voltage-tolerance for the
earlier bindings.

This patch reads clock-latency/voltage-tolerance from the device node,
irrespective of the bindings (to keep it simple) and use them only for
V1 bindings.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/base/power/opp/core.c | 20 ++++++++++++++++++++
drivers/base/power/opp/opp.h | 6 ++++++
2 files changed, 26 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.=
c
index d51ddcebcca00..e1f214fc75555 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -582,6 +582,7 @@ static struct device_opp *_add_device_opp(struct devi=
ce *dev)
{
struct device_opp *dev_opp;
struct device_list_opp *list_dev;
+ struct device_node *np;
=20
/* Check for existing list for 'dev' first */
dev_opp =3D _find_device_opp(dev);
@@ -604,6 +605,21 @@ static struct device_opp *_add_device_opp(struct dev=
ice *dev)
return NULL;
}
=20
+ /*
+ * Only required for backward compatibility with v1 bindings, but isn't
+ * harmful for other cases. And so we do it unconditionally.
+ */
+ np =3D of_node_get(dev->of_node);
+ if (np) {
+ u32 val;
+
+ if (!of_property_read_u32(np, "clock-latency", &val))
+ dev_opp->clock_latency_ns_max =3D val;
+ of_property_read_u32(np, "voltage-tolerance",
+ &dev_opp->voltage_tolerance_v1);
+ of_node_put(np);
+ }
+
srcu_init_notifier_head(&dev_opp->srcu_head);
INIT_LIST_HEAD(&dev_opp->opp_list);
=20
@@ -861,6 +877,7 @@ static int _opp_add_v1(struct device *dev, unsigned l=
ong freq, long u_volt,
{
struct device_opp *dev_opp;
struct dev_pm_opp *new_opp;
+ unsigned long tol;
int ret;
=20
/* Hold our list modification lock here */
@@ -874,7 +891,10 @@ static int _opp_add_v1(struct device *dev, unsigned =
long freq, long u_volt,
=20
/* populate the opp table */
new_opp->rate =3D freq;
+ tol =3D u_volt * dev_opp->voltage_tolerance_v1 / 100;
new_opp->u_volt =3D u_volt;
+ new_opp->u_volt_min =3D u_volt - tol;
+ new_opp->u_volt_max =3D u_volt + tol;
new_opp->available =3D true;
new_opp->dynamic =3D dynamic;
=20
diff --git a/drivers/base/power/opp/opp.h b/drivers/base/power/opp/opp.h
index 416293b7da237..fe44beb404ba2 100644
--- a/drivers/base/power/opp/opp.h
+++ b/drivers/base/power/opp/opp.h
@@ -138,6 +138,8 @@ struct device_list_opp {
* @dentry: debugfs dentry pointer of the real device directory (not lin=
ks).
* @dentry_name: Name of the real dentry.
*
+ * @voltage_tolerance_v1: In percentage, for v1 bindings only.
+ *
* This is an internal data structure maintaining the link to opps attac=
hed to
* a device. This structure is not meant to be shared to users as it is
* meant for book keeping and private to OPP library.
@@ -156,6 +158,10 @@ struct device_opp {
=20
struct device_node *np;
unsigned long clock_latency_ns_max;
+
+ /* For backward compatibility with v1 bindings */
+ unsigned int voltage_tolerance_v1;
+
bool shared_opp;
struct dev_pm_opp *suspend_opp;
=20
--=20
2.27.0


[PATCH 4.4.y-cip 00/23] PM / OPP v2 & cpufreq backports part 2

Chen-Yu Tsai (Moxa) <wens@...>
 

Hi everyone,

This is part 2 of MOXA's PM / OPP / cpufreq backport series. The whole
series aims to backport patches related to PM / OPPv2 and cpufreq
which were included in the v4.4 kernel from TI's SDK. The end goal is
to include cpufreq-ti and convert am33xx to using it and OPPv2.

Part 2 here includes patches from the v4.6 cycle, as well as additional
fixed found through Fixes tags:

9f8ea969d5cf PM / OPP: get/put regulators from OPP core
7d34d56ef334 PM / OPP: Disable OPPs that aren't supported by the regu=
lator
655c9df96175 PM / OPP: Introduce dev_pm_opp_get_max_volt_latency()
2174344765f4 PM / OPP: Introduce dev_pm_opp_get_max_transition_latenc=
y()
50f8cfbd5897 PM / OPP: Parse clock-latency and voltage-tolerance for =
v1 bindings
d54974c2513f PM / OPP: Manage device clk
6a0712f6f199 PM / OPP: Add dev_pm_opp_set_rate()
896d6a4c0f41 cpufreq: dt: Convert few pr_debug/err() calls to dev_dbg=
/err()
457e99e60a8f cpufreq: dt: Rename 'need_update' to 'opp_v1'
391d9aef8145 cpufreq: dt: OPP layers handles clock-latency for V1 bin=
dings as well
050794aaebbb cpufreq: dt: Pass regulator name to the OPP core
6def6ea75e6d cpufreq: dt: Unsupported OPPs are already disabled
755b888ff098 cpufreq: dt: Reuse dev_pm_opp_get_max_transition_latency=
()
78c3ba5df96c cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequen=
cy
df2c8ec28e73 cpufreq: dt: No need to fetch voltage-tolerance
dd02a3d92008 cpufreq: dt: No need to allocate resources anymore
78ecc56247f0 PM / OPP: Fix NULL pointer dereference crash when disabl=
ing OPPs
0c717d0f9cb4 PM / OPP: Initialize regulator pointer to an error value
a5da64477ee7 PM / OPP: Fix incorrect comments
2c2709dc6921 PM / OPP: Rename structures for clarity
b318556479cc cpufreq: dt: Drop stale comment
21f8a99ce61b PM / OPP: Remove useless check
c5c2a97b3ac7 PM / OPP: Update voltage in case freq =3D=3D old_freq

Of these,

b318556479cc cpufreq: dt: Drop stale comment

was found while looking through git logs.

21f8a99ce61b PM / OPP: Remove useless check
c5c2a97b3ac7 PM / OPP: Update voltage in case freq =3D=3D old_freq

were found by looking for commit hashes in Fixes tags.
All other patches were included from TI's SDK.

The patches apply cleanly on top of linux-4.4.y-cip. The last patch
involved some backporting due to path and code changes between v4.6
and v4.18.

Please have a look.


Regards
ChenYu


Jon Hunter (1):
PM / OPP: Fix NULL pointer dereference crash when disabling OPPs

Viresh Kumar (21):
PM / OPP: get/put regulators from OPP core
PM / OPP: Disable OPPs that aren't supported by the regulator
PM / OPP: Introduce dev_pm_opp_get_max_volt_latency()
PM / OPP: Introduce dev_pm_opp_get_max_transition_latency()
PM / OPP: Parse clock-latency and voltage-tolerance for v1 bindings
PM / OPP: Manage device clk
PM / OPP: Add dev_pm_opp_set_rate()
cpufreq: dt: Convert few pr_debug/err() calls to dev_dbg/err()
cpufreq: dt: Rename 'need_update' to 'opp_v1'
cpufreq: dt: OPP layers handles clock-latency for V1 bindings as well
cpufreq: dt: Pass regulator name to the OPP core
cpufreq: dt: Unsupported OPPs are already disabled
cpufreq: dt: Reuse dev_pm_opp_get_max_transition_latency()
cpufreq: dt: Use dev_pm_opp_set_rate() to switch frequency
cpufreq: dt: No need to fetch voltage-tolerance
cpufreq: dt: No need to allocate resources anymore
PM / OPP: Initialize regulator pointer to an error value
PM / OPP: Fix incorrect comments
PM / OPP: Rename structures for clarity
cpufreq: dt: Drop stale comment
PM / OPP: Remove useless check

Waldemar Rymarkiewicz (1):
PM / OPP: Update voltage in case freq =3D=3D old_freq

drivers/base/power/opp/core.c | 1066 +++++++++++++++++++++---------
drivers/base/power/opp/cpu.c | 22 +-
drivers/base/power/opp/debugfs.c | 85 ++-
drivers/base/power/opp/opp.h | 74 ++-
drivers/cpufreq/cpufreq-dt.c | 303 +++------
include/linux/pm_opp.h | 27 +
6 files changed, 973 insertions(+), 604 deletions(-)

--=20
2.27.0


[PATCH 4.4.y-cip 02/23] PM / OPP: Disable OPPs that aren't supported by the regulator

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 7d34d56ef3349cd5f29cf7aab6650f3414fa81b9 upstream.

Disable any OPPs where the connected regulator isn't able to provide the
specified voltage.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/base/power/opp/core.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.=
c
index efdfcee48cac7..48ec88befffc9 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -687,6 +687,22 @@ static struct dev_pm_opp *_allocate_opp(struct devic=
e *dev,
return opp;
}
=20
+static bool _opp_supported_by_regulators(struct dev_pm_opp *opp,
+ struct device_opp *dev_opp)
+{
+ struct regulator *reg =3D dev_opp->regulator;
+
+ if (!IS_ERR(reg) &&
+ !regulator_is_supported_voltage(reg, opp->u_volt_min,
+ opp->u_volt_max)) {
+ pr_warn("%s: OPP minuV: %lu maxuV: %lu, not supported by regulator\n",
+ __func__, opp->u_volt_min, opp->u_volt_max);
+ return false;
+ }
+
+ return true;
+}
+
static int _opp_add(struct device *dev, struct dev_pm_opp *new_opp,
struct device_opp *dev_opp)
{
@@ -728,6 +744,12 @@ static int _opp_add(struct device *dev, struct dev_p=
m_opp *new_opp,
dev_err(dev, "%s: Failed to register opp to debugfs (%d)\n",
__func__, ret);
=20
+ if (!_opp_supported_by_regulators(new_opp, dev_opp)) {
+ new_opp->available =3D false;
+ dev_warn(dev, "%s: OPP not supported by regulators (%lu)\n",
+ __func__, new_opp->rate);
+ }
+
return 0;
}
=20
--=20
2.27.0


[PATCH 4.4.y-cip 04/23] PM / OPP: Introduce dev_pm_opp_get_max_transition_latency()

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 2174344765f472895c076d703c9cdc58215e1393 upstream.

In few use cases (like: cpufreq), it is desired to get the maximum
latency for changing OPPs. Add support for that.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/base/power/opp/core.c | 17 +++++++++++++++++
include/linux/pm_opp.h | 6 ++++++
2 files changed, 23 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.=
c
index 09165fbef84ed..d51ddcebcca00 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -289,6 +289,23 @@ unsigned long dev_pm_opp_get_max_volt_latency(struct=
device *dev)
}
EXPORT_SYMBOL_GPL(dev_pm_opp_get_max_volt_latency);
=20
+/**
+ * dev_pm_opp_get_max_transition_latency() - Get max transition latency =
in
+ * nanoseconds
+ * @dev: device for which we do this operation
+ *
+ * Return: This function returns the max transition latency, in nanoseco=
nds, to
+ * switch from one OPP to other.
+ *
+ * Locking: This function takes rcu_read_lock().
+ */
+unsigned long dev_pm_opp_get_max_transition_latency(struct device *dev)
+{
+ return dev_pm_opp_get_max_volt_latency(dev) +
+ dev_pm_opp_get_max_clock_latency(dev);
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_get_max_transition_latency);
+
/**
* dev_pm_opp_get_suspend_opp() - Get suspend opp
* @dev: device for which we do this operation
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 5daa43058ac10..59da3d9e11ea3 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -35,6 +35,7 @@ bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
int dev_pm_opp_get_opp_count(struct device *dev);
unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev);
unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev);
+unsigned long dev_pm_opp_get_max_transition_latency(struct device *dev);
struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct device *dev);
=20
struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
@@ -94,6 +95,11 @@ static inline unsigned long dev_pm_opp_get_max_volt_la=
tency(struct device *dev)
return 0;
}
=20
+static inline unsigned long dev_pm_opp_get_max_transition_latency(struct=
device *dev)
+{
+ return 0;
+}
+
static inline struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct devic=
e *dev)
{
return NULL;
--=20
2.27.0


[PATCH 4.4.y-cip 01/23] PM / OPP: get/put regulators from OPP core

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 9f8ea969d5cfdd4353d2adb004e8e2286b984369 upstream.

This allows the OPP core to request/free the regulator resource,
attached to a device OPP. The regulator device is fetched using the name
provided by the driver, while calling: dev_pm_opp_set_regulator().

This will work for both OPP-v1 and v2 bindings.

This is a preliminary step for moving the OPP switching logic into the
OPP core.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/base/power/opp/core.c | 111 ++++++++++++++++++++++++++++++++++
drivers/base/power/opp/opp.h | 4 ++
include/linux/pm_opp.h | 9 +++
3 files changed, 124 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.=
c
index 1e0a2ddf73323..efdfcee48cac7 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -19,6 +19,7 @@
#include <linux/device.h>
#include <linux/of.h>
#include <linux/export.h>
+#include <linux/regulator/consumer.h>
=20
#include "opp.h"
=20
@@ -565,6 +566,9 @@ static void _remove_device_opp(struct device_opp *dev=
_opp)
if (dev_opp->prop_name)
return;
=20
+ if (!IS_ERR_OR_NULL(dev_opp->regulator))
+ return;
+
list_dev =3D list_first_entry(&dev_opp->dev_list, struct device_list_op=
p,
node);
=20
@@ -1091,6 +1095,113 @@ unlock:
}
EXPORT_SYMBOL_GPL(dev_pm_opp_put_prop_name);
=20
+/**
+ * dev_pm_opp_set_regulator() - Set regulator name for the device
+ * @dev: Device for which regulator name is being set.
+ * @name: Name of the regulator.
+ *
+ * In order to support OPP switching, OPP layer needs to know the name o=
f the
+ * device's regulator, as the core would be required to switch voltages =
as well.
+ *
+ * This must be called before any OPPs are initialized for the device.
+ *
+ * Locking: The internal device_opp and opp structures are RCU protected=
.
+ * Hence this function internally uses RCU updater strategy with mutex l=
ocks
+ * to keep the integrity of the internal data structures. Callers should=
ensure
+ * that this function is *NOT* called under RCU protection or in context=
s where
+ * mutex cannot be locked.
+ */
+int dev_pm_opp_set_regulator(struct device *dev, const char *name)
+{
+ struct device_opp *dev_opp;
+ struct regulator *reg;
+ int ret;
+
+ mutex_lock(&dev_opp_list_lock);
+
+ dev_opp =3D _add_device_opp(dev);
+ if (!dev_opp) {
+ ret =3D -ENOMEM;
+ goto unlock;
+ }
+
+ /* This should be called before OPPs are initialized */
+ if (WARN_ON(!list_empty(&dev_opp->opp_list))) {
+ ret =3D -EBUSY;
+ goto err;
+ }
+
+ /* Already have a regulator set */
+ if (WARN_ON(!IS_ERR_OR_NULL(dev_opp->regulator))) {
+ ret =3D -EBUSY;
+ goto err;
+ }
+ /* Allocate the regulator */
+ reg =3D regulator_get_optional(dev, name);
+ if (IS_ERR(reg)) {
+ ret =3D PTR_ERR(reg);
+ if (ret !=3D -EPROBE_DEFER)
+ dev_err(dev, "%s: no regulator (%s) found: %d\n",
+ __func__, name, ret);
+ goto err;
+ }
+
+ dev_opp->regulator =3D reg;
+
+ mutex_unlock(&dev_opp_list_lock);
+ return 0;
+
+err:
+ _remove_device_opp(dev_opp);
+unlock:
+ mutex_unlock(&dev_opp_list_lock);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_set_regulator);
+
+/**
+ * dev_pm_opp_put_regulator() - Releases resources blocked for regulator
+ * @dev: Device for which regulator was set.
+ *
+ * Locking: The internal device_opp and opp structures are RCU protected=
.
+ * Hence this function internally uses RCU updater strategy with mutex l=
ocks
+ * to keep the integrity of the internal data structures. Callers should=
ensure
+ * that this function is *NOT* called under RCU protection or in context=
s where
+ * mutex cannot be locked.
+ */
+void dev_pm_opp_put_regulator(struct device *dev)
+{
+ struct device_opp *dev_opp;
+
+ mutex_lock(&dev_opp_list_lock);
+
+ /* Check for existing list for 'dev' first */
+ dev_opp =3D _find_device_opp(dev);
+ if (IS_ERR(dev_opp)) {
+ dev_err(dev, "Failed to find dev_opp: %ld\n", PTR_ERR(dev_opp));
+ goto unlock;
+ }
+
+ if (IS_ERR_OR_NULL(dev_opp->regulator)) {
+ dev_err(dev, "%s: Doesn't have regulator set\n", __func__);
+ goto unlock;
+ }
+
+ /* Make sure there are no concurrent readers while updating dev_opp */
+ WARN_ON(!list_empty(&dev_opp->opp_list));
+
+ regulator_put(dev_opp->regulator);
+ dev_opp->regulator =3D ERR_PTR(-EINVAL);
+
+ /* Try freeing device_opp if this was the last blocking resource */
+ _remove_device_opp(dev_opp);
+
+unlock:
+ mutex_unlock(&dev_opp_list_lock);
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_put_regulator);
+
static bool _opp_is_supported(struct device *dev, struct device_opp *dev=
_opp,
struct device_node *np)
{
diff --git a/drivers/base/power/opp/opp.h b/drivers/base/power/opp/opp.h
index 690638ef36ee5..416293b7da237 100644
--- a/drivers/base/power/opp/opp.h
+++ b/drivers/base/power/opp/opp.h
@@ -22,6 +22,8 @@
#include <linux/rculist.h>
#include <linux/rcupdate.h>
=20
+struct regulator;
+
/* Lock to allow exclusive modification to the device and opp lists */
extern struct mutex dev_opp_list_lock;
=20
@@ -132,6 +134,7 @@ struct device_list_opp {
* @supported_hw: Array of version number to support.
* @supported_hw_count: Number of elements in supported_hw array.
* @prop_name: A name to postfix to many DT properties, while parsing th=
em.
+ * @regulator: Supply regulator
* @dentry: debugfs dentry pointer of the real device directory (not lin=
ks).
* @dentry_name: Name of the real dentry.
*
@@ -159,6 +162,7 @@ struct device_opp {
unsigned int *supported_hw;
unsigned int supported_hw_count;
const char *prop_name;
+ struct regulator *regulator;
=20
#ifdef CONFIG_DEBUG_FS
struct dentry *dentry;
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 95403d2ccaf56..c70a18ac9c8a7 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -60,6 +60,8 @@ int dev_pm_opp_set_supported_hw(struct device *dev, con=
st u32 *versions,
void dev_pm_opp_put_supported_hw(struct device *dev);
int dev_pm_opp_set_prop_name(struct device *dev, const char *name);
void dev_pm_opp_put_prop_name(struct device *dev);
+int dev_pm_opp_set_regulator(struct device *dev, const char *name);
+void dev_pm_opp_put_regulator(struct device *dev);
#else
static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *op=
p)
{
@@ -151,6 +153,13 @@ static inline int dev_pm_opp_set_prop_name(struct de=
vice *dev, const char *name)
=20
static inline void dev_pm_opp_put_prop_name(struct device *dev) {}
=20
+static inline int dev_pm_opp_set_regulator(struct device *dev, const cha=
r *name)
+{
+ return -EINVAL;
+}
+
+static inline void dev_pm_opp_put_regulator(struct device *dev) {}
+
#endif /* CONFIG_PM_OPP */
=20
#if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
--=20
2.27.0


[PATCH 4.4.y-cip 03/23] PM / OPP: Introduce dev_pm_opp_get_max_volt_latency()

Chen-Yu Tsai (Moxa) <wens@...>
 

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 655c9df961751ce21466f6e97e8033932c27a675 upstream.

In few use cases (like: cpufreq), it is desired to get the maximum
voltage latency for changing OPPs. Add support for that.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
---
drivers/base/power/opp/core.c | 59 +++++++++++++++++++++++++++++++++++
include/linux/pm_opp.h | 6 ++++
2 files changed, 65 insertions(+)

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.=
c
index 48ec88befffc9..09165fbef84ed 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -230,6 +230,65 @@ unsigned long dev_pm_opp_get_max_clock_latency(struc=
t device *dev)
}
EXPORT_SYMBOL_GPL(dev_pm_opp_get_max_clock_latency);
=20
+/**
+ * dev_pm_opp_get_max_volt_latency() - Get max voltage latency in nanose=
conds
+ * @dev: device for which we do this operation
+ *
+ * Return: This function returns the max voltage latency in nanoseconds.
+ *
+ * Locking: This function takes rcu_read_lock().
+ */
+unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev)
+{
+ struct device_opp *dev_opp;
+ struct dev_pm_opp *opp;
+ struct regulator *reg;
+ unsigned long latency_ns =3D 0;
+ unsigned long min_uV =3D ~0, max_uV =3D 0;
+ int ret;
+
+ rcu_read_lock();
+
+ dev_opp =3D _find_device_opp(dev);
+ if (IS_ERR(dev_opp)) {
+ rcu_read_unlock();
+ return 0;
+ }
+
+ reg =3D dev_opp->regulator;
+ if (IS_ERR_OR_NULL(reg)) {
+ /* Regulator may not be required for device */
+ if (reg)
+ dev_err(dev, "%s: Invalid regulator (%ld)\n", __func__,
+ PTR_ERR(reg));
+ rcu_read_unlock();
+ return 0;
+ }
+
+ list_for_each_entry_rcu(opp, &dev_opp->opp_list, node) {
+ if (!opp->available)
+ continue;
+
+ if (opp->u_volt_min < min_uV)
+ min_uV =3D opp->u_volt_min;
+ if (opp->u_volt_max > max_uV)
+ max_uV =3D opp->u_volt_max;
+ }
+
+ rcu_read_unlock();
+
+ /*
+ * The caller needs to ensure that dev_opp (and hence the regulator)
+ * isn't freed, while we are executing this routine.
+ */
+ ret =3D regulator_set_voltage_time(reg, min_uV, max_uV);
+ if (ret > 0)
+ latency_ns =3D ret * 1000;
+
+ return latency_ns;
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_get_max_volt_latency);
+
/**
* dev_pm_opp_get_suspend_opp() - Get suspend opp
* @dev: device for which we do this operation
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index c70a18ac9c8a7..5daa43058ac10 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -34,6 +34,7 @@ bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
=20
int dev_pm_opp_get_opp_count(struct device *dev);
unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev);
+unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev);
struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct device *dev);
=20
struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
@@ -88,6 +89,11 @@ static inline unsigned long dev_pm_opp_get_max_clock_l=
atency(struct device *dev)
return 0;
}
=20
+static inline unsigned long dev_pm_opp_get_max_volt_latency(struct devic=
e *dev)
+{
+ return 0;
+}
+
static inline struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct devic=
e *dev)
{
return NULL;
--=20
2.27.0


Vagrant 2.2.8, 2.2.9 issue

Mohammed Billoo <mab@...>
 

All,

Just wanted to document an issue as well as a/my workaround when using vagrant 2.2.8/2.2.9. After installing vagrant 2.0.2 using apt-get in Ubuntu 18.04, it complained that I had a too new version of VirtualBox. Not wanting to downgrade VirtualBox because I have other VMs that I use for other work, I decided to install from source. I went with the tagged version 2.2.9 and ran into the following issue (which also exists for 2.2.8):


I installed from the master branch and didn't have the issue. 

Just documenting this in case anyone else has the same issue.
--
Mohammed A Billoo
Founder
MAB Labs, LLC
201-338-2022

--
Mohammed Billoo
MAB Labs, LLC
www.mab-labs.com


Re: Working on HTTPS connection

Akihiro Suzuki
 

Hi Quirin,

Thank you for the information.
I've added the information to the following issue.
https://gitlab.com/cip-project/cip-sw-updates/cip-sw-updates-tasks/-/issues/8

Thanks,
Suzuki

-----Original Message-----
From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On Behalf Of Quirin Gylstorff
Sent: Thursday, July 2, 2020 5:25 PM
To: cip-dev@lists.cip-project.org; mab@mab-labs.com
Subject: Re: [cip-dev] Working on HTTPS connection



On 6/29/20 6:57 PM, Mohammed Billoo wrote:
Hello!

I joined the mailing list from the recommendation on the IRC channel
(after viewing the CIP talk at ELC). I'd like to work on the following
issue:
https://gitlab.com/cip-project/cip-sw-updates/cip-sw-updates-tasks/-/issues/8

I've written applications + drivers for u-boot, have worked on SSL
(albeit for Amazon FreeRTOS), and have HW handy to hit the ground
running (I have a DE1-SoC).

Is there any update on this task that should I be aware of?
Hi,

if you add the following elements to the swupdate build config. HTTPS
works more or less. I did not test it in all configurations, only for a
short demo. And some of the options may not be necessary.

...
CONFIG_CURL=y
CONFIG_CURL_SSL=y
CONFIG_SSL_IMPL_OPENSSL=y
CONFIG_DOWNLOAD=y
CONFIG_DOWNLOAD_SSL=y
CONFIG_CHANNEL_CURL=y
CONFIG_CHANNEL_CURL_SSL=y
CONFIG_SURICATTA=y
CONFIG_SURICATTA_STATE_CHOICE_NONE=y
CONFIG_SURICATTA_HAWKBIT=y
CONFIG_SURICATTA_SSL=y
CONFIG_HASH_VERIFY=y
CONFIG_JSON=y
...

Quirin

Looking forward to contributing to this project!

--
Mohammed A Billoo
Founder
MAB Labs, LLC
www.mab-labs.com <http://www.mab-labs.com>
201-338-2022

--
Mohammed Billoo
MAB Labs, LLC
www.mab-labs.com
--
Quirin


v4.19-rt status

Pavel Machek
 

Hi!

Newest 4.19-rt kernel is currently v4.19.127-rt54. That's not good
match for us, as -cip kernels are v4.19.128-cip28 and v4.19.130-cip29.

I could do kernel based on v4.19.127-rt54 and v4.19.124-cip27, but I
believe it makes more sense to wait for newer v4.19-rt release.

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Re: CIP IRC weekly meeting today

masashi.kudo@cybertrust.co.jp <masashi.kudo@...>
 

Hi, Chris-san,

 

Sure, then see you at the CIP mini summit!

 

Best regards,

--

M. Kudo

 

From: cip-dev@... <cip-dev@...> On Behalf Of Chris Paterson
Sent: Thursday, July 2, 2020 5:44 PM
To: cip-dev@...
Subject: Re: [cip-dev] CIP IRC weekly meeting today

 

Hello Kudo-san,

Please accept my apologies; I can't babe the meeting this week.

Kind regards, Chris


From: cip-dev@... <cip-dev@...> on behalf of masashi.kudo@... via lists.cip-project.org <masashi.kudo=cybertrust.co.jp@...>
Sent: Wednesday, July 1, 2020 11:53:32 PM
To: cip-dev@... <cip-dev@...>
Subject: [cip-dev] CIP IRC weekly meeting today

 

Hi all,

Kindly be reminded to attend the weekly meeting through IRC to discuss technical topics with CIP kernel today.

*Please note that the IRC meeting was rescheduled to UTC (GMT) 09:00 starting from the first week of Apr. according to TSC meeting*
https://www.timeanddate.com/worldclock/meetingdetails.html?year=2020&month=7&day=2&hour=9&min=0&sec=0&p1=224&p2=179&p3=136&p4=37&p5=241&p6=248

USWest  USEast  UK      DE      TW      JP
02:00   05:00   10:00   11:00   17:00   18:00

Channel:
* irc:chat.freenode.net:6667/cip

Last meeting minutes:
https://irclogs.baserock.org/meetings/cip/2020/06/cip.2020-06-25-09.00.log.html

Agenda:

* Action item
  1. Combine root filesystem with kselftest binary - iwamatsu
  2. Post LTP results to KernelCI - patersonc
  3. Issues to be fixed for swupdate "copyright correction and salsa CI testing" - iwamatsu

* Kernel maintenance updates
* Kernel testing
* Software update
* CIP Security
* AOB

The meeting will take 30 min, although it can be extended to an hour if it makes sense and those involved in the topics can stay. Otherwise, the topic will be taken offline or in the next meeting.

Best regards,
--
M. Kudo
Cybertrust Japan Co., Ltd.

2161 - 2180 of 7061