Generic Linux architectural discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/serial: Use generic BASE_BAUD in asm/serial.h
@ 2026-11-13  8:23 Thorsten Blum
  2026-11-13  8:23 ` [PATCH 2/2] x86/boot: Use BASE_BAUD from asm/serial.h Thorsten Blum
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-11-13  8:23 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	H. Peter Anvin, Arnd Bergmann, x86
  Cc: linux-kernel, linux-arch, Thorsten Blum

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 <blum@kernel.org>
---
Please note that patch 1/2 was originally submitted as a separate patch:
https://lore.kernel.org/r/20260909074653.408945-4-blum@kernel.org/

 arch/x86/include/asm/serial.h | 9 +--------
 include/asm-generic/serial.h  | 6 +++---
 2 files changed, 4 insertions(+), 11 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..28915df0de05 100644
--- a/include/asm-generic/serial.h
+++ b/include/asm-generic/serial.h
@@ -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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] x86/boot: Use BASE_BAUD from asm/serial.h
  2026-11-13  8:23 [PATCH 1/2] x86/serial: Use generic BASE_BAUD in asm/serial.h Thorsten Blum
@ 2026-11-13  8:23 ` Thorsten Blum
  0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Blum @ 2026-11-13  8:23 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	H. Peter Anvin, Arnd Bergmann, x86, Thorsten Blum
  Cc: linux-kernel, linux-arch, Ingo Molnar

Use BASE_BAUD from asm/serial.h instead of redefining it.

No functional change.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 arch/x86/boot/early_serial_console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/early_serial_console.c b/arch/x86/boot/early_serial_console.c
index 39fcd551fc81..59471fea5018 100644
--- a/arch/x86/boot/early_serial_console.c
+++ b/arch/x86/boot/early_serial_console.c
@@ -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)
 {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-13  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13  8:23 [PATCH 1/2] x86/serial: Use generic BASE_BAUD in asm/serial.h Thorsten Blum
2026-11-13  8:23 ` [PATCH 2/2] x86/boot: Use BASE_BAUD from asm/serial.h Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox