Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/driver...
[linux-2.6/verdex.git] / include / asm-v850 / v850e_uart.h
blob5930d5990b193ce029bb18e112bfdafa3e06544a
1 /*
2 * include/asm-v850/v850e_uart.h -- common V850E on-chip UART driver
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
11 * Written by Miles Bader <miles@gnu.org>
14 /* There's not actually a single UART implementation used by V850E CPUs,
15 but rather a series of implementations that are all `close' to one
16 another. This file corresponds to the single driver which handles all
17 of them. */
19 #ifndef __V850_V850E_UART_H__
20 #define __V850_V850E_UART_H__
22 #include <linux/config.h>
23 #include <linux/termios.h>
25 #include <asm/v850e_utils.h>
26 #include <asm/types.h>
27 #include <asm/machdep.h> /* Pick up chip-specific defs. */
30 /* Include model-specific definitions. */
31 #ifdef CONFIG_V850E_UART
32 # ifdef CONFIG_V850E_UARTB
33 # include <asm-v850/v850e_uartb.h>
34 # else
35 # include <asm-v850/v850e_uarta.h> /* original V850E UART */
36 # endif
37 #endif
40 /* Optional capabilities some hardware provides. */
42 /* This UART doesn't implement RTS/CTS by default, but some platforms
43 implement them externally, so check to see if <asm/machdep.h> defined
44 anything. */
45 #ifdef V850E_UART_CTS
46 #define v850e_uart_cts(n) V850E_UART_CTS(n)
47 #else
48 #define v850e_uart_cts(n) (1)
49 #endif
51 /* Do the same for RTS. */
52 #ifdef V850E_UART_SET_RTS
53 #define v850e_uart_set_rts(n,v) V850E_UART_SET_RTS(n,v)
54 #else
55 #define v850e_uart_set_rts(n,v) ((void)0)
56 #endif
59 /* This is the serial channel to use for the boot console (if desired). */
60 #ifndef V850E_UART_CONSOLE_CHANNEL
61 # define V850E_UART_CONSOLE_CHANNEL 0
62 #endif
65 #ifndef __ASSEMBLY__
67 /* Setup a console using channel 0 of the builtin uart. */
68 extern void v850e_uart_cons_init (unsigned chan);
70 /* Configure and turn on uart channel CHAN, using the termios `control
71 modes' bits in CFLAGS, and a baud-rate of BAUD. */
72 void v850e_uart_configure (unsigned chan, unsigned cflags, unsigned baud);
74 #endif /* !__ASSEMBLY__ */
77 #endif /* __V850_V850E_UART_H__ */