Skip to content

Commit

Permalink
ARM: OMAP3+: do not register non-dt OPP tables for device tree boot
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nishanth Menon authored and Tony Lindgren committed Oct 22, 2013
1 parent 06ff74f commit 92d5185
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-omap2/opp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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;
Expand Down

0 comments on commit 92d5185

Please sign in to comment.