All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [RFC PATCH] arm:omap: cleanup & split omap2/3/4_check_revision function
Date: Thu, 8 Dec 2011 09:14:17 -0800	[thread overview]
Message-ID: <20111208171417.GA31337@atomide.com> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A8050F45@DBDE01.ent.ti.com>

* Hiremath, Vaibhav <hvaibhav@ti.com> [111208 05:08]:
> > From: Tony Lindgren [mailto:tony@atomide.com]
> > 
> > Maybe just call ti816x_check_features separately?
> > 
> > 	omap3xxx_check_revision();
> > 	omap3xxx_check_features();
> > and
> > 	omap3xxx_check_revision();
> > 	ti816x_check_features();
> > 
> The reason why I did not do this is,
> 
> In case of omap3_check_revision, 
> 
> Void __init omap3xxx_check_revision()
> {
> 	const char *cpu_rev;
> 
> 	omap3_check_revision(&cpu_rev);
> 	omap3_check_features();
> 	omap3_cpuinfo(cpu_rev);
> }
> 
> 
> If I separate, omap3_check_revision() and omap3_check_features(), then I 
> have to maintain cpu_rev in the parent function. Also, I can not break the 
> sequence due to this dependency on cpu_rev. and I wanted to retain the void
> function calls in omap3_init_early().
> So I came up with this optimized and clean way of using "has_feature_reg" 
> Flag, and set to default features for AM family of devices.
> 
> OR
> As you suggested, I have to maintain cpu_rev into function 
> omap3_init_early() and call the above 3 function in the sequence
> (alone for omap3).

Let's still plan on separating check_revision and check_features
so we can simplify things. How about something like this:

static const char *cpu_rev;

void __init omap3xxx_check_revision(void)
{
	...
}

static void __init omap3_cpuinfo()
{
	...
}

void __init omap3xxx_check_features(void)
{
	...
	omap3_cpuinfo();
}

void __init ti816x_check_features(void)
{
	...
	omap3_cpuinfo();
}

Then we can easily add whatever combinations are needed
and hopefully can move check_features to happen later on
eventually.

Regards,

Tony

      reply	other threads:[~2011-12-08 17:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 14:43 [RFC PATCH] arm:omap: cleanup & split omap2/3/4_check_revision function Vaibhav Hiremath
2011-11-16 14:06 ` Hiremath, Vaibhav
2011-11-23  6:31 ` Hiremath, Vaibhav
2011-12-07 23:41   ` Tony Lindgren
2011-12-08 13:40     ` Hiremath, Vaibhav
2011-12-08 17:14       ` Tony Lindgren [this message]

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=20111208171417.GA31337@atomide.com \
    --to=tony@atomide.com \
    --cc=hvaibhav@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /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.