1 From 92d51856d7405fa55bcf3d6f20d7e97e0bf2656c Mon Sep 17 00:00:00 2001
2 From: Nishanth Menon <nm@ti.com>
3 Date: Wed, 16 Oct 2013 15:39:01 +0000
4 Subject: ARM: OMAP3+: do not register non-dt OPP tables for device tree boot
6 OMAP3+ supports both device tree and non-device tree boot.
7 Device tree bindings for OMAP3+ is supposed to be added via dts following:
8 Documentation/devicetree/bindings/power/opp.txt
10 Since we now have device tree entries for OMAP3+ cpu OPPs,
11 The current code wrongly adds duplicate OPPs. So, dont register OPPs
12 when booting using device tree.
14 Signed-off-by: Nishanth Menon <nm@ti.com>
15 Signed-off-by: Tony Lindgren <tony@atomide.com>
17 diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c
18 index bd41d59..82fd8c7 100644
19 --- a/arch/arm/mach-omap2/opp.c
20 +++ b/arch/arm/mach-omap2/opp.c
22 * GNU General Public License for more details.
24 #include <linux/module.h>
25 +#include <linux/of.h>
26 #include <linux/opp.h>
27 #include <linux/cpu.h>
29 @@ -40,6 +41,9 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
33 + if (of_have_populated_dt())
36 if (!opp_def || !opp_def_size) {
37 pr_err("%s: invalid params!\n", __func__);