[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <672dd8e9-2857-49fb-848f-d38d38b23c9b@BN1BFFO11FD024.protection.gbl>
Date: Tue, 20 May 2014 15:30:12 -0700
From: Sören Brinkmann <soren.brinkmann@...inx.com>
To: Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Viresh Kumar <viresh.kumar@...aro.org>
CC: Sören Brinkmann <soren.brinkmann@...inx.com>,
<linux-kernel@...r.kernel.org>, <linux-pm@...r.kernel.org>,
<devicetree@...r.kernel.org>
Subject: [RFC] Migrate to Hz resolution for OPP binding
Hi,
I guess this is just to evaluate how big the lynch mob will be. Anyway:
Triggered by this discussion https://lkml.org/lkml/2014/5/15/46, I
looked a little into what it would take to migrate everybody to Hz
frequency resolutions to avoid all the conversions between cpufreq, CCF,
OPPs, etc.
Turns out, OPPs are already stored in Hz resolution in the kernel, but the DT
bindings use kHz resolution to specify them in DT. So, code-wise there
is just a removal of a multiplication in the OPP parser (see below), but
then there are the DT bindings...
As plan B, I was thinking to add the property 'operating-points-hz'...
Any better ideas?
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index 25538675d59e..61795111e8ca 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -731,7 +731,7 @@ int of_init_opp_table(struct device *dev)
val = prop->value;
while (nr) {
- unsigned long freq = be32_to_cpup(val++) * 1000;
+ unsigned long freq = be32_to_cpup(val++);
unsigned long volt = be32_to_cpup(val++);
if (dev_pm_opp_add(dev, freq, volt)) {
Thanks,
Sören
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists