All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-omap@vger.kernel.org, Kevin Hilman <khilman@deeprootsystems.com>
Subject: Re: [PATCH] OMAP2/3/4: ioremap address space
Date: Tue, 26 Jan 2010 07:46:08 -0800	[thread overview]
Message-ID: <20100126154608.GA17449@atomide.com> (raw)
In-Reply-To: <1264495210-17344-2-git-send-email-santosh.shilimkar@ti.com>

* Santosh Shilimkar <santosh.shilimkar@ti.com> [100126 00:37]:
> This patch update the sdrc, prcm, tap and control module to
> allocate iospace dynamically
> 
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> CC: Kevin Hilman <khilman@deeprootsystems.com>
> CC: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/control.c |    6 +++++-
>  arch/arm/mach-omap2/id.c      |    7 ++++++-
>  arch/arm/mach-omap2/prcm.c    |   16 +++++++++++++---
>  arch/arm/mach-omap2/sdrc.c    |   11 +++++++++--
>  4 files changed, 33 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
> index cdd1f35..43f8a33 100644
> --- a/arch/arm/mach-omap2/control.c
> +++ b/arch/arm/mach-omap2/control.c
> @@ -140,7 +140,11 @@ static struct omap3_control_regs control_context;
>  
>  void __init omap2_set_globals_control(struct omap_globals *omap2_globals)
>  {
> -	omap2_ctrl_base = omap2_globals->ctrl;
> +	/* Static mapping, never released */
> +	if (omap2_globals->ctrl) {
> +		omap2_ctrl_base = ioremap(omap2_globals->ctrl, SZ_4K);
> +		WARN_ON(!omap2_ctrl_base);
> +	}
>  }
>  
>  void __iomem *omap_ctrl_base_get(void)
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index a091b53..fb5921b 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -407,7 +407,12 @@ void __init omap2_check_revision(void)
>  void __init omap2_set_globals_tap(struct omap_globals *omap2_globals)
>  {
>  	omap_revision = omap2_globals->class;
> -	tap_base = omap2_globals->tap;
> +
> +	/* Static mapping, never released */
> +	if (omap2_globals->tap) {
> +		tap_base = ioremap(omap2_globals->tap, SZ_4K);
> +		WARN_ON(!tap_base);
> +	}
>  
>  	if (cpu_is_omap34xx())
>  		tap_prod_id = 0x0210;

Nice clean-up.

We need to check carefully that the cpu detection is done by the time
we do the ioremap.. Initially we only know the machine class such as
34xx/24xx.

We have at least cpu_is_omap2420 and cpu_is_omap2430 being used in io.c,
so all these mappings may not work properly.

Also, we should merge this as one patch to keep the system booting
between the patches.

Regards,

Tony

  reply	other threads:[~2010-01-26 15:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26  8:40 [PATCH] OMAP2/3/4: Convert bases in omap_globals to physical address Santosh Shilimkar
2010-01-26  8:40 ` [PATCH] OMAP2/3/4: ioremap address space Santosh Shilimkar
2010-01-26 15:46   ` Tony Lindgren [this message]
2010-01-27  5:09     ` Shilimkar, Santosh
2010-01-27  5:44     ` Shilimkar, Santosh
2010-02-04 19:48 Shilimkar, Santosh
2010-02-04 21:50 ` Tony Lindgren
2010-02-05  5:32   ` Shilimkar, Santosh
2010-02-05 13:59     ` Shilimkar, Santosh

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=20100126154608.GA17449@atomide.com \
    --to=tony@atomide.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@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 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.