MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-arm / arch-espd_4510b / uart.h
blob2605e7b682ae8f697f784a4d6b0e1c50b4362a69
1 #ifndef _SC34510B_UART_H
2 #define _SC34510B_UART_H
4 /*
5 * linux/include/asm-armnommu/arch-espd_4510b/uart.h
7 * Copyright (c) 2004 Cucy Systems (http://www.cucy.com)
8 * Curt Brune <curt@cucy.com>
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
25 * Description: S3C4510B UART register layout
26 * Runtime Env: ARM7TDMI
27 * Change History:
28 * 03-03-04 Create (Curt Brune)
31 /* UART LINE CONTROL register */
32 typedef struct __BF_UART_LINE_CTRL {
33 u32 wordLen: 2;
34 u32 nStop: 1;
35 u32 parity: 3;
36 u32 clk: 1;
37 u32 infra_red: 1;
38 u32 unused:24;
39 } BF_UART_LINE_CTRL;
41 typedef union _UART_LINE_CTRL {
42 u32 ui;
43 BF_UART_LINE_CTRL bf;
44 } UART_LINE_CTRL;
46 /* UART CONTROL register */
47 typedef struct __BF_UART_CTRL {
48 u32 rxMode: 2;
49 u32 rxIrq: 1;
50 u32 txMode: 2;
51 u32 DSR: 1;
52 u32 sendBreak: 1;
53 u32 loopBack: 1;
54 u32 unused:24;
55 } BF_UART_CTRL;
57 typedef union _UART_CTRL {
58 u32 ui;
59 BF_UART_CTRL bf;
60 } UART_CTRL;
62 /* UART STATUS register */
63 typedef struct __BF_UART_STAT {
64 u32 overrun: 1;
65 u32 parity: 1;
66 u32 frame: 1;
67 u32 breakIrq: 1;
68 u32 DTR: 1;
69 u32 rxReady: 1;
70 u32 txBufEmpty: 1;
71 u32 txComplete: 1;
72 u32 unused:24;
73 } BF_UART_STAT;
75 typedef union _UART_STAT {
76 u32 ui;
77 BF_UART_STAT bf;
78 } UART_STAT;
80 /* UART BAUD_DIV register */
81 typedef struct __BF_UART_BAUD_DIV {
82 u32 cnt1: 4;
83 u32 cnt0:12;
84 u32 unused:16;
85 } BF_UART_BAUD_DIV;
87 typedef union _UART_BAUD_DIV {
88 u32 ui;
89 BF_UART_BAUD_DIV bf;
90 } UART_BAUD_DIV;
92 /* UART register block */
93 struct uart_regs {
94 volatile UART_LINE_CTRL m_lineCtrl;
95 volatile UART_CTRL m_ctrl;
96 volatile UART_STAT m_stat;
97 volatile u32 m_tx;
98 volatile u32 m_rx;
99 volatile UART_BAUD_DIV m_baudDiv;
100 volatile u32 m_baudCnt;
101 volatile u32 m_baudClk;
104 #define NL 0x0A
105 #define CR 0x0D
106 #define BSP 0x08
107 #define ESC 0x1B
108 #define CTRLZ 0x1A
109 #define RUBOUT 0x7F
111 #define UART_ANY_RX (0x2F)
112 #define UART_NR (2)
114 #endif