| /linux/drivers/tty/serial/8250/ |
| H A D | 8250_ingenic.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (C) 2010 Lars-Peter Clausen <lars@metafoo.de> 6 * Ingenic SoC UART support 26 int fifosize; member 46 return readl(port->membase + (offset << 2)); in early_in() 51 writel(value, port->membase + (offset << 2)); in early_out() 68 uart_console_write(&early_device->port, s, count, in ingenic_early_console_write() 82 prop = fdt_getprop(fdt, offset, "clock-frequency", NULL); in ingenic_early_console_setup_clock() 86 dev->port.uartclk = be32_to_cpup(prop); in ingenic_early_console_setup_clock() 92 struct uart_port *port = &dev->port; in ingenic_earlycon_setup_tail() [all …]
|
| H A D | 8250_of.c | 1 // SPDX-License-Identifier: GPL-2.0+ 54 return DIV_ROUND_CLOSEST(port->uartclk, 16 * baud + 2) - 2; in npcm_get_divisor() 59 port->get_divisor = npcm_get_divisor; in npcm_setup() 60 port->startup = npcm_startup; in npcm_setup() 73 struct uart_8250_port *port8250 = serial8250_get_port(info->line); in of_platform_serial_clk_notifier_cb() 77 serial8250_update_uartclk(&port8250->port, ndata->new_rate); in of_platform_serial_clk_notifier_cb() 92 struct device *dev = &ofdev->dev; in of_platform_serial_setup() 93 struct device_node *np = dev->of_node; in of_platform_serial_setup() 94 struct uart_port *port = &up->port; in of_platform_serial_setup() 100 pm_runtime_enable(&ofdev->dev); in of_platform_serial_setup() [all …]
|
| H A D | 8250_dw.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 * raised, the LCR needs to be rewritten and the uart status register read. 34 #define DW_UART_USR 0x1f /* UART Status Register */ 37 #define OCTEON_UART_USR 0x27 /* UART Status Register */ 99 struct dw8250_data *d = to_dw8250_data(p->private_data); in dw8250_modify_msr() 103 value |= d->msr_mask_on; in dw8250_modify_msr() 104 value &= ~d->msr_mask_off; in dw8250_modify_msr() 134 if (up->fcr & UART_FCR_ENABLE_FIFO) { in dw8250_force_idle() 150 struct dw8250_data *d = to_dw8250_data(p->private_data); in dw8250_check_lcr() 151 void __iomem *addr = p->membase + (offset << p->regshift); in dw8250_check_lcr() [all …]
|
| H A D | 8250_pxa.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * drivers/tty/serial/8250/8250_pxa.c -- driver for PXA on-board UARTS 37 serial8250_suspend_port(data->line); in serial_pxa_suspend() 46 serial8250_resume_port(data->line); in serial_pxa_resume() 56 { .compatible = "mrvl,pxa-uart", }, 57 { .compatible = "mrvl,mmp-uart", }, 62 /* Uart divisor latch write */ 82 struct pxa8250_data *data = port->private_data; in serial_pxa_pm() 85 clk_prepare_enable(data->clk); in serial_pxa_pm() 87 clk_disable_unprepare(data->clk); in serial_pxa_pm() [all …]
|
| H A D | 8250_uniphier.c | 1 // SPDX-License-Identifier: GPL-2.0+ 17 * - MMIO32 (regshift = 2) 18 * - FCR is not at 2, but 3 19 * - LCR and MCR are not at 3 and 4, they share 4 20 * - No SCR (Instead, CHAR can be used as a scratch register) 21 * - Divisor latch at 9, no divisor latch access bit 43 if (!device->port.membase) in uniphier_early_console_setup() 44 return -ENODEV; in uniphier_early_console_setup() 47 device->port.iotype = UPIO_MEM32; in uniphier_early_console_setup() 48 device->port.regshift = UNIPHIER_UART_REGSHIFT; in uniphier_early_console_setup() [all …]
|
| H A D | 8250_ni.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * NI 16550 UART Driver 5 * The National Instruments (NI) 16550 is a UART that is compatible with the 7 * for RS-485 transceiver control. This driver implements support for the 10 * Copyright 2012-2023 National Instruments Corporation 31 /* TFS - TX FIFO Size */ 33 /* RFS - RX FIFO Size */ 36 /* PMR - Port Mode Register */ 38 /* PMR[1:0] - Port Capabilities */ 41 #define NI16550_PMR_CAP_RS232 FIELD_PREP(NI16550_PMR_CAP_MASK, 1) /* RS-232 capable */ [all …]
|
| /linux/Documentation/devicetree/bindings/serial/ |
| H A D | samsung_uart.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Samsung S3C, S5P, Exynos, and S5L (Apple SoC) SoC UART Controller 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 - Greg Kroah-Hartman <gregkh@linuxfoundation.org> 14 Each Samsung UART should have an alias correctly numbered in the "aliases" 15 node, according to serialN format, where N is the port number (non-negative 21 - enum: 22 - apple,s5l-uart [all …]
|
| /linux/arch/arm64/boot/dts/exynos/ |
| H A D | exynosautov920.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <dt-bindings/clock/samsung,exynosautov920.h> 10 #include <dt-bindings/interrupt-controller/arm-gic.h> 11 #include <dt-bindings/soc/samsung,exynos-usi.h> 15 #address-cells = <2>; 16 #size-cells = <1>; 18 interrupt-parent = <&gic>; 31 arm-pmu { 32 compatible = "arm,cortex-a78-pmu"; 37 compatible = "fixed-clock"; [all …]
|
| H A D | exynos8895.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 8 #include <dt-bindings/clock/samsung,exynos8895.h> 9 #include <dt-bindings/interrupt-controller/arm-gic.h> 13 #address-cells = <2>; 14 #size-cells = <1>; 16 interrupt-parent = <&gic>; 30 #address-cells = <1>; 31 #size-cells = <0>; 33 cpu-map { 67 compatible = "samsung,mongoose-m2"; [all …]
|
| H A D | exynosautov9.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <dt-bindings/clock/samsung,exynosautov9.h> 10 #include <dt-bindings/interrupt-controller/arm-gic.h> 11 #include <dt-bindings/soc/samsung,boot-mode.h> 12 #include <dt-bindings/soc/samsung,exynos-usi.h> 16 #address-cells = <2>; 17 #size-cells = <1>; 19 interrupt-parent = <&gic>; 31 arm-pmu { 32 compatible = "arm,cortex-a76-pmu"; [all …]
|
| H A D | exynos7885.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <dt-bindings/clock/exynos7885.h> 10 #include <dt-bindings/interrupt-controller/arm-gic.h> 14 #address-cells = <2>; 15 #size-cells = <1>; 17 interrupt-parent = <&gic>; 26 arm-a53-pmu { 27 compatible = "arm,cortex-a53-pmu"; 34 interrupt-affinity = <&cpu0>, 42 arm-a73-pmu { [all …]
|
| H A D | exynos7870.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <dt-bindings/clock/samsung,exynos7870-cmu.h> 10 #include <dt-bindings/interrupt-controller/arm-gic.h> 14 #address-cells = <2>; 15 #size-cells = <1>; 17 interrupt-parent = <&gic>; 31 #address-cells = <1>; 32 #size-cells = <0>; 34 cpu-map { 68 compatible = "arm,cortex-a53"; [all …]
|
| /linux/drivers/tty/serial/ |
| H A D | samsung_tty.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Ben Dooks, Copyright (c) 2003-2008 Simtec Electronics 12 * UERSTAT register in the UART blocks, and keeps marking some of the 21 * BJD, 04-Nov-2004 28 #include <linux/dma-mapping.h> 48 /* UART name and device definitions */ 77 unsigned int fifosize; member 91 /* uart port features */ 98 const unsigned int fifosize[UART_NR]; member 165 #define portaddr(port, reg) ((port)->membase + (reg)) [all …]
|
| H A D | sccnxp.c | 1 // SPDX-License-Identifier: GPL-2.0+ 24 #include <linux/platform_data/serial-sccnxp.h> 27 #define SCCNXP_NAME "uart-sccnxp" 93 #define MCTRL_IBIT(cfg, sig) ((((cfg) >> (sig)) & 0xf) - LINE_IP0) 94 #define MCTRL_OBIT(cfg, sig) ((((cfg) >> (sig)) & 0xf) - LINE_OP0) 106 unsigned int fifosize; member 112 struct uart_driver uart; member 142 .fifosize = 3, 153 .fifosize = 3, 164 .fifosize = 3, [all …]
|
| H A D | apbuart.c | 1 // SPDX-License-Identifier: GPL-2.0 10 * Copyright (C) 2008 Gilead Kutnick <kutnickg@zin-tech.com> 71 unsigned int max_chars = port->fifosize; in apbuart_rx_chars() 76 while (UART_RX_DATA(status) && (max_chars--)) { in apbuart_rx_chars() 81 port->icount.rx++; in apbuart_rx_chars() 89 port->icount.brk++; in apbuart_rx_chars() 93 port->icount.parity++; in apbuart_rx_chars() 95 port->icount.frame++; in apbuart_rx_chars() 98 port->icount.overrun++; in apbuart_rx_chars() 100 rsr &= port->read_status_mask; in apbuart_rx_chars() [all …]
|
| H A D | bcm63xx_uart.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Serial driver for BCM63xx integrated UART. 37 * - rx fifo full 38 * - rx fifo above threshold 39 * - rx fifo not empty for too long 53 * - tx fifo empty 54 * - tx fifo below threshold 71 * handy uart register accessor 76 return __raw_readl(port->membase + offset); in bcm_uart_readl() 82 __raw_writel(value, port->membase + offset); in bcm_uart_writel() [all …]
|
| H A D | meson_uart.c | 1 // SPDX-License-Identifier: GPL-2.0 102 val = readl(port->membase + AML_UART_STATUS); in meson_uart_tx_empty() 111 val = readl(port->membase + AML_UART_CONTROL); in meson_uart_stop_tx() 113 writel(val, port->membase + AML_UART_CONTROL); in meson_uart_stop_tx() 120 val = readl(port->membase + AML_UART_CONTROL); in meson_uart_stop_rx() 122 writel(val, port->membase + AML_UART_CONTROL); in meson_uart_stop_rx() 130 free_irq(port->irq, port); in meson_uart_shutdown() 134 val = readl(port->membase + AML_UART_CONTROL); in meson_uart_shutdown() 137 writel(val, port->membase + AML_UART_CONTROL); in meson_uart_shutdown() 144 struct tty_port *tport = &port->state->port; in meson_uart_start_tx() [all …]
|
| H A D | tegra-utc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 // NVIDIA Tegra UTC (UART Trace Controller) driver. 69 unsigned int fifosize; member 76 void __iomem *addr = tup->rx_base + offset; in tegra_utc_rx_readl() 83 void __iomem *addr = tup->rx_base + offset; in tegra_utc_rx_writel() 90 void __iomem *addr = tup->tx_base + offset; in tegra_utc_tx_readl() 97 void __iomem *addr = tup->tx_base + offset; in tegra_utc_tx_writel() 104 tup->tx_irqmask = TEGRA_UTC_INTR_REQ; in tegra_utc_enable_tx_irq() 106 tegra_utc_tx_writel(tup, tup->tx_irqmask, TEGRA_UTC_INTR_MASK); in tegra_utc_enable_tx_irq() [all …]
|
| H A D | pch_uart.c | 1 // SPDX-License-Identifier: GPL-2.0 37 /* Set the max number of UART port 243 * struct pch_uart_driver_data - private data structure for UART-DMA 244 * @port_type: The type of UART port 245 * @line_no: UART port line number (0, 1, 2...) 296 struct eg20t_port *priv = file->private_data; in port_show_regs() 306 len += scnprintf(buf + len, PCH_REGS_BUFSIZE - len, in port_show_regs() 307 "PCH EG20T port[%d] regs:\n", priv->port.line); in port_show_regs() 309 len += scnprintf(buf + len, PCH_REGS_BUFSIZE - len, in port_show_regs() 311 len += scnprintf(buf + len, PCH_REGS_BUFSIZE - len, in port_show_regs() [all …]
|
| H A D | amba-pl011.c | 1 // SPDX-License-Identifier: GPL-2.0+ 9 * Copyright (C) 2010 ST-Ericsson SA 11 * This is a generic driver for ARM AMBA-type serial ports. They 12 * have a lot of 16550-like features, but are not register compatible. 35 #include <linux/dma-mapping.h> 82 /* The size of the array - must be last */ 268 unsigned int fifosize; /* vendor-specific */ member 269 unsigned int fixed_baud; /* vendor-set fixed baud rate */ 292 return uap->reg_offset[reg]; in pl011_reg_to_offset() 298 void __iomem *addr = uap->port.membase + pl011_reg_to_offset(uap, reg); in pl011_read() [all …]
|
| H A D | sh-sci-common.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 21 /* Offsets into the sci_port->irqs array */ 35 #define SCI_SR(x) BIT((x) - 1) 36 #define SCI_SR_RANGE(x, y) GENMASK((y) - 1, (x) - 1) 68 unsigned int fifosize; member 160 #define to_sci_port(uart) container_of((uart), struct sci_port, port) argument 168 #define min_sr(_port) ffs((_port)->sampling_rate_mask) 169 #define max_sr(_port) fls((_port)->sampling_rate_mask)
|
| H A D | 21285.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for the serial port on the 21285 StrongArm-110 core logic chip. 19 #include <asm/mach-types.h> 42 static const char serial21285_name[] = "Footbridge UART"; 46 * this, use bits of the private_data pointer of the uart port structure. 53 unsigned long *private_data = (unsigned long *)&port->private_data; in is_enabled() 62 unsigned long *private_data = (unsigned long *)&port->private_data; in enable() 69 unsigned long *private_data = (unsigned long *)&port->private_data; in disable() 84 * BAUD_BASE / baud - 1 88 * int(BAUD_BASE / baud - 0.5) -> [all …]
|
| H A D | milbeaut_usio.c | 1 // SPDX-License-Identifier: GPL-2.0 15 #define USIO_NAME "mlb-usio-uart" 67 writew(readw(port->membase + MLB_USIO_REG_FCR) & ~MLB_USIO_FCR_FTIE, in mlb_usio_stop_tx() 68 port->membase + MLB_USIO_REG_FCR); in mlb_usio_stop_tx() 69 writeb(readb(port->membase + MLB_USIO_REG_SCR) & ~MLB_USIO_SCR_TBIE, in mlb_usio_stop_tx() 70 port->membase + MLB_USIO_REG_SCR); in mlb_usio_stop_tx() 75 struct tty_port *tport = &port->state->port; in mlb_usio_tx_chars() 78 writew(readw(port->membase + MLB_USIO_REG_FCR) & ~MLB_USIO_FCR_FTIE, in mlb_usio_tx_chars() 79 port->membase + MLB_USIO_REG_FCR); in mlb_usio_tx_chars() 80 writeb(readb(port->membase + MLB_USIO_REG_SCR) & in mlb_usio_tx_chars() [all …]
|
| H A D | ar933x_uart.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Atheros AR933X SoC built-in UART driver 31 #include <asm/mach-ath79/ar933x_uart.h> 35 #define DRIVER_NAME "ar933x-uart" 60 return readl(up->port.membase + offset); in ar933x_uart_read() 66 writel(value, up->port.membase + offset); in ar933x_uart_write() 98 up->ier |= AR933X_UART_INT_TX_EMPTY; in ar933x_uart_start_tx_interrupt() 99 ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); in ar933x_uart_start_tx_interrupt() 104 up->ier &= ~AR933X_UART_INT_TX_EMPTY; in ar933x_uart_stop_tx_interrupt() 105 ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); in ar933x_uart_stop_tx_interrupt() [all …]
|
| H A D | liteuart.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2019-2020 Antmicro <www.antmicro.com> 25 * The definitions below are true for LiteX SoC configured for 8-bit CSR Bus, 26 * 32-bit aligned. 73 struct liteuart_port *uart = to_liteuart_port(port); in liteuart_update_irq_reg() local 76 uart->irq_reg |= mask; in liteuart_update_irq_reg() 78 uart->irq_reg &= ~mask; in liteuart_update_irq_reg() 80 if (port->irq) in liteuart_update_irq_reg() 81 litex_write8(port->membase + OFF_EV_ENABLE, uart->irq_reg); in liteuart_update_irq_reg() 96 struct liteuart_port *uart = to_liteuart_port(port); in liteuart_stop_rx() local [all …]
|