|
2 | 2 | /* |
3 | 3 | * Universal/legacy platform driver for 8250/16550-type serial ports |
4 | 4 | * |
5 | | - * Supports: ISA-compatible 8250/16550 ports |
| 5 | + * Supports: |
| 6 | + * ISA-compatible 8250/16550 ports |
| 7 | + * ACPI 8250/16550 ports |
6 | 8 | * PNP 8250/16550 ports |
7 | 9 | * "serial8250" platform devices |
8 | 10 | */ |
|
24 | 26 |
|
25 | 27 | /* |
26 | 28 | * Configuration: |
27 | | - * share_irqs Whether we pass IRQF_SHARED to request_irq(). |
| 29 | + * share_irqs: Whether we pass IRQF_SHARED to request_irq(). |
28 | 30 | * This option is unsafe when used on edge-triggered interrupts. |
29 | | - * skip_txen_test Force skip of txen test at init time. |
| 31 | + * skip_txen_test: Force skip of txen test at init time. |
30 | 32 | */ |
31 | 33 | unsigned int share_irqs = SERIAL8250_SHARE_IRQS; |
32 | 34 | unsigned int skip_txen_test; |
@@ -63,9 +65,9 @@ static void __init __serial8250_isa_init_ports(void) |
63 | 65 | nr_uarts = UART_NR; |
64 | 66 |
|
65 | 67 | /* |
66 | | - * Set up initial isa ports based on nr_uart module param, or else |
| 68 | + * Set up initial ISA ports based on nr_uart module param, or else |
67 | 69 | * default to CONFIG_SERIAL_8250_RUNTIME_UARTS. Note that we do not |
68 | | - * need to increase nr_uarts when setting up the initial isa ports. |
| 70 | + * need to increase nr_uarts when setting up the initial ISA ports. |
69 | 71 | */ |
70 | 72 | for (i = 0; i < nr_uarts; i++) |
71 | 73 | serial8250_setup_port(i); |
@@ -132,11 +134,12 @@ static int serial8250_probe_acpi(struct platform_device *pdev) |
132 | 134 | return -EINVAL; |
133 | 135 | } |
134 | 136 |
|
135 | | - /* Default clock frequency*/ |
| 137 | + /* default clock frequency */ |
136 | 138 | uart.port.uartclk = 1843200; |
137 | 139 | uart.port.type = PORT_16550A; |
138 | 140 | uart.port.dev = &pdev->dev; |
139 | 141 | uart.port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; |
| 142 | + |
140 | 143 | ret = uart_read_and_validate_port_properties(&uart.port); |
141 | 144 | /* no interrupt -> fall back to polling */ |
142 | 145 | if (ret == -ENXIO) |
@@ -207,8 +210,8 @@ static int serial8250_probe_platform(struct platform_device *dev, struct plat_se |
207 | 210 | } |
208 | 211 |
|
209 | 212 | /* |
210 | | - * Register a set of serial devices attached to a platform device. The |
211 | | - * list is terminated with a zero flags entry, which means we expect |
| 213 | + * Register a set of serial devices attached to a platform device. |
| 214 | + * The list is terminated with a zero flags entry, which means we expect |
212 | 215 | * all entries to have at least UPF_BOOT_AUTOCONF set. |
213 | 216 | */ |
214 | 217 | static int serial8250_probe(struct platform_device *pdev) |
@@ -293,7 +296,7 @@ static struct platform_driver serial8250_isa_driver = { |
293 | 296 |
|
294 | 297 | /* |
295 | 298 | * This "device" covers _all_ ISA 8250-compatible serial devices listed |
296 | | - * in the table in include/asm/serial.h |
| 299 | + * in the table in include/asm/serial.h. |
297 | 300 | */ |
298 | 301 | struct platform_device *serial8250_isa_devs; |
299 | 302 |
|
@@ -322,8 +325,7 @@ static int __init serial8250_init(void) |
322 | 325 | if (ret) |
323 | 326 | goto unreg_uart_drv; |
324 | 327 |
|
325 | | - serial8250_isa_devs = platform_device_alloc("serial8250", |
326 | | - PLAT8250_DEV_LEGACY); |
| 328 | + serial8250_isa_devs = platform_device_alloc("serial8250", PLAT8250_DEV_LEGACY); |
327 | 329 | if (!serial8250_isa_devs) { |
328 | 330 | ret = -ENOMEM; |
329 | 331 | goto unreg_pnp; |
@@ -362,7 +364,7 @@ static void __exit serial8250_exit(void) |
362 | 364 | /* |
363 | 365 | * This tells serial8250_unregister_port() not to re-register |
364 | 366 | * the ports (thereby making serial8250_isa_driver permanently |
365 | | - * in use.) |
| 367 | + * in use). |
366 | 368 | */ |
367 | 369 | serial8250_isa_devs = NULL; |
368 | 370 |
|
@@ -395,12 +397,13 @@ MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); |
395 | 397 |
|
396 | 398 | #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS |
397 | 399 | #ifndef MODULE |
398 | | -/* This module was renamed to 8250_core in 3.7. Keep the old "8250" name |
399 | | - * working as well for the module options so we don't break people. We |
| 400 | +/* |
| 401 | + * This module was renamed to 8250_core in 3.7. Keep the old "8250" name |
| 402 | + * working as well for the module options so we don't break people. We |
400 | 403 | * need to keep the names identical and the convenient macros will happily |
401 | 404 | * refuse to let us do that by failing the build with redefinition errors |
402 | | - * of global variables. So we stick them inside a dummy function to avoid |
403 | | - * those conflicts. The options still get parsed, and the redefined |
| 405 | + * of global variables. So we stick them inside a dummy function to avoid |
| 406 | + * those conflicts. The options still get parsed, and the redefined |
404 | 407 | * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive. |
405 | 408 | * |
406 | 409 | * This is hacky. I'm sorry. |
|
0 commit comments