All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Aguiar <carlos.aguiar@indt.org.br>
To: ext David Cohen <david.cohen@indt.org.br>
Cc: linux-omap@vger.kernel.org, linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] OMAP System Control fix for OMAP2420
Date: Mon, 10 Dec 2007 15:44:46 -0400	[thread overview]
Message-ID: <475D972E.4070402@indt.org.br> (raw)
In-Reply-To: <1196897904-23457-1-git-send-email-david.cohen@indt.org.br>

ext David Cohen wrote:
> OMAP2420 has a different offset for CONTROL_STATUS register.
>
> Signed-off-by: David Cohen <david.cohen@indt.org.br>
> ---
>  arch/arm/mach-omap2/board-h4.c      |    2 +-
>  arch/arm/mach-omap2/id.c            |    5 ++++-
>  arch/arm/plat-omap/sram.c           |    2 +-
>  include/asm-arm/arch-omap/control.h |    3 +++
>  4 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
> index 70c948c..4d5db60 100644
> --- a/arch/arm/mach-omap2/board-h4.c
> +++ b/arch/arm/mach-omap2/board-h4.c
> @@ -272,7 +272,7 @@ static struct platform_device *h4_devices[] __initdata = {
>  /* 2420 Sysboot setup (2430 is different) */
>  static u32 get_sysboot_value(void)
>  {
> -	return (ctrl_read_reg(CONTROL_STATUS) & 0xFFF);
> +	return (ctrl_read_reg(OMAP242X_CONTROL_STATUS) & 0xFFF);
>  }
>  
>  /* FIXME: This function should be moved to some other file, gpmc.c? */
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 393b593..d84bf0e 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -162,7 +162,10 @@ void __init omap2_check_revision(void)
>  	/* Embedding the ES revision info in type field */
>  	system_rev = omap_ids[j].type;
>  
> -	ctrl_status = ctrl_read_reg(CONTROL_STATUS);
> +	if (cpu_is_omap242x())
> +		ctrl_status = ctrl_read_reg(OMAP242X_CONTROL_STATUS);
> +	else;
> +		ctrl_status = ctrl_read_reg(CONTROL_STATUS);
>  	system_rev |= (ctrl_status & 0x3f);
>  	system_rev |= (ctrl_status & 0x700);
>  
> diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
> index dd8dc04..851d4ee 100644
> --- a/arch/arm/plat-omap/sram.c
> +++ b/arch/arm/plat-omap/sram.c
> @@ -94,7 +94,7 @@ static int is_sram_locked(void)
>  
>  #if defined(CONFIG_ARCH_OMAP242X)
>  	if (cpu_is_omap242x())
> -		type = ctrl_read_reg(CONTROL_STATUS) & TYPE_MASK;
> +		type = ctrl_read_reg(OMAP242X_CONTROL_STATUS) & TYPE_MASK;
>  #endif
>  
>  	if (type == GP_DEVICE) {
> diff --git a/include/asm-arm/arch-omap/control.h b/include/asm-arm/arch-omap/control.h
> index 5f42725..6609bb3 100644
> --- a/include/asm-arm/arch-omap/control.h
> +++ b/include/asm-arm/arch-omap/control.h
> @@ -38,6 +38,9 @@
>  #define CONTROL_DEVCONF0		(CONTROL_GENERAL + 0x04)
>  #define CONTROL_DEVCONF1		(CONTROL_GENERAL + 0x68) /* > 242x */
>  #define CONTROL_STATUS			(CONTROL_GENERAL + 0x80)
> +#define OMAP242X_CONTROL_STATUS		(CONTROL_STATUS + 0x08)
> +#define OMAP243X_CONTROL_STATUS		(CONTROL_STATUS)
> +#define OMAP34XX_CONTROL_STATUS		(CONTROL_STATUS)
>  
>  
>  /*
>   
Hi David,

Patch tested and working fine on H4 boards, it boots with no problems.

BR,

Carlos.

-- 
Carlos Eduardo Aguiar
Nokia Institute of Technology - INdT
Open Source Mobile Research Center - OSMRC - Manaus
Core Team
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: carlos.aguiar@indt.org.br

       reply	other threads:[~2007-12-10 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1196897904-23457-1-git-send-email-david.cohen@indt.org.br>
2007-12-10 19:44 ` Carlos Aguiar [this message]
2007-12-10 23:11   ` [PATCH] OMAP System Control fix for OMAP2420 Kyungmin Park
2007-12-10 23:22     ` David Cohen

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=475D972E.4070402@indt.org.br \
    --to=carlos.aguiar@indt.org.br \
    --cc=david.cohen@indt.org.br \
    --cc=linux-omap-open-source@linux.omap.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.