2 * Omap/h6300 serial driver private interface.
3 * Code originates from the pxa-serial.h available in the handheld org drivers
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.
11 #ifndef _OMAP_SERIAL_H
12 #define _OMAP_SERIAL_H
14 #define OMAP_SERIAL_TX 1
15 #define OMAP_SERIAL_RX 2
17 #include <linux/tty.h>
18 #include <linux/serial_core.h>
20 struct platform_omap_serial_funcs;
22 struct uart_omap_port {
23 struct uart_port port;
27 unsigned int lsr_break_flag;
30 struct platform_omap_serial_funcs *pf;
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.
37 * For the sake of simplicity/performance no one of the function pointers
38 * in the structure below can be NULL.
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);
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 * platform_pxa_serial_funcs structure in the dev.platform_data
58 * field of the respective port device.
60 extern struct platform_device btuart_device;