All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] clocksource: SuperH TMU Timer driver
Date: Mon, 01 Jun 2009 10:50:40 +0000	[thread overview]
Message-ID: <aec7e5c30906010350n78632cb8va56f342ea8e3d4ca@mail.gmail.com> (raw)
In-Reply-To: <20090501065100.8800.99808.sendpatchset@rx1.opensource.se>

Hi Kawasaki-san,

2009/5/30 Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>:
> Hi Magnus, could you provide an answer to my question on SH-TMU?
>
> Magnus Damm wrote:
>> From: Magnus Damm <damm@igel.co.jp>
>>
>> This patch adds a TMU driver for the SuperH architecture.

>> +     /* reload delta value in case of periodic timer */
>> +     if (periodic)
>> +             sh_tmu_write(p, TCOR, delta);
>> +     else
>> +             sh_tmu_write(p, TCOR, 0);

> In some occasions, qemu-sh prints out a lot of warnings on timer
> with this message : 'Timer with period zero. disabling.'
>
> I made some investigation, and found that the warnings are printed
> after zero value is set to TCOR.  I checked SH7785 hardware manual,
> but could not find any description what happens when zero value set
> to TCOR.

Thanks for investigating. I read a few SH manuals before converting
the old driver, but I couldn't find any description of zero value.
Same as you.

The idea with zero value TCOR comes from the old driver. It may be
there for some historical reason, or it may just be plain wrong. I've
sometimes seen interrupt bursts with the old tmu driver which may be
related.

> According to the code above, I guess that TMU works as a non-periodic
> one-shot timer when the TCOR value is zero. Is it right?

Yes, you are correct.

Maybe we should disable the timer channel in a different way. I'm open
to suggestions. =)

Cheers,

/ magnus

  parent reply	other threads:[~2009-06-01 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-01  6:51 [PATCH] clocksource: SuperH TMU Timer driver Magnus Damm
2009-05-30 13:27 ` Shin-ichiro KAWASAKI
2009-06-01 10:50 ` Magnus Damm [this message]
2009-06-01 10:57 ` Paul Mundt
2009-06-01 22:37 ` Shin-ichiro KAWASAKI
2009-06-11 15:51 ` Shin-ichiro KAWASAKI

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=aec7e5c30906010350n78632cb8va56f342ea8e3d4ca@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=linux-sh@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.