]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - include/asm-arm/arch-omap/omap_serial.h
h63xx: tsc2101 alsa sound support
[linux-2.6-omap-h63xx.git] / include / asm-arm / arch-omap / omap_serial.h
1 /*
2  * Omap/h6300 serial driver private interface. 
3  * Code originates from the pxa-serial.h available in the handheld org drivers
4  * for iPAQ PXA4700.
5  *
6  * Copyright (c) 2005 SDG Systems, LLC
7  * 2005-03-29   Todd Blumer     Converted  basic structure to support hx4700
8  * 2005-10-03   Mika Laitio (lamikr@cc.jyu.fi)  Reorganized for the iPAQ h6300 bt driver.
9  */
10  
11 #ifndef _OMAP_SERIAL_H
12 #define _OMAP_SERIAL_H
13
14 #define OMAP_SERIAL_TX 1
15 #define OMAP_SERIAL_RX 2
16
17 #include <linux/tty.h>
18 #include <linux/serial_core.h>
19
20 struct platform_omap_serial_funcs;
21
22 struct uart_omap_port {
23         struct uart_port                        port;
24         unsigned char                           ier;
25         unsigned char                           lcr;
26         unsigned char                           mcr;
27         unsigned int                            lsr_break_flag;
28         unsigned int                            cken;
29         char                                    *name;
30         struct platform_omap_serial_funcs       *pf;
31 };
32
33 /* A pointer to such a structure can be contained in the platform_data
34  * field of every PXA UART platform_device. If the field is NULL, the
35  * serial port works as usual.
36  *
37  * For the sake of simplicity/performance no one of the function pointers
38  * in the structure below can be NULL.
39  */
40 struct platform_omap_serial_funcs {
41         /* Platform-specific function to initialize whatever is connected
42          to this serial port... enable=1 -> enable transceiver,
43          0 -> disable transceiver. */
44         void (*configure) (struct uart_omap_port *up, int enable);
45         /* Platform-specific function to enable or disable the individual
46            transmitter/receiver submodules. On transceivers without echo
47            cancellation (e.g. SIR) transmitter always has priority, e.g.
48            if both bits are set, only the transmitter is enabled. */
49         void (*set_txrx) (struct uart_omap_port *up, int txrx);
50         /* Get the current state of tx/rx (see bitflags above) */
51         int (*get_txrx) (struct uart_omap_port *up);
52 };
53
54 /*
55  * The variables below are located in arch/arm/mach-omap/board_h6300.c
56  * Machine-specific code may want to put a pointer to a static
57  * 63xx_uart_bt_device.dev.platform_data
58  */
59 extern struct platform_device h63xx_uart_bt_device;
60
61 #endif