Add support for ITK IX1 PnP cards.

Thanks to Nick Hudson for testing.
This commit is contained in:
martin 2002-01-21 12:31:42 +00:00
parent ace258d3b2
commit f8974bfebe
4 changed files with 84 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC_ISDN,v 1.5 2001/11/20 12:56:30 lukem Exp $
# $NetBSD: GENERIC_ISDN,v 1.6 2002/01/21 12:31:42 martin Exp $
#
# GENERIC kernel with all supported ISDN devices and drivers
@ -43,6 +43,7 @@ options ISICPNP_ELSA_PCC16 # later variant of ELSA QuickStep
options ISICPNP_SEDLBAUER # Sedlbauer WinSpeed
options ISICPNP_DYNALINK # Dynalink IS64PH
options ISICPNP_SIEMENS_ISURF2 # Siemens I-Surf
options ISICPNP_ITKIX # ITK IX PnP cards
isic* at isapnp?
#
#---------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
# $NetBSD: files.isapnp,v 1.29 2001/11/28 10:21:22 lukem Exp $
# $NetBSD: files.isapnp,v 1.30 2002/01/21 12:31:43 martin Exp $
#
# Config file and device description for machine-independent ISAPnP code.
# Included by ports that need it.
@ -94,7 +94,7 @@ file dev/isapnp/isic_isapnp.c isic_isapnp
defflag opt_isicpnp.h ISICPNP_TEL_S0_16_3_P ISICPNP_CRTX_S0_P ISICPNP_DRN_NGO
ISICPNP_ELSA_QS1ISA ISICPNP_ELSA_PCC16
ISICPNP_SEDLBAUER ISICPNP_DYNALINK
ISICPNP_SIEMENS_ISURF2
ISICPNP_SIEMENS_ISURF2 ISICPNP_ITKIX
file dev/isapnp/isic_isapnp_tel_s0P.c isic_isapnp
file dev/isapnp/isic_isapnp_ctx_s0P.c isic_isapnp
@ -103,3 +103,4 @@ file dev/isapnp/isic_isapnp_elsa_qs1i.c isic_isapnp
file dev/isapnp/isic_isapnp_sws.c isic_isapnp
file dev/isapnp/isic_isapnp_dynalink.c isic_isapnp
file dev/isapnp/isic_isapnp_siemens_isurf.c isic_isapnp
file dev/isapnp/isic_isapnp_itkix.c isic_isapnp

View File

@ -33,7 +33,7 @@
* isapnp_isic.c - ISA-P&P bus frontend for i4b_isic driver
* --------------------------------------------------------
*
* $Id: isic_isapnp.c,v 1.5 2001/11/15 09:48:10 lukem Exp $
* $Id: isic_isapnp.c,v 1.6 2002/01/21 12:31:43 martin Exp $
*
* last edit-date: [Fri Jan 5 11:38:29 2001]
*
@ -43,7 +43,7 @@
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: isic_isapnp.c,v 1.5 2001/11/15 09:48:10 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: isic_isapnp.c,v 1.6 2002/01/21 12:31:43 martin Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@ -102,7 +102,8 @@ typedef void (*attach_func)(struct l1_softc *sc);
/* map allocators */
#if defined(ISICPNP_ELSA_QS1ISA) || defined(ISICPNP_SEDLBAUER) \
|| defined(ISICPNP_DYNALINK) || defined(ISICPNP_SIEMENS_ISURF2)
|| defined(ISICPNP_DYNALINK) || defined(ISICPNP_SIEMENS_ISURF2) \
|| defined(ISICPNP_ITKIX)
static void generic_pnp_mapalloc(struct isapnp_attach_args *ipa, struct l1_softc *sc);
#endif
#ifdef ISICPNP_DRN_NGO
@ -120,6 +121,7 @@ extern void isic_attach_drnngo __P((struct l1_softc *sc));
extern void isic_attach_sws __P((struct l1_softc *sc));
extern void isic_attach_Eqs1pi __P((struct l1_softc *sc));
extern void isic_attach_siemens_isurf __P((struct l1_softc *sc));
extern void isic_attach_isapnp_itkix1 __P((struct l1_softc *sc));
struct isic_isapnp_card_desc {
char *devlogic; /* ISAPNP logical device ID */
@ -159,6 +161,10 @@ isic_isapnp_descriptions[] =
{ "SIE0020", "Siemens I-Surf 2.0 PnP", CARD_TYPEP_SIE_ISURF2,
generic_pnp_mapalloc, isic_attach_siemens_isurf },
#endif
#ifdef ISICPNP_ITKIX
{ "ITK0025", "ix1-micro 3.0", 0,
generic_pnp_mapalloc, isic_attach_isapnp_itkix1 },
#endif
};
#define NUM_DESCRIPTIONS (sizeof(isic_isapnp_descriptions)/sizeof(isic_isapnp_descriptions[0]))
@ -190,7 +196,6 @@ isic_isapnp_probe(parent, cf, aux)
return 0;
}
/*---------------------------------------------------------------------------*
* card independend attach for ISA P&P cards
*---------------------------------------------------------------------------*/
@ -369,7 +374,8 @@ isic_isapnp_attach(parent, self, aux)
}
#if defined(ISICPNP_ELSA_QS1ISA) || defined(ISICPNP_SEDLBAUER) \
|| defined(ISICPNP_DYNALINK) || defined(ISICPNP_SIEMENS_ISURF2)
|| defined(ISICPNP_DYNALINK) || defined(ISICPNP_SIEMENS_ISURF2) \
|| defined(ISICPNP_ITKIX)
static void
generic_pnp_mapalloc(struct isapnp_attach_args *ipa, struct l1_softc *sc)
{

View File

@ -0,0 +1,68 @@
/* $NetBSD: isic_isapnp_itkix.c,v 1.1 2002/01/21 12:31:44 martin Exp $ */
/*
* Copyright (c) 2002 Martin Husemann <martin@duskware.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_itkix.c,v 1.1 2002/01/21 12:31:44 martin Exp $");
#include "opt_isicpnp.h"
#ifdef ISICPNP_ITKIX
#include <sys/param.h>
#include <sys/ioccom.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/callout.h>
#include <machine/bus.h>
#include <sys/device.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netisdn/i4b_debug.h>
#include <netisdn/i4b_ioctl.h>
#include <dev/ic/isic_l1.h>
/* XXX: this is a hack to share some more code - will be replaced with generic
* io-mapped isic driver */
#include "opt_isicisa.h"
#ifndef ISICISA_ITKIX1
#define ISICISA_ITKIX1
#include <dev/isa/isic_isa_itk_ix1.c>
#else
extern int isic_attach_itkix1(struct l1_softc *sc);
#endif
void isic_attach_isapnp_itkix1(struct l1_softc *sc);
void isic_attach_isapnp_itkix1(struct l1_softc *sc)
{
isic_attach_itkix1(sc);
}
#endif