Nishanth Menon <[email protected]> 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 <[email protected]>
> Cc: Kevin Hilman <[email protected]>
> Reported-by: Peter Tseng <[email protected]>
> Signed-off-by: Nishanth Menon <[email protected]>
> ---
> 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to