public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: Sanjeev Premi <premi@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/3] Runitme check for OMAP35x
Date: Sun, 11 Jan 2009 00:20:53 +0200	[thread overview]
Message-ID: <20090110222050.GJ25493@frodo> (raw)
In-Reply-To: <1231617654-18729-1-git-send-email-premi@ti.com>

On Sun, Jan 11, 2009 at 01:30:54AM +0530, Sanjeev Premi wrote:
> Added runtime check via omap2_set_globals_35xx()
> 
> Signed-off-by: Sanjeev Premi <premi@ti.com>
> ---
>  arch/arm/plat-omap/common.c              |   68 +++++++++++++++++++++++
>  arch/arm/plat-omap/include/mach/common.h |    1 +
>  arch/arm/plat-omap/include/mach/cpu.h    |   88 +++++++++++++++++++++++++++++-
>  3 files changed, 155 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
> index 8c53125..7861a25 100644
> --- a/arch/arm/plat-omap/common.c
> +++ b/arch/arm/plat-omap/common.c
> @@ -333,3 +333,71 @@ void __init omap2_set_globals_343x(void)
>  }
>  #endif
>  
> +#if defined(CONFIG_ARCH_OMAP35XX)
> +
> +#if defined(CONFIG_ARCH_OMAP3503)

use ifdef here

> +static struct omap_globals omap3503_globals = {
> +	.class	= OMAP35XX_CLASS,
> +	.tap	= OMAP2_IO_ADDRESS(0x4830A000),
> +	.sdrc	= OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE),
> +	.sms	= OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE),
> +	.ctrl	= OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE),
> +	.prm	= OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE),
> +	.cm	= OMAP2_IO_ADDRESS(OMAP3430_CM_BASE),
> +};
> +#endif	/* if defined(CONFIG_ARCH_OMAP3503) */

traditionaly this would be:

#endif	/* CONFIG_ARCH_OMAP3503 */

but that's a matter of taste...

> +
> +#if defined(CONFIG_ARCH_OMAP3515)

and here

> +static struct omap_globals omap3515_globals = {
> +	.class	= OMAP35XX_CLASS,
> +	.tap	= OMAP2_IO_ADDRESS(0x4830A000),
> +	.sdrc	= OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE),
> +	.sms	= OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE),
> +	.ctrl	= OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE),
> +	.prm	= OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE),
> +	.cm	= OMAP2_IO_ADDRESS(OMAP3430_CM_BASE),
> +};
> +#endif	/* if defined(CONFIG_ARCH_OMAP3515) */
> +
> +#if defined(CONFIG_ARCH_OMAP3525)
> +static struct omap_globals omap3525_globals = {
> +	.class	= OMAP35XX_CLASS,
> +	.tap	= OMAP2_IO_ADDRESS(0x4830A000),
> +	.sdrc	= OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE),
> +	.sms	= OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE),
> +	.ctrl	= OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE),
> +	.prm	= OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE),
> +	.cm	= OMAP2_IO_ADDRESS(OMAP3430_CM_BASE),
> +};
> +#endif	/* if defined(CONFIG_ARCH_OMAP3525) */
> +
> +#if defined(CONFIG_ARCH_OMAP3530)
> +static struct omap_globals omap3530_globals = {
> +	.class	= OMAP35XX_CLASS,
> +	.tap	= OMAP2_IO_ADDRESS(0x4830A000),
> +	.sdrc	= OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE),
> +	.sms	= OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE),
> +	.ctrl	= OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE),
> +	.prm	= OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE),
> +	.cm	= OMAP2_IO_ADDRESS(OMAP3430_CM_BASE),
> +};
> +#endif	/* if defined(CONFIG_ARCH_OMAP3530) */
> +
> +void __init omap2_set_globals_35xx(void)
> +{
> +#if defined(CONFIG_ARCH_OMAP3503)
> +	omap2_globals = &omap3503_globals;
> +#endif
> +#if defined(CONFIG_ARCH_OMAP3515)
> +	omap2_globals = &omap3515_globals;
> +#endif
> +#if defined(CONFIG_ARCH_OMAP3525)
> +	omap2_globals = &omap3525_globals;
> +#endif
> +#if defined(CONFIG_ARCH_OMAP3530)
> +	omap2_globals = &omap3530_globals;
> +#endif

hmmm... so it's impossible to have multi-omap with 35xx ??
too bad...

You should probably provide omap2_set_globals_350x(),
omap2_set_globals_351x(), omap2_set_globals_352x() and
omap2_set_globals_353x().

Tony, what do you think ??

-- 
balbi

  reply	other threads:[~2009-01-10 22:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-10 20:00 [PATCH 2/3] Runitme check for OMAP35x Sanjeev Premi
2009-01-10 22:20 ` Felipe Balbi [this message]
2009-01-12 12:27   ` Tony Lindgren
2009-01-12 12:46     ` Premi, Sanjeev
2009-01-12 12:54       ` 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=20090110222050.GJ25493@frodo \
    --to=me@felipebalbi.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=premi@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