x86/serial: Use generic BASE_BAUD in asm/serial.h
Subsystems (2)
PATCH 1/2 x86/serial: Use generic BASE_BAUD in asm/serial.h
Include asm-generic/serial.h and use the generic BASE_BAUD definition instead of redefining it. Consolidate the comments accordingly.
No functional change.
Signed-off-by Thorsten Blum <[email protected]>
---
Please note that patch 1/2 was originally submitted as a separate patch:
https://lore.kernel.org/r/[email protected]/
arch/x86/include/asm/serial.h | 9 +-------- include/asm-generic/serial.h | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-)
arch/x86/include/asm/serial.h +1 -8
@@ -2,14 +2,7 @@#ifndef _ASM_X86_SERIAL_H#define _ASM_X86_SERIAL_H -/* -* This assumes you have a 1.8432 MHz clock for your UART. -* -* It'd be nice if someone built a serial card with a 24.576 MHz -* clock, since the 16550A is capable of handling a top speed of 1.5 -* megabits/second; but this requires a faster clock. -*/ -#define BASE_BAUD (1843200/16) +#include <asm-generic/serial.h> /* Standard COM flags (except for COM4, because of the 8514 problem) */ #ifdef CONFIG_SERIAL_8250_DETECT_IRQ
include/asm-generic/serial.h +3 -3
@@ -3,10 +3,10 @@#define __ASM_GENERIC_SERIAL_H/* -* This should not be an architecture specific #define, oh well. +* This should not be an architecture-specific definition. * -* Traditionally, it just describes i8250 and related serial ports -* that have this clock rate. +* Traditionally, it describes i8250 and related serial ports using +* a 1.8432 MHz UART clock. */ #define BASE_BAUD (1843200 / 16)
PATCH 2/2 x86/boot: Use BASE_BAUD from asm/serial.h
Use BASE_BAUD from asm/serial.h instead of redefining it.
No functional change.
Signed-off-by Thorsten Blum <[email protected]>
--- arch/x86/boot/early_serial_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/early_serial_console.c +1 -1
@@ -3,6 +3,7 @@* Serial port routines for use during early boot reporting. This code is * included from both the compressed kernel and the regular kernel. */ +#include <asm/serial.h> #include "boot.h" #define DEFAULT_SERIAL_PORT 0x3f8/* ttyS0 */
@@ -22,7 +23,6 @@#define DLH 1/* Divisor latch High */ #define DEFAULT_BAUD 9600 -#define BASE_BAUD (1843200 / 16)static void early_serial_init (int port,int baud) {