DORMANTno replies

[PATCH v2] x86/serial: Use generic BASE_BAUD in asm/serial.h

From: Thorsten Blum <thorsten.blum@linux.dev>
Date: 2026-07-20 10:33:51
Also in: lkml
Subsystem: generic include/asm header files, the rest, x86 architecture (32-bit and 64-bit) · Maintainers: Arnd Bergmann, Linus Torvalds, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen

Include asm-generic/serial.h and use the generic BASE_BAUD definition
instead of redefining it. Consolidate the comments accordingly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Preserve the note that BASE_BAUD should not be arch-specific (Arnd)
- v1: https://lore.kernel.org/r/20260717073149.3622-3-thorsten.blum@linux.dev/ (local)
---
 arch/x86/include/asm/serial.h | 9 +--------
 include/asm-generic/serial.h  | 7 +++----
 2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/arch/x86/include/asm/serial.h b/arch/x86/include/asm/serial.h
index ece8299d2695..b623f6d70f64 100644
--- a/arch/x86/include/asm/serial.h
+++ b/arch/x86/include/asm/serial.h
@@ -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
diff --git a/include/asm-generic/serial.h b/include/asm-generic/serial.h
index ca9f7b6be3f0..c06765a4f5f8 100644
--- a/include/asm-generic/serial.h
+++ b/include/asm-generic/serial.h
@@ -3,12 +3,11 @@
 #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)
 
 #endif /* __ASM_GENERIC_SERIAL_H */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help