aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/uart/uart_dev_pl011.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the uart classes to set their default register shift value.Andrew Turner2015-04-111-1/+2
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=281438
* Move the uart_class definitions and fdt compat data into the individualIan Lepore2015-03-071-1/+8
| | | | | | | | | | uart implementations, and export them using the new linker-set mechanism. Differential Revision: https://reviews.freebsd.org/D1993 Submitted by: Michal Meloun Notes: svn path=/head/; revision=279724
* Fix the pl011 driver to work when the uart will write in zero cycles. ThisAndrew Turner2015-03-031-5/+13
| | | | | | | | | | | | is the case, depending on the options, in some of the ARM hardware simulators. In these cases we don't get an interrupt so will need to schedule the task to write more data to the uart. MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279561
* Enable 'receive timeout' interrupt allowing us to notRuslan Bukin2015-02-241-10/+25
| | | | | | | | | | | loose 'rx buffer full' event. This fixes operation on ARMv8 Foundation Model. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=279239
* Make PL011 UART to wait on putc only when TX FIFO is fullZbigniew Bodek2014-11-121-1/+3
| | | | | | | | | | | | | | | Instead of waiting for empty TX FIFO it is more reasonable to block on full FIFO. As soon as FIFO slot is free the character can be transmitted. In case of TX FIFO disabled, TXFF bit indicates that transmit register is not empty. Obtained from: Semihalf Reviewed by: andrew, emaste Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=274451
* Introduce grab and ungrab upcalls. When the kernel desires to grab theWarner Losh2014-01-191-0/+29
| | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=260890
* Calculate the baud rate divisor rather than using a hard-coded value.Ian Lepore2013-10-201-5/+5
| | | | | | | Submitted by: Steven Lawrance <stl@koffein.net> Notes: svn path=/head/; revision=256815
* Fix low-level uart drivers that set their fifo sizes in the softc too late.Ian Lepore2013-04-011-3/+3
| | | | | | | | | | | | uart(4) allocates send and receiver buffers in attach() before it calls the low-level driver's attach routine. Many low-level drivers set the fifo sizes in their attach routine, which is too late. Other drivers set them in the probe() routine, so that they're available when uart(4) allocates buffers. This fixes the ones that were setting the values too late by moving the code to probe(). Notes: svn path=/head/; revision=248965
* Separate interrupts enable/disable logic from setting port parameters.Oleksandr Tymoshenko2012-10-301-6/+13
| | | | | | | | Otherwise setting baud rate in TTY mode effectively disables TX/RX interrupts and renders port unusable. Notes: svn path=/head/; revision=242333
* Add PrimeCell UART (PL011) driverOleksandr Tymoshenko2012-08-301-0/+436
Obtained from: Semihalf Notes: svn path=/head/; revision=239919