All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Grazvydas Ignotas <notasas@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] OMAP2+: hwmod: remove OMAP_CHIP*
Date: Mon, 5 Sep 2011 18:19:47 +0300	[thread overview]
Message-ID: <20110905151947.GA3548@atomide.com> (raw)
In-Reply-To: <CANOLnOOkz2ZkhPSafTLxUUH2bSVoRrYA44-C1+yku8naYaRz3w@mail.gmail.com>

* Grazvydas Ignotas <notasas@gmail.com> [110905 13:54]:
> On Mon, Sep 5, 2011 at 5:43 AM, Paul Walmsley <paul@pwsan.com> wrote:
> > diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> > index 84cc0bd..d7138070 100644
> > --- a/arch/arm/mach-omap2/omap_hwmod.c
> > +++ b/arch/arm/mach-omap2/omap_hwmod.c
> <snip>
> 
> >
> >  int __init omap3xxx_hwmod_init(void)
> >  {
> > -       return omap_hwmod_register(omap3xxx_hwmods);
> > +       int r;
> > +       struct omap_hwmod **h = NULL;
> > +
> > +       /* Register hwmods common to all OMAP3 */
> > +       r = omap_hwmod_register(omap3xxx_hwmods);
> > +       if (!r)
> > +               return r;
> > +
> > +       /*
> > +        * Register hwmods common to individual OMAP3 families, all
> > +        * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
> > +        * All possible revisions should be included in this conditional.
> > +        */
> > +       if (omap_rev() == OMAP3430_REV_ES1_0 ||
> > +           omap_rev() == OMAP3430_REV_ES2_0 ||
> > +           omap_rev() == OMAP3430_REV_ES2_1 ||
> > +           omap_rev() == OMAP3430_REV_ES3_0 ||
> > +           omap_rev() == OMAP3430_REV_ES3_1 ||
> > +           omap_rev() == OMAP3430_REV_ES3_1_2) {
> > +               h = omap34xx_hwmods;
> > +       } else if (omap_rev() & OMAP3505_REV(0)) {
> > +               h = am35xx_hwmods;
> 
> This check will be always true I think?
> 
> Why not just use cpu_is_omap3xxx() for these tests, since it does same
> omap_rev() call but only once per family?

For SoC family based ES revision and GP/HS detection
we should set up minimal macros. Ideally we would not
need cpu_is_omapxxxx during early_init at all.

Regards,

Tony
--
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: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] OMAP2+: hwmod: remove OMAP_CHIP*
Date: Mon, 5 Sep 2011 18:19:47 +0300	[thread overview]
Message-ID: <20110905151947.GA3548@atomide.com> (raw)
In-Reply-To: <CANOLnOOkz2ZkhPSafTLxUUH2bSVoRrYA44-C1+yku8naYaRz3w@mail.gmail.com>

* Grazvydas Ignotas <notasas@gmail.com> [110905 13:54]:
> On Mon, Sep 5, 2011 at 5:43 AM, Paul Walmsley <paul@pwsan.com> wrote:
> > diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> > index 84cc0bd..d7138070 100644
> > --- a/arch/arm/mach-omap2/omap_hwmod.c
> > +++ b/arch/arm/mach-omap2/omap_hwmod.c
> <snip>
> 
> >
> > ?int __init omap3xxx_hwmod_init(void)
> > ?{
> > - ? ? ? return omap_hwmod_register(omap3xxx_hwmods);
> > + ? ? ? int r;
> > + ? ? ? struct omap_hwmod **h = NULL;
> > +
> > + ? ? ? /* Register hwmods common to all OMAP3 */
> > + ? ? ? r = omap_hwmod_register(omap3xxx_hwmods);
> > + ? ? ? if (!r)
> > + ? ? ? ? ? ? ? return r;
> > +
> > + ? ? ? /*
> > + ? ? ? ?* Register hwmods common to individual OMAP3 families, all
> > + ? ? ? ?* silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
> > + ? ? ? ?* All possible revisions should be included in this conditional.
> > + ? ? ? ?*/
> > + ? ? ? if (omap_rev() == OMAP3430_REV_ES1_0 ||
> > + ? ? ? ? ? omap_rev() == OMAP3430_REV_ES2_0 ||
> > + ? ? ? ? ? omap_rev() == OMAP3430_REV_ES2_1 ||
> > + ? ? ? ? ? omap_rev() == OMAP3430_REV_ES3_0 ||
> > + ? ? ? ? ? omap_rev() == OMAP3430_REV_ES3_1 ||
> > + ? ? ? ? ? omap_rev() == OMAP3430_REV_ES3_1_2) {
> > + ? ? ? ? ? ? ? h = omap34xx_hwmods;
> > + ? ? ? } else if (omap_rev() & OMAP3505_REV(0)) {
> > + ? ? ? ? ? ? ? h = am35xx_hwmods;
> 
> This check will be always true I think?
> 
> Why not just use cpu_is_omap3xxx() for these tests, since it does same
> omap_rev() call but only once per family?

For SoC family based ES revision and GP/HS detection
we should set up minimal macros. Ideally we would not
need cpu_is_omapxxxx during early_init at all.

Regards,

Tony

  reply	other threads:[~2011-09-05 15:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05  2:43 [PATCH] OMAP2+: hwmod: remove OMAP_CHIP* Paul Walmsley
2011-09-05  2:43 ` Paul Walmsley
2011-09-05 11:27 ` Grazvydas Ignotas
2011-09-05 11:27   ` Grazvydas Ignotas
2011-09-05 15:19   ` Tony Lindgren [this message]
2011-09-05 15:19     ` Tony Lindgren
2011-09-14 11:54   ` Paul Walmsley
2011-09-14 11:54     ` Paul Walmsley
2011-09-06 13:08 ` Aaro Koskinen
2011-09-06 13:08   ` Aaro Koskinen
2011-09-14 22:59   ` Paul Walmsley
2011-09-14 22:59     ` Paul Walmsley
2011-09-14 22:55 ` [PATCH v2] " Paul Walmsley
2011-09-14 22:55   ` Paul Walmsley

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=20110905151947.GA3548@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=notasas@gmail.com \
    --cc=paul@pwsan.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: link
Be 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.