2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 15:43:59 +08:00
linux-next/drivers/tty/serial/8250
Matt Redfearn 0ff3ab7019 serial: 8250_early: Only set divisor if valid clk & baud
If either uartclk or baud are 0, avoid calculating and setting a divisor
based on them since the output will almost certainly be garbage.

This also allows platforms such as the MIPS generic kernel, which has no
way to know a valid BASE_BASE for the board it is actually booted on at
compile time, to set BASE_BAUD to 0 and avoid early_8250 setting a bad
divisor.

This fixes a regression caused by commit 31cb9a8575 ("earlycon:
initialise baud field of earlycon device structure"), which changed the
behavior of of_setup_earlycon such that it sets a baud rate in the
earlycon structure where previously it was left as 0. All boards
supported by the MIPS generic kernel started outputting garbage from the
boot console due to an incorrect divisor being set.

Fixes: 31cb9a8575 ("earlycon: initialise baud field of earlycon device structure")
Cc: stable <stable@vger.kernel.org> # 4.14
Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 15:55:15 +01:00
..
8250_accent.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_acorn.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_aspeed_vuart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_bcm2835aux.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_boca.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_core.c treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts 2017-11-21 16:35:54 -08:00
8250_dma.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_dw.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_early.c serial: 8250_early: Only set divisor if valid clk & baud 2017-11-28 15:55:15 +01:00
8250_em.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_exar_st16c554.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_exar.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fintek.c serial: 8250_fintek: Fix crash with baud rate B0 2017-11-08 13:09:35 +01:00
8250_fourport.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fsl.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_gsc.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_hp300.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
8250_hub6.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_ingenic.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_lpc18xx.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_lpss.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_men_mcb.c Introduce 8250_men_mcb 2017-08-28 20:51:22 +02:00
8250_mid.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_moxa.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_mtk.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_of.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_omap.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
8250_pci.c serial: 8250_pci: Add Amazon PCI serial device ID 2017-11-28 15:55:15 +01:00
8250_pnp.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_port.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_pxa.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_uniphier.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
Kconfig Introduce 8250_men_mcb 2017-08-28 20:51:22 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
serial_cs.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00