All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: Scott Wood <scottwood@freescale.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 17:04:56 +0100	[thread overview]
Message-ID: <200811211704.56808.laurentp@cse-semaphore.com> (raw)
In-Reply-To: <20081120195347.GA29459@ld0162-tx32.am.freescale.net>

Hi Scott,

On Thursday 20 November 2008, Scott Wood wrote:
> On Thu, Nov 20, 2008 at 01:32:23PM +0100, Laurent Pinchart wrote:
> > Instead of rounding the divider down, improve the baud-rate generators
> > accuracy by rounding to the nearest integer.
> >
> > Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
>
> 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 :-/

Could you measure the serial baudrate with and without the patch using an 
oscilloscope ?

> Possibly the crystal is a little off,

That's always possible.

> or maybe it's just better to be a little too fast than a little too slow for
> some reason? 
>
> 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 ? Accuracy would be improved, but power 
consumption will raise as well :-/

Best regards,

Laurent Pinchart

  reply	other threads:[~2008-11-21 16:04 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 [this message]
2008-11-21 17:00     ` Scott Wood
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=200811211704.56808.laurentp@cse-semaphore.com \
    --to=laurentp@cse-semaphore.com \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    --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 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.