Changeset 30ab05f in mainline for arch/sparc64/include/drivers


Ignore:
Timestamp:
2006-02-27T20:33:36Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d87c3f3
Parents:
02f441c0
Message:

sparc64 work.
Very raw and fragile preliminary standalone keyboard support - polling mode only.
Because of a workaround in Simics, the scan codes are the same as on ia32.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • arch/sparc64/include/drivers/i8042.h

    r02f441c0 r30ab05f  
    2727 */
    2828
    29 #ifndef __sparc64_KEYBOARD_H__
    30 #define __sparc64_KEYBOARD_H__
     29#ifndef __sparc64_I8042_H__
     30#define __sparc64_I8042_H__
     31
     32#include <arch/types.h>
    3133
    3234#define KBD_PHYS_ADDRESS        0x1fff8904000ULL
    3335#define KBD_VIRT_ADDRESS        0x00000d00000ULL
    3436
     37#define STATUS_REG      4
     38#define COMMAND_REG     4
     39#define DATA_REG        6
     40
     41static inline void i8042_data_write(__u8 data)
     42{
     43        ((__u8 *)(KBD_VIRT_ADDRESS))[DATA_REG] = data;
     44}
     45
     46static inline __u8 i8042_data_read(void)
     47{
     48        return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[DATA_REG];
     49}
     50
     51static inline __u8 i8042_status_read(void)
     52{
     53        return ((volatile __u8 *)(KBD_VIRT_ADDRESS))[STATUS_REG];
     54}
     55
     56static inline void i8042_command_write(__u8 command)
     57{
     58        ((__u8 *)(KBD_VIRT_ADDRESS))[COMMAND_REG] = command;
     59}
     60
    3561#endif
Note: See TracChangeset for help on using the changeset viewer.