drivers/tty/serial/8250/8250.h
Source file repositories/reference/linux-study-clean/drivers/tty/serial/8250/8250.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/tty/serial/8250/8250.h- Extension
.h- Size
- 12139 bytes
- Lines
- 472
- Domain
- Driver Families
- Bucket
- drivers/tty
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/serial_8250.hlinux/serial_core.hlinux/dmaengine.h../serial_mctrl_gpio.hlinux/soc/ti/omap1-soc.h
Detected Declarations
struct uart_8250_dmastruct old_serial_portstruct serial8250_configfunction serial_infunction serial_outfunction serial_lsr_infunction serial_icr_writefunction serial_icr_readfunction serial_dl_readfunction serial_dl_writefunction serial8250_set_THRIfunction serial8250_clear_THRIfunction serial8250_TIOCM_to_MCRfunction serial8250_MCR_to_TIOCMfunction serial8250_MSR_to_TIOCMfunction serial8250_out_MCRfunction serial8250_in_MCRfunction serial8250_pnp_initfunction serial8250_pnp_exitfunction univ8250_rsa_supportfunction fintek_8250_probefunction is_omap1_8250function is_omap1510_8250function is_omap1_8250function is_omap1510_8250function serial8250_do_prepare_tx_dmafunction serial8250_do_prepare_rx_dmafunction serial8250_tx_dma_runningfunction serial8250_tx_dma_pausefunction serial8250_tx_dma_resumefunction serial8250_tx_dmafunction serial8250_tx_dma_flushfunction serial8250_rx_dma_flushfunction serial8250_release_dmafunction serial8250_tx_dma_pausefunction serial_index
Annotated Snippet
struct uart_8250_dma {
int (*tx_dma)(struct uart_8250_port *p);
int (*rx_dma)(struct uart_8250_port *p);
void (*prepare_tx_dma)(struct uart_8250_port *p);
void (*prepare_rx_dma)(struct uart_8250_port *p);
/* Filter function */
dma_filter_fn fn;
/* Parameter to the filter function */
void *rx_param;
void *tx_param;
struct dma_slave_config rxconf;
struct dma_slave_config txconf;
struct dma_chan *rxchan;
struct dma_chan *txchan;
/* Device address base for DMA operations */
phys_addr_t rx_dma_addr;
phys_addr_t tx_dma_addr;
/* DMA address of the buffer in memory */
dma_addr_t rx_addr;
dma_addr_t tx_addr;
dma_cookie_t rx_cookie;
dma_cookie_t tx_cookie;
void *rx_buf;
size_t rx_size;
size_t tx_size;
unsigned char tx_running;
unsigned char tx_err;
unsigned char rx_running;
};
struct old_serial_port {
unsigned int uart;
unsigned int baud_base;
unsigned int port;
unsigned int irq;
upf_t flags;
unsigned char io_type;
unsigned char __iomem *iomem_base;
unsigned short iomem_reg_shift;
};
struct serial8250_config {
const char *name;
unsigned short fifo_size;
unsigned short tx_loadsz;
unsigned char fcr;
unsigned char rxtrig_bytes[UART_FCR_R_TRIG_MAX_STATE];
unsigned int flags;
};
#define UART_CAP_FIFO BIT(8) /* UART has FIFO */
#define UART_CAP_EFR BIT(9) /* UART has EFR */
#define UART_CAP_SLEEP BIT(10) /* UART has IER sleep */
#define UART_CAP_AFE BIT(11) /* MCR-based hw flow control */
#define UART_CAP_UUE BIT(12) /* UART needs IER bit 6 set (Xscale) */
#define UART_CAP_RTOIE BIT(13) /* UART needs IER bit 4 set (Xscale, Tegra) */
#define UART_CAP_HFIFO BIT(14) /* UART has a "hidden" FIFO */
#define UART_CAP_RPM BIT(15) /* Runtime PM is active while idle */
#define UART_CAP_IRDA BIT(16) /* UART supports IrDA line discipline */
#define UART_CAP_MINI BIT(17) /* Mini UART on BCM283X family lacks:
* STOP PARITY EPAR SPAR WLEN5 WLEN6
*/
#define UART_CAP_NOTEMT BIT(18) /* UART without interrupt on TEMT available */
#define UART_BUG_QUOT BIT(0) /* UART has buggy quot LSB */
#define UART_BUG_TXEN BIT(1) /* UART has buggy TX IIR status */
#define UART_BUG_NOMSR BIT(2) /* UART has buggy MSR status bits (Au1x00) */
#define UART_BUG_THRE BIT(3) /* UART has buggy THRE reassertion */
#define UART_BUG_TXRACE BIT(5) /* UART Tx fails to set remote DR */
/* Module parameters */
#define UART_NR CONFIG_SERIAL_8250_NR_UARTS
extern unsigned int nr_uarts;
#define SERIAL8250_PORT_FLAGS(_base, _irq, _flags) \
{ \
.iobase = _base, \
.irq = _irq, \
.uartclk = 1843200, \
.iotype = UPIO_PORT, \
Annotation
- Immediate include surface: `linux/bits.h`, `linux/serial_8250.h`, `linux/serial_core.h`, `linux/dmaengine.h`, `../serial_mctrl_gpio.h`, `linux/soc/ti/omap1-soc.h`.
- Detected declarations: `struct uart_8250_dma`, `struct old_serial_port`, `struct serial8250_config`, `function serial_in`, `function serial_out`, `function serial_lsr_in`, `function serial_icr_write`, `function serial_icr_read`, `function serial_dl_read`, `function serial_dl_write`.
- Atlas domain: Driver Families / drivers/tty.
- Implementation status: source implementation candidate.
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.