URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 684 to Rev 685
- ↔ Reverse comparison
Rev 684 → Rev 685
/trunk/uclinux/uClinux-2.0.x/drivers/char/keyboard.c
17,7 → 17,7
* |
*/ |
|
#define KEYBOARD_IRQ 1 |
#define KEYBOARD_IRQ 21 |
#define DISABLE_KBD_DURING_INTERRUPTS 0 |
|
#include <linux/sched.h> |
164,7 → 164,7
int i; |
|
for (i=0; i<0x100000; i++) |
if ((inb_p(0x64) & 0x02) == 0) |
if ((inb_p(KBD_BASE_ADD+0x4) & 0x02) == 0) |
return; |
printk(KERN_WARNING "Keyboard timed out\n"); |
} |
172,7 → 172,7
static inline void send_cmd(unsigned char c) |
{ |
kb_wait(); |
outb(c,0x64); |
outb(c,KBD_BASE_ADD+0x4); |
} |
|
/* |
582,7 → 582,7
pt_regs = regs; |
disable_keyboard(); |
|
status = inb_p(0x64); |
status = inb_p(KBD_BASE_ADD+0x4); |
do { |
unsigned char scancode; |
|
590,11 → 590,11
if (status & kbd_read_mask & 0x20) |
break; |
|
scancode = inb(0x60); |
scancode = inb(KBD_BASE_ADD+0x0); |
if (status & 0x01) |
handle_scancode(scancode); |
|
status = inb(0x64); |
status = inb(KBD_BASE_ADD+0x4); |
} while (status & 0x01); |
|
mark_bh(KEYBOARD_BH); |
1081,11 → 1081,12
acknowledge = 0; |
resend = 0; |
reply_expected = 1; |
outb_p(data, 0x60); |
|
outb_p(data, KBD_BASE_ADD+0x0); |
for(i=0; i<0x200000; i++) { |
extern void allow_interrupts(void); |
allow_interrupts(); |
inb_p(0x64); /* just as a delay */ |
inb_p(KBD_BASE_ADD+0x4); /* just as a delay */ |
if (acknowledge) |
return 1; |
if (resend) |
1210,7 → 1211,7
ttytab = console_driver.table; |
|
request_irq(KEYBOARD_IRQ, keyboard_interrupt, 0, "keyboard", NULL); |
request_region(0x60,16,"keyboard"); |
request_region(KBD_BASE_ADD+0x0,16,"keyboard"); |
#ifdef INIT_KBD |
initialize_kbd(); |
#endif |
1223,9 → 1224,9
/* |
* keyboard controller registers |
*/ |
#define KBD_STATUS_REG (unsigned int) 0x64 |
#define KBD_CNTL_REG (unsigned int) 0x64 |
#define KBD_DATA_REG (unsigned int) 0x60 |
#define KBD_STATUS_REG (unsigned int) KBD_BASE_ADD+0x4 |
#define KBD_CNTL_REG (unsigned int) KBD_BASE_ADD+0x4 |
#define KBD_DATA_REG (unsigned int) KBD_BASE_ADD+0x0 |
/* |
* controller commands |
*/ |
1340,7 → 1341,7
restore_flags(flags); |
return(-1); |
} |
|
|
/* Enable the keyboard by allowing the keyboard clock to run. */ |
kbd_write(KBD_CNTL_REG, KBD_CNTL_ENABLE); |
|
1397,6 → 1398,7
|
restore_flags(flags); |
|
printk("PS/2 Keyboard initialized.\n"); |
return (1); |
} |
#endif /* INIT_KBD */ |