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
Kirill Smelkov
linux
Commits
1225fb90
Commit
1225fb90
authored
Aug 01, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPARC: More keyboard/mouse/serial layer cleanups and build fixes.
parent
db7bfefd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
99 deletions
+55
-99
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/irq.c
+0
-2
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/setup.c
+20
-0
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sparc64_ksyms.c
+3
-0
drivers/char/Makefile
drivers/char/Makefile
+9
-5
drivers/serial/suncore.c
drivers/serial/suncore.c
+0
-4
drivers/serial/suncore.h
drivers/serial/suncore.h
+0
-9
drivers/serial/sunsab.c
drivers/serial/sunsab.c
+1
-49
include/asm-sparc64/keyboard.h
include/asm-sparc64/keyboard.h
+13
-30
include/asm-sparc64/system.h
include/asm-sparc64/system.h
+9
-0
No files found.
arch/sparc64/kernel/irq.c
View file @
1225fb90
...
...
@@ -740,10 +740,8 @@ void handler_irq(int irq, struct pt_regs *regs)
irq_enter
();
kstat
.
irqs
[
cpu
][
irq
]
++
;
#ifdef CONFIG_PCI
if
(
irq
==
9
)
kbd_pt_regs
=
regs
;
#endif
/* Sliiiick... */
#ifndef CONFIG_SMP
...
...
arch/sparc64/kernel/setup.c
View file @
1225fb90
...
...
@@ -29,6 +29,7 @@
#include <linux/inet.h>
#include <linux/console.h>
#include <linux/root_dev.h>
#include <linux/interrupt.h>
#include <asm/segment.h>
#include <asm/system.h>
...
...
@@ -691,6 +692,8 @@ struct seq_operations cpuinfo_op = {
.
show
=
show_cpuinfo
,
};
extern
int
stop_a_enabled
;
void
sun_do_break
(
void
)
{
if
(
!
stop_a_enabled
)
...
...
@@ -701,3 +704,20 @@ void sun_do_break(void)
prom_cmdline
();
}
#ifdef CONFIG_MAGIC_SYSRQ
/* Because we use the generic input layer keyboard drivers for
* everything, this PC sysrq translation table is all we need.
*/
unsigned
char
kbd_sysrq_xlate
[
128
]
=
"
\000\033
1234567890-=
\177\t
"
/* 0x00 - 0x0f */
"qwertyuiop[]
\r\000
as"
/* 0x10 - 0x1f */
"dfghjkl;'`
\000\\
zxcv"
/* 0x20 - 0x2f */
"bnm,./
\000
*
\000
\000\201\202\203\204\205
"
/* 0x30 - 0x3f */
"
\206\207\210\211\212\000\000
789-456+1"
/* 0x40 - 0x4f */
"230
\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000
"
/* 0x50 - 0x5f */
"
\r\000
/"
;
/* 0x60 - 0x6f */
#endif
int
serial_console
;
int
stop_a_enabled
=
1
;
arch/sparc64/kernel/sparc64_ksyms.c
View file @
1225fb90
...
...
@@ -364,6 +364,9 @@ EXPORT_SYMBOL_NOVERS(VISenter);
/* for input/keybdev */
EXPORT_SYMBOL
(
sun_do_break
);
EXPORT_SYMBOL
(
serial_console
);
EXPORT_SYMBOL
(
stop_a_enabled
);
EXPORT_SYMBOL
(
kbd_pt_regs
);
#ifdef CONFIG_DEBUG_BUGVERBOSE
EXPORT_SYMBOL
(
do_BUG
);
...
...
drivers/char/Makefile
View file @
1225fb90
...
...
@@ -108,14 +108,18 @@ ifeq ($(CONFIG_QTRONIX_KEYBOARD),y)
KEYMAP
=
qtronixmap.o
endif
ifeq
($(CONFIG_SPARC32),y)
KEYBD
=
endif
ifeq
($(CONFIG_SPARC64),y)
KEYBD
=
endif
obj-$(CONFIG_VT)
+=
vt.o vc_screen.o consolemap.o consolemap_deftbl.o
$(CONSOLE)
selection.o
#obj-$(CONFIG_SERIAL) += $(SERIAL) # Fix for decserial.o
ifndef
CONFIG_SUN_KEYBOARD
obj-$(CONFIG_VT)
+=
keyboard.o
$(KEYMAP)
$(KEYBD)
else
obj-$(CONFIG_PCI)
+=
keyboard.o
$(KEYMAP)
endif
obj-$(CONFIG_VT)
+=
keyboard.o
$(KEYMAP)
$(KEYBD)
obj-$(CONFIG_MAGIC_SYSRQ)
+=
sysrq.o
obj-$(CONFIG_ATARI_DSP56K)
+=
dsp56k.o
...
...
drivers/serial/suncore.c
View file @
1225fb90
...
...
@@ -23,12 +23,8 @@
#include "suncore.h"
int
serial_console
;
int
stop_a_enabled
=
1
;
int
sunserial_current_minor
=
64
;
EXPORT_SYMBOL
(
serial_console
);
EXPORT_SYMBOL
(
stop_a_enabled
);
EXPORT_SYMBOL
(
sunserial_current_minor
);
void
...
...
drivers/serial/suncore.h
View file @
1225fb90
...
...
@@ -22,17 +22,8 @@
extern
unsigned
int
suncore_mouse_baud_cflag_next
(
unsigned
int
,
int
*
);
extern
int
suncore_mouse_baud_detection
(
unsigned
char
,
int
);
extern
struct
pt_regs
*
kbd_pt_regs
;
extern
int
serial_console
;
extern
int
stop_a_enabled
;
extern
int
sunserial_current_minor
;
static
__inline__
int
con_is_present
(
void
)
{
return
serial_console
?
0
:
1
;
}
extern
void
sunserial_console_termios
(
struct
console
*
);
#endif
/* !(_SERIAL_SUN_H) */
drivers/serial/sunsab.c
View file @
1225fb90
...
...
@@ -86,10 +86,6 @@ static struct tty_struct *sab82532_table[NR_PORTS];
static
struct
termios
*
sab82532_termios
[
NR_PORTS
];
static
struct
termios
*
sab82532_termios_locked
[
NR_PORTS
];
#ifdef MODULE
#undef CONFIG_SERIAL_CONSOLE
#endif
#ifdef CONFIG_SERIAL_CONSOLE
extern
int
serial_console
;
static
struct
console
sab82532_console
;
...
...
@@ -465,7 +461,7 @@ static void check_status(struct sab82532 *info,
if
(
stat
->
sreg
.
isr1
&
SAB82532_ISR1_BRK
)
{
#ifdef CONFIG_SERIAL_CONSOLE
if
(
info
->
is_console
)
{
batten_down_hatches
(
info
);
sun_do_break
(
info
);
return
;
}
#endif
...
...
@@ -874,7 +870,6 @@ static void shutdown(struct sab82532 *info)
info
->
xmit
.
buf
=
0
;
}
#ifdef CONFIG_SERIAL_CONSOLE
if
(
info
->
is_console
)
{
info
->
interrupt_mask0
=
SAB82532_IMR0_PERR
|
SAB82532_IMR0_FERR
|
SAB82532_IMR0_PLLA
|
SAB82532_IMR0_CDSC
;
...
...
@@ -890,7 +885,6 @@ static void shutdown(struct sab82532 *info)
restore_flags
(
flags
);
return
;
}
#endif
/* Disable Interrupts */
info
->
interrupt_mask0
=
0xff
;
...
...
@@ -2460,48 +2454,6 @@ void cleanup_module(void)
#endif
/* MODULE */
#ifdef CONFIG_SERIAL_CONSOLE
static
void
batten_down_hatches
(
struct
sab82532
*
info
)
{
unsigned
char
saved_rfc
,
tmp
;
if
(
!
stop_a_enabled
)
return
;
/* If we are doing kadb, we call the debugger
* else we just drop into the boot monitor.
* Note that we must flush the user windows
* first before giving up control.
*/
printk
(
"
\n
"
);
flush_user_windows
();
/*
* Set FIFO to single character mode.
*/
saved_rfc
=
readb
(
&
info
->
regs
->
r
.
rfc
);
tmp
=
readb
(
&
info
->
regs
->
rw
.
rfc
);
tmp
&=
~
(
SAB82532_RFC_RFDF
);
writeb
(
tmp
,
&
info
->
regs
->
rw
.
rfc
);
sab82532_cec_wait
(
info
);
writeb
(
SAB82532_CMDR_RRES
,
&
info
->
regs
->
w
.
cmdr
);
#ifndef __sparc_v9__
if
((((
unsigned
long
)
linux_dbvec
)
>=
DEBUG_FIRSTVADDR
)
&&
(((
unsigned
long
)
linux_dbvec
)
<=
DEBUG_LASTVADDR
))
sp_enter_debugger
();
else
#endif
prom_cmdline
();
/*
* Reset FIFO to character + status mode.
*/
writeb
(
saved_rfc
,
&
info
->
regs
->
w
.
rfc
);
sab82532_cec_wait
(
info
);
writeb
(
SAB82532_CMDR_RRES
,
&
info
->
regs
->
w
.
cmdr
);
}
static
__inline__
void
sab82532_console_putchar
(
struct
sab82532
*
info
,
char
c
)
{
...
...
include/asm-sparc64/keyboard.h
View file @
1225fb90
...
...
@@ -13,38 +13,21 @@
#ifdef __KERNEL__
#include <linux/kernel.h>
#include <linux/kd.h>
#define KEYBOARD_IRQ 1
#define DISABLE_KBD_DURING_INTERRUPTS 0
extern
int
pcikbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
);
extern
int
pcikbd_getkeycode
(
unsigned
int
scancode
);
extern
int
pcikbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
);
extern
char
pcikbd_unexpected_up
(
unsigned
char
keycode
);
extern
void
pcikbd_leds
(
unsigned
char
leds
);
extern
void
pcikbd_init_hw
(
void
);
extern
unsigned
char
pcikbd_sysrq_xlate
[
128
];
#define kbd_setkeycode pcikbd_setkeycode
#define kbd_getkeycode pcikbd_getkeycode
#define kbd_translate pcikbd_translate
#define kbd_unexpected_up pcikbd_unexpected_up
#define kbd_leds pcikbd_leds
#define kbd_init_hw pcikbd_init_hw
#define kbd_sysrq_xlate pcikbd_sysrq_xlate
#define kbd_init pcikbd_init
#define compute_shiftstate pci_compute_shiftstate
#define getkeycode pci_getkeycode
#define setkeycode pci_setkeycode
#define getledstate pci_getledstate
#define setledstate pci_setledstate
#define register_leds pci_register_leds
/* We use the generic input layer for keyboard handling, thus
* some of this stuff should never be invoked.
*/
#define kbd_setkeycode(scancode, keycode) (BUG(), 0)
#define kbd_getkeycode(scancode) (BUG(), 0)
#define kbd_translate(keycode, keycodep, raw_mode) \
({ *(keycodep) = scancode; 1; })
#define kbd_unexpected_up(keycode) (0200)
#define kbd_leds(leds) do { } while (0)
#define kbd_init_hw() do { } while (0)
#define SYSRQ_KEY 0x54
extern
unsigned
char
kbd_sysrq_xlate
[
128
];
#endif
/* __KERNEL__ */
...
...
include/asm-sparc64/system.h
View file @
1225fb90
...
...
@@ -121,6 +121,15 @@ enum sparc_cpu {
#ifndef __ASSEMBLY__
extern
void
sun_do_break
(
void
);
extern
int
serial_console
;
extern
int
stop_a_enabled
;
static
__inline__
int
con_is_present
(
void
)
{
return
serial_console
?
0
:
1
;
}
extern
struct
pt_regs
*
kbd_pt_regs
;
extern
void
synchronize_user_stack
(
void
);
...
...
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