Rev 897 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 897 | Rev 1410 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | #define __sparc64_I8042_H__ |
30 | #define __sparc64_I8042_H__ |
31 | 31 | ||
32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
33 | 33 | ||
34 | #define KBD_PHYS_ADDRESS 0x1fff8904000ULL |
34 | #define KBD_PHYS_ADDRESS 0x1fff8904000ULL |
35 | #define KBD_VIRT_ADDRESS 0x000d0000000ULL |
- | |
36 | 35 | ||
37 | #define STATUS_REG 4 |
36 | #define STATUS_REG 4 |
38 | #define COMMAND_REG 4 |
37 | #define COMMAND_REG 4 |
39 | #define DATA_REG 6 |
38 | #define DATA_REG 6 |
40 | 39 | ||
- | 40 | #define LAST_REG DATA_REG |
|
- | 41 | ||
- | 42 | extern volatile __u8 *kbd_virt_address; |
|
- | 43 | ||
41 | static inline void i8042_data_write(__u8 data) |
44 | static inline void i8042_data_write(__u8 data) |
42 | { |
45 | { |
43 | ((volatile __u8 *)(KBD_VIRT_ADDRESS))[DATA_REG] = data; |
46 | kbd_virt_address[DATA_REG] = data; |
44 | } |
47 | } |
45 | 48 | ||
46 | static inline __u8 i8042_data_read(void) |
49 | static inline __u8 i8042_data_read(void) |
47 | { |
50 | { |
48 | return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[DATA_REG]; |
51 | return kbd_virt_address[DATA_REG]; |
49 | } |
52 | } |
50 | 53 | ||
51 | static inline __u8 i8042_status_read(void) |
54 | static inline __u8 i8042_status_read(void) |
52 | { |
55 | { |
53 | return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[STATUS_REG]; |
56 | return kbd_virt_address[STATUS_REG]; |
54 | } |
57 | } |
55 | 58 | ||
56 | static inline void i8042_command_write(__u8 command) |
59 | static inline void i8042_command_write(__u8 command) |
57 | { |
60 | { |
58 | ((volatile __u8 *)(KBD_VIRT_ADDRESS))[COMMAND_REG] = command; |
61 | kbd_virt_address[COMMAND_REG] = command; |
59 | } |
62 | } |
60 | 63 | ||
- | 64 | extern void kbd_init(void); |
|
- | 65 | ||
61 | #endif |
66 | #endif |