lkml.org 
[lkml]   [2015]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] always probe UART HW when options are not specified
On Thu, Dec 17, 2015 at 05:48:42PM +0100, Sebastian Frias wrote:
> On 12/17/2015 05:29 PM, Peter Hurley wrote:
> >On 12/17/2015 07:15 AM, Sebastian Frias wrote:
> >>---
> >>
> >>I think there are a few minor bugs on the 8250 UART code.
> >>
> >>Below you can find a patch with a proposed solution.
> >>
> >>In a nutshell:
> >>- probe_baud from 87515772c33ee8a0cc08d984a7d2401eeff074cd was
> >>converted into probe_port so that it reads all the parameters that
> >>uart_set_options require (namely baud, parity, bits, flow).
> >>- reading/writing to UART_DLL/UART_DLM directly are converted to
> >>using the read_dl/write_dl callbacks.
> >>- the port is always probed if there are no options (*).
> >
> >Because I don't want to probe the port at all.
> >
> >But must when using the
> > earlycon=ttyS0,....
> >
> >command-line (because the original hack expects that behavior).
>
> Ok, we are using:
>
> "console=ttyS0 earlyprintk"
>
> and the 8250 (with CONFIG_SERIAL_8250_RT288X=y) driver.
>
> The hardware is setup prior to Linux boot.
> We don't want Linux to change the UART settings, just to pick up whatever
> settings the UART has and take over UART.

Don't do that :)
Linux can't "know" what happened before it started to the hardware and
expect to work properly.

> How do you suggest we do that? Right now, since it does not probe, it just
> messes up the UART config setup before booting Linux.

pass in the same settings as you previously set up, that way there is no
change.

thanks,

greg k-h


\
 
 \ /
  Last update: 2015-12-17 18:41    [W:0.146 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site