2 * $Id: pmcc4.h,v 1.4 2005/11/01 19:24:48 rickd PMCC4_3_1B $
8 /*-----------------------------------------------------------------------------
11 * Copyright (C) 2005 SBE, Inc.
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * For further information, contact via email: support@sbei.com
24 * SBE, Inc. San Ramon, California U.S.A.
25 *-----------------------------------------------------------------------------
27 * RCS revision: $Revision: 1.4 $
28 * Last changed on $Date: 2005/11/01 19:24:48 $
29 * Changed by $Author: rickd $
30 *-----------------------------------------------------------------------------
32 * Revision 1.4 2005/11/01 19:24:48 rickd
33 * Remove de-implement function prototypes. Several <int> to
34 * <status_t> changes for consistent usage of same.
36 * Revision 1.3 2005/09/28 00:10:08 rickd
37 * Add GNU license info. Use config params from libsbew.h
39 * Revision 1.2 2005/04/28 23:43:03 rickd
40 * Add RCS tracking heading.
42 *-----------------------------------------------------------------------------
46 #if defined(__FreeBSD__) || defined(__NetBSD__)
47 #include <sys/types.h>
50 #include <sys/types.h>
52 #include <linux/types.h>
60 #define SBE_DRVR_FAIL 0
61 #define SBE_DRVR_SUCCESS 1
69 /********************/
70 /* PMCC4 memory Map */
71 /********************/
73 #define COMET_OFFSET(x) (0x80000+(x)*0x10000)
74 #define EEPROM_OFFSET 0xC0000
75 #define CPLD_OFFSET 0xD0000
77 struct pmcc4_timeslot_param
79 u_int8_t card
; /* the card number */
80 u_int8_t port
; /* the port number */
85 * each byte in bitmask below represents one timeslot (bitmask[0] is
86 * for timeslot 0 and so on), each bit in the byte selects timeslot
87 * bits for this channel (0xff - whole timeslot, 0x7f - 56kbps mode)
92 struct c4_musycc_param
100 #define sbeE1RMAI 0x100
101 #define sbeYelAlm 0x04
102 #define sbeRedAlm 0x02
103 #define sbeAISAlm 0x01
105 #define sbeE1errSMF 0x02
106 #define sbeE1CRC 0x01
115 * Device Driver interface, routines are for internal use only.
118 #include "pmcc4_private.h"
120 char *get_hdlc_name (hdlc_device
*);
126 void c4_cleanup (void);
127 status_t
c4_chan_up (ci_t
*, int channum
);
128 status_t
c4_del_chan_stats (int channum
);
129 status_t
c4_del_chan (int channum
);
130 status_t
c4_get_iidinfo (ci_t
* ci
, struct sbe_iid_info
* iip
);
131 int c4_is_chan_up (int channum
);
133 void *getuserbychan (int channum
);
134 void pci_flush_write (ci_t
* ci
);
135 void sbecom_set_loglevel (int debuglevel
);
136 char *sbeid_get_bdname (ci_t
* ci
);
137 void sbeid_set_bdtype (ci_t
* ci
);
138 void sbeid_set_hdwbid (ci_t
* ci
);
139 u_int32_t
sbeCrc (u_int8_t
*, u_int32_t
, u_int32_t
, u_int32_t
*);
141 void VMETRO_TRACE (void *); /* put data into 8 LEDs */
142 void VMETRO_TRIGGER (ci_t
*, int); /* Note: int = 0(default)
145 #if defined (SBE_ISR_TASKLET)
146 void musycc_intr_bh_tasklet (ci_t
*);
150 #endif /*** __KERNEL __ ***/
151 #endif /* _INC_PMCC4_H_ */