patch-2.3.4 linux/include/linux/b1lli.h

Next file: linux/include/linux/blkpg.h
Previous file: linux/include/asm-sparc64/uaccess.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.3/linux/include/linux/b1lli.h linux/include/linux/b1lli.h
@@ -1,11 +1,33 @@
 /*
- * $Id: b1lli.h,v 1.3 1998/01/31 10:54:37 calle Exp $
+ * $Id: b1lli.h,v 1.6 1999/04/15 19:49:36 calle Exp $
  *
  * ISDN lowlevel-module for AVM B1-card.
  *
  * Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
  *
  * $Log: b1lli.h,v $
+ * Revision 1.6  1999/04/15 19:49:36  calle
+ * fix fuer die B1-PCI. Jetzt geht z.B. auch IRQ 17 ...
+ *
+ * Revision 1.5  1998/10/25 14:50:28  fritz
+ * Backported from MIPS (Cobalt).
+ *
+ * Revision 1.4  1998/03/29 16:05:02  calle
+ * changes from 2.0 tree merged.
+ *
+ * Revision 1.1.2.9  1998/03/20 14:30:02  calle
+ * added cardnr to detect if you try to add same T1 to different io address.
+ * change number of nccis depending on number of channels.
+ *
+ * Revision 1.1.2.8  1998/03/04 17:32:33  calle
+ * Changes for T1.
+ *
+ * Revision 1.1.2.7  1998/02/27 15:38:29  calle
+ * T1 running with slow link.
+ *
+ * Revision 1.1.2.6  1998/02/24 17:57:36  calle
+ * changes for T1.
+ *
  * Revision 1.3  1998/01/31 10:54:37  calle
  * include changes for PCMCIA cards from 2.0 version
  *
@@ -70,15 +92,17 @@
 	int irq;
 } avmb1_carddef;
 
-#define AVM_CARDTYPE_B1	0
-#define AVM_CARDTYPE_T1	1
-#define AVM_CARDTYPE_M1	2
-#define AVM_CARDTYPE_M2	3
+#define AVM_CARDTYPE_B1		0
+#define AVM_CARDTYPE_T1		1
+#define AVM_CARDTYPE_M1		2
+#define AVM_CARDTYPE_M2		3
+#define AVM_CARDTYPE_B1PCI	4
 
 typedef struct avmb1_extcarddef {
 	int port;
 	int irq;
         int cardtype;
+        int cardnr;  /* for HEMA/T1 */
 } avmb1_extcarddef;
 
 #define	AVMB1_LOAD		0	/* load image to card */
@@ -87,6 +111,7 @@
 #define	AVMB1_LOAD_AND_CONFIG	3	/* load image and config to card */
 #define	AVMB1_ADDCARD_WITH_TYPE	4	/* add a new card, with cardtype */
 #define AVMB1_GET_CARDINFO	5	/* get cardtype */
+#define AVMB1_REMOVECARD	6	/* remove a card (usefull for T1) */
 
 
 
@@ -103,14 +128,12 @@
 
 #ifdef __KERNEL__
 
-#define	AVMB1_PORTLEN	0x1f
+#define	AVMB1_PORTLEN		0x1f
 
-#define AVM_MAXVERSION	8
-#define AVM_NBCHAN	2
+#define AVM_MAXVERSION		8
 
-#define AVM_NAPPS	30
-#define AVM_NPLCI	5
-#define AVM_NNCCI	6
+#define AVM_NAPPS		30
+#define AVM_NNCCI_PER_CHANNEL	4
 
 /*
  * Main driver data
@@ -119,9 +142,10 @@
 typedef struct avmb1_card {
 	struct avmb1_card *next;
 	int cnr;
-	unsigned short port;
+	unsigned int port;
 	unsigned irq;
 	int cardtype;
+	int cardnr; /* for T1-HEMA */
 	volatile unsigned short cardstate;
 	int interrupt;
 	int blocked;
@@ -149,23 +173,26 @@
 
 
 /* b1lli.c */
-int B1_detect(unsigned short base, int cardtype);
-void B1_reset(unsigned short base);
-int B1_load_t4file(unsigned short base, avmb1_t4file * t4file);
-int B1_load_config(unsigned short base, avmb1_t4file * config);
-int B1_loaded(unsigned short base);
-unsigned char B1_assign_irq(unsigned short base, unsigned irq, int cardtype);
-unsigned char B1_enable_irq(unsigned short base);
-unsigned char B1_disable_irq(unsigned short base);
+int B1_detect(unsigned int base, int cardtype);
+int T1_detectandinit(unsigned int base, unsigned irq, int cardnr);
+void B1_reset(unsigned int base);
+void T1_reset(unsigned int base);
+int B1_load_t4file(unsigned int base, avmb1_t4file * t4file);
+int B1_load_config(unsigned int base, avmb1_t4file * config);
+int B1_loaded(unsigned int base);
+void B1_setinterrupt(unsigned int base, unsigned irq, int cardtype);
+unsigned char B1_disable_irq(unsigned int base);
+void T1_disable_irq(unsigned int base);
 int B1_valid_irq(unsigned irq, int cardtype);
+int B1_valid_port(unsigned port, int cardtype);
 void B1_handle_interrupt(avmb1_card * card);
-void B1_send_init(unsigned short port,
+void B1_send_init(unsigned int port,
 	    unsigned int napps, unsigned int nncci, unsigned int cardnr);
-void B1_send_register(unsigned short port,
+void B1_send_register(unsigned int port,
 		      __u16 appid, __u32 nmsg,
 		      __u32 nb3conn, __u32 nb3blocks, __u32 b3bsize);
-void B1_send_release(unsigned short port, __u16 appid);
-void B1_send_message(unsigned short port, struct sk_buff *skb);
+void B1_send_release(unsigned int port, __u16 appid);
+void B1_send_message(unsigned int port, struct sk_buff *skb);
 
 /* b1capi.c */
 void avmb1_handle_new_ncci(avmb1_card * card,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)