Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
exar7250.c
Go to the documentation of this file.
1 /*
2  * SBE 2T3E3 synchronous serial card driver for Linux
3  *
4  * Copyright (C) 2009-2010 Krzysztof Halasa <[email protected]>
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License
8  * as published by the Free Software Foundation.
9  *
10  * This code is based on a driver written by SBE Inc.
11  */
12 
13 #include "2t3e3.h"
14 #include "ctrl.h"
15 
16 void exar7250_init(struct channel *sc)
17 {
22 
28 
30 }
31 
33 {
34  u32 val;
35 
36  switch (type) {
41  break;
42  default:
43  return;
44  }
45 
46  exar7250_stop_intr(sc, type);
47 
52  switch (type) {
55  break;
58  break;
61  break;
64  break;
65  default:
66  return;
67  }
69  exar7250_start_intr(sc, type);
70 }
71 
72 
74 {
75  u32 val;
76 
77  switch (type) {
81 
82  cpld_LOS_update(sc);
83 
84  sc->s.OOF = val & SBE_2T3E3_FRAMER_VAL_E3_RX_OOF ? 1 : 0;
89 
91  break;
92 
96 
97  cpld_LOS_update(sc);
98 
99  sc->s.OOF = val & SBE_2T3E3_FRAMER_VAL_T3_RX_OOF ? 1 : 0;
100 
105 
107 
109  break;
110 
111  default:
112  return;
113  }
114 
119 }
120 
121 
123 {
126 
127  switch (type) {
138  break;
139 
152  break;
153  }
154 }
155 
156 
157 
158 
160 {
161  switch (mode) {
162  case SBE_2T3E3_OFF:
165  break;
166  case SBE_2T3E3_ON:
169  break;
170  }
171 }
172 
174 {
175  switch (mode) {
179  break;
183  break;
184  }
185 }