forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/tty/serial/sb1250-duart.c
....@@ -15,10 +15,6 @@
1515 * "BCM1250/BCM1125/BCM1125H User Manual", Broadcom Corporation
1616 */
1717
18
-#if defined(CONFIG_SERIAL_SB1250_DUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
19
-#define SUPPORT_SYSRQ
20
-#endif
21
-
2218 #include <linux/compiler.h>
2319 #include <linux/console.h>
2420 #include <linux/delay.h>
....@@ -39,7 +35,6 @@
3935
4036 #include <linux/refcount.h>
4137 #include <asm/io.h>
42
-#include <asm/war.h>
4338
4439 #include <asm/sibyte/sb1250.h>
4540 #include <asm/sibyte/sb1250_uart.h>
....@@ -161,7 +156,7 @@
161156 unsigned char retval;
162157
163158 retval = __read_sbdchn(sport, reg);
164
- if (SIBYTE_1956_WAR)
159
+ if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
165160 __war_sbd1956(sport);
166161 return retval;
167162 }
....@@ -171,7 +166,7 @@
171166 unsigned char retval;
172167
173168 retval = __read_sbdshr(sport, reg);
174
- if (SIBYTE_1956_WAR)
169
+ if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
175170 __war_sbd1956(sport);
176171 return retval;
177172 }
....@@ -179,14 +174,14 @@
179174 static void write_sbdchn(struct sbd_port *sport, int reg, unsigned int value)
180175 {
181176 __write_sbdchn(sport, reg, value);
182
- if (SIBYTE_1956_WAR)
177
+ if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
183178 __war_sbd1956(sport);
184179 }
185180
186181 static void write_sbdshr(struct sbd_port *sport, int reg, unsigned int value)
187182 {
188183 __write_sbdshr(sport, reg, value);
189
- if (SIBYTE_1956_WAR)
184
+ if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
190185 __war_sbd1956(sport);
191186 }
192187
....@@ -668,7 +663,7 @@
668663 struct sbd_duart *duart = sport->duart;
669664
670665 if (!uport->membase)
671
- uport->membase = ioremap_nocache(uport->mapbase,
666
+ uport->membase = ioremap(uport->mapbase,
672667 DUART_CHANREG_SPACING);
673668 if (!uport->membase) {
674669 printk(err);
....@@ -676,7 +671,7 @@
676671 }
677672
678673 if (!sport->memctrl)
679
- sport->memctrl = ioremap_nocache(duart->mapctrl,
674
+ sport->memctrl = ioremap(duart->mapctrl,
680675 DUART_CHANREG_SPACING);
681676 if (!sport->memctrl) {
682677 printk(err);
....@@ -813,6 +808,7 @@
813808 uport->ops = &sbd_ops;
814809 uport->line = line;
815810 uport->mapbase = SBD_CHANREGS(line);
811
+ uport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_SB1250_DUART_CONSOLE);
816812 }
817813 }
818814 }