Add linux-next specific files for 20110831
[linux-2.6/next.git] / drivers / staging / cxt1e1 / pmcc4.h
blobe046b87763a2e359bb625824b78d51f31b2a5823
1 /*
2 * $Id: pmcc4.h,v 1.4 2005/11/01 19:24:48 rickd PMCC4_3_1B $
3 */
5 #ifndef _INC_PMCC4_H_
6 #define _INC_PMCC4_H_
8 /*-----------------------------------------------------------------------------
9 * pmcc4.h -
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 *-----------------------------------------------------------------------------
26 * RCS info:
27 * RCS revision: $Revision: 1.4 $
28 * Last changed on $Date: 2005/11/01 19:24:48 $
29 * Changed by $Author: rickd $
30 *-----------------------------------------------------------------------------
31 * $Log: pmcc4.h,v $
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>
48 #else
49 #ifndef __KERNEL__
50 #include <sys/types.h>
51 #else
52 #include <linux/types.h>
53 #endif
54 #endif
58 typedef int status_t;
60 #define SBE_DRVR_FAIL 0
61 #define SBE_DRVR_SUCCESS 1
63 #ifdef __cplusplus
64 extern "C"
66 #endif
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 */
81 u_int8_t _reserved1;
82 u_int8_t _reserved2;
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)
89 u_int8_t bitmask[32];
92 struct c4_musycc_param
94 u_int8_t RWportnum;
95 u_int16_t offset;
96 u_int32_t value;
99 /*Alarm values */
100 #define sbeE1RMAI 0x100
101 #define sbeYelAlm 0x04
102 #define sbeRedAlm 0x02
103 #define sbeAISAlm 0x01
105 #define sbeE1errSMF 0x02
106 #define sbeE1CRC 0x01
108 #ifdef __cplusplus
110 #endif
112 #ifdef __KERNEL__
115 * Device Driver interface, routines are for internal use only.
118 #include "pmcc4_private.h"
120 char *get_hdlc_name (hdlc_device *);
123 * external interface
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)
143 * thru 15 */
145 #if defined (SBE_ISR_TASKLET)
146 void musycc_intr_bh_tasklet (ci_t *);
148 #endif
150 #endif /*** __KERNEL __ ***/
151 #endif /* _INC_PMCC4_H_ */