summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/opp.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2013-10-16 10:39:01 -0500
committerTony Lindgren <tony@atomide.com>2013-10-22 08:09:27 -0700
commit92d51856d7405fa55bcf3d6f20d7e97e0bf2656c (patch)
tree6e2a7f18614e9af083377591dc6b1aa2c010d5ba /arch/arm/mach-omap2/opp.c
parent06ff74fd197aa8205443cf64b94383802602e320 (diff)
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. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/opp.c')
-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 bd41d59a7cab..82fd8c72f750 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;