summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2001-10-21 09:20:52 +0000
committerhm <hm@FreeBSD.org>2001-10-21 09:20:52 +0000
commit980b42ded4563ef17d4c397c89546cf8a4130587 (patch)
tree251cd6004f12e1bb30d45c66dfd8c8e8227407f8
parentf392095807b868bdc264122bb22c9df0fbc0610e (diff)
downloadFreeBSD-src-980b42ded4563ef17d4c397c89546cf8a4130587.zip
FreeBSD-src-980b42ded4563ef17d4c397c89546cf8a4130587.tar.gz
Add a driver for the Compaq Microcom 610 ISDN (Compaq series PSB2222I) ISA PnP
card. Submitted by: Steve Looman Reviewed by: hm MFC after: 1 month
-rw-r--r--share/examples/isdn/KERNEL3
-rw-r--r--share/examples/isdn/ReleaseNotes5
-rw-r--r--share/examples/isdn/SupportedCards4
-rw-r--r--share/examples/isdn/ThankYou2
-rw-r--r--sys/i386/include/i4b_ioctl.h8
-rw-r--r--sys/i4b/include/i4b_ioctl.h8
-rw-r--r--sys/i4b/layer1/isic/i4b_ctx_s0P.c115
-rw-r--r--sys/i4b/layer1/isic/i4b_isic_pnp.c11
-rw-r--r--usr.sbin/i4b/isdnd/controller.c3
9 files changed, 121 insertions, 38 deletions
diff --git a/share/examples/isdn/KERNEL b/share/examples/isdn/KERNEL
index 81bea6e..2247092 100644
--- a/share/examples/isdn/KERNEL
+++ b/share/examples/isdn/KERNEL
@@ -5,7 +5,7 @@
# kernel config file and then edited (stripped down) to
# match your hardware configuration.
#
-# last edit-date: [Sun May 27 09:56:41 2001]
+# last edit-date: [Sun Oct 21 11:03:37 2001]
#
# $FreeBSD$
#
@@ -50,6 +50,7 @@ options ELSA_QS1ISA
options SIEMENS_ISURF2
options ASUSCOM_IPAC
options EICON_DIVA
+options COMPAQ_M610
# enable ELSA Microlink PCI card within the "isic" driver
options ELSA_QS1PCI
diff --git a/share/examples/isdn/ReleaseNotes b/share/examples/isdn/ReleaseNotes
index f9f2b9e..7b42c73 100644
--- a/share/examples/isdn/ReleaseNotes
+++ b/share/examples/isdn/ReleaseNotes
@@ -1,8 +1,11 @@
$FreeBSD$
-ReleaseNotes for isdn4bsd last edit-date: [Thu Oct 18 13:49:05 2001]
+ReleaseNotes for isdn4bsd last edit-date: [Sun Oct 21 11:07:23 2001]
================================================================================
+- add support written by Steve Looman for the Compaq Microcom 610 ISDN card
+ (also known as Compaq series PSB2222I).
+
release 1.01
--------------------------------------------------------------------------------
diff --git a/share/examples/isdn/SupportedCards b/share/examples/isdn/SupportedCards
index 28f8bd8..4108ce4 100644
--- a/share/examples/isdn/SupportedCards
+++ b/share/examples/isdn/SupportedCards
@@ -3,7 +3,7 @@
ISDN cards supported by isdn4bsd in FreeBSD
===========================================
- last edit-date: [Sat Jun 2 14:03:57 2001]
+ last edit-date: [Sun Oct 21 11:09:24 2001]
$FreeBSD$
@@ -57,6 +57,8 @@
Teles S0 PnP YES (Note 5)
Teles 16.3c EXP (Note 4)
AcerISDN P10 EXP (Note 4)
+ Compaq Microcom 610 YES ( = Compaq series PSB2222I ?)
+
3. Passive PCI bus ISDN cards
=============================
diff --git a/share/examples/isdn/ThankYou b/share/examples/isdn/ThankYou
index 8d9c783..ccf06f5 100644
--- a/share/examples/isdn/ThankYou
+++ b/share/examples/isdn/ThankYou
@@ -165,6 +165,8 @@ Hans Petter Selasky for his contribution of a driver for the
Sergio de Souza Prallon for the contribution of the itjc driver which
supports the NETJet-S and the Teles PCI-TJ cards
+Steve Looman for the driver for a Compaq Microcom 610 ISDN card
+
------------------------------------------
diff --git a/sys/i386/include/i4b_ioctl.h b/sys/i386/include/i4b_ioctl.h
index 8e685e3..9ae4008 100644
--- a/sys/i386/include/i4b_ioctl.h
+++ b/sys/i386/include/i4b_ioctl.h
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Thu Oct 18 13:40:40 2001]
+ * last edit-date: [Sun Oct 21 11:00:31 2001]
*
*---------------------------------------------------------------------------*/
@@ -47,7 +47,7 @@
*---------------------------------------------------------------------------*/
#define VERSION 1 /* version number */
#define REL 1 /* release number */
-#define STEP 0 /* release step */
+#define STEP 1 /* release step */
/*---------------------------------------------------------------------------*
* date/time format in i4b log messages
@@ -136,7 +136,7 @@
#define CARD_TYPEP_CCD_HFCS_PCI 28 /* Cologne Chip HFC-S PCI based */
#define CARD_TYPEP_NETJET_S 29 /* Traverse NetJet-S (Tiger300) */
#define CARD_TYPEP_DIVA_ISA 30 /* Eicon DIVA ISA PnP 2.0 or 2.02 */
-
+#define CARD_TYPEP_COMPAQ_M610 31 /* Compaq Microcom 610 */
/*
* in case you add support for more cards, please update:
*
@@ -145,7 +145,7 @@
* and adjust CARD_TYPEP_MAX below.
*/
-#define CARD_TYPEP_MAX 30 /* max type */
+#define CARD_TYPEP_MAX 31 /* max type */
/*---------------------------------------------------------------------------*
* card types for CTRL_DAIC
diff --git a/sys/i4b/include/i4b_ioctl.h b/sys/i4b/include/i4b_ioctl.h
index 8e685e3..9ae4008 100644
--- a/sys/i4b/include/i4b_ioctl.h
+++ b/sys/i4b/include/i4b_ioctl.h
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Thu Oct 18 13:40:40 2001]
+ * last edit-date: [Sun Oct 21 11:00:31 2001]
*
*---------------------------------------------------------------------------*/
@@ -47,7 +47,7 @@
*---------------------------------------------------------------------------*/
#define VERSION 1 /* version number */
#define REL 1 /* release number */
-#define STEP 0 /* release step */
+#define STEP 1 /* release step */
/*---------------------------------------------------------------------------*
* date/time format in i4b log messages
@@ -136,7 +136,7 @@
#define CARD_TYPEP_CCD_HFCS_PCI 28 /* Cologne Chip HFC-S PCI based */
#define CARD_TYPEP_NETJET_S 29 /* Traverse NetJet-S (Tiger300) */
#define CARD_TYPEP_DIVA_ISA 30 /* Eicon DIVA ISA PnP 2.0 or 2.02 */
-
+#define CARD_TYPEP_COMPAQ_M610 31 /* Compaq Microcom 610 */
/*
* in case you add support for more cards, please update:
*
@@ -145,7 +145,7 @@
* and adjust CARD_TYPEP_MAX below.
*/
-#define CARD_TYPEP_MAX 30 /* max type */
+#define CARD_TYPEP_MAX 31 /* max type */
/*---------------------------------------------------------------------------*
* card types for CTRL_DAIC
diff --git a/sys/i4b/layer1/isic/i4b_ctx_s0P.c b/sys/i4b/layer1/isic/i4b_ctx_s0P.c
index 8be6979..c1b61cd 100644
--- a/sys/i4b/layer1/isic/i4b_ctx_s0P.c
+++ b/sys/i4b/layer1/isic/i4b_ctx_s0P.c
@@ -43,7 +43,7 @@
#include "isic.h"
#include "opt_i4b.h"
-#if (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P))
+#if (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P) || defined(COMPAQ_M610))
#include <sys/param.h>
#include <sys/systm.h>
@@ -109,6 +109,7 @@ isic_attach_Cs0P(device_t dev)
{
u_int32_t iobase1;
u_int32_t iobase2;
+ u_int32_t iocfg;
int unit = device_get_unit(dev);
struct l1_softc *sc = &l1_sc[unit];
bus_space_tag_t t;
@@ -131,25 +132,61 @@ isic_attach_Cs0P(device_t dev)
return ENXIO;
}
- /* remember the io base addresses */
+ /*
+ * Compaq M610 has a cfg io area,
+ * we need it
+ */
+
+ if (sc->sc_cardtyp == CARD_TYPEP_COMPAQ_M610)
+ {
+ sc->sc_resources.io_rid[2] = 2;
- iobase1 = rman_get_start(sc->sc_resources.io_base[0]);
- iobase2 = rman_get_start(sc->sc_resources.io_base[1]);
+ if(!(sc->sc_resources.io_base[2] =
+ bus_alloc_resource(dev, SYS_RES_IOPORT,
+ &sc->sc_resources.io_rid[2],
+ 0UL, ~0UL, 1, RF_ACTIVE)))
+ {
+ printf("isic%d: Could not get cfg io area for Compaq Microcom 610\n", unit);
+ isic_detach_common(dev);
+ return ENXIO;
+ }
+
+ iocfg = rman_get_start(sc->sc_resources.io_base[2]);
+
+ bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[2],
+ sc->sc_resources.io_base[2]);
+ }
+
+ /* remember the io base addresses */
+ if (sc->sc_cardtyp != CARD_TYPEP_COMPAQ_M610)
+ {
+ iobase1 = rman_get_start(sc->sc_resources.io_base[0]);
+ iobase2 = rman_get_start(sc->sc_resources.io_base[1]);
+ }
+ else
+ {
+ iobase1 = rman_get_start(sc->sc_resources.io_base[1]);
+ iobase2 = rman_get_start(sc->sc_resources.io_base[0]);
+ }
+
/*
* because overlapping resources are invalid,
- * release the first io port resource
+ * release the first and second io port resource
*/
bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[0],
sc->sc_resources.io_base[0]);
+ bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[1],
+ sc->sc_resources.io_base[1]);
+
/* set and allocate a base io address for the ISAC chip */
sc->sc_resources.io_rid[2] = 2;
bus_set_resource(dev, SYS_RES_IOPORT, 2, iobase1-0x20, 0x40);
-
+
if(!(sc->sc_resources.io_base[2] =
bus_alloc_resource(dev, SYS_RES_IOPORT,
&sc->sc_resources.io_rid[2],
@@ -160,13 +197,6 @@ isic_attach_Cs0P(device_t dev)
return ENXIO;
}
- /*
- * because overlapping resources are invalid,
- * release the second io port resource
- */
-
- bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[1],
- sc->sc_resources.io_base[1]);
/* set and allocate a resource for the HSCX channel A */
@@ -200,7 +230,7 @@ isic_attach_Cs0P(device_t dev)
sc->sc_resources.io_rid[4] = 4;
bus_set_resource(dev, SYS_RES_IOPORT, 4, iobase2, 0x40);
-
+
if(!(sc->sc_resources.io_base[4] =
bus_alloc_resource(dev,SYS_RES_IOPORT,
&sc->sc_resources.io_rid[4],
@@ -210,7 +240,29 @@ isic_attach_Cs0P(device_t dev)
isic_detach_common(dev);
return ENXIO;
}
-
+
+ /*
+ * set and allocate a resource for the cfg io
+ * for compaq m610
+ */
+
+ if (sc->sc_cardtyp == CARD_TYPEP_COMPAQ_M610)
+ {
+ sc->sc_resources.io_rid[5] = 5;
+
+ bus_set_resource(dev, SYS_RES_IOPORT, 5, iocfg, 0x01);
+
+ if(!(sc->sc_resources.io_base[5] =
+ bus_alloc_resource(dev,SYS_RES_IOPORT,
+ &sc->sc_resources.io_rid[5],
+ 0ul, ~0ul, 1, RF_ACTIVE)))
+ {
+ printf("isic%d: Could not get cfg io area for Compaq Microcom 610!\n", unit);
+ isic_detach_common(dev);
+ return ENXIO;
+ }
+ }
+
/* setup access routines */
sc->clearirq = NULL;
@@ -221,8 +273,9 @@ isic_attach_Cs0P(device_t dev)
sc->writefifo = ctxs0P_write_fifo;
/* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_CS0P;
+
+ if (sc->sc_cardtyp != CARD_TYPEP_COMPAQ_M610)
+ sc->sc_cardtyp = CARD_TYPEP_CS0P;
/* setup IOM bus type */
@@ -233,17 +286,31 @@ isic_attach_Cs0P(device_t dev)
/* enable the card */
- t = rman_get_bustag(sc->sc_resources.io_base[2]);
- h = rman_get_bushandle(sc->sc_resources.io_base[2]);
+ if (sc->sc_cardtyp != CARD_TYPEP_COMPAQ_M610)
+ {
+ t = rman_get_bustag(sc->sc_resources.io_base[2]);
+ h = rman_get_bushandle(sc->sc_resources.io_base[2]);
- bus_space_write_1(t, h, 0x3c, 0);
- DELAY(SEC_DELAY / 10);
+ bus_space_write_1(t, h, 0x3c, 0);
+ DELAY(SEC_DELAY / 10);
- bus_space_write_1(t, h, 0x3c, 1);
- DELAY(SEC_DELAY / 10);
+ bus_space_write_1(t, h, 0x3c, 1);
+ DELAY(SEC_DELAY / 10);
+ }
+ else
+ {
+ t = rman_get_bustag(sc->sc_resources.io_base[5]);
+ h = rman_get_bushandle(sc->sc_resources.io_base[5]);
+
+ bus_space_write_1(t, h, 0xff, 0);
+ DELAY(SEC_DELAY / 10);
+
+ bus_space_write_1(t, h, 0x00, 1);
+ DELAY(SEC_DELAY / 10);
+ }
return 0;
}
-#endif /* (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P)) */
+#endif /* (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P) || defined(COMPAQ_M610)) */
diff --git a/sys/i4b/layer1/isic/i4b_isic_pnp.c b/sys/i4b/layer1/isic/i4b_isic_pnp.c
index e02878d..f5e1bcc 100644
--- a/sys/i4b/layer1/isic/i4b_isic_pnp.c
+++ b/sys/i4b/layer1/isic/i4b_isic_pnp.c
@@ -71,14 +71,16 @@
#define VID_ASUSCOM_IPAC 0x90167506 /* Asuscom (with IPAC) */
#define VID_EICON_DIVA_20 0x7100891c /* Eicon DIVA 2.0 ISAC/HSCX */
#define VID_EICON_DIVA_202 0xa100891c /* Eicon DIVA 2.02 IPAC */
+#define VID_COMPAQ_M610 0x0210110e /* Compaq Microcom 610 */
static struct isic_pnp_ids {
u_long vend_id;
char *id_str;
} isic_pnp_ids[] = {
-#if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P)
+#if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P) || defined(COMPAQ_M610)
{ VID_TEL163PNP, "Teles S0/16.3 PnP" },
{ VID_CREATIXPP, "Creatix S0/16 PnP" },
+ { VID_COMPAQ_M610, "Compaq Microcom 610" },
#endif
#ifdef DYNALINK
{ VID_DYNALINK, "Dynalink IS64PH" },
@@ -223,7 +225,7 @@ isic_pnp_attach(device_t dev)
switch(vend_id)
{
-#if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P)
+#if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P) || defined(COMPAQ_M610)
case VID_TEL163PNP:
sc->sc_cardtyp = CARD_TYPEP_163P;
ret = isic_attach_Cs0P(dev);
@@ -233,6 +235,11 @@ isic_pnp_attach(device_t dev)
sc->sc_cardtyp = CARD_TYPEP_CS0P;
ret = isic_attach_Cs0P(dev);
break;
+
+ case VID_COMPAQ_M610:
+ sc->sc_cardtyp = CARD_TYPEP_COMPAQ_M610;
+ ret = isic_attach_Cs0P(dev);
+ break;
#endif
#ifdef DYNALINK
case VID_DYNALINK:
diff --git a/usr.sbin/i4b/isdnd/controller.c b/usr.sbin/i4b/isdnd/controller.c
index 95f5c90..7b69fc4 100644
--- a/usr.sbin/i4b/isdnd/controller.c
+++ b/usr.sbin/i4b/isdnd/controller.c
@@ -29,7 +29,7 @@
*
* $FreeBSD$
*
- * last edit-date: [Sun May 20 10:03:53 2001]
+ * last edit-date: [Sun Oct 21 11:02:15 2001]
*
*---------------------------------------------------------------------------*/
@@ -78,6 +78,7 @@ name_of_controller(int ctrl_type, int card_type)
"Cologne Chip HFC-S PCI based",
"Traverse Tech NETjet-S / Teles PCI-TJ",
"Eicon.Diehl DIVA 2.0 / 2.02 ISA PnP",
+ "Compaq Microcom 610",
};
static char *daic_card[] = {
OpenPOWER on IntegriCloud