/freebsd/sys/dev/uart/ |
H A D | uart_bus_acpi.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 71 for (cd_it = *cd; cd_it->cd_hid != NULL; cd_it++) { in uart_acpi_find_device() 72 if (acpi_MatchHid(h, cd_it->cd_hid)) in uart_acpi_find_device() 85 uint32_t rclk; in uart_acpi_probe() local 89 rclk = 0; in uart_acpi_probe() 95 sc->sc_class = cd->cd_class; in uart_acpi_probe() 96 if (cd->cd_desc != NULL) in uart_acpi_probe() 97 device_set_desc(dev, cd->cd_desc); in uart_acpi_probe() 99 size = device_get_property(dev, "clock-frequency", &rclk, in uart_acpi_probe() [all …]
|
H A D | uart_bus_puc.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 69 uintptr_t rclk, type; in uart_puc_probe() local 79 sc->sc_class = &uart_ns8250_class; in uart_puc_probe() 81 if (BUS_READ_IVAR(parent, dev, PUC_IVAR_CLOCK, &rclk)) in uart_puc_probe() 82 rclk = 0; in uart_puc_probe() 83 return (uart_bus_probe(dev, 0, 0, rclk, 0, 0, 0)); in uart_puc_probe()
|
H A D | uart_cpu_fdt.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2009-2010 The FreeBSD Foundation 63 if (b1->bst != b2->bst) in uart_cpu_eqres() 65 if (pmap_kextract(b1->bsh) == 0) in uart_cpu_eqres() 67 if (pmap_kextract(b2->bsh) == 0) in uart_cpu_eqres() 69 return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); in uart_cpu_eqres() 78 u_int shift, iowidth, rclk; in uart_cpu_getdev() local 87 err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk, in uart_cpu_getdev() 95 di->bas.chan = 0; in uart_cpu_getdev() [all …]
|
H A D | uart_cpu_acpi.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 77 di->bas.chan = 0; in uart_cpu_acpi_init_devinfo() 78 di->bas.rclk = 0; in uart_cpu_acpi_init_devinfo() 79 di->databits = 8; in uart_cpu_acpi_init_devinfo() 80 di->stopbits = 1; in uart_cpu_acpi_init_devinfo() 81 di->parity = UART_PARITY_NONE; in uart_cpu_acpi_init_devinfo() 82 di->ops = uart_getops(class); in uart_cpu_acpi_init_devinfo() 85 switch (addr->SpaceId) { in uart_cpu_acpi_init_devinfo() 87 di->bas.bst = uart_bus_space_mem; in uart_cpu_acpi_init_devinfo() [all …]
|
H A D | uart.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 36 * to access the UART. The rclk field, although not important to actually 44 u_int rclk; member 48 u_int rclk_guess;/* if rclk == 0, use baud + divisor to compute rclk */ 51 #define uart_regofs(bas, reg) ((reg) << (bas)->regshft) 52 #define uart_regiowidth(bas) ((bas)->regiowidth) 62 ret = bus_space_read_8(bas->bst, bas->bsh, uart_regofs(bas, reg)); in uart_getreg() 66 ret = bus_space_read_4(bas->bst, bas->bsh, uart_regofs(bas, reg)); in uart_getreg() 69 ret = bus_space_read_2(bas->bst, bas->bsh, uart_regofs(bas, reg)); in uart_getreg() [all …]
|
H A D | uart_cpu_arm64.c | 1 /*- 72 if (pmap_kextract(b1->bsh) == 0) in uart_cpu_eqres() 74 if (pmap_kextract(b2->bsh) == 0) in uart_cpu_eqres() 76 return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); in uart_cpu_eqres() 85 u_int rclk, shift, iowidth; in uart_cpu_fdt_setup() local 88 err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk, in uart_cpu_fdt_setup() 96 di->bas.chan = 0; in uart_cpu_fdt_setup() 97 di->bas.regshft = shift; in uart_cpu_fdt_setup() 98 di->bas.regiowidth = iowidth; in uart_cpu_fdt_setup() 99 di->baudrate = br; in uart_cpu_fdt_setup() [all …]
|
H A D | uart_dev_msm.c | 1 /*- 50 bus_space_read_4((bas)->bst, (bas)->bsh, (reg)) 52 bus_space_write_4((bas)->bst, (bas)->bsh, (reg), (value)) 57 * Low-level UART interface. 140 bas->regiowidth = 4; in msm_probe() 150 if (bas->rclk == 0) in msm_init() 151 bas->rclk = DEF_CLK; in msm_init() 153 KASSERT(bas->rclk != 0, ("msm_init: Invalid rclk")); in msm_init() 169 * TX watermark value is set to 0 - interrupt is generated when in msm_init() 235 && --limit) in msm_putc() [all …]
|
H A D | uart_dev_ns8250.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 102 while ((inb(stat) & LSR_THRE) == 0 && --limit > 0) in uart_ns8250_early_putc() 160 return (16000000 * divisor / bas->rclk); in ns8250_delay() 161 return (16000 * divisor / (bas->rclk / 1000)); in ns8250_delay() 165 ns8250_divisor(int rclk, int baudrate) in ns8250_divisor() argument 173 divisor = (rclk / (baudrate << 3) + 1) >> 1; in ns8250_divisor() 176 actual_baud = rclk / (divisor << 4); in ns8250_divisor() 179 error = ((actual_baud - baudrate) * 2000 / baudrate + 1) / 2; in ns8250_divisor() 182 if (error < -UART_DEV_TOLERANCE_PCT || error > UART_DEV_TOLERANCE_PCT) in ns8250_divisor() [all …]
|
H A D | uart_core.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 97 device_printf(sc->sc_dev, "PPS capture mode: "); in uart_pps_print_mode() 98 switch(sc->sc_pps_mode & UART_PPS_SIGNAL_MASK) { in uart_pps_print_mode() 112 if (sc->sc_pps_mode & UART_PPS_INVERT_PULSE) in uart_pps_print_mode() 113 printf("-Inverted"); in uart_pps_print_mode() 114 if (sc->sc_pps_mode & UART_PPS_NARROW_PULSE) in uart_pps_print_mode() 115 printf("-NarrowPulse"); in uart_pps_print_mode() 126 tmp = sc->sc_pps_mode; in uart_pps_mode_sysctl() 128 if (err != 0 || req->newptr == NULL) in uart_pps_mode_sysctl() [all …]
|
H A D | uart_dev_pl011.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 145 * FIXME: actual register size is SoC-dependent, we need to handle it 148 bus_space_read_4((bas)->bst, (bas)->bsh, uart_regofs(bas, reg)) 150 bus_space_write_4((bas)->bst, (bas)->bsh, uart_regofs(bas, reg), value) 153 * Low-level UART interface. 220 if (bas->rclk != 0 && baudrate != 0) { in uart_pl011_param() 221 baud = bas->rclk * 4 / baudrate; in uart_pl011_param() 236 * Loader tells us to infer the rclk when it sets xo to 0 in in uart_pl011_param() 238 * baudrate was set by the firmware, so calculate rclk from baudrate and in uart_pl011_param() [all …]
|
H A D | uart_bus_pci.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 73 int rclk; member 92 { 0x103c, 0x1048, 0x103c, 0x1227, "HP Diva Serial [GSP] UART - Powerbar SP2", 100 "ASIX AX99100 PCIe 1/2/3/4-port RS-232/422/485", 0x10 }, 103 { 0x131f, 0x1000, 0xffff, 0, "Siig CyberSerial (1-por [all...] |
H A D | uart_cpu_powerpc.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 49 return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); in uart_cpu_eqres() 59 if (OF_getprop(opts, inputdev, buf, sizeof(buf)) == -1) in ofw_get_uart_console() 62 if (input == -1) in ofw_get_uart_console() 66 if (OF_getprop(opts, outputdev, buf, sizeof(buf)) == -1) in ofw_get_uart_console() 88 if (size == -1) in ofw_get_console_phandle_path() 94 output = -1; in ofw_get_console_phandle_path() 95 if (field.buf[size - 1] == 0) in ofw_get_console_phandle_path() 97 if (output == -1 && size == 4) in ofw_get_console_phandle_path() [all …]
|
H A D | uart_dev_mvebu.c | 1 /*- 61 #define CTRL_TX_HALF_INT (1 << 8) /* TX Half-Full Interrupt Enable */ 62 #define CTRL_RX_HALF_INT (1 << 7) /* RX Half-Full Interrupt Enable */ 127 * Low-level UART interface. 152 uart_mvebu_divisor(int rclk, int baudrate) in uart_mvebu_divisor() argument 159 divisor = (rclk >> 4) / baudrate; in uart_mvebu_divisor() 199 divisor = uart_mvebu_divisor(bas->rclk, baudrate); in uart_mvebu_param() 225 bas->rclk = DEFAULT_RCLK; in uart_mvebu_init() 306 "mvebu-uart", 317 {"marvell,armada-3700-uart", (uintptr_t)&uart_mvebu_class}, [all …]
|
H A D | uart_dev_imx.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 71 * Low-level UART interface. 98 msg, bas->bsh, 129 * don't know what u-boot might have set up. in imx_uart_getbaud() 133 rate = bas->rclk / predivs[i]; in imx_uart_getbaud() 192 * separate pre-divider. We simplify the problem of coming up with a in imx_uart_init() 193 * workable pair of numbers by assuming a pre-divider and numerator of in imx_uart_init() 196 * includes the 16x over-sampling (so a value of 16 means divide by 1); in imx_uart_init() 197 * the register value is the numerator-1, so we have a hard-coded 15. in imx_uart_init() [all …]
|
H A D | uart_subr.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 108 return (-1); in uart_parse_parity() 164 return (-1); in uart_parse_tag() 169 return (-1); in uart_parse_tag() 176 * separated by commas. Each attribute is a tag-value pair with the tag and 225 di->bas.chan = 0; in uart_getenv() 226 di->bas.regshft = 0; in uart_getenv() 227 di->bas.regiowidth = 1; in uart_getenv() 228 di->bas.rclk = 0; in uart_getenv() [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/clock/ |
H A D | qcom,sdx75-gcc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/clock/qcom,sdx75-gcc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Imran Shaik <quic_imrashai@quicinc.com> 11 - Taniya Das <quic_tdas@quicinc.com> 17 See also:: include/dt-bindings/clock/qcom,sdx75-gcc.h 21 const: qcom,sdx75-gcc 25 - description: Board XO source 26 - description: Sleep clock source [all …]
|
H A D | baikal,bt1-ccu-pll.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 4 --- 5 $id: http://devicetree.org/schemas/clock/baikal,bt1-cc [all...] |
/freebsd/sys/dev/scc/ |
H A D | scc_bfe_quicc.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 49 uintptr_t devtype, rclk; in scc_quicc_probe() local 63 sc->sc_class = &scc_quicc_class; in scc_quicc_probe() 64 if (BUS_READ_IVAR(parent, dev, QUICC_IVAR_BRGCLK, &rclk)) in scc_quicc_probe() 65 rclk = 0; in scc_quicc_probe() 66 return (scc_bfe_probe(dev, 0, rclk, 0)); in scc_quicc_probe()
|
H A D | scc_bfe.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2004-2006 Marcel Moolenaar 36 * to access the SCC. The rclk field, although not important to actually 44 u_int rclk; member 48 #define scc_regofs(bas, reg) ((reg) << (bas)->regshft) 51 bus_space_read_1((bas)->bst, (bas)->bsh, scc_regofs(bas, reg)) 53 bus_space_write_1((bas)->bst, (bas)->bsh, scc_regofs(bas, reg), value) 56 bus_space_barrier((bas)->bst, (bas)->bsh, 0, (bas)->range, \ 142 int scc_bfe_probe(device_t dev, u_int regshft, u_int rclk, u_int rid);
|
/freebsd/sys/contrib/device-tree/src/arm64/qcom/ |
H A D | msm8992-pins.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. 14 drive-strength = <16>; 15 bias-disable; 26 drive-strength = <2>; 27 bias-pull-down; 31 /* 0-3 for sdc1 4-6 for sdc2 */ 33 /* SDC1: CLK -> 0, CMD -> 1, DATA -> 2, RCLK -> 3 */ 34 /* SDC2: CLK -> 4, CMD -> 5, DATA -> 6 */ 35 sdc1_clk_on: clk-on { [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/net/ |
H A D | ftgmac100.txt | 4 - compatible: "faraday,ftgmac100" 10 - "aspeed,ast2400-mac" 11 - "aspeed,ast2500-mac" 12 - "aspeed,ast2600-mac" 14 - reg: Address and length of the register set for the device 15 - interrupts: Should contain ethernet controller interrupt 18 - phy-handle: See ethernet.txt file in the same directory. 19 - phy-mode: See ethernet.txt file in the same directory. If the property is 22 - use-ncsi: Use the NC-SI stack instead of an MDIO PHY. Currently assumes 23 rmii (100bT) but kept as a separate property in case NC-SI grows support [all …]
|
/freebsd/sys/contrib/device-tree/src/arm/aspeed/ |
H A D | aspeed-bmc-portwell-neptune.dts | 1 // SPDX-License-Identifier: GPL-2.0 3 /dts-v1/; 5 #include "aspeed-g5.dtsi" 6 #include <dt-bindings/gpio/aspeed-gpio.h> 10 compatible = "portwell,neptune-bmc", "aspeed,ast2500"; 16 stdout-path = &uart5; 25 compatible = "gpio-leds"; 29 default-state = "on"; 34 linux,default-trigger = "heartbeat"; 40 // postcode3-7 are GPIOH3-H7 [all …]
|
/freebsd/sys/riscv/sifive/ |
H A D | sifive_uart.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 91 bas->regiowidth = 4; in sfuart_probe() 141 * when using the low-level console function, and read the interrupt in sfuart_rxready() 172 error = sfuart_probe(&sc->sc_bas); in sfuart_bus_probe() 176 sc->sc_rxfifosz = SFUART_RX_FIFO_DEPTH; in sfuart_bus_probe() 177 sc->sc_txfifosz = SFUART_TX_FIFO_DEPTH; in sfuart_bus_probe() 178 sc->sc_hwiflow = 0; in sfuart_bus_probe() 179 sc->sc_hwoflow = 0; in sfuart_bus_probe() 181 device_set_desc(sc->sc_dev, "SiFive UART"); in sfuart_bus_probe() [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/mmc/ |
H A D | sdhci-msm.txt | 1 * Qualcomm SDHCI controller (sdhci-msm) 4 and the properties used by the sdhci-msm driver. 7 - compatible: Should contain a SoC-specific string and a IP version string: 9 "qcom,sdhci-msm-v4" for sdcc versions less than 5.0 10 "qcom,sdhci-msm-v5" for sdcc version 5.0 13 string is added to support this change - "qcom,sdhci-msm-v5". 15 "qcom,apq8084-sdhci", "qcom,sdhci-msm-v4" 16 "qcom,msm8226-sdhci", "qcom,sdhci-msm-v4" 17 "qcom,msm8953-sdhci", "qcom,sdhci-msm-v4" 18 "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4" [all …]
|
H A D | sdhci-msm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mmc/sdhci-msm.yaml# 5 $schema: http://devicetree.org/meta-schema [all...] |