summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Shadchin <shadchin@cvs.openbsd.org>2010-12-03 18:29:57 +0000
committerAlexandr Shadchin <shadchin@cvs.openbsd.org>2010-12-03 18:29:57 +0000
commitc2564fe1f52bfe86609e5d6745eab8dd049c1c63 (patch)
treec160c7b6f5b07d305202edf487eaecaad022ca76
parent110d1588c4df6978612aeeab62547f656fce39a7 (diff)
removed slot argument of function pckbd_cnattach
because it is always PCKBC_KBD_SLOT ok miod@, krw@
-rw-r--r--sys/arch/hppa/gsc/gsckbc.c4
-rw-r--r--sys/arch/sgi/dev/iockbc.c14
-rw-r--r--sys/arch/sgi/dev/iockbcvar.h4
-rw-r--r--sys/arch/sgi/dev/mkbc.c11
-rw-r--r--sys/arch/sgi/dev/mkbcreg.h4
-rw-r--r--sys/arch/sgi/sgi/wscons_machdep.c7
-rw-r--r--sys/dev/ic/pckbc.c4
-rw-r--r--sys/dev/pckbc/pckbd.c9
-rw-r--r--sys/dev/pckbc/pckbdvar.h4
9 files changed, 29 insertions, 32 deletions
diff --git a/sys/arch/hppa/gsc/gsckbc.c b/sys/arch/hppa/gsc/gsckbc.c
index 00bd635675e..52e3ac27455 100644
--- a/sys/arch/hppa/gsc/gsckbc.c
+++ b/sys/arch/hppa/gsc/gsckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gsckbc.c,v 1.12 2008/10/15 19:12:19 blambert Exp $ */
+/* $OpenBSD: gsckbc.c,v 1.13 2010/12/03 18:29:56 shadchin Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -415,7 +415,7 @@ gsckbc_attach(struct device *parent, struct device *self, void *aux)
if (gsc->sc_type == PCKBC_KBD_SLOT &&
ga->ga_dp.dp_mod == PAGE0->mem_kbd.pz_dp.dp_mod &&
bcmp(ga->ga_dp.dp_bc, PAGE0->mem_kbd.pz_dp.dp_bc, 6) == 0)
- pckbd_cnattach(t, PCKBC_KBD_SLOT);
+ pckbd_cnattach(t);
#endif
pckbc_attach_slot(sc, gsc->sc_type);
}
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);
diff --git a/sys/arch/sgi/sgi/wscons_machdep.c b/sys/arch/sgi/sgi/wscons_machdep.c
index c30af9b0dbc..8b6cc890300 100644
--- a/sys/arch/sgi/sgi/wscons_machdep.c
+++ b/sys/arch/sgi/sgi/wscons_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wscons_machdep.c,v 1.8 2010/04/06 19:12:34 miod Exp $ */
+/* $OpenBSD: wscons_machdep.c,v 1.9 2010/12/03 18:29:56 shadchin Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -180,8 +180,7 @@ static int initted;
#endif
#if NMKBC > 0
- if (mkbc_cnattach(&macebus_tag, MACE_IO_KBC_OFFS,
- PCKBC_KBD_SLOT) == 0)
+ if (mkbc_cnattach(&macebus_tag, MACE_IO_KBC_OFFS) == 0)
return; /* console keyboard found */
#endif
#if NUKBD > 0
@@ -317,7 +316,7 @@ widget_cnattach()
return;
#if NIOCKBC > 0
- if (iockbc_cnattach(PCKBC_KBD_SLOT) == 0)
+ if (iockbc_cnattach() == 0)
return; /* console keyboard found */
#endif
#if NUKBD > 0
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index 4dd50de8c34..b58bea3a4e3 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc.c,v 1.27 2010/11/23 04:07:55 shadchin Exp $ */
+/* $OpenBSD: pckbc.c,v 1.28 2010/12/03 18:29:56 shadchin Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
@@ -1048,7 +1048,7 @@ pckbc_cnattach(bus_space_tag_t iot, bus_addr_t addr, bus_size_t cmd_offset,
if (!res) {
#if (NPCKBD > 0)
- res = pckbd_cnattach(&pckbc_consdata, PCKBC_KBD_SLOT);
+ res = pckbd_cnattach(&pckbc_consdata);
#else
res = ENXIO;
#endif /* NPCKBD > 0 */
diff --git a/sys/dev/pckbc/pckbd.c b/sys/dev/pckbc/pckbd.c
index ff2644a80bf..f21c51750c8 100644
--- a/sys/dev/pckbc/pckbd.c
+++ b/sys/dev/pckbc/pckbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbd.c,v 1.28 2010/08/28 12:49:57 miod Exp $ */
+/* $OpenBSD: pckbd.c,v 1.29 2010/12/03 18:29:56 shadchin Exp $ */
/* $NetBSD: pckbd.c,v 1.24 2000/06/05 22:20:57 sommerfeld Exp $ */
/*-
@@ -1030,14 +1030,13 @@ pckbd_hookup_bell(fn, arg)
}
int
-pckbd_cnattach(kbctag, kbcslot)
+pckbd_cnattach(kbctag)
pckbc_tag_t kbctag;
- int kbcslot;
{
char cmd[1];
int res;
- res = pckbd_init(&pckbd_consdata, kbctag, kbcslot, 1);
+ res = pckbd_init(&pckbd_consdata, kbctag, PCKBC_KBD_SLOT, 1);
#if 0 /* we allow the console to be attached if no keyboard is present */
if (res)
return (res);
@@ -1045,7 +1044,7 @@ pckbd_cnattach(kbctag, kbcslot)
/* Just to be sure. */
cmd[0] = KBC_ENABLE;
- res = pckbc_poll_cmd(kbctag, kbcslot, cmd, 1, 0, NULL, 0);
+ res = pckbc_poll_cmd(kbctag, PCKBC_KBD_SLOT, cmd, 1, 0, NULL, 0);
#if 0
if (res)
return (res);
diff --git a/sys/dev/pckbc/pckbdvar.h b/sys/dev/pckbc/pckbdvar.h
index bcb8f9534b5..5a027ef3dd6 100644
--- a/sys/dev/pckbc/pckbdvar.h
+++ b/sys/dev/pckbc/pckbdvar.h
@@ -1,6 +1,6 @@
-/* $OpenBSD: pckbdvar.h,v 1.3 2002/03/14 03:16:07 millert Exp $ */
+/* $OpenBSD: pckbdvar.h,v 1.4 2010/12/03 18:29:56 shadchin Exp $ */
/* $NetBSD: pckbdvar.h,v 1.3 2000/03/10 06:10:35 thorpej Exp $ */
-int pckbd_cnattach(pckbc_tag_t, int);
+int pckbd_cnattach(pckbc_tag_t);
void pckbd_hookup_bell(void (*fn)(void *, u_int, u_int, u_int, int),
void *);