diff options
author | NeilBrown <neilb@suse.de> | 2012-07-25 11:52:06 +1000 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> | 2013-03-09 14:43:47 +0100 |
commit | 2dfba5e40f273bf09c0c06697667d57c579f374b (patch) | |
tree | 612701b4eacda213cc6583b31fe0b2cdb4cde970 | |
parent | e1ec68681522681781b3583c19118a057a6bec37 (diff) | |
download | kernel_goldelico_gta04-2dfba5e40f273bf09c0c06697667d57c579f374b.zip kernel_goldelico_gta04-2dfba5e40f273bf09c0c06697667d57c579f374b.tar.gz kernel_goldelico_gta04-2dfba5e40f273bf09c0c06697667d57c579f374b.tar.bz2 |
Enable 800MHz Operating Power Point.
Just having "mpurate=800" in kernel command line doesn't do any good
when cpufreq is enabled. We need to explicitly enable the higher
operating power points.
So copy the opp_init code from board-omap3beagle.c. Once cpufreq is
enabled, cpu-bound code can now operate 33% faster.
Signed-off-by: NeilBrown <neilb@suse.de>
Conflicts:
arch/arm/mach-omap2/board-omap3gta04.c
-rw-r--r-- | arch/arm/mach-omap2/board-omap3gta04.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3gta04.c b/arch/arm/mach-omap2/board-omap3gta04.c index 5284f64..2d9e8d9 100644 --- a/arch/arm/mach-omap2/board-omap3gta04.c +++ b/arch/arm/mach-omap2/board-omap3gta04.c @@ -31,6 +31,7 @@ #include <linux/gpio-reg.h> #include <linux/gpio-w2sg0004.h> #include <linux/extcon/extcon_gpio.h> +#include <linux/opp.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> @@ -67,6 +68,7 @@ #include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/platform_data/omap-pwm.h> #include <plat/omap-serial.h> +#include <plat/omap_device.h> #include "mux.h" #include "hsmmc.h" @@ -1287,6 +1289,48 @@ static void gta04_serial_init(void) omap_serial_init_port(&bdata, NULL); } +static void __init gta04_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 */ + + /* Enable IVA 800MHz and lower opps */ + r |= opp_enable(iva_dev, 660000000); + /* TODO: DSP 800MHz needs SR and ABB */ + 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(iva_dev, 660000000); + } + } +} + static void __init gta04_init(void) { printk("running gta04_init()\n"); @@ -1384,6 +1428,8 @@ static void __init gta04_init(void) gpio_request(TWL4030_MSECURE_GPIO, "mSecure"); gpio_direction_output(TWL4030_MSECURE_GPIO, true); + gta04_opp_init(); + printk("gta04_init done...\n"); } |