drivers/tty/serial/sifive.c
Source file repositories/reference/linux-study-clean/drivers/tty/serial/sifive.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/sifive.c- Extension
.c- Size
- 31841 bytes
- Lines
- 1151
- 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/clk.hlinux/console.hlinux/delay.hlinux/init.hlinux/io.hlinux/irq.hlinux/module.hlinux/of.hlinux/of_irq.hlinux/platform_device.hlinux/serial_core.hlinux/serial_reg.hlinux/slab.hlinux/tty.hlinux/tty_flip.h
Detected Declarations
struct sifive_serial_portfunction __ssp_early_writelfunction __ssp_early_readlfunction __ssp_writelfunction __ssp_readlfunction sifive_serial_is_txfifo_fullfunction __ssp_transmit_charfunction __ssp_transmit_charsfunction __ssp_enable_txwmfunction __ssp_enable_rxwmfunction __ssp_disable_txwmfunction __ssp_disable_rxwmfunction __ssp_receive_charfunction __ssp_receive_charsfunction __ssp_update_divfunction __ssp_update_baud_ratefunction __ssp_set_stop_bitsfunction __ssp_wait_for_xmitrfunction sifive_serial_stop_txfunction sifive_serial_stop_rxfunction sifive_serial_start_txfunction sifive_serial_irqfunction sifive_serial_tx_emptyfunction sifive_serial_get_mctrlfunction sifive_serial_set_mctrlfunction sifive_serial_shutdownfunction sifive_serial_clk_notifierfunction sifive_serial_set_termiosfunction sifive_serial_release_portfunction sifive_serial_config_portfunction sifive_serial_verify_portfunction sifive_serial_poll_get_charfunction sifive_serial_poll_put_charfunction early_sifive_serial_putcfunction early_sifive_serial_writefunction early_sifive_serial_setupfunction sifive_serial_console_putcharfunction sifive_serial_device_lockfunction sifive_serial_device_unlockfunction sifive_serial_console_write_atomicfunction sifive_serial_console_write_threadfunction sifive_serial_console_setupfunction sifive_console_initfunction __ssp_add_console_portfunction __ssp_remove_console_portfunction __ssp_add_console_portfunction sifive_serial_probefunction sifive_serial_remove
Annotated Snippet
module_init(sifive_serial_init);
module_exit(sifive_serial_exit);
MODULE_DESCRIPTION("SiFive UART serial driver");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul Walmsley <paul@pwsan.com>");
Annotation
- Immediate include surface: `linux/clk.h`, `linux/console.h`, `linux/delay.h`, `linux/init.h`, `linux/io.h`, `linux/irq.h`, `linux/module.h`, `linux/of.h`.
- Detected declarations: `struct sifive_serial_port`, `function __ssp_early_writel`, `function __ssp_early_readl`, `function __ssp_writel`, `function __ssp_readl`, `function sifive_serial_is_txfifo_full`, `function __ssp_transmit_char`, `function __ssp_transmit_chars`, `function __ssp_enable_txwm`, `function __ssp_enable_rxwm`.
- 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.