@@ -77,13 +77,6 @@ static const struct old_serial_port old_serial_port[] = {
77
77
78
78
#define UART_NR CONFIG_SERIAL_8250_NR_UARTS
79
79
80
- #ifdef CONFIG_SERIAL_8250_RSA
81
-
82
- #define PORT_RSA_MAX 4
83
- static unsigned long probe_rsa [PORT_RSA_MAX ];
84
- static unsigned int probe_rsa_count ;
85
- #endif /* CONFIG_SERIAL_8250_RSA */
86
-
87
80
struct irq_info {
88
81
struct hlist_node node ;
89
82
int irq ;
@@ -348,44 +341,7 @@ static void univ8250_release_irq(struct uart_8250_port *up)
348
341
serial_unlink_irq_chain (up );
349
342
}
350
343
351
- #ifdef CONFIG_SERIAL_8250_RSA
352
- static int serial8250_request_rsa_resource (struct uart_8250_port * up )
353
- {
354
- unsigned long start = UART_RSA_BASE << up -> port .regshift ;
355
- unsigned int size = 8 << up -> port .regshift ;
356
- struct uart_port * port = & up -> port ;
357
- int ret = - EINVAL ;
358
-
359
- switch (port -> iotype ) {
360
- case UPIO_HUB6 :
361
- case UPIO_PORT :
362
- start += port -> iobase ;
363
- if (request_region (start , size , "serial-rsa" ))
364
- ret = 0 ;
365
- else
366
- ret = - EBUSY ;
367
- break ;
368
- }
369
-
370
- return ret ;
371
- }
372
-
373
- static void serial8250_release_rsa_resource (struct uart_8250_port * up )
374
- {
375
- unsigned long offset = UART_RSA_BASE << up -> port .regshift ;
376
- unsigned int size = 8 << up -> port .regshift ;
377
- struct uart_port * port = & up -> port ;
378
-
379
- switch (port -> iotype ) {
380
- case UPIO_HUB6 :
381
- case UPIO_PORT :
382
- release_region (port -> iobase + offset , size );
383
- break ;
384
- }
385
- }
386
- #endif
387
-
388
- static const struct uart_ops * base_ops ;
344
+ const struct uart_ops * univ8250_port_base_ops = NULL ;
389
345
static struct uart_ops univ8250_port_ops ;
390
346
391
347
static const struct uart_8250_ops univ8250_driver_ops = {
@@ -424,69 +380,6 @@ void serial8250_set_isa_configurator(
424
380
}
425
381
EXPORT_SYMBOL (serial8250_set_isa_configurator );
426
382
427
- #ifdef CONFIG_SERIAL_8250_RSA
428
-
429
- static void univ8250_config_port (struct uart_port * port , int flags )
430
- {
431
- struct uart_8250_port * up = up_to_u8250p (port );
432
-
433
- up -> probe &= ~UART_PROBE_RSA ;
434
- if (port -> type == PORT_RSA ) {
435
- if (serial8250_request_rsa_resource (up ) == 0 )
436
- up -> probe |= UART_PROBE_RSA ;
437
- } else if (flags & UART_CONFIG_TYPE ) {
438
- int i ;
439
-
440
- for (i = 0 ; i < probe_rsa_count ; i ++ ) {
441
- if (probe_rsa [i ] == up -> port .iobase ) {
442
- if (serial8250_request_rsa_resource (up ) == 0 )
443
- up -> probe |= UART_PROBE_RSA ;
444
- break ;
445
- }
446
- }
447
- }
448
-
449
- base_ops -> config_port (port , flags );
450
-
451
- if (port -> type != PORT_RSA && up -> probe & UART_PROBE_RSA )
452
- serial8250_release_rsa_resource (up );
453
- }
454
-
455
- static int univ8250_request_port (struct uart_port * port )
456
- {
457
- struct uart_8250_port * up = up_to_u8250p (port );
458
- int ret ;
459
-
460
- ret = base_ops -> request_port (port );
461
- if (ret == 0 && port -> type == PORT_RSA ) {
462
- ret = serial8250_request_rsa_resource (up );
463
- if (ret < 0 )
464
- base_ops -> release_port (port );
465
- }
466
-
467
- return ret ;
468
- }
469
-
470
- static void univ8250_release_port (struct uart_port * port )
471
- {
472
- struct uart_8250_port * up = up_to_u8250p (port );
473
-
474
- if (port -> type == PORT_RSA )
475
- serial8250_release_rsa_resource (up );
476
- base_ops -> release_port (port );
477
- }
478
-
479
- static void univ8250_rsa_support (struct uart_ops * ops )
480
- {
481
- ops -> config_port = univ8250_config_port ;
482
- ops -> request_port = univ8250_request_port ;
483
- ops -> release_port = univ8250_release_port ;
484
- }
485
-
486
- #else
487
- #define univ8250_rsa_support (x ) do { } while (0)
488
- #endif /* CONFIG_SERIAL_8250_RSA */
489
-
490
383
static inline void serial8250_apply_quirks (struct uart_8250_port * up )
491
384
{
492
385
up -> port .quirks |= skip_txen_test ? UPQ_NO_TXEN_TEST : 0 ;
@@ -504,8 +397,8 @@ static struct uart_8250_port *serial8250_setup_port(int index)
504
397
up -> port .port_id = index ;
505
398
506
399
serial8250_init_port (up );
507
- if (!base_ops )
508
- base_ops = up -> port .ops ;
400
+ if (!univ8250_port_base_ops )
401
+ univ8250_port_base_ops = up -> port .ops ;
509
402
up -> port .ops = & univ8250_port_ops ;
510
403
511
404
timer_setup (& up -> timer , serial8250_timeout , 0 );
@@ -539,7 +432,7 @@ static void __init serial8250_isa_init_ports(void)
539
432
serial8250_setup_port (i );
540
433
541
434
/* chain base port ops to support Remote Supervisor Adapter */
542
- univ8250_port_ops = * base_ops ;
435
+ univ8250_port_ops = * univ8250_port_base_ops ;
543
436
univ8250_rsa_support (& univ8250_port_ops );
544
437
545
438
if (share_irqs )
@@ -1312,10 +1205,6 @@ MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __MODULE_STR
1312
1205
module_param (skip_txen_test , uint , 0644 );
1313
1206
MODULE_PARM_DESC (skip_txen_test , "Skip checking for the TXEN bug at init time" );
1314
1207
1315
- #ifdef CONFIG_SERIAL_8250_RSA
1316
- module_param_hw_array (probe_rsa , ulong , ioport , & probe_rsa_count , 0444 );
1317
- MODULE_PARM_DESC (probe_rsa , "Probe I/O ports for RSA" );
1318
- #endif
1319
1208
MODULE_ALIAS_CHARDEV_MAJOR (TTY_MAJOR );
1320
1209
1321
1210
#ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS
@@ -1338,11 +1227,6 @@ static void __used s8250_options(void)
1338
1227
module_param_cb (share_irqs , & param_ops_uint , & share_irqs , 0644 );
1339
1228
module_param_cb (nr_uarts , & param_ops_uint , & nr_uarts , 0644 );
1340
1229
module_param_cb (skip_txen_test , & param_ops_uint , & skip_txen_test , 0644 );
1341
- #ifdef CONFIG_SERIAL_8250_RSA
1342
- __module_param_call (MODULE_PARAM_PREFIX , probe_rsa ,
1343
- & param_array_ops , .arr = & __param_arr_probe_rsa ,
1344
- 0444 , -1 , 0 );
1345
- #endif
1346
1230
}
1347
1231
#else
1348
1232
MODULE_ALIAS ("8250_core" );
0 commit comments