From: morimoto.kuninori@renesas.com
To: linux-sh@vger.kernel.org
Subject: Re: [Review request] sh-sci clock
Date: Tue, 14 Apr 2009 02:08:50 +0000 [thread overview]
Message-ID: <uiql82dhp.wl%morimoto.kuninori@renesas.com> (raw)
In-Reply-To: <ur5zxgnmk.wl%morimoto.kuninori@renesas.com>
Dear Paul
> > static inline int scbrr_calc(struct uart_port *port, int bps, int clk)
> > {
> > if (port->type = PORT_SCIF)
> > - return (clk+16*bps)/(32*bps)-1;
> > + return (clk/(32*bps))-1;
> > else
> > - return ((clk*2)+16*bps)/(16*bps)-1;
> > + return (clk/(16*bps))-1;
> > }
> > #define SCBRR_VALUE(bps, clk) scbrr_calc(port, bps, clk)
> > #elif defined(__H8300H__) || defined(__H8300S__)
>
> This looks like an unrelated change, can you explain what this is about?
When SCIFA of SH7723/SH7724 use bus_clk,
SCBRR value calculation will be changed.
Current SCIFA use module_clk,
and above calculation for SH7723 is (mey be) depend on ap325 board.
module_clk of ap325 is 33MHz and bus_clk is 66MHz,
mey be (clk*2) mean it.
But ms7724se module_clk is 33MHz and bus_clk is 83MHz.
So, ms7724se board's SCIFA can not work on it.
And current SCIF(SCIFA also) calculation is wrong.
I don't know why this calculation is used.
return (clk+16*bps)/(32*bps)-1;
=>
return clk/(32*bps) - 1/2;
This calculation might be OK by lucky.
Best regards
--
Kuninori Morimoto
next prev parent reply other threads:[~2009-04-14 2:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-13 4:17 [Review request] sh-sci clock Kuninori Morimoto
2009-04-13 21:34 ` Paul Mundt
2009-04-14 0:00 ` Paul Mundt
2009-04-14 0:19 ` morimoto.kuninori
2009-04-14 2:08 ` morimoto.kuninori [this message]
2009-04-14 3:08 ` Paul Mundt
2009-04-14 5:01 ` morimoto.kuninori
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=uiql82dhp.wl%morimoto.kuninori@renesas.com \
--to=morimoto.kuninori@renesas.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