aboutsummaryrefslogtreecommitdiffstats
path: root/lib/scatterlist.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-08-10 04:50:57 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-09-21 11:41:47 -0400
commit0379b2a33a8a03d4ad1036ef646419dbdf1ac15a (patch)
tree8b23e1c9779352c633f82d4d341222ab11df7593 /lib/scatterlist.c
parentb181565ee6a0f894bd6a134b9e5bed2966bdf9b3 (diff)
spi/spi-pl022: calculate_effective_freq() must set rate <= requested rate
There were few issues with calculate_effective_freq() routine: - It was returning first rate found >= requested rate. Now, if system have spi's rate as 83 MHz, with possible prescaled rates as 83, 41.5, 20.75, 13.83 (as we can prescale with multiples of 2). If user has given rate to be programmed as 22 MHz, then driver programmes it to 41.5 MHz. This looks to be incorrect, as user might have given the upper limit of the device, and we are programming it above it. - Driver finds the first satisfying rate and programmes it, but with other values of scr & cpsdvsr, it is possible to get more closer rate. This patch fixes these two issues, with some reformatting inside the code. This also creates a inline routine to calculate prescaled rate based on spi's rate, cpsdvsr and scr. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'lib/scatterlist.c')
0 files changed, 0 insertions, 0 deletions
or Arnaldo Carvalho de Melo <acme@ghostprotocols.net> 2005-06-19 01:46:52 -0400 committer David S. Miller <davem@davemloft.net> 2005-06-19 01:46:52 -0400 [NET] Generalise TCP's struct open_request minisock infrastructure' href='/cgit/cgit.cgi/litmus2008.git/commit/include/net/request_sock.h?id=2e6599cb899ba4b133f42cbf9d2b1883d2dc583a'>2e6599cb89
e18b890bb0
2e6599cb89
60236fdd08
2e6599cb89

60236fdd08
cfb6eeb4c8

60236fdd08
2e6599cb89

60236fdd08
2e6599cb89
60236fdd08

2e6599cb89







72a3effaf6
2e6599cb89
4237c75c0a
6b877699c6
2e6599cb89

72a3effaf6
2e6599cb89
54e6ecb239
2e6599cb89

60236fdd08
2e6599cb89



60236fdd08
2e6599cb89
60236fdd08
2e6599cb89

60236fdd08
2e6599cb89
60236fdd08

2e6599cb89

0e87506fcc

2ad69c55a2
0e87506fcc


2ad69c55a2
0e87506fcc





83e3609eba
0e87506fcc






295f7324ff
0e87506fcc














295f7324ff

2ad69c55a2
0e87506fcc


72a3effaf6
0e87506fcc
2ad69c55a2
0e87506fcc
2ad69c55a2
0e87506fcc








83e3609eba
0e87506fcc



83e3609eba

0e87506fcc




3eb4801d7b
0e87506fcc






























































2ad69c55a2
0e87506fcc








2ad69c55a2
0e87506fcc






463c84b97f
0e87506fcc



463c84b97f
0e87506fcc



463c84b97f
0e87506fcc





8129765ac0
0e87506fcc
2ad69c55a2
0e87506fcc










2e6599cb89
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

















                                                                             
                           
                        
 

                     
                    



                 
                         
                               
                                 
                                      
                                                       
                                                                

                                                              
                                                              

                                                           
                                                                

  
                                                                    
   

                                                                             







                                                                                          
                                                 
                                            
                                              
                                                   

  
                                                                                  
 
                                                                           

                        
                                   



                   
                                                         
 
                                                 

 
                                                       
 

                                      

 

                                  
                                     


                                                        
                    





                                             
                                                 






                                                        
                                                               














                                                                                   

                                                  
                                            


                                                              
                                                            
 
                                                                                              
 
                                 








                                               
                                                                          



                                                 

                                                                  




                                                                  
                                       






























































                                                                                       
                                                     








                                                                     
                                                     






                                         
                                                                         



                                                                       
                                                                               



                                             
                                                                             





                                                                           
                                                              
 
                                                     










                                             
                            
/*
 * NET		Generic infrastructure for Network protocols.
 *
 *		Definitions for request_sock 
 *
 * Authors:	Arnaldo Carvalho de Melo <acme@conectiva.com.br>
 *
 * 		From code originally in include/net/tcp.h
 *
 *		This program is free software; you can redistribute it and/or