|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, 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 ...
|
| #
fb1d9b7f |
| 12-Jan-2017 |
Bruce M Simpson <[email protected]> |
Allow uart(4) to use MSI interrupts on single-port PCI instances.
Do this here as puc(4) disallows single-port instances; at least one multi-port PCIe UART chip (in this case, the ASIX MCS9922) pres
Allow uart(4) to use MSI interrupts on single-port PCI instances.
Do this here as puc(4) disallows single-port instances; at least one multi-port PCIe UART chip (in this case, the ASIX MCS9922) present separate PCI configuration space (functions) for each UART.
Tested using lrzsz and a null-modem cable. The ExpressCard/34 variants containing the MCS9922 should also use MSI with this change.
Reviewed by: jhb, imp, rpokala MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9123
show more ...
|
| #
5515b0cb |
| 17-Nov-2016 |
Ruslan Bukin <[email protected]> |
Do not reallocate driver softc for uart unnecessarily.
Do not assume that all uart drivers use uart_softc structure as is. Some do a sensible thing and do declare their uart class and driver properl
Do not reallocate driver softc for uart unnecessarily.
Do not assume that all uart drivers use uart_softc structure as is. Some do a sensible thing and do declare their uart class and driver properly and arrive into uart_bus_attach with suitably sized softc.
Submitted by: kan Sponsored by: DARPA, AFRL
show more ...
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
7bd8311d |
| 28-Aug-2016 |
Justin Hibbits <[email protected]> |
Fix UART PPS capture mode printing
* Add breaks to prevent fallthrough and printing of multiple modes. * Only check the mode, mask out all other bits.
|
|
Revision tags: 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 |
|
| #
9def69ec |
| 12-Aug-2015 |
Marcel Moolenaar <[email protected]> |
Use bus_alloc_resource_any(), rather than bus_alloc_resource() with start 0 and end ~0. This avoids confusion WRT to what the value of length can or should be.
|
| #
dc4aaf6d |
| 11-Aug-2015 |
Ian Lepore <[email protected]> |
Style fix, no functional changes -- do the braces for switches correctly.
|
| #
fac6a198 |
| 10-Aug-2015 |
Ian Lepore <[email protected]> |
Correct the polarity of the PPS assert and clear events with respect to the electrical signals on the serial port. Virtually all devices which output a PPS signal generate a brief higher-voltage pul
Correct the polarity of the PPS assert and clear events with respect to the electrical signals on the serial port. Virtually all devices which output a PPS signal generate a brief higher-voltage pulse, the leading edge of which is the on-time point.
Both DCD and CTS are active-low signals on the wire, meaning the assertion of their status bits in the modem status register corresponds to the lower voltage level on the wire. So when the status bit transitions to not-set, create a PPS assert event; when the status bit transitions to set, create a PPS clear event.
show more ...
|
| #
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 ...
|
| #
62145ff3 |
| 16-Jul-2015 |
Neel Natu <[email protected]> |
If uart interrupts are not functioning then schedule the callout to do the polling at device attach time [1].
Add tunables 'debug.uart_force_poll' and 'debug.uart_poll_freq' to control uart polling.
If uart interrupts are not functioning then schedule the callout to do the polling at device attach time [1].
Add tunables 'debug.uart_force_poll' and 'debug.uart_poll_freq' to control uart polling.
Submitted by: Aleksey Kuleshov ([email protected]) [1]
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 |
|
| #
5dceed8a |
| 08-Mar-2014 |
Warner Losh <[email protected]> |
Back out r262921. I don't know what I was thinking, but it is lame.
|
| #
803253c8 |
| 08-Mar-2014 |
Warner Losh <[email protected]> |
Set the baud rate if it isn't 0 (meaning it has been specified) not only if it is 0 (meaning that it hasn't been specified and is likely to turn off the UART's transmitter).
|
| #
13827712 |
| 20-Jan-2014 |
Warner Losh <[email protected]> |
Don't lock in the generic grab just to lock again in the specific grabs. (I committed the wrong version of uart_core.c, which still had this).
Pointy hat: imp
|
| #
d76a1ef4 |
| 19-Jan-2014 |
Warner Losh <[email protected]> |
Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This mak
Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things.
Should have been part of r260889, but waasn't due to command line typo.
Reviewed by: bde (with reservations)
show more ...
|
|
Revision tags: release/10.0.0, release/9.2.0 |
|
| #
1662b008 |
| 19-Aug-2013 |
Ian Lepore <[email protected]> |
Allow UART_POLL_FREQ to be set as a kernel option as well as via tunable (the code was already set up for this, just needs to be in conf/options).
Also, if reporting that polling is being used, repo
Allow UART_POLL_FREQ to be set as a kernel option as well as via tunable (the code was already set up for this, just needs to be in conf/options).
Also, if reporting that polling is being used, report the frequency too.
show more ...
|
| #
eead2d55 |
| 10-Jul-2013 |
Marcel Moolenaar <[email protected]> |
Protect against broken hardware. In this particular case, protect against H/W not de-asserting the interrupt at all. On x86, and because of the following conditions, this results in a hard hang with
Protect against broken hardware. In this particular case, protect against H/W not de-asserting the interrupt at all. On x86, and because of the following conditions, this results in a hard hang with interrupts disabled: 1. The uart(4) driver uses a spin lock to protect against concurrent access to the H/W. Spin locks disable and restore interrupts. 2. Restoring the interrupt on x86 always writes the flags register. Even if we're restoring the interrupt from disabled to disabled. 3. The x86 CPU has a short window in which interrupts are enabled when the flags register is written. 4. The uart(4) driver registers a fast interrupt by default.
To catch this case, we first try to clear any pending H/W interrupts and in particular, before setting up the interrupt. This makes sure the interrupt is masked on the PIC. The interrupt handler now has a limit set on the number of iterations it'll go through to clear interrupt conditions. If the limit is hit, the handler will return FILTER_SCHEDULE_THREAD. The attach function will check for this return code and avoid setting up the interrupt and foce polling in that case.
Obtained from: Juniper Networks, Inc.
show more ...
|
|
Revision tags: release/8.4.0 |
|
| #
a164074f |
| 12-May-2013 |
Eitan Adler <[email protected]> |
Fix several typos
PR: kern/176054 Submitted by: Christoph Mallon <[email protected]> MFC after: 3 days
|
| #
3ad36a41 |
| 31-Mar-2013 |
Ian Lepore <[email protected]> |
Accommodate uart devices with large FIFOs (or DMA buffers which amount to the same thing) by allocating the uart(4) rx buffer based on the device's rxfifosz rather than using a hard-coded size of 384
Accommodate uart devices with large FIFOs (or DMA buffers which amount to the same thing) by allocating the uart(4) rx buffer based on the device's rxfifosz rather than using a hard-coded size of 384 bytes.
The historical 384 byte size is 3 times the largest hard-coded fifo size in the tree, so use that ratio as a guide and allocate the buffer as three times rxfifosz, but never smaller than the historical size.
show more ...
|
| #
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 ...
|