public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Resubmit : [PATCH] Correct ARM Versatile Timer Initialization
Date: Mon, 11 Aug 2008 23:11:37 +0200	[thread overview]
Message-ID: <20080811211137.GC9467@game.jcrosoft.org> (raw)
In-Reply-To: <5BF78BCE8D9BF14A83F836BD9E3916BA23C226@blrms.slti.sanyo.co.in>

On 06:30 Mon 04 Aug     , Gururaja Hebbar K R wrote:
> - According to ARM Dual-Timer Module (SP804) TRM (ARM DDI0271), 
>  -- Timer Value Register @ TIMER Base + 4 is Read-only. 
>  -- Prescale Value (Bits 3-2 of TIMER Control register) 
> 	can only be one of 00,01,10. 11 is undefined.
> 
> Signed-off-by: Gururaja Hebbar <gururajakr@sanyo.co.in>
> ---
>  cpu/arm926ejs/versatile/timer.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/cpu/arm926ejs/versatile/timer.c b/cpu/arm926ejs/versatile/timer.c
> index 32872d2..9659b67 100644
> --- a/cpu/arm926ejs/versatile/timer.c
> +++ b/cpu/arm926ejs/versatile/timer.c
> @@ -50,8 +50,7 @@ static ulong lastdec;
>  int timer_init (void)
>  {
>  	*(volatile ulong *)(CFG_TIMERBASE + 0) = CFG_TIMER_RELOAD;	/* TimerLoad */
> -	*(volatile ulong *)(CFG_TIMERBASE + 4) = CFG_TIMER_RELOAD;	/* TimerValue */
> -	*(volatile ulong *)(CFG_TIMERBASE + 8) = 0x8C;
> +	*(volatile ulong *)(CFG_TIMERBASE + 8) = 0x80;

according to datasheet for the register TimerXControl

we are supposed to not modify the bits [31:8] and [4]

so we are suppose to read the register and modify only the others
register.

Best Regards,
J.

  reply	other threads:[~2008-08-11 21:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04  1:00 [U-Boot-Users] Resubmit : [PATCH] Correct ARM Versatile Timer Initialization Gururaja Hebbar K R
2008-08-11 21:11 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-08-12  2:57   ` [U-Boot] " Gururaja Hebbar K R
2008-08-12  7:23     ` Peter Pearse
2008-08-12  8:36       ` Jean-Christophe PLAGNIOL-VILLARD
2008-08-15  9:01         ` [U-Boot] Resubmit : [PATCH] Correct ARM Versatile TimerInitialization Gururaja Hebbar K R
     [not found]         ` <FADDE7A05FA0A649BE2BE1D9B1CEDBEF2E69B7@blrms.slti.sanyo.co.in>
2008-08-19  0:51           ` Gururaja Hebbar K R
  -- strict thread matches above, loose matches on Subject: below --
2008-08-01  4:50 [U-Boot-Users] Resubmit : [PATCH] Correct ARM Versatile Timer Initialization Gururaja Hebbar K R
2008-08-01 10:39 ` Wolfgang Denk

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=20080811211137.GC9467@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=u-boot@lists.denx.de \
    /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