devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Albrecht Dreß" <albrecht.dress-KvP5wT2u2U0@public.gmane.org>
To: w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [Patch] mpc5200b: improve baud rate calculation (reach high baud rates, better accuracy)
Date: Tue, 2 Mar 2010 09:56:48 +0100 (CET)	[thread overview]
Message-ID: <22132814.1267520208614.JavaMail.ngmail@webmail14.arcor-online.net> (raw)
In-Reply-To: <20100302082858.GA4087-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

Hi Wolfram:

[snip]
> > Yes, but I do all /calculations/ with the /4 prescaler for higher
> accuracy.
> > If the divisor exceeds the available 16 bits of the counter reg, I round
> > (divisor / 8) to use the /32 prescaler.  Think of a 19-bit counter value,
> > where I can choose to use either the lower or the higher 16 bits for the
> > counter reg.
> 
> Okay, now I got it. (Maybe this is an indication for another comment above
> the
> set divisor function?)

O.k., I will add that comment...

> > Remember also that using the higher 16 bits (/32 prescaler) is
> > probably the exceptional case - with an IPB frequency of 132 MHz this
> will
> > happen only for standard baud rates B300 and slower.
> 
> Even the rare cases have to be correct ;)

I agree - will make the debug output and comments clearer...

[snip]
> > > This should be handled using a new compatible-entry
> > > "fsl,mpc5200b-psc-uart".
> > 
> 
> > I agree that this would be a lot cleaner, but it's also a lot more
> intrusive.
> > CC'ing the device tree discussion list here... comments, please!!
> 
> Why intrusive? Maybe I miss something?

Not for the source file, but for all the dts files, if they want to benefit from the detection of the '5200B.  Basically, *all* files have to be checked and touched if necessary.  Again, I agree that this would be the clean approach, but I wanted to avoid that effort.  Grant???

[snip]
> Leave those two function pointers empty and fill them during probe (probe
> has
> access to the compatible-property it was matched against, see its
> arguments).
> So it should be a matter of:
> 
> if (matched_property == 5200b)
> 	ops->func = this_one;
> else
> 	ops->func = that_one;

Umm, yes, that's true of course.  Will pick it up.

Thanks, Albrecht.

Tolle Dekolletés oder scharfe Tatoos? Vote jetzt ... oder mach selbst mit und zeige Deine Schokoladenseite
bei Topp oder Hopp von Arcor: http://www.arcor.de/rd/footer.toh

  parent reply	other threads:[~2010-03-02  8:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02  8:09 [Patch] mpc5200b: improve baud rate calculation (reach high baud rates, better accuracy) Albrecht Dreß
2010-03-02  8:28 ` Wolfram Sang
     [not found] ` <20100302082858.GA4087-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-02  8:56   ` Albrecht Dreß [this message]
2010-03-02 15:27     ` Wolfram Sang
2010-03-02 20:12     ` Grant Likely
2010-03-02 20:06 ` Grant Likely

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=22132814.1267520208614.JavaMail.ngmail@webmail14.arcor-online.net \
    --to=albrecht.dress-kvp5wt2u2u0@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).