remove redundant definitions of card types:

- remove all occurances of FLAG_XXX values and replace with CARD_TYPEP_XXX
 - remove sc_flag from isic softc and replace it with sc_cardtyp
remove some left over redundant definitions from isic and i4b_l1.h
remove left over cvs id from i4b cvs repository
This commit is contained in:
Hellmuth Michaelis 2001-01-24 08:41:52 +00:00
parent 1715c485d4
commit b5dd89c336
30 changed files with 118 additions and 451 deletions

View File

@ -29,7 +29,7 @@
*
* $FreeBSD$
*
* last edit-date: [Wed Jan 10 16:42:27 2001]
* last edit-date: [Tue Jan 23 17:04:57 2001]
*
*---------------------------------------------------------------------------*/
@ -38,39 +38,6 @@
#include <i4b/include/i4b_l3l4.h>
/*---------------------------------------------------------------------------
* kernel config file flags definition
*---------------------------------------------------------------------------*/
#define FLAG_TELES_S0_8 1
#define FLAG_TELES_S0_16 2
#define FLAG_TELES_S0_163 3
#define FLAG_AVM_A1 4
#define FLAG_TELES_S0_163_PnP 5
#define FLAG_CREATIX_S0_PnP 6
#define FLAG_USR_ISDN_TA_INT 7
#define FLAG_DRN_NGO 8
#define FLAG_SWS 9
#define FLAG_AVM_A1_PCMCIA 10
#define FLAG_DYNALINK 11
#define FLAG_BLMASTER 12
#define FLAG_ELSA_QS1P_ISA 13
#define FLAG_ELSA_QS1P_PCI 14
#define FLAG_SIEMENS_ITALK 15
#define FLAG_ELSA_MLIMC 16
#define FLAG_ELSA_MLMCALL 17
#define FLAG_ITK_IX1 18
#define FLAG_AVMA1PCI 19
#define FLAG_ELSA_PCC16 20
#define FLAG_AVM_PNP 21
#define FLAG_SIEMENS_ISURF2 22
#define FLAG_ASUSCOM_IPAC 23
#define FLAG_WINBOND_6692 24
#define FLAG_TELES_S0_163C 25
#define FLAG_ACER_P10 26
#define FLAG_TELEINT_NO_1 27
#define FLAG_CCD_HFCS_PCI 28
#define FLAG_NETJET_S 29
#define SEC_DELAY 1000000 /* one second DELAY for DELAY*/
#define MAX_DFRAME_LEN 264 /* max length of a D frame */

View File

@ -31,7 +31,7 @@
* been put here, except the chip spesific "PnP" setup.
*
*
* last edit-date: [Wed Jul 19 09:41:07 2000]
* last edit-date: [Tue Jan 23 16:03:33 2001]
*
* $Id: i4b_ihfc_pnp.c,v 1.9 2000/09/19 13:50:36 hm Exp $
*
@ -91,9 +91,9 @@ const struct ihfc_pnp_ids
}
ihfc_pnp_ids[] =
{
{ 0x10262750, FLAG_TELES_S0_163C, HFC_S , 2, 0x200 , 0x2d},
{ 0x20262750, FLAG_TELES_S0_163C, HFC_SP, 0, 0x000 , 0x0f},
{ 0x1411d805, FLAG_ACER_P10 , HFC_S , 1, 0x300 , 0x0e},
{ 0x10262750, CARD_TYPEP_16_3C, HFC_S, 2, 0x200, 0x2d},
{ 0x20262750, CARD_TYPEP_16_3C, HFC_SP, 0, 0x000, 0x0f},
{ 0x1411d805, CARD_TYPEP_ACERP10, HFC_S, 1, 0x300, 0x0e},
{ 0 }
};
@ -290,7 +290,7 @@ ihfc_isa_probe(device_t dev)
{
S_DLP = IHFC_DLP; /* set D-priority */
S_HFC = HFC_1; /* set chip type */
S_I4BFLAG = FLAG_TELEINT_NO_1; /* set flag */
S_I4BFLAG = CARD_TYPEP_TELEINT_NO_1; /* set flag */
S_NTMODE = IHFC_NTMODE; /* set mode */
S_STDEL = 0x00; /* set delay (not used) */

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 1999 Ari Suutari. All rights reserved.
*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -40,11 +40,9 @@
* code is modeled after Linux i4l driver written by Karsten
* Keil.
*
* $Id: i4b_asuscom_ipac.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 15:59:33 2000]
* last edit-date: [Wed Jan 24 09:06:30 2001]
*
*---------------------------------------------------------------------------*/
@ -56,12 +54,9 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_ipac.h>

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 1996 Andrew Gordon. All rights reserved.
*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -35,11 +35,9 @@
* i4b_avm_a1.c - AVM A1/Fritz passive card driver for isdn4bsd
* ------------------------------------------------------------
*
* $Id: i4b_avm_a1.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon May 29 16:42:06 2000]
* last edit-date: [Wed Jan 24 09:25:23 2001]
*
*---------------------------------------------------------------------------*/
@ -51,13 +49,12 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>
@ -182,7 +179,6 @@ isic_probe_avma1(device_t dev)
sc = &l1_sc[unit]; /* get pointer to softc */
sc->sc_unit = unit; /* set unit */
sc->sc_flags = FLAG_AVM_A1; /* set flags */
/* see if an io base was supplied */

View File

@ -29,7 +29,7 @@
*
* $FreeBSD$
*
* last edit-date: [Fri Jan 12 16:52:15 2001]
* last edit-date: [Wed Jan 24 09:07:12 2001]
*
*---------------------------------------------------------------------------*/
@ -40,8 +40,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/if.h>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* isic - I4B Siemens ISDN Chipset Driver for Creatix/Teles PnP
* ============================================================
*
* $Id: i4b_ctx_s0P.c,v 1.4 2000/08/22 11:30:04 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 15:59:45 2000]
* last edit-date: [Wed Jan 24 09:07:22 2001]
*
* Note: this driver works for the Creatix ISDN S0-16 P+P and
* for the Teles S0/16.3 PnP card. Although they are not
@ -50,13 +48,12 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_drn_ngo.c - Dr. Neuhaus Niccy GO@ and SAGEM Cybermod
* --------------------------------------------------------
*
* $Id: i4b_drn_ngo.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon May 29 16:43:21 2000]
* last edit-date: [Wed Jan 24 09:07:44 2001]
*
*---------------------------------------------------------------------------*/
@ -43,13 +41,10 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>

View File

@ -33,11 +33,9 @@
* isdn4bsd layer1 driver for Dynalink IS64PH isdn TA
* ==================================================
*
* $Id: i4b_dynalink.c,v 1.1 2000/09/04 09:17:26 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon Sep 4 09:47:18 2000]
* last edit-date: [Wed Jan 24 09:08:03 2001]
*
*---------------------------------------------------------------------------*/
@ -77,12 +75,12 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1999, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -24,16 +24,12 @@
*
*---------------------------------------------------------------------------
*
* isic - I4B Siemens ISDN Chipset Driver for ELSA MicroLink ISDN/PCC-16
* =====================================================================
*
* This should now also work for an ELSA PCFpro.
*
* $Id: i4b_elsa_pcc16.c,v 1.4 2000/07/19 07:51:22 hm Exp $
* isic - I4B driver for ELSA MicroLink ISDN/PCC-16 and ELSA PCFpro
* ================================================================
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:00:01 2000]
* last edit-date: [Wed Jan 24 09:26:33 2001]
*
*---------------------------------------------------------------------------*/
@ -47,7 +43,6 @@
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <i4b/layer1/isic/i4b_isic.h>
@ -238,11 +233,8 @@ isic_probe_Epcc16(device_t dev)
}
sc = &l1_sc[unit]; /* get pointer to softc */
sc->sc_unit = unit; /* set unit */
sc->sc_flags = FLAG_ELSA_PCC16; /* set flags */
/* see if an io base was supplied */
if(!(sc->sc_resources.io_base[0] =

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* isic - I4B Siemens ISDN Chipset Driver for ELSA Quickstep 1000pro ISA
* =====================================================================
*
* $Id: i4b_elsa_qs1i.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:00:15 2000]
* last edit-date: [Wed Jan 24 09:09:03 2001]
*
*---------------------------------------------------------------------------*/
@ -45,7 +43,6 @@
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <i4b/layer1/isic/i4b_isic.h>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* isic - I4B Siemens ISDN Chipset Driver for ELSA MicroLink ISDN/PCI
* ==================================================================
*
* $Id: i4b_elsa_qs1p.c,v 1.4 2000/06/02 11:58:56 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Sun Dec 3 17:18:59 2000]
* last edit-date: [Wed Jan 24 09:09:28 2001]
*
* Note: ELSA Quickstep 1000pro PCI = ELSA MicroLink ISDN/PCI
*
@ -47,8 +45,8 @@
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/if.h>
#include <machine/bus.h>
#include <sys/bus.h>

View File

@ -29,7 +29,7 @@
*
* $FreeBSD$
*
* last edit-date: [Mon Jan 15 15:50:42 2001]
* last edit-date: [Wed Jan 24 09:09:42 2001]
*
*---------------------------------------------------------------------------*/
@ -42,7 +42,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_debug.h>

View File

@ -30,11 +30,9 @@
*
*---------------------------------------------------------------------------
*
* $Id: i4b_hscx.h,v 1.2 2000/03/09 16:12:51 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon Dec 13 22:00:49 1999]
* last edit-date: [Wed Jan 24 09:09:51 2001]
*
*---------------------------------------------------------------------------*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_ipac.h - definitions for the Siemens IPAC PSB2115 chip
* ==========================================================
*
* $Id: i4b_ipac.h,v 1.1 2000/03/07 14:12:26 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon Dec 13 22:00:58 1999]
* last edit-date: [Wed Jan 24 09:10:09 2001]
*
*---------------------------------------------------------------------------
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_isac.c - i4b siemens isdn chipset driver ISAC handler
* ---------------------------------------------------------
*
* $Id: i4b_isac.c,v 1.7 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon May 29 16:45:08 2000]
* last edit-date: [Wed Jan 24 09:10:36 2001]
*
*---------------------------------------------------------------------------*/
@ -46,7 +44,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_debug.h>

View File

@ -30,11 +30,9 @@
*
*---------------------------------------------------------------------------
*
* $Id: i4b_isac.h,v 1.2 2000/03/09 16:12:51 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon Dec 13 22:01:25 1999]
* last edit-date: [Wed Jan 24 09:10:42 2001]
*
*---------------------------------------------------------------------------*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_isic.c - global isic stuff
* ==============================
*
* $Id: i4b_isic.c,v 1.6 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon May 29 16:45:24 2000]
* last edit-date: [Wed Jan 24 09:29:42 2001]
*
*---------------------------------------------------------------------------*/
@ -45,7 +43,6 @@
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_debug.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
@ -377,37 +374,37 @@ isic_attach_common(device_t dev)
/* announce manufacturer and card type for ISA cards */
switch(sc->sc_flags)
switch(sc->sc_cardtyp)
{
case FLAG_TELES_S0_8:
case CARD_TYPEP_8:
drvid = "Teles S0/8 (or compatible)";
break;
case FLAG_TELES_S0_16:
case CARD_TYPEP_16:
drvid = "Teles S0/16 (or compatible)";
break;
case FLAG_TELES_S0_163:
case CARD_TYPEP_16_3:
drvid = "Teles S0/16.3";
break;
case FLAG_AVM_A1:
case CARD_TYPEP_AVMA1:
drvid = "AVM A1 or Fritz!Card Classic";
break;
case FLAG_AVM_A1_PCMCIA:
case CARD_TYPEP_PCFRITZ:
drvid = "AVM Fritz!Card PCMCIA";
break;
case FLAG_USR_ISDN_TA_INT:
case CARD_TYPEP_USRTA:
drvid = "USRobotics Sportster ISDN TA intern";
break;
case FLAG_ITK_IX1:
case CARD_TYPEP_ITKIX1:
drvid = "ITK ix1 micro";
break;
case FLAG_ELSA_PCC16:
case CARD_TYPEP_PCC16:
drvid = "ELSA MicroLink ISDN/PCC-16";
break;
@ -454,7 +451,7 @@ isic_detach_common(device_t dev)
struct l1_softc *sc = &l1_sc[device_get_unit(dev)];
int i;
sc->sc_flags = 0;
sc->sc_cardtyp = CARD_TYPEP_UNK;
/* free interrupt resources */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_l1.h - isdn4bsd layer 1 header file
* ---------------------------------------
*
* $Id: i4b_isic.h,v 1.4 2000/09/04 09:17:26 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon Sep 4 09:34:38 2000]
* last edit-date: [Wed Jan 24 09:23:24 2001]
*
*---------------------------------------------------------------------------*/
@ -54,40 +52,7 @@
* as one is able to set 3 (sometimes 4) different configurations by
* jumpers so a maximum of 3 (4) cards per ISA bus is possible.
*---------------------------------------------------------------------------*/
#define ISIC_MAXUNIT 3 /* max no of supported units 0..3 */
/*---------------------------------------------------------------------------
* kernel config file flags definition
*---------------------------------------------------------------------------*/
#define FLAG_TELES_S0_8 1
#define FLAG_TELES_S0_16 2
#define FLAG_TELES_S0_163 3
#define FLAG_AVM_A1 4
#define FLAG_TELES_S0_163_PnP 5
#define FLAG_CREATIX_S0_PnP 6
#define FLAG_USR_ISDN_TA_INT 7
#define FLAG_DRN_NGO 8
#define FLAG_SWS 9
#define FLAG_AVM_A1_PCMCIA 10
#define FLAG_DYNALINK 11
#define FLAG_BLMASTER 12
#define FLAG_ELSA_QS1P_ISA 13
#define FLAG_ELSA_QS1P_PCI 14
#define FLAG_SIEMENS_ITALK 15
#define FLAG_ELSA_MLIMC 16
#define FLAG_ELSA_MLMCALL 17
#define FLAG_ITK_IX1 18
#define FLAG_AVMA1PCI 19
#define FLAG_ELSA_PCC16 20
#define FLAG_AVM_PNP 21
#define FLAG_SIEMENS_ISURF2 22
#define FLAG_ASUSCOM_IPAC 23
#define SEC_DELAY 1000000 /* one second DELAY for DELAY*/
#define MAX_DFRAME_LEN 264 /* max length of a D frame */
#define min(a,b) ((a)<(b)?(a):(b))
#define ISIC_MAXUNIT 3 /* max no of supported units 0..3 */
#define INFO_IO_BASES 50 /* 49 needed for USR */
@ -164,7 +129,6 @@ struct l1_softc
int sc_unit; /* unit number */
int sc_irq; /* interrupt vector */
struct i4b_info sc_resources;
int sc_flags;
int sc_port; /* port base address */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_l1.h - isdn4bsd layer 1 header file
* ---------------------------------------
*
* $Id: i4b_isic_ext.h,v 1.3 2000/06/02 16:14:36 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Jun 2 14:43:57 2000]
* last edit-date: [Wed Jan 24 09:11:12 2001]
*
*---------------------------------------------------------------------------*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_isic_isa.c - ISA bus interface
* ==================================
*
* $Id: i4b_isic_isa.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:00:46 2000]
* last edit-date: [Wed Jan 24 09:30:19 2001]
*
*---------------------------------------------------------------------------*/
@ -46,7 +44,6 @@
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <i4b/layer1/isic/i4b_isic.h>
@ -89,43 +86,43 @@ isic_isa_probe(device_t dev)
switch(device_get_flags(dev))
{
#ifdef TEL_S0_16
case FLAG_TELES_S0_16:
case CARD_TYPEP_16:
ret = isic_probe_s016(dev);
break;
#endif
#ifdef TEL_S0_8
case FLAG_TELES_S0_8:
case CARD_TYPEP_8:
ret = isic_probe_s08(dev);
break;
#endif
#ifdef ELSA_PCC16
case FLAG_ELSA_PCC16:
case CARD_TYPEP_PCC16:
ret = isic_probe_Epcc16(dev);
break;
#endif
#ifdef TEL_S0_16_3
case FLAG_TELES_S0_163:
case CARD_TYPEP_16_3:
ret = isic_probe_s0163(dev);
break;
#endif
#ifdef AVM_A1
case FLAG_AVM_A1:
case CARD_TYPEP_AVMA1:
ret = isic_probe_avma1(dev);
break;
#endif
#ifdef USR_STI
case FLAG_USR_ISDN_TA_INT:
case CARD_TYPEP_USRTA:
ret = isic_probe_usrtai(dev);
break;
#endif
#ifdef ITKIX1
case FLAG_ITK_IX1:
case CARD_TYPEP_ITKIX1:
ret = isic_probe_itkix1(dev);
break;
#endif
@ -152,46 +149,46 @@ isic_isa_attach(device_t dev)
/* card dependent setup */
switch(sc->sc_flags)
switch(sc->sc_cardtyp)
{
#ifdef TEL_S0_16
case FLAG_TELES_S0_16:
case CARD_TYPEP_16:
ret = isic_attach_s016(dev);
break;
#endif
#ifdef TEL_S0_8
case FLAG_TELES_S0_8:
case CARD_TYPEP_8:
ret = isic_attach_s08(dev);
break;
#endif
#ifdef ELSA_PCC16
case FLAG_ELSA_PCC16:
case CARD_TYPEP_PCC16:
ret = isic_attach_Epcc16(dev);
break;
#endif
#ifdef TEL_S0_16_3
case FLAG_TELES_S0_163:
case CARD_TYPEP_16_3:
ret = isic_attach_s0163(dev);
break;
#endif
#ifdef AVM_A1
case FLAG_AVM_A1:
case CARD_TYPEP_AVMA1:
ret = isic_attach_avma1(dev);
break;
#endif
#ifdef USR_STI
case FLAG_USR_ISDN_TA_INT:
case CARD_TYPEP_USRTA:
ret = isic_attach_usrtai(dev);
break;
#endif
#ifdef ITKIX1
case FLAG_ITK_IX1:
case CARD_TYPEP_ITKIX1:
ret = isic_attach_itkix1(dev);
break;
#endif

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 1998, 1999 German Tischler. All rights reserved.
*
* Copyright (c) 1998, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1998, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -37,11 +37,9 @@
* i4b_isic_pnp.c - i4b pnp support
* --------------------------------
*
* $Id: i4b_isic_pnp.c,v 1.2 2000/03/09 16:12:51 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Thu Mar 9 16:04:10 2000]
* last edit-date: [Wed Jan 24 09:31:38 2001]
*
*---------------------------------------------------------------------------*/
@ -56,7 +54,6 @@
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <i4b/layer1/isic/i4b_isic.h>
@ -222,60 +219,54 @@ isic_pnp_attach(device_t dev)
{
#if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P)
case VID_TEL163PNP:
sc->sc_flags = FLAG_TELES_S0_163_PnP;
sc->sc_cardtyp = CARD_TYPEP_163P;
ret = isic_attach_Cs0P(dev);
break;
case VID_CREATIXPP:
sc->sc_flags = FLAG_CREATIX_S0_PnP;
sc->sc_cardtyp = CARD_TYPEP_CS0P;
ret = isic_attach_Cs0P(dev);
break;
#endif
#ifdef DYNALINK
case VID_DYNALINK:
sc->sc_flags = FLAG_DYNALINK;
sc->sc_cardtyp = CARD_TYPEP_DYNALINK;
ret = isic_attach_Dyn(dev);
break;
#endif
#ifdef SEDLBAUER
case VID_SEDLBAUER:
sc->sc_flags = FLAG_SWS;
sc->sc_cardtyp = CARD_TYPEP_SWS;
ret = isic_attach_sws(dev);
break;
#endif
#ifdef DRN_NGO
case VID_NICCYGO:
sc->sc_flags = FLAG_DRN_NGO;
sc->sc_cardtyp = CARD_TYPEP_DRNNGO;
ret = isic_attach_drnngo(dev);
break;
#endif
#ifdef ELSA_QS1ISA
case VID_ELSAQS1P:
sc->sc_flags = FLAG_ELSA_QS1P_ISA;
sc->sc_cardtyp = CARD_TYPEP_ELSAQS1ISA;
ret = isic_attach_Eqs1pi(dev);
break;
#endif
#ifdef ITKIX1
case VID_ITK0025:
sc->sc_flags = FLAG_ITK_IX1;
sc->sc_cardtyp = CARD_TYPEP_ITKIX1;
ret = isic_attach_itkix1(dev);
break;
#endif
#ifdef AVM_PNP
case VID_AVMPNP:
sc->sc_flags = FLAG_AVM_PNP;
ret = isic_attach_avm_pnp(dev);
break;
#endif
#ifdef SIEMENS_ISURF2
case VID_SIESURF2:
sc->sc_flags = FLAG_SIEMENS_ISURF2;
sc->sc_cardtyp = CARD_TYPEP_SIE_ISURF2;
ret = isic_attach_siemens_isurf(dev);
break;
#endif
#ifdef ASUSCOM_IPAC
case VID_ASUSCOM_IPAC:
sc->sc_flags = FLAG_ASUSCOM_IPAC;
sc->sc_cardtyp = CARD_TYPEP_ASUSCOMIPAC;
ret = isic_attach_asi(dev);
break;
#endif
@ -294,7 +285,7 @@ isic_pnp_attach(device_t dev)
if(isic_attach_common(dev))
{
/* unset flag */
sc->sc_flags = 0;
sc->sc_cardtyp = CARD_TYPEP_UNK;
/* free irq here, it hasn't been attached yet */
bus_release_resource(dev,SYS_RES_IRQ,sc->sc_resources.irq_rid,

View File

@ -26,9 +26,7 @@
* i4b_itk_ix1.c - ITK ix1 micro passive card driver for isdn4bsd
* --------------------------------------------------------------
*
* $Id: i4b_itk_ix1.c,v 1.1 2000/08/24 14:08:41 hm Exp $
*
* last edit-date: [Thu Aug 24 15:44:33 2000]
* last edit-date: [Wed Jan 24 09:27:06 2001]
*
* $FreeBSD$
*
@ -70,16 +68,14 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>
/* Register offsets */
#define ITK_ISAC_DATA 0
#define ITK_HSCX_DATA 1
@ -207,7 +203,6 @@ isic_probe_itkix1(device_t dev)
sc = &l1_sc[unit]; /* get pointer to softc */
sc->sc_unit = unit; /* set unit */
sc->sc_flags = FLAG_ITK_IX1; /* set flags */
#if defined(ITK_PROBE_DEBUG)
printf("Allocating io base...");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_l1.c - isdn4bsd layer 1 handler
* -----------------------------------
*
* $Id: i4b_l1.c,v 1.7 2000/06/02 16:14:36 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Jun 2 18:09:53 2000]
* last edit-date: [Wed Jan 24 09:12:03 2001]
*
*---------------------------------------------------------------------------*/
@ -44,7 +42,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_debug.h>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,11 +27,9 @@
* i4b_l1fsm.c - isdn4bsd layer 1 I.430 state machine
* --------------------------------------------------
*
* $Id: i4b_l1fsm.c,v 1.8 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon May 29 16:46:03 2000]
* last edit-date: [Wed Jan 24 09:12:18 2001]
*
*---------------------------------------------------------------------------*/
@ -44,7 +42,6 @@
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_debug.h>

View File

@ -29,19 +29,16 @@
* SUCH DAMAGE.
*
*---------------------------------------------------------------------------
* Based on ELSA Quickstep 1000pro PCI driver (i4b_elsa_qs1p.c)
*---------------------------------------------------------------------------
* In case of trouble please contact Udo Schweigert <ust@cert.siemens.de>
*---------------------------------------------------------------------------
*
*
* Siemens I-Surf 2.0 PnP specific routines for isic driver
* --------------------------------------------------------
*
* $Id: i4b_siemens_isurf.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* Based on ELSA Quickstep 1000pro PCI driver (i4b_elsa_qs1p.c)
* In case of trouble please contact Udo Schweigert <ust@cert.siemens.de>
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:00:57 2000]
* last edit-date: [Wed Jan 24 09:13:25 2001]
*
*---------------------------------------------------------------------------*/
@ -54,7 +51,6 @@
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>

View File

@ -44,11 +44,9 @@
* isic - I4B Siemens ISDN Chipset Driver for SWS cards
* ====================================================
*
* $Id: i4b_sws.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:01:10 2000]
* last edit-date: [Wed Jan 24 08:58:57 2001]
*
*---------------------------------------------------------------------------*/
@ -70,12 +68,11 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 1996 Gary Jennejohn. All rights reserved.
*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -37,11 +37,9 @@
* isic - I4B Siemens ISDN Chipset Driver for Teles S0/16 and clones
* =================================================================
*
* $Id: i4b_tel_s016.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:01:20 2000]
* last edit-date: [Wed Jan 24 09:27:24 2001]
*
*---------------------------------------------------------------------------*/
@ -53,13 +51,13 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <machine/md_var.h>
#include <net/if.h>
#include <machine/md_var.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>
@ -147,11 +145,8 @@ isic_probe_s016(device_t dev)
}
sc = &l1_sc[unit]; /* get pointer to softc */
sc->sc_unit = unit; /* set unit */
sc->sc_flags = FLAG_TELES_S0_16; /* set flags */
/* see if an io base was supplied */
if(!(sc->sc_resources.io_base[0] =

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 1996 Gary Jennejohn. All rights reserved.
*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -37,11 +37,9 @@
* isic - I4B Siemens ISDN Chipset Driver for Teles S0/16.3
* ========================================================
*
* $Id: i4b_tel_s0163.c,v 1.4 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:01:29 2000]
* last edit-date: [Wed Jan 24 09:27:40 2001]
*
*---------------------------------------------------------------------------*/
@ -53,12 +51,12 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <net/if.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>
@ -136,7 +134,6 @@ isic_probe_s0163(device_t dev)
sc = &l1_sc[unit]; /* get pointer to softc */
sc->sc_unit = unit; /* set unit */
sc->sc_flags = FLAG_TELES_S0_163; /* set flags */
/* see if an io base was supplied */

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 1996 Gary Jennejohn. All rights reserved.
*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -37,11 +37,9 @@
* isic - I4B Siemens ISDN Chipset Driver for Teles S0/8 and clones
* ================================================================
*
* $Id: i4b_tel_s08.c,v 1.3 2000/05/29 15:41:41 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Fri Oct 13 16:01:42 2000]
* last edit-date: [Wed Jan 24 09:27:58 2001]
*
*---------------------------------------------------------------------------*/
@ -53,13 +51,13 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
#include <machine/md_var.h>
#include <net/if.h>
#include <machine/md_var.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>
@ -143,11 +141,8 @@ isic_probe_s08(device_t dev)
}
sc = &l1_sc[unit]; /* get pointer to softc */
sc->sc_unit = unit; /* set unit */
sc->sc_flags = FLAG_TELES_S0_8; /* set flags */
/* see if an io base was supplied */
if((sc->sc_resources.io_base[0] =

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
* Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -27,49 +27,33 @@
* i4b_usr_sti.c - USRobotics Sportster ISDN TA intern (Tina-pp)
* -------------------------------------------------------------
*
* $Id: i4b_usr_sti.c,v 1.3 2000/05/29 15:41:42 hm Exp $
*
* $FreeBSD$
*
* last edit-date: [Mon May 29 16:47:26 2000]
* last edit-date: [Wed Jan 24 09:28:12 2001]
*
*---------------------------------------------------------------------------*/
#if defined(__FreeBSD__)
#include "isic.h"
#include "opt_i4b.h"
#else
#define NISIC 1
#endif
#if (NISIC > 0) && defined(USR_STI)
#include <sys/param.h>
#include <sys/systm.h>
#ifdef __FreeBSD__
#include <machine/bus.h>
#include <sys/bus.h>
#include <sys/rman.h>
#else
#include <machine/bus.h>
#include <sys/device.h>
#endif
#include <sys/rman.h>
#include <sys/socket.h>
#include <net/if.h>
#ifdef __FreeBSD__
#include <machine/i4b_ioctl.h>
#else
#include <i4b/i4b_debug.h>
#include <i4b/i4b_ioctl.h>
#endif
#include <machine/i4b_trace.h>
#include <i4b/layer1/i4b_l1.h>
#include <i4b/layer1/isic/i4b_isic.h>
#include <i4b/layer1/isic/i4b_hscx.h>
/*---------------------------------------------------------------------------*
* USR Sportster TA intern special registers
*---------------------------------------------------------------------------*/
@ -84,8 +68,6 @@
static u_char intr_no[] = { 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 3, 4, 5, 0, 6, 7 };
#ifdef __FreeBSD__
#define ADDR(reg) \
(((reg/4) * 1024) + ((reg%4) * 2))
@ -340,7 +322,6 @@ isic_probe_usrtai(device_t dev)
sc = &l1_sc[unit]; /* get pointer to softc */
sc->sc_unit = unit; /* set unit */
sc->sc_flags = FLAG_USR_ISDN_TA_INT; /* set flags */
/* see if an io base was supplied */
@ -514,157 +495,4 @@ isic_attach_usrtai(device_t dev)
return (0);
}
#else /* end of FreeBSD, start NetBSD */
/*
* Use of sc->sc_maps:
* 0 : config register
* 1 - 16 : HSCX A registers
* 17 - 32 : HSCX B registers
* 33 - 48 : ISAC registers
*/
#define USR_REG_OFFS(reg) ((reg % 4) * 2)
#define USR_HSCXA_MAP(reg) ((reg / 4) + 1)
#define USR_HSCXB_MAP(reg) ((reg / 4) + 17)
#define USR_ISAC_MAP(reg) ((reg / 4) + 33)
static int map_base[] = { 33, 1, 17, 0 }; /* ISAC, HSCX A, HSCX B */
/*---------------------------------------------------------------------------*
* USRobotics read fifo routine
*---------------------------------------------------------------------------*/
static void
usrtai_read_fifo(struct isic_softc *sc, int what, void *buf, size_t size)
{
int map, off, offset;
u_char * p = buf;
bus_space_tag_t t;
bus_space_handle_t h;
for (offset = 0; size > 0; size--, offset++) {
map = map_base[what] + (offset / 4);
t = sc->sc_maps[map].t;
h = sc->sc_maps[map].h;
off = USR_REG_OFFS(offset);
*p++ = bus_space_read_1(t, h, off);
}
}
/*---------------------------------------------------------------------------*
* USRobotics write fifo routine
*---------------------------------------------------------------------------*/
static void
usrtai_write_fifo(struct isic_softc *sc, int what, const void *buf, size_t size)
{
int map, off, offset;
const u_char * p = buf;
bus_space_tag_t t;
bus_space_handle_t h;
u_char v;
for (offset = 0; size > 0; size--, offset++) {
map = map_base[what] + (offset / 4);
t = sc->sc_maps[map].t;
h = sc->sc_maps[map].h;
off = USR_REG_OFFS(offset);
v = *p++;
bus_space_write_1(t, h, off, v);
}
}
/*---------------------------------------------------------------------------*
* USRobotics write register routine
*---------------------------------------------------------------------------*/
static void
usrtai_write_reg(struct isic_softc *sc, int what, bus_size_t offs, u_int8_t data)
{
int map = map_base[what] + (offs / 4),
off = USR_REG_OFFS(offs);
bus_space_tag_t t = sc->sc_maps[map].t;
bus_space_handle_t h = sc->sc_maps[map].h;
bus_space_write_1(t, h, off, data);
}
/*---------------------------------------------------------------------------*
* USRobotics read register routine
*---------------------------------------------------------------------------*/
static u_char
usrtai_read_reg(struct isic_softc *sc, int what, bus_size_t offs)
{
int map = map_base[what] + (offs / 4),
off = USR_REG_OFFS(offs);
bus_space_tag_t t = sc->sc_maps[map].t;
bus_space_handle_t h = sc->sc_maps[map].h;
return bus_space_read_1(t, h, off);
}
/*---------------------------------------------------------------------------*
* isic_probe_usrtai - probe for USR
*---------------------------------------------------------------------------*/
int
isic_probe_usrtai(struct isic_attach_args *ia)
{
/*
* Read HSCX A/B VSTR. Expected value for IOM2 based
* boards is 0x05 in the least significant bits.
*/
if(((bus_space_read_1(ia->ia_maps[USR_HSCXA_MAP(H_VSTR)].t, ia->ia_maps[USR_HSCXA_MAP(H_VSTR)].h, USR_REG_OFFS(H_VSTR)) & 0x0f) != 0x05) ||
((bus_space_read_1(ia->ia_maps[USR_HSCXB_MAP(H_VSTR)].t, ia->ia_maps[USR_HSCXB_MAP(H_VSTR)].h, USR_REG_OFFS(H_VSTR)) & 0x0f) != 0x05))
return 0;
return (1);
}
/*---------------------------------------------------------------------------*
* isic_attach_usrtai - attach USR
*---------------------------------------------------------------------------*/
int
isic_attach_usrtai(struct isic_softc *sc)
{
bus_space_tag_t t = sc->sc_maps[0].t;
bus_space_handle_t h = sc->sc_maps[0].h;
u_char irq = intr_no[sc->sc_irq];
sc->clearirq = NULL;
sc->readreg = usrtai_read_reg;
sc->writereg = usrtai_write_reg;
sc->readfifo = usrtai_read_fifo;
sc->writefifo = usrtai_write_fifo;
/* setup card type */
sc->sc_cardtyp = CARD_TYPEP_USRTA;
/* setup IOM bus type */
sc->sc_bustyp = BUS_TYPE_IOM2;
sc->sc_ipac = 0;
sc->sc_bfifolen = HSCX_FIFO_LEN;
/* reset the HSCX and ISAC chips */
bus_space_write_1(t, h, 0, USR_RES_BIT);
DELAY(SEC_DELAY / 10);
bus_space_write_1(t, h, 0, 0x00);
DELAY(SEC_DELAY / 10);
/* setup IRQ */
bus_space_write_1(t, h, 0, irq | USR_INTE_BIT);
DELAY(SEC_DELAY / 10);
return (1);
}
#endif /* __FreeBSD__ */
#endif /* ISIC > 0 */