Re: [PATCH v2] serial: sh-sci: Support for HSCIF RX sampling point adjustment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On March 29, 2019 at 11:35 AM Ulrich Hecht <uli@xxxxxxxx> wrote:
> 
> 
> 
> > On March 29, 2019 at 10:56 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > 
> > 
> > Hi Uli,
> > 
> > On Fri, Mar 29, 2019 at 10:46 AM Ulrich Hecht <uli@xxxxxxxx> 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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux