[devel] [PATCH 18/35] [rejected] serial: 8250_dw: verify clock rate in dw8250_set_termios
Andy Shevchenko
andriy.shevchenko на linux.intel.com
Пт Май 20 19:53:15 MSK 2022
On Fri, May 20, 2022 at 08:28:32PM +0400, asheplyakov на yandex.ru wrote:
> From: Alexey Sheplyakov <asheplyakov на basealt.ru>
>
> Refuse to change the clock rate if clk_round_rate() returns
> a rate which is way too off (i.e. by more than 1/16 from the one
> necessary for a given baud rate). In particular this happens if
> the requested rate is below the minimum supported by the clock.
>
> Fixes the UART console on Baikal-M SoC. Without this patch the
> console gets garbled immediately after loading the driver.
> dw8250_set_termios tries to configure the baud rate (115200),
> and calls clk_round_rate to figure out the supported rate closest
> to 1843200 Hz (which is 115200 * 16). However the (SoC-specific)
> clock driver returns 4705882 Hz. This frequency is way too off,
> hence after setting it the console gets garbled.
>
> Signed-off-by: Alexey Sheplyakov <asheplyakov на basealt.ru>
> Signed-off-by: Vadim V. Vlasov <vadim.vlasov на elpitech.ru>
>
> Cc: Andy Shevchenko <andriy.shevchenko на linux.intel.com>
> Cc: Greg Kroah-Hartman <gregkh на linuxfoundation.org>
> Cc: Serge Semin <Sergey.Semin на baikalelectronics.ru>
> X-feature-Baikal-M
I don't know if you have any specific hooks, but the blank lines are not
acceptable in the tag block. I think you have script which cuts the last block
from the real (public) patch.
In any case, the main point here is to point out that externals probably won't
be happy seeing this internal stuff.
--
With Best Regards,
Andy Shevchenko
Подробная информация о списке рассылки Devel