Skip to contentSkip to conversation

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

PATCH In review Thorsten Blum 2 participants 4 messages Nov 12 – Nov 14 Alpha port

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 alpha/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/alpha/include/asm/serial.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/alpha/include/asm/serial.h +1 -9
index 91115447319c..205e61ef2975 100644
@@ -3,15 +3,7 @@
  * include/asm-alpha/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 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 alpha/serial: Add include guard to asm/serial.h

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

---
 arch/alpha/include/asm/serial.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/alpha/include/asm/serial.h +4 -3
index 205e61ef2975..7fa754cab5df 100644
@@ -1,7 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * include/asm-alpha/serial.h
- */
+#ifndef _ASM_ALPHA_SERIAL_H
+#define _ASM_ALPHA_SERIAL_H
 
 #include <asm-generic/serial.h>
 
@@ -20,3 +19,5 @@
 	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
 	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
 	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */
+
+#endif /* _ASM_ALPHA_SERIAL_H */
maintainer Reviewed-by on v1 2/2
#2 lore raw

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

Hi Thorsten,

Quoted 23 lines · Thorsten Blum

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

---
 arch/alpha/include/asm/serial.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/alpha/include/asm/serial.h +2 -3
index 205e61ef2975..7fa754cab5df 100644
@@ -1,7 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * include/asm-alpha/serial.h
- */
+#ifndef _ASM_ALPHA_SERIAL_H
+#define _ASM_ALPHA_SERIAL_H
 
 #include <asm-generic/serial.h>
 

arch/alpha/include/asm/serial.h line 23

Quoted 5 lines
arch/alpha/include/asm/serial.h +2 -0
@@ -20,3 +19,5 @@
        { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },      /* ttyS1 */     \
        { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },      /* ttyS2 */     \
        { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },     /* ttyS3 */
+
+#endif /* _ASM_ALPHA_SERIAL_H */

Looks good, Thanks!

maintainer Reviewed-by on v1 1/2
#3 lore raw
In reply to Thorsten Blum

Hi Thorsten,

Quoted 20 lines · Thorsten Blum

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

---
 arch/alpha/include/asm/serial.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/alpha/include/asm/serial.h +0 -3
index 91115447319c..205e61ef2975 100644
@@ -3,15 +3,7 @@
  * include/asm-alpha/serial.h
  */
 
-
-/*
- * This assumes you have a 1.8432 MHz clock for your UART.

arch/alpha/include/asm/serial.h line 9

Quoted 10 lines
arch/alpha/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

Nice cleanup, looks right to me. Thanks!