MIPS: Replace SIBYTE_1956_WAR by CONFIG_SB1_PASS_2_WORKAROUNDS
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 24 Aug 2020 16:32:51 +0000 (18:32 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 7 Sep 2020 20:24:51 +0000 (22:24 +0200)
SB1250 uart bug is related to PASS 2 workarounds. Use config
CONFIG_SB1_PASS_2_WORKAROUNDS directly and get rid of SIBYTE_1956_WAR.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
14 files changed:
arch/mips/include/asm/mach-cavium-octeon/war.h
arch/mips/include/asm/mach-generic/war.h
arch/mips/include/asm/mach-ip22/war.h
arch/mips/include/asm/mach-ip27/war.h
arch/mips/include/asm/mach-ip28/war.h
arch/mips/include/asm/mach-ip30/war.h
arch/mips/include/asm/mach-ip32/war.h
arch/mips/include/asm/mach-malta/war.h
arch/mips/include/asm/mach-rc32434/war.h
arch/mips/include/asm/mach-rm/war.h
arch/mips/include/asm/mach-sibyte/war.h
arch/mips/include/asm/mach-tx49xx/war.h
arch/mips/include/asm/war.h
drivers/tty/serial/sb1250-duart.c

index 9aa4ea5522a9013a2ccc3c5c5c5d250b7f74c3a6..0a2bf6b7af9469c844055e7ca99954b6fc01735c 100644 (file)
@@ -10,7 +10,6 @@
 #define __ASM_MIPS_MACH_CAVIUM_OCTEON_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #define CAVIUM_OCTEON_DCACHE_PREFETCH_WAR      \
        OCTEON_IS_MODEL(OCTEON_CN6XXX)
index 4f25636661d5b5f71ac38204e8335cd6442d2bf7..6b7de91435e3e932d983ee8ddab6cbd34736a9e7 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MACH_GENERIC_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MACH_GENERIC_WAR_H */
index 09169cfbf932fba9f61e384de72dd13a0026c021..70de6a5008d33b5bb4c87f0168c6121ca2eaf83e 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_IP22_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_IP22_WAR_H */
index 1c81d5464235d4b3365b37b0c2184ef1732dbcc8..5b01e8fe245fee3121f2f858d354c0400ef22804 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_IP27_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_IP27_WAR_H */
index ff66adbaaae58c5ea7218d37467cf4ad1955bf48..ba4267e2d34d5e452979b2402ea507980d364536 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_IP28_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_IP28_WAR_H */
index b00469a398351e38f2520446cc42b6e1b7d339ec..f404e22b7798c3ec7d301734831070c85cb4e22e 100644 (file)
@@ -6,6 +6,5 @@
 #define __ASM_MIPS_MACH_IP30_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_IP30_WAR_H */
index c57a9cd2e50b80ad513b8a17859e12e11d0f1040..01475db746ec9343317baec6d3553e4e8df8fc9d 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_IP32_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_IP32_WAR_H */
index 73c9e6d84a8f05d9d163c78f0c8daf0f401f1827..68b204ff59a6326873d526bba50aba9825c84dc7 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_MIPS_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_MIPS_WAR_H */
index 73c9e6d84a8f05d9d163c78f0c8daf0f401f1827..68b204ff59a6326873d526bba50aba9825c84dc7 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_MIPS_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_MIPS_WAR_H */
index c396a31706ac71d7ee25a2989f9ca5ea3bd7be7c..093a3894ae41fe31706e896672e053e733e35515 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_RM_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_RM_WAR_H */
index fa9bbc228dd72731703c61052921cf68c53fe78d..71eff5bc3f535417cf635deb97182df38b650944 100644 (file)
@@ -15,12 +15,10 @@ extern int sb1250_m3_workaround_needed(void);
 #endif
 
 #define BCM1250_M3_WAR sb1250_m3_workaround_needed()
-#define SIBYTE_1956_WAR 1
 
 #else
 
 #define BCM1250_M3_WAR 0
-#define SIBYTE_1956_WAR 0
 
 #endif
 
index 7213d9334f3f1f4f32b69f179daca5da92f86a28..0dc2beb5bf5a816bc369fffc8d108f4826f5aab2 100644 (file)
@@ -9,6 +9,5 @@
 #define __ASM_MIPS_MACH_TX49XX_WAR_H
 
 #define BCM1250_M3_WAR                 0
-#define SIBYTE_1956_WAR                        0
 
 #endif /* __ASM_MIPS_MACH_TX49XX_WAR_H */
index 4f4d37b3dd074ea67845bab390b55a0519d4b407..2ce5cd61a072a49758508a215e61ce477a5896eb 100644 (file)
 #error Check setting of BCM1250_M3_WAR for your platform
 #endif
 
-/*
- * This is a DUART workaround related to glitches around register accesses
- */
-#ifndef SIBYTE_1956_WAR
-#error Check setting of SIBYTE_1956_WAR for your platform
-#endif
-
 #endif /* _ASM_WAR_H */
index bd5e7e9938ce04fb40844d4bdc01cc5531c9b57a..22c7bc90b104b01b0aa05bede53707ca7e0846de 100644 (file)
@@ -35,7 +35,6 @@
 
 #include <linux/refcount.h>
 #include <asm/io.h>
-#include <asm/war.h>
 
 #include <asm/sibyte/sb1250.h>
 #include <asm/sibyte/sb1250_uart.h>
@@ -157,7 +156,7 @@ static unsigned char read_sbdchn(struct sbd_port *sport, int reg)
        unsigned char retval;
 
        retval = __read_sbdchn(sport, reg);
-       if (SIBYTE_1956_WAR)
+       if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
                __war_sbd1956(sport);
        return retval;
 }
@@ -167,7 +166,7 @@ static unsigned char read_sbdshr(struct sbd_port *sport, int reg)
        unsigned char retval;
 
        retval = __read_sbdshr(sport, reg);
-       if (SIBYTE_1956_WAR)
+       if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
                __war_sbd1956(sport);
        return retval;
 }
@@ -175,14 +174,14 @@ static unsigned char read_sbdshr(struct sbd_port *sport, int reg)
 static void write_sbdchn(struct sbd_port *sport, int reg, unsigned int value)
 {
        __write_sbdchn(sport, reg, value);
-       if (SIBYTE_1956_WAR)
+       if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
                __war_sbd1956(sport);
 }
 
 static void write_sbdshr(struct sbd_port *sport, int reg, unsigned int value)
 {
        __write_sbdshr(sport, reg, value);
-       if (SIBYTE_1956_WAR)
+       if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
                __war_sbd1956(sport);
 }