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
This commit is contained in:
Hellmuth Michaelis 2001-10-21 09:20:52 +00:00
parent 12428dfd1b
commit 676ccc0cd0
9 changed files with 121 additions and 38 deletions

View File

@ -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

View File

@ -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
--------------------------------------------------------------------------------

View File

@ -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
=============================

View File

@ -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
------------------------------------------

View File

@ -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

View File

@ -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

View File

@ -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;
}
/*
* 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;
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 */
iobase1 = rman_get_start(sc->sc_resources.io_base[0]);
iobase2 = rman_get_start(sc->sc_resources.io_base[1]);
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)) */

View File

@ -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:

View File

@ -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[] = {