From: Scott Wood <scottwood@freescale.com>
To: Laurent Pinchart <laurentp@cse-semaphore.com>
Cc: linuxppc-dev@ozlabs.org, kumar.gala@freescale.com, vbordug@ru.mvista.com
Subject: Re: [PATCH] cpm2: Round the baud-rate clock divider to the nearest integer.
Date: Fri, 21 Nov 2008 11:00:34 -0600 [thread overview]
Message-ID: <4926E932.8080105@freescale.com> (raw)
In-Reply-To: <200811211704.56808.laurentp@cse-semaphore.com>
Laurent Pinchart wrote:
> On Thursday 20 November 2008, Scott Wood wrote:
>> This makes things worse on mpc8272ads -- the result of the division is
>> 13.56, but I only get error-free serial output when rounding down. I
>> don't think the remote end has timing problems, as I don't see this with
>> any other board.
>
> I get exactly the opposite here with an mpc8248 base board. Rounding down
> makes 115200bds completely unreliable :-/
Hmm... In that case, I'm OK with the patch as it's technically more
correct, and clearly what we want if the quotient comes out to something
like 13.95. Maybe mpc8272ads board code could apply some sort of tweak
to the brg frequency.
The right answer is probably that if you want reliable standard baud
rates, the board designer should ensure a suitable clock is available,
rather than picking some random clock and hoping it divides nicely.
> Could you measure the serial baudrate with and without the patch using an
> oscilloscope ?
Not easily; I'm a software person and would have to track down someone
to lend me one and show me how to use it. I may try using ntpdate to
measure timebase drift, as it should be off by the same percentage.
>> Maybe we should change CPM_CLK to be MAIN_CLK/4 rather than MAIN_CLK/16
>> when the BRG clock is below a certain frequency.
>
> Isn't that the job of the boot loader ?
Sure, I didn't necessarily mean "linux" by "we". :-)
> Accuracy would be improved, but power
> consumption will raise as well :-/
Granted... though it's actually BRG_CLK and not CPM_CLK that I meant, so
hopefully it wouldn't make too much of a difference in power.
-Scott
next prev parent reply other threads:[~2008-11-21 17:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 12:32 [PATCH] cpm2: Round the baud-rate clock divider to the nearest integer Laurent Pinchart
2008-11-20 15:32 ` Kumar Gala
2008-11-20 15:57 ` Laurent Pinchart
2008-11-20 16:00 ` Kumar Gala
2008-11-20 16:42 ` Laurent Pinchart
2009-01-15 13:18 ` Laurent Pinchart
2009-01-15 14:42 ` Kumar Gala
2009-01-15 14:58 ` Laurent Pinchart
2009-01-15 17:54 ` Scott Wood
2009-01-15 18:57 ` Kumar Gala
2009-01-16 9:50 ` Laurent Pinchart
2008-11-20 19:53 ` Scott Wood
2008-11-21 16:04 ` Laurent Pinchart
2008-11-21 17:00 ` Scott Wood [this message]
2009-01-27 17:20 ` Kumar Gala
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=4926E932.8080105@freescale.com \
--to=scottwood@freescale.com \
--cc=kumar.gala@freescale.com \
--cc=laurentp@cse-semaphore.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=vbordug@ru.mvista.com \
/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;
as well as URLs for NNTP newsgroup(s).