public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Coldfire: MCF5271: Periodic HW watchdog petting and sleep function does not work.
Date: Thu, 19 Mar 2009 17:15:09 -0400	[thread overview]
Message-ID: <49C2B5DD.1000905@RuggedCom.com> (raw)
In-Reply-To: <49B0282A.6010203@RuggedCom.com>

Richard Retanubun wrote:
> Hi TC,
> 
> TC Liew wrote:
>> Richard,
>>  
>> Is there a purpose that you used DTIMER 3 but not 1 or 2? FYI: DTIMER3 
>> is currently used for system time, DTIMER0 is currently used for 
>> udelay() in u-boot.
>>  
>> You can change the u-boot 5271's system timer in 
>> include/asm-m68k/immap.h.
>> #define CONFIG_SYS_TMR_BASE       (MMAP_DTMR1)
>> #define CONFIG_SYS_TMRINTR_NO    (INT0_LO_DTMR1)
>> #define CONFIG_SYS_TMRINTR_MASK (INTC_IPRL_INT20)
>>  
>> Regards,
>> TsiChung
> 
Hi TC,

Sorry for the long-delay on this issue, I got tasked with other stuff,
but thanks to your hint from the last e-mail,
I think I might have found the root-cause to the problem.

In include/asm-m68k/immap.h.

#ifdef CONFIG_M5271
#include <asm/immap_5271.h>
#include <asm/m5271.h>

#define CONFIG_SYS_FEC0_IOBASE		(MMAP_FEC)
#define CONFIG_SYS_UART_BASE		(MMAP_UART0 + (CONFIG_SYS_UART_PORT * 0x40))

/* Timer */
#ifdef CONFIG_MCFTMR
#define CONFIG_SYS_UDELAY_BASE		(MMAP_DTMR0)
#define CONFIG_SYS_TMR_BASE		(MMAP_DTMR3)
#define CONFIG_SYS_TMRPND_REG		(((volatile int0_t *)(CONFIG_SYS_INTR_BASE))->iprl0)
#define CONFIG_SYS_TMRINTR_NO		(INT0_LO_DTMR3)
#define CONFIG_SYS_TMRINTR_MASK	(INTC_IPRL_INT22)
#define CONFIG_SYS_TMRINTR_PEND	(CONFIG_SYS_TMRINTR_MASK)

#define CONFIG_SYS_TMRINTR_PRI		(0)		/* Level must include inorder to work */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#define CONFIG_SYS_TIMER_PRESCALER	(((gd->bus_clk / 1000000) - 1) << 8)
#endif

According to MCF5271 RefMan Rev 2 (07/2006) page 13-12,
I think this means that the interrupt, although unmasked, have a level 0, priority 0,
which essentially disables it.

What should be the proper value? (0x09) will make it level 1, priority 1, is this ok?
Or am I chasing the wrong rabbit?

Thanks for your time

- Richard

  parent reply	other threads:[~2009-03-19 21:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 21:05 [U-Boot] Coldfire: MCF5271: Periodic HW watchdog petting and sleep function does not work Richard Retanubun
2009-03-03 23:15 ` TC Liew
2009-03-04 13:14   ` Richard Retanubun
     [not found]     ` <a90206390903050739i2a2f4296l97251d4c1f656551@mail.gmail.com>
     [not found]       ` <49B0282A.6010203@RuggedCom.com>
2009-03-19 21:15         ` Richard Retanubun [this message]
2009-03-26 19:08           ` TC Liew
2009-03-26 19:34             ` Richard Retanubun

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=49C2B5DD.1000905@RuggedCom.com \
    --to=richardretanubun@ruggedcom.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