From: Kevin Hilman <khilman@deeprootsystems.com>
To: Roger Quadros <ext-roger.quadros@nokia.com>
Cc: linux-omap@vger.kernel.org, ext-phil.2.carmody@nokia.com
Subject: Re: [PATCH] OMAP3: PM: Fix Smartreflex when used with PM_NOOP layer
Date: Fri, 15 May 2009 07:54:50 -0700 [thread overview]
Message-ID: <87eiuq2z7p.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1242388547-4241-1-git-send-email-ext-roger.quadros@nokia.com> (Roger Quadros's message of "Fri\, 15 May 2009 14\:55\:47 +0300")
Roger Quadros <ext-roger.quadros@nokia.com> writes:
> omap_pm_vddX_get_opp() returns 0 if PM layer is PM_NOOP or PM_NONE.
> This is not a valid OPP so we must sanity check this correctly before using.
>
> This patch fixes system lockup when we enable smartreflex
> "echo 1 > /sys/power/sr_vdd1_autocomp"
>
> Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Oops, this looks like a side effect of my merge of Rajendra's and Phil's
patches.
Thanks, pushing to PM branch.
Kevin
> ---
> arch/arm/mach-omap2/smartreflex.c | 12 ++++++++----
> 1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 42e16a6..b032366 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -787,8 +787,10 @@ static ssize_t omap_sr_vdd1_autocomp_store(struct kobject *kobj,
> sr_stop_vddautocomap(SR1);
> } else {
> u32 current_vdd1opp_no = omap_pm_vdd1_get_opp();
> - if (IS_ERR_VALUE(current_vdd1opp_no))
> - return -ENODEV;
> + if (!current_vdd1opp_no) {
> + pr_err("sr_vdd1_autocomp: Current VDD1 opp unknown\n");
> + return -EINVAL;
> + }
> sr_start_vddautocomap(SR1, current_vdd1opp_no);
> }
> return n;
> @@ -825,8 +827,10 @@ static ssize_t omap_sr_vdd2_autocomp_store(struct kobject *kobj,
> sr_stop_vddautocomap(SR2);
> } else {
> u32 current_vdd2opp_no = omap_pm_vdd2_get_opp();
> - if (IS_ERR_VALUE(current_vdd2opp_no))
> - return -ENODEV;
> + if (!current_vdd2opp_no) {
> + pr_err("sr_vdd2_autocomp: Current VDD2 opp unknown\n");
> + return -EINVAL;
> + }
> sr_start_vddautocomap(SR2, current_vdd2opp_no);
> }
> return n;
> --
> 1.6.0.4
prev parent reply other threads:[~2009-05-15 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 11:55 [PATCH] OMAP3: PM: Fix Smartreflex when used with PM_NOOP layer Roger Quadros
2009-05-15 14:54 ` 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=87eiuq2z7p.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=ext-phil.2.carmody@nokia.com \
--cc=ext-roger.quadros@nokia.com \
--cc=linux-omap@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox