summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-09-22 08:42:30 +0000
committerjhb <jhb@FreeBSD.org>2000-09-22 08:42:30 +0000
commitcc0d71a81f088cdb1d6ffef7a7d3f34948b48d17 (patch)
tree715a10d1ad39c583bf5dfbe8c86dee60550df47a
parentdfad46a0af14f4d6ade918da8be8b570995d31e6 (diff)
downloadFreeBSD-src-cc0d71a81f088cdb1d6ffef7a7d3f34948b48d17.zip
FreeBSD-src-cc0d71a81f088cdb1d6ffef7a7d3f34948b48d17.tar.gz
- Wrap functions and variables that aren't used in the alpha console probe
with #ifndef __alpha__/#endif - Add function prototypes for functions used during the alpha console probe and gdb port setup inside of #ifdef __alpha__/#endif.
-rw-r--r--sys/dev/sio/sio.c33
-rw-r--r--sys/isa/sio.c33
2 files changed, 52 insertions, 14 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 2dbccdc..e80d10f 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -408,7 +408,9 @@ static volatile speed_t gdbdefaultrate = CONSPEED;
#endif
static u_int com_events; /* input chars + weighted output completions */
static Port_t siocniobase;
+#ifndef __alpha__
static int siocnunit;
+#endif
static Port_t siogdbiobase;
static int siogdbunit = -1;
static bool_t sio_registered;
@@ -2938,13 +2940,22 @@ struct siocnstate {
u_char mcr;
};
+#ifndef __alpha__
static speed_t siocngetspeed __P((Port_t, struct speedtab *));
+#endif
static void siocnclose __P((struct siocnstate *sp, Port_t iobase));
static void siocnopen __P((struct siocnstate *sp, Port_t iobase, int speed));
static void siocntxwait __P((Port_t iobase));
+#ifdef __alpha__
+int siocnattach __P((int port, int speed));
+int siogdbattach __P((int port, int speed));
+int siogdbgetc __P((void));
+void siogdbputc __P((int c));
+#else
static cn_probe_t siocnprobe;
static cn_init_t siocninit;
+#endif
static cn_checkc_t siocncheckc;
static cn_getc_t siocngetc;
static cn_putc_t siocnputc;
@@ -2976,6 +2987,8 @@ siocntxwait(iobase)
;
}
+#ifndef __alpha__
+
/*
* Read the serial port specified and try to figure out what speed
* it's currently running at. We're assuming the serial port has
@@ -3012,6 +3025,8 @@ siocngetspeed(iobase, table)
return (0); /* didn't match anything sane */
}
+#endif
+
static void
siocnopen(sp, iobase, speed)
struct siocnstate *sp;
@@ -3079,6 +3094,8 @@ siocnclose(sp, iobase)
outb(iobase + com_ier, sp->ier);
}
+#ifndef __alpha__
+
static void
siocnprobe(cp)
struct consdev *cp;
@@ -3189,6 +3206,15 @@ siocnprobe(cp)
#endif
}
+static void
+siocninit(cp)
+ struct consdev *cp;
+{
+ comconsole = DEV_TO_UNIT(cp->cn_dev);
+}
+
+#endif
+
#ifdef __alpha__
CONS_DRIVER(sio, NULL, NULL, NULL, siocngetc, siocncheckc, siocnputc, NULL);
@@ -3281,13 +3307,6 @@ siogdbattach(port, speed)
#endif
-static void
-siocninit(cp)
- struct consdev *cp;
-{
- comconsole = DEV_TO_UNIT(cp->cn_dev);
-}
-
static int
siocncheckc(dev)
dev_t dev;
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 2dbccdc..e80d10f 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -408,7 +408,9 @@ static volatile speed_t gdbdefaultrate = CONSPEED;
#endif
static u_int com_events; /* input chars + weighted output completions */
static Port_t siocniobase;
+#ifndef __alpha__
static int siocnunit;
+#endif
static Port_t siogdbiobase;
static int siogdbunit = -1;
static bool_t sio_registered;
@@ -2938,13 +2940,22 @@ struct siocnstate {
u_char mcr;
};
+#ifndef __alpha__
static speed_t siocngetspeed __P((Port_t, struct speedtab *));
+#endif
static void siocnclose __P((struct siocnstate *sp, Port_t iobase));
static void siocnopen __P((struct siocnstate *sp, Port_t iobase, int speed));
static void siocntxwait __P((Port_t iobase));
+#ifdef __alpha__
+int siocnattach __P((int port, int speed));
+int siogdbattach __P((int port, int speed));
+int siogdbgetc __P((void));
+void siogdbputc __P((int c));
+#else
static cn_probe_t siocnprobe;
static cn_init_t siocninit;
+#endif
static cn_checkc_t siocncheckc;
static cn_getc_t siocngetc;
static cn_putc_t siocnputc;
@@ -2976,6 +2987,8 @@ siocntxwait(iobase)
;
}
+#ifndef __alpha__
+
/*
* Read the serial port specified and try to figure out what speed
* it's currently running at. We're assuming the serial port has
@@ -3012,6 +3025,8 @@ siocngetspeed(iobase, table)
return (0); /* didn't match anything sane */
}
+#endif
+
static void
siocnopen(sp, iobase, speed)
struct siocnstate *sp;
@@ -3079,6 +3094,8 @@ siocnclose(sp, iobase)
outb(iobase + com_ier, sp->ier);
}
+#ifndef __alpha__
+
static void
siocnprobe(cp)
struct consdev *cp;
@@ -3189,6 +3206,15 @@ siocnprobe(cp)
#endif
}
+static void
+siocninit(cp)
+ struct consdev *cp;
+{
+ comconsole = DEV_TO_UNIT(cp->cn_dev);
+}
+
+#endif
+
#ifdef __alpha__
CONS_DRIVER(sio, NULL, NULL, NULL, siocngetc, siocncheckc, siocnputc, NULL);
@@ -3281,13 +3307,6 @@ siogdbattach(port, speed)
#endif
-static void
-siocninit(cp)
- struct consdev *cp;
-{
- comconsole = DEV_TO_UNIT(cp->cn_dev);
-}
-
static int
siocncheckc(dev)
dev_t dev;
OpenPOWER on IntegriCloud