@@ -28,7 +28,7 @@ void print_board_dna(void) {
28
28
for (i = 0 ; i < CSR_DNA_ID_SIZE ; i ++ ) {
29
29
printf ("%02x" , MMPTR (CSR_DNA_ID_ADDR + 4 * i ));
30
30
}
31
- printf ("\n" );
31
+ printf ("\r\ n" );
32
32
}
33
33
34
34
static void help_video_matrix (void )
@@ -121,8 +121,8 @@ static void help(void)
121
121
122
122
static void version (void )
123
123
{
124
- printf ("gateware revision: %08x\n" , identifier_revision_read ());
125
- printf ("firmware revision: %08x, built " __DATE__ " " __TIME__ "\n" , MSC_GIT_ID );
124
+ printf ("gateware revision: %08x\r\ n" , identifier_revision_read ());
125
+ printf ("firmware revision: %08x, built " __DATE__ " " __TIME__ "\r\ n" , MSC_GIT_ID );
126
126
}
127
127
128
128
static void reboot (void )
@@ -132,7 +132,7 @@ static void reboot(void)
132
132
133
133
static void status_enable (void )
134
134
{
135
- printf ("Enabling status\n" );
135
+ printf ("Enabling status\r\ n" );
136
136
status_enabled = 1 ;
137
137
#ifdef ENCODER_BASE
138
138
encoder_bandwidth_nbytes_clear_write (1 );
@@ -141,7 +141,7 @@ static void status_enable(void)
141
141
142
142
static void status_disable (void )
143
143
{
144
- printf ("Disabling status\n" );
144
+ printf ("Disabling status\r\ n" );
145
145
status_enabled = 0 ;
146
146
}
147
147
@@ -154,15 +154,15 @@ static void status_print(void)
154
154
"input0: %dx%d" ,
155
155
hdmi_in0_resdetection_hres_read (),
156
156
hdmi_in0_resdetection_vres_read ());
157
- printf ("\n" );
157
+ printf ("\r\ n" );
158
158
#endif
159
159
160
160
#ifdef CSR_HDMI_IN1_BASE
161
161
printf (
162
162
"input1: %dx%d" ,
163
163
hdmi_in1_resdetection_hres_read (),
164
164
hdmi_in1_resdetection_vres_read ());
165
- printf ("\n" );
165
+ printf ("\r\ n" );
166
166
#endif
167
167
168
168
#ifdef CSR_HDMI_OUT0_BASE
@@ -176,7 +176,7 @@ static void status_print(void)
176
176
processor_get_source_name (processor_hdmi_out0_source ));
177
177
else
178
178
printf ("off" );
179
- printf ("\n" );
179
+ printf ("\r\ n" );
180
180
#endif
181
181
182
182
#ifdef CSR_HDMI_OUT1_BASE
@@ -190,7 +190,7 @@ static void status_print(void)
190
190
processor_get_source_name (processor_hdmi_out1_source ));
191
191
else
192
192
printf ("off" );
193
- printf ("\n" );
193
+ printf ("\r\ n" );
194
194
#endif
195
195
196
196
#ifdef ENCODER_BASE
@@ -207,7 +207,7 @@ static void status_print(void)
207
207
encoder_bandwidth_nbytes_clear_write (1 );
208
208
} else
209
209
printf ("off" );
210
- printf ("\n" );
210
+ printf ("\r\ n" );
211
211
#endif
212
212
printf ("ddr: " );
213
213
debug_ddr ();
@@ -220,37 +220,37 @@ static void status_service(void)
220
220
if (elapsed (& last_event , identifier_frequency_read ())) {
221
221
if (status_enabled ) {
222
222
status_print ();
223
- printf ("\n" );
223
+ printf ("\r\ n" );
224
224
}
225
225
}
226
226
}
227
227
228
228
static void video_matrix_list (void )
229
229
{
230
- printf ("Video sources:\n" );
230
+ printf ("Video sources:\r\ n" );
231
231
#ifdef CSR_HDMI_IN0_BASE
232
- printf ("input0: %s\n" , HDMI_IN0_MNEMONIC );
232
+ printf ("input0: %s\r\ n" , HDMI_IN0_MNEMONIC );
233
233
puts (HDMI_IN0_DESCRIPTION );
234
234
#endif
235
235
#ifdef CSR_HDMI_IN1_BASE
236
- printf ("input1: %s\n" , HDMI_IN1_MNEMONIC );
236
+ printf ("input1: %s\r\ n" , HDMI_IN1_MNEMONIC );
237
237
puts (HDMI_IN1_DESCRIPTION );
238
238
#endif
239
- printf ("pattern:\n" );
240
- printf (" Video pattern\n" );
239
+ printf ("pattern:\r\ n" );
240
+ printf (" Video pattern\r\ n" );
241
241
puts (" " );
242
- printf ("Video sinks:\n" );
242
+ printf ("Video sinks:\r\ n" );
243
243
#ifdef CSR_HDMI_OUT0_BASE
244
- printf ("output0: %s\n" , HDMI_OUT0_MNEMONIC );
244
+ printf ("output0: %s\r\ n" , HDMI_OUT0_MNEMONIC );
245
245
puts (HDMI_OUT0_DESCRIPTION );
246
246
#endif
247
247
#ifdef CSR_HDMI_OUT1_BASE
248
- printf ("output1: %s\n" , HDMI_OUT1_MNEMONIC );
248
+ printf ("output1: %s\r\ n" , HDMI_OUT1_MNEMONIC );
249
249
puts (HDMI_OUT1_DESCRIPTION );
250
250
#endif
251
251
#ifdef ENCODER_BASE
252
- printf ("encoder:\n" );
253
- printf (" JPEG Encoder\n" );
252
+ printf ("encoder:\r\ n" );
253
+ printf (" JPEG Encoder\r\ n" );
254
254
#endif
255
255
puts (" " );
256
256
}
@@ -260,24 +260,24 @@ static void video_matrix_connect(int source, int sink)
260
260
if (source >= 0 && source <= VIDEO_IN_PATTERN )
261
261
{
262
262
if (sink >= 0 && sink <= VIDEO_OUT_HDMI_OUT1 ) {
263
- printf ("Connecting %s to output%d\n" , processor_get_source_name (source ), sink );
263
+ printf ("Connecting %s to output%d\r\ n" , processor_get_source_name (source ), sink );
264
264
if (sink == VIDEO_OUT_HDMI_OUT0 )
265
265
#ifdef CSR_HDMI_OUT0_BASE
266
266
processor_set_hdmi_out0_source (source );
267
267
#else
268
- printf ("hdmi_out0 is missing.\n" );
268
+ printf ("hdmi_out0 is missing.\r\ n" );
269
269
#endif
270
270
else if (sink == VIDEO_OUT_HDMI_OUT1 )
271
271
#ifdef CSR_HDMI_OUT1_BASE
272
272
processor_set_hdmi_out1_source (source );
273
273
#else
274
- printf ("hdmi_out1 is missing.\n" );
274
+ printf ("hdmi_out1 is missing.\r\ n" );
275
275
#endif
276
276
processor_update ();
277
277
}
278
278
#ifdef ENCODER_BASE
279
279
else if (sink == VIDEO_OUT_ENCODER ) {
280
- printf ("Connecting %s to encoder\n" , processor_get_source_name (source ));
280
+ printf ("Connecting %s to encoder\r\ n" , processor_get_source_name (source ));
281
281
processor_set_encoder_source (source );
282
282
processor_update ();
283
283
}
@@ -291,18 +291,18 @@ static void video_mode_list(void)
291
291
int i ;
292
292
293
293
processor_list_modes (mode_descriptors );
294
- printf ("Available video modes:\n" );
294
+ printf ("Available video modes:\r\ n" );
295
295
for (i = 0 ;i < PROCESSOR_MODE_COUNT ;i ++ )
296
- printf ("mode %d: %s\n" , i , & mode_descriptors [i * PROCESSOR_MODE_DESCLEN ]);
297
- printf ("\n" );
296
+ printf ("mode %d: %s\r\ n" , i , & mode_descriptors [i * PROCESSOR_MODE_DESCLEN ]);
297
+ printf ("\r\ n" );
298
298
}
299
299
300
300
static void video_mode_set (int mode )
301
301
{
302
302
char mode_descriptors [PROCESSOR_MODE_COUNT * PROCESSOR_MODE_DESCLEN ];
303
303
if (mode < PROCESSOR_MODE_COUNT ) {
304
304
processor_list_modes (mode_descriptors );
305
- printf ("Setting video mode to %s\n" , & mode_descriptors [mode * PROCESSOR_MODE_DESCLEN ]);
305
+ printf ("Setting video mode to %s\r\ n" , & mode_descriptors [mode * PROCESSOR_MODE_DESCLEN ]);
306
306
config_set (CONFIG_KEY_RESOLUTION , mode );
307
307
processor_start (mode );
308
308
}
@@ -313,15 +313,15 @@ static void hdp_toggle(int source)
313
313
#if defined(CSR_HDMI_IN0_BASE ) || defined(CSR_HDMI_IN1_BASE )
314
314
int i ;
315
315
#endif
316
- printf ("Toggling HDP on output%d\n" , source );
316
+ printf ("Toggling HDP on output%d\r\ n" , source );
317
317
#ifdef CSR_HDMI_IN0_BASE
318
318
if (source == VIDEO_IN_HDMI_IN0 ) {
319
319
hdmi_in0_edid_hpd_en_write (0 );
320
320
for (i = 0 ; i < 65536 ; i ++ );
321
321
hdmi_in0_edid_hpd_en_write (1 );
322
322
}
323
323
#else
324
- printf ("hdmi_in0 is missing.\n" );
324
+ printf ("hdmi_in0 is missing.\r\ n" );
325
325
#endif
326
326
#ifdef CSR_HDMI_IN1_BASE
327
327
if (source == VIDEO_IN_HDMI_IN1 ) {
@@ -330,55 +330,55 @@ static void hdp_toggle(int source)
330
330
hdmi_in1_edid_hpd_en_write (1 );
331
331
}
332
332
#else
333
- printf ("hdmi_in1 is missing.\n" );
333
+ printf ("hdmi_in1 is missing.\r\ n" );
334
334
#endif
335
335
}
336
336
337
337
#ifdef CSR_HDMI_OUT0_BASE
338
338
static void output0_on (void )
339
339
{
340
- printf ("Enabling output0\n" );
340
+ printf ("Enabling output0\r\ n" );
341
341
hdmi_out0_fi_enable_write (1 );
342
342
}
343
343
344
344
static void output0_off (void )
345
345
{
346
- printf ("Disabling output0\n" );
346
+ printf ("Disabling output0\r\ n" );
347
347
hdmi_out0_fi_enable_write (0 );
348
348
}
349
349
#endif
350
350
351
351
#ifdef CSR_HDMI_OUT1_BASE
352
352
static void output1_on (void )
353
353
{
354
- printf ("Enabling output1\n" );
354
+ printf ("Enabling output1\r\ n" );
355
355
hdmi_out1_fi_enable_write (1 );
356
356
}
357
357
358
358
static void output1_off (void )
359
359
{
360
- printf ("Disabling output1\n" );
360
+ printf ("Disabling output1\r\ n" );
361
361
hdmi_out1_fi_enable_write (0 );
362
362
}
363
363
#endif
364
364
365
365
#ifdef ENCODER_BASE
366
366
static void encoder_on (void )
367
367
{
368
- printf ("Enabling encoder\n" );
368
+ printf ("Enabling encoder\r\ n" );
369
369
encoder_enable (1 );
370
370
}
371
371
372
372
static void encoder_configure_quality (int quality )
373
373
{
374
- printf ("Setting encoder quality to %d\n" , quality );
374
+ printf ("Setting encoder quality to %d\r\ n" , quality );
375
375
encoder_set_quality (quality );
376
376
}
377
377
378
378
379
379
static void encoder_off (void )
380
380
{
381
- printf ("Disabling encoder\n" );
381
+ printf ("Disabling encoder\r\ n" );
382
382
encoder_enable (0 );
383
383
}
384
384
#endif
@@ -409,7 +409,7 @@ static void debug_ddr(void)
409
409
burstbits = (2 * DFII_NPHASES ) << DFII_PIX_DATA_SIZE ;
410
410
rdb = (nr * f >> (24 - log2 (burstbits )))/1000000ULL ;
411
411
wrb = (nw * f >> (24 - log2 (burstbits )))/1000000ULL ;
412
- printf ("read:%5dMbps write:%5dMbps all:%5dMbps\n" , rdb , wrb , rdb + wrb );
412
+ printf ("read:%5dMbps write:%5dMbps all:%5dMbps\r\ n" , rdb , wrb , rdb + wrb );
413
413
}
414
414
415
415
static char * readstr (void )
@@ -434,7 +434,7 @@ static char *readstr(void)
434
434
case '\r' :
435
435
case '\n' :
436
436
s [ptr ] = 0x00 ;
437
- putsnonl ("\n" );
437
+ putsnonl ("\r\ n" );
438
438
ptr = 0 ;
439
439
return s ;
440
440
default :
@@ -529,7 +529,7 @@ void ci_service(void)
529
529
else if (strcmp (token , "pattern" ) == 0 )
530
530
source = VIDEO_IN_PATTERN ;
531
531
else
532
- printf ("Unknown video source: '%s'\n" , token );
532
+ printf ("Unknown video source: '%s'\r\ n" , token );
533
533
534
534
/* get video sink */
535
535
token = get_token (& str );
@@ -541,7 +541,7 @@ void ci_service(void)
541
541
else if (strcmp (token , "encoder" ) == 0 )
542
542
sink = VIDEO_OUT_ENCODER ;
543
543
else
544
- printf ("Unknown video sink: '%s'\n" , token );
544
+ printf ("Unknown video sink: '%s'\r\ n" , token );
545
545
546
546
if (source >= 0 && sink >= 0 )
547
547
video_matrix_connect (source , sink );
@@ -656,7 +656,7 @@ void ci_service(void)
656
656
}
657
657
#endif
658
658
if (found == 0 )
659
- printf ("%s port has no EDID capabilities\n" , token );
659
+ printf ("%s port has no EDID capabilities\r\ n" , token );
660
660
} else
661
661
help_debug ();
662
662
} else {
0 commit comments