Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (97 sloc) 3.36 KB
From 24f3141aedc373ad515cd15051cd0201f9e45ef1 Mon Sep 17 00:00:00 2001
From: Enrico Butera <ebutera@users.berlios.de>
Date: Wed, 11 Apr 2012 11:54:43 +0200
Subject: [PATCH 16/18] igep0020: add opp init
Signed-off-by: Enrico Butera <ebutera@users.berlios.de>
---
arch/arm/mach-omap2/board-igep0020.c | 52 ++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index a5f92d4..b5bdd53 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -18,6 +18,7 @@
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/input.h>
+#include <linux/opp.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
@@ -30,6 +31,7 @@
#include <plat/board.h>
#include <plat/common.h>
#include <plat/gpmc.h>
+#include <plat/omap_device.h>
#include <plat/usb.h>
#include <video/omapdss.h>
#include <video/omap-panel-dvi.h>
@@ -41,6 +43,7 @@
#include "sdram-numonyx-m65kxxxxam.h"
#include "common-board-devices.h"
#include "devices.h"
+#include "pm.h"
#define IGEP2_SMSC911X_CS 5
#define IGEP2_SMSC911X_GPIO 176
@@ -759,6 +762,54 @@ static void __init igep_wlan_bt_init(void)
static inline void __init igep_wlan_bt_init(void) { }
#endif
+static void __init igep_opp_init(void)
+{
+ int r = 0;
+
+ /* Initialize the omap3 opp table */
+ if (omap3_opp_init()) {
+ pr_err("%s: opp default init failed\n", __func__);
+ return;
+ }
+
+ /* Custom OPP enabled for all xM versions */
+ if (cpu_is_omap3630()) {
+ struct device *mpu_dev, *iva_dev;
+
+ mpu_dev = omap_device_get_by_hwmod_name("mpu");
+ iva_dev = omap_device_get_by_hwmod_name("iva");
+
+ if (!mpu_dev || !iva_dev) {
+ pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
+ __func__, mpu_dev, iva_dev);
+ return;
+ }
+ /* Enable MPU 1GHz and lower opps */
+ r = opp_enable(mpu_dev, 800000000);
+ /* TODO: MPU 1GHz needs SR and ABB */
+ //r |= opp_enable(mpu_dev, 1000000000);
+
+ /* Enable IVA 800MHz and lower opps */
+ r |= opp_enable(iva_dev, 660000000);
+ /* TODO: DSP 800MHz needs SR and ABB */
+ //r |= opp_enable(iva_dev, 800000000);
+
+ if (r) {
+ pr_err("%s: failed to enable higher opp %d\n",
+ __func__, r);
+ /*
+ * Cleanup - disable the higher freqs - we dont care
+ * about the results
+ */
+ opp_disable(mpu_dev, 800000000);
+ //opp_disable(mpu_dev, 1000000000);
+ opp_disable(iva_dev, 660000000);
+ //opp_disable(iva_dev, 800000000);
+ }
+ }
+ return;
+}
+
static void __init igep_init(void)
{
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -791,6 +842,7 @@ static void __init igep_init(void)
usbhs_init(&igep3_usbhs_bdata);
}
igep00x0_camera_init();
+ igep_opp_init();
}
MACHINE_START(IGEP0020, "IGEP v2 board")
--
1.7.5.4
You can’t perform that action at this time.