From: Nishanth Menon <nm@ti.com> To: "Shilimkar, Santosh" <santosh.shilimkar@ti.com> Cc: "tony@atomide.com" <tony@atomide.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>, "linux@arm.linux.org.uk" <linux@arm.linux.org.uk> Subject: Re: [PATCH 1/6 v2] OMAP4: Fix cpu detection Date: Fri, 11 Dec 2009 10:37:02 -0600 [thread overview] Message-ID: <782515bb0912110837i732250f2m4f50246594973b67@mail.gmail.com> (raw) In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02BC1415B4@dbde02.ent.ti.com> On Thu, Dec 10, 2009 at 10:43 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote: >> > >> > +void __init omap4_check_revision(void) >> > +{ >> > + u32 idcode; >> > + u16 hawkeye; >> > + u8 rev; >> > + char *rev_name = "ES1.0"; >> should'nt you decide this inside the rev check path? > > This is initialized value by default. Since the chip is ES1.0 additionaly I am not doing it. > e.g. for ES2.0, it would be done inside. > > + ok, no strong opinions about this, but I think it might be nice if ES2.0 addition will modify less code. >> > + /* >> > + * The IC rev detection is done with hawkeye and rev. >> > + * Note that rev does not map directly to defined processor >> > + * revision numbers as ES1.0 uses value 0. >> > + */ >> > + idcode = read_tap_reg(OMAP_TAP_IDCODE); >> > + hawkeye = (idcode >> 12) & 0xffff; >> > + rev = (idcode >> 28) & 0xff; >> > + >> > + if ((hawkeye == 0xb852) && (rev == 0x0)) { >> > + omap_revision = OMAP4430_REV_ES1_0; >> > + pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name); >> wondering about the >>16 part. > Why ? omap_rev() >>16 means that you are using higher word of this and I think we have CLASS() macro for that? if that is not enough, should'nt we add adequate macro to do that? [...] Regards, Nishanth Menon -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: nm@ti.com (Nishanth Menon) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6 v2] OMAP4: Fix cpu detection Date: Fri, 11 Dec 2009 10:37:02 -0600 [thread overview] Message-ID: <782515bb0912110837i732250f2m4f50246594973b67@mail.gmail.com> (raw) In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02BC1415B4@dbde02.ent.ti.com> On Thu, Dec 10, 2009 at 10:43 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote: >> > >> > +void __init omap4_check_revision(void) >> > +{ >> > + ? u32 idcode; >> > + ? u16 hawkeye; >> > + ? u8 rev; >> > + ? char *rev_name = "ES1.0"; >> should'nt you decide this inside the rev check path? > > This is initialized value by default. Since the chip is ES1.0 additionaly I am not doing it. > e.g. for ES2.0, it would be done inside. > > + ok, no strong opinions about this, but I think it might be nice if ES2.0 addition will modify less code. >> > + ? /* >> > + ? ?* The IC rev detection is done with hawkeye and rev. >> > + ? ?* Note that rev does not map directly to defined processor >> > + ? ?* revision numbers as ES1.0 uses value 0. >> > + ? ?*/ >> > + ? idcode = read_tap_reg(OMAP_TAP_IDCODE); >> > + ? hawkeye = (idcode >> 12) & 0xffff; >> > + ? rev = (idcode >> 28) & 0xff; >> > + >> > + ? if ((hawkeye == 0xb852) && (rev == 0x0)) { >> > + ? ? ? ? ? omap_revision = OMAP4430_REV_ES1_0; >> > + ? ? ? ? ? pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name); >> wondering about the >>16 part. > Why ? omap_rev() >>16 means that you are using higher word of this and I think we have CLASS() macro for that? if that is not enough, should'nt we add adequate macro to do that? [...] Regards, Nishanth Menon
next prev parent reply other threads:[~2009-12-11 16:36 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-12-10 6:22 [PATCH 1/6 v2] OMAP4: Fix cpu detection Santosh Shilimkar 2009-12-10 6:22 ` Santosh Shilimkar 2009-12-10 6:22 ` [PATCH 6/6 v2] OMAP4: Sync up omap4430 defconfig Santosh Shilimkar 2009-12-10 6:22 ` Santosh Shilimkar 2009-12-11 22:22 ` [APPLIED] " Tony Lindgren 2009-12-10 20:14 ` [PATCH 1/6 v2] OMAP4: Fix cpu detection Nishanth Menon 2009-12-10 20:14 ` Nishanth Menon 2009-12-11 4:43 ` Shilimkar, Santosh 2009-12-11 4:43 ` Shilimkar, Santosh 2009-12-11 16:37 ` Nishanth Menon [this message] 2009-12-11 16:37 ` Nishanth Menon 2009-12-11 22:17 ` [APPLIED] " Tony Lindgren
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=782515bb0912110837i732250f2m4f50246594973b67@mail.gmail.com \ --to=nm@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=santosh.shilimkar@ti.com \ --cc=tony@atomide.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: linkBe 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.