OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [arch-ebsa285/] [keyboard.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 * linux/include/asm-arm/arch-ebsa285/keyboard.h
3
 *
4
 * Keyboard driver definitions for EBSA285 architecture
5
 *
6
 * Copyright (C) 1998-2001 Russell King
7
 * (C) 1998 Phil Blundell
8
 */
9
#include <linux/config.h>
10
#include <linux/ioport.h>
11
#include <asm/irq.h>
12
#include <asm/system.h>
13
 
14
#define KEYBOARD_IRQ            IRQ_ISA_KEYBOARD
15
#define NR_SCANCODES            128
16
 
17
#define kbd_disable_irq()       do { } while (0)
18
#define kbd_enable_irq()        do { } while (0)
19
 
20
extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
21
extern int pckbd_getkeycode(unsigned int scancode);
22
extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
23
                           char raw_mode);
24
extern char pckbd_unexpected_up(unsigned char keycode);
25
extern void pckbd_leds(unsigned char leds);
26
extern void pckbd_init_hw(void);
27
extern unsigned char pckbd_sysrq_xlate[128];
28
 
29
static inline void kbd_init_hw(void)
30
{
31
        if (have_isa_bridge) {
32
                k_setkeycode    = pckbd_setkeycode;
33
                k_getkeycode    = pckbd_getkeycode;
34
                k_translate     = pckbd_translate;
35
                k_unexpected_up = pckbd_unexpected_up;
36
                k_leds          = pckbd_leds;
37
#ifdef CONFIG_MAGIC_SYSRQ
38
                k_sysrq_key     = 0x54;
39
                k_sysrq_xlate   = pckbd_sysrq_xlate;
40
#endif
41
                pckbd_init_hw();
42
        }
43
}
44
 
45
 
46
/*
47
 * The rest of this file is to do with supporting pc_keyb.c
48
 */
49
 
50
/* resource allocation */
51
#define kbd_request_region()    request_region(0x60, 16, "keyboard")
52
#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
53
                                             "keyboard", NULL)
54
 
55
/* How to access the keyboard macros on this platform.  */
56
#define kbd_read_input() inb(KBD_DATA_REG)
57
#define kbd_read_status() inb(KBD_STATUS_REG)
58
#define kbd_write_output(val) outb(val, KBD_DATA_REG)
59
#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
60
 
61
/* Some stoneage hardware needs delays after some operations.  */
62
#define kbd_pause() do { } while(0)
63
 
64
#define aux_request_irq(hand, dev_id)                                   \
65
        request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
66
 
67
#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
68
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.