summaryrefslogtreecommitdiffstats
path: root/sys/dev/si
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-01-18 13:33:36 +0000
committermarius <marius@FreeBSD.org>2007-01-18 13:33:36 +0000
commit85c3e6d089a47ffbf7d2b8bd714fe07527f3667b (patch)
treef51813769e6b63a059e68e2a35792dfb33294012 /sys/dev/si
parentfb522f68ac7e8347a80b7ac3c40762fdce82d0bf (diff)
downloadFreeBSD-src-85c3e6d089a47ffbf7d2b8bd714fe07527f3667b.zip
FreeBSD-src-85c3e6d089a47ffbf7d2b8bd714fe07527f3667b.tar.gz
Wrap the EISA-specific parts of the dpt(4) and si(4) back-ends in
the newly added DEV_EISA. This is done so that these back-ends can be compiled on platforms not providing in{b,w,l}()/out{b,w,l}() and friends (but may wish to use them together with bus front-ends other than the EISA one).
Diffstat (limited to 'sys/dev/si')
-rw-r--r--sys/dev/si/si.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 584e851..967a4fc 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -43,6 +43,7 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International
#include "opt_compat.h"
#include "opt_debug_si.h"
+#include "opt_eisa.h"
#include "opt_tty.h"
#include <sys/param.h>
@@ -277,8 +278,10 @@ siattach(device_t dev)
/* Stop the CPU first so it won't stomp around while we load */
switch (sc->sc_type) {
+#ifdef DEV_EISA
case SIEISA:
outb(sc->sc_iobase + 2, sc->sc_irq << 4);
+#endif
break;
case SIPCI:
*(maddr+SIPCIRESET) = 0;
@@ -321,12 +324,14 @@ siattach(device_t dev)
/* Now start the CPU */
switch (sc->sc_type) {
+#ifdef DEV_EISA
case SIEISA:
/* modify the download code to tell it that it's on an EISA */
*(maddr + 0x42) = 1;
outb(sc->sc_iobase + 2, (sc->sc_irq << 4) | 4);
(void)inb(sc->sc_iobase + 3); /* reset interrupt */
break;
+#endif
case SIPCI:
/* modify the download code to tell it that it's on a PCI */
*(maddr+0x42) = 1;
@@ -1132,11 +1137,13 @@ si_intr(void *arg)
((volatile struct si_reg *)maddr)->int_pending = 0;
*(maddr+SIJETINTCL) = 0x0;
break;
+#ifdef DEV_EISA
case SIEISA:
maddr = sc->sc_maddr;
((volatile struct si_reg *)maddr)->int_pending = 0;
(void)inb(sc->sc_iobase + 3);
break;
+#endif
case SIEMPTY:
default:
continue;
@@ -1622,7 +1629,9 @@ si_modulename(int host_type, int uart_type)
{
switch (host_type) {
/* Z280 based cards */
+#ifdef DEV_EISA
case SIEISA:
+#endif
case SIHOST2:
case SIHOST:
case SIPCI:
OpenPOWER on IntegriCloud