drivers/tty/serial/8250/8250_platform.c
Source file repositories/reference/linux-study-clean/drivers/tty/serial/8250/8250_platform.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/8250/8250_platform.c- Extension
.c- Size
- 9791 bytes
- Lines
- 387
- Domain
- Driver Families
- Bucket
- drivers/tty
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/array_size.hlinux/cleanup.hlinux/io.hlinux/module.hlinux/moduleparam.hlinux/once.hlinux/platform_device.hlinux/serial_8250.hlinux/sunserialcore.h8250.hasm/serial.h
Detected Declarations
function serial8250_set_isa_configuratorfunction __serial8250_isa_init_portsfunction serial8250_isa_init_portsfunction serial8250_probe_acpifunction serial8250_probe_platformfunction serial8250_probefunction serial8250_removefunction serial8250_suspendfunction serial8250_resumefunction serial8250_initfunction serial8250_exitmodule init serial8250_initexport serial8250_set_isa_configurator
Annotated Snippet
module_init(serial8250_init);
static void __exit serial8250_exit(void)
{
struct platform_device *isa_dev = serial8250_isa_devs;
/*
* This tells serial8250_unregister_port() not to re-register
* the ports (thereby making serial8250_isa_driver permanently
* in use).
*/
serial8250_isa_devs = NULL;
platform_driver_unregister(&serial8250_isa_driver);
platform_device_unregister(isa_dev);
serial8250_pnp_exit();
#ifdef CONFIG_SPARC
sunserial_unregister_minors(&serial8250_reg, UART_NR);
#else
uart_unregister_driver(&serial8250_reg);
#endif
}
module_exit(serial8250_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic 8250/16x50 serial platform driver");
module_param_hw(share_irqs, bool, other, 0644);
MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices (unsafe)");
module_param(nr_uarts, uint, 0644);
MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS) ")");
MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/array_size.h`, `linux/cleanup.h`, `linux/io.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/once.h`, `linux/platform_device.h`.
- Detected declarations: `function serial8250_set_isa_configurator`, `function __serial8250_isa_init_ports`, `function serial8250_isa_init_ports`, `function serial8250_probe_acpi`, `function serial8250_probe_platform`, `function serial8250_probe`, `function serial8250_remove`, `function serial8250_suspend`, `function serial8250_resume`, `function serial8250_init`.
- Atlas domain: Driver Families / drivers/tty.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.