RE: OMAP3: enabling CPU idle leads to panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

> -----Original Message-----
> From: Sergey Lapin [mailto:slapinid@xxxxxxxxx] 
> Sent: Friday, November 27, 2009 5:33 PM
> To: Premi, Sanjeev
> Cc: Kevin Hilman; linux-omap@xxxxxxxxxxxxxxx
> Subject: Re: OMAP3: enabling CPU idle leads to panic
> 
> On Fri, Nov 27, 2009 at 2:36 PM, Sergey Lapin 
> <slapinid@xxxxxxxxx> wrote:
> >>
> >> Alas, that's not because omap_chip_is() function fails
> >> on these structures.
> >>
> >
> > I mean during registration of power domains.
> >
> 
> int pwrdm_register(struct powerdomain *pwrdm)
> {
>         unsigned long flags;
>         int ret = -EINVAL;
> 
>         if (!pwrdm)
>                 return -EINVAL;
> 
>         if (!omap_chip_is(pwrdm->omap_chip))
>                 return -EINVAL;
> returns -EINVAL for pwrdm_core (both of them), so I get panic later.
> Since OMAP2525 vs  3515 were messed-up, I think there could be more
> problems there.
> 
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h
> b/arch/arm/plat-omap/include/plat/cpu.h
> index 2e17890..8b15789 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -393,11 +393,11 @@ IS_OMAP_TYPE(3517, 0x3517)
>                                                 
> (!omap3_has_iva()) &&   \
>                                                 (!omap3_has_sgx()))
>  # define cpu_is_omap3515()             (cpu_is_omap3430() && 
>           \
> -                                               
> (omap3_has_iva()) &&    \
> -                                               (!omap3_has_sgx()))
> +                                               
> (!omap3_has_iva()) &&   \
> +                                               (omap3_has_sgx()))
>  # define cpu_is_omap3525()             (cpu_is_omap3430() && 
>           \
> -                                               
> (omap3_has_sgx()) &&    \
> -                                               (!omap3_has_iva()))
> +                                               
> (!omap3_has_sgx()) &&   \
> +                                               (omap3_has_iva()))
>  # define cpu_is_omap3530()             (cpu_is_omap3430())
>  # define cpu_is_omap3505()             is_omap3505()
>  # define cpu_is_omap3517()             is_omap3517()
> 
> since OMAP3525 has iva but misses sgx, and vice versa 3515 has sgx but
> has no iva.
> I missed this piece before, but just accidentally found it now. I
> don't know if these are
> related, but this doesn't fix my problem with core_pwrdm.
> 
> S.

I feel, the problem could be due to this snippet below.
omap_rev() does a compare against omap_revision not just
the revision bits.

Had submitted a patch earlier; will need some time to
find it.

	} else if (cpu_is_omap343x()) {
		omap_chip.oc = CHIP_IS_OMAP3430;
		if (omap_rev() == OMAP3430_REV_ES1_0)
			omap_chip.oc |= CHIP_IS_OMAP3430ES1;
		else if (omap_rev() >= OMAP3430_REV_ES2_0 &&
			 omap_rev() <= OMAP3430_REV_ES2_1)
			omap_chip.oc |= CHIP_IS_OMAP3430ES2;
		else if (omap_rev() == OMAP3430_REV_ES3_0)
			omap_chip.oc |= CHIP_IS_OMAP3430ES3_0;
		else if (omap_rev() == OMAP3430_REV_ES3_1)
			omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
	} else {

In meantime, can you try setting the following (explicitly)
to the code above:
		else if (omap_rev() == OMAP3430_REV_ES3_1)
			omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
+		else
+			omap_chip.oc |= CHIP_IS_OMAP3430ES3_1

~sanjeev
> --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux