summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart
Commit message (Collapse)AuthorAgeFilesLines
...
* Accommodate uart devices with large FIFOs (or DMA buffers which amountian2013-03-311-1/+7
| | | | | | | | | 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.
* Integrate Efika MX project back to home.ray2013-03-204-0/+663
| | | | Sponsored by: The FreeBSD Foundation
* Add support for A10 uart.ganbold2013-03-011-5/+38
| | | | | | | | | | | | A10 uart is derived from Synopsys DesignWare uart and requires to read Uart Status Register when IIR_BUSY has detected. Also this change includes FDT check, where it checks device specific properties defined in dts and sets the busy_detect variable. broken_txfifo is also needed to be set in order to make it work for A10 uart case. Reviewed by: marcel@ Approved by: gonzo@
* - Make pci_ns8250_ids[] const.marius2013-02-031-6/+6
| | | | | | | - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. MFC after: 1 week
* uart: add resume method and enable it for attachments on the most commonavg2013-02-025-0/+13
| | | | | | | | | | | | | 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
* Add a loader tunable "hw.broken_txfifo" which enables a workaround for acperciva2013-01-271-1/+13
| | | | | | | | | | bug in old versions of QEMU (and Xen, and other places using QEMU code). On those buggy emulated UARTs, the "TX idle" interrupt gets lost; with this workaround, we spinwait for the TX to happen and then send ourselves the interrupt. It's ugly but it works, while minimizing the impact on the code for the !broken_txfifo case. MFC after: 2 weeks
* Prevent possible usage of uninitialized pbase variable by checkinggonzo2012-12-131-1/+3
| | | | return value of fdt_get_range
* Add support for CIR1000 - Cirrus Logic V34 to the uart drivereadler2012-11-131-0/+1
| | | | | Approved by: cperciva (implicit) MFC after: 1 week
* Add support for a few more devices:eadler2012-11-041-0/+4
| | | | | | | | | | PNP0510 and FUJ02E5 for a "Wacom Tablet at FuS Lifebook T" PNP0502 and PNP0511 for some other generic devices. PR: kern/173357 Submitted by: Andrey Zakharchenko <avz@jscc.ru> Approved by: cperciva (implicit) MFC after: 1 week
* Separate interrupts enable/disable logic from setting port parameters.gonzo2012-10-301-6/+13
| | | | | Otherwise setting baud rate in TTY mode effectively disables TX/RX interrupts and renders port unusable.
* Add PrimeCell UART (PL011) drivergonzo2012-08-303-0/+441
| | | | Obtained from: Semihalf
* Merging of projects/armv6, part 8gonzo2012-08-154-5/+903
| | | | | | | | | | | | | | | | | | | | r235162: Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250 board. Peripherals currently supported: - Serial ports - Interrupt controller - Timers - Ethernet - USB host - Framebuffer (in conjunction with SSD1289 LCD controller) - RTC - SPI - GPIO Submitted by: Jakub Wojciech Klama <jceel@freebsd.org>
* Merging of projects/armv6, part 4gonzo2012-08-151-2/+4
| | | | | | | | | | | | | | | | | r233822: Remove useless and wrong piece of code in fdt_get_range() which i overwrites passed phandle_t node. Modify debug printf in fdt_reg_to_rl() to be consistent (that is, print start and end *virtual* addresses). r230560: Handle "ranges;" Make fdt_reg_to_rl() responsible for mapping the device memory, instead on just hoping that there's only one simplebus, and using fdt_immr_va as the base VA. r230315 Add a function to get the PA from range, instead of (ab)using fdt_immr_pa, and use it for the UART driver
* Complete polled-mode operation by using a callout if the device will begrehan2012-04-123-1/+16
| | | | | | | | | | | | 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
* uart_cpu_amd64.c and uart_cpu_i386.c (under sys/dev/uart) aremarcel2012-04-112-107/+0
| | | | | | | | identical now that the bus spaces are unified under sys/x86. Replace them with a single uart_cpu_x86.c. o delete uart_cpu_i386.c o move uart_cpu_amd64.c to uart_cpu_x86.c o update files.amd64 and files.i386 accordingly.
* Add PCI Id for the AMT SOL UART on G4x series Intel chipsets.kib2012-03-141-0/+1
| | | | | Submitted by: admin zahost ru MFC after: 3 days
* Add support for the MosChip MCS9904 four serial portsremko2012-03-071-0/+2
| | | | | | | | controller. PR: 165804 Submitted by: Eugene Grosbein MFC after: 1 week
* Add support for Sony Ericsson GC89 EDGE/Wirelles LAN PC Cardeadler2012-01-191-0/+1
| | | | | | | | PR: kern/131933 Submitted by: Alex Keda <admin@lissyara.su> Approved by: jhb Approved by: cperciva (mentor, blanket for pre-mentorship already-approved commits) MFC after: 1 week
* Add PCI Id for the AMT SOL UART on 5 series Intel chipsets.kib2012-01-111-0/+2
| | | | MFC after: 1 week
* Add support for Intel EG20T serial portskevlo2012-01-031-0/+4
|
* Use strchr() and strrchr().ed2012-01-021-1/+1
| | | | | | | | It seems strchr() and strrchr() are used more often than index() and rindex(). Therefore, simply migrate all kernel code to use it. For the XFS code, remove an empty line to make the code identical to the code in the Linux kernel.
* Actually set the baudrate from the FDT.marcel2011-12-301-1/+1
|
* Add PCI Id for the Intel AMT serial interface as found on my DQ67OW.kib2011-12-291-0/+1
| | | | MFC after: 1 week
* kern cons: introduce infrastructure for console grabbing by kernelavg2011-12-171-0/+12
| | | | | | | | | | | | At the moment grab and ungrab methods of all console drivers are no-ops. Current intended meaning of the calls is that the kernel takes control of console input. In the future the semantics may be extended to mean that the calling thread takes full ownership of the console (e.g. console output from other threads could be suspended). Inspired by: bde MFC after: 2 months
* Replace __const by const in all non-contributed source code.ed2011-12-131-6/+6
| | | | | | As C1X is close to being released, there is no need to wrap around a feature that is already part of C90. Most of these files already use `const' in different placed as well.
* Fix OF_finddevice error return value in case of FDT.jchandra2011-12-021-2/+2
| | | | | | | | | | | | | | | | | | | According to the open firmware standard, finddevice call has to return a phandle with value of -1 in case of error. This commit is to: - Fix the FDT implementation of this interface (ofw_fdt_finddevice) to return (phandle_t)-1 in case of error, instead of 0 as it does now. - Fix up the callers of OF_finddevice() to compare the return value with -1 instead of 0 to check for errors. - Since phandle_t is unsigned, the return value of OF_finddevice should be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases as well. Reported by: nwhitehorn Reviewed by: raj Approved by: raj, nwhitehorn
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+1
| | | | This means that their use is restricted to a single C file.
* Disable the TX ready interrupts once we received one, some UART won't clearcognet2011-11-021-2/+5
| | | | | | the IIR_TXRDY bit upon reading. Reviewed by: marcel
* Follow up to r225203 refining break-to-debugger run-time configurationrwatson2011-08-271-4/+0
| | | | | | | | | | | | improvements: (1) Implement new model in previously missed at91 UART driver (2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h to opt_kdb.h (spotted by np) (3) Garbage collect now-unused opt_comconsole.h MFC after: 3 weeks Approved by: re (bz)
* Attempt to make break-to-debugger and alternative break-to-debugger morerwatson2011-08-261-21/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accessible: (1) Always compile in support for breaking into the debugger if options KDB is present in the kernel. (2) Disable both by default, but allow them to be enabled via tunables and sysctls debug.kdb.break_to_debugger and debug.kdb.alt_break_to_debugger. (3) options BREAK_TO_DEBUGGER and options ALT_BREAK_TO_DEBUGGER continue to behave as before -- only now instead of compiling in break-to-debugger support, they change the default values of the above sysctls to enable those features by default. Current kernel configurations should, therefore, continue to behave as expected. (4) Migrate alternative break-to-debugger state machine logic out of individual device drivers into centralised KDB code. This has a number of upsides, but also one downside: it's now tricky to release sio spin locks when entering the debugger, so we don't. However, similar logic does not exist in other device drivers, including uart. (5) dcons requires some special handling; unlike other console types, it allows overriding KDB's own debugger selection, so we need a new interface to KDB to allow that to work. GENERIC kernels in -CURRENT will now support break-to-debugger as long as appropriate boot/run-time options are set, which should improve the debuggability of BETA kernels significantly. MFC after: 3 weeks Reviewed by: kib, nwhitehorn Approved by: re (bz)
* Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.ed2011-07-171-0/+1
| | | | | | | | | Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls to support wide characters. I created a patch to add ABI compatibility for the old calls, but I didn't get any feedback to that. It seems now people are upgrading from 8 to 9 they experience this issue, so add it anyway.
* Add device ID for the Davicom 56PDV PCI Modem.jhb2011-07-081-0/+1
| | | | | | PR: kern/75132 Submitted by: Mike Tancsa @ Sentex (older patch against puc(4)) MFC after: 1 week
* Add support for a MosChip PCI express serial port adapter.hselasky2011-06-291-0/+2
| | | | MFC after: 1 week
* Ignore MCR[6] during the probe to fix a false negative. Bit 6 of themarcel2011-05-261-1/+7
| | | | | | | | | | MCR register on the Sunix Sun1699 chip tends to be set but doesn't seem to have a function. That is, FreeBSD just works (provided the correct RCLK is used) regardless. PR: kern/129663 Diagnostics: Eygene Ryabinkin <rea-fbsd at codelabs.ru> MFC after: 3 days
* Recognize the SAB 82532 found in Fujitsu PRIMEPOWER650 and 900.marius2011-05-151-1/+2
|
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* In uart_tty_outwakeup(), check CTS/RTS flow control settings andmarcel2011-01-241-5/+10
| | | | | | | | | | | prevent sending data when CTS is de-asserted. In uart_tty_intr(), call uart_tty_outwakeup() when the CTS signal changed, knowing that uart_tty_outwakeup() will do the right thing for flow control. This avoids redundant conditionals. PR: kern/148644 Submitted by: John Wehle <john@feith.com> MFC after: 3 days
* Check the environment for system devices before using the FDT.marcel2011-01-171-8/+11
| | | | | This allows overriding the FDT, and allows specifying a debug port.
* Merge amd64 and i386 bus.h and move the resulting header to x86. Replacetijl2010-12-203-6/+6
| | | | | | | | | the original amd64 and i386 headers with stubs. Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere. Reviewed by: imp (previous version), jhb Approved by: kib (mentor)
* Fix typos.brucec2010-11-091-2/+2
| | | | | PR: bin/148894 Submitted by: olgeni
* Eliminate FDT_IMMR_VA define.raj2010-07-191-1/+1
| | | | | This removes platform dependencies from <machine>/fdt.h for the benfit of portability.
* Convert Freescale PowerPC platforms to FDT convention.raj2010-07-112-120/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The following systems are affected: - MPC8555CDS - MPC8572DS This overhaul covers the following major changes: - All integrated peripherals drivers for Freescale MPC85XX SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC, QUICC, UART, CFI. - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire ocpbus(4) driver, which was based on hard-coded config data. Note that world for these platforms has to be built WITH_FDT. Reviewed by: imp Sponsored by: The FreeBSD Foundation
* Convert Marvell ARM platforms to FDT convention.raj2010-06-132-173/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The following systems are involved: - DB-88F5182 - DB-88F5281 - DB-88F6281 - DB-78100 - SheevaPlug This overhaul covers the following major changes: - All integrated peripherals drivers for Marvell ARM SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say good by to obio / mbus drivers and numerous hard-coded config data. Note that world needs to be built WITH_FDT for the affected platforms. Reviewed by: imp Sponsored by: The FreeBSD Foundation.
* FDT (simplebus) compatible attachment for uart(4).raj2010-06-021-0/+200
| | | | | | | | This will be a single uart(4) attachment code shared by all FDT-enabled platforms. Reviewed by: imp Sponsored by: The FreeBSD Foundation
* Remove redundant checking of sc_leaving (uart_intr() already handles this).marius2010-05-021-1/+1
| | | | Approved by: marcel
* Add sbbc(4), a driver for the BootBus controller found in Serengeti andmarius2010-04-102-0/+12
| | | | | | | | | | StarCat systems which provides time-of-day services for both as well as console service for Serengeti, i.e. Sun Fire V1280. While the latter is described with a device type of serial in the OFW device tree, it isn't actually an UART. Nevertheless the console service is handled by uart(4) as this allowed to re-use quite a bit of MD and MI code. Actually, this idea is stolen from Linux which interfaces the sun4v hypervisor console with the Linux counterpart of uart(4).
* Add PCI ID for MCS9901.delphij2010-03-011-0/+2
| | | | | | Submitted by: gcooper PR: kern/144397 MFC after: 1 month
* Recognize the NS16552 found in PCIe-based sun4u machines.marius2009-12-232-2/+3
|
* Support the tablet in (at least) the Toshiba Portege M200 Tablet PC.gavin2009-12-211-0/+1
| | | | | | | | | | This device only appears on the ACPI bus, so isn't caught by the current entry for it in the uart(4) ISA attachment. PR: kern/140172 Reviewed by: jhb, marcel Approved by: ed (mentor) MFC after: 2 weeks
* Add ID for NetMos NM9820 Serial Port chip, found on CardBus serial adapter.mav2009-12-081-0/+1
|
OpenPOWER on IntegriCloud