summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Added entries for Lava SP-PCI (1 serial + 1 parallel) PCI card. Thekaiw2009-02-111-0/+1
| | | | card is a multifunction PCI and report itself as two logical devices.
* De-hard code UART speed setting for Marvell SOCs when hw.uart.console is notraj2009-01-081-1/+2
| | | | specified. Instead, let uart(4) fall back to whatever speed firmware has set.
* Minor style(9) compliance change.kan2008-12-271-1/+2
|
* Cast to uintptr_t before casting to void*. This allows themarcel2008-11-221-3/+3
| | | | | | | QUICC backend to be built on LP64 platforms. This makes it possible to include the QUICC backend in the kernel module. PR: 127120
* Fix detaching of uart(4) devices.ed2008-10-231-0/+13
| | | | | | | | | | | | | | With our new TTY layer we use a two step device destruction procedure. The TTY first gets abandoned by the device driver. When the TTY layer notices all threads have left the TTY layer, it deallocates the TTY. This means that the device unit number should not be reused before a callback from the TTY layer to the device driver has been made. newbus doesn't seem to support this concept (yet), so right now just add a destructor with a big comment in it. It's not ideal, but at least it's better than panicing. Reported by: rnoland
* Introduce basic support for Marvell families of system-on-chip ARM devices:raj2008-10-132-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Orion - 88F5181 - 88F5182 - 88F5281 * Kirkwood - 88F6281 * Discovery - MV78100 The above families of SOCs are built around CPU cores compliant with ARMv5TE instruction set architecture definition. They share a number of integrated peripherals. This commit brings support for the following basic elements: * GPIO * Interrupt controller * L1, L2 cache * Timers, watchdog, RTC * TWSI (I2C) * UART Other peripherals drivers will be introduced separately. Reviewed by: imp, marcel, stass (Thanks guys!) Obtained from: Marvell, Semihalf
* Use bus_space_compare() rather than i386_memio_compare() directly.nyan2008-09-071-1/+1
|
* Add the 2nd CCU and PnP devices support on pc98.nyan2008-08-253-16/+68
| | | | | Reviewed by: imp Obtained from: //depot/projects/uart with some fixes
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.ed2008-08-202-95/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
* The XScale PXA255 has three generally ns16x50 compatible UARTs. One of thebenno2008-05-301-5/+31
| | | | | | | | | | | | | | | variations from normal 16x50 behaviour however is the the use of a normally unused bit of IER to control RX timeout interrupts independently of the generally used RXRDY bit. If this bit is not enabled, we only ever get interrupts when the FIFO is full, never before. This is not very useful when the UART is being used as a console. In order to support this without causing potential problems on more "normal" 16x50 variants, this change introduces two hints for the uart device, ier_mask and ier_rxbits. These can be used to override which bits get set and cleared when we're enabling and disabling RX interrupts. Reviewed by: marcel
* Expand kdb_alt_break a little, most commonly used with the optionpeter2008-05-041-3/+17
| | | | | | | | | | | | | | | | | | | ALT_BREAK_TO_DEBUGGER. In addition to "Enter ~ ctrl-B" (to enter the debugger), there is now "Enter ~ ctrl-P" (force panic) and "Enter ~ ctrl-R" (request clean reboot, ala ctrl-alt-del on syscons). We've used variations of this at work. The force panic sequence is best used with KDB_UNATTENDED for when you just want it to dump and get on with it. The reboot request is a safer way of getting into single user than a power cycle. eg: you've hosed the ability to log in (pam, rtld, etc). It gives init the reboot signal, which causes an orderly reboot. I've taken my best guess at what the !x86 and non-sio code changes should be. This also makes sio release its spinlock before calling KDB/DDB.
* add device hints to control the rx FIFO interrupt level on 16550A partssam2008-03-122-1/+18
| | | | | | | PR: kern/121421 Submitted by: UEMURA Tetsuya Reviewed by: marcel MFC after: 2 weeks
* Support for Freescale QUad Integrated Communications Controller.raj2008-03-032-0/+490
| | | | | | | | | | | | | The QUICC engine is found on various Freescale parts including MPC85xx, and provides multiple generic time-division serial channel resources, which are in turn muxed/demuxed by the Serial Communications Controller (SCC). Along with core QUICC/SCC functionality a uart(4)-compliant device driver is provided which allows for serial ports over QUICC/SCC. Approved by: cognet (mentor) Obtained from: Juniper MFp4: e500
* Initial support for Freescale PowerQUICC III MPC85xx system-on-chip family.raj2008-03-033-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | The PQ3 is a high performance integrated communications processing system based on the e500 core, which is an embedded RISC processor that implements the 32-bit Book E definition of the PowerPC architecture. For details refer to: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8555E This port was tested and successfully run on the following members of the PQ3 family: MPC8533, MPC8541, MPC8548, MPC8555. The following major integrated peripherals are supported: * On-chip peripherals bus * OpenPIC interrupt controller * UART * Ethernet (TSEC) * Host/PCI bridge * QUICC engine (SCC functionality) This commit brings the main functionality and will be followed by individual drivers that are logically separate from this base. Approved by: cognet (mentor) Obtained from: Juniper, Semihalf MFp4: e500
* Add a new 'why' argument to kdb_enter(), and a set of constants to userwatson2007-12-251-2/+3
| | | | | | | | | for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
OpenPOWER on IntegriCloud