2
* Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
6
* The code contained herein is licensed under the GNU General Public
7
* License. You may obtain a copy of the GNU General Public License
8
* Version 2 or later at the following locations:
10
* http://www.opensource.org/licenses/gpl-license.html
11
* http://www.gnu.org/copyleft/gpl.html
14
#ifndef __ARCH_ARM_MACH_MX3_SERIAL_H__
15
#define __ARCH_ARM_MACH_MX3_SERIAL_H__
18
* @file mach-mx3/serial.h
22
#include <mach/mxc_uart.h>
25
* UART Chip level Configuration that a user may not have to edit. These
26
* configuration vary depending on how the UART module is integrated with
31
* This option is used to set or clear the RXDMUXSEL bit in control reg 3.
32
* Certain platforms need this bit to be set in order to receive Irda data.
34
#define MXC_UART_IR_RXDMUX 0x0004
36
* This option is used to set or clear the RXDMUXSEL bit in control reg 3.
37
* Certain platforms need this bit to be set in order to receive UART data.
39
#define MXC_UART_RXDMUX 0x0004
41
/* UART 1 configuration */
43
* This option allows to choose either an interrupt-driven software controlled
44
* hardware flow control (set this option to 0) or hardware-driven hardware
45
* flow control (set this option to 1).
47
/* UART used as wakeup source */
48
#define UART1_HW_FLOW 0
50
* This specifies the threshold at which the CTS pin is deasserted by the
51
* RXFIFO. Set this value in Decimal to anything from 0 to 32 for
52
* hardware-driven hardware flow control. Read the HW spec while specifying
53
* this value. When using interrupt-driven software controlled hardware
54
* flow control set this option to -1.
56
#define UART1_UCR4_CTSTL 16
58
* This is option to enable (set this option to 1) or disable DMA data transfer
60
#define UART1_DMA_ENABLE 0
62
* Specify the size of the DMA receive buffer. The minimum buffer size is 512
63
* bytes. The buffer size should be a multiple of 256.
65
#define UART1_DMA_RXBUFSIZE 1024
67
* Specify the MXC UART's Receive Trigger Level. This controls the threshold at
68
* which a maskable interrupt is generated by the RxFIFO. Set this value in
69
* Decimal to anything from 0 to 32. Read the HW spec while specifying this
72
#define UART1_UFCR_RXTL 16
74
* Specify the MXC UART's Transmit Trigger Level. This controls the threshold at
75
* which a maskable interrupt is generated by the TxFIFO. Set this value in
76
* Decimal to anything from 0 to 32. Read the HW spec while specifying this
79
#define UART1_UFCR_TXTL 16
80
/* UART 2 configuration */
81
#define UART2_HW_FLOW 0
82
#define UART2_UCR4_CTSTL -1
83
#define UART2_DMA_ENABLE 0
84
#define UART2_DMA_RXBUFSIZE 512
85
#define UART2_UFCR_RXTL 16
86
#define UART2_UFCR_TXTL 16
87
/* UART 3 configuration */
88
#define UART3_HW_FLOW 1
89
#define UART3_UCR4_CTSTL 16
90
#define UART3_DMA_ENABLE 1
91
#define UART3_DMA_RXBUFSIZE 1024
92
#define UART3_UFCR_RXTL 16
93
#define UART3_UFCR_TXTL 16
94
/* UART 4 configuration */
95
#define UART4_HW_FLOW 1
96
#define UART4_UCR4_CTSTL 16
97
#define UART4_DMA_ENABLE 0
98
#define UART4_DMA_RXBUFSIZE 512
99
#define UART4_UFCR_RXTL 16
100
#define UART4_UFCR_TXTL 16
101
/* UART 5 configuration */
102
#define UART5_HW_FLOW 1
103
#define UART5_UCR4_CTSTL 16
104
#define UART5_DMA_ENABLE 0
105
#define UART5_DMA_RXBUFSIZE 512
106
#define UART5_UFCR_RXTL 16
107
#define UART5_UFCR_TXTL 16
109
* UART Chip level Configuration that a user may not have to edit. These
110
* configuration vary depending on how the UART module is integrated with
114
* Is the MUXED interrupt output sent to the ARM core
116
#define INTS_NOTMUXED 0
118
/* UART 1 configuration */
120
* This define specifies whether the muxed ANDed interrupt line or the
121
* individual interrupts from the UART port is integrated with the ARM core.
122
* There exists a define like this for each UART port. Valid values that can
123
* be used are \b INTS_NOTMUXED or \b INTS_MUXED.
125
#define UART1_MUX_INTS INTS_MUXED
127
* This define specifies the transmitter interrupt number or the interrupt
128
* number of the ANDed interrupt in case the interrupts are muxed. There exists
129
* a define like this for each UART port.
131
#define UART1_INT1 MXC_INT_UART1
133
* This define specifies the receiver interrupt number. If the interrupts of
134
* the UART are muxed, then we specify here a dummy value -1. There exists a
135
* define like this for each UART port.
137
#define UART1_INT2 -1
139
* This specifies the master interrupt number. If the interrupts of the UART
140
* are muxed, then we specify here a dummy value of -1. There exists a define
141
* like this for each UART port.
143
#define UART1_INT3 -1
145
* This specifies if the UART is a shared peripheral. It holds the shared
146
* peripheral number if it is shared or -1 if it is not shared. There exists
147
* a define like this for each UART port.
149
#define UART1_SHARED_PERI -1
150
/* UART 2 configuration */
151
#define UART2_MUX_INTS INTS_MUXED
152
#define UART2_INT1 MXC_INT_UART2
153
#define UART2_INT2 -1
154
#define UART2_INT3 -1
155
#define UART2_SHARED_PERI -1
156
/* UART 3 configuration */
157
#define UART3_MUX_INTS INTS_MUXED
158
#define UART3_INT1 MXC_INT_UART3
159
#define UART3_INT2 -1
160
#define UART3_INT3 -1
161
#define UART3_SHARED_PERI SPBA_UART3
162
/* UART 4 configuration */
163
#define UART4_MUX_INTS INTS_MUXED
164
#define UART4_INT1 MXC_INT_UART4
165
#define UART4_INT2 -1
166
#define UART4_INT3 -1
167
#define UART4_SHARED_PERI -1
168
/* UART 5 configuration */
169
#define UART5_MUX_INTS INTS_MUXED
170
#define UART5_INT1 MXC_INT_UART5
171
#define UART5_INT2 -1
172
#define UART5_INT3 -1
173
#define UART5_SHARED_PERI -1
175
#endif /* __ARCH_ARM_MACH_MX3_SERIAL_H__ */