aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/altera_uart.c
AgeCommit message (Collapse)Author
2010-10-22altera_uart: Don't use plain integer as NULL pointerAnton Vorontsov
Fixes sparse warning. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Tobias Klauser <tklauser@distanz.ch>
2010-10-22altera_uart: Fixup type usage of port flagsAnton Vorontsov
port->flags is of type upf_t, which corresponds to UPF_* flags. ASYNC_BOOT_AUTOCONF is an unsigned integer, which happen to be the same as UPF_BOOT_AUTOCONF. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22altera_uart: Make it possible to use Altera UART and 8250 ports togetherAnton Vorontsov
This fixes tty name, major and minor numbers. The major number 204 is used across many platform-specific serial drivers, so we use that. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22altera_uart: Add support for different address stridesAnton Vorontsov
Some controllers implement registers with a stride, to support those we must implement the proper IO accessors. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22altera_uart: Add support for getting mapbase and IRQ from resourcesAnton Vorontsov
This makes it much easier to integrate the driver with the rest of the Linux (e.g. MFD subsystem). The old method is still supported though. Also, from now on, there is one platform device per port (no changes are needed for the platform code, as no one registers the devices anywhere in-tree yet). Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Alan Cox <alan@linux.intel.com>, Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22altera_uart: Add support for polling mode (IRQ-less)Anton Vorontsov
Some Altera UART implementations doesn't route the IRQ line, so we have to work in polling mode. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-10serial: "altera_uart: simplify altera_uart_console_putc()" checkpatch fixesAndrew Morton
ERROR: code indent should use tabs where possible #32: FILE: drivers/serial/altera_uart.c:397: +^I ALTERA_UART_STATUS_TRDY_MSK))$ total: 1 errors, 0 warnings, 39 lines checked ./patches/altera_uart-simplify-altera_uart_console_putc.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches This fix got lost when someone merged "altera_uart: simplify altera_uart_console_putc()". Please don't lose fixes. Please don't write of mere patches which have trivial checkpatch errors. Cc: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04serial: altera_uart: Proper section for altera_uart_removeTobias Klauser
altera_uart_remove should be in .devexit.text Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04altera_uart: Simplify altera_uart_console_putcTobias Klauser
The check for the TRDY flag after writing the character is not needed. Also do a cpu_relax() inside the loop. Pass a struct uart_port to altera_uart_console_putc, so we do not need to get it (and dereference pointers) for every character. Cc: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04altera_uart: Don't take spinlock in already protected functionsTobias Klauser
Don't take the port spinlock in uart functions where the serial core already takes care of locking/unlocking them. The code would actually lock up on architectures where spinlocks are implemented (not the case on nios2 where this driver is primarily used for now, thus this bug didn't trigger). Also protect calling altera_uart_rx_chars/altera_uart_tx_chars in the interrupt handler by the port spinlock. Thanks to Ian Abbott for pointing these issues out. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-21serial: Add driver for the Altera UARTTobias Klauser
Add an UART driver for the UART component available as a SOPC (System on Programmable Chip) component for Altera FPGAs. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>