summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2013-10-16 10:39:01 -0500
committerJames Wylder <jwylder@motorola.com>2014-03-19 15:32:36 -0500
commita6a71879d5885ec9f37b691ac792e266c2e62edb (patch)
treebed9beb878c57caff83683052271733d781b0fe2
parent76ef816aa11fb666516c5718893a9d5f86350a53 (diff)
downloadolio-linux-3.10-a6a71879d5885ec9f37b691ac792e266c2e62edb.tar.xz
olio-linux-3.10-a6a71879d5885ec9f37b691ac792e266c2e62edb.zip
ARM: OMAP3+: do not register non-dt OPP tables for device tree boot
OMAP3+ supports both device tree and non-device tree boot. Device tree bindings for OMAP3+ is supposed to be added via dts following: Documentation/devicetree/bindings/power/opp.txt Since we now have device tree entries for OMAP3+ cpu OPPs, The current code wrongly adds duplicate OPPs. So, dont register OPPs when booting using device tree. Change-Id: I79bb99c51f8934bc4b0898f0646528117e1b8025 Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: James Wylder <jwylder@motorola.com>
-rw-r--r--arch/arm/mach-omap2/opp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c
index bd41d59a7ca..82fd8c72f75 100644
--- a/arch/arm/mach-omap2/opp.c
+++ b/arch/arm/mach-omap2/opp.c
@@ -17,6 +17,7 @@
* GNU General Public License for more details.
*/
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/opp.h>
#include <linux/cpu.h>
@@ -40,6 +41,9 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
{
int i, r;
+ if (of_have_populated_dt())
+ return -EINVAL;
+
if (!opp_def || !opp_def_size) {
pr_err("%s: invalid params!\n", __func__);
return -EINVAL;