linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Hecht <uli@fpond.eu>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Dirk Behme <dirk.behme@de.bosch.com>,
	Eugeniu Rosca <erosca@de.adit-jv.com>,
	Ulrich Hecht <ulrich.hecht+renesas@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	Eugeniu Rosca <roscaeugeniu@gmail.com>,
	"George G. Davis" <george_davis@mentor.com>,
	Andy Lowe <andy_lowe@mentor.com>,
	Joshua Frkuska <joshua_frkuska@mentor.com>,
	Tobias Franzen <tfranzen@de.adit-jv.com>,
	Magnus Damm <magnus.damm@gmail.com>, Greg KH <greg@kroah.com>
Subject: Re: [PATCH v2] serial: sh-sci: Support for HSCIF RX sampling point adjustment
Date: Fri, 29 Mar 2019 12:01:46 +0100 (CET)	[thread overview]
Message-ID: <206731540.1535860.1553857306447@webmail.strato.com> (raw)
In-Reply-To: <664574064.1533743.1553855755610@webmail.strato.com>


> On March 29, 2019 at 11:35 AM Ulrich Hecht <uli@fpond.eu> wrote:
> 
> 
> 
> > On March 29, 2019 at 10:56 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > 
> > 
> > Hi Uli,
> > 
> > On Fri, Mar 29, 2019 at 10:46 AM Ulrich Hecht <uli@fpond.eu> wrote:
> > > Reviewing the code, I have found another potential issue: the SRR (sampling rate) value is not validated; only values from 7 to 31 are permissible, according to the datasheet. The values in the debug output above would be fine, though.
> > 
> > Isn't that handled by
> > 
> >                 .sampling_rate_mask = SCI_SR_RANGE(8, 32),
> > 
> > ?
> 
> Having crawled through the related macros, I can confirm that it is.

There is, however, another restriction that is not checked for: The sampling point shift must not exceed half of the sampling rate in either direction. This could happen ATM if the sampling rate is below 16 and the deviation from the desired bit rate is quite large.

That is not so in the case for which debug output has been provided, though, in which the bit rate error is so small that shifting isn't enabled to begin with. I would thus still like to know the numbers for 115200 bps.

CU
Uli

  reply	other threads:[~2019-03-29 11:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 15:48 [PATCH v2] serial: sh-sci: Support for HSCIF RX sampling point adjustment Ulrich Hecht
2018-04-24 15:15 ` Geert Uytterhoeven
2019-03-27 18:35 ` Eugeniu Rosca
2019-03-28  8:33   ` Wolfram Sang
2019-03-28  9:24   ` Geert Uytterhoeven
2019-03-28 10:16     ` Dirk Behme
2019-03-28 11:30       ` Dirk Behme
2019-03-29  7:05         ` Dirk Behme
2019-03-29  9:46           ` Ulrich Hecht
2019-03-29  9:56             ` Geert Uytterhoeven
2019-03-29 10:35               ` Ulrich Hecht
2019-03-29 11:01                 ` Ulrich Hecht [this message]
2019-03-29 11:17             ` Dirk Behme
2019-03-29  9:46           ` Geert Uytterhoeven
2019-03-29 12:13             ` Dirk Behme
2019-03-29 13:00               ` Geert Uytterhoeven
2019-03-29 14:11                 ` Ulrich Hecht
2019-04-01  6:05                 ` Dirk Behme

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=206731540.1535860.1553857306447@webmail.strato.com \
    --to=uli@fpond.eu \
    --cc=andy_lowe@mentor.com \
    --cc=dirk.behme@de.bosch.com \
    --cc=erosca@de.adit-jv.com \
    --cc=geert@linux-m68k.org \
    --cc=george_davis@mentor.com \
    --cc=greg@kroah.com \
    --cc=joshua_frkuska@mentor.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=roscaeugeniu@gmail.com \
    --cc=tfranzen@de.adit-jv.com \
    --cc=ulrich.hecht+renesas@gmail.com \
    --cc=wsa@the-dreams.de \
    /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).