X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fpckbd.c;h=9b96b1cba6d75d90db35178f7b852a8dfcc79b53;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=de508b309083722eb0392f90c8fa07ad40c5b1a8;hpb=80355292503667b5367f09ec8716126c3caa1e3a;p=qemu diff --git a/hw/pckbd.c b/hw/pckbd.c index de508b3..9b96b1c 100644 --- a/hw/pckbd.c +++ b/hw/pckbd.c @@ -1,8 +1,8 @@ /* * QEMU PC keyboard emulation - * + * * Copyright (c) 2003 Fabrice Bellard - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -148,7 +148,7 @@ static void kbd_update_irq(KBDState *s) if (s->mode & KBD_MODE_MOUSE_INT) irq_mouse_level = 1; } else { - if ((s->mode & KBD_MODE_KBD_INT) && + if ((s->mode & KBD_MODE_KBD_INT) && !(s->mode & KBD_MODE_DISABLE_KBD)) irq_kbd_level = 1; } @@ -207,7 +207,7 @@ static void kbd_write_command(void *opaque, uint32_t addr, uint32_t val) #endif switch(val) { case KBD_CCMD_READ_MODE: - kbd_queue(s, s->mode, 0); + kbd_queue(s, s->mode, 1); break; case KBD_CCMD_WRITE_MODE: case KBD_CCMD_WRITE_OBUF: @@ -338,7 +338,7 @@ static void kbd_reset(void *opaque) static void kbd_save(QEMUFile* f, void* opaque) { KBDState *s = (KBDState*)opaque; - + qemu_put_8s(f, &s->write_cmd); qemu_put_8s(f, &s->status); qemu_put_8s(f, &s->mode); @@ -348,7 +348,7 @@ static void kbd_save(QEMUFile* f, void* opaque) static int kbd_load(QEMUFile* f, void* opaque, int version_id) { KBDState *s = (KBDState*)opaque; - + if (version_id != 3) return -EINVAL; qemu_get_8s(f, &s->write_cmd); @@ -421,8 +421,8 @@ static CPUWriteMemoryFunc *kbd_mm_write[] = { &kbd_mm_writeb, }; -void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, target_ulong base, - int it_shift) +void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, + target_phys_addr_t base, int it_shift) { KBDState *s = &kbd_state; int s_io_memory;