|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
| #
92182fab |
| 28-May-2019 |
Colin Percival <[email protected]> |
MFC r345405,345406,346228,346657,348195,348198: UART SPCR fixes.
r345405: Obey SPCR AccessWidth parameter. r345406: Initialize uart_bus_space_mem on arm64. r346228: Add quirk to ignore AccessWidth o
MFC r345405,345406,346228,346657,348195,348198: UART SPCR fixes.
r345405: Obey SPCR AccessWidth parameter. r345406: Initialize uart_bus_space_mem on arm64. r346228: Add quirk to ignore AccessWidth on PL011 UART. r346657: Handle SPCR BaudRate = 0. r348195: Extract arm64 SPCR code and make it MI; use on x86 too. r348198: Fix for r348195.
This unbreaks the console on EC2 a1.* and *.metal instances.
Sponsored by: https://www.patreon.com/cperciva
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
381388b9 |
| 19-Aug-2018 |
Matt Macy <[email protected]> |
add snps IP uart support / genaralize UART
This is an amalgam of a patch by Doug Ambrisko to generalize uart_acpi_find_device, imp moving the ACPI table to uart_dev_ns8250.c and advice by jhb to wor
add snps IP uart support / genaralize UART
This is an amalgam of a patch by Doug Ambrisko to generalize uart_acpi_find_device, imp moving the ACPI table to uart_dev_ns8250.c and advice by jhb to work around a bug in the EPYC 3151 BIOS (the BIOS incorrectly marks the serial ports as disabled)
Reviewed by: imp MFC after: 8 weeks Differential Revision: https://reviews.freebsd.org/D16432
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
c214a270 |
| 27-Feb-2017 |
Ruslan Bukin <[email protected]> |
Allow setting access-width for UART registers.
This is required for FDT's standard "reg-io-width" property (similar to "reg-shift" property) found in many DTS files.
This fixes operation on Altera
Allow setting access-width for UART registers.
This is required for FDT's standard "reg-io-width" property (similar to "reg-shift" property) found in many DTS files.
This fixes operation on Altera Arria 10 SOC Development Kit, where standard ns8250 uart allows 4-byte access only.
Reviewed by: kan, marcel Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9785
show more ...
|
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
| #
fdfbb3f5 |
| 12-Jan-2016 |
Ian Lepore <[email protected]> |
Restore uart PPS signal capture polarity to its historical norm, and add an option to invert the polarity in software. Also add an option to capture very narrow pulses by using the hardware's MSR del
Restore uart PPS signal capture polarity to its historical norm, and add an option to invert the polarity in software. Also add an option to capture very narrow pulses by using the hardware's MSR delta-bit capability of latching line state changes.
This effectively reverts the mistake I made in r286595 which was based on empirical measurements made on hardware using TTL-level signaling, in which the logic levels are inverted from RS-232. Thus, this re-syncs the polarity with the requirements of RFC 2783, which is writen in terms of RS-232 signaling.
Narrow-pulse mode uses the ability of most ns8250 and similar chips to provide a delta indication in the modem status register. The hardware is able to notice and latch the change when the pulse width is shorter than interrupt latency, which results in the signal no longer being asserted by time the interrupt service code runs. When running in this mode we get notified only that "a pulse happened" so the driver synthesizes both an ASSERT and a CLEAR event (with the same timestamp for each). When the pulse width is about equal to the interrupt latency the driver may intermittantly see both edges of the pulse. To prevent generating spurious events, the driver implements a half-second lockout period after generating an event before it will generate another.
Differential Revision: https://reviews.freebsd.org/D4477
show more ...
|
|
Revision tags: release/10.2.0 |
|
| #
196d3019 |
| 10-Aug-2015 |
Ian Lepore <[email protected]> |
Allow the choice of PPS signal captured by uart(4) to be runtime-configured, eliminating the need to build a custom kernel to use the CTS signal.
The historical UART_PPS_ON_CTS kernel option is stil
Allow the choice of PPS signal captured by uart(4) to be runtime-configured, eliminating the need to build a custom kernel to use the CTS signal.
The historical UART_PPS_ON_CTS kernel option is still honored, but now it can be overridden at runtime using a tunable to configure all uart devices (hw.uart.pps_mode) or specific devices (dev.uart.#.pps_mode). The per- device config is both a tunable and a writable sysctl.
This syncs the PPS capabilities of uart(4) with the enhancements recently recently added to ucom(4) for capturing from USB serial devices.
Relnotes: yes
show more ...
|
| #
b59236ce |
| 08-Aug-2015 |
Ian Lepore <[email protected]> |
Provide the tty-layer mutex when initializing the pps api. This allows time_pps_fetch() to be used in blocking mode.
Also, don't init the pps api for system devices (consoles) that provide a custom
Provide the tty-layer mutex when initializing the pps api. This allows time_pps_fetch() to be used in blocking mode.
Also, don't init the pps api for system devices (consoles) that provide a custom attach routine. The device may actually be a keyboard or other non- tty device. If it wants to do pps processing (unlikely) it must handle everything for itself. (In reality, only a sun keyboard uses a custom attach routine, and it doesn't make a good pps device.)
show more ...
|
| #
86fb5400 |
| 24-Jul-2015 |
Marius Strobl <[email protected]> |
- Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signaling uart_bus_attach() during its test that 20 iterations weren't sufficient for clearing all pending interrupts, assuming this
- Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signaling uart_bus_attach() during its test that 20 iterations weren't sufficient for clearing all pending interrupts, assuming this means that hardware is broken and doesn't deassert interrupts. However, under pressure, 20 iterations also can be insufficient for clearing all pending interrupts, leading to a panic as intr_event_handle() tries to schedule an interrupt handler not registered. Solve this by introducing a flag that is set in test mode and otherwise restores pre-r253161 behavior of uart_intr(). The approach of additionally registering uart_intr() as handler as suggested in PR 194979 is not taken as that in turn would abuse special pccard and pccbb handling code of intr_event_handle(). [1] - Const'ify uart_driver_name. - Fix some minor style bugs.
PR: 194979 [1] Reviewed by: marcel (earlier version) MFC after: 3 days
show more ...
|
| #
405ada37 |
| 11-Apr-2015 |
Andrew Turner <[email protected]> |
Add support for the uart classes to set their default register shift value. This is needed with the pl011 driver. Before this change it would default to a shift of 0, however the hardware places the
Add support for the uart classes to set their default register shift value. This is needed with the pl011 driver. Before this change it would default to a shift of 0, however the hardware places the registers at 4-byte addresses meaning the value should be 2.
This patch fixes this for the pl011 when configured using the fdt. The other drivers have a default value of 0 to keep this a no-op.
MFC after: 1 week
show more ...
|
|
Revision tags: release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0 |
|
| #
5b23b1b9 |
| 02-Feb-2013 |
Andriy Gapon <[email protected]> |
uart: add resume method and enable it for attachments on the most common x86 buses
Otherwise the uart hardware could be in such a state after the resume where IER is cleared and thus no interrupts a
uart: add resume method and enable it for attachments on the most common x86 buses
Otherwise the uart hardware could be in such a state after the resume where IER is cleared and thus no interrupts are generated.
This behavior is observed and tested with QEMU, so I am comitting this change to help with my debugging. There has been no feedback from users of serial ports on real hardware.
MFC after: 20 days
show more ...
|
|
Revision tags: release/9.1.0, release/8.3.0, release/7.4.0, release/8.2.0, release/8.1.0, release/7.3.0, release/8.0.0 |
|
| #
87963202 |
| 10-Oct-2009 |
Marcel Moolenaar <[email protected]> |
MFC change 197721: Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTY interface is fairly simple WRT dealing with flow control, but needed 2 new RX buffer functions with "get-char-fro
MFC change 197721: Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTY interface is fairly simple WRT dealing with flow control, but needed 2 new RX buffer functions with "get-char-from-buf" separated from "advance-buf-pointer" so that the pointer could be advanced only when ttydisc_rint() succeeded.
Approved by: re (kib)
show more ...
|
| #
332cda07 |
| 12-Apr-2012 |
Peter Grehan <[email protected]> |
Complete polled-mode operation by using a callout if the device will be used in polled-mode. The callout invokes uart_intr, which rearms the timeout. Implemented for bhyve, but generically useful for
Complete polled-mode operation by using a callout if the device will be used in polled-mode. The callout invokes uart_intr, which rearms the timeout. Implemented for bhyve, but generically useful for e.g. embedded bringup when the interrupt controller hasn't been setup, or if it's not deemed worthy to wire an interrupt line from a serial port.
Submitted by: neel Reviewed by: marcel Obtained from: NetApp MFC after: 3 weeks
show more ...
|
| #
0acb3c4a |
| 02-Oct-2009 |
Marcel Moolenaar <[email protected]> |
Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTY interface is fairly simple WRT dealing with flow control, but needed 2 new RX buffer functions with "get-char-from-buf" separated fro
Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTY interface is fairly simple WRT dealing with flow control, but needed 2 new RX buffer functions with "get-char-from-buf" separated from "advance-buf-pointer" so that the pointer could be advanced only when ttydisc_rint() succeeded.
MFC after: 1 week
show more ...
|
|
Revision tags: release/7.2.0, release/7.1.0, release/6.4.0, release/7.0.0, release/6.3.0 |
|
| #
f8100ce2 |
| 02-Apr-2007 |
Marcel Moolenaar <[email protected]> |
Don't expose the uart_ops structure directly, but instead have it obtained through the uart_class structure. This allows us to declare the uart_class structure as weak and as such allows us to refere
Don't expose the uart_ops structure directly, but instead have it obtained through the uart_class structure. This allows us to declare the uart_class structure as weak and as such allows us to reference it even when it's not compiled-in. It also allows is to get the uart_ops structure by name, which makes it possible to implement the dt tag handling in uart_getenv(). The side-effect of all this is that we're using the uart_class structure more consistently which means that we now also have access to the size of the bus space block needed by the hardware when we map the bus space, eliminating any hardcoding.
show more ...
|
|
Revision tags: release/6.2.0, release/5.5.0, release/6.1.0 |
|
| #
a31f91a0 |
| 28-Apr-2006 |
Marcel Moolenaar <[email protected]> |
Implement the ipend() method of the serdev I/F.
|
| #
8d1289fe |
| 02-Apr-2006 |
Marcel Moolenaar <[email protected]> |
Eliminate the sc_hasfifo flag from the softc. It was only used by the NS8250 class driver. The UART has FIFOs if sc_rxfifosz>1, so test for that instead. While here properly initialize sc_rxfifosz an
Eliminate the sc_hasfifo flag from the softc. It was only used by the NS8250 class driver. The UART has FIFOs if sc_rxfifosz>1, so test for that instead. While here properly initialize sc_rxfifosz and sc_txfifosz in the case the UART doesn't have FIFOs.
show more ...
|
| #
8af03381 |
| 30-Mar-2006 |
Marcel Moolenaar <[email protected]> |
Add support for scc(4).
|
| #
ea549414 |
| 24-Feb-2006 |
Marcel Moolenaar <[email protected]> |
Replace our local UART_SIGMASK_* with the global SER_MASK_*.
|
| #
2d511805 |
| 24-Feb-2006 |
Marcel Moolenaar <[email protected]> |
MFp4: Stop using our local UART_IPEND_* and instead use the global SER_INT_* as defined in <sys/serial.h>.
|
|
Revision tags: release/6.0.0, release/5.4.0, release/4.11.0 |
|
| #
098ca2bd |
| 06-Jan-2005 |
Warner Losh <[email protected]> |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
| #
54e2bcc7 |
| 14-Nov-2004 |
Marcel Moolenaar <[email protected]> |
Add UART_IOCTL_BAUD to allow us to query the hardware about the current baudrate setting. Use this ioctl() when we don't know the baudrate of the sysdev (as represented by a 0 value). When the ioctl(
Add UART_IOCTL_BAUD to allow us to query the hardware about the current baudrate setting. Use this ioctl() when we don't know the baudrate of the sysdev (as represented by a 0 value). When the ioctl() fails, e.g. when the backend hasn't implemented it or the hardware doesn't provide the means to determine its current baudrate setting, we invalidate the baudrate setting by setting it to -1. None of the backends currently implement the new ioctl().
show more ...
|
|
Revision tags: release/5.3.0 |
|
| #
79a8d927 |
| 12-Oct-2004 |
Poul-Henning Kamp <[email protected]> |
Use generic tty code instead of (comparatively little) local copies.
|
| #
28710806 |
| 24-Jun-2004 |
Poul-Henning Kamp <[email protected]> |
Use the new serial port definitions for modemsignals.
|
| #
89c9c53d |
| 16-Jun-2004 |
Poul-Henning Kamp <[email protected]> |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
|
Revision tags: release/4.10.0, release/5.2.1, release/5.2.0, release/4.9.0 |
|
| #
875f70db |
| 26-Sep-2003 |
Marcel Moolenaar <[email protected]> |
Revert the introduction of iobase in struct uart_bas. Both the SAB82532 and the Z8530 drivers used the I/O address as a quick and dirty way to determine which channel they operated on, but formalizin
Revert the introduction of iobase in struct uart_bas. Both the SAB82532 and the Z8530 drivers used the I/O address as a quick and dirty way to determine which channel they operated on, but formalizing this by introducing iobase is not a solution. How for example would a driver know which channel it controls for a multi-channel UART that only has a single I/O range?
Instead, add an explicit field, called chan, to struct uart_bas that holds the channel within a device, or 0 otherwise. The chan field is initialized both by the system device probing (i.e. a system console) or it is passed down to uart_bus_probe() by any of the bus front-ends. As such, it impacts all platforms and bus drivers and makes it a rather large commit.
Remove the use of iobase in uart_cpu_eqres() for pc98. It is expected that platforms have the capability to compare tag and handle pairs for equality; as to determine whether two pairs access the same device or not. The use of iobase for pc98 makes it impossible to formalize this and turn it into a real newbus function later. This commit reverts uart_cpu_eqres() for pc98 to an unimplemented function. It has to be reimplemented using only the tag and handle fields in struct uart_bas.
Rewrite the SAB82532 and Z8530 drivers to use the chan field in struct uart_bas. Remove the IS_CHANNEL_A and IS_CHANNEL_B macros. We don't need to abstract anything anymore.
Discussed with: nyan Tested on: i386, ia64, sparc64
show more ...
|