OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [xscale/] [iq80310/] [v2_0/] [src/] [diag/] [cycduart.h] - Blame information for rev 565

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
//=============================================================================
2
//
3
//      cycduart.h - Cyclone Diagnostics
4
//
5
//=============================================================================
6
//####ECOSGPLCOPYRIGHTBEGIN####
7
// -------------------------------------------
8
// This file is part of eCos, the Embedded Configurable Operating System.
9
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
10
//
11
// eCos is free software; you can redistribute it and/or modify it under
12
// the terms of the GNU General Public License as published by the Free
13
// Software Foundation; either version 2 or (at your option) any later version.
14
//
15
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
16
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18
// for more details.
19
//
20
// You should have received a copy of the GNU General Public License along
21
// with eCos; if not, write to the Free Software Foundation, Inc.,
22
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
23
//
24
// As a special exception, if other files instantiate templates or use macros
25
// or inline functions from this file, or you compile this file and link it
26
// with other works to produce a work based on this file, this file does not
27
// by itself cause the resulting work to be covered by the GNU General Public
28
// License. However the source code for this file must still be made available
29
// in accordance with section (3) of the GNU General Public License.
30
//
31
// This exception does not invalidate any other reasons why a work based on
32
// this file might be covered by the GNU General Public License.
33
//
34
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
35
// at http://sources.redhat.com/ecos/ecos-license/
36
// -------------------------------------------
37
//####ECOSGPLCOPYRIGHTEND####
38
//=============================================================================
39
//#####DESCRIPTIONBEGIN####
40
//
41
// Author(s):   Scott Coulter, Jeff Frazier, Eric Breeden
42
// Contributors:
43
// Date:        2001-01-25
44
// Purpose:     
45
// Description: 
46
//
47
//####DESCRIPTIONEND####
48
//
49
//===========================================================================*/
50
 
51
 
52
/* Control/status register offsets from base address */
53
 
54
#define RBR 0x00
55
#define THR 0x00
56
#define DLL 0x00
57
#define IER 0x01
58
#define DLM 0x01
59
#define IIR 0x02
60
#define FCR 0x02
61
#define LCR 0x03
62
#define MCR 0x04
63
#define LSR 0x05
64
#define MSR 0x06
65
#define SCR 0x07
66
 
67
/* 16550A Line Control Register */
68
 
69
#define LCR_5BITS 0x00
70
#define LCR_6BITS 0x01
71
#define LCR_7BITS 0x02
72
#define LCR_8BITS 0x03
73
#define LCR_NSB 0x04
74
#define LCR_PEN 0x08
75
#define LCR_EPS 0x10
76
#define LCR_SP 0x20
77
#define LCR_SB 0x40
78
#define LCR_DLAB 0x80
79
 
80
/* 16550A Line Status Register */
81
 
82
#define LSR_DR 0x01
83
#define LSR_OE 0x02
84
#define LSR_PE 0x04
85
#define LSR_FE 0x08
86
#define LSR_BI 0x10
87
#define LSR_THRE 0x20
88
#define LSR_TSRE 0x40
89
#define LSR_FERR 0x80
90
 
91
/* 16550A Interrupt Identification Register */
92
 
93
#define IIR_IP 0x01
94
#define IIR_ID 0x0e
95
#define IIR_RLS 0x06
96
#define IIR_RDA 0x04
97
#define IIR_THRE 0x02
98
#define IIR_MSTAT 0x00
99
#define IIR_TIMEOUT 0x0c
100
 
101
/* 16550A interrupt enable register bits */
102
 
103
#define IER_DAV 0x01
104
#define IER_TXE 0x02
105
#define IER_RLS 0x04
106
#define IER_MS 0x08
107
 
108
/* 16550A Modem control register */
109
 
110
#define MCR_DTR 0x01
111
#define MCR_RTS 0x02
112
#define MCR_OUT1 0x04
113
#define MCR_OUT2 0x08
114
#define MCR_LOOP 0x10
115
 
116
/* 16550A Modem Status Register */
117
 
118
#define MSR_DCTS 0x01
119
#define MSR_DDSR 0x02
120
#define MSR_TERI 0x04
121
#define MSR_DRLSD 0x08
122
#define MSR_CTS 0x10
123
#define MSR_DSR 0x20
124
#define MSR_RI 0x40
125
#define MSR_RLSD 0x80
126
 
127
/* (*) 16550A FIFO Control Register */
128
 
129
#define FCR_EN 0x01
130
#define FCR_RXCLR 0x02
131
#define FCR_TXCLR 0x04
132
#define FCR_DMA 0x08
133
#define FCR_RES1 0x10
134
#define FCR_RES2 0x20
135
#define FCR_RXTRIG_L 0x40
136
#define FCR_RXTRIG_H 0x80
137
 
138
 
139
#define CHAN1 0x8
140
#define CHAN2 0x0
141
 
142
#define DataIn          0x00            /* data input port  */
143
#define DataOut         0x00            /* data output port  */
144
#define BaudLsb         0x00            /* baud rate divisor least significant byte  */
145
#define BaudMsb         0x01            /* baud rate divisor most significant byte  */
146
 
147
 
148
/*
149
 * Enable receive and transmit FIFOs.
150
 *
151
 * FCR<7:6>     00      trigger level = 1 byte
152
 * FCR<5:4>     00      reserved
153
 * FCR<3>       0       mode 1 - interrupt on fifo threshold
154
 * FCR<2>       1       clear xmit fifo
155
 * FCR<1>       1       clear recv fifo
156
 * FCR<0>       1       turn on fifo mode
157
 */
158
#define FIFO_ENABLE 0x07
159
#define INT_ENABLE  (IER_RLS)   /* default interrupt mask */
160
 
161
 
162
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.