From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
Peter Tseng <tsenpet09@gmail.com>
Subject: Re: [PATCH] OMAP3: PM: quickly hack fix up init_opp
Date: Mon, 03 May 2010 09:15:35 -0700 [thread overview]
Message-ID: <87hbmp6jx4.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1272728589-5313-1-git-send-email-nm@ti.com> (Nishanth Menon's message of "Sat\, 1 May 2010 10\:43\:09 -0500")
Nishanth Menon <nm@ti.com> writes:
> init_opp is seen to crash, in resource34xx.c BUG() causes
> a kernel oops when OPP layer is not registered!
>
> Original Report:
> http://marc.info/?l=linux-omap&m=127268352116119&w=2
>
> Cc: Peter Tseng <tsenpet09@gmail.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Reported-by: Peter Tseng <tsenpet09@gmail.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> IMPORTANT: Completely untested!! just for a dry-run and
> srf is going to go away in a month, so this is more or
> less a curio..
Tested on overo without OPP init and also needed this additional bit
below to avoid another BUG. Will merge into your patch and add to
pm-srf branch.
With this, Overo boots, but will need OPP table init in board file to
use DVFS/CPUfreq.
Kevin
diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c
index ae8bd09..2bc5694 100644
--- a/arch/arm/mach-omap2/resource34xx.c
+++ b/arch/arm/mach-omap2/resource34xx.c
@@ -533,7 +533,7 @@ void init_freq(struct shared_resource *resp)
{
char *linked_res_name;
int ret = -EINVAL;
- unsigned long freq;
+ unsigned long freq = 0;
resp->no_of_users = 0;
linked_res_name = (char *)resp->resource_data;
@@ -546,7 +546,8 @@ void init_freq(struct shared_resource *resp)
else if (strcmp(resp->name, "dsp_freq") == 0)
/* DSP freq in Mhz */
ret = opp_to_freq(&freq, OPP_DSP, curr_vdd1_opp);
- BUG_ON(ret);
+ if (ret)
+ pr_err("%s: initializing frequency failed!\n", __func__);
resp->curr_level = freq;
return;
prev parent reply other threads:[~2010-05-03 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-01 15:43 [PATCH] OMAP3: PM: quickly hack fix up init_opp Nishanth Menon
2010-05-03 16:15 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbmp6jx4.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=tsenpet09@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.