Search
SailfishOS Open Build Service
>
Projects
>
home:dcthang:branches:nemo:devel:hw:ti:omap3:n900
>
kernel-adaptation-n900
> linux-2.6-dvfs-0032-rx51-add-board-OPP-init-to-disable-125MHz-from-avail.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File linux-2.6-dvfs-0032-rx51-add-board-OPP-init-to-disable-125MHz-from-avail.patch of Package kernel-adaptation-n900
From 0da7512d793fffb915be656345568ed128b7cda8 Mon Sep 17 00:00:00 2001 From: Kimmo Jukarainen <ext-kimmo.jukarainen@nokia.com> Date: Fri, 15 Apr 2011 11:10:43 +0300 Subject: [PATCH 32/32] rx51: add board OPP init to disable 125MHz from available cpu rates Using rx51 (N900) at 125 MHz causes problems with Meego UI. Disable this rate from available frequencies. Signed-off-by: Kimmo Jukarainen <ext-kimmo.jukarainen@nokia.com> --- arch/arm/mach-omap2/board-rx51.c | 45 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 08e2b71..8312b40 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c @@ -17,6 +17,7 @@ #include <linux/io.h> #include <linux/gpio.h> #include <linux/leds.h> +#include <linux/opp.h> #include <mach/hardware.h> #include <asm/mach-types.h> @@ -29,6 +30,7 @@ #include <plat/dma.h> #include <plat/gpmc.h> #include <plat/usb.h> +#include <plat/omap_device.h> #include "mux.h" #include "pm.h" @@ -112,6 +114,49 @@ static void __init rx51_init_irq(void) omap_gpio_init(); } +static void __init rx51_opp_init(void) +{ + /* + * Init opp tables to default values and then + * remove 125MHz from available cpu clock rates. + */ + + int r = 0; + + if (r=omap3_opp_init()) { + /* + * FIXME: We are now called with late_initcall() and + * thus omap3_opp_init() has already been run once, + * so we will get -EEXIST. This check should be removed + * when our backport of opp/dvfs code gets updated + * and late_initcall removed. + */ + if (r != -EEXIST) { + pr_err("%s: failed to init default opp table: %d\n", __func__, r); + return; + } + } + + struct omap_hwmod *mpu = omap_hwmod_lookup("mpu"); + struct device *dev; + if (!mpu) { + pr_err("%s: omap_hwmod_lookup failed\n", __func__); + return; + } + dev = &mpu->od->pdev.dev; + r = opp_disable(dev, 125000000); + if (r) { + pr_err("%s: failed to disable opp, err: %d\n", __func__, r); + } +} +/* + * FIXME: using late_initcall to get this working with current backported + * version of opp/dvfs support. Currently rx51_opp_init will fail if run + * from rx51_init due to some hwmod related inits that are not yet done. + * Move to normal call in rx51_init when updating the backport. + */ +late_initcall(rx51_opp_init); + extern void __init rx51_peripherals_init(void); #ifdef CONFIG_OMAP_MUX -- 1.7.0.4