summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add support for the NetMos NM9865 family of Serial/Parallel ports.marcel2009-12-071-0/+1
| | | | | Obtained from: NetMos MCS9865 v1.0.0.1 driver MFC after: 3 days
* Remove unneeded includes of <sys/termios.h>.ed2009-11-282-2/+0
|
* Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTYmarcel2009-10-023-27/+55
| | | | | | | | | 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
* Fix serial console on Apple Xserve G5 by falling back to input-device-1nwhitehorn2009-07-231-9/+32
| | | | | | | | | | if input-device is unavailable. The Xserve G5 defaults to using screen/keyboard for output-device/input-device even if these are not installed, and then falls back to serial ports at boot time. Reviewed by: marcel Hardware from: grehan Approved by: re (kib)
* Move the memory layout definitions and logic from mvreg.h to mvwin.hmarcel2009-06-121-0/+1
| | | | | | | | so that it isn't exposured unless needed. In particular this means that it's easier to tune the memory layout based on board details. While here, remove inclusion of <machine/intr.h> from mvreg.h. This also contains exposure to SoC specifics in MI drivers, because NIRQ depends on the SoC.
* Last minute TTY API change: remove mutex argument from tty_alloc().ed2009-05-291-1/+1
| | | | | | | | | | I don't want people to override the mutex when allocating a TTY. It has to be there, to keep drivers like syscons happy. So I'm creating a tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex() should eventually be removed. The advantage of this approach, is that we can just remove a function, without breaking the regular API in the future.
* Don't use pmap_kextact() when comparing bus handles for Book-E.marcel2009-04-081-0/+4
| | | | | | | We typically wire translation to devices with TLB1 entries and pmap_kextract() does not know about those and returns 0. This causes false positives (read: all serial ports suddenly become the console).
* Fix hangs caused by hardware that signals receive errorsmarcel2009-04-081-6/+9
| | | | | | | | | (framing, parity, etc), but does not indicate characters being received. Since no chracters have been received, ignore the line errors. PR: 131006 MFC after: 3 days
* Add support for 64-bit PowerPC CPUs operating in the 64-bit bridge modenwhitehorn2009-04-041-7/+19
| | | | | | | | | | provided, for example, on the PowerPC 970 (G5), as well as on related CPUs like the POWER3 and POWER4. This also adds support for various built-in hardware found on Apple G5 hardware (e.g. the IBM CPC925 northbridge). Reviewed by: grehan
* remove now-redunant cardbus attachment.imp2009-03-091-1/+0
|
* Add support for the single-port NetMos NM9835 serial adapter. The puc(4)jhb2009-03-051-0/+1
| | | | | | | | | entry is a specific entry to override the generic NetMos entry so that puc(4) will leave this device alone and let uart(4) claim it. Submitted by: Navdeep Parhar nparhar @ gmail Reviewed by: marcel MFC after: 1 week
OpenPOWER on IntegriCloud