Re: OMAP3515 vs 3525 inversion

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

 



On Tue, Nov 17, 2009 at 4:39 PM, Premi, Sanjeev <premi@xxxxxx> wrote:
>> -----Original Message-----
>> From: linux-omap-owner@xxxxxxxxxxxxxxx
>> [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of Sergey Lapin
>> Sent: Monday, November 16, 2009 3:59 PM
>> To: linux-omap@xxxxxxxxxxxxxxx
>> Subject: OMAP3515 vs 3525 inversion
>>
>> Hi, all!
>> I think I found a bug in processor detection code.
>> as I see,
>> > > + /* OMAP3430 and OMAP3530 are assumed to be same.
>> > > +  *
>> > > +  * OMAP3525, OMAP3515 and OMAP3503 can be detected only based
>> > > +  * on available features. Upon detection, update the CPU id
>> > > +  * and CPU class bits.
>> > > +  */
>> > > + if (omap3_has_iva() && omap3_has_sgx()) {
>> > > +         strcpy(cpu_name, "3430/3530");
>> > > + }
>> > > + else if (omap3_has_sgx()) {
>> > > +         omap_revision = OMAP3525_REV (rev);
>> > > +         strcpy(cpu_name, "3525");
>> > > + }
>> > > + else if (omap3_has_iva()) {
>> > > +         omap_revision = OMAP3515_REV (rev);
>> > > +         strcpy(cpu_name, "3515");
>> > > + }
>> > > + else {
>> > > +         omap_revision = OMAP3503_REV (rev);
>> > > +         strcpy(cpu_name, "3503");
>> > > + }
>>
>> But, actually, 3515 has no DSP, but has PowerVR,
>> and 3525 has no PowerVR but has DSP. In-tree code inverses
>> this detection.
>
> This error seems to have crept in while reworking the patch. I
> believe the patch can be minimized to:
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 1c15112..e5a0747 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -270,11 +270,11 @@ void __init omap3_cpuinfo(void)
>                strcpy(cpu_name, "3630");
>        else if (omap3_has_iva() && omap3_has_sgx())
>                strcpy(cpu_name, "3430/3530");
> -       else if (omap3_has_sgx()) {
> +       else if (omap3_has_iva()) {
>                omap_revision = OMAP3525_REV(rev);
>                strcpy(cpu_name, "3525");
>        }
> -       else if (omap3_has_iva()) {
> +       else if (omap3_has_sgx()) {
>                omap_revision = OMAP3515_REV(rev);
>                strcpy(cpu_name, "3515");
>        }
>
> I can submit this on your behalf.

Fine by me.

S.
--
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