MIPS: ath79: fix ar933x uart parity mode [Linux 4.4.187]

This Linux kernel change "MIPS: ath79: fix ar933x uart parity mode" is included in the Linux 4.4.187 release. This change is authored by Stefan Hellermann <stefan [at] the2masters.de> on Mon Jun 17 15:43:59 2019 +0200. The commit for this change in Linux stable tree is 074f090 (patch) which is from upstream commit db13a5b. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream db13a5b.

MIPS: ath79: fix ar933x uart parity mode

[ Upstream commit db13a5ba2732755cf13320f3987b77cf2a71e790 ]

While trying to get the uart with parity working I found setting even
parity enabled odd parity insted. Fix the register settings to match
the datasheet of AR9331.

A similar patch was created by 8devices, but not sent upstream.

Signed-off-by: Stefan Hellermann <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
Cc: [email protected]
Signed-off-by: Sasha Levin <[email protected]>

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 arch/mips/include/asm/mach-ath79/ar933x_uart.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/mach-ath79/ar933x_uart.h b/arch/mips/include/asm/mach-ath79/ar933x_uart.h
index c2917b3..bba2c88 100644
--- a/arch/mips/include/asm/mach-ath79/ar933x_uart.h
+++ b/arch/mips/include/asm/mach-ath79/ar933x_uart.h
@@ -27,8 +27,8 @@
 #define AR933X_UART_CS_PARITY_S        0
 #define AR933X_UART_CS_PARITY_M        0x3
 #define      AR933X_UART_CS_PARITY_NONE    0
-#define      AR933X_UART_CS_PARITY_ODD 1
-#define      AR933X_UART_CS_PARITY_EVEN    2
+#define      AR933X_UART_CS_PARITY_ODD 2
+#define      AR933X_UART_CS_PARITY_EVEN    3
 #define AR933X_UART_CS_IF_MODE_S   2
 #define AR933X_UART_CS_IF_MODE_M   0x3
 #define      AR933X_UART_CS_IF_MODE_NONE   0

Leave a Reply

Your email address will not be published. Required fields are marked *