public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Todd Poynor <toddpoynor@google.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org, paul@pwsan.com, khilman@ti.com,
	b-cousson@ti.com, Aneesh V <aneesh@ti.com>,
	Nishanth Menon <nm@ti.com>
Subject: Re: [PATCH 2/7] OMAP4: ID: add omap_has_feature for max freq supported
Date: Thu, 30 Jun 2011 19:41:28 -0700	[thread overview]
Message-ID: <20110701024128.GA32673@google.com> (raw)
In-Reply-To: <1309486081-8257-3-git-send-email-rnayak@ti.com>

On Fri, Jul 01, 2011 at 07:37:56AM +0530, Rajendra Nayak wrote:
> From: Aneesh V <aneesh@ti.com>
> 
> Macros for identifying the max frequency supported by various
> OMAP4 variants - Expanding along the lines of OMAP3's feature
> handling.
> 
> [nm@ti.com: minor fixes for checks that should only for 443x|446x]
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Aneesh V <aneesh@ti.com>
> ---
>  arch/arm/mach-omap2/id.c              |   29 +++++++++++++++++++++++++++++
>  arch/arm/plat-omap/include/plat/cpu.h |   19 +++++++++++++++++++
>  2 files changed, 48 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 3d43d64..a86d0f9 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -32,6 +32,7 @@ static struct omap_chip_id omap_chip;
>  static unsigned int omap_revision;
>  
>  u32 omap3_features;
> +u32 omap4_features;

Since the features are enabled by cpu_is*, need to have separate masks
for OMAP3 vs. OMAP4 in same kernel?

>  
>  unsigned int omap_rev(void)
>  {
> @@ -212,6 +213,33 @@ static void __init omap3_check_features(void)
>  	 */
>  }
>  
> +static void __init omap4_check_features(void)
> +{
> +	u32 si_type;
> +
> +	omap4_features = 0;

Already guaranteed to be zero, could skip this.

> +
> +	if (cpu_is_omap443x())
> +		omap4_features |= OMAP4_HAS_MPU_1GHZ;
> +
> +
> +	if (cpu_is_omap446x()) {
> +		si_type =
> +			read_tap_reg(OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1);
> +		switch ((si_type & (3 << 16)) >> 16) {
> +		case 2:
> +			/* High performance device */
> +			omap4_features |= OMAP4_HAS_MPU_1_5GHZ;
> +			break;

Should this fall through to also add OMAP4_HAS_MPU_1_2GHZ?  (Or are
they mutually exclusive, or 1.5 implies 1.2 also present by
convention)?


Todd

  parent reply	other threads:[~2011-07-01  2:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  2:07 [PATCH 0/7] OMAP4: Add 4460 base support Rajendra Nayak
2011-07-01  2:07 ` [PATCH 1/7] OMAP: ID: introduce chip detection for OMAP4460 Rajendra Nayak
2011-07-01  2:07   ` [PATCH 2/7] OMAP4: ID: add omap_has_feature for max freq supported Rajendra Nayak
2011-07-01  2:07     ` [PATCH 3/7] OMAP4: PRCM: OMAP4460 specific PRM and CM register bitshifts Rajendra Nayak
2011-07-01  2:07       ` [PATCH 4/7] OMAP4: clocks: Update the clock tree with 4460 clock nodes Rajendra Nayak
2011-07-01  2:07         ` [PATCH 5/7] OMAP4: powerdomain: Reuse on 4460 using CHIP_IS_44XX Rajendra Nayak
2011-07-01  2:08           ` [PATCH 6/7] OMAP4: clockdomain: " Rajendra Nayak
2011-07-01  2:08             ` [PATCH 7/7] 4460sdp/blaze/panda: hwmod: Prevent gpio1 reset during hwmod init Rajendra Nayak
2011-07-01  6:32               ` Tony Lindgren
2011-07-03  4:14                 ` Paul Walmsley
2011-07-04  8:53                   ` Tony Lindgren
2011-07-05  7:40                     ` Paul Walmsley
2011-07-05 10:45                       ` Tony Lindgren
2011-07-05 21:47                         ` Paul Walmsley
2011-07-06  6:47                           ` Tony Lindgren
2011-07-01  2:41     ` Todd Poynor [this message]
2011-07-01  4:48       ` [PATCH 2/7] OMAP4: ID: add omap_has_feature for max freq supported Aneesh V
2011-07-01  6:25   ` [PATCH 1/7] OMAP: ID: introduce chip detection for OMAP4460 Tony Lindgren
2011-07-01 10:15     ` Aneesh V
2011-07-01 16:31 ` [PATCH 0/7] OMAP4: Add 4460 base support Kevin Hilman
2011-07-01 16:36 ` Kevin Hilman
2011-07-01 16:40   ` Kevin Hilman
2011-07-01 17:00     ` Rajendra Nayak

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=20110701024128.GA32673@google.com \
    --to=toddpoynor@google.com \
    --cc=aneesh@ti.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox