RTEMS 7.0-rc1
Loading...
Searching...
No Matches
ep7312.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
2
9/*
10 * Cirrus EP7312 register declarations
11 *
12 * Copyright (c) 2002 by Charlie Steader <charlies@poliac.com>
13 *
14 * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com>
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 *
20 *
21 * Notes: The PLL registers (pll_ro and pll_wo) are either read only
22 * or write only. The data sheet says not to write the read
23 * only one or read the write only one. I'm not sure what will
24 * happen if you do.
25*/
26#ifndef __EP7312_H__
27#define __EP7312_H__
28
29#define EP7312_REG_BASE 0x80000000
30
38#define EP7312_PADR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0000))
39#define EP7312_PBDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0001))
40#define EP7312_PDDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0003))
41#define EP7312_PADDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0040))
42#define EP7312_PBDDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0041))
43#define EP7312_PDDDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0043))
44#define EP7312_PEDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0080))
45#define EP7312_PEDDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x00C0))
46#define EP7312_SYSCON1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x0100))
47#define EP7312_SYSFLG1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x0140))
48#define EP7312_MEMCFG1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x0180))
49#define EP7312_MEMCFG2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x01C0))
50#define EP7312_INTSR1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x0240))
51#define EP7312_INTMR1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x0280))
52#define EP7312_LCDCON ((volatile uint32_t*)(EP7312_REG_BASE + 0x02C0))
53#define EP7312_TC1D ((volatile uint32_t*)(EP7312_REG_BASE + 0x0300))
54#define EP7312_TC2D ((volatile uint32_t*)(EP7312_REG_BASE + 0x0340))
55#define EP7312_RTCDR ((volatile uint32_t*)(EP7312_REG_BASE + 0x0380))
56#define EP7312_RTCMR ((volatile uint32_t*)(EP7312_REG_BASE + 0x03C0))
57#define EP7312_PMPCON ((volatile uint32_t*)(EP7312_REG_BASE + 0x0400))
58#define EP7312_CODR ((volatile uint8_t*)(EP7312_REG_BASE + 0x0440))
59#define EP7312_UARTDR1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x0480))
60#define EP7312_UARTCR1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x04C0))
61#define EP7312_SYNCIO ((volatile uint32_t*)(EP7312_REG_BASE + 0x0500))
62#define EP7312_PALLSW ((volatile uint32_t*)(EP7312_REG_BASE + 0x0540))
63#define EP7312_PALMSW ((volatile uint32_t*)(EP7312_REG_BASE + 0x0580))
64#define EP7312_STFCLR ((volatile uint32_t*)(EP7312_REG_BASE + 0x05C0))
65#define EP7312_BLEOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x0600))
66#define EP7312_MCEOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x0640))
67#define EP7312_TEOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x0680))
68#define EP7312_TC1EOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x06C0))
69#define EP7312_TC2EOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x0700))
70#define EP7312_RTCEOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x0740))
71#define EP7312_UMSEOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x0780))
72#define EP7312_COEOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x07C0))
73#define EP7312_HALT ((volatile uint32_t*)(EP7312_REG_BASE + 0x0800))
74#define EP7312_STDBY ((volatile uint32_t*)(EP7312_REG_BASE + 0x0840))
75#define EP7312_FBADDR ((volatile uint8_t*)(EP7312_REG_BASE + 0x1000))
76#define EP7312_SYSCON2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x1100))
77#define EP7312_SYSFLG2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x1140))
78#define EP7312_INTSR2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x1240))
79#define EP7312_INTMR2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x1280))
80#define EP7312_UARTDR2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x1480))
81#define EP7312_UARTCR2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x14C0))
82#define EP7312_SS2DR ((volatile uint32_t*)(EP7312_REG_BASE + 0x1500))
83#define EP7312_SRXEOF ((volatile uint32_t*)(EP7312_REG_BASE + 0x1600))
84#define EP7312_SS2POP ((volatile uint32_t*)(EP7312_REG_BASE + 0x16C0))
85#define EP7312_KBDEOI ((volatile uint32_t*)(EP7312_REG_BASE + 0x1700))
86#define EP7312_DAIR ((volatile uint32_t*)(EP7312_REG_BASE + 0x2000))
87#define EP7312_DAIDR0 ((volatile uint32_t*)(EP7312_REG_BASE + 0x2040))
88#define EP7312_DAIDR1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x2080))
89#define EP7312_DAIDR2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x20C0))
90#define EP7312_DAISR ((volatile uint32_t*)(EP7312_REG_BASE + 0x2100))
91#define EP7312_SYSCON3 ((volatile uint32_t*)(EP7312_REG_BASE + 0x2200))
92#define EP7312_INTSR3 ((volatile uint32_t*)(EP7312_REG_BASE + 0x2240))
93#define EP7312_INTMR3 ((volatile uint8_t*)(EP7312_REG_BASE + 0x2280))
94#define EP7312_LEDFLSH ((volatile uint8_t*)(EP7312_REG_BASE + 0x22C0))
95#define EP7312_SDCONF ((volatile uint32_t*)(EP7312_REG_BASE + 0x2300))
96#define EP7312_SDRFPR ((volatile uint32_t*)(EP7312_REG_BASE + 0x2340))
97#define EP7312_UNIQID ((volatile uint32_t*)(EP7312_REG_BASE + 0x2440))
98#define EP7312_DAI64Fs ((volatile uint32_t*)(EP7312_REG_BASE + 0x2600))
99#define EP7312_PLLW ((volatile uint8_t*)(EP7312_REG_BASE + 0x2610))
100#define EP7312_PLLR ((volatile uint8_t*)(EP7312_REG_BASE + 0xA5A8))
101#define EP7312_RANDID0 ((volatile uint32_t*)(EP7312_REG_BASE + 0x2700))
102#define EP7312_RANDID1 ((volatile uint32_t*)(EP7312_REG_BASE + 0x2704))
103#define EP7312_RANDID2 ((volatile uint32_t*)(EP7312_REG_BASE + 0x2708))
104#define EP7312_RANDID3 ((volatile uint32_t*)(EP7312_REG_BASE + 0x270C))
105
106/* serial port bits */
107
113#define EP7312_UART_WRDLEN5 0x00000000
114#define EP7312_UART_WRDLEN6 0x00020000
115#define EP7312_UART_WRDLEN7 0x00040000
116#define EP7312_UART_WRDLEN8 0x00060000
117#define EP7312_UART_FIFOEN 0x00010000
118#define EP7312_UART_XSTOP 0x00008000
119#define EP7312_UART_EVENPRT 0x00004000
120#define EP7312_UART_PRTEN 0x00002000
121#define EP7312_UART_BREAK 0x00001000
122
130#define EP7312_UART_UTXINT1 0x00002000
131#define EP7312_UART_URXINT1 0x00001000
132
140#define EP7312_UART_FRMERR 0x00000100
141#define EP7312_UART_PARERR 0x00000200
142#define EP7312_UART_OVERR 0x00000400
143
151#define EP7312_UART_UBUSY1 0x00000800
152#define EP7312_UART_URXFE1 0x00400000
153#define EP7312_UART_UTXFF1 0x00800000
154
157/* system configuration bits */
158
164#define EP7312_SYSCON1_UART1EN 0x00000100
165#define EP7312_SYSCON1_TC1_PRESCALE 0x00000010
166#define EP7312_SYSCON1_TC1_512KHZ 0x00000020
167#define EP7312_SYSCON1_TC2_PRESCALE 0x00000040
168#define EP7312_SYSCON1_TC2_512KHZ 0x00000080
169
177#define EP7312_INTR1_EXTFIQ 0x00000001
178#define EP7312_INTR1_BLINT 0x00000002
179#define EP7312_INTR1_WEINT 0x00000004
180#define EP7312_INTR1_MCINT 0x00000008
181#define EP7312_INTR1_CSINT 0x00000010
182#define EP7312_INTR1_EINT1 0x00000020
183#define EP7312_INTR1_EINT2 0x00000040
184#define EP7312_INTR1_EINT3 0x00000080
185#define EP7312_INTR1_TC1OI 0x00000100
186#define EP7312_INTR1_TC2OI 0x00000200
187#define EP7312_INTR1_RTCMI 0x00000400
188#define EP7312_INTR1_TINT 0x00000800
189#define EP7312_INTR1_URXINT1 0x00001000
190#define EP7312_INTR1_UTXINT1 0x00002000
191#define EP7312_INTR1_UMSINT 0x00004000
192#define EP7312_INTR1_SSEOTI 0x00008000
193
201#define EP7312_INTR2_KBDINT 0x00000001
202#define EP7312_INTR2_SS2RX 0x00000002
203#define EP7312_INTR2_SS2TX 0x00000004
204#define EP7312_INTR2_URXINT2 0x00001000
205#define EP7312_INTR2_UTXINT2 0x00002000
206
214#define EP7312_INTR2_DAIINT 0x00000001
215
220#endif /* __EP7312_H__ */