From: yoshii.takashi@gmail.com
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh-sci: fix SCBRR value calculation
Date: Tue, 14 Apr 2009 05:37:08 +0000 [thread overview]
Message-ID: <20090414143708.0bc57473.yoshii.takashi@gmail.com> (raw)
In-Reply-To: <ud4bf3jpm.wl%morimoto.kuninori@renesas.com>
Please don't omit that term, that is for "round to near" operation.
round_to_near(clk/(32*bps)) -1
--> round_to_zero(clk/(32*bps) + 0.5) -1
--> (int)((clk+16*bps)/(32*bps)) -1
> - return (clk+16*bps)/(32*bps)-1;
> + return (clk/(32*bps)) - 1;
Former one is correct.
> - return ((clk*2)+16*bps)/(16*bps)-1;
> + return ((clk*2)/(16*bps)) - 1;
Both incorrect? Perhaps,
return ((clk*2)+8*bps)/(16*bps) - 1;
I don't have read 7723 HW manual, though.
/yoshii
next prev parent reply other threads:[~2009-04-14 5:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 4:34 [PATCH] sh-sci: fix SCBRR value calculation Kuninori Morimoto
2009-04-14 5:37 ` yoshii.takashi [this message]
2009-04-14 5:53 ` morimoto.kuninori
2009-04-22 0:36 ` Paul Mundt
2009-04-22 2:50 ` Kuninori Morimoto
2009-04-22 2:55 ` Paul Mundt
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=20090414143708.0bc57473.yoshii.takashi@gmail.com \
--to=yoshii.takashi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox