diff options
author | Magnus Damm <damm@opensource.se> | 2012-05-02 21:46:51 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-02 14:04:40 -0700 |
commit | cc419fa0d38c425e4ea7bffeed931b07b0a3e461 (patch) | |
tree | 75a6c82980c7aa761e265b9ab7c3788fd77fa24d /drivers/tty/serial/8250/8250.h | |
parent | f9a9111b540fd67db5dab332f4b83d86c90e27b1 (diff) | |
download | lwn-cc419fa0d38c425e4ea7bffeed931b07b0a3e461.tar.gz lwn-cc419fa0d38c425e4ea7bffeed931b07b0a3e461.zip |
serial8250: Add dl_read()/dl_write() callbacks
Convert serial_dl_read() and serial_dl_write() from macro
to 8250 specific callbacks. This change makes it easier to
support 8250 hardware with non-standard DLL and DLM register
configurations such as Alchemy, RM9K and upcoming Emma Mobile
UART hardware.
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250.h')
-rw-r--r-- | drivers/tty/serial/8250/8250.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index c9d0ebe952fc..f9719d167c8d 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -37,6 +37,10 @@ struct uart_8250_port { unsigned char lsr_saved_flags; #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA unsigned char msr_saved_flags; + + /* 8250 specific callbacks */ + int (*dl_read)(struct uart_8250_port *); + void (*dl_write)(struct uart_8250_port *, int); }; struct old_serial_port { @@ -98,6 +102,16 @@ static inline void serial_out(struct uart_8250_port *up, int offset, int value) void serial8250_clear_and_reinit_fifos(struct uart_8250_port *p); +static inline int serial_dl_read(struct uart_8250_port *up) +{ + return up->dl_read(up); +} + +static inline void serial_dl_write(struct uart_8250_port *up, int value) +{ + up->dl_write(up, value); +} + #if defined(__alpha__) && !defined(CONFIG_PCI) /* * Digital did something really horribly wrong with the OUT1 and OUT2 |