[package] remove the i2c-gpio-custom driver from adm5120, and make it available on...
[openwrt.git] / package / ar7-atm / patches / 160-module-params.patch
1 diff -urN sangam_atm-07.02.01.00/tn7atm.c sangam_atm-07.02.01.00.mod/tn7atm.c
2 --- sangam_atm-07.02.01.00/tn7atm.c 2007-09-19 04:12:20.000000000 +0200
3 +++ sangam_atm-07.02.01.00.mod/tn7atm.c 2007-09-20 14:45:19.280250000 +0200
4 @@ -84,6 +84,146 @@
5 MODULE_LICENSE("GPL");
6 MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
7 MODULE_AUTHOR ("Zhicheng Tang");
8 +
9 +int mp_sar_ipacemax = -1;
10 +module_param_named(ipacemax, mp_sar_ipacemax, int, 0);
11 +MODULE_PARM_DESC(ipacemax, "Interrupt pacing");
12 +
13 +char *mp_macc = NULL;
14 +module_param_named(macc, mp_macc, charp, 0);
15 +MODULE_PARM_DESC(macc, "MAC address");
16 +
17 +int mp_dsp_noboost = -1;
18 +module_param_named(dsp_noboost, mp_dsp_noboost, int, 0);
19 +MODULE_PARM_DESC(dsp_noboost, "Suppress DSP frequency boost");
20 +
21 +int mp_dsp_freq = -1;
22 +module_param_named(dsp_freq, mp_dsp_freq, int, 0);
23 +MODULE_PARM_DESC(dsp_freq, "Frequency to boost the DSP to");
24 +
25 +char *mp_featctl0 = NULL;
26 +module_param_named(featctl0, mp_featctl0, charp, 0);
27 +MODULE_PARM_DESC(featctl0, "DSL feature control 0");
28 +
29 +char *mp_featctl1 = NULL;
30 +module_param_named(featctl1, mp_featctl1, charp, 0);
31 +MODULE_PARM_DESC(featctl1, "DSL feature control 1");
32 +
33 +char *mp_phyctl0 = NULL;
34 +module_param_named(phyctl0, mp_phyctl0, charp, 0);
35 +MODULE_PARM_DESC(phyctl0, "DSL PHY control 0");
36 +
37 +char *mp_phyctl1 = NULL;
38 +module_param_named(phyctl1, mp_phyctl1, charp, 0);
39 +MODULE_PARM_DESC(phyctl1, "DSL PHY control 1");
40 +
41 +int mp_turbodsl = -1;
42 +module_param_named(turbodsl, mp_turbodsl, int, 0);
43 +MODULE_PARM_DESC(turbodsl, "Enable TurboDSL");
44 +
45 +int mp_sar_rxbuf = -1;
46 +module_param_named(sar_rxbuf, mp_sar_rxbuf, int, 0);
47 +MODULE_PARM_DESC(sar_rxbuf, "SAR RxBuf size");
48 +
49 +int mp_sar_rxmax = -1;
50 +module_param_named(sar_rxmax, mp_sar_rxmax, int, 0);
51 +MODULE_PARM_DESC(sar_rxmax, "SAR RxMax size");
52 +
53 +int mp_sar_txbuf = -1;
54 +module_param_named(sar_txbuf, mp_sar_txbuf, int, 0);
55 +MODULE_PARM_DESC(sar_txbuf, "SAR TxBuf size");
56 +
57 +int mp_sar_txmax = -1;
58 +module_param_named(sar_txmax, mp_sar_txmax, int, 0);
59 +MODULE_PARM_DESC(sar_txmax, "SAR TxMax size");
60 +
61 +char *mp_modulation = NULL;
62 +module_param_named(modulation, mp_modulation, charp, 0);
63 +MODULE_PARM_DESC(modulation, "Modulation");
64 +
65 +int mp_fine_gain_control = -1;
66 +module_param_named(fine_gain_control, mp_fine_gain_control, int, 0);
67 +MODULE_PARM_DESC(fine_gain_control, "Fine gain control");
68 +
69 +int mp_fine_gain_value = -1;
70 +module_param_named(fine_gain_value, mp_fine_gain_value, int, 0);
71 +MODULE_PARM_DESC(fine_gain_value, "Fine gain value");
72 +
73 +int mp_enable_margin_retrain = -1;
74 +module_param_named(enable_margin_retrain, mp_enable_margin_retrain, int, 0);
75 +MODULE_PARM_DESC(enable_margin_retrain, "Enable margin retrain");
76 +
77 +int mp_margin_threshold = -1;
78 +module_param_named(margin_threshold, mp_margin_threshold, int, 0);
79 +MODULE_PARM_DESC(margin_threshold, "Margin retrain treshold");
80 +
81 +int mp_enable_rate_adapt = -1;
82 +module_param_named(enable_rate_adapt, mp_enable_rate_adapt, int, 0);
83 +MODULE_PARM_DESC(enable_rate_adapt, "Enable rate adaption");
84 +
85 +int mp_powercutback = -1;
86 +module_param_named(powercutback, mp_powercutback, int, 0);
87 +MODULE_PARM_DESC(powercutback, "Enable / disable powercutback");
88 +
89 +int mp_trellis = -1;
90 +module_param_named(trellis, mp_trellis, int, 0);
91 +MODULE_PARM_DESC(trellis, "Enable / disable trellis coding");
92 +
93 +int mp_bitswap = -1;
94 +module_param_named(bitswap, mp_bitswap, int, 0);
95 +MODULE_PARM_DESC(bitswap, "Enable / disable bitswap");
96 +
97 +int mp_maximum_bits_per_carrier = -1;
98 +module_param_named(maximum_bits_per_carrier, mp_maximum_bits_per_carrier, int, 0);
99 +MODULE_PARM_DESC(maximum_bits_per_carrier, "Maximum bits per carrier");
100 +
101 +int mp_maximum_interleave_depth = -1;
102 +module_param_named(maximum_interleave_depth, mp_maximum_interleave_depth, int, 0);
103 +MODULE_PARM_DESC(maximum_interleave_depth, "Maximum interleave depth");
104 +
105 +int mp_pair_selection = -1;
106 +module_param_named(pair_selection, mp_pair_selection, int, 0);
107 +MODULE_PARM_DESC(pair_selection, "Pair selection");
108 +
109 +int mp_dgas_polarity = -1;
110 +module_param_named(dgas_polarity, mp_dgas_polarity, int, 0);
111 +MODULE_PARM_DESC(dgas_polarity, "DGAS polarity");
112 +
113 +int mp_los_alarm = -1;
114 +module_param_named(los_alarm, mp_los_alarm, int, 0);
115 +MODULE_PARM_DESC(los_alarm, "LOS alarm");
116 +
117 +char *mp_eoc_vendor_id = NULL;
118 +module_param_named(eoc_vendor_id, mp_eoc_vendor_id, charp, 0);
119 +MODULE_PARM_DESC(eoc_vendor_id, "EOC vendor id");
120 +
121 +int mp_eoc_vendor_revision = -1;
122 +module_param_named(eoc_vendor_revision, mp_eoc_vendor_revision, int, 0);
123 +MODULE_PARM_DESC(eoc_vendor_revision, "EOC vendor revision");
124 +
125 +char *mp_eoc_vendor_serialnum = NULL;
126 +module_param_named(eoc_vendor_serialnum, mp_eoc_vendor_serialnum, charp, 0);
127 +MODULE_PARM_DESC(eoc_vendor_serialnum, "EOC vendor serial number");
128 +
129 +char *mp_invntry_vernum = NULL;
130 +module_param_named(invntry_vernum, mp_invntry_vernum, charp, 0);
131 +MODULE_PARM_DESC(invntry_vernum, "Inventory revision number");
132 +
133 +int mp_dsl_bit_tmode = -1;
134 +module_param_named(dsl_bit_tmode, mp_dsl_bit_tmode, int, 0);
135 +MODULE_PARM_DESC(dsl_bit_tmode, "DSL bit training mode");
136 +
137 +int mp_high_precision = -1;
138 +module_param_named(high_precision, mp_high_precision, int, 0);
139 +MODULE_PARM_DESC(high_precision, "High precision");
140 +
141 +int mp_autopvc_enable = -1;
142 +module_param_named(autopvc_enable, mp_autopvc_enable, int, 0);
143 +MODULE_PARM_DESC(autopvc_enable, "Enable / disable automatic PVC");
144 +
145 +int mp_oam_lb_timeout = -1;
146 +module_param_named(oam_lb_timeout, mp_oam_lb_timeout, int, 0);
147 +MODULE_PARM_DESC(oam_lb_timeout, "OAM LB timeout");
148 #endif
149
150 #ifndef TRUE
151 @@ -657,9 +797,9 @@
152 * interrupt pacing
153 */
154 ptr = prom_getenv ("sar_ipacemax");
155 - if (ptr)
156 + if (ptr || mp_sar_ipacemax != -1)
157 {
158 - def_sar_inter_pace = os_atoi (ptr);
159 + def_sar_inter_pace = mp_sar_ipacemax == -1 ? os_atoi (ptr) : mp_sar_ipacemax;
160 }
161 /* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
162 def_sar_inter_pace);*/
163 @@ -799,7 +939,7 @@
164 char esi_addr[ESI_LEN] = { 0x00, 0x00, 0x11, 0x22, 0x33, 0x44 };
165 char *esiaddr_str = NULL;
166
167 - esiaddr_str = prom_getenv ("maca");
168 + esiaddr_str = mp_macc ? mp_macc : prom_getenv ("maca");
169
170 if (!esiaddr_str)
171 {
172 @@ -1932,15 +2072,15 @@
173 //UR8_MERGE_END CQ10450*
174
175 cp = prom_getenv ("dsp_noboost");
176 - if (cp)
177 + if (cp || mp_dsp_noboost != -1)
178 {
179 - dsp_noboost = os_atoi (cp);
180 + dsp_noboost = mp_dsp_noboost == -1 ? os_atoi (cp) : mp_dsp_noboost;
181 }
182
183 cp = (char *) prom_getenv ("dsp_freq");
184 - if (cp)
185 + if (cp || mp_dsp_freq != -1)
186 {
187 - dspfreq = os_atoi (cp);
188 + dspfreq = mp_dsp_freq == -1 ? os_atoi (cp) : mp_dsp_freq;
189 if (dspfreq == 250)
190 {
191 boostDsp = 1;
192 @@ -2189,8 +2329,9 @@
193 // Inter-Op DSL phy Control
194 // Note the setting of _dsl_Feature_0 and _dsl_Feature_1 must before
195 // dslhal_api_dslStartup (in tn7dsl_init()).
196 - if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL)
197 + if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL || mp_featctl0 != NULL)
198 {
199 + if (mp_featctl0 != NULL) ptr = mp_featctl0;
200 if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
201 // os_atoh
202 ptr += 2;
203 @@ -2198,8 +2339,9 @@
204 _dsl_Feature_0_defined = 1;
205 }
206
207 - if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL)
208 + if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL || mp_featctl1 != NULL)
209 {
210 + if (mp_featctl1 != NULL) ptr = mp_featctl1;
211 if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
212 // os_atoh
213 ptr += 2;
214 @@ -2211,8 +2353,9 @@
215 // DSL phy Feature Control
216 // Note the setting of _dsl_PhyControl_0 and _dsl_PhyControl_1 must before
217 // dslhal_api_dslStartup (in tn7dsl_init()).
218 - if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL)
219 + if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL || mp_phyctl0 != NULL)
220 {
221 + if (mp_phyctl0 != NULL) ptr = mp_phyctl0;
222 if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
223 // os_atoh
224 ptr += 2;
225 @@ -2220,8 +2363,9 @@
226 _dsl_PhyControl_0_defined = 1;
227 }
228
229 - if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL)
230 + if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL || mp_phyctl1 != NULL)
231 {
232 + if (mp_phyctl1 != NULL) ptr = mp_phyctl1;
233 if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to
234 // os_atoh
235 ptr += 2;
236 @@ -2249,9 +2393,9 @@
237 priv->bTurboDsl = 1;
238 // read config for turbo dsl
239 ptr = prom_getenv ("TurboDSL");
240 - if (ptr)
241 + if (ptr || mp_turbodsl != -1)
242 {
243 - priv->bTurboDsl = os_atoi (ptr);
244 + priv->bTurboDsl = mp_turbodsl == -1 ? os_atoi (ptr) : mp_turbodsl;
245 }
246
247 // @Added to make Rx buffer number & Service max configurable through
248 @@ -2259,30 +2403,30 @@
249 priv->sarRxBuf = RX_BUFFER_NUM;
250 ptr = NULL;
251 ptr = prom_getenv ("SarRxBuf");
252 - if (ptr)
253 + if (ptr || mp_sar_rxbuf != -1)
254 {
255 - priv->sarRxBuf = os_atoi (ptr);
256 + priv->sarRxBuf = mp_sar_rxbuf == -1 ? os_atoi (ptr) : mp_sar_rxbuf;
257 }
258 priv->sarRxMax = RX_SERVICE_MAX;
259 ptr = NULL;
260 ptr = prom_getenv ("SarRxMax");
261 - if (ptr)
262 + if (ptr || mp_sar_rxmax != -1)
263 {
264 - priv->sarRxMax = os_atoi (ptr);
265 + priv->sarRxMax = mp_sar_rxmax == -1 ? os_atoi (ptr) : mp_sar_rxmax;
266 }
267 priv->sarTxBuf = TX_BUFFER_NUM;
268 ptr = NULL;
269 ptr = prom_getenv ("SarTxBuf");
270 - if (ptr)
271 + if (ptr || mp_sar_txbuf != -1)
272 {
273 - priv->sarTxBuf = os_atoi (ptr);
274 + priv->sarTxBuf = mp_sar_txbuf == -1 ? os_atoi (ptr) : mp_sar_txbuf;
275 }
276 priv->sarTxMax = TX_SERVICE_MAX;
277 ptr = NULL;
278 ptr = prom_getenv ("SarTxMax");
279 - if (ptr)
280 + if (ptr || mp_sar_txmax != -1)
281 {
282 - priv->sarTxMax = os_atoi (ptr);
283 + priv->sarTxMax = mp_sar_txmax == -1 ? os_atoi (ptr) : mp_sar_txmax;
284 }
285
286 return 0;
287 diff -urN sangam_atm-07.02.01.00/tn7dsl.c sangam_atm-07.02.01.00.mod/tn7dsl.c
288 --- sangam_atm-07.02.01.00/tn7dsl.c 2007-09-19 04:12:20.000000000 +0200
289 +++ sangam_atm-07.02.01.00.mod/tn7dsl.c 2007-09-20 14:55:46.608375000 +0200
290 @@ -134,6 +134,27 @@
291 #define NEW_TRAINING_VAL_T1413 128
292 #define NEW_TRAINING_VAL_MMODE 255
293
294 +extern char *mp_modulation;
295 +extern int mp_fine_gain_control;
296 +extern int mp_fine_gain_value;
297 +extern int mp_enable_margin_retrain;
298 +extern int mp_margin_threshold;
299 +extern int mp_enable_rate_adapt;
300 +extern int mp_powercutback;
301 +extern int mp_trellis;
302 +extern int mp_bitswap;
303 +extern int mp_maximum_bits_per_carrier;
304 +extern int mp_maximum_interleave_depth;
305 +extern int mp_pair_selection;
306 +extern int mp_dgas_polarity;
307 +extern int mp_los_alarm;
308 +extern char *mp_eoc_vendor_id;
309 +extern int mp_eoc_vendor_revision;
310 +extern char *mp_eoc_vendor_serialnum;
311 +extern char *mp_invntry_vernum;
312 +extern int mp_dsl_bit_tmode;
313 +extern int mp_high_precision;
314 +
315 int testflag1 = 0;
316 extern int __guDbgLevel;
317 extern sar_stat_t sarStat;
318 @@ -2816,84 +2837,80 @@
319
320 // modulation
321 ptr = prom_getenv("modulation");
322 - if (ptr)
323 + if (ptr || mp_modulation != NULL)
324 {
325 - tn7dsl_set_modulation(ptr, FALSE);
326 + tn7dsl_set_modulation(mp_modulation == NULL ? ptr : mp_modulation, FALSE);
327 }
328
329 // Fine Gains
330 ptr = prom_getenv("fine_gain_control");
331 - if (ptr)
332 + if (ptr || mp_fine_gain_control != -1)
333 {
334 - value = os_atoi(ptr);
335 + value = mp_fine_gain_control == -1 ? os_atoi(ptr) : mp_fine_gain_control;
336 tn7dsl_ctrl_fineGain(value);
337 }
338 ptr = NULL;
339 ptr = prom_getenv("fine_gain_value");
340 - if(ptr)
341 - tn7dsl_set_fineGainValue(os_atoh(ptr));
342 + if(ptr || mp_fine_gain_value != -1)
343 + tn7dsl_set_fineGainValue(mp_fine_gain_value == -1 ? os_atoh(ptr) : mp_fine_gain_value);
344
345 // margin retrain
346 ptr = NULL;
347 ptr = prom_getenv("enable_margin_retrain");
348 - if(ptr)
349 + value = mp_enable_margin_retrain == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_enable_margin_retrain;
350 +
351 + if (value == 1)
352 {
353 - value = os_atoi(ptr);
354 - if(value == 1)
355 + dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
356 + bMarginRetrainEnable = 1;
357 + //printk("enable showtime margin monitor.\n");
358 +
359 + ptr = NULL;
360 + ptr = prom_getenv("margin_threshold");
361 + value = mp_margin_threshold == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_margin_threshold;
362 +
363 + if(value >= 0)
364 {
365 - dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
366 - bMarginRetrainEnable = 1;
367 - //printk("enable showtime margin monitor.\n");
368 - ptr = NULL;
369 - ptr = prom_getenv("margin_threshold");
370 - if(ptr)
371 - {
372 - value = os_atoi(ptr);
373 - //printk("Set margin threshold to %d x 0.5 db\n",value);
374 - if(value >= 0)
375 - {
376 - dslhal_api_setMarginThreshold(pIhw, value);
377 - bMarginThConfig=1;
378 - }
379 - }
380 + dslhal_api_setMarginThreshold(pIhw, value);
381 + bMarginThConfig=1;
382 }
383 }
384
385 // rate adapt
386 ptr = NULL;
387 ptr = prom_getenv("enable_rate_adapt");
388 - if(ptr)
389 + if(ptr || mp_enable_rate_adapt != -1)
390 {
391 - dslhal_api_setRateAdaptFlag(pIhw, os_atoi(ptr));
392 + dslhal_api_setRateAdaptFlag(pIhw, mp_enable_rate_adapt == -1 ? os_atoi(ptr) : mp_enable_rate_adapt);
393 }
394
395 // set powercutback
396 ptr = NULL;
397 ptr = prom_getenv("powercutback");
398 - if(ptr)
399 + if(ptr || mp_powercutback != -1)
400 {
401 - dslhal_advcfg_onOffPcb(pIhw, os_atoi(ptr));
402 + dslhal_advcfg_onOffPcb(pIhw, mp_powercutback == -1 ? os_atoi(ptr) : mp_powercutback);
403 }
404
405 // trellis
406 ptr = NULL;
407 ptr = prom_getenv("trellis");
408 - if(ptr)
409 + if(ptr || mp_trellis != -1)
410 {
411 - dslhal_api_setTrellisFlag(pIhw, os_atoi(ptr));
412 - trellis = os_atoi(ptr);
413 + trellis = mp_trellis == -1 ? os_atoi(ptr) : mp_trellis;
414 + dslhal_api_setTrellisFlag(pIhw, trellis);
415 //printk("trellis=%d\n");
416 }
417
418 // bitswap
419 ptr = NULL;
420 ptr = prom_getenv("bitswap");
421 - if(ptr)
422 + if(ptr || mp_bitswap != -1)
423 {
424 int offset[2] = {33, 0};
425 unsigned int bitswap;
426
427 - bitswap = os_atoi(ptr);
428 + bitswap = mp_bitswap == -1 ? os_atoi(ptr) : mp_bitswap;
429
430 tn7dsl_generic_read(2, offset);
431 dslReg &= dslhal_support_byteSwap32(0xFFFFFF00);
432 @@ -2911,46 +2928,47 @@
433 // maximum bits per carrier
434 ptr = NULL;
435 ptr = prom_getenv("maximum_bits_per_carrier");
436 - if(ptr)
437 + if(ptr || mp_maximum_bits_per_carrier != -1)
438 {
439 - dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, os_atoi(ptr));
440 + dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, mp_maximum_bits_per_carrier == -1 ? os_atoi(ptr) : mp_maximum_bits_per_carrier);
441 }
442
443 // maximum interleave depth
444 ptr = NULL;
445 ptr = prom_getenv("maximum_interleave_depth");
446 - if(ptr)
447 + if(ptr || mp_maximum_interleave_depth != -1)
448 {
449 - dslhal_api_setMaxInterleaverDepth(pIhw, os_atoi(ptr));
450 + dslhal_api_setMaxInterleaverDepth(pIhw, mp_maximum_interleave_depth == -1 ? os_atoi(ptr) : mp_maximum_interleave_depth);
451 }
452
453 // inner and outer pairs
454 ptr = NULL;
455 ptr = prom_getenv("pair_selection");
456 - if(ptr)
457 + if(ptr || mp_pair_selection != -1)
458 {
459 - dslhal_api_selectInnerOuterPair(pIhw, os_atoi(ptr));
460 + dslhal_api_selectInnerOuterPair(pIhw, mp_pair_selection == -1 ? os_atoi(ptr) : mp_pair_selection);
461 }
462
463 ptr = NULL;
464 ptr = prom_getenv("dgas_polarity");
465 - if(ptr)
466 + if(ptr || mp_dgas_polarity != -1)
467 {
468 dslhal_api_configureDgaspLpr(pIhw, 1, 1);
469 - dslhal_api_configureDgaspLpr(pIhw, 0, os_atoi(ptr));
470 + dslhal_api_configureDgaspLpr(pIhw, 0, mp_dgas_polarity == -1 ? os_atoi(ptr) : mp_dgas_polarity);
471 }
472
473 ptr = NULL;
474 ptr = prom_getenv("los_alarm");
475 - if(ptr)
476 + if(ptr || mp_los_alarm != -1)
477 {
478 - dslhal_api_disableLosAlarm(pIhw, os_atoi(ptr));
479 + dslhal_api_disableLosAlarm(pIhw, mp_los_alarm == -1 ? os_atoi(ptr) : mp_los_alarm);
480 }
481
482 ptr = NULL;
483 ptr = prom_getenv("eoc_vendor_id");
484 - if(ptr)
485 + if(ptr || mp_eoc_vendor_id != NULL)
486 {
487 + ptr = mp_eoc_vendor_id == NULL ? ptr : mp_eoc_vendor_id;
488 for(i=0;i<8;i++)
489 {
490 tmp[0]=ptr[i*2];
491 @@ -2975,26 +2993,26 @@
492 }
493 ptr = NULL;
494 ptr = prom_getenv("eoc_vendor_revision");
495 - if(ptr)
496 + if(ptr || mp_eoc_vendor_revision != -1)
497 {
498 - value = os_atoi(ptr);
499 + value = mp_eoc_vendor_revision == -1 ? os_atoi(ptr) : mp_eoc_vendor_revision;
500 //printk("eoc rev=%d\n", os_atoi(ptr));
501 dslhal_api_setEocRevisionNumber(pIhw, (char *)&value);
502
503 }
504 ptr = NULL;
505 ptr = prom_getenv("eoc_vendor_serialnum");
506 - if(ptr)
507 + if(ptr || mp_eoc_vendor_serialnum != NULL)
508 {
509 - dslhal_api_setEocSerialNumber(pIhw, ptr);
510 + dslhal_api_setEocSerialNumber(pIhw, mp_eoc_vendor_serialnum == NULL ? ptr : mp_eoc_vendor_serialnum);
511 }
512
513 // CQ10037 Added invntry_vernum environment variable to be able to set version number in ADSL2, ADSL2+ modes.
514 ptr = NULL;
515 ptr = prom_getenv("invntry_vernum");
516 - if(ptr)
517 + if(ptr || mp_invntry_vernum != NULL)
518 {
519 - dslhal_api_setEocRevisionNumber(pIhw, ptr);
520 + dslhal_api_setEocRevisionNumber(pIhw, mp_invntry_vernum == NULL ? ptr : mp_invntry_vernum);
521 }
522
523 return 0;
524 @@ -3038,7 +3056,7 @@
525 * backward compatibility.
526 */
527 cp = prom_getenv("DSL_BIT_TMODE");
528 - if (cp)
529 + if (cp || mp_dsl_bit_tmode != -1)
530 {
531 printk("%s : env var DSL_BIT_TMODE is set\n", __FUNCTION__);
532 /*
533 @@ -3067,9 +3085,9 @@
534
535 // UR8_MERGE_START CQ11054 Jack Zhang
536 cp = prom_getenv("high_precision");
537 - if (cp)
538 + if (cp || mp_high_precision != -1)
539 {
540 - high_precision_selected = os_atoi(cp);
541 + high_precision_selected = mp_high_precision == -1 ? os_atoi(cp) : mp_high_precision;
542 }
543 if ( high_precision_selected)
544 {
545 diff -urN sangam_atm-07.02.01.00/tn7sar.c sangam_atm-07.02.01.00.mod/tn7sar.c
546 --- sangam_atm-07.02.01.00/tn7sar.c 2007-09-19 04:12:20.000000000 +0200
547 +++ sangam_atm-07.02.01.00.mod/tn7sar.c 2007-09-20 14:23:50.436500000 +0200
548 @@ -73,6 +73,8 @@
549 /* PDSP Firmware files */
550 #include "tnetd7300_sar_firm.h"
551
552 +extern int mp_oam_lb_timeout;
553 +extern int mp_autopvc_enable;
554
555 enum
556 {
557 @@ -816,9 +818,9 @@
558 pHalDev = (HAL_DEVICE *)priv->pSarHalDev;
559
560 pauto_pvc = prom_getenv("autopvc_enable");
561 - if(pauto_pvc) //CQ10273
562 + if(pauto_pvc || mp_autopvc_enable != -1) //CQ10273
563 {
564 - auto_pvc =tn7sar_strtoul(pauto_pvc, NULL, 10);
565 + auto_pvc = mp_autopvc_enable == -1 ? tn7sar_strtoul(pauto_pvc, NULL, 10) : mp_autopvc_enable;
566 }
567
568 memset(&chInfo, 0xff, sizeof(chInfo));
569 @@ -984,9 +986,9 @@
570
571 /* read in oam lb timeout value */
572 pLbTimeout = prom_getenv("oam_lb_timeout");
573 - if(pLbTimeout)
574 + if(pLbTimeout || mp_oam_lb_timeout != -1)
575 {
576 - lbTimeout =tn7sar_strtoul(pLbTimeout, NULL, 10);
577 + lbTimeout = mp_oam_lb_timeout == -1 ? tn7sar_strtoul(pLbTimeout, NULL, 10) : mp_oam_lb_timeout;
578 oamLbTimeout = lbTimeout;
579 pHalFunc->Control(pHalDev,"OamLbTimeout", "Set", &lbTimeout);
580 }
This page took 0.061388 seconds and 5 git commands to generate.