linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	Venkatraman S <svenkatr@ti.com>,
	Senthilvadivu Guruswamy <svadivu@ti.com>,
	Angelo Arrifano <miknix@gmail.com>,
	"Zebediah C. McClure" <zmc@lurian.net>,
	Alistair Buxton <a.j.buxton@gmail.com>,
	Paul Walmsley <paul@pwsan.com>, Sanjeev Premi <premi@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	Tomi Valkeinen <tomi.valkeinen@nokia.com>,
	Aaro Koskinen <aaro.koskinen@nokia.com>,
	Vikram Pandita <vikram.pandita@ti.com>,
	Vishwanath S <vishwa.s@ti.com>
Subject: Re: [PATCH 4/9] omap: improve OMAP3_HAS_FEATURE
Date: Wed, 7 Jul 2010 15:28:05 +0300	[thread overview]
Message-ID: <20100707122804.GR1920@atomide.com> (raw)
In-Reply-To: <1277259375-18521-5-git-send-email-nm@ti.com>

* Nishanth Menon <nm@ti.com> [100623 05:10]:
> Replace OMAP3_HAS_FEATURE with OMAP_HAS_FEATURE allowing
> us to support multiple chip features
> 
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Angelo Arrifano <miknix@gmail.com>
> Cc: "Zebediah C. McClure" <zmc@lurian.net>
> Cc: Alistair Buxton <a.j.buxton@gmail.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Sanjeev Premi <premi@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Senthilvadivu Gurusamy <svadivu@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
> Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
> Cc: Vikram Pandita <vikram.pandita@ti.com>
> Cc: Vishwanath S <vishwa.s@ti.com>
> Cc: linux-omap@vger.kernel.org
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>  arch/arm/plat-omap/include/plat/cpu.h |   24 ++++++++++++------------
>  1 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index 5f12a0b..c71dbf4 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -444,6 +444,12 @@ static inline void omap1_check_revision(void) {}
>  #endif
>  void omap_check_revision(void);
>  
> +#define OMAP_HAS_FEATURE(rev, feat, flag)				\
> +static inline unsigned int omap##rev##_has_ ##feat(void)		\
> +{									\
> +	return omap##rev##_features & OMAP##rev##_HAS_ ##flag;		\
> +}									\
> +
>  /*
>   * Runtime detection of OMAP3 features
>   */
> @@ -456,17 +462,11 @@ extern u32 omap3_features;
>  #define OMAP3_HAS_ISP			BIT(4)
>  #define OMAP3_HAS_192MHZ_CLK		BIT(5)
>  
> -#define OMAP3_HAS_FEATURE(feat,flag)			\
> -static inline unsigned int omap3_has_ ##feat(void)	\
> -{							\
> -	return (omap3_features & OMAP3_HAS_ ##flag);	\
> -}							\
> -
> -OMAP3_HAS_FEATURE(l2cache, L2CACHE)
> -OMAP3_HAS_FEATURE(sgx, SGX)
> -OMAP3_HAS_FEATURE(iva, IVA)
> -OMAP3_HAS_FEATURE(neon, NEON)
> -OMAP3_HAS_FEATURE(isp, ISP)
> -OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> +OMAP_HAS_FEATURE(3, l2cache, L2CACHE)
> +OMAP_HAS_FEATURE(3, sgx, SGX)
> +OMAP_HAS_FEATURE(3, iva, IVA)
> +OMAP_HAS_FEATURE(3, neon, NEON)
> +OMAP_HAS_FEATURE(3, isp, ISP)
> +OMAP_HAS_FEATURE(3, 192mhz_clk, 192MHZ_CLK)

Why don't you just rename u32 omap3_features to omap_features?

Then maybe move omap_features to plat-omap/common.c, and have
a generic function for getting features?

There should not be any need to have separate features variable
for each omap.

Tony

  reply	other threads:[~2010-07-07 12:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23  2:16 [PATCH 0/9 v2] introduce generic OMAP SOC features Nishanth Menon
2010-06-23  2:16 ` [PATCH 1/9] omap1: rename check_revision Nishanth Menon
2010-06-23  2:16 ` [PATCH 2/9] omap2/3: id: fix sparse warning Nishanth Menon
2010-06-23  2:16 ` [PATCH 3/9] omap: generic: introduce a single check_revision Nishanth Menon
2010-06-25  9:31   ` Grazvydas Ignotas
2010-06-25 13:18     ` Nishanth Menon
2010-06-23  2:16 ` [PATCH 4/9] omap: improve OMAP3_HAS_FEATURE Nishanth Menon
2010-07-07 12:28   ` Tony Lindgren [this message]
2010-07-07 13:15     ` Nishanth Menon
2010-07-07 13:30       ` Tony Lindgren
2010-07-07 13:50         ` Nishanth Menon
2010-07-08  9:24           ` Tony Lindgren
2010-06-23  2:16 ` [PATCH 5/9] omap: introduce OMAP_SHOW_FEATURE Nishanth Menon
2010-06-23  2:16 ` [PATCH 6/9] omap: move generic omap3 features to generic Nishanth Menon
2010-07-07 12:30   ` Tony Lindgren
2010-06-23  2:16 ` [PATCH 7/9] omap: introduce omap4 feature Nishanth Menon
2010-06-23  2:16 ` [PATCH 8/9] omap: introduce omap24xx generic features Nishanth Menon
2010-06-23  2:16 ` [PATCH 9/9] omap: id: add feature check for omap1 Nishanth Menon
2010-07-06 12:46   ` Tony Lindgren
2010-07-06 12:53     ` Nishanth Menon
2010-07-06 13:14       ` Tony Lindgren
2010-07-06 16:07         ` Nishanth Menon

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=20100707122804.GR1920@atomide.com \
    --to=tony@atomide.com \
    --cc=a.j.buxton@gmail.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=miknix@gmail.com \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=premi@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=svadivu@ti.com \
    --cc=svenkatr@ti.com \
    --cc=tomi.valkeinen@nokia.com \
    --cc=vikram.pandita@ti.com \
    --cc=vishwa.s@ti.com \
    --cc=zmc@lurian.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).