Changeset 6ccb238 in mainline


Ignore:
Timestamp:
2006-01-02T17:39:04Z (19 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
95d191c
Parents:
65fb232
Message:

i8042 command word init… It should work on ia32 but I have done it for Indy and I'm not sure it will work because on Silicon should not be the same software in universal microprocesor i8042. So if It will not work I'll remove it and will write i8042 AT function emulation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/drivers/i8042.c

    r65fb232 r6ccb238  
    4949#define i8042_STATUS            0x64
    5050
     51
    5152/** Keyboard commands. */
    5253#define KBD_ENABLE      0xf4
    5354#define KBD_DISABLE     0xf5
    5455#define KBD_ACK         0xfa
     56
     57/*
     58 60   Write 8042 Command Byte: next data byte written to port 60h is
     59      placed in 8042 command register.Format:
     60
     61     |7|6|5|4|3|2|1|0|8042 Command Byte
     62      | | | | | | | `---- 1=enable output register full interrupt
     63      | | | | | | `----- should be 0
     64      | | | | | `------ 1=set status register system, 0=clear
     65      | | | | `------- 1=override keyboard inhibit, 0=allow inhibit
     66      | | | `-------- disable keyboard I/O by driving clock line low
     67      | | `--------- disable auxiliary device, drives clock line low
     68      | `---------- IBM scancode translation 0=AT, 1=PC/XT
     69      `----------- reserved, should be 0
     70*/
     71
     72#define i8042_SET_COMMAND 0x60
     73#define i8042_COMMAND 0x09
     74#define i8042_WAIT_MASK 0x02
     75
    5576
    5677#define SPECIAL         '?'
     
    243264{
    244265        exc_register(VECTOR_KBD, "i8042_interrupt", i8042_interrupt);
     266        while (inb(i8042_STATUS)&i8042_WAIT_MASK);     /*Wait*/
     267        outb(i8042_STATUS,i8042_SET_COMMAND);
     268        while (inb(i8042_STATUS)&i8042_WAIT_MASK);     /*Wait*/
     269        outb(i8042_DATA,i8042_COMMAND);
     270
    245271        trap_virtual_enable_irqs(1<<IRQ_KBD);
    246272        chardev_initialize("i8042_kbd", &kbrd, &ops);
Note: See TracChangeset for help on using the changeset viewer.