diff options
author | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2010-12-03 18:29:57 +0000 |
---|---|---|
committer | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2010-12-03 18:29:57 +0000 |
commit | c2564fe1f52bfe86609e5d6745eab8dd049c1c63 (patch) | |
tree | c160c7b6f5b07d305202edf487eaecaad022ca76 /sys/arch/sgi/dev | |
parent | 110d1588c4df6978612aeeab62547f656fce39a7 (diff) |
removed slot argument of function pckbd_cnattach
because it is always PCKBC_KBD_SLOT
ok miod@, krw@
Diffstat (limited to 'sys/arch/sgi/dev')
-rw-r--r-- | sys/arch/sgi/dev/iockbc.c | 14 | ||||
-rw-r--r-- | sys/arch/sgi/dev/iockbcvar.h | 4 | ||||
-rw-r--r-- | sys/arch/sgi/dev/mkbc.c | 11 | ||||
-rw-r--r-- | sys/arch/sgi/dev/mkbcreg.h | 4 |
4 files changed, 16 insertions, 17 deletions
diff --git a/sys/arch/sgi/dev/iockbc.c b/sys/arch/sgi/dev/iockbc.c index c25c2fe909c..59d334cf98a 100644 --- a/sys/arch/sgi/dev/iockbc.c +++ b/sys/arch/sgi/dev/iockbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iockbc.c,v 1.6 2010/04/06 19:12:26 miod Exp $ */ +/* $OpenBSD: iockbc.c,v 1.7 2010/12/03 18:29:56 shadchin Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Joel Sing <jsing@openbsd.org> * @@ -973,7 +973,7 @@ static struct pckbc_slotdata iockbc_cons_slotdata; static int iockbc_console; int -iockbc_cnattach(pckbc_slot_t slot) +iockbc_cnattach() { bus_space_tag_t iot = &sys_config.console_io; bus_space_handle_t ioh = (bus_space_handle_t)iot->bus_base; @@ -988,13 +988,13 @@ iockbc_cnattach(pckbc_slot_t slot) if (is_ioc) { #if NIOCKBC_IOC > 0 if (sys_config.system_type == SGI_IP35) - reginfo = &iockbc_ioc_inverted[slot]; + reginfo = &iockbc_ioc_inverted[PCKBC_KBD_SLOT]; else - reginfo = &iockbc_ioc_normal[slot]; + reginfo = &iockbc_ioc_normal[PCKBC_KBD_SLOT]; #endif } else { #if NIOCKBC_IOF > 0 - reginfo = &iockbc_iof[slot]; + reginfo = &iockbc_iof[PCKBC_KBD_SLOT]; #endif } if (reginfo == NULL) @@ -1022,9 +1022,9 @@ iockbc_cnattach(pckbc_slot_t slot) timeout_set(&t->t_poll, iockbc_poll, t); iockbc_init_slotdata(&iockbc_cons_slotdata, reginfo); - t->t_slotdata[slot] = &iockbc_cons_slotdata; + t->t_slotdata[PCKBC_KBD_SLOT] = &iockbc_cons_slotdata; - rc = pckbd_cnattach(t, slot); + rc = pckbd_cnattach(t); if (rc == 0) iockbc_console = 1; diff --git a/sys/arch/sgi/dev/iockbcvar.h b/sys/arch/sgi/dev/iockbcvar.h index 57ca79fea69..44e6b755c3a 100644 --- a/sys/arch/sgi/dev/iockbcvar.h +++ b/sys/arch/sgi/dev/iockbcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iockbcvar.h,v 1.2 2010/04/06 19:12:26 miod Exp $ */ +/* $OpenBSD: iockbcvar.h,v 1.3 2010/12/03 18:29:56 shadchin Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -16,4 +16,4 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -int iockbc_cnattach(pckbc_slot_t); +int iockbc_cnattach(); diff --git a/sys/arch/sgi/dev/mkbc.c b/sys/arch/sgi/dev/mkbc.c index 1c2e92f7649..a4878ef000d 100644 --- a/sys/arch/sgi/dev/mkbc.c +++ b/sys/arch/sgi/dev/mkbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkbc.c,v 1.9 2009/10/26 18:00:06 miod Exp $ */ +/* $OpenBSD: mkbc.c,v 1.10 2010/12/03 18:29:56 shadchin Exp $ */ /* * Copyright (c) 2006, 2007, Joel Sing @@ -862,7 +862,7 @@ pckbc_set_poll(pckbc_tag_t self, pckbc_slot_t slot, int on) } int -mkbc_cnattach(bus_space_tag_t iot, bus_addr_t addr, pckbc_slot_t slot) +mkbc_cnattach(bus_space_tag_t iot, bus_addr_t addr) { bus_space_handle_t ioh, slot_ioh; int res = 0; @@ -879,15 +879,14 @@ mkbc_cnattach(bus_space_tag_t iot, bus_addr_t addr, pckbc_slot_t slot) mkbc_consdata.t_ioh_d = ioh; /* Map subregion of bus space for this "slot". */ - if (bus_space_subregion(iot, ioh, MKBC_PORTSIZE * slot, MKBC_PORTSIZE, - &slot_ioh)) { + if (bus_space_subregion(iot, ioh, 0, MKBC_PORTSIZE, &slot_ioh)) { bus_space_unmap(iot, ioh, MKBC_PORTSIZE * 2); return (ENXIO); } mkbc_cons_slotdata.ioh = slot_ioh; mkbc_init_slotdata(&mkbc_cons_slotdata); - mkbc_consdata.t_slotdata[slot] = &mkbc_cons_slotdata; + mkbc_consdata.t_slotdata[PCKBC_KBD_SLOT] = &mkbc_cons_slotdata; /* Initialise controller. */ bus_space_write_8(iot, slot_ioh, MKBC_CONTROL, @@ -905,7 +904,7 @@ mkbc_cnattach(bus_space_tag_t iot, bus_addr_t addr, pckbc_slot_t slot) /* Flush input buffer. */ (void) mkbc_poll_read(iot, slot_ioh); - res = pckbd_cnattach(&mkbc_consdata, slot); + res = pckbd_cnattach(&mkbc_consdata); if (res) { bus_space_unmap(iot, ioh, MKBC_PORTSIZE * 2); diff --git a/sys/arch/sgi/dev/mkbcreg.h b/sys/arch/sgi/dev/mkbcreg.h index 30ffdcdafd3..d15e98a8149 100644 --- a/sys/arch/sgi/dev/mkbcreg.h +++ b/sys/arch/sgi/dev/mkbcreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mkbcreg.h,v 1.2 2007/12/14 16:09:23 jsing Exp $ */ +/* $OpenBSD: mkbcreg.h,v 1.3 2010/12/03 18:29:56 shadchin Exp $ */ /* * Copyright (c) 2006, 2007, Joel Sing @@ -51,4 +51,4 @@ #define MKBC_CONTROL_RX_CLOCK_ENABLE 0x10 #define MKBC_CONTROL_RESET 0x20 -int mkbc_cnattach(bus_space_tag_t, bus_addr_t, pckbc_slot_t); +int mkbc_cnattach(bus_space_tag_t, bus_addr_t); |