Skip to contentSkip to conversation

m68k/serial: Use generic BASE_BAUD in asm/serial.h

PATCH In review Thorsten Blum 3 participants 6 messages Jul 31 – Sep 27

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 m68k/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.

---
 arch/m68k/include/asm/serial.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/m68k/include/asm/serial.h +1 -9
index 3f76bc7b9edb..e215b48975d5 100644
@@ -7,15 +7,7 @@
  *
  */
 
-
-/*
- * 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 the 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
#1 lore raw

PATCH 2/2 m68k/serial: Add include guard to asm/serial.h

Add an include guard and remove the stale comment while at it.

---
 arch/m68k/include/asm/serial.h | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
arch/m68k/include/asm/serial.h +4 -7
index e215b48975d5..866ef25a74a2 100644
@@ -1,11 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * include/asm-m68k/serial.h
- *
- * currently this seems useful only for a Q40,
- * it's an almost exact copy of ../asm-alpha/serial.h
- *
- */
+#ifndef _ASM_M68K_SERIAL_H
+#define _ASM_M68K_SERIAL_H
 
 #include <asm-generic/serial.h>
 
@@ -26,3 +21,5 @@
 	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
 	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */
 #endif
+
+#endif /* _ASM_M68K_SERIAL_H */
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] m68k/serial: Add include guard to asm/serial.h

Quoted 3 lines · Thorsten Blum

Add an include guard and remove the stale comment while at it.

i.e. will queue in the m68k tree for v7.4.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
maintainer Acked-by on v1 1/2
#4 lore raw
In reply to Thorsten Blum
Quoted 4 lines · Thorsten Blum

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

Quoted 9 lines
arch/m68k/include/asm/serial.h +0 -3
@@ -7,15 +7,7 @@
  *
  */
 
-
-/*
- * This assumes you have a 1.8432 MHz clock for your UART.

arch/m68k/include/asm/serial.h line 13

Quoted 10 lines
arch/m68k/include/asm/serial.h +1 -6
- *
- * 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 the 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

It would be good if this BASE_BAUD 8250-ism could be removed from drivers/tty/serial/earlycon.c.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer Reviewed-by
#5 lore raw
Quoted 7 lines · Geert Uytterhoeven
Quoted 4 lines · Thorsten Blum

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

Sorry, wrong copy-'n-paste:

i.e. will queue in the m68k tree for v7.4.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds