Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4131df98
Commit
4131df98
authored
Jun 24, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SERIAL]: Sanitize sparc serial console configuration.
parent
df791bdf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
6 deletions
+59
-6
drivers/serial/Kconfig
drivers/serial/Kconfig
+25
-1
drivers/serial/sunsab.c
drivers/serial/sunsab.c
+13
-1
drivers/serial/sunsu.c
drivers/serial/sunsu.c
+9
-3
drivers/serial/sunzilog.c
drivers/serial/sunzilog.c
+12
-1
No files found.
drivers/serial/Kconfig
View file @
4131df98
...
@@ -326,6 +326,14 @@ config SERIAL_SUNZILOG
...
@@ -326,6 +326,14 @@ config SERIAL_SUNZILOG
This driver supports the Zilog8530 serial ports found on many Sparc
This driver supports the Zilog8530 serial ports found on many Sparc
systems. Say Y or M if you want to be able to these serial ports.
systems. Say Y or M if you want to be able to these serial ports.
config SERIAL_SUNZILOG_CONSOLE
bool "Console on Sun Zilog8530 serial port"
depends on SERIAL_SUNZILOG=y
help
If you would like to be able to use the Zilog8530 serial port
on your Sparc system as the console, you can do so by answering
Y to this option.
config SERIAL_SUNSU
config SERIAL_SUNSU
tristate "Sun SU serial support"
tristate "Sun SU serial support"
depends on (SPARC32 || SPARC64) && PCI
depends on (SPARC32 || SPARC64) && PCI
...
@@ -334,6 +342,14 @@ config SERIAL_SUNSU
...
@@ -334,6 +342,14 @@ config SERIAL_SUNSU
mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able
mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able
to these serial ports.
to these serial ports.
config SERIAL_SUNSU_CONSOLE
bool "Console on Sun SU serial port"
depends on SERIAL_SUNSU=y
help
If you would like to be able to use the SU serial port
on your Sparc system as the console, you can do so by answering
Y to this option.
config SERIAL_MUX
config SERIAL_MUX
tristate "Serial MUX support"
tristate "Serial MUX support"
depends on PARISC
depends on PARISC
...
@@ -380,6 +396,14 @@ config SERIAL_SUNSAB
...
@@ -380,6 +396,14 @@ config SERIAL_SUNSAB
(PCI) UltraSPARC systems. Say Y or M if you want to be able to these
(PCI) UltraSPARC systems. Say Y or M if you want to be able to these
serial ports.
serial ports.
config SERIAL_SUNSAB_CONSOLE
bool "Console on Sun Siemens SAB82532 serial port"
depends on SERIAL_SUNSAB=y
help
If you would like to be able to use the SAB82532 serial port
on your Sparc system as the console, you can do so by answering
Y to this option.
config V850E_NB85E_UART
config V850E_NB85E_UART
bool "NEC V850E on-chip UART support"
bool "NEC V850E on-chip UART support"
depends on V850E_NB85E || V850E2_ANNA || V850E_AS85EP1
depends on V850E_NB85E || V850E2_ANNA || V850E_AS85EP1
...
@@ -407,7 +431,7 @@ config SERIAL_CORE
...
@@ -407,7 +431,7 @@ config SERIAL_CORE
config SERIAL_CORE_CONSOLE
config SERIAL_CORE_CONSOLE
bool
bool
depends on SERIAL_AMBA_CONSOLE || SERIAL_CLPS711X_CONSOLE || SERIAL_21285_CONSOLE || SERIAL_SA1100_CONSOLE || SERIAL_ANAKIN_CONSOLE || SERIAL_UART00_CONSOLE || SERIAL_8250_CONSOLE || SERIAL_MUX_CONSOLE || SERIAL_SUN
COR
E || V850E_NB85E_UART_CONSOLE || SERIAL98_CONSOLE
depends on SERIAL_AMBA_CONSOLE || SERIAL_CLPS711X_CONSOLE || SERIAL_21285_CONSOLE || SERIAL_SA1100_CONSOLE || SERIAL_ANAKIN_CONSOLE || SERIAL_UART00_CONSOLE || SERIAL_8250_CONSOLE || SERIAL_MUX_CONSOLE || SERIAL_SUN
ZILOG_CONSOLE || SERIAL_SUNSU_CONSOLE || SERIAL_SUNSAB_CONSOL
E || V850E_NB85E_UART_CONSOLE || SERIAL98_CONSOLE
default y
default y
config SERIAL_68328
config SERIAL_68328
...
...
drivers/serial/sunsab.c
View file @
4131df98
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <linux/ioport.h>
#include <linux/ioport.h>
#include <linux/circ_buf.h>
#include <linux/circ_buf.h>
#include <linux/serial.h>
#include <linux/serial.h>
#include <linux/sysrq.h>
#include <linux/console.h>
#include <linux/console.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/slab.h>
...
@@ -38,6 +39,10 @@
...
@@ -38,6 +39,10 @@
#include <asm/oplib.h>
#include <asm/oplib.h>
#include <asm/ebus.h>
#include <asm/ebus.h>
#if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
#endif
#include <linux/serial_core.h>
#include <linux/serial_core.h>
#include "suncore.h"
#include "suncore.h"
...
@@ -838,6 +843,8 @@ static struct uart_driver sunsab_reg = {
...
@@ -838,6 +843,8 @@ static struct uart_driver sunsab_reg = {
static
struct
uart_sunsab_port
*
sunsab_ports
;
static
struct
uart_sunsab_port
*
sunsab_ports
;
static
int
num_channels
;
static
int
num_channels
;
#ifdef CONFIG_SERIAL_SUNSAB_CONSOLE
static
__inline__
void
sunsab_console_putchar
(
struct
uart_sunsab_port
*
up
,
char
c
)
static
__inline__
void
sunsab_console_putchar
(
struct
uart_sunsab_port
*
up
,
char
c
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -929,6 +936,7 @@ static struct console sunsab_console = {
...
@@ -929,6 +936,7 @@ static struct console sunsab_console = {
.
index
=
-
1
,
.
index
=
-
1
,
.
data
=
&
sunsab_reg
,
.
data
=
&
sunsab_reg
,
};
};
#define SUNSAB_CONSOLE (&sunsab_console)
static
void
__init
sunsab_console_init
(
void
)
static
void
__init
sunsab_console_init
(
void
)
{
{
...
@@ -949,6 +957,10 @@ static void __init sunsab_console_init(void)
...
@@ -949,6 +957,10 @@ static void __init sunsab_console_init(void)
sunsab_console
.
index
=
i
;
sunsab_console
.
index
=
i
;
register_console
(
&
sunsab_console
);
register_console
(
&
sunsab_console
);
}
}
#else
#define SUNSAB_CONSOLE (NULL)
#define sunsab_console_init() do { } while (0)
#endif
static
void
__init
for_each_sab_edev
(
void
(
*
callback
)(
struct
linux_ebus_device
*
,
void
*
),
void
*
arg
)
static
void
__init
for_each_sab_edev
(
void
(
*
callback
)(
struct
linux_ebus_device
*
,
void
*
),
void
*
arg
)
{
{
...
@@ -1091,7 +1103,7 @@ static int __init sunsab_init(void)
...
@@ -1091,7 +1103,7 @@ static int __init sunsab_init(void)
sunsab_reg
.
minor
=
sunserial_current_minor
;
sunsab_reg
.
minor
=
sunserial_current_minor
;
sunsab_reg
.
nr
=
num_channels
;
sunsab_reg
.
nr
=
num_channels
;
sunsab_reg
.
cons
=
&
sunsab_console
;
sunsab_reg
.
cons
=
SUNSAB_CONSOLE
;
ret
=
uart_register_driver
(
&
sunsab_reg
);
ret
=
uart_register_driver
(
&
sunsab_reg
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
...
drivers/serial/sunsu.c
View file @
4131df98
...
@@ -46,8 +46,7 @@
...
@@ -46,8 +46,7 @@
#include <asm/isa.h>
#include <asm/isa.h>
#endif
#endif
/* #if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) */
#if defined(CONFIG_SERIAL_SUNSU_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#if defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
#define SUPPORT_SYSRQ
#endif
#endif
...
@@ -1347,6 +1346,8 @@ static int __init sunsu_kbd_ms_init(void)
...
@@ -1347,6 +1346,8 @@ static int __init sunsu_kbd_ms_init(void)
* ------------------------------------------------------------
* ------------------------------------------------------------
*/
*/
#ifdef CONFIG_SERIAL_SUNSU_CONSOLE
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
/*
/*
...
@@ -1465,6 +1466,7 @@ static struct console sunsu_cons = {
...
@@ -1465,6 +1466,7 @@ static struct console sunsu_cons = {
.
index
=
-
1
,
.
index
=
-
1
,
.
data
=
&
sunsu_reg
,
.
data
=
&
sunsu_reg
,
};
};
#define SUNSU_CONSOLE (&sunsu_cons)
/*
/*
* Register console.
* Register console.
...
@@ -1492,6 +1494,10 @@ static int __init sunsu_serial_console_init(void)
...
@@ -1492,6 +1494,10 @@ static int __init sunsu_serial_console_init(void)
register_console
(
&
sunsu_cons
);
register_console
(
&
sunsu_cons
);
return
0
;
return
0
;
}
}
#else
#define SUNSU_CONSOLE (NULL)
#define sunsu_serial_console_init() do { } while (0)
#endif
static
int
__init
sunsu_serial_init
(
void
)
static
int
__init
sunsu_serial_init
(
void
)
{
{
...
@@ -1522,7 +1528,7 @@ static int __init sunsu_serial_init(void)
...
@@ -1522,7 +1528,7 @@ static int __init sunsu_serial_init(void)
sunserial_current_minor
+=
instance
;
sunserial_current_minor
+=
instance
;
sunsu_reg
.
nr
=
instance
;
sunsu_reg
.
nr
=
instance
;
sunsu_reg
.
cons
=
&
sunsu_cons
;
sunsu_reg
.
cons
=
SUNSU_CONSOLE
;
ret
=
uart_register_driver
(
&
sunsu_reg
);
ret
=
uart_register_driver
(
&
sunsu_reg
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
...
drivers/serial/sunzilog.c
View file @
4131df98
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/circ_buf.h>
#include <linux/circ_buf.h>
#include <linux/serial.h>
#include <linux/serial.h>
#include <linux/sysrq.h>
#include <linux/console.h>
#include <linux/console.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#ifdef CONFIG_SERIO
#ifdef CONFIG_SERIO
...
@@ -42,6 +43,10 @@
...
@@ -42,6 +43,10 @@
#endif
#endif
#include <asm/sbus.h>
#include <asm/sbus.h>
#if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
#endif
#include <linux/serial_core.h>
#include <linux/serial_core.h>
#include "suncore.h"
#include "suncore.h"
...
@@ -1331,6 +1336,7 @@ static void sunzilog_serio_close(struct serio *serio)
...
@@ -1331,6 +1336,7 @@ static void sunzilog_serio_close(struct serio *serio)
#endif
/* CONFIG_SERIO */
#endif
/* CONFIG_SERIO */
#ifdef CONFIG_SERIAL_SUNZILOG_CONSOLE
static
void
static
void
sunzilog_console_write
(
struct
console
*
con
,
const
char
*
s
,
unsigned
int
count
)
sunzilog_console_write
(
struct
console
*
con
,
const
char
*
s
,
unsigned
int
count
)
{
{
...
@@ -1400,6 +1406,7 @@ static struct console sunzilog_console = {
...
@@ -1400,6 +1406,7 @@ static struct console sunzilog_console = {
.
index
=
-
1
,
.
index
=
-
1
,
.
data
=
&
sunzilog_reg
,
.
data
=
&
sunzilog_reg
,
};
};
#define SUNZILOG_CONSOLE (&sunzilog_console)
static
int
__init
sunzilog_console_init
(
void
)
static
int
__init
sunzilog_console_init
(
void
)
{
{
...
@@ -1422,6 +1429,10 @@ static int __init sunzilog_console_init(void)
...
@@ -1422,6 +1429,10 @@ static int __init sunzilog_console_init(void)
register_console
(
&
sunzilog_console
);
register_console
(
&
sunzilog_console
);
return
0
;
return
0
;
}
}
#else
#define SUNZILOG_CONSOLE (NULL)
#define sunzilog_console_init() do { } while (0)
#endif
/*
/*
* We scan the PROM tree recursively. This is the most reliable way
* We scan the PROM tree recursively. This is the most reliable way
...
@@ -1639,7 +1650,7 @@ static int __init sunzilog_ports_init(void)
...
@@ -1639,7 +1650,7 @@ static int __init sunzilog_ports_init(void)
* in the system.
* in the system.
*/
*/
sunzilog_reg
.
nr
=
NUM_CHANNELS
;
sunzilog_reg
.
nr
=
NUM_CHANNELS
;
sunzilog_reg
.
cons
=
&
sunzilog_console
;
sunzilog_reg
.
cons
=
SUNZILOG_CONSOLE
;
sunzilog_reg
.
minor
=
sunserial_current_minor
;
sunzilog_reg
.
minor
=
sunserial_current_minor
;
sunserial_current_minor
+=
NUM_CHANNELS
;
sunserial_current_minor
+=
NUM_CHANNELS
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment