sync hh.org
[hh.org.git] / include / asm-arm / arch-pxa / serial.h
blobaaad3b563238791142232438ca49f8b7fffdeb03
1 /*
2 * linux/include/asm-arm/arch-pxa/serial.h
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <asm/arch/pxa-regs.h>
14 #define BAUD_BASE 921600
16 /* Standard COM flags */
17 #define STD_COM_FLAGS (ASYNC_SKIP_TEST)
19 #define STD_SERIAL_PORT_DEFNS \
20 { \
21 type: PORT_PXA, \
22 xmit_fifo_size: 64, \
23 baud_base: BAUD_BASE, \
24 iomem_base: &FFUART, \
25 iomem_reg_shift: 2, \
26 io_type: SERIAL_IO_MEM, \
27 irq: IRQ_FFUART, \
28 flags: STD_COM_FLAGS, \
29 }, { \
30 type: PORT_PXA, \
31 xmit_fifo_size: 64, \
32 baud_base: BAUD_BASE, \
33 iomem_base: &STUART, \
34 iomem_reg_shift: 2, \
35 io_type: SERIAL_IO_MEM, \
36 irq: IRQ_STUART, \
37 flags: STD_COM_FLAGS, \
38 }, { \
39 type: PORT_PXA, \
40 xmit_fifo_size: 64, \
41 baud_base: BAUD_BASE, \
42 iomem_base: &BTUART, \
43 iomem_reg_shift: 2, \
44 io_type: SERIAL_IO_MEM, \
45 irq: IRQ_BTUART, \
46 flags: STD_COM_FLAGS, \
49 #define EXTRA_SERIAL_PORT_DEFNS
51 struct platform_pxa_serial_funcs {
53 /* Initialize whatever is connected to this serial port. */
54 void (*configure)(int state);
55 #define PXA_UART_CFG_PRE_STARTUP 0
56 #define PXA_UART_CFG_POST_STARTUP 1
57 #define PXA_UART_CFG_PRE_SHUTDOWN 2
58 #define PXA_UART_CFG_POST_SHUTDOWN 3
60 /* Enable or disable the individual transmitter/receiver submodules.
61 * On transceivers without echo cancellation (e.g. SIR)
62 * transmitter always has priority; e.g. if both bits are set,
63 * only the transmitter is enabled. */
64 void (*set_txrx)(int txrx);
65 #define PXA_SERIAL_TX 1
66 #define PXA_SERIAL_RX 2
68 /* Get the current state of tx/rx. */
69 int (*get_txrx)(void);
72 extern struct platform_device ffuart_device;
73 extern struct platform_device btuart_device;
74 extern struct platform_device stuart_device;
75 extern struct platform_device hwuart_device;