summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-08-13 07:36:40 +0000
committerkato <kato@FreeBSD.org>1998-08-13 07:36:40 +0000
commitf99964396acce1b118f4711ca6187ef2ebb5acac (patch)
tree0f5e1daea50d8ebc410c46f4be2afefac215f2d9 /sys/pc98
parent4a3d2c5945d8a2c0f47fbcab20581ccedecbd328 (diff)
downloadFreeBSD-src-f99964396acce1b118f4711ca6187ef2ebb5acac.zip
FreeBSD-src-f99964396acce1b118f4711ca6187ef2ebb5acac.tar.gz
Sync with sys/i386/isa/sio.c revision 1.210.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/sio.c25
-rw-r--r--sys/pc98/pc98/sio.c25
2 files changed, 20 insertions, 30 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index b6ff188..da6a0c4 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.62 1998/06/24 13:37:23 kato Exp $
+ * $Id: sio.c,v 1.63 1998/07/15 12:18:32 bde Exp $
*/
#include "opt_comconsole.h"
@@ -139,6 +139,7 @@
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>
+#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/sysctl.h>
@@ -147,6 +148,7 @@
#endif
#include <machine/clock.h>
+#include <machine/ipl.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
@@ -395,19 +397,6 @@ struct com_s {
#endif
};
-/*
- * XXX public functions in drivers should be declared in headers produced
- * by `config', not here.
- */
-
-/* Interrupt handling entry point. */
-void siopoll __P((void));
-
-/* Device switch entry points. */
-#define sioreset noreset
-#define siommap nommap
-#define siostrategy nostrategy
-
#ifdef COM_ESP
static int espattach __P((struct isa_device *isdp, struct com_s *com,
Port_t esp_port));
@@ -419,6 +408,7 @@ static void comhardclose __P((struct com_s *com));
static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
+static swihand_t siopoll;
static int sioprobe __P((struct isa_device *dev));
static void siosettimeout __P((void));
static void comstart __P((struct tty *tp));
@@ -460,6 +450,7 @@ static int comconsole = -1;
static volatile speed_t comdefaultrate = CONSPEED;
static u_int com_events; /* input chars + weighted output completions */
static Port_t siocniobase;
+static bool_t siopoll_registered;
static int sio_timeout;
static int sio_timeouts_until_log;
static struct callout_handle sio_timeout_handle
@@ -1459,6 +1450,10 @@ determined_type: ;
unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR,
UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
#endif
+ if (!siopoll_registered) {
+ register_swi(SWI_TTY, siopoll);
+ siopoll_registered = TRUE;
+ }
com->id_flags = isdp->id_flags; /* Heritate id_flags for later */
return (1);
}
@@ -2444,7 +2439,7 @@ sioioctl(dev, cmd, data, flag, p)
return (0);
}
-void
+static void
siopoll()
{
int unit;
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index b6ff188..da6a0c4 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.62 1998/06/24 13:37:23 kato Exp $
+ * $Id: sio.c,v 1.63 1998/07/15 12:18:32 bde Exp $
*/
#include "opt_comconsole.h"
@@ -139,6 +139,7 @@
#include <sys/conf.h>
#include <sys/dkstat.h>
#include <sys/fcntl.h>
+#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/sysctl.h>
@@ -147,6 +148,7 @@
#endif
#include <machine/clock.h>
+#include <machine/ipl.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
@@ -395,19 +397,6 @@ struct com_s {
#endif
};
-/*
- * XXX public functions in drivers should be declared in headers produced
- * by `config', not here.
- */
-
-/* Interrupt handling entry point. */
-void siopoll __P((void));
-
-/* Device switch entry points. */
-#define sioreset noreset
-#define siommap nommap
-#define siostrategy nostrategy
-
#ifdef COM_ESP
static int espattach __P((struct isa_device *isdp, struct com_s *com,
Port_t esp_port));
@@ -419,6 +408,7 @@ static void comhardclose __P((struct com_s *com));
static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
+static swihand_t siopoll;
static int sioprobe __P((struct isa_device *dev));
static void siosettimeout __P((void));
static void comstart __P((struct tty *tp));
@@ -460,6 +450,7 @@ static int comconsole = -1;
static volatile speed_t comdefaultrate = CONSPEED;
static u_int com_events; /* input chars + weighted output completions */
static Port_t siocniobase;
+static bool_t siopoll_registered;
static int sio_timeout;
static int sio_timeouts_until_log;
static struct callout_handle sio_timeout_handle
@@ -1459,6 +1450,10 @@ determined_type: ;
unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR,
UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
#endif
+ if (!siopoll_registered) {
+ register_swi(SWI_TTY, siopoll);
+ siopoll_registered = TRUE;
+ }
com->id_flags = isdp->id_flags; /* Heritate id_flags for later */
return (1);
}
@@ -2444,7 +2439,7 @@ sioioctl(dev, cmd, data, flag, p)
return (0);
}
-void
+static void
siopoll()
{
int unit;
OpenPOWER on IntegriCloud