Rev 895 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 895 | Rev 897 | ||
---|---|---|---|
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 0x00000d00000ULL |
35 | #define KBD_VIRT_ADDRESS 0x000d0000000ULL |
36 | 36 | ||
37 | #define STATUS_REG 4 |
37 | #define STATUS_REG 4 |
38 | #define COMMAND_REG 4 |
38 | #define COMMAND_REG 4 |
39 | #define DATA_REG 6 |
39 | #define DATA_REG 6 |
40 | 40 | ||
41 | static inline void i8042_data_write(__u8 data) |
41 | static inline void i8042_data_write(__u8 data) |
42 | { |
42 | { |
43 | ((__u8 *)(KBD_VIRT_ADDRESS))[DATA_REG] = data; |
43 | ((volatile __u8 *)(KBD_VIRT_ADDRESS))[DATA_REG] = data; |
44 | } |
44 | } |
45 | 45 | ||
46 | static inline __u8 i8042_data_read(void) |
46 | static inline __u8 i8042_data_read(void) |
47 | { |
47 | { |
48 | return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[DATA_REG]; |
48 | return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[DATA_REG]; |
Line 53... | Line 53... | ||
53 | return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[STATUS_REG]; |
53 | return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[STATUS_REG]; |
54 | } |
54 | } |
55 | 55 | ||
56 | static inline void i8042_command_write(__u8 command) |
56 | static inline void i8042_command_write(__u8 command) |
57 | { |
57 | { |
58 | ((__u8 *)(KBD_VIRT_ADDRESS))[COMMAND_REG] = command; |
58 | ((volatile __u8 *)(KBD_VIRT_ADDRESS))[COMMAND_REG] = command; |
59 | } |
59 | } |
60 | 60 | ||
61 | #endif |
61 | #endif |