wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * FILE SA-1100.h |
| 3 | * |
| 4 | * Version 1.2 |
| 5 | * Author Copyright (c) Marc A. Viredaz, 1998 |
| 6 | * DEC Western Research Laboratory, Palo Alto, CA |
| 7 | * Date January 1998 (April 1997) |
| 8 | * System StrongARM SA-1100 |
| 9 | * Language C or ARM Assembly |
| 10 | * Purpose Definition of constants related to the StrongARM |
| 11 | * SA-1100 microprocessor (Advanced RISC Machine (ARM) |
| 12 | * architecture version 4). This file is based on the |
| 13 | * StrongARM SA-1100 data sheet version 2.2. |
| 14 | * |
| 15 | * Language-specific definitions are selected by the |
| 16 | * macro "LANGUAGE", which should be defined as either |
| 17 | * "C" (default) or "Assembly". |
| 18 | */ |
| 19 | |
| 20 | |
| 21 | #ifndef LANGUAGE |
| 22 | # ifdef __ASSEMBLY__ |
| 23 | # define LANGUAGE Assembly |
| 24 | # else |
| 25 | # define LANGUAGE C |
| 26 | # endif |
| 27 | #endif |
| 28 | |
| 29 | #ifndef io_p2v |
| 30 | #define io_p2v(PhAdd) (PhAdd) |
| 31 | #endif |
| 32 | |
| 33 | #include <asm/arch-sa1100/bitfield.h> |
| 34 | |
| 35 | #define C 0 |
| 36 | #define Assembly 1 |
| 37 | |
| 38 | |
| 39 | #if LANGUAGE == C |
| 40 | typedef unsigned short Word16 ; |
| 41 | typedef unsigned int Word32 ; |
| 42 | typedef Word32 Word ; |
| 43 | typedef Word Quad [4] ; |
| 44 | typedef void *Address ; |
| 45 | typedef void (*ExcpHndlr) (void) ; |
| 46 | #endif /* LANGUAGE == C */ |
| 47 | |
| 48 | |
| 49 | /* |
| 50 | * Memory |
| 51 | */ |
| 52 | |
| 53 | #define MemBnkSp 0x08000000 /* Memory Bank Space [byte] */ |
| 54 | |
| 55 | #define StMemBnkSp MemBnkSp /* Static Memory Bank Space [byte] */ |
| 56 | #define StMemBnk0Sp StMemBnkSp /* Static Memory Bank 0 Space */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 57 | /* [byte] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 58 | #define StMemBnk1Sp StMemBnkSp /* Static Memory Bank 1 Space */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 59 | /* [byte] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 60 | #define StMemBnk2Sp StMemBnkSp /* Static Memory Bank 2 Space */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 61 | /* [byte] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 62 | #define StMemBnk3Sp StMemBnkSp /* Static Memory Bank 3 Space */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 63 | /* [byte] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 64 | |
| 65 | #define DRAMBnkSp MemBnkSp /* DRAM Bank Space [byte] */ |
| 66 | #define DRAMBnk0Sp DRAMBnkSp /* DRAM Bank 0 Space [byte] */ |
| 67 | #define DRAMBnk1Sp DRAMBnkSp /* DRAM Bank 1 Space [byte] */ |
| 68 | #define DRAMBnk2Sp DRAMBnkSp /* DRAM Bank 2 Space [byte] */ |
| 69 | #define DRAMBnk3Sp DRAMBnkSp /* DRAM Bank 3 Space [byte] */ |
| 70 | |
| 71 | #define ZeroMemSp MemBnkSp /* Zero Memory bank Space [byte] */ |
| 72 | |
| 73 | #define _StMemBnk(Nb) /* Static Memory Bank [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 74 | (0x00000000 + (Nb)*StMemBnkSp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 75 | #define _StMemBnk0 _StMemBnk (0) /* Static Memory Bank 0 */ |
| 76 | #define _StMemBnk1 _StMemBnk (1) /* Static Memory Bank 1 */ |
| 77 | #define _StMemBnk2 _StMemBnk (2) /* Static Memory Bank 2 */ |
| 78 | #define _StMemBnk3 _StMemBnk (3) /* Static Memory Bank 3 */ |
| 79 | |
| 80 | #if LANGUAGE == C |
| 81 | typedef Quad StMemBnkType [StMemBnkSp/sizeof (Quad)] ; |
| 82 | #define StMemBnk /* Static Memory Bank [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 83 | ((StMemBnkType *) io_p2v (_StMemBnk (0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 84 | #define StMemBnk0 (StMemBnk [0]) /* Static Memory Bank 0 */ |
| 85 | #define StMemBnk1 (StMemBnk [1]) /* Static Memory Bank 1 */ |
| 86 | #define StMemBnk2 (StMemBnk [2]) /* Static Memory Bank 2 */ |
| 87 | #define StMemBnk3 (StMemBnk [3]) /* Static Memory Bank 3 */ |
| 88 | #endif /* LANGUAGE == C */ |
| 89 | |
| 90 | #define _DRAMBnk(Nb) /* DRAM Bank [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 91 | (0xC0000000 + (Nb)*DRAMBnkSp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 92 | #define _DRAMBnk0 _DRAMBnk (0) /* DRAM Bank 0 */ |
| 93 | #define _DRAMBnk1 _DRAMBnk (1) /* DRAM Bank 1 */ |
| 94 | #define _DRAMBnk2 _DRAMBnk (2) /* DRAM Bank 2 */ |
| 95 | #define _DRAMBnk3 _DRAMBnk (3) /* DRAM Bank 3 */ |
| 96 | |
| 97 | #if LANGUAGE == C |
| 98 | typedef Quad DRAMBnkType [DRAMBnkSp/sizeof (Quad)] ; |
| 99 | #define DRAMBnk /* DRAM Bank [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 100 | ((DRAMBnkType *) io_p2v (_DRAMBnk (0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 101 | #define DRAMBnk0 (DRAMBnk [0]) /* DRAM Bank 0 */ |
| 102 | #define DRAMBnk1 (DRAMBnk [1]) /* DRAM Bank 1 */ |
| 103 | #define DRAMBnk2 (DRAMBnk [2]) /* DRAM Bank 2 */ |
| 104 | #define DRAMBnk3 (DRAMBnk [3]) /* DRAM Bank 3 */ |
| 105 | #endif /* LANGUAGE == C */ |
| 106 | |
| 107 | #define _ZeroMem 0xE0000000 /* Zero Memory bank */ |
| 108 | |
| 109 | #if LANGUAGE == C |
| 110 | typedef Quad ZeroMemType [ZeroMemSp/sizeof (Quad)] ; |
| 111 | #define ZeroMem /* Zero Memory bank */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 112 | (*((ZeroMemType *) io_p2v (_ZeroMem))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 113 | #endif /* LANGUAGE == C */ |
| 114 | |
| 115 | |
| 116 | /* |
| 117 | * Personal Computer Memory Card International Association (PCMCIA) sockets |
| 118 | */ |
| 119 | |
| 120 | #define PCMCIAPrtSp 0x04000000 /* PCMCIA Partition Space [byte] */ |
| 121 | #define PCMCIASp (4*PCMCIAPrtSp) /* PCMCIA Space [byte] */ |
| 122 | #define PCMCIAIOSp PCMCIAPrtSp /* PCMCIA I/O Space [byte] */ |
| 123 | #define PCMCIAAttrSp PCMCIAPrtSp /* PCMCIA Attribute Space [byte] */ |
| 124 | #define PCMCIAMemSp PCMCIAPrtSp /* PCMCIA Memory Space [byte] */ |
| 125 | |
| 126 | #define PCMCIA0Sp PCMCIASp /* PCMCIA 0 Space [byte] */ |
| 127 | #define PCMCIA0IOSp PCMCIAIOSp /* PCMCIA 0 I/O Space [byte] */ |
| 128 | #define PCMCIA0AttrSp PCMCIAAttrSp /* PCMCIA 0 Attribute Space [byte] */ |
| 129 | #define PCMCIA0MemSp PCMCIAMemSp /* PCMCIA 0 Memory Space [byte] */ |
| 130 | |
| 131 | #define PCMCIA1Sp PCMCIASp /* PCMCIA 1 Space [byte] */ |
| 132 | #define PCMCIA1IOSp PCMCIAIOSp /* PCMCIA 1 I/O Space [byte] */ |
| 133 | #define PCMCIA1AttrSp PCMCIAAttrSp /* PCMCIA 1 Attribute Space [byte] */ |
| 134 | #define PCMCIA1MemSp PCMCIAMemSp /* PCMCIA 1 Memory Space [byte] */ |
| 135 | |
| 136 | #define _PCMCIA(Nb) /* PCMCIA [0..1] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 137 | (0x20000000 + (Nb)*PCMCIASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 138 | #define _PCMCIAIO(Nb) _PCMCIA (Nb) /* PCMCIA I/O [0..1] */ |
| 139 | #define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 140 | (_PCMCIA (Nb) + 2*PCMCIAPrtSp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 141 | #define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 142 | (_PCMCIA (Nb) + 3*PCMCIAPrtSp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 143 | |
| 144 | #define _PCMCIA0 _PCMCIA (0) /* PCMCIA 0 */ |
| 145 | #define _PCMCIA0IO _PCMCIAIO (0) /* PCMCIA 0 I/O */ |
| 146 | #define _PCMCIA0Attr _PCMCIAAttr (0) /* PCMCIA 0 Attribute */ |
| 147 | #define _PCMCIA0Mem _PCMCIAMem (0) /* PCMCIA 0 Memory */ |
| 148 | |
| 149 | #define _PCMCIA1 _PCMCIA (1) /* PCMCIA 1 */ |
| 150 | #define _PCMCIA1IO _PCMCIAIO (1) /* PCMCIA 1 I/O */ |
| 151 | #define _PCMCIA1Attr _PCMCIAAttr (1) /* PCMCIA 1 Attribute */ |
| 152 | #define _PCMCIA1Mem _PCMCIAMem (1) /* PCMCIA 1 Memory */ |
| 153 | |
| 154 | #if LANGUAGE == C |
| 155 | |
| 156 | typedef Quad PCMCIAPrtType [PCMCIAPrtSp/sizeof (Quad)] ; |
| 157 | typedef PCMCIAPrtType PCMCIAType [PCMCIASp/PCMCIAPrtSp] ; |
| 158 | |
| 159 | #define PCMCIA0 /* PCMCIA 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 160 | (*((PCMCIAType *) io_p2v (_PCMCIA0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 161 | #define PCMCIA0IO /* PCMCIA 0 I/O */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 162 | (*((PCMCIAPrtType *) io_p2v (_PCMCIA0IO))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 163 | #define PCMCIA0Attr /* PCMCIA 0 Attribute */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 164 | (*((PCMCIAPrtType *) io_p2v (_PCMCIA0Attr))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 165 | #define PCMCIA0Mem /* PCMCIA 0 Memory */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 166 | (*((PCMCIAPrtType *) io_p2v (_PCMCIA0Mem))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 167 | |
| 168 | #define PCMCIA1 /* PCMCIA 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 169 | (*((PCMCIAType *) io_p2v (_PCMCIA1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 170 | #define PCMCIA1IO /* PCMCIA 1 I/O */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 171 | (*((PCMCIAPrtType *) io_p2v (_PCMCIA1IO))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 172 | #define PCMCIA1Attr /* PCMCIA 1 Attribute */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 173 | (*((PCMCIAPrtType *) io_p2v (_PCMCIA1Attr))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 174 | #define PCMCIA1Mem /* PCMCIA 1 Memory */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 175 | (*((PCMCIAPrtType *) io_p2v (_PCMCIA1Mem))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 176 | |
| 177 | #endif /* LANGUAGE == C */ |
| 178 | |
| 179 | |
| 180 | /* |
| 181 | * Universal Serial Bus (USB) Device Controller (UDC) control registers |
| 182 | * |
| 183 | * Registers |
| 184 | * Ser0UDCCR Serial port 0 Universal Serial Bus (USB) Device |
| 185 | * Controller (UDC) Control Register (read/write). |
| 186 | * Ser0UDCAR Serial port 0 Universal Serial Bus (USB) Device |
| 187 | * Controller (UDC) Address Register (read/write). |
| 188 | * Ser0UDCOMP Serial port 0 Universal Serial Bus (USB) Device |
| 189 | * Controller (UDC) Output Maximum Packet size register |
| 190 | * (read/write). |
| 191 | * Ser0UDCIMP Serial port 0 Universal Serial Bus (USB) Device |
| 192 | * Controller (UDC) Input Maximum Packet size register |
| 193 | * (read/write). |
| 194 | * Ser0UDCCS0 Serial port 0 Universal Serial Bus (USB) Device |
| 195 | * Controller (UDC) Control/Status register end-point 0 |
| 196 | * (read/write). |
| 197 | * Ser0UDCCS1 Serial port 0 Universal Serial Bus (USB) Device |
| 198 | * Controller (UDC) Control/Status register end-point 1 |
| 199 | * (output, read/write). |
| 200 | * Ser0UDCCS2 Serial port 0 Universal Serial Bus (USB) Device |
| 201 | * Controller (UDC) Control/Status register end-point 2 |
| 202 | * (input, read/write). |
| 203 | * Ser0UDCD0 Serial port 0 Universal Serial Bus (USB) Device |
| 204 | * Controller (UDC) Data register end-point 0 |
| 205 | * (read/write). |
| 206 | * Ser0UDCWC Serial port 0 Universal Serial Bus (USB) Device |
| 207 | * Controller (UDC) Write Count register end-point 0 |
| 208 | * (read). |
| 209 | * Ser0UDCDR Serial port 0 Universal Serial Bus (USB) Device |
| 210 | * Controller (UDC) Data Register (read/write). |
| 211 | * Ser0UDCSR Serial port 0 Universal Serial Bus (USB) Device |
| 212 | * Controller (UDC) Status Register (read/write). |
| 213 | */ |
| 214 | |
| 215 | #define _Ser0UDCCR 0x80000000 /* Ser. port 0 UDC Control Reg. */ |
| 216 | #define _Ser0UDCAR 0x80000004 /* Ser. port 0 UDC Address Reg. */ |
| 217 | #define _Ser0UDCOMP 0x80000008 /* Ser. port 0 UDC Output Maximum */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 218 | /* Packet size reg. */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 219 | #define _Ser0UDCIMP 0x8000000C /* Ser. port 0 UDC Input Maximum */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 220 | /* Packet size reg. */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 221 | #define _Ser0UDCCS0 0x80000010 /* Ser. port 0 UDC Control/Status */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 222 | /* reg. end-point 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 223 | #define _Ser0UDCCS1 0x80000014 /* Ser. port 0 UDC Control/Status */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 224 | /* reg. end-point 1 (output) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 225 | #define _Ser0UDCCS2 0x80000018 /* Ser. port 0 UDC Control/Status */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 226 | /* reg. end-point 2 (input) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 227 | #define _Ser0UDCD0 0x8000001C /* Ser. port 0 UDC Data reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 228 | /* end-point 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 229 | #define _Ser0UDCWC 0x80000020 /* Ser. port 0 UDC Write Count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 230 | /* reg. end-point 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 231 | #define _Ser0UDCDR 0x80000028 /* Ser. port 0 UDC Data Reg. */ |
| 232 | #define _Ser0UDCSR 0x80000030 /* Ser. port 0 UDC Status Reg. */ |
| 233 | |
| 234 | #if LANGUAGE == C |
| 235 | #define Ser0UDCCR /* Ser. port 0 UDC Control Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 236 | (*((volatile Word *) io_p2v (_Ser0UDCCR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 237 | #define Ser0UDCAR /* Ser. port 0 UDC Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 238 | (*((volatile Word *) io_p2v (_Ser0UDCAR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 239 | #define Ser0UDCOMP /* Ser. port 0 UDC Output Maximum */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 240 | /* Packet size reg. */ \ |
| 241 | (*((volatile Word *) io_p2v (_Ser0UDCOMP))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 242 | #define Ser0UDCIMP /* Ser. port 0 UDC Input Maximum */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 243 | /* Packet size reg. */ \ |
| 244 | (*((volatile Word *) io_p2v (_Ser0UDCIMP))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 245 | #define Ser0UDCCS0 /* Ser. port 0 UDC Control/Status */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 246 | /* reg. end-point 0 */ \ |
| 247 | (*((volatile Word *) io_p2v (_Ser0UDCCS0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 248 | #define Ser0UDCCS1 /* Ser. port 0 UDC Control/Status */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 249 | /* reg. end-point 1 (output) */ \ |
| 250 | (*((volatile Word *) io_p2v (_Ser0UDCCS1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 251 | #define Ser0UDCCS2 /* Ser. port 0 UDC Control/Status */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 252 | /* reg. end-point 2 (input) */ \ |
| 253 | (*((volatile Word *) io_p2v (_Ser0UDCCS2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 254 | #define Ser0UDCD0 /* Ser. port 0 UDC Data reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 255 | /* end-point 0 */ \ |
| 256 | (*((volatile Word *) io_p2v (_Ser0UDCD0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 257 | #define Ser0UDCWC /* Ser. port 0 UDC Write Count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 258 | /* reg. end-point 0 */ \ |
| 259 | (*((volatile Word *) io_p2v (_Ser0UDCWC))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 260 | #define Ser0UDCDR /* Ser. port 0 UDC Data Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 261 | (*((volatile Word *) io_p2v (_Ser0UDCDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 262 | #define Ser0UDCSR /* Ser. port 0 UDC Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 263 | (*((volatile Word *) io_p2v (_Ser0UDCSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 264 | #endif /* LANGUAGE == C */ |
| 265 | |
| 266 | #define UDCCR_UDD 0x00000001 /* UDC Disable */ |
| 267 | #define UDCCR_UDA 0x00000002 /* UDC Active (read) */ |
| 268 | #define UDCCR_RESIM 0x00000004 /* Resume Interrupt Mask, per errata */ |
| 269 | #define UDCCR_EIM 0x00000008 /* End-point 0 Interrupt Mask */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 270 | /* (disable) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 271 | #define UDCCR_RIM 0x00000010 /* Receive Interrupt Mask */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 272 | /* (disable) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 273 | #define UDCCR_TIM 0x00000020 /* Transmit Interrupt Mask */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 274 | /* (disable) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 275 | #define UDCCR_SRM 0x00000040 /* Suspend/Resume interrupt Mask */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 276 | /* (disable) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 277 | #define UDCCR_SUSIM UDCCR_SRM /* Per errata, SRM just masks suspend */ |
| 278 | #define UDCCR_REM 0x00000080 /* REset interrupt Mask (disable) */ |
| 279 | |
| 280 | #define UDCAR_ADD Fld (7, 0) /* function ADDress */ |
| 281 | |
| 282 | #define UDCOMP_OUTMAXP Fld (8, 0) /* OUTput MAXimum Packet size - 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 283 | /* [byte] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 284 | #define UDCOMP_OutMaxPkt(Size) /* Output Maximum Packet size */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 285 | /* [1..256 byte] */ \ |
| 286 | (((Size) - 1) << FShft (UDCOMP_OUTMAXP)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 287 | |
| 288 | #define UDCIMP_INMAXP Fld (8, 0) /* INput MAXimum Packet size - 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 289 | /* [byte] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 290 | #define UDCIMP_InMaxPkt(Size) /* Input Maximum Packet size */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 291 | /* [1..256 byte] */ \ |
| 292 | (((Size) - 1) << FShft (UDCIMP_INMAXP)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 293 | |
| 294 | #define UDCCS0_OPR 0x00000001 /* Output Packet Ready (read) */ |
| 295 | #define UDCCS0_IPR 0x00000002 /* Input Packet Ready */ |
| 296 | #define UDCCS0_SST 0x00000004 /* Sent STall */ |
| 297 | #define UDCCS0_FST 0x00000008 /* Force STall */ |
| 298 | #define UDCCS0_DE 0x00000010 /* Data End */ |
| 299 | #define UDCCS0_SE 0x00000020 /* Setup End (read) */ |
| 300 | #define UDCCS0_SO 0x00000040 /* Serviced Output packet ready */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 301 | /* (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 302 | #define UDCCS0_SSE 0x00000080 /* Serviced Setup End (write) */ |
| 303 | |
| 304 | #define UDCCS1_RFS 0x00000001 /* Receive FIFO 12-bytes or more */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 305 | /* Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 306 | #define UDCCS1_RPC 0x00000002 /* Receive Packet Complete */ |
| 307 | #define UDCCS1_RPE 0x00000004 /* Receive Packet Error (read) */ |
| 308 | #define UDCCS1_SST 0x00000008 /* Sent STall */ |
| 309 | #define UDCCS1_FST 0x00000010 /* Force STall */ |
| 310 | #define UDCCS1_RNE 0x00000020 /* Receive FIFO Not Empty (read) */ |
| 311 | |
| 312 | #define UDCCS2_TFS 0x00000001 /* Transmit FIFO 8-bytes or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 313 | /* Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 314 | #define UDCCS2_TPC 0x00000002 /* Transmit Packet Complete */ |
| 315 | #define UDCCS2_TPE 0x00000004 /* Transmit Packet Error (read) */ |
| 316 | #define UDCCS2_TUR 0x00000008 /* Transmit FIFO Under-Run */ |
| 317 | #define UDCCS2_SST 0x00000010 /* Sent STall */ |
| 318 | #define UDCCS2_FST 0x00000020 /* Force STall */ |
| 319 | |
| 320 | #define UDCD0_DATA Fld (8, 0) /* receive/transmit DATA FIFOs */ |
| 321 | |
| 322 | #define UDCWC_WC Fld (4, 0) /* Write Count */ |
| 323 | |
| 324 | #define UDCDR_DATA Fld (8, 0) /* receive/transmit DATA FIFOs */ |
| 325 | |
| 326 | #define UDCSR_EIR 0x00000001 /* End-point 0 Interrupt Request */ |
| 327 | #define UDCSR_RIR 0x00000002 /* Receive Interrupt Request */ |
| 328 | #define UDCSR_TIR 0x00000004 /* Transmit Interrupt Request */ |
| 329 | #define UDCSR_SUSIR 0x00000008 /* SUSpend Interrupt Request */ |
| 330 | #define UDCSR_RESIR 0x00000010 /* RESume Interrupt Request */ |
| 331 | #define UDCSR_RSTIR 0x00000020 /* ReSeT Interrupt Request */ |
| 332 | |
| 333 | |
| 334 | /* |
| 335 | * Universal Asynchronous Receiver/Transmitter (UART) control registers |
| 336 | * |
| 337 | * Registers |
| 338 | * Ser1UTCR0 Serial port 1 Universal Asynchronous |
| 339 | * Receiver/Transmitter (UART) Control Register 0 |
| 340 | * (read/write). |
| 341 | * Ser1UTCR1 Serial port 1 Universal Asynchronous |
| 342 | * Receiver/Transmitter (UART) Control Register 1 |
| 343 | * (read/write). |
| 344 | * Ser1UTCR2 Serial port 1 Universal Asynchronous |
| 345 | * Receiver/Transmitter (UART) Control Register 2 |
| 346 | * (read/write). |
| 347 | * Ser1UTCR3 Serial port 1 Universal Asynchronous |
| 348 | * Receiver/Transmitter (UART) Control Register 3 |
| 349 | * (read/write). |
| 350 | * Ser1UTDR Serial port 1 Universal Asynchronous |
| 351 | * Receiver/Transmitter (UART) Data Register |
| 352 | * (read/write). |
| 353 | * Ser1UTSR0 Serial port 1 Universal Asynchronous |
| 354 | * Receiver/Transmitter (UART) Status Register 0 |
| 355 | * (read/write). |
| 356 | * Ser1UTSR1 Serial port 1 Universal Asynchronous |
| 357 | * Receiver/Transmitter (UART) Status Register 1 (read). |
| 358 | * |
| 359 | * Ser2UTCR0 Serial port 2 Universal Asynchronous |
| 360 | * Receiver/Transmitter (UART) Control Register 0 |
| 361 | * (read/write). |
| 362 | * Ser2UTCR1 Serial port 2 Universal Asynchronous |
| 363 | * Receiver/Transmitter (UART) Control Register 1 |
| 364 | * (read/write). |
| 365 | * Ser2UTCR2 Serial port 2 Universal Asynchronous |
| 366 | * Receiver/Transmitter (UART) Control Register 2 |
| 367 | * (read/write). |
| 368 | * Ser2UTCR3 Serial port 2 Universal Asynchronous |
| 369 | * Receiver/Transmitter (UART) Control Register 3 |
| 370 | * (read/write). |
| 371 | * Ser2UTCR4 Serial port 2 Universal Asynchronous |
| 372 | * Receiver/Transmitter (UART) Control Register 4 |
| 373 | * (read/write). |
| 374 | * Ser2UTDR Serial port 2 Universal Asynchronous |
| 375 | * Receiver/Transmitter (UART) Data Register |
| 376 | * (read/write). |
| 377 | * Ser2UTSR0 Serial port 2 Universal Asynchronous |
| 378 | * Receiver/Transmitter (UART) Status Register 0 |
| 379 | * (read/write). |
| 380 | * Ser2UTSR1 Serial port 2 Universal Asynchronous |
| 381 | * Receiver/Transmitter (UART) Status Register 1 (read). |
| 382 | * |
| 383 | * Ser3UTCR0 Serial port 3 Universal Asynchronous |
| 384 | * Receiver/Transmitter (UART) Control Register 0 |
| 385 | * (read/write). |
| 386 | * Ser3UTCR1 Serial port 3 Universal Asynchronous |
| 387 | * Receiver/Transmitter (UART) Control Register 1 |
| 388 | * (read/write). |
| 389 | * Ser3UTCR2 Serial port 3 Universal Asynchronous |
| 390 | * Receiver/Transmitter (UART) Control Register 2 |
| 391 | * (read/write). |
| 392 | * Ser3UTCR3 Serial port 3 Universal Asynchronous |
| 393 | * Receiver/Transmitter (UART) Control Register 3 |
| 394 | * (read/write). |
| 395 | * Ser3UTDR Serial port 3 Universal Asynchronous |
| 396 | * Receiver/Transmitter (UART) Data Register |
| 397 | * (read/write). |
| 398 | * Ser3UTSR0 Serial port 3 Universal Asynchronous |
| 399 | * Receiver/Transmitter (UART) Status Register 0 |
| 400 | * (read/write). |
| 401 | * Ser3UTSR1 Serial port 3 Universal Asynchronous |
| 402 | * Receiver/Transmitter (UART) Status Register 1 (read). |
| 403 | * |
| 404 | * Clocks |
| 405 | * fxtl, Txtl Frequency, period of the system crystal (3.6864 MHz |
| 406 | * or 3.5795 MHz). |
| 407 | * fua, Tua Frequency, period of the UART communication. |
| 408 | */ |
| 409 | |
| 410 | #define _UTCR0(Nb) /* UART Control Reg. 0 [1..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 411 | (0x80010000 + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 412 | #define _UTCR1(Nb) /* UART Control Reg. 1 [1..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 413 | (0x80010004 + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 414 | #define _UTCR2(Nb) /* UART Control Reg. 2 [1..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 415 | (0x80010008 + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 416 | #define _UTCR3(Nb) /* UART Control Reg. 3 [1..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 417 | (0x8001000C + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 418 | #define _UTCR4(Nb) /* UART Control Reg. 4 [2] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 419 | (0x80010010 + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 420 | #define _UTDR(Nb) /* UART Data Reg. [1..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 421 | (0x80010014 + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 422 | #define _UTSR0(Nb) /* UART Status Reg. 0 [1..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 423 | (0x8001001C + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 424 | #define _UTSR1(Nb) /* UART Status Reg. 1 [1..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 425 | (0x80010020 + ((Nb) - 1)*0x00020000) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 426 | |
| 427 | #define _Ser1UTCR0 _UTCR0 (1) /* Ser. port 1 UART Control Reg. 0 */ |
| 428 | #define _Ser1UTCR1 _UTCR1 (1) /* Ser. port 1 UART Control Reg. 1 */ |
| 429 | #define _Ser1UTCR2 _UTCR2 (1) /* Ser. port 1 UART Control Reg. 2 */ |
| 430 | #define _Ser1UTCR3 _UTCR3 (1) /* Ser. port 1 UART Control Reg. 3 */ |
| 431 | #define _Ser1UTDR _UTDR (1) /* Ser. port 1 UART Data Reg. */ |
| 432 | #define _Ser1UTSR0 _UTSR0 (1) /* Ser. port 1 UART Status Reg. 0 */ |
| 433 | #define _Ser1UTSR1 _UTSR1 (1) /* Ser. port 1 UART Status Reg. 1 */ |
| 434 | |
| 435 | #define _Ser2UTCR0 _UTCR0 (2) /* Ser. port 2 UART Control Reg. 0 */ |
| 436 | #define _Ser2UTCR1 _UTCR1 (2) /* Ser. port 2 UART Control Reg. 1 */ |
| 437 | #define _Ser2UTCR2 _UTCR2 (2) /* Ser. port 2 UART Control Reg. 2 */ |
| 438 | #define _Ser2UTCR3 _UTCR3 (2) /* Ser. port 2 UART Control Reg. 3 */ |
| 439 | #define _Ser2UTCR4 _UTCR4 (2) /* Ser. port 2 UART Control Reg. 4 */ |
| 440 | #define _Ser2UTDR _UTDR (2) /* Ser. port 2 UART Data Reg. */ |
| 441 | #define _Ser2UTSR0 _UTSR0 (2) /* Ser. port 2 UART Status Reg. 0 */ |
| 442 | #define _Ser2UTSR1 _UTSR1 (2) /* Ser. port 2 UART Status Reg. 1 */ |
| 443 | |
| 444 | #define _Ser3UTCR0 _UTCR0 (3) /* Ser. port 3 UART Control Reg. 0 */ |
| 445 | #define _Ser3UTCR1 _UTCR1 (3) /* Ser. port 3 UART Control Reg. 1 */ |
| 446 | #define _Ser3UTCR2 _UTCR2 (3) /* Ser. port 3 UART Control Reg. 2 */ |
| 447 | #define _Ser3UTCR3 _UTCR3 (3) /* Ser. port 3 UART Control Reg. 3 */ |
| 448 | #define _Ser3UTDR _UTDR (3) /* Ser. port 3 UART Data Reg. */ |
| 449 | #define _Ser3UTSR0 _UTSR0 (3) /* Ser. port 3 UART Status Reg. 0 */ |
| 450 | #define _Ser3UTSR1 _UTSR1 (3) /* Ser. port 3 UART Status Reg. 1 */ |
| 451 | |
| 452 | #if LANGUAGE == C |
| 453 | |
| 454 | #define Ser1UTCR0 /* Ser. port 1 UART Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 455 | (*((volatile Word *) io_p2v (_Ser1UTCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 456 | #define Ser1UTCR1 /* Ser. port 1 UART Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 457 | (*((volatile Word *) io_p2v (_Ser1UTCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 458 | #define Ser1UTCR2 /* Ser. port 1 UART Control Reg. 2 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 459 | (*((volatile Word *) io_p2v (_Ser1UTCR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 460 | #define Ser1UTCR3 /* Ser. port 1 UART Control Reg. 3 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 461 | (*((volatile Word *) io_p2v (_Ser1UTCR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 462 | #define Ser1UTDR /* Ser. port 1 UART Data Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 463 | (*((volatile Word *) io_p2v (_Ser1UTDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 464 | #define Ser1UTSR0 /* Ser. port 1 UART Status Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 465 | (*((volatile Word *) io_p2v (_Ser1UTSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 466 | #define Ser1UTSR1 /* Ser. port 1 UART Status Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 467 | (*((volatile Word *) io_p2v (_Ser1UTSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 468 | |
| 469 | #define Ser2UTCR0 /* Ser. port 2 UART Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 470 | (*((volatile Word *) io_p2v (_Ser2UTCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 471 | #define Ser2UTCR1 /* Ser. port 2 UART Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 472 | (*((volatile Word *) io_p2v (_Ser2UTCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 473 | #define Ser2UTCR2 /* Ser. port 2 UART Control Reg. 2 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 474 | (*((volatile Word *) io_p2v (_Ser2UTCR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 475 | #define Ser2UTCR3 /* Ser. port 2 UART Control Reg. 3 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 476 | (*((volatile Word *) io_p2v (_Ser2UTCR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 477 | #define Ser2UTCR4 /* Ser. port 2 UART Control Reg. 4 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 478 | (*((volatile Word *) io_p2v (_Ser2UTCR4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 479 | #define Ser2UTDR /* Ser. port 2 UART Data Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 480 | (*((volatile Word *) io_p2v (_Ser2UTDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 481 | #define Ser2UTSR0 /* Ser. port 2 UART Status Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 482 | (*((volatile Word *) io_p2v (_Ser2UTSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 483 | #define Ser2UTSR1 /* Ser. port 2 UART Status Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 484 | (*((volatile Word *) io_p2v (_Ser2UTSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 485 | |
| 486 | #define Ser3UTCR0 /* Ser. port 3 UART Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 487 | (*((volatile Word *) io_p2v (_Ser3UTCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 488 | #define Ser3UTCR1 /* Ser. port 3 UART Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 489 | (*((volatile Word *) io_p2v (_Ser3UTCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 490 | #define Ser3UTCR2 /* Ser. port 3 UART Control Reg. 2 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 491 | (*((volatile Word *) io_p2v (_Ser3UTCR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 492 | #define Ser3UTCR3 /* Ser. port 3 UART Control Reg. 3 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 493 | (*((volatile Word *) io_p2v (_Ser3UTCR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 494 | #define Ser3UTDR /* Ser. port 3 UART Data Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 495 | (*((volatile Word *) io_p2v (_Ser3UTDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 496 | #define Ser3UTSR0 /* Ser. port 3 UART Status Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 497 | (*((volatile Word *) io_p2v (_Ser3UTSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 498 | #define Ser3UTSR1 /* Ser. port 3 UART Status Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 499 | (*((volatile Word *) io_p2v (_Ser3UTSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 500 | |
| 501 | #elif LANGUAGE == Assembly |
| 502 | #define Ser1UTCR0 ( io_p2v (_Ser1UTCR0)) |
| 503 | #define Ser1UTCR1 ( io_p2v (_Ser1UTCR1)) |
| 504 | #define Ser1UTCR2 ( io_p2v (_Ser1UTCR2)) |
| 505 | #define Ser1UTCR3 ( io_p2v (_Ser1UTCR3)) |
| 506 | #define Ser1UTDR ( io_p2v (_Ser1UTDR)) |
| 507 | #define Ser1UTSR0 ( io_p2v (_Ser1UTSR0)) |
| 508 | #define Ser1UTSR1 ( io_p2v (_Ser1UTSR1)) |
| 509 | |
| 510 | #define Ser2UTCR0 ( io_p2v (_Ser2UTCR0)) |
| 511 | #define Ser2UTCR1 ( io_p2v (_Ser2UTCR1)) |
| 512 | #define Ser2UTCR2 ( io_p2v (_Ser2UTCR2)) |
| 513 | #define Ser2UTCR3 ( io_p2v (_Ser2UTCR3)) |
| 514 | #define Ser2UTCR4 ( io_p2v (_Ser2UTCR4)) |
| 515 | #define Ser2UTDR ( io_p2v (_Ser2UTDR)) |
| 516 | #define Ser2UTSR0 ( io_p2v (_Ser2UTSR0)) |
| 517 | #define Ser2UTSR1 ( io_p2v (_Ser2UTSR1)) |
| 518 | |
| 519 | #define Ser3UTCR0 ( io_p2v (_Ser3UTCR0)) |
| 520 | #define Ser3UTCR1 ( io_p2v (_Ser3UTCR1)) |
| 521 | #define Ser3UTCR2 ( io_p2v (_Ser3UTCR2)) |
| 522 | #define Ser3UTCR3 ( io_p2v (_Ser3UTCR3)) |
| 523 | #define Ser3UTDR ( io_p2v (_Ser3UTDR)) |
| 524 | #define Ser3UTSR0 ( io_p2v (_Ser3UTSR0)) |
| 525 | #define Ser3UTSR1 ( io_p2v (_Ser3UTSR1)) |
| 526 | |
| 527 | #endif /* LANGUAGE == C */ |
| 528 | |
| 529 | #define UTCR0_PE 0x00000001 /* Parity Enable */ |
| 530 | #define UTCR0_OES 0x00000002 /* Odd/Even parity Select */ |
| 531 | #define UTCR0_OddPar (UTCR0_OES*0) /* Odd Parity */ |
| 532 | #define UTCR0_EvenPar (UTCR0_OES*1) /* Even Parity */ |
| 533 | #define UTCR0_SBS 0x00000004 /* Stop Bit Select */ |
| 534 | #define UTCR0_1StpBit (UTCR0_SBS*0) /* 1 Stop Bit per frame */ |
| 535 | #define UTCR0_2StpBit (UTCR0_SBS*1) /* 2 Stop Bits per frame */ |
| 536 | #define UTCR0_DSS 0x00000008 /* Data Size Select */ |
| 537 | #define UTCR0_7BitData (UTCR0_DSS*0) /* 7-Bit Data */ |
| 538 | #define UTCR0_8BitData (UTCR0_DSS*1) /* 8-Bit Data */ |
| 539 | #define UTCR0_SCE 0x00000010 /* Sample Clock Enable */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 540 | /* (ser. port 1: GPIO [18], */ |
| 541 | /* ser. port 3: GPIO [20]) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 542 | #define UTCR0_RCE 0x00000020 /* Receive Clock Edge select */ |
| 543 | #define UTCR0_RcRsEdg (UTCR0_RCE*0) /* Receive clock Rising-Edge */ |
| 544 | #define UTCR0_RcFlEdg (UTCR0_RCE*1) /* Receive clock Falling-Edge */ |
| 545 | #define UTCR0_TCE 0x00000040 /* Transmit Clock Edge select */ |
| 546 | #define UTCR0_TrRsEdg (UTCR0_TCE*0) /* Transmit clock Rising-Edge */ |
| 547 | #define UTCR0_TrFlEdg (UTCR0_TCE*1) /* Transmit clock Falling-Edge */ |
| 548 | #define UTCR0_Ser2IrDA /* Ser. port 2 IrDA settings */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 549 | (UTCR0_1StpBit + UTCR0_8BitData) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 550 | |
| 551 | #define UTCR1_BRD Fld (4, 0) /* Baud Rate Divisor/16 - 1 [11:8] */ |
| 552 | #define UTCR2_BRD Fld (8, 0) /* Baud Rate Divisor/16 - 1 [7:0] */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 553 | /* fua = fxtl/(16*(BRD[11:0] + 1)) */ |
| 554 | /* Tua = 16*(BRD [11:0] + 1)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 555 | #define UTCR1_BdRtDiv(Div) /* Baud Rate Divisor [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 556 | (((Div) - 16)/16 >> FSize (UTCR2_BRD) << \ |
| 557 | FShft (UTCR1_BRD)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 558 | #define UTCR2_BdRtDiv(Div) /* Baud Rate Divisor [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 559 | (((Div) - 16)/16 & FAlnMsk (UTCR2_BRD) << \ |
| 560 | FShft (UTCR2_BRD)) |
| 561 | /* fua = fxtl/(16*Floor (Div/16)) */ |
| 562 | /* Tua = 16*Floor (Div/16)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 563 | #define UTCR1_CeilBdRtDiv(Div) /* Ceil. of BdRtDiv [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 564 | (((Div) - 1)/16 >> FSize (UTCR2_BRD) << \ |
| 565 | FShft (UTCR1_BRD)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 566 | #define UTCR2_CeilBdRtDiv(Div) /* Ceil. of BdRtDiv [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 567 | (((Div) - 1)/16 & FAlnMsk (UTCR2_BRD) << \ |
| 568 | FShft (UTCR2_BRD)) |
| 569 | /* fua = fxtl/(16*Ceil (Div/16)) */ |
| 570 | /* Tua = 16*Ceil (Div/16)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 571 | |
| 572 | #define UTCR3_RXE 0x00000001 /* Receive Enable */ |
| 573 | #define UTCR3_TXE 0x00000002 /* Transmit Enable */ |
| 574 | #define UTCR3_BRK 0x00000004 /* BReaK mode */ |
| 575 | #define UTCR3_RIE 0x00000008 /* Receive FIFO 1/3-to-2/3-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 576 | /* more Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 577 | #define UTCR3_TIE 0x00000010 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 578 | /* Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 579 | #define UTCR3_LBM 0x00000020 /* Look-Back Mode */ |
| 580 | #define UTCR3_Ser2IrDA /* Ser. port 2 IrDA settings (RIE, */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 581 | /* TIE, LBM can be set or cleared) */ \ |
| 582 | (UTCR3_RXE + UTCR3_TXE) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 583 | |
| 584 | #define UTCR4_HSE 0x00000001 /* Hewlett-Packard Serial InfraRed */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 585 | /* (HP-SIR) modulation Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 586 | #define UTCR4_NRZ (UTCR4_HSE*0) /* Non-Return to Zero modulation */ |
| 587 | #define UTCR4_HPSIR (UTCR4_HSE*1) /* HP-SIR modulation */ |
| 588 | #define UTCR4_LPM 0x00000002 /* Low-Power Mode */ |
| 589 | #define UTCR4_Z3_16Bit (UTCR4_LPM*0) /* Zero pulse = 3/16 Bit time */ |
| 590 | #define UTCR4_Z1_6us (UTCR4_LPM*1) /* Zero pulse = 1.6 us */ |
| 591 | |
| 592 | #define UTDR_DATA Fld (8, 0) /* receive/transmit DATA FIFOs */ |
| 593 | #if 0 /* Hidden receive FIFO bits */ |
| 594 | #define UTDR_PRE 0x00000100 /* receive PaRity Error (read) */ |
| 595 | #define UTDR_FRE 0x00000200 /* receive FRaming Error (read) */ |
| 596 | #define UTDR_ROR 0x00000400 /* Receive FIFO Over-Run (read) */ |
| 597 | #endif /* 0 */ |
| 598 | |
| 599 | #define UTSR0_TFS 0x00000001 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 600 | /* Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 601 | #define UTSR0_RFS 0x00000002 /* Receive FIFO 1/3-to-2/3-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 602 | /* more Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 603 | #define UTSR0_RID 0x00000004 /* Receiver IDle */ |
| 604 | #define UTSR0_RBB 0x00000008 /* Receive Beginning of Break */ |
| 605 | #define UTSR0_REB 0x00000010 /* Receive End of Break */ |
| 606 | #define UTSR0_EIF 0x00000020 /* Error In FIFO (read) */ |
| 607 | |
| 608 | #define UTSR1_TBY 0x00000001 /* Transmitter BusY (read) */ |
| 609 | #define UTSR1_RNE 0x00000002 /* Receive FIFO Not Empty (read) */ |
| 610 | #define UTSR1_TNF 0x00000004 /* Transmit FIFO Not Full (read) */ |
| 611 | #define UTSR1_PRE 0x00000008 /* receive PaRity Error (read) */ |
| 612 | #define UTSR1_FRE 0x00000010 /* receive FRaming Error (read) */ |
| 613 | #define UTSR1_ROR 0x00000020 /* Receive FIFO Over-Run (read) */ |
| 614 | |
| 615 | |
| 616 | /* |
| 617 | * Synchronous Data Link Controller (SDLC) control registers |
| 618 | * |
| 619 | * Registers |
| 620 | * Ser1SDCR0 Serial port 1 Synchronous Data Link Controller (SDLC) |
| 621 | * Control Register 0 (read/write). |
| 622 | * Ser1SDCR1 Serial port 1 Synchronous Data Link Controller (SDLC) |
| 623 | * Control Register 1 (read/write). |
| 624 | * Ser1SDCR2 Serial port 1 Synchronous Data Link Controller (SDLC) |
| 625 | * Control Register 2 (read/write). |
| 626 | * Ser1SDCR3 Serial port 1 Synchronous Data Link Controller (SDLC) |
| 627 | * Control Register 3 (read/write). |
| 628 | * Ser1SDCR4 Serial port 1 Synchronous Data Link Controller (SDLC) |
| 629 | * Control Register 4 (read/write). |
| 630 | * Ser1SDDR Serial port 1 Synchronous Data Link Controller (SDLC) |
| 631 | * Data Register (read/write). |
| 632 | * Ser1SDSR0 Serial port 1 Synchronous Data Link Controller (SDLC) |
| 633 | * Status Register 0 (read/write). |
| 634 | * Ser1SDSR1 Serial port 1 Synchronous Data Link Controller (SDLC) |
| 635 | * Status Register 1 (read/write). |
| 636 | * |
| 637 | * Clocks |
| 638 | * fxtl, Txtl Frequency, period of the system crystal (3.6864 MHz |
| 639 | * or 3.5795 MHz). |
| 640 | * fsd, Tsd Frequency, period of the SDLC communication. |
| 641 | */ |
| 642 | |
| 643 | #define _Ser1SDCR0 0x80020060 /* Ser. port 1 SDLC Control Reg. 0 */ |
| 644 | #define _Ser1SDCR1 0x80020064 /* Ser. port 1 SDLC Control Reg. 1 */ |
| 645 | #define _Ser1SDCR2 0x80020068 /* Ser. port 1 SDLC Control Reg. 2 */ |
| 646 | #define _Ser1SDCR3 0x8002006C /* Ser. port 1 SDLC Control Reg. 3 */ |
| 647 | #define _Ser1SDCR4 0x80020070 /* Ser. port 1 SDLC Control Reg. 4 */ |
| 648 | #define _Ser1SDDR 0x80020078 /* Ser. port 1 SDLC Data Reg. */ |
| 649 | #define _Ser1SDSR0 0x80020080 /* Ser. port 1 SDLC Status Reg. 0 */ |
| 650 | #define _Ser1SDSR1 0x80020084 /* Ser. port 1 SDLC Status Reg. 1 */ |
| 651 | |
| 652 | #if LANGUAGE == C |
| 653 | #define Ser1SDCR0 /* Ser. port 1 SDLC Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 654 | (*((volatile Word *) io_p2v (_Ser1SDCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 655 | #define Ser1SDCR1 /* Ser. port 1 SDLC Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 656 | (*((volatile Word *) io_p2v (_Ser1SDCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 657 | #define Ser1SDCR2 /* Ser. port 1 SDLC Control Reg. 2 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 658 | (*((volatile Word *) io_p2v (_Ser1SDCR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 659 | #define Ser1SDCR3 /* Ser. port 1 SDLC Control Reg. 3 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 660 | (*((volatile Word *) io_p2v (_Ser1SDCR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 661 | #define Ser1SDCR4 /* Ser. port 1 SDLC Control Reg. 4 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 662 | (*((volatile Word *) io_p2v (_Ser1SDCR4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 663 | #define Ser1SDDR /* Ser. port 1 SDLC Data Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 664 | (*((volatile Word *) io_p2v (_Ser1SDDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 665 | #define Ser1SDSR0 /* Ser. port 1 SDLC Status Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 666 | (*((volatile Word *) io_p2v (_Ser1SDSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 667 | #define Ser1SDSR1 /* Ser. port 1 SDLC Status Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 668 | (*((volatile Word *) io_p2v (_Ser1SDSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 669 | #endif /* LANGUAGE == C */ |
| 670 | |
| 671 | #define SDCR0_SUS 0x00000001 /* SDLC/UART Select */ |
| 672 | #define SDCR0_SDLC (SDCR0_SUS*0) /* SDLC mode (TXD1 & RXD1) */ |
| 673 | #define SDCR0_UART (SDCR0_SUS*1) /* UART mode (TXD1 & RXD1) */ |
| 674 | #define SDCR0_SDF 0x00000002 /* Single/Double start Flag select */ |
| 675 | #define SDCR0_SglFlg (SDCR0_SDF*0) /* Single start Flag */ |
| 676 | #define SDCR0_DblFlg (SDCR0_SDF*1) /* Double start Flag */ |
| 677 | #define SDCR0_LBM 0x00000004 /* Look-Back Mode */ |
| 678 | #define SDCR0_BMS 0x00000008 /* Bit Modulation Select */ |
| 679 | #define SDCR0_FM0 (SDCR0_BMS*0) /* Freq. Modulation zero (0) */ |
| 680 | #define SDCR0_NRZ (SDCR0_BMS*1) /* Non-Return to Zero modulation */ |
| 681 | #define SDCR0_SCE 0x00000010 /* Sample Clock Enable (GPIO [16]) */ |
| 682 | #define SDCR0_SCD 0x00000020 /* Sample Clock Direction select */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 683 | /* (GPIO [16]) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 684 | #define SDCR0_SClkIn (SDCR0_SCD*0) /* Sample Clock Input */ |
| 685 | #define SDCR0_SClkOut (SDCR0_SCD*1) /* Sample Clock Output */ |
| 686 | #define SDCR0_RCE 0x00000040 /* Receive Clock Edge select */ |
| 687 | #define SDCR0_RcRsEdg (SDCR0_RCE*0) /* Receive clock Rising-Edge */ |
| 688 | #define SDCR0_RcFlEdg (SDCR0_RCE*1) /* Receive clock Falling-Edge */ |
| 689 | #define SDCR0_TCE 0x00000080 /* Transmit Clock Edge select */ |
| 690 | #define SDCR0_TrRsEdg (SDCR0_TCE*0) /* Transmit clock Rising-Edge */ |
| 691 | #define SDCR0_TrFlEdg (SDCR0_TCE*1) /* Transmit clock Falling-Edge */ |
| 692 | |
| 693 | #define SDCR1_AAF 0x00000001 /* Abort After Frame enable */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 694 | /* (GPIO [17]) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 695 | #define SDCR1_TXE 0x00000002 /* Transmit Enable */ |
| 696 | #define SDCR1_RXE 0x00000004 /* Receive Enable */ |
| 697 | #define SDCR1_RIE 0x00000008 /* Receive FIFO 1/3-to-2/3-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 698 | /* more Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 699 | #define SDCR1_TIE 0x00000010 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 700 | /* Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 701 | #define SDCR1_AME 0x00000020 /* Address Match Enable */ |
| 702 | #define SDCR1_TUS 0x00000040 /* Transmit FIFO Under-run Select */ |
| 703 | #define SDCR1_EFrmURn (SDCR1_TUS*0) /* End Frame on Under-Run */ |
| 704 | #define SDCR1_AbortURn (SDCR1_TUS*1) /* Abort on Under-Run */ |
| 705 | #define SDCR1_RAE 0x00000080 /* Receive Abort interrupt Enable */ |
| 706 | |
| 707 | #define SDCR2_AMV Fld (8, 0) /* Address Match Value */ |
| 708 | |
| 709 | #define SDCR3_BRD Fld (4, 0) /* Baud Rate Divisor/16 - 1 [11:8] */ |
| 710 | #define SDCR4_BRD Fld (8, 0) /* Baud Rate Divisor/16 - 1 [7:0] */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 711 | /* fsd = fxtl/(16*(BRD[11:0] + 1)) */ |
| 712 | /* Tsd = 16*(BRD[11:0] + 1)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 713 | #define SDCR3_BdRtDiv(Div) /* Baud Rate Divisor [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 714 | (((Div) - 16)/16 >> FSize (SDCR4_BRD) << \ |
| 715 | FShft (SDCR3_BRD)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 716 | #define SDCR4_BdRtDiv(Div) /* Baud Rate Divisor [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 717 | (((Div) - 16)/16 & FAlnMsk (SDCR4_BRD) << \ |
| 718 | FShft (SDCR4_BRD)) |
| 719 | /* fsd = fxtl/(16*Floor (Div/16)) */ |
| 720 | /* Tsd = 16*Floor (Div/16)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 721 | #define SDCR3_CeilBdRtDiv(Div) /* Ceil. of BdRtDiv [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 722 | (((Div) - 1)/16 >> FSize (SDCR4_BRD) << \ |
| 723 | FShft (SDCR3_BRD)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 724 | #define SDCR4_CeilBdRtDiv(Div) /* Ceil. of BdRtDiv [16..65536] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 725 | (((Div) - 1)/16 & FAlnMsk (SDCR4_BRD) << \ |
| 726 | FShft (SDCR4_BRD)) |
| 727 | /* fsd = fxtl/(16*Ceil (Div/16)) */ |
| 728 | /* Tsd = 16*Ceil (Div/16)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 729 | |
| 730 | #define SDDR_DATA Fld (8, 0) /* receive/transmit DATA FIFOs */ |
| 731 | #if 0 /* Hidden receive FIFO bits */ |
| 732 | #define SDDR_EOF 0x00000100 /* receive End-Of-Frame (read) */ |
| 733 | #define SDDR_CRE 0x00000200 /* receive CRC Error (read) */ |
| 734 | #define SDDR_ROR 0x00000400 /* Receive FIFO Over-Run (read) */ |
| 735 | #endif /* 0 */ |
| 736 | |
| 737 | #define SDSR0_EIF 0x00000001 /* Error In FIFO (read) */ |
| 738 | #define SDSR0_TUR 0x00000002 /* Transmit FIFO Under-Run */ |
| 739 | #define SDSR0_RAB 0x00000004 /* Receive ABort */ |
| 740 | #define SDSR0_TFS 0x00000008 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 741 | /* Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 742 | #define SDSR0_RFS 0x00000010 /* Receive FIFO 1/3-to-2/3-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 743 | /* more Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 744 | |
| 745 | #define SDSR1_RSY 0x00000001 /* Receiver SYnchronized (read) */ |
| 746 | #define SDSR1_TBY 0x00000002 /* Transmitter BusY (read) */ |
| 747 | #define SDSR1_RNE 0x00000004 /* Receive FIFO Not Empty (read) */ |
| 748 | #define SDSR1_TNF 0x00000008 /* Transmit FIFO Not Full (read) */ |
| 749 | #define SDSR1_RTD 0x00000010 /* Receive Transition Detected */ |
| 750 | #define SDSR1_EOF 0x00000020 /* receive End-Of-Frame (read) */ |
| 751 | #define SDSR1_CRE 0x00000040 /* receive CRC Error (read) */ |
| 752 | #define SDSR1_ROR 0x00000080 /* Receive FIFO Over-Run (read) */ |
| 753 | |
| 754 | |
| 755 | /* |
| 756 | * High-Speed Serial to Parallel controller (HSSP) control registers |
| 757 | * |
| 758 | * Registers |
| 759 | * Ser2HSCR0 Serial port 2 High-Speed Serial to Parallel |
| 760 | * controller (HSSP) Control Register 0 (read/write). |
| 761 | * Ser2HSCR1 Serial port 2 High-Speed Serial to Parallel |
| 762 | * controller (HSSP) Control Register 1 (read/write). |
| 763 | * Ser2HSDR Serial port 2 High-Speed Serial to Parallel |
| 764 | * controller (HSSP) Data Register (read/write). |
| 765 | * Ser2HSSR0 Serial port 2 High-Speed Serial to Parallel |
| 766 | * controller (HSSP) Status Register 0 (read/write). |
| 767 | * Ser2HSSR1 Serial port 2 High-Speed Serial to Parallel |
| 768 | * controller (HSSP) Status Register 1 (read). |
| 769 | * Ser2HSCR2 Serial port 2 High-Speed Serial to Parallel |
| 770 | * controller (HSSP) Control Register 2 (read/write). |
| 771 | * [The HSCR2 register is only implemented in |
| 772 | * versions 2.0 (rev. = 8) and higher of the StrongARM |
| 773 | * SA-1100.] |
| 774 | */ |
| 775 | |
| 776 | #define _Ser2HSCR0 0x80040060 /* Ser. port 2 HSSP Control Reg. 0 */ |
| 777 | #define _Ser2HSCR1 0x80040064 /* Ser. port 2 HSSP Control Reg. 1 */ |
| 778 | #define _Ser2HSDR 0x8004006C /* Ser. port 2 HSSP Data Reg. */ |
| 779 | #define _Ser2HSSR0 0x80040074 /* Ser. port 2 HSSP Status Reg. 0 */ |
| 780 | #define _Ser2HSSR1 0x80040078 /* Ser. port 2 HSSP Status Reg. 1 */ |
| 781 | #define _Ser2HSCR2 0x90060028 /* Ser. port 2 HSSP Control Reg. 2 */ |
| 782 | |
| 783 | #if LANGUAGE == C |
| 784 | #define Ser2HSCR0 /* Ser. port 2 HSSP Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 785 | (*((volatile Word *) io_p2v (_Ser2HSCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 786 | #define Ser2HSCR1 /* Ser. port 2 HSSP Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 787 | (*((volatile Word *) io_p2v (_Ser2HSCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 788 | #define Ser2HSDR /* Ser. port 2 HSSP Data Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 789 | (*((volatile Word *) io_p2v (_Ser2HSDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 790 | #define Ser2HSSR0 /* Ser. port 2 HSSP Status Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 791 | (*((volatile Word *) io_p2v (_Ser2HSSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 792 | #define Ser2HSSR1 /* Ser. port 2 HSSP Status Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 793 | (*((volatile Word *) io_p2v (_Ser2HSSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 794 | #define Ser2HSCR2 /* Ser. port 2 HSSP Control Reg. 2 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 795 | (*((volatile Word *) io_p2v (_Ser2HSCR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 796 | #endif /* LANGUAGE == C */ |
| 797 | |
| 798 | #define HSCR0_ITR 0x00000001 /* IrDA Transmission Rate */ |
| 799 | #define HSCR0_UART (HSCR0_ITR*0) /* UART mode (115.2 kb/s if IrDA) */ |
| 800 | #define HSCR0_HSSP (HSCR0_ITR*1) /* HSSP mode (4 Mb/s) */ |
| 801 | #define HSCR0_LBM 0x00000002 /* Look-Back Mode */ |
| 802 | #define HSCR0_TUS 0x00000004 /* Transmit FIFO Under-run Select */ |
| 803 | #define HSCR0_EFrmURn (HSCR0_TUS*0) /* End Frame on Under-Run */ |
| 804 | #define HSCR0_AbortURn (HSCR0_TUS*1) /* Abort on Under-Run */ |
| 805 | #define HSCR0_TXE 0x00000008 /* Transmit Enable */ |
| 806 | #define HSCR0_RXE 0x00000010 /* Receive Enable */ |
| 807 | #define HSCR0_RIE 0x00000020 /* Receive FIFO 2/5-to-3/5-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 808 | /* more Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 809 | #define HSCR0_TIE 0x00000040 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 810 | /* Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 811 | #define HSCR0_AME 0x00000080 /* Address Match Enable */ |
| 812 | |
| 813 | #define HSCR1_AMV Fld (8, 0) /* Address Match Value */ |
| 814 | |
| 815 | #define HSDR_DATA Fld (8, 0) /* receive/transmit DATA FIFOs */ |
| 816 | #if 0 /* Hidden receive FIFO bits */ |
| 817 | #define HSDR_EOF 0x00000100 /* receive End-Of-Frame (read) */ |
| 818 | #define HSDR_CRE 0x00000200 /* receive CRC Error (read) */ |
| 819 | #define HSDR_ROR 0x00000400 /* Receive FIFO Over-Run (read) */ |
| 820 | #endif /* 0 */ |
| 821 | |
| 822 | #define HSSR0_EIF 0x00000001 /* Error In FIFO (read) */ |
| 823 | #define HSSR0_TUR 0x00000002 /* Transmit FIFO Under-Run */ |
| 824 | #define HSSR0_RAB 0x00000004 /* Receive ABort */ |
| 825 | #define HSSR0_TFS 0x00000008 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 826 | /* Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 827 | #define HSSR0_RFS 0x00000010 /* Receive FIFO 2/5-to-3/5-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 828 | /* more Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 829 | #define HSSR0_FRE 0x00000020 /* receive FRaming Error */ |
| 830 | |
| 831 | #define HSSR1_RSY 0x00000001 /* Receiver SYnchronized (read) */ |
| 832 | #define HSSR1_TBY 0x00000002 /* Transmitter BusY (read) */ |
| 833 | #define HSSR1_RNE 0x00000004 /* Receive FIFO Not Empty (read) */ |
| 834 | #define HSSR1_TNF 0x00000008 /* Transmit FIFO Not Full (read) */ |
| 835 | #define HSSR1_EOF 0x00000010 /* receive End-Of-Frame (read) */ |
| 836 | #define HSSR1_CRE 0x00000020 /* receive CRC Error (read) */ |
| 837 | #define HSSR1_ROR 0x00000040 /* Receive FIFO Over-Run (read) */ |
| 838 | |
| 839 | #define HSCR2_TXP 0x00040000 /* Transmit data Polarity (TXD_2) */ |
| 840 | #define HSCR2_TrDataL (HSCR2_TXP*0) /* Transmit Data active Low */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 841 | /* (inverted) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 842 | #define HSCR2_TrDataH (HSCR2_TXP*1) /* Transmit Data active High */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 843 | /* (non-inverted) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 844 | #define HSCR2_RXP 0x00080000 /* Receive data Polarity (RXD_2) */ |
| 845 | #define HSCR2_RcDataL (HSCR2_RXP*0) /* Receive Data active Low */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 846 | /* (inverted) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 847 | #define HSCR2_RcDataH (HSCR2_RXP*1) /* Receive Data active High */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 848 | /* (non-inverted) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 849 | |
| 850 | |
| 851 | /* |
| 852 | * Multi-media Communications Port (MCP) control registers |
| 853 | * |
| 854 | * Registers |
| 855 | * Ser4MCCR0 Serial port 4 Multi-media Communications Port (MCP) |
| 856 | * Control Register 0 (read/write). |
| 857 | * Ser4MCDR0 Serial port 4 Multi-media Communications Port (MCP) |
| 858 | * Data Register 0 (audio, read/write). |
| 859 | * Ser4MCDR1 Serial port 4 Multi-media Communications Port (MCP) |
| 860 | * Data Register 1 (telecom, read/write). |
| 861 | * Ser4MCDR2 Serial port 4 Multi-media Communications Port (MCP) |
| 862 | * Data Register 2 (CODEC registers, read/write). |
| 863 | * Ser4MCSR Serial port 4 Multi-media Communications Port (MCP) |
| 864 | * Status Register (read/write). |
| 865 | * Ser4MCCR1 Serial port 4 Multi-media Communications Port (MCP) |
| 866 | * Control Register 1 (read/write). |
| 867 | * [The MCCR1 register is only implemented in |
| 868 | * versions 2.0 (rev. = 8) and higher of the StrongARM |
| 869 | * SA-1100.] |
| 870 | * |
| 871 | * Clocks |
| 872 | * fmc, Tmc Frequency, period of the MCP communication (10 MHz, |
| 873 | * 12 MHz, or GPIO [21]). |
| 874 | * faud, Taud Frequency, period of the audio sampling. |
| 875 | * ftcm, Ttcm Frequency, period of the telecom sampling. |
| 876 | */ |
| 877 | |
| 878 | #define _Ser4MCCR0 0x80060000 /* Ser. port 4 MCP Control Reg. 0 */ |
| 879 | #define _Ser4MCDR0 0x80060008 /* Ser. port 4 MCP Data Reg. 0 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 880 | /* (audio) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 881 | #define _Ser4MCDR1 0x8006000C /* Ser. port 4 MCP Data Reg. 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 882 | /* (telecom) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 883 | #define _Ser4MCDR2 0x80060010 /* Ser. port 4 MCP Data Reg. 2 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 884 | /* (CODEC reg.) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 885 | #define _Ser4MCSR 0x80060018 /* Ser. port 4 MCP Status Reg. */ |
| 886 | #define _Ser4MCCR1 0x90060030 /* Ser. port 4 MCP Control Reg. 1 */ |
| 887 | |
| 888 | #if LANGUAGE == C |
| 889 | #define Ser4MCCR0 /* Ser. port 4 MCP Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 890 | (*((volatile Word *) io_p2v (_Ser4MCCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 891 | #define Ser4MCDR0 /* Ser. port 4 MCP Data Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 892 | /* (audio) */ \ |
| 893 | (*((volatile Word *) io_p2v (_Ser4MCDR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 894 | #define Ser4MCDR1 /* Ser. port 4 MCP Data Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 895 | /* (telecom) */ \ |
| 896 | (*((volatile Word *) io_p2v (_Ser4MCDR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 897 | #define Ser4MCDR2 /* Ser. port 4 MCP Data Reg. 2 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 898 | /* (CODEC reg.) */ \ |
| 899 | (*((volatile Word *) io_p2v (_Ser4MCDR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 900 | #define Ser4MCSR /* Ser. port 4 MCP Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 901 | (*((volatile Word *) io_p2v (_Ser4MCSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 902 | #define Ser4MCCR1 /* Ser. port 4 MCP Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 903 | (*((volatile Word *) io_p2v (_Ser4MCCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 904 | #endif /* LANGUAGE == C */ |
| 905 | |
| 906 | #define MCCR0_ASD Fld (7, 0) /* Audio Sampling rate Divisor/32 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 907 | /* [6..127] */ |
| 908 | /* faud = fmc/(32*ASD) */ |
| 909 | /* Taud = 32*ASD*Tmc */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 910 | #define MCCR0_AudSmpDiv(Div) /* Audio Sampling rate Divisor */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 911 | /* [192..4064] */ \ |
| 912 | ((Div)/32 << FShft (MCCR0_ASD)) |
| 913 | /* faud = fmc/(32*Floor (Div/32)) */ |
| 914 | /* Taud = 32*Floor (Div/32)*Tmc */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 915 | #define MCCR0_CeilAudSmpDiv(Div) /* Ceil. of AudSmpDiv [192..4064] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 916 | (((Div) + 31)/32 << FShft (MCCR0_ASD)) |
| 917 | /* faud = fmc/(32*Ceil (Div/32)) */ |
| 918 | /* Taud = 32*Ceil (Div/32)*Tmc */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 919 | #define MCCR0_TSD Fld (7, 8) /* Telecom Sampling rate */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 920 | /* Divisor/32 [16..127] */ |
| 921 | /* ftcm = fmc/(32*TSD) */ |
| 922 | /* Ttcm = 32*TSD*Tmc */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 923 | #define MCCR0_TcmSmpDiv(Div) /* Telecom Sampling rate Divisor */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 924 | /* [512..4064] */ \ |
| 925 | ((Div)/32 << FShft (MCCR0_TSD)) |
| 926 | /* ftcm = fmc/(32*Floor (Div/32)) */ |
| 927 | /* Ttcm = 32*Floor (Div/32)*Tmc */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 928 | #define MCCR0_CeilTcmSmpDiv(Div) /* Ceil. of TcmSmpDiv [512..4064] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 929 | (((Div) + 31)/32 << FShft (MCCR0_TSD)) |
| 930 | /* ftcm = fmc/(32*Ceil (Div/32)) */ |
| 931 | /* Ttcm = 32*Ceil (Div/32)*Tmc */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 932 | #define MCCR0_MCE 0x00010000 /* MCP Enable */ |
| 933 | #define MCCR0_ECS 0x00020000 /* External Clock Select */ |
| 934 | #define MCCR0_IntClk (MCCR0_ECS*0) /* Internal Clock (10 or 12 MHz) */ |
| 935 | #define MCCR0_ExtClk (MCCR0_ECS*1) /* External Clock (GPIO [21]) */ |
| 936 | #define MCCR0_ADM 0x00040000 /* A/D (audio/telecom) data */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 937 | /* sampling/storing Mode */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 938 | #define MCCR0_VldBit (MCCR0_ADM*0) /* Valid Bit storing mode */ |
| 939 | #define MCCR0_SmpCnt (MCCR0_ADM*1) /* Sampling Counter storing mode */ |
| 940 | #define MCCR0_TTE 0x00080000 /* Telecom Transmit FIFO 1/2-full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 941 | /* or less interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 942 | #define MCCR0_TRE 0x00100000 /* Telecom Receive FIFO 1/2-full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 943 | /* or more interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 944 | #define MCCR0_ATE 0x00200000 /* Audio Transmit FIFO 1/2-full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 945 | /* or less interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 946 | #define MCCR0_ARE 0x00400000 /* Audio Receive FIFO 1/2-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 947 | /* more interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 948 | #define MCCR0_LBM 0x00800000 /* Look-Back Mode */ |
| 949 | #define MCCR0_ECP Fld (2, 24) /* External Clock Prescaler - 1 */ |
| 950 | #define MCCR0_ExtClkDiv(Div) /* External Clock Divisor [1..4] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 951 | (((Div) - 1) << FShft (MCCR0_ECP)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 952 | |
| 953 | #define MCDR0_DATA Fld (12, 4) /* receive/transmit audio DATA */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 954 | /* FIFOs */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 955 | |
| 956 | #define MCDR1_DATA Fld (14, 2) /* receive/transmit telecom DATA */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 957 | /* FIFOs */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 958 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 959 | /* receive/transmit CODEC reg. */ |
| 960 | /* FIFOs: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 961 | #define MCDR2_DATA Fld (16, 0) /* reg. DATA */ |
| 962 | #define MCDR2_RW 0x00010000 /* reg. Read/Write (transmit) */ |
| 963 | #define MCDR2_Rd (MCDR2_RW*0) /* reg. Read */ |
| 964 | #define MCDR2_Wr (MCDR2_RW*1) /* reg. Write */ |
| 965 | #define MCDR2_ADD Fld (4, 17) /* reg. ADDress */ |
| 966 | |
| 967 | #define MCSR_ATS 0x00000001 /* Audio Transmit FIFO 1/2-full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 968 | /* or less Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 969 | #define MCSR_ARS 0x00000002 /* Audio Receive FIFO 1/2-full or */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 970 | /* more Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 971 | #define MCSR_TTS 0x00000004 /* Telecom Transmit FIFO 1/2-full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 972 | /* or less Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 973 | #define MCSR_TRS 0x00000008 /* Telecom Receive FIFO 1/2-full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 974 | /* or more Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 975 | #define MCSR_ATU 0x00000010 /* Audio Transmit FIFO Under-run */ |
| 976 | #define MCSR_ARO 0x00000020 /* Audio Receive FIFO Over-run */ |
| 977 | #define MCSR_TTU 0x00000040 /* Telecom Transmit FIFO Under-run */ |
| 978 | #define MCSR_TRO 0x00000080 /* Telecom Receive FIFO Over-run */ |
| 979 | #define MCSR_ANF 0x00000100 /* Audio transmit FIFO Not Full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 980 | /* (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 981 | #define MCSR_ANE 0x00000200 /* Audio receive FIFO Not Empty */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 982 | /* (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 983 | #define MCSR_TNF 0x00000400 /* Telecom transmit FIFO Not Full */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 984 | /* (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 985 | #define MCSR_TNE 0x00000800 /* Telecom receive FIFO Not Empty */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 986 | /* (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 987 | #define MCSR_CWC 0x00001000 /* CODEC register Write Completed */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 988 | /* (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 989 | #define MCSR_CRC 0x00002000 /* CODEC register Read Completed */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 990 | /* (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 991 | #define MCSR_ACE 0x00004000 /* Audio CODEC Enabled (read) */ |
| 992 | #define MCSR_TCE 0x00008000 /* Telecom CODEC Enabled (read) */ |
| 993 | |
| 994 | #define MCCR1_CFS 0x00100000 /* Clock Freq. Select */ |
| 995 | #define MCCR1_F12MHz (MCCR1_CFS*0) /* Freq. (fmc) = ~ 12 MHz */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 996 | /* (11.981 MHz) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 997 | #define MCCR1_F10MHz (MCCR1_CFS*1) /* Freq. (fmc) = ~ 10 MHz */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 998 | /* (9.585 MHz) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 999 | |
| 1000 | |
| 1001 | /* |
| 1002 | * Synchronous Serial Port (SSP) control registers |
| 1003 | * |
| 1004 | * Registers |
| 1005 | * Ser4SSCR0 Serial port 4 Synchronous Serial Port (SSP) Control |
| 1006 | * Register 0 (read/write). |
| 1007 | * Ser4SSCR1 Serial port 4 Synchronous Serial Port (SSP) Control |
| 1008 | * Register 1 (read/write). |
| 1009 | * [Bits SPO and SP are only implemented in versions 2.0 |
| 1010 | * (rev. = 8) and higher of the StrongARM SA-1100.] |
| 1011 | * Ser4SSDR Serial port 4 Synchronous Serial Port (SSP) Data |
| 1012 | * Register (read/write). |
| 1013 | * Ser4SSSR Serial port 4 Synchronous Serial Port (SSP) Status |
| 1014 | * Register (read/write). |
| 1015 | * |
| 1016 | * Clocks |
| 1017 | * fxtl, Txtl Frequency, period of the system crystal (3.6864 MHz |
| 1018 | * or 3.5795 MHz). |
| 1019 | * fss, Tss Frequency, period of the SSP communication. |
| 1020 | */ |
| 1021 | |
| 1022 | #define _Ser4SSCR0 0x80070060 /* Ser. port 4 SSP Control Reg. 0 */ |
| 1023 | #define _Ser4SSCR1 0x80070064 /* Ser. port 4 SSP Control Reg. 1 */ |
| 1024 | #define _Ser4SSDR 0x8007006C /* Ser. port 4 SSP Data Reg. */ |
| 1025 | #define _Ser4SSSR 0x80070074 /* Ser. port 4 SSP Status Reg. */ |
| 1026 | |
| 1027 | #if LANGUAGE == C |
| 1028 | #define Ser4SSCR0 /* Ser. port 4 SSP Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1029 | (*((volatile Word *) io_p2v (_Ser4SSCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1030 | #define Ser4SSCR1 /* Ser. port 4 SSP Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1031 | (*((volatile Word *) io_p2v (_Ser4SSCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1032 | #define Ser4SSDR /* Ser. port 4 SSP Data Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1033 | (*((volatile Word *) io_p2v (_Ser4SSDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1034 | #define Ser4SSSR /* Ser. port 4 SSP Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1035 | (*((volatile Word *) io_p2v (_Ser4SSSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1036 | #endif /* LANGUAGE == C */ |
| 1037 | |
| 1038 | #define SSCR0_DSS Fld (4, 0) /* Data Size - 1 Select [3..15] */ |
| 1039 | #define SSCR0_DataSize(Size) /* Data Size Select [4..16] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1040 | (((Size) - 1) << FShft (SSCR0_DSS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1041 | #define SSCR0_FRF Fld (2, 4) /* FRame Format */ |
| 1042 | #define SSCR0_Motorola /* Motorola Serial Peripheral */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1043 | /* Interface (SPI) format */ \ |
| 1044 | (0 << FShft (SSCR0_FRF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1045 | #define SSCR0_TI /* Texas Instruments Synchronous */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1046 | /* Serial format */ \ |
| 1047 | (1 << FShft (SSCR0_FRF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1048 | #define SSCR0_National /* National Microwire format */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1049 | (2 << FShft (SSCR0_FRF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1050 | #define SSCR0_SSE 0x00000080 /* SSP Enable */ |
| 1051 | #define SSCR0_SCR Fld (8, 8) /* Serial Clock Rate divisor/2 - 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1052 | /* fss = fxtl/(2*(SCR + 1)) */ |
| 1053 | /* Tss = 2*(SCR + 1)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1054 | #define SSCR0_SerClkDiv(Div) /* Serial Clock Divisor [2..512] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1055 | (((Div) - 2)/2 << FShft (SSCR0_SCR)) |
| 1056 | /* fss = fxtl/(2*Floor (Div/2)) */ |
| 1057 | /* Tss = 2*Floor (Div/2)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1058 | #define SSCR0_CeilSerClkDiv(Div) /* Ceil. of SerClkDiv [2..512] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1059 | (((Div) - 1)/2 << FShft (SSCR0_SCR)) |
| 1060 | /* fss = fxtl/(2*Ceil (Div/2)) */ |
| 1061 | /* Tss = 2*Ceil (Div/2)*Txtl */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1062 | |
| 1063 | #define SSCR1_RIE 0x00000001 /* Receive FIFO 1/2-full or more */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1064 | /* Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1065 | #define SSCR1_TIE 0x00000002 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1066 | /* Interrupt Enable */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1067 | #define SSCR1_LBM 0x00000004 /* Look-Back Mode */ |
| 1068 | #define SSCR1_SPO 0x00000008 /* Sample clock (SCLK) POlarity */ |
| 1069 | #define SSCR1_SClkIactL (SSCR1_SPO*0) /* Sample Clock Inactive Low */ |
| 1070 | #define SSCR1_SClkIactH (SSCR1_SPO*1) /* Sample Clock Inactive High */ |
| 1071 | #define SSCR1_SP 0x00000010 /* Sample clock (SCLK) Phase */ |
| 1072 | #define SSCR1_SClk1P (SSCR1_SP*0) /* Sample Clock active 1 Period */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1073 | /* after frame (SFRM, 1st edge) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1074 | #define SSCR1_SClk1_2P (SSCR1_SP*1) /* Sample Clock active 1/2 Period */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1075 | /* after frame (SFRM, 1st edge) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1076 | #define SSCR1_ECS 0x00000020 /* External Clock Select */ |
| 1077 | #define SSCR1_IntClk (SSCR1_ECS*0) /* Internal Clock */ |
| 1078 | #define SSCR1_ExtClk (SSCR1_ECS*1) /* External Clock (GPIO [19]) */ |
| 1079 | |
| 1080 | #define SSDR_DATA Fld (16, 0) /* receive/transmit DATA FIFOs */ |
| 1081 | |
| 1082 | #define SSSR_TNF 0x00000002 /* Transmit FIFO Not Full (read) */ |
| 1083 | #define SSSR_RNE 0x00000004 /* Receive FIFO Not Empty (read) */ |
| 1084 | #define SSSR_BSY 0x00000008 /* SSP BuSY (read) */ |
| 1085 | #define SSSR_TFS 0x00000010 /* Transmit FIFO 1/2-full or less */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1086 | /* Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1087 | #define SSSR_RFS 0x00000020 /* Receive FIFO 1/2-full or more */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1088 | /* Service request (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1089 | #define SSSR_ROR 0x00000040 /* Receive FIFO Over-Run */ |
| 1090 | |
| 1091 | |
| 1092 | /* |
| 1093 | * Operating System (OS) timer control registers |
| 1094 | * |
| 1095 | * Registers |
| 1096 | * OSMR0 Operating System (OS) timer Match Register 0 |
| 1097 | * (read/write). |
| 1098 | * OSMR1 Operating System (OS) timer Match Register 1 |
| 1099 | * (read/write). |
| 1100 | * OSMR2 Operating System (OS) timer Match Register 2 |
| 1101 | * (read/write). |
| 1102 | * OSMR3 Operating System (OS) timer Match Register 3 |
| 1103 | * (read/write). |
| 1104 | * OSCR Operating System (OS) timer Counter Register |
| 1105 | * (read/write). |
| 1106 | * OSSR Operating System (OS) timer Status Register |
| 1107 | * (read/write). |
| 1108 | * OWER Operating System (OS) timer Watch-dog Enable Register |
| 1109 | * (read/write). |
| 1110 | * OIER Operating System (OS) timer Interrupt Enable Register |
| 1111 | * (read/write). |
| 1112 | */ |
| 1113 | |
| 1114 | #define _OSMR(Nb) /* OS timer Match Reg. [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1115 | (0x90000000 + (Nb)*4) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1116 | #define _OSMR0 _OSMR (0) /* OS timer Match Reg. 0 */ |
| 1117 | #define _OSMR1 _OSMR (1) /* OS timer Match Reg. 1 */ |
| 1118 | #define _OSMR2 _OSMR (2) /* OS timer Match Reg. 2 */ |
| 1119 | #define _OSMR3 _OSMR (3) /* OS timer Match Reg. 3 */ |
| 1120 | #define _OSCR 0x90000010 /* OS timer Counter Reg. */ |
| 1121 | #define _OSSR 0x90000014 /* OS timer Status Reg. */ |
| 1122 | #define _OWER 0x90000018 /* OS timer Watch-dog Enable Reg. */ |
| 1123 | #define _OIER 0x9000001C /* OS timer Interrupt Enable Reg. */ |
| 1124 | |
| 1125 | #if LANGUAGE == C |
| 1126 | #define OSMR /* OS timer Match Reg. [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1127 | ((volatile Word *) io_p2v (_OSMR (0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1128 | #define OSMR0 (OSMR [0]) /* OS timer Match Reg. 0 */ |
| 1129 | #define OSMR1 (OSMR [1]) /* OS timer Match Reg. 1 */ |
| 1130 | #define OSMR2 (OSMR [2]) /* OS timer Match Reg. 2 */ |
| 1131 | #define OSMR3 (OSMR [3]) /* OS timer Match Reg. 3 */ |
| 1132 | #define OSCR /* OS timer Counter Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1133 | (*((volatile Word *) io_p2v (_OSCR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1134 | #define OSSR /* OS timer Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1135 | (*((volatile Word *) io_p2v (_OSSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1136 | #define OWER /* OS timer Watch-dog Enable Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1137 | (*((volatile Word *) io_p2v (_OWER))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1138 | #define OIER /* OS timer Interrupt Enable Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1139 | (*((volatile Word *) io_p2v (_OIER))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1140 | #endif /* LANGUAGE == C */ |
| 1141 | |
| 1142 | #define OSSR_M(Nb) /* Match detected [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1143 | (0x00000001 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1144 | #define OSSR_M0 OSSR_M (0) /* Match detected 0 */ |
| 1145 | #define OSSR_M1 OSSR_M (1) /* Match detected 1 */ |
| 1146 | #define OSSR_M2 OSSR_M (2) /* Match detected 2 */ |
| 1147 | #define OSSR_M3 OSSR_M (3) /* Match detected 3 */ |
| 1148 | |
| 1149 | #define OWER_WME 0x00000001 /* Watch-dog Match Enable */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1150 | /* (set only) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1151 | |
| 1152 | #define OIER_E(Nb) /* match interrupt Enable [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1153 | (0x00000001 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1154 | #define OIER_E0 OIER_E (0) /* match interrupt Enable 0 */ |
| 1155 | #define OIER_E1 OIER_E (1) /* match interrupt Enable 1 */ |
| 1156 | #define OIER_E2 OIER_E (2) /* match interrupt Enable 2 */ |
| 1157 | #define OIER_E3 OIER_E (3) /* match interrupt Enable 3 */ |
| 1158 | |
| 1159 | |
| 1160 | /* |
| 1161 | * Real-Time Clock (RTC) control registers |
| 1162 | * |
| 1163 | * Registers |
| 1164 | * RTAR Real-Time Clock (RTC) Alarm Register (read/write). |
| 1165 | * RCNR Real-Time Clock (RTC) CouNt Register (read/write). |
| 1166 | * RTTR Real-Time Clock (RTC) Trim Register (read/write). |
| 1167 | * RTSR Real-Time Clock (RTC) Status Register (read/write). |
| 1168 | * |
| 1169 | * Clocks |
| 1170 | * frtx, Trtx Frequency, period of the real-time clock crystal |
| 1171 | * (32.768 kHz nominal). |
| 1172 | * frtc, Trtc Frequency, period of the real-time clock counter |
| 1173 | * (1 Hz nominal). |
| 1174 | */ |
| 1175 | |
| 1176 | #define _RTAR 0x90010000 /* RTC Alarm Reg. */ |
| 1177 | #define _RCNR 0x90010004 /* RTC CouNt Reg. */ |
| 1178 | #define _RTTR 0x90010008 /* RTC Trim Reg. */ |
| 1179 | #define _RTSR 0x90010010 /* RTC Status Reg. */ |
| 1180 | |
| 1181 | #if LANGUAGE == C |
| 1182 | #define RTAR /* RTC Alarm Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1183 | (*((volatile Word *) io_p2v (_RTAR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1184 | #define RCNR /* RTC CouNt Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1185 | (*((volatile Word *) io_p2v (_RCNR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1186 | #define RTTR /* RTC Trim Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1187 | (*((volatile Word *) io_p2v (_RTTR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1188 | #define RTSR /* RTC Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1189 | (*((volatile Word *) io_p2v (_RTSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1190 | #endif /* LANGUAGE == C */ |
| 1191 | |
| 1192 | #define RTTR_C Fld (16, 0) /* clock divider Count - 1 */ |
| 1193 | #define RTTR_D Fld (10, 16) /* trim Delete count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1194 | /* frtc = (1023*(C + 1) - D)*frtx/ */ |
| 1195 | /* (1023*(C + 1)^2) */ |
| 1196 | /* Trtc = (1023*(C + 1)^2)*Trtx/ */ |
| 1197 | /* (1023*(C + 1) - D) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1198 | |
| 1199 | #define RTSR_AL 0x00000001 /* ALarm detected */ |
| 1200 | #define RTSR_HZ 0x00000002 /* 1 Hz clock detected */ |
| 1201 | #define RTSR_ALE 0x00000004 /* ALarm interrupt Enable */ |
| 1202 | #define RTSR_HZE 0x00000008 /* 1 Hz clock interrupt Enable */ |
| 1203 | |
| 1204 | |
| 1205 | /* |
| 1206 | * Power Manager (PM) control registers |
| 1207 | * |
| 1208 | * Registers |
| 1209 | * PMCR Power Manager (PM) Control Register (read/write). |
| 1210 | * PSSR Power Manager (PM) Sleep Status Register (read/write). |
| 1211 | * PSPR Power Manager (PM) Scratch-Pad Register (read/write). |
| 1212 | * PWER Power Manager (PM) Wake-up Enable Register |
| 1213 | * (read/write). |
| 1214 | * PCFR Power Manager (PM) general ConFiguration Register |
| 1215 | * (read/write). |
| 1216 | * PPCR Power Manager (PM) Phase-Locked Loop (PLL) |
| 1217 | * Configuration Register (read/write). |
| 1218 | * PGSR Power Manager (PM) General-Purpose Input/Output (GPIO) |
| 1219 | * Sleep state Register (read/write, see GPIO pins). |
| 1220 | * POSR Power Manager (PM) Oscillator Status Register (read). |
| 1221 | * |
| 1222 | * Clocks |
| 1223 | * fxtl, Txtl Frequency, period of the system crystal (3.6864 MHz |
| 1224 | * or 3.5795 MHz). |
| 1225 | * fcpu, Tcpu Frequency, period of the CPU core clock (CCLK). |
| 1226 | */ |
| 1227 | |
| 1228 | #define _PMCR 0x90020000 /* PM Control Reg. */ |
| 1229 | #define _PSSR 0x90020004 /* PM Sleep Status Reg. */ |
| 1230 | #define _PSPR 0x90020008 /* PM Scratch-Pad Reg. */ |
| 1231 | #define _PWER 0x9002000C /* PM Wake-up Enable Reg. */ |
| 1232 | #define _PCFR 0x90020010 /* PM general ConFiguration Reg. */ |
| 1233 | #define _PPCR 0x90020014 /* PM PLL Configuration Reg. */ |
| 1234 | #define _PGSR 0x90020018 /* PM GPIO Sleep state Reg. */ |
| 1235 | #define _POSR 0x9002001C /* PM Oscillator Status Reg. */ |
| 1236 | |
| 1237 | #if LANGUAGE == C |
| 1238 | #define PMCR /* PM Control Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1239 | (*((volatile Word *) io_p2v (_PMCR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1240 | #define PSSR /* PM Sleep Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1241 | (*((volatile Word *) io_p2v (_PSSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1242 | #define PSPR /* PM Scratch-Pad Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1243 | (*((volatile Word *) io_p2v (_PSPR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1244 | #define PWER /* PM Wake-up Enable Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1245 | (*((volatile Word *) io_p2v (_PWER))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1246 | #define PCFR /* PM general ConFiguration Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1247 | (*((volatile Word *) io_p2v (_PCFR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1248 | #define PPCR /* PM PLL Configuration Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1249 | (*((volatile Word *) io_p2v (_PPCR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1250 | #define PGSR /* PM GPIO Sleep state Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1251 | (*((volatile Word *) io_p2v (_PGSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1252 | #define POSR /* PM Oscillator Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1253 | (*((volatile Word *) io_p2v (_POSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1254 | |
| 1255 | #elif LANGUAGE == Assembly |
| 1256 | #define PMCR (io_p2v (_PMCR)) |
| 1257 | #define PSSR (io_p2v (_PSSR)) |
| 1258 | #define PSPR (io_p2v (_PSPR)) |
| 1259 | #define PWER (io_p2v (_PWER)) |
| 1260 | #define PCFR (io_p2v (_PCFR)) |
| 1261 | #define PPCR (io_p2v (_PPCR)) |
| 1262 | #define PGSR (io_p2v (_PGSR)) |
| 1263 | #define POSR (io_p2v (_POSR)) |
| 1264 | |
| 1265 | #endif /* LANGUAGE == C */ |
| 1266 | |
| 1267 | #define PMCR_SF 0x00000001 /* Sleep Force (set only) */ |
| 1268 | |
| 1269 | #define PSSR_SS 0x00000001 /* Software Sleep */ |
| 1270 | #define PSSR_BFS 0x00000002 /* Battery Fault Status */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1271 | /* (BATT_FAULT) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1272 | #define PSSR_VFS 0x00000004 /* Vdd Fault Status (VDD_FAULT) */ |
| 1273 | #define PSSR_DH 0x00000008 /* DRAM control Hold */ |
| 1274 | #define PSSR_PH 0x00000010 /* Peripheral control Hold */ |
| 1275 | |
| 1276 | #define PWER_GPIO(Nb) GPIO_GPIO (Nb) /* GPIO [0..27] wake-up enable */ |
| 1277 | #define PWER_GPIO0 PWER_GPIO (0) /* GPIO [0] wake-up enable */ |
| 1278 | #define PWER_GPIO1 PWER_GPIO (1) /* GPIO [1] wake-up enable */ |
| 1279 | #define PWER_GPIO2 PWER_GPIO (2) /* GPIO [2] wake-up enable */ |
| 1280 | #define PWER_GPIO3 PWER_GPIO (3) /* GPIO [3] wake-up enable */ |
| 1281 | #define PWER_GPIO4 PWER_GPIO (4) /* GPIO [4] wake-up enable */ |
| 1282 | #define PWER_GPIO5 PWER_GPIO (5) /* GPIO [5] wake-up enable */ |
| 1283 | #define PWER_GPIO6 PWER_GPIO (6) /* GPIO [6] wake-up enable */ |
| 1284 | #define PWER_GPIO7 PWER_GPIO (7) /* GPIO [7] wake-up enable */ |
| 1285 | #define PWER_GPIO8 PWER_GPIO (8) /* GPIO [8] wake-up enable */ |
| 1286 | #define PWER_GPIO9 PWER_GPIO (9) /* GPIO [9] wake-up enable */ |
| 1287 | #define PWER_GPIO10 PWER_GPIO (10) /* GPIO [10] wake-up enable */ |
| 1288 | #define PWER_GPIO11 PWER_GPIO (11) /* GPIO [11] wake-up enable */ |
| 1289 | #define PWER_GPIO12 PWER_GPIO (12) /* GPIO [12] wake-up enable */ |
| 1290 | #define PWER_GPIO13 PWER_GPIO (13) /* GPIO [13] wake-up enable */ |
| 1291 | #define PWER_GPIO14 PWER_GPIO (14) /* GPIO [14] wake-up enable */ |
| 1292 | #define PWER_GPIO15 PWER_GPIO (15) /* GPIO [15] wake-up enable */ |
| 1293 | #define PWER_GPIO16 PWER_GPIO (16) /* GPIO [16] wake-up enable */ |
| 1294 | #define PWER_GPIO17 PWER_GPIO (17) /* GPIO [17] wake-up enable */ |
| 1295 | #define PWER_GPIO18 PWER_GPIO (18) /* GPIO [18] wake-up enable */ |
| 1296 | #define PWER_GPIO19 PWER_GPIO (19) /* GPIO [19] wake-up enable */ |
| 1297 | #define PWER_GPIO20 PWER_GPIO (20) /* GPIO [20] wake-up enable */ |
| 1298 | #define PWER_GPIO21 PWER_GPIO (21) /* GPIO [21] wake-up enable */ |
| 1299 | #define PWER_GPIO22 PWER_GPIO (22) /* GPIO [22] wake-up enable */ |
| 1300 | #define PWER_GPIO23 PWER_GPIO (23) /* GPIO [23] wake-up enable */ |
| 1301 | #define PWER_GPIO24 PWER_GPIO (24) /* GPIO [24] wake-up enable */ |
| 1302 | #define PWER_GPIO25 PWER_GPIO (25) /* GPIO [25] wake-up enable */ |
| 1303 | #define PWER_GPIO26 PWER_GPIO (26) /* GPIO [26] wake-up enable */ |
| 1304 | #define PWER_GPIO27 PWER_GPIO (27) /* GPIO [27] wake-up enable */ |
| 1305 | #define PWER_RTC 0x80000000 /* RTC alarm wake-up enable */ |
| 1306 | |
| 1307 | #define PCFR_OPDE 0x00000001 /* Oscillator Power-Down Enable */ |
| 1308 | #define PCFR_ClkRun (PCFR_OPDE*0) /* Clock Running in sleep mode */ |
| 1309 | #define PCFR_ClkStp (PCFR_OPDE*1) /* Clock Stopped in sleep mode */ |
| 1310 | #define PCFR_FP 0x00000002 /* Float PCMCIA pins */ |
| 1311 | #define PCFR_PCMCIANeg (PCFR_FP*0) /* PCMCIA pins Negated (1) */ |
| 1312 | #define PCFR_PCMCIAFlt (PCFR_FP*1) /* PCMCIA pins Floating */ |
| 1313 | #define PCFR_FS 0x00000004 /* Float Static memory pins */ |
| 1314 | #define PCFR_StMemNeg (PCFR_FS*0) /* Static Memory pins Negated (1) */ |
| 1315 | #define PCFR_StMemFlt (PCFR_FS*1) /* Static Memory pins Floating */ |
| 1316 | #define PCFR_FO 0x00000008 /* Force RTC oscillator */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1317 | /* (32.768 kHz) enable On */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1318 | |
| 1319 | #define PPCR_CCF Fld (5, 0) /* CPU core Clock (CCLK) Freq. */ |
| 1320 | #define PPCR_Fx16 /* Freq. x 16 (fcpu = 16*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1321 | (0x00 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1322 | #define PPCR_Fx20 /* Freq. x 20 (fcpu = 20*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1323 | (0x01 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1324 | #define PPCR_Fx24 /* Freq. x 24 (fcpu = 24*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1325 | (0x02 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1326 | #define PPCR_Fx28 /* Freq. x 28 (fcpu = 28*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1327 | (0x03 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1328 | #define PPCR_Fx32 /* Freq. x 32 (fcpu = 32*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1329 | (0x04 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1330 | #define PPCR_Fx36 /* Freq. x 36 (fcpu = 36*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1331 | (0x05 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1332 | #define PPCR_Fx40 /* Freq. x 40 (fcpu = 40*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1333 | (0x06 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1334 | #define PPCR_Fx44 /* Freq. x 44 (fcpu = 44*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1335 | (0x07 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1336 | #define PPCR_Fx48 /* Freq. x 48 (fcpu = 48*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1337 | (0x08 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1338 | #define PPCR_Fx52 /* Freq. x 52 (fcpu = 52*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1339 | (0x09 << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1340 | #define PPCR_Fx56 /* Freq. x 56 (fcpu = 56*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1341 | (0x0A << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1342 | #define PPCR_Fx60 /* Freq. x 60 (fcpu = 60*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1343 | (0x0B << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1344 | #define PPCR_Fx64 /* Freq. x 64 (fcpu = 64*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1345 | (0x0C << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1346 | #define PPCR_Fx68 /* Freq. x 68 (fcpu = 68*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1347 | (0x0D << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1348 | #define PPCR_Fx72 /* Freq. x 72 (fcpu = 72*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1349 | (0x0E << FShft (PPCR_CCF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1350 | #define PPCR_Fx76 /* Freq. x 76 (fcpu = 76*fxtl) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1351 | (0x0F << FShft (PPCR_CCF)) |
| 1352 | /* 3.6864 MHz crystal (fxtl): */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1353 | #define PPCR_F59_0MHz PPCR_Fx16 /* Freq. (fcpu) = 59.0 MHz */ |
| 1354 | #define PPCR_F73_7MHz PPCR_Fx20 /* Freq. (fcpu) = 73.7 MHz */ |
| 1355 | #define PPCR_F88_5MHz PPCR_Fx24 /* Freq. (fcpu) = 88.5 MHz */ |
| 1356 | #define PPCR_F103_2MHz PPCR_Fx28 /* Freq. (fcpu) = 103.2 MHz */ |
| 1357 | #define PPCR_F118_0MHz PPCR_Fx32 /* Freq. (fcpu) = 118.0 MHz */ |
| 1358 | #define PPCR_F132_7MHz PPCR_Fx36 /* Freq. (fcpu) = 132.7 MHz */ |
| 1359 | #define PPCR_F147_5MHz PPCR_Fx40 /* Freq. (fcpu) = 147.5 MHz */ |
| 1360 | #define PPCR_F162_2MHz PPCR_Fx44 /* Freq. (fcpu) = 162.2 MHz */ |
| 1361 | #define PPCR_F176_9MHz PPCR_Fx48 /* Freq. (fcpu) = 176.9 MHz */ |
| 1362 | #define PPCR_F191_7MHz PPCR_Fx52 /* Freq. (fcpu) = 191.7 MHz */ |
| 1363 | #define PPCR_F206_4MHz PPCR_Fx56 /* Freq. (fcpu) = 206.4 MHz */ |
| 1364 | #define PPCR_F221_2MHz PPCR_Fx60 /* Freq. (fcpu) = 221.2 MHz */ |
| 1365 | #define PPCR_F239_6MHz PPCR_Fx64 /* Freq. (fcpu) = 239.6 MHz */ |
| 1366 | #define PPCR_F250_7MHz PPCR_Fx68 /* Freq. (fcpu) = 250.7 MHz */ |
| 1367 | #define PPCR_F265_4MHz PPCR_Fx72 /* Freq. (fcpu) = 265.4 MHz */ |
| 1368 | #define PPCR_F280_2MHz PPCR_Fx76 /* Freq. (fcpu) = 280.2 MHz */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1369 | /* 3.5795 MHz crystal (fxtl): */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1370 | #define PPCR_F57_3MHz PPCR_Fx16 /* Freq. (fcpu) = 57.3 MHz */ |
| 1371 | #define PPCR_F71_6MHz PPCR_Fx20 /* Freq. (fcpu) = 71.6 MHz */ |
| 1372 | #define PPCR_F85_9MHz PPCR_Fx24 /* Freq. (fcpu) = 85.9 MHz */ |
| 1373 | #define PPCR_F100_2MHz PPCR_Fx28 /* Freq. (fcpu) = 100.2 MHz */ |
| 1374 | #define PPCR_F114_5MHz PPCR_Fx32 /* Freq. (fcpu) = 114.5 MHz */ |
| 1375 | #define PPCR_F128_9MHz PPCR_Fx36 /* Freq. (fcpu) = 128.9 MHz */ |
| 1376 | #define PPCR_F143_2MHz PPCR_Fx40 /* Freq. (fcpu) = 143.2 MHz */ |
| 1377 | #define PPCR_F157_5MHz PPCR_Fx44 /* Freq. (fcpu) = 157.5 MHz */ |
| 1378 | #define PPCR_F171_8MHz PPCR_Fx48 /* Freq. (fcpu) = 171.8 MHz */ |
| 1379 | #define PPCR_F186_1MHz PPCR_Fx52 /* Freq. (fcpu) = 186.1 MHz */ |
| 1380 | #define PPCR_F200_5MHz PPCR_Fx56 /* Freq. (fcpu) = 200.5 MHz */ |
| 1381 | #define PPCR_F214_8MHz PPCR_Fx60 /* Freq. (fcpu) = 214.8 MHz */ |
| 1382 | #define PPCR_F229_1MHz PPCR_Fx64 /* Freq. (fcpu) = 229.1 MHz */ |
| 1383 | #define PPCR_F243_4MHz PPCR_Fx68 /* Freq. (fcpu) = 243.4 MHz */ |
| 1384 | #define PPCR_F257_7MHz PPCR_Fx72 /* Freq. (fcpu) = 257.7 MHz */ |
| 1385 | #define PPCR_F272_0MHz PPCR_Fx76 /* Freq. (fcpu) = 272.0 MHz */ |
| 1386 | |
| 1387 | #define POSR_OOK 0x00000001 /* RTC Oscillator (32.768 kHz) OK */ |
| 1388 | |
| 1389 | |
| 1390 | /* |
| 1391 | * Reset Controller (RC) control registers |
| 1392 | * |
| 1393 | * Registers |
| 1394 | * RSRR Reset Controller (RC) Software Reset Register |
| 1395 | * (read/write). |
| 1396 | * RCSR Reset Controller (RC) Status Register (read/write). |
| 1397 | */ |
| 1398 | |
| 1399 | #define _RSRR 0x90030000 /* RC Software Reset Reg. */ |
| 1400 | #define _RCSR 0x90030004 /* RC Status Reg. */ |
| 1401 | |
| 1402 | #if LANGUAGE == C |
| 1403 | #define RSRR /* RC Software Reset Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1404 | (*((volatile Word *) io_p2v (_RSRR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1405 | #define RCSR /* RC Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1406 | (*((volatile Word *) io_p2v (_RCSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1407 | #endif /* LANGUAGE == C */ |
| 1408 | |
| 1409 | #define RSRR_SWR 0x00000001 /* SoftWare Reset (set only) */ |
| 1410 | |
| 1411 | #define RCSR_HWR 0x00000001 /* HardWare Reset */ |
| 1412 | #define RCSR_SWR 0x00000002 /* SoftWare Reset */ |
| 1413 | #define RCSR_WDR 0x00000004 /* Watch-Dog Reset */ |
| 1414 | #define RCSR_SMR 0x00000008 /* Sleep-Mode Reset */ |
| 1415 | |
| 1416 | |
| 1417 | /* |
| 1418 | * Test unit control registers |
| 1419 | * |
| 1420 | * Registers |
| 1421 | * TUCR Test Unit Control Register (read/write). |
| 1422 | */ |
| 1423 | |
| 1424 | #define _TUCR 0x90030008 /* Test Unit Control Reg. */ |
| 1425 | |
| 1426 | #if LANGUAGE == C |
| 1427 | #define TUCR /* Test Unit Control Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1428 | (*((volatile Word *) io_p2v (_TUCR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1429 | #endif /* LANGUAGE == C */ |
| 1430 | |
| 1431 | #define TUCR_TIC 0x00000040 /* TIC mode */ |
| 1432 | #define TUCR_TTST 0x00000080 /* Trim TeST mode */ |
| 1433 | #define TUCR_RCRC 0x00000100 /* Richard's Cyclic Redundancy */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1434 | /* Check */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1435 | #define TUCR_PMD 0x00000200 /* Power Management Disable */ |
| 1436 | #define TUCR_MR 0x00000400 /* Memory Request mode */ |
| 1437 | #define TUCR_NoMB (TUCR_MR*0) /* No Memory Bus request & grant */ |
| 1438 | #define TUCR_MBGPIO (TUCR_MR*1) /* Memory Bus request (MBREQ) & */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1439 | /* grant (MBGNT) on GPIO [22:21] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1440 | #define TUCR_CTB Fld (3, 20) /* Clock Test Bits */ |
| 1441 | #define TUCR_FDC 0x00800000 /* RTC Force Delete Count */ |
| 1442 | #define TUCR_FMC 0x01000000 /* Force Michelle's Control mode */ |
| 1443 | #define TUCR_TMC 0x02000000 /* RTC Trimmer Multiplexer Control */ |
| 1444 | #define TUCR_DPS 0x04000000 /* Disallow Pad Sleep */ |
| 1445 | #define TUCR_TSEL Fld (3, 29) /* clock Test SELect on GPIO [27] */ |
| 1446 | #define TUCR_32_768kHz /* 32.768 kHz osc. on GPIO [27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1447 | (0 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1448 | #define TUCR_3_6864MHz /* 3.6864 MHz osc. on GPIO [27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1449 | (1 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1450 | #define TUCR_VDD /* VDD ring osc./16 on GPIO [27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1451 | (2 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1452 | #define TUCR_96MHzPLL /* 96 MHz PLL/4 on GPIO [27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1453 | (3 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1454 | #define TUCR_Clock /* internal (fcpu/2) & 32.768 kHz */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1455 | /* Clocks on GPIO [26:27] */ \ |
| 1456 | (4 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1457 | #define TUCR_3_6864MHzA /* 3.6864 MHz osc. on GPIO [27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1458 | /* (Alternative) */ \ |
| 1459 | (5 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1460 | #define TUCR_MainPLL /* Main PLL/16 on GPIO [27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1461 | (6 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1462 | #define TUCR_VDDL /* VDDL ring osc./4 on GPIO [27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1463 | (7 << FShft (TUCR_TSEL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1464 | |
| 1465 | |
| 1466 | /* |
| 1467 | * General-Purpose Input/Output (GPIO) control registers |
| 1468 | * |
| 1469 | * Registers |
| 1470 | * GPLR General-Purpose Input/Output (GPIO) Pin Level |
| 1471 | * Register (read). |
| 1472 | * GPDR General-Purpose Input/Output (GPIO) Pin Direction |
| 1473 | * Register (read/write). |
| 1474 | * GPSR General-Purpose Input/Output (GPIO) Pin output Set |
| 1475 | * Register (write). |
| 1476 | * GPCR General-Purpose Input/Output (GPIO) Pin output Clear |
| 1477 | * Register (write). |
| 1478 | * GRER General-Purpose Input/Output (GPIO) Rising-Edge |
| 1479 | * detect Register (read/write). |
| 1480 | * GFER General-Purpose Input/Output (GPIO) Falling-Edge |
| 1481 | * detect Register (read/write). |
| 1482 | * GEDR General-Purpose Input/Output (GPIO) Edge Detect |
| 1483 | * status Register (read/write). |
| 1484 | * GAFR General-Purpose Input/Output (GPIO) Alternate |
| 1485 | * Function Register (read/write). |
| 1486 | * |
| 1487 | * Clock |
| 1488 | * fcpu, Tcpu Frequency, period of the CPU core clock (CCLK). |
| 1489 | */ |
| 1490 | |
| 1491 | #define _GPLR 0x90040000 /* GPIO Pin Level Reg. */ |
| 1492 | #define _GPDR 0x90040004 /* GPIO Pin Direction Reg. */ |
| 1493 | #define _GPSR 0x90040008 /* GPIO Pin output Set Reg. */ |
| 1494 | #define _GPCR 0x9004000C /* GPIO Pin output Clear Reg. */ |
| 1495 | #define _GRER 0x90040010 /* GPIO Rising-Edge detect Reg. */ |
| 1496 | #define _GFER 0x90040014 /* GPIO Falling-Edge detect Reg. */ |
| 1497 | #define _GEDR 0x90040018 /* GPIO Edge Detect status Reg. */ |
| 1498 | #define _GAFR 0x9004001C /* GPIO Alternate Function Reg. */ |
| 1499 | |
| 1500 | #if LANGUAGE == C |
| 1501 | #define GPLR /* GPIO Pin Level Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1502 | (*((volatile Word *) io_p2v (_GPLR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1503 | #define GPDR /* GPIO Pin Direction Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1504 | (*((volatile Word *) io_p2v (_GPDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1505 | #define GPSR /* GPIO Pin output Set Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1506 | (*((volatile Word *) io_p2v (_GPSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1507 | #define GPCR /* GPIO Pin output Clear Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1508 | (*((volatile Word *) io_p2v (_GPCR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1509 | #define GRER /* GPIO Rising-Edge detect Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1510 | (*((volatile Word *) io_p2v (_GRER))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1511 | #define GFER /* GPIO Falling-Edge detect Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1512 | (*((volatile Word *) io_p2v (_GFER))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1513 | #define GEDR /* GPIO Edge Detect status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1514 | (*((volatile Word *) io_p2v (_GEDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1515 | #define GAFR /* GPIO Alternate Function Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1516 | (*((volatile Word *) io_p2v (_GAFR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1517 | #elif LANGUAGE == Assembly |
| 1518 | |
| 1519 | #define GPLR (io_p2v (_GPLR)) |
| 1520 | #define GPDR (io_p2v (_GPDR)) |
| 1521 | #define GPSR (io_p2v (_GPSR)) |
| 1522 | #define GPCR (io_p2v (_GPCR)) |
| 1523 | #define GRER (io_p2v (_GRER)) |
| 1524 | #define GFER (io_p2v (_GFER)) |
| 1525 | #define GEDR (io_p2v (_GEDR)) |
| 1526 | #define GAFR (io_p2v (_GAFR)) |
| 1527 | |
| 1528 | #endif /* LANGUAGE == C */ |
| 1529 | |
| 1530 | #define GPIO_MIN (0) |
| 1531 | #define GPIO_MAX (27) |
| 1532 | |
| 1533 | #define GPIO_GPIO(Nb) /* GPIO [0..27] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1534 | (0x00000001 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1535 | #define GPIO_GPIO0 GPIO_GPIO (0) /* GPIO [0] */ |
| 1536 | #define GPIO_GPIO1 GPIO_GPIO (1) /* GPIO [1] */ |
| 1537 | #define GPIO_GPIO2 GPIO_GPIO (2) /* GPIO [2] */ |
| 1538 | #define GPIO_GPIO3 GPIO_GPIO (3) /* GPIO [3] */ |
| 1539 | #define GPIO_GPIO4 GPIO_GPIO (4) /* GPIO [4] */ |
| 1540 | #define GPIO_GPIO5 GPIO_GPIO (5) /* GPIO [5] */ |
| 1541 | #define GPIO_GPIO6 GPIO_GPIO (6) /* GPIO [6] */ |
| 1542 | #define GPIO_GPIO7 GPIO_GPIO (7) /* GPIO [7] */ |
| 1543 | #define GPIO_GPIO8 GPIO_GPIO (8) /* GPIO [8] */ |
| 1544 | #define GPIO_GPIO9 GPIO_GPIO (9) /* GPIO [9] */ |
| 1545 | #define GPIO_GPIO10 GPIO_GPIO (10) /* GPIO [10] */ |
| 1546 | #define GPIO_GPIO11 GPIO_GPIO (11) /* GPIO [11] */ |
| 1547 | #define GPIO_GPIO12 GPIO_GPIO (12) /* GPIO [12] */ |
| 1548 | #define GPIO_GPIO13 GPIO_GPIO (13) /* GPIO [13] */ |
| 1549 | #define GPIO_GPIO14 GPIO_GPIO (14) /* GPIO [14] */ |
| 1550 | #define GPIO_GPIO15 GPIO_GPIO (15) /* GPIO [15] */ |
| 1551 | #define GPIO_GPIO16 GPIO_GPIO (16) /* GPIO [16] */ |
| 1552 | #define GPIO_GPIO17 GPIO_GPIO (17) /* GPIO [17] */ |
| 1553 | #define GPIO_GPIO18 GPIO_GPIO (18) /* GPIO [18] */ |
| 1554 | #define GPIO_GPIO19 GPIO_GPIO (19) /* GPIO [19] */ |
| 1555 | #define GPIO_GPIO20 GPIO_GPIO (20) /* GPIO [20] */ |
| 1556 | #define GPIO_GPIO21 GPIO_GPIO (21) /* GPIO [21] */ |
| 1557 | #define GPIO_GPIO22 GPIO_GPIO (22) /* GPIO [22] */ |
| 1558 | #define GPIO_GPIO23 GPIO_GPIO (23) /* GPIO [23] */ |
| 1559 | #define GPIO_GPIO24 GPIO_GPIO (24) /* GPIO [24] */ |
| 1560 | #define GPIO_GPIO25 GPIO_GPIO (25) /* GPIO [25] */ |
| 1561 | #define GPIO_GPIO26 GPIO_GPIO (26) /* GPIO [26] */ |
| 1562 | #define GPIO_GPIO27 GPIO_GPIO (27) /* GPIO [27] */ |
| 1563 | |
| 1564 | #define GPIO_LDD(Nb) /* LCD Data [8..15] (O) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1565 | GPIO_GPIO ((Nb) - 6) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1566 | #define GPIO_LDD8 GPIO_LDD (8) /* LCD Data [8] (O) */ |
| 1567 | #define GPIO_LDD9 GPIO_LDD (9) /* LCD Data [9] (O) */ |
| 1568 | #define GPIO_LDD10 GPIO_LDD (10) /* LCD Data [10] (O) */ |
| 1569 | #define GPIO_LDD11 GPIO_LDD (11) /* LCD Data [11] (O) */ |
| 1570 | #define GPIO_LDD12 GPIO_LDD (12) /* LCD Data [12] (O) */ |
| 1571 | #define GPIO_LDD13 GPIO_LDD (13) /* LCD Data [13] (O) */ |
| 1572 | #define GPIO_LDD14 GPIO_LDD (14) /* LCD Data [14] (O) */ |
| 1573 | #define GPIO_LDD15 GPIO_LDD (15) /* LCD Data [15] (O) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1574 | /* ser. port 4: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1575 | #define GPIO_SSP_TXD GPIO_GPIO (10) /* SSP Transmit Data (O) */ |
| 1576 | #define GPIO_SSP_RXD GPIO_GPIO (11) /* SSP Receive Data (I) */ |
| 1577 | #define GPIO_SSP_SCLK GPIO_GPIO (12) /* SSP Sample CLocK (O) */ |
| 1578 | #define GPIO_SSP_SFRM GPIO_GPIO (13) /* SSP Sample FRaMe (O) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1579 | /* ser. port 1: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1580 | #define GPIO_UART_TXD GPIO_GPIO (14) /* UART Transmit Data (O) */ |
| 1581 | #define GPIO_UART_RXD GPIO_GPIO (15) /* UART Receive Data (I) */ |
| 1582 | #define GPIO_SDLC_SCLK GPIO_GPIO (16) /* SDLC Sample CLocK (I/O) */ |
| 1583 | #define GPIO_SDLC_AAF GPIO_GPIO (17) /* SDLC Abort After Frame (O) */ |
| 1584 | #define GPIO_UART_SCLK1 GPIO_GPIO (18) /* UART Sample CLocK 1 (I) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1585 | /* ser. port 4: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1586 | #define GPIO_SSP_CLK GPIO_GPIO (19) /* SSP external CLocK (I) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1587 | /* ser. port 3: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1588 | #define GPIO_UART_SCLK3 GPIO_GPIO (20) /* UART Sample CLocK 3 (I) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1589 | /* ser. port 4: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1590 | #define GPIO_MCP_CLK GPIO_GPIO (21) /* MCP CLocK (I) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1591 | /* test controller: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1592 | #define GPIO_TIC_ACK GPIO_GPIO (21) /* TIC ACKnowledge (O) */ |
| 1593 | #define GPIO_MBGNT GPIO_GPIO (21) /* Memory Bus GraNT (O) */ |
| 1594 | #define GPIO_TREQA GPIO_GPIO (22) /* TIC REQuest A (I) */ |
| 1595 | #define GPIO_MBREQ GPIO_GPIO (22) /* Memory Bus REQuest (I) */ |
| 1596 | #define GPIO_TREQB GPIO_GPIO (23) /* TIC REQuest B (I) */ |
| 1597 | #define GPIO_1Hz GPIO_GPIO (25) /* 1 Hz clock (O) */ |
| 1598 | #define GPIO_RCLK GPIO_GPIO (26) /* internal (R) CLocK (O, fcpu/2) */ |
| 1599 | #define GPIO_32_768kHz GPIO_GPIO (27) /* 32.768 kHz clock (O, RTC) */ |
| 1600 | |
| 1601 | #define GPDR_In 0 /* Input */ |
| 1602 | #define GPDR_Out 1 /* Output */ |
| 1603 | |
| 1604 | |
| 1605 | /* |
| 1606 | * Interrupt Controller (IC) control registers |
| 1607 | * |
| 1608 | * Registers |
| 1609 | * ICIP Interrupt Controller (IC) Interrupt ReQuest (IRQ) |
| 1610 | * Pending register (read). |
| 1611 | * ICMR Interrupt Controller (IC) Mask Register (read/write). |
| 1612 | * ICLR Interrupt Controller (IC) Level Register (read/write). |
| 1613 | * ICCR Interrupt Controller (IC) Control Register |
| 1614 | * (read/write). |
| 1615 | * [The ICCR register is only implemented in versions 2.0 |
| 1616 | * (rev. = 8) and higher of the StrongARM SA-1100.] |
| 1617 | * ICFP Interrupt Controller (IC) Fast Interrupt reQuest |
| 1618 | * (FIQ) Pending register (read). |
| 1619 | * ICPR Interrupt Controller (IC) Pending Register (read). |
| 1620 | * [The ICPR register is active low (inverted) in |
| 1621 | * versions 1.0 (rev. = 1) and 1.1 (rev. = 2) of the |
| 1622 | * StrongARM SA-1100, it is active high (non-inverted) in |
| 1623 | * versions 2.0 (rev. = 8) and higher.] |
| 1624 | */ |
| 1625 | |
| 1626 | #define _ICIP 0x90050000 /* IC IRQ Pending reg. */ |
| 1627 | #define _ICMR 0x90050004 /* IC Mask Reg. */ |
| 1628 | #define _ICLR 0x90050008 /* IC Level Reg. */ |
| 1629 | #define _ICCR 0x9005000C /* IC Control Reg. */ |
| 1630 | #define _ICFP 0x90050010 /* IC FIQ Pending reg. */ |
| 1631 | #define _ICPR 0x90050020 /* IC Pending Reg. */ |
| 1632 | |
| 1633 | #if LANGUAGE == C |
| 1634 | #define ICIP /* IC IRQ Pending reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1635 | (*((volatile Word *) io_p2v (_ICIP))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1636 | #define ICMR /* IC Mask Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1637 | (*((volatile Word *) io_p2v (_ICMR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1638 | #define ICLR /* IC Level Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1639 | (*((volatile Word *) io_p2v (_ICLR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1640 | #define ICCR /* IC Control Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1641 | (*((volatile Word *) io_p2v (_ICCR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1642 | #define ICFP /* IC FIQ Pending reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1643 | (*((volatile Word *) io_p2v (_ICFP))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1644 | #define ICPR /* IC Pending Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1645 | (*((volatile Word *) io_p2v (_ICPR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1646 | #endif /* LANGUAGE == C */ |
| 1647 | |
| 1648 | #define IC_GPIO(Nb) /* GPIO [0..10] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1649 | (0x00000001 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1650 | #define IC_GPIO0 IC_GPIO (0) /* GPIO [0] */ |
| 1651 | #define IC_GPIO1 IC_GPIO (1) /* GPIO [1] */ |
| 1652 | #define IC_GPIO2 IC_GPIO (2) /* GPIO [2] */ |
| 1653 | #define IC_GPIO3 IC_GPIO (3) /* GPIO [3] */ |
| 1654 | #define IC_GPIO4 IC_GPIO (4) /* GPIO [4] */ |
| 1655 | #define IC_GPIO5 IC_GPIO (5) /* GPIO [5] */ |
| 1656 | #define IC_GPIO6 IC_GPIO (6) /* GPIO [6] */ |
| 1657 | #define IC_GPIO7 IC_GPIO (7) /* GPIO [7] */ |
| 1658 | #define IC_GPIO8 IC_GPIO (8) /* GPIO [8] */ |
| 1659 | #define IC_GPIO9 IC_GPIO (9) /* GPIO [9] */ |
| 1660 | #define IC_GPIO10 IC_GPIO (10) /* GPIO [10] */ |
| 1661 | #define IC_GPIO11_27 0x00000800 /* GPIO [11:27] (ORed) */ |
| 1662 | #define IC_LCD 0x00001000 /* LCD controller */ |
| 1663 | #define IC_Ser0UDC 0x00002000 /* Ser. port 0 UDC */ |
| 1664 | #define IC_Ser1SDLC 0x00004000 /* Ser. port 1 SDLC */ |
| 1665 | #define IC_Ser1UART 0x00008000 /* Ser. port 1 UART */ |
| 1666 | #define IC_Ser2ICP 0x00010000 /* Ser. port 2 ICP */ |
| 1667 | #define IC_Ser3UART 0x00020000 /* Ser. port 3 UART */ |
| 1668 | #define IC_Ser4MCP 0x00040000 /* Ser. port 4 MCP */ |
| 1669 | #define IC_Ser4SSP 0x00080000 /* Ser. port 4 SSP */ |
| 1670 | #define IC_DMA(Nb) /* DMA controller channel [0..5] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1671 | (0x00100000 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1672 | #define IC_DMA0 IC_DMA (0) /* DMA controller channel 0 */ |
| 1673 | #define IC_DMA1 IC_DMA (1) /* DMA controller channel 1 */ |
| 1674 | #define IC_DMA2 IC_DMA (2) /* DMA controller channel 2 */ |
| 1675 | #define IC_DMA3 IC_DMA (3) /* DMA controller channel 3 */ |
| 1676 | #define IC_DMA4 IC_DMA (4) /* DMA controller channel 4 */ |
| 1677 | #define IC_DMA5 IC_DMA (5) /* DMA controller channel 5 */ |
| 1678 | #define IC_OST(Nb) /* OS Timer match [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1679 | (0x04000000 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1680 | #define IC_OST0 IC_OST (0) /* OS Timer match 0 */ |
| 1681 | #define IC_OST1 IC_OST (1) /* OS Timer match 1 */ |
| 1682 | #define IC_OST2 IC_OST (2) /* OS Timer match 2 */ |
| 1683 | #define IC_OST3 IC_OST (3) /* OS Timer match 3 */ |
| 1684 | #define IC_RTC1Hz 0x40000000 /* RTC 1 Hz clock */ |
| 1685 | #define IC_RTCAlrm 0x80000000 /* RTC Alarm */ |
| 1686 | |
| 1687 | #define ICLR_IRQ 0 /* Interrupt ReQuest */ |
| 1688 | #define ICLR_FIQ 1 /* Fast Interrupt reQuest */ |
| 1689 | |
| 1690 | #define ICCR_DIM 0x00000001 /* Disable Idle-mode interrupt */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1691 | /* Mask */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1692 | #define ICCR_IdleAllInt (ICCR_DIM*0) /* Idle-mode All Interrupt enable */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1693 | /* (ICMR ignored) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1694 | #define ICCR_IdleMskInt (ICCR_DIM*1) /* Idle-mode non-Masked Interrupt */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1695 | /* enable (ICMR used) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1696 | |
| 1697 | |
| 1698 | /* |
| 1699 | * Peripheral Pin Controller (PPC) control registers |
| 1700 | * |
| 1701 | * Registers |
| 1702 | * PPDR Peripheral Pin Controller (PPC) Pin Direction |
| 1703 | * Register (read/write). |
| 1704 | * PPSR Peripheral Pin Controller (PPC) Pin State Register |
| 1705 | * (read/write). |
| 1706 | * PPAR Peripheral Pin Controller (PPC) Pin Assignment |
| 1707 | * Register (read/write). |
| 1708 | * PSDR Peripheral Pin Controller (PPC) Sleep-mode pin |
| 1709 | * Direction Register (read/write). |
| 1710 | * PPFR Peripheral Pin Controller (PPC) Pin Flag Register |
| 1711 | * (read). |
| 1712 | */ |
| 1713 | |
| 1714 | #define _PPDR 0x90060000 /* PPC Pin Direction Reg. */ |
| 1715 | #define _PPSR 0x90060004 /* PPC Pin State Reg. */ |
| 1716 | #define _PPAR 0x90060008 /* PPC Pin Assignment Reg. */ |
| 1717 | #define _PSDR 0x9006000C /* PPC Sleep-mode pin Direction */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1718 | /* Reg. */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1719 | #define _PPFR 0x90060010 /* PPC Pin Flag Reg. */ |
| 1720 | |
| 1721 | #if LANGUAGE == C |
| 1722 | #define PPDR /* PPC Pin Direction Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1723 | (*((volatile Word *) io_p2v (_PPDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1724 | #define PPSR /* PPC Pin State Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1725 | (*((volatile Word *) io_p2v (_PPSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1726 | #define PPAR /* PPC Pin Assignment Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1727 | (*((volatile Word *) io_p2v (_PPAR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1728 | #define PSDR /* PPC Sleep-mode pin Direction */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1729 | /* Reg. */ \ |
| 1730 | (*((volatile Word *) io_p2v (_PSDR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1731 | #define PPFR /* PPC Pin Flag Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1732 | (*((volatile Word *) io_p2v (_PPFR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1733 | #endif /* LANGUAGE == C */ |
| 1734 | |
| 1735 | #define PPC_LDD(Nb) /* LCD Data [0..7] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1736 | (0x00000001 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1737 | #define PPC_LDD0 PPC_LDD (0) /* LCD Data [0] */ |
| 1738 | #define PPC_LDD1 PPC_LDD (1) /* LCD Data [1] */ |
| 1739 | #define PPC_LDD2 PPC_LDD (2) /* LCD Data [2] */ |
| 1740 | #define PPC_LDD3 PPC_LDD (3) /* LCD Data [3] */ |
| 1741 | #define PPC_LDD4 PPC_LDD (4) /* LCD Data [4] */ |
| 1742 | #define PPC_LDD5 PPC_LDD (5) /* LCD Data [5] */ |
| 1743 | #define PPC_LDD6 PPC_LDD (6) /* LCD Data [6] */ |
| 1744 | #define PPC_LDD7 PPC_LDD (7) /* LCD Data [7] */ |
| 1745 | #define PPC_L_PCLK 0x00000100 /* LCD Pixel CLocK */ |
| 1746 | #define PPC_L_LCLK 0x00000200 /* LCD Line CLocK */ |
| 1747 | #define PPC_L_FCLK 0x00000400 /* LCD Frame CLocK */ |
| 1748 | #define PPC_L_BIAS 0x00000800 /* LCD AC BIAS */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1749 | /* ser. port 1: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1750 | #define PPC_TXD1 0x00001000 /* SDLC/UART Transmit Data 1 */ |
| 1751 | #define PPC_RXD1 0x00002000 /* SDLC/UART Receive Data 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1752 | /* ser. port 2: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1753 | #define PPC_TXD2 0x00004000 /* IPC Transmit Data 2 */ |
| 1754 | #define PPC_RXD2 0x00008000 /* IPC Receive Data 2 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1755 | /* ser. port 3: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1756 | #define PPC_TXD3 0x00010000 /* UART Transmit Data 3 */ |
| 1757 | #define PPC_RXD3 0x00020000 /* UART Receive Data 3 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1758 | /* ser. port 4: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1759 | #define PPC_TXD4 0x00040000 /* MCP/SSP Transmit Data 4 */ |
| 1760 | #define PPC_RXD4 0x00080000 /* MCP/SSP Receive Data 4 */ |
| 1761 | #define PPC_SCLK 0x00100000 /* MCP/SSP Sample CLocK */ |
| 1762 | #define PPC_SFRM 0x00200000 /* MCP/SSP Sample FRaMe */ |
| 1763 | |
| 1764 | #define PPDR_In 0 /* Input */ |
| 1765 | #define PPDR_Out 1 /* Output */ |
| 1766 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1767 | /* ser. port 1: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1768 | #define PPAR_UPR 0x00001000 /* UART Pin Reassignment */ |
| 1769 | #define PPAR_UARTTR (PPAR_UPR*0) /* UART on TXD_1 & RXD_1 */ |
| 1770 | #define PPAR_UARTGPIO (PPAR_UPR*1) /* UART on GPIO [14:15] */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1771 | /* ser. port 4: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1772 | #define PPAR_SPR 0x00040000 /* SSP Pin Reassignment */ |
| 1773 | #define PPAR_SSPTRSS (PPAR_SPR*0) /* SSP on TXD_C, RXD_C, SCLK_C, */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1774 | /* & SFRM_C */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1775 | #define PPAR_SSPGPIO (PPAR_SPR*1) /* SSP on GPIO [10:13] */ |
| 1776 | |
| 1777 | #define PSDR_OutL 0 /* Output Low in sleep mode */ |
| 1778 | #define PSDR_Flt 1 /* Floating (input) in sleep mode */ |
| 1779 | |
| 1780 | #define PPFR_LCD 0x00000001 /* LCD controller */ |
| 1781 | #define PPFR_SP1TX 0x00001000 /* Ser. Port 1 SDLC/UART Transmit */ |
| 1782 | #define PPFR_SP1RX 0x00002000 /* Ser. Port 1 SDLC/UART Receive */ |
| 1783 | #define PPFR_SP2TX 0x00004000 /* Ser. Port 2 ICP Transmit */ |
| 1784 | #define PPFR_SP2RX 0x00008000 /* Ser. Port 2 ICP Receive */ |
| 1785 | #define PPFR_SP3TX 0x00010000 /* Ser. Port 3 UART Transmit */ |
| 1786 | #define PPFR_SP3RX 0x00020000 /* Ser. Port 3 UART Receive */ |
| 1787 | #define PPFR_SP4 0x00040000 /* Ser. Port 4 MCP/SSP */ |
| 1788 | #define PPFR_PerEn 0 /* Peripheral Enabled */ |
| 1789 | #define PPFR_PPCEn 1 /* PPC Enabled */ |
| 1790 | |
| 1791 | |
| 1792 | /* |
| 1793 | * Dynamic Random-Access Memory (DRAM) control registers |
| 1794 | * |
| 1795 | * Registers |
| 1796 | * MDCNFG Memory system: Dynamic Random-Access Memory (DRAM) |
| 1797 | * CoNFiGuration register (read/write). |
| 1798 | * MDCAS0 Memory system: Dynamic Random-Access Memory (DRAM) |
| 1799 | * Column Address Strobe (CAS) shift register 0 |
| 1800 | * (read/write). |
| 1801 | * MDCAS1 Memory system: Dynamic Random-Access Memory (DRAM) |
| 1802 | * Column Address Strobe (CAS) shift register 1 |
| 1803 | * (read/write). |
| 1804 | * MDCAS2 Memory system: Dynamic Random-Access Memory (DRAM) |
| 1805 | * Column Address Strobe (CAS) shift register 2 |
| 1806 | * (read/write). |
| 1807 | * |
| 1808 | * Clocks |
| 1809 | * fcpu, Tcpu Frequency, period of the CPU core clock (CCLK). |
| 1810 | * fmem, Tmem Frequency, period of the memory clock (fmem = fcpu/2). |
| 1811 | * fcas, Tcas Frequency, period of the DRAM CAS shift registers. |
| 1812 | */ |
| 1813 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1814 | /* Memory system: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1815 | #define _MDCNFG 0xA0000000 /* DRAM CoNFiGuration reg. */ |
| 1816 | #define _MDCAS(Nb) /* DRAM CAS shift reg. [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1817 | (0xA0000004 + (Nb)*4) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1818 | #define _MDCAS0 _MDCAS (0) /* DRAM CAS shift reg. 0 */ |
| 1819 | #define _MDCAS1 _MDCAS (1) /* DRAM CAS shift reg. 1 */ |
| 1820 | #define _MDCAS2 _MDCAS (2) /* DRAM CAS shift reg. 2 */ |
| 1821 | |
| 1822 | #if LANGUAGE == C |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1823 | /* Memory system: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1824 | #define MDCNFG /* DRAM CoNFiGuration reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1825 | (*((volatile Word *) io_p2v (_MDCNFG))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1826 | #define MDCAS /* DRAM CAS shift reg. [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1827 | ((volatile Word *) io_p2v (_MDCAS (0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1828 | #define MDCAS0 (MDCAS [0]) /* DRAM CAS shift reg. 0 */ |
| 1829 | #define MDCAS1 (MDCAS [1]) /* DRAM CAS shift reg. 1 */ |
| 1830 | #define MDCAS2 (MDCAS [2]) /* DRAM CAS shift reg. 2 */ |
| 1831 | |
| 1832 | #elif LANGUAGE == Assembly |
| 1833 | |
| 1834 | #define MDCNFG (io_p2v(_MDCNFG)) |
| 1835 | |
| 1836 | #endif /* LANGUAGE == C */ |
| 1837 | |
| 1838 | /* SA1100 MDCNFG values */ |
| 1839 | #define MDCNFG_DE(Nb) /* DRAM Enable bank [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1840 | (0x00000001 << (Nb)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1841 | #define MDCNFG_DE0 MDCNFG_DE (0) /* DRAM Enable bank 0 */ |
| 1842 | #define MDCNFG_DE1 MDCNFG_DE (1) /* DRAM Enable bank 1 */ |
| 1843 | #define MDCNFG_DE2 MDCNFG_DE (2) /* DRAM Enable bank 2 */ |
| 1844 | #define MDCNFG_DE3 MDCNFG_DE (3) /* DRAM Enable bank 3 */ |
| 1845 | #define MDCNFG_DRAC Fld (2, 4) /* DRAM Row Address Count - 9 */ |
| 1846 | #define MDCNFG_RowAdd(Add) /* Row Address count [9..12] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1847 | (((Add) - 9) << FShft (MDCNFG_DRAC)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1848 | #define MDCNFG_CDB2 0x00000040 /* shift reg. Clock Divide By 2 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1849 | /* (fcas = fcpu/2) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1850 | #define MDCNFG_TRP Fld (4, 7) /* Time RAS Pre-charge - 1 [Tmem] */ |
| 1851 | #define MDCNFG_PrChrg(Tcpu) /* Pre-Charge time [2..32 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1852 | (((Tcpu) - 2)/2 << FShft (MDCNFG_TRP)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1853 | #define MDCNFG_CeilPrChrg(Tcpu) /* Ceil. of PrChrg [2..32 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1854 | (((Tcpu) - 1)/2 << FShft (MDCNFG_TRP)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1855 | #define MDCNFG_TRASR Fld (4, 11) /* Time RAS Refresh - 1 [Tmem] */ |
| 1856 | #define MDCNFG_Ref(Tcpu) /* Refresh time [2..32 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1857 | (((Tcpu) - 2)/2 << FShft (MDCNFG_TRASR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1858 | #define MDCNFG_CeilRef(Tcpu) /* Ceil. of Ref [2..32 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1859 | (((Tcpu) - 1)/2 << FShft (MDCNFG_TRASR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1860 | #define MDCNFG_TDL Fld (2, 15) /* Time Data Latch [Tcpu] */ |
| 1861 | #define MDCNFG_DataLtch(Tcpu) /* Data Latch delay [0..3 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1862 | ((Tcpu) << FShft (MDCNFG_TDL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1863 | #define MDCNFG_DRI Fld (15, 17) /* min. DRAM Refresh Interval/4 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1864 | /* [Tmem] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1865 | #define MDCNFG_RefInt(Tcpu) /* min. Refresh Interval */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1866 | /* [0..262136 Tcpu] */ \ |
| 1867 | ((Tcpu)/8 << FShft (MDCNFG_DRI)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1868 | |
| 1869 | /* SA1110 MDCNFG values */ |
| 1870 | #define MDCNFG_SA1110_DE0 0x00000001 /* DRAM Enable bank 0 */ |
| 1871 | #define MDCNFG_SA1110_DE1 0x00000002 /* DRAM Enable bank 1 */ |
| 1872 | #define MDCNFG_SA1110_DTIM0 0x00000004 /* DRAM timing type 0/1 */ |
| 1873 | #define MDCNFG_SA1110_DWID0 0x00000008 /* DRAM bus width 0/1 */ |
| 1874 | #define MDCNFG_SA1110_DRAC0 Fld(3, 4) /* DRAM row addr bit count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1875 | /* bank 0/1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1876 | #define MDCNFG_SA1110_CDB20 0x00000080 /* Mem Clock divide by 2 0/1 */ |
| 1877 | #define MDCNFG_SA1110_TRP0 Fld(3, 8) /* RAS precharge 0/1 */ |
| 1878 | #define MDCNFG_SA1110_TDL0 Fld(2, 12) /* Data input latch after CAS*/ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1879 | /* deassertion 0/1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1880 | #define MDCNFG_SA1110_TWR0 Fld(2, 14) /* SDRAM write recovery 0/1 */ |
| 1881 | #define MDCNFG_SA1110_DE2 0x00010000 /* DRAM Enable bank 0 */ |
| 1882 | #define MDCNFG_SA1110_DE3 0x00020000 /* DRAM Enable bank 1 */ |
| 1883 | #define MDCNFG_SA1110_DTIM2 0x00040000 /* DRAM timing type 0/1 */ |
| 1884 | #define MDCNFG_SA1110_DWID2 0x00080000 /* DRAM bus width 0/1 */ |
| 1885 | #define MDCNFG_SA1110_DRAC2 Fld(3, 20) /* DRAM row addr bit count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1886 | /* bank 0/1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1887 | #define MDCNFG_SA1110_CDB22 0x00800000 /* Mem Clock divide by 2 0/1 */ |
| 1888 | #define MDCNFG_SA1110_TRP2 Fld(3, 24) /* RAS precharge 0/1 */ |
| 1889 | #define MDCNFG_SA1110_TDL2 Fld(2, 28) /* Data input latch after CAS*/ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1890 | /* deassertion 0/1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1891 | #define MDCNFG_SA1110_TWR2 Fld(2, 30) /* SDRAM write recovery 0/1 */ |
| 1892 | |
| 1893 | |
| 1894 | /* |
| 1895 | * Static memory control registers |
| 1896 | * |
| 1897 | * Registers |
| 1898 | * MSC0 Memory system: Static memory Control register 0 |
| 1899 | * (read/write). |
| 1900 | * MSC1 Memory system: Static memory Control register 1 |
| 1901 | * (read/write). |
| 1902 | * |
| 1903 | * Clocks |
| 1904 | * fcpu, Tcpu Frequency, period of the CPU core clock (CCLK). |
| 1905 | * fmem, Tmem Frequency, period of the memory clock (fmem = fcpu/2). |
| 1906 | */ |
| 1907 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1908 | /* Memory system: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1909 | #define _MSC(Nb) /* Static memory Control reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1910 | /* [0..1] */ \ |
| 1911 | (0xA0000010 + (Nb)*4) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1912 | #define _MSC0 _MSC (0) /* Static memory Control reg. 0 */ |
| 1913 | #define _MSC1 _MSC (1) /* Static memory Control reg. 1 */ |
| 1914 | #define _MSC2 0xA000002C /* Static memory Control reg. 2, not contiguous */ |
| 1915 | |
| 1916 | #if LANGUAGE == C |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1917 | /* Memory system: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1918 | #define MSC /* Static memory Control reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1919 | /* [0..1] */ \ |
| 1920 | ((volatile Word *) io_p2v (_MSC (0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1921 | #define MSC0 (MSC [0]) /* Static memory Control reg. 0 */ |
| 1922 | #define MSC1 (MSC [1]) /* Static memory Control reg. 1 */ |
| 1923 | #define MSC2 (*(volatile Word *) io_p2v (_MSC2)) /* Static memory Control reg. 2 */ |
| 1924 | |
| 1925 | #elif LANGUAGE == Assembly |
| 1926 | |
| 1927 | #define MSC0 io_p2v(0xa0000010) |
| 1928 | #define MSC1 io_p2v(0xa0000014) |
| 1929 | #define MSC2 io_p2v(0xa000002c) |
| 1930 | |
| 1931 | #endif /* LANGUAGE == C */ |
| 1932 | |
| 1933 | #define MSC_Bnk(Nb) /* static memory Bank [0..3] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1934 | Fld (16, ((Nb) Modulo 2)*16) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1935 | #define MSC0_Bnk0 MSC_Bnk (0) /* static memory Bank 0 */ |
| 1936 | #define MSC0_Bnk1 MSC_Bnk (1) /* static memory Bank 1 */ |
| 1937 | #define MSC1_Bnk2 MSC_Bnk (2) /* static memory Bank 2 */ |
| 1938 | #define MSC1_Bnk3 MSC_Bnk (3) /* static memory Bank 3 */ |
| 1939 | |
| 1940 | #define MSC_RT Fld (2, 0) /* ROM/static memory Type */ |
| 1941 | #define MSC_NonBrst /* Non-Burst static memory */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1942 | (0 << FShft (MSC_RT)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1943 | #define MSC_SRAM /* 32-bit byte-writable SRAM */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1944 | (1 << FShft (MSC_RT)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1945 | #define MSC_Brst4 /* Burst-of-4 static memory */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1946 | (2 << FShft (MSC_RT)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1947 | #define MSC_Brst8 /* Burst-of-8 static memory */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1948 | (3 << FShft (MSC_RT)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1949 | #define MSC_RBW 0x0004 /* ROM/static memory Bus Width */ |
| 1950 | #define MSC_32BitStMem (MSC_RBW*0) /* 32-Bit Static Memory */ |
| 1951 | #define MSC_16BitStMem (MSC_RBW*1) /* 16-Bit Static Memory */ |
| 1952 | #define MSC_RDF Fld (5, 3) /* ROM/static memory read Delay */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1953 | /* First access - 1(.5) [Tmem] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1954 | #define MSC_1stRdAcc(Tcpu) /* 1st Read Access time (burst */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1955 | /* static memory) [3..65 Tcpu] */ \ |
| 1956 | ((((Tcpu) - 3)/2) << FShft (MSC_RDF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1957 | #define MSC_Ceil1stRdAcc(Tcpu) /* Ceil. of 1stRdAcc [3..65 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1958 | ((((Tcpu) - 2)/2) << FShft (MSC_RDF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1959 | #define MSC_RdAcc(Tcpu) /* Read Access time (non-burst */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1960 | /* static memory) [2..64 Tcpu] */ \ |
| 1961 | ((((Tcpu) - 2)/2) << FShft (MSC_RDF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1962 | #define MSC_CeilRdAcc(Tcpu) /* Ceil. of RdAcc [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1963 | ((((Tcpu) - 1)/2) << FShft (MSC_RDF)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1964 | #define MSC_RDN Fld (5, 8) /* ROM/static memory read Delay */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1965 | /* Next access - 1 [Tmem] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1966 | #define MSC_NxtRdAcc(Tcpu) /* Next Read Access time (burst */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1967 | /* static memory) [2..64 Tcpu] */ \ |
| 1968 | ((((Tcpu) - 2)/2) << FShft (MSC_RDN)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1969 | #define MSC_CeilNxtRdAcc(Tcpu) /* Ceil. of NxtRdAcc [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1970 | ((((Tcpu) - 1)/2) << FShft (MSC_RDN)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1971 | #define MSC_WrAcc(Tcpu) /* Write Access time (non-burst */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1972 | /* static memory) [2..64 Tcpu] */ \ |
| 1973 | ((((Tcpu) - 2)/2) << FShft (MSC_RDN)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1974 | #define MSC_CeilWrAcc(Tcpu) /* Ceil. of WrAcc [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1975 | ((((Tcpu) - 1)/2) << FShft (MSC_RDN)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1976 | #define MSC_RRR Fld (3, 13) /* ROM/static memory RecoveRy */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1977 | /* time/2 [Tmem] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1978 | #define MSC_Rec(Tcpu) /* Recovery time [0..28 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1979 | (((Tcpu)/4) << FShft (MSC_RRR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1980 | #define MSC_CeilRec(Tcpu) /* Ceil. of Rec [0..28 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1981 | ((((Tcpu) + 3)/4) << FShft (MSC_RRR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1982 | |
| 1983 | |
| 1984 | /* |
| 1985 | * Personal Computer Memory Card International Association (PCMCIA) control |
| 1986 | * register |
| 1987 | * |
| 1988 | * Register |
| 1989 | * MECR Memory system: Expansion memory bus (PCMCIA) |
| 1990 | * Configuration Register (read/write). |
| 1991 | * |
| 1992 | * Clocks |
| 1993 | * fcpu, Tcpu Frequency, period of the CPU core clock (CCLK). |
| 1994 | * fmem, Tmem Frequency, period of the memory clock (fmem = fcpu/2). |
| 1995 | * fbclk, Tbclk Frequency, period of the PCMCIA clock (BCLK). |
| 1996 | */ |
| 1997 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 1998 | /* Memory system: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 1999 | #define _MECR 0xA0000018 /* Expansion memory bus (PCMCIA) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2000 | /* Configuration Reg. */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2001 | |
| 2002 | #if LANGUAGE == C |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2003 | /* Memory system: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2004 | #define MECR /* Expansion memory bus (PCMCIA) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2005 | /* Configuration Reg. */ \ |
| 2006 | (*((volatile Word *) io_p2v (_MECR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2007 | #endif /* LANGUAGE == C */ |
| 2008 | |
| 2009 | #define MECR_PCMCIA(Nb) /* PCMCIA [0..1] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2010 | Fld (15, (Nb)*16) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2011 | #define MECR_PCMCIA0 MECR_PCMCIA (0) /* PCMCIA 0 */ |
| 2012 | #define MECR_PCMCIA1 MECR_PCMCIA (1) /* PCMCIA 1 */ |
| 2013 | |
| 2014 | #define MECR_BSIO Fld (5, 0) /* BCLK Select I/O - 1 [Tmem] */ |
| 2015 | #define MECR_IOClk(Tcpu) /* I/O Clock [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2016 | ((((Tcpu) - 2)/2) << FShft (MECR_BSIO)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2017 | #define MECR_CeilIOClk(Tcpu) /* Ceil. of IOClk [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2018 | ((((Tcpu) - 1)/2) << FShft (MECR_BSIO)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2019 | #define MECR_BSA Fld (5, 5) /* BCLK Select Attribute - 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2020 | /* [Tmem] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2021 | #define MECR_AttrClk(Tcpu) /* Attribute Clock [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2022 | ((((Tcpu) - 2)/2) << FShft (MECR_BSA)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2023 | #define MECR_CeilAttrClk(Tcpu) /* Ceil. of AttrClk [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2024 | ((((Tcpu) - 1)/2) << FShft (MECR_BSA)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2025 | #define MECR_BSM Fld (5, 10) /* BCLK Select Memory - 1 [Tmem] */ |
| 2026 | #define MECR_MemClk(Tcpu) /* Memory Clock [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2027 | ((((Tcpu) - 2)/2) << FShft (MECR_BSM)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2028 | #define MECR_CeilMemClk(Tcpu) /* Ceil. of MemClk [2..64 Tcpu] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2029 | ((((Tcpu) - 1)/2) << FShft (MECR_BSM)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2030 | |
| 2031 | /* |
| 2032 | * On SA1110 only |
| 2033 | */ |
| 2034 | |
| 2035 | #define _MDREFR 0xA000001C |
| 2036 | |
| 2037 | #if LANGUAGE == C |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2038 | /* Memory system: */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2039 | #define MDREFR \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2040 | (*((volatile Word *) io_p2v (_MDREFR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2041 | |
| 2042 | #elif LANGUAGE == Assembly |
| 2043 | |
| 2044 | #define MDREFR (io_p2v(_MDREFR)) |
| 2045 | |
| 2046 | #endif /* LANGUAGE == C */ |
| 2047 | |
| 2048 | #define MDREFR_TRASR Fld (4, 0) |
| 2049 | #define MDREFR_DRI Fld (12, 4) |
| 2050 | #define MDREFR_E0PIN (1 << 16) |
| 2051 | #define MDREFR_K0RUN (1 << 17) |
| 2052 | #define MDREFR_K0DB2 (1 << 18) |
| 2053 | #define MDREFR_E1PIN (1 << 20) |
| 2054 | #define MDREFR_K1RUN (1 << 21) |
| 2055 | #define MDREFR_K1DB2 (1 << 22) |
| 2056 | #define MDREFR_K2RUN (1 << 25) |
| 2057 | #define MDREFR_K2DB2 (1 << 26) |
| 2058 | #define MDREFR_EAPD (1 << 28) |
| 2059 | #define MDREFR_KAPD (1 << 29) |
| 2060 | #define MDREFR_SLFRSH (1 << 31) |
| 2061 | |
| 2062 | |
| 2063 | /* |
| 2064 | * Direct Memory Access (DMA) control registers |
| 2065 | * |
| 2066 | * Registers |
| 2067 | * DDAR0 Direct Memory Access (DMA) Device Address Register |
| 2068 | * channel 0 (read/write). |
| 2069 | * DCSR0 Direct Memory Access (DMA) Control and Status |
| 2070 | * Register channel 0 (read/write). |
| 2071 | * DBSA0 Direct Memory Access (DMA) Buffer Start address |
| 2072 | * register A channel 0 (read/write). |
| 2073 | * DBTA0 Direct Memory Access (DMA) Buffer Transfer count |
| 2074 | * register A channel 0 (read/write). |
| 2075 | * DBSB0 Direct Memory Access (DMA) Buffer Start address |
| 2076 | * register B channel 0 (read/write). |
| 2077 | * DBTB0 Direct Memory Access (DMA) Buffer Transfer count |
| 2078 | * register B channel 0 (read/write). |
| 2079 | * |
| 2080 | * DDAR1 Direct Memory Access (DMA) Device Address Register |
| 2081 | * channel 1 (read/write). |
| 2082 | * DCSR1 Direct Memory Access (DMA) Control and Status |
| 2083 | * Register channel 1 (read/write). |
| 2084 | * DBSA1 Direct Memory Access (DMA) Buffer Start address |
| 2085 | * register A channel 1 (read/write). |
| 2086 | * DBTA1 Direct Memory Access (DMA) Buffer Transfer count |
| 2087 | * register A channel 1 (read/write). |
| 2088 | * DBSB1 Direct Memory Access (DMA) Buffer Start address |
| 2089 | * register B channel 1 (read/write). |
| 2090 | * DBTB1 Direct Memory Access (DMA) Buffer Transfer count |
| 2091 | * register B channel 1 (read/write). |
| 2092 | * |
| 2093 | * DDAR2 Direct Memory Access (DMA) Device Address Register |
| 2094 | * channel 2 (read/write). |
| 2095 | * DCSR2 Direct Memory Access (DMA) Control and Status |
| 2096 | * Register channel 2 (read/write). |
| 2097 | * DBSA2 Direct Memory Access (DMA) Buffer Start address |
| 2098 | * register A channel 2 (read/write). |
| 2099 | * DBTA2 Direct Memory Access (DMA) Buffer Transfer count |
| 2100 | * register A channel 2 (read/write). |
| 2101 | * DBSB2 Direct Memory Access (DMA) Buffer Start address |
| 2102 | * register B channel 2 (read/write). |
| 2103 | * DBTB2 Direct Memory Access (DMA) Buffer Transfer count |
| 2104 | * register B channel 2 (read/write). |
| 2105 | * |
| 2106 | * DDAR3 Direct Memory Access (DMA) Device Address Register |
| 2107 | * channel 3 (read/write). |
| 2108 | * DCSR3 Direct Memory Access (DMA) Control and Status |
| 2109 | * Register channel 3 (read/write). |
| 2110 | * DBSA3 Direct Memory Access (DMA) Buffer Start address |
| 2111 | * register A channel 3 (read/write). |
| 2112 | * DBTA3 Direct Memory Access (DMA) Buffer Transfer count |
| 2113 | * register A channel 3 (read/write). |
| 2114 | * DBSB3 Direct Memory Access (DMA) Buffer Start address |
| 2115 | * register B channel 3 (read/write). |
| 2116 | * DBTB3 Direct Memory Access (DMA) Buffer Transfer count |
| 2117 | * register B channel 3 (read/write). |
| 2118 | * |
| 2119 | * DDAR4 Direct Memory Access (DMA) Device Address Register |
| 2120 | * channel 4 (read/write). |
| 2121 | * DCSR4 Direct Memory Access (DMA) Control and Status |
| 2122 | * Register channel 4 (read/write). |
| 2123 | * DBSA4 Direct Memory Access (DMA) Buffer Start address |
| 2124 | * register A channel 4 (read/write). |
| 2125 | * DBTA4 Direct Memory Access (DMA) Buffer Transfer count |
| 2126 | * register A channel 4 (read/write). |
| 2127 | * DBSB4 Direct Memory Access (DMA) Buffer Start address |
| 2128 | * register B channel 4 (read/write). |
| 2129 | * DBTB4 Direct Memory Access (DMA) Buffer Transfer count |
| 2130 | * register B channel 4 (read/write). |
| 2131 | * |
| 2132 | * DDAR5 Direct Memory Access (DMA) Device Address Register |
| 2133 | * channel 5 (read/write). |
| 2134 | * DCSR5 Direct Memory Access (DMA) Control and Status |
| 2135 | * Register channel 5 (read/write). |
| 2136 | * DBSA5 Direct Memory Access (DMA) Buffer Start address |
| 2137 | * register A channel 5 (read/write). |
| 2138 | * DBTA5 Direct Memory Access (DMA) Buffer Transfer count |
| 2139 | * register A channel 5 (read/write). |
| 2140 | * DBSB5 Direct Memory Access (DMA) Buffer Start address |
| 2141 | * register B channel 5 (read/write). |
| 2142 | * DBTB5 Direct Memory Access (DMA) Buffer Transfer count |
| 2143 | * register B channel 5 (read/write). |
| 2144 | */ |
| 2145 | |
| 2146 | #define DMASp 0x00000020 /* DMA control reg. Space [byte] */ |
| 2147 | |
| 2148 | #define _DDAR(Nb) /* DMA Device Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2149 | /* channel [0..5] */ \ |
| 2150 | (0xB0000000 + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2151 | #define _SetDCSR(Nb) /* Set DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2152 | /* channel [0..5] (write) */ \ |
| 2153 | (0xB0000004 + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2154 | #define _ClrDCSR(Nb) /* Clear DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2155 | /* channel [0..5] (write) */ \ |
| 2156 | (0xB0000008 + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2157 | #define _RdDCSR(Nb) /* Read DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2158 | /* channel [0..5] (read) */ \ |
| 2159 | (0xB000000C + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2160 | #define _DBSA(Nb) /* DMA Buffer Start address reg. A */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2161 | /* channel [0..5] */ \ |
| 2162 | (0xB0000010 + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2163 | #define _DBTA(Nb) /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2164 | /* reg. A channel [0..5] */ \ |
| 2165 | (0xB0000014 + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2166 | #define _DBSB(Nb) /* DMA Buffer Start address reg. B */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2167 | /* channel [0..5] */ \ |
| 2168 | (0xB0000018 + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2169 | #define _DBTB(Nb) /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2170 | /* reg. B channel [0..5] */ \ |
| 2171 | (0xB000001C + (Nb)*DMASp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2172 | |
| 2173 | #define _DDAR0 _DDAR (0) /* DMA Device Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2174 | /* channel 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2175 | #define _SetDCSR0 _SetDCSR (0) /* Set DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2176 | /* channel 0 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2177 | #define _ClrDCSR0 _ClrDCSR (0) /* Clear DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2178 | /* channel 0 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2179 | #define _RdDCSR0 _RdDCSR (0) /* Read DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2180 | /* channel 0 (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2181 | #define _DBSA0 _DBSA (0) /* DMA Buffer Start address reg. A */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2182 | /* channel 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2183 | #define _DBTA0 _DBTA (0) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2184 | /* reg. A channel 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2185 | #define _DBSB0 _DBSB (0) /* DMA Buffer Start address reg. B */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2186 | /* channel 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2187 | #define _DBTB0 _DBTB (0) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2188 | /* reg. B channel 0 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2189 | |
| 2190 | #define _DDAR1 _DDAR (1) /* DMA Device Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2191 | /* channel 1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2192 | #define _SetDCSR1 _SetDCSR (1) /* Set DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2193 | /* channel 1 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2194 | #define _ClrDCSR1 _ClrDCSR (1) /* Clear DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2195 | /* channel 1 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2196 | #define _RdDCSR1 _RdDCSR (1) /* Read DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2197 | /* channel 1 (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2198 | #define _DBSA1 _DBSA (1) /* DMA Buffer Start address reg. A */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2199 | /* channel 1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2200 | #define _DBTA1 _DBTA (1) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2201 | /* reg. A channel 1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2202 | #define _DBSB1 _DBSB (1) /* DMA Buffer Start address reg. B */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2203 | /* channel 1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2204 | #define _DBTB1 _DBTB (1) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2205 | /* reg. B channel 1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2206 | |
| 2207 | #define _DDAR2 _DDAR (2) /* DMA Device Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2208 | /* channel 2 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2209 | #define _SetDCSR2 _SetDCSR (2) /* Set DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2210 | /* channel 2 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2211 | #define _ClrDCSR2 _ClrDCSR (2) /* Clear DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2212 | /* channel 2 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2213 | #define _RdDCSR2 _RdDCSR (2) /* Read DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2214 | /* channel 2 (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2215 | #define _DBSA2 _DBSA (2) /* DMA Buffer Start address reg. A */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2216 | /* channel 2 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2217 | #define _DBTA2 _DBTA (2) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2218 | /* reg. A channel 2 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2219 | #define _DBSB2 _DBSB (2) /* DMA Buffer Start address reg. B */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2220 | /* channel 2 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2221 | #define _DBTB2 _DBTB (2) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2222 | /* reg. B channel 2 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2223 | |
| 2224 | #define _DDAR3 _DDAR (3) /* DMA Device Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2225 | /* channel 3 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2226 | #define _SetDCSR3 _SetDCSR (3) /* Set DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2227 | /* channel 3 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2228 | #define _ClrDCSR3 _ClrDCSR (3) /* Clear DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2229 | /* channel 3 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2230 | #define _RdDCSR3 _RdDCSR (3) /* Read DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2231 | /* channel 3 (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2232 | #define _DBSA3 _DBSA (3) /* DMA Buffer Start address reg. A */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2233 | /* channel 3 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2234 | #define _DBTA3 _DBTA (3) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2235 | /* reg. A channel 3 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2236 | #define _DBSB3 _DBSB (3) /* DMA Buffer Start address reg. B */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2237 | /* channel 3 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2238 | #define _DBTB3 _DBTB (3) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2239 | /* reg. B channel 3 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2240 | |
| 2241 | #define _DDAR4 _DDAR (4) /* DMA Device Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2242 | /* channel 4 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2243 | #define _SetDCSR4 _SetDCSR (4) /* Set DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2244 | /* channel 4 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2245 | #define _ClrDCSR4 _ClrDCSR (4) /* Clear DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2246 | /* channel 4 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2247 | #define _RdDCSR4 _RdDCSR (4) /* Read DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2248 | /* channel 4 (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2249 | #define _DBSA4 _DBSA (4) /* DMA Buffer Start address reg. A */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2250 | /* channel 4 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2251 | #define _DBTA4 _DBTA (4) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2252 | /* reg. A channel 4 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2253 | #define _DBSB4 _DBSB (4) /* DMA Buffer Start address reg. B */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2254 | /* channel 4 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2255 | #define _DBTB4 _DBTB (4) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2256 | /* reg. B channel 4 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2257 | |
| 2258 | #define _DDAR5 _DDAR (5) /* DMA Device Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2259 | /* channel 5 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2260 | #define _SetDCSR5 _SetDCSR (5) /* Set DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2261 | /* channel 5 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2262 | #define _ClrDCSR5 _ClrDCSR (5) /* Clear DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2263 | /* channel 5 (write) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2264 | #define _RdDCSR5 _RdDCSR (5) /* Read DMA Control & Status Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2265 | /* channel 5 (read) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2266 | #define _DBSA5 _DBSA (5) /* DMA Buffer Start address reg. A */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2267 | /* channel 5 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2268 | #define _DBTA5 _DBTA (5) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2269 | /* reg. A channel 5 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2270 | #define _DBSB5 _DBSB (5) /* DMA Buffer Start address reg. B */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2271 | /* channel 5 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2272 | #define _DBTB5 _DBTB (5) /* DMA Buffer Transfer count */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2273 | /* reg. B channel 5 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2274 | |
| 2275 | #if LANGUAGE == C |
| 2276 | |
| 2277 | #define DDAR0 /* DMA Device Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2278 | /* channel 0 */ \ |
| 2279 | (*((volatile Word *) io_p2v (_DDAR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2280 | #define SetDCSR0 /* Set DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2281 | /* channel 0 (write) */ \ |
| 2282 | (*((volatile Word *) io_p2v (_SetDCSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2283 | #define ClrDCSR0 /* Clear DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2284 | /* channel 0 (write) */ \ |
| 2285 | (*((volatile Word *) io_p2v (_ClrDCSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2286 | #define RdDCSR0 /* Read DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2287 | /* channel 0 (read) */ \ |
| 2288 | (*((volatile Word *) io_p2v (_RdDCSR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2289 | #define DBSA0 /* DMA Buffer Start address reg. A */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2290 | /* channel 0 */ \ |
| 2291 | (*((volatile Address *) io_p2v (_DBSA0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2292 | #define DBTA0 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2293 | /* reg. A channel 0 */ \ |
| 2294 | (*((volatile Word *) io_p2v (_DBTA0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2295 | #define DBSB0 /* DMA Buffer Start address reg. B */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2296 | /* channel 0 */ \ |
| 2297 | (*((volatile Address *) io_p2v (_DBSB0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2298 | #define DBTB0 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2299 | /* reg. B channel 0 */ \ |
| 2300 | (*((volatile Word *) io_p2v (_DBTB0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2301 | |
| 2302 | #define DDAR1 /* DMA Device Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2303 | /* channel 1 */ \ |
| 2304 | (*((volatile Word *) io_p2v (_DDAR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2305 | #define SetDCSR1 /* Set DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2306 | /* channel 1 (write) */ \ |
| 2307 | (*((volatile Word *) io_p2v (_SetDCSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2308 | #define ClrDCSR1 /* Clear DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2309 | /* channel 1 (write) */ \ |
| 2310 | (*((volatile Word *) io_p2v (_ClrDCSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2311 | #define RdDCSR1 /* Read DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2312 | /* channel 1 (read) */ \ |
| 2313 | (*((volatile Word *) io_p2v (_RdDCSR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2314 | #define DBSA1 /* DMA Buffer Start address reg. A */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2315 | /* channel 1 */ \ |
| 2316 | (*((volatile Address *) io_p2v (_DBSA1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2317 | #define DBTA1 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2318 | /* reg. A channel 1 */ \ |
| 2319 | (*((volatile Word *) io_p2v (_DBTA1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2320 | #define DBSB1 /* DMA Buffer Start address reg. B */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2321 | /* channel 1 */ \ |
| 2322 | (*((volatile Address *) io_p2v (_DBSB1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2323 | #define DBTB1 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2324 | /* reg. B channel 1 */ \ |
| 2325 | (*((volatile Word *) io_p2v (_DBTB1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2326 | |
| 2327 | #define DDAR2 /* DMA Device Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2328 | /* channel 2 */ \ |
| 2329 | (*((volatile Word *) io_p2v (_DDAR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2330 | #define SetDCSR2 /* Set DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2331 | /* channel 2 (write) */ \ |
| 2332 | (*((volatile Word *) io_p2v (_SetDCSR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2333 | #define ClrDCSR2 /* Clear DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2334 | /* channel 2 (write) */ \ |
| 2335 | (*((volatile Word *) io_p2v (_ClrDCSR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2336 | #define RdDCSR2 /* Read DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2337 | /* channel 2 (read) */ \ |
| 2338 | (*((volatile Word *) io_p2v (_RdDCSR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2339 | #define DBSA2 /* DMA Buffer Start address reg. A */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2340 | /* channel 2 */ \ |
| 2341 | (*((volatile Address *) io_p2v (_DBSA2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2342 | #define DBTA2 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2343 | /* reg. A channel 2 */ \ |
| 2344 | (*((volatile Word *) io_p2v (_DBTA2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2345 | #define DBSB2 /* DMA Buffer Start address reg. B */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2346 | /* channel 2 */ \ |
| 2347 | (*((volatile Address *) io_p2v (_DBSB2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2348 | #define DBTB2 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2349 | /* reg. B channel 2 */ \ |
| 2350 | (*((volatile Word *) io_p2v (_DBTB2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2351 | |
| 2352 | #define DDAR3 /* DMA Device Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2353 | /* channel 3 */ \ |
| 2354 | (*((volatile Word *) io_p2v (_DDAR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2355 | #define SetDCSR3 /* Set DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2356 | /* channel 3 (write) */ \ |
| 2357 | (*((volatile Word *) io_p2v (_SetDCSR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2358 | #define ClrDCSR3 /* Clear DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2359 | /* channel 3 (write) */ \ |
| 2360 | (*((volatile Word *) io_p2v (_ClrDCSR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2361 | #define RdDCSR3 /* Read DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2362 | /* channel 3 (read) */ \ |
| 2363 | (*((volatile Word *) io_p2v (_RdDCSR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2364 | #define DBSA3 /* DMA Buffer Start address reg. A */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2365 | /* channel 3 */ \ |
| 2366 | (*((volatile Address *) io_p2v (_DBSA3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2367 | #define DBTA3 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2368 | /* reg. A channel 3 */ \ |
| 2369 | (*((volatile Word *) io_p2v (_DBTA3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2370 | #define DBSB3 /* DMA Buffer Start address reg. B */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2371 | /* channel 3 */ \ |
| 2372 | (*((volatile Address *) io_p2v (_DBSB3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2373 | #define DBTB3 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2374 | /* reg. B channel 3 */ \ |
| 2375 | (*((volatile Word *) io_p2v (_DBTB3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2376 | |
| 2377 | #define DDAR4 /* DMA Device Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2378 | /* channel 4 */ \ |
| 2379 | (*((volatile Word *) io_p2v (_DDAR4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2380 | #define SetDCSR4 /* Set DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2381 | /* channel 4 (write) */ \ |
| 2382 | (*((volatile Word *) io_p2v (_SetDCSR4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2383 | #define ClrDCSR4 /* Clear DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2384 | /* channel 4 (write) */ \ |
| 2385 | (*((volatile Word *) io_p2v (_ClrDCSR4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2386 | #define RdDCSR4 /* Read DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2387 | /* channel 4 (read) */ \ |
| 2388 | (*((volatile Word *) io_p2v (_RdDCSR4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2389 | #define DBSA4 /* DMA Buffer Start address reg. A */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2390 | /* channel 4 */ \ |
| 2391 | (*((volatile Address *) io_p2v (_DBSA4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2392 | #define DBTA4 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2393 | /* reg. A channel 4 */ \ |
| 2394 | (*((volatile Word *) io_p2v (_DBTA4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2395 | #define DBSB4 /* DMA Buffer Start address reg. B */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2396 | /* channel 4 */ \ |
| 2397 | (*((volatile Address *) io_p2v (_DBSB4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2398 | #define DBTB4 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2399 | /* reg. B channel 4 */ \ |
| 2400 | (*((volatile Word *) io_p2v (_DBTB4))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2401 | |
| 2402 | #define DDAR5 /* DMA Device Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2403 | /* channel 5 */ \ |
| 2404 | (*((volatile Word *) io_p2v (_DDAR5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2405 | #define SetDCSR5 /* Set DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2406 | /* channel 5 (write) */ \ |
| 2407 | (*((volatile Word *) io_p2v (_SetDCSR5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2408 | #define ClrDCSR5 /* Clear DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2409 | /* channel 5 (write) */ \ |
| 2410 | (*((volatile Word *) io_p2v (_ClrDCSR5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2411 | #define RdDCSR5 /* Read DMA Control & Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2412 | /* channel 5 (read) */ \ |
| 2413 | (*((volatile Word *) io_p2v (_RdDCSR5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2414 | #define DBSA5 /* DMA Buffer Start address reg. A */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2415 | /* channel 5 */ \ |
| 2416 | (*((volatile Address *) io_p2v (_DBSA5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2417 | #define DBTA5 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2418 | /* reg. A channel 5 */ \ |
| 2419 | (*((volatile Word *) io_p2v (_DBTA5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2420 | #define DBSB5 /* DMA Buffer Start address reg. B */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2421 | /* channel 5 */ \ |
| 2422 | (*((volatile Address *) io_p2v (_DBSB5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2423 | #define DBTB5 /* DMA Buffer Transfer count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2424 | /* reg. B channel 5 */ \ |
| 2425 | (*((volatile Word *) io_p2v (_DBTB5))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2426 | |
| 2427 | #endif /* LANGUAGE == C */ |
| 2428 | |
| 2429 | #define DDAR_RW 0x00000001 /* device data Read/Write */ |
| 2430 | #define DDAR_DevWr (DDAR_RW*0) /* Device data Write */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2431 | /* (memory -> device) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2432 | #define DDAR_DevRd (DDAR_RW*1) /* Device data Read */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2433 | /* (device -> memory) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2434 | #define DDAR_E 0x00000002 /* big/little Endian device */ |
| 2435 | #define DDAR_LtlEnd (DDAR_E*0) /* Little Endian device */ |
| 2436 | #define DDAR_BigEnd (DDAR_E*1) /* Big Endian device */ |
| 2437 | #define DDAR_BS 0x00000004 /* device Burst Size */ |
| 2438 | #define DDAR_Brst4 (DDAR_BS*0) /* Burst-of-4 device */ |
| 2439 | #define DDAR_Brst8 (DDAR_BS*1) /* Burst-of-8 device */ |
| 2440 | #define DDAR_DW 0x00000008 /* device Data Width */ |
| 2441 | #define DDAR_8BitDev (DDAR_DW*0) /* 8-Bit Device */ |
| 2442 | #define DDAR_16BitDev (DDAR_DW*1) /* 16-Bit Device */ |
| 2443 | #define DDAR_DS Fld (4, 4) /* Device Select */ |
| 2444 | #define DDAR_Ser0UDCTr /* Ser. port 0 UDC Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2445 | (0x0 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2446 | #define DDAR_Ser0UDCRc /* Ser. port 0 UDC Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2447 | (0x1 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2448 | #define DDAR_Ser1SDLCTr /* Ser. port 1 SDLC Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2449 | (0x2 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2450 | #define DDAR_Ser1SDLCRc /* Ser. port 1 SDLC Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2451 | (0x3 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2452 | #define DDAR_Ser1UARTTr /* Ser. port 1 UART Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2453 | (0x4 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2454 | #define DDAR_Ser1UARTRc /* Ser. port 1 UART Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2455 | (0x5 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2456 | #define DDAR_Ser2ICPTr /* Ser. port 2 ICP Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2457 | (0x6 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2458 | #define DDAR_Ser2ICPRc /* Ser. port 2 ICP Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2459 | (0x7 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2460 | #define DDAR_Ser3UARTTr /* Ser. port 3 UART Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2461 | (0x8 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2462 | #define DDAR_Ser3UARTRc /* Ser. port 3 UART Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2463 | (0x9 << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2464 | #define DDAR_Ser4MCP0Tr /* Ser. port 4 MCP 0 Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2465 | /* (audio) */ \ |
| 2466 | (0xA << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2467 | #define DDAR_Ser4MCP0Rc /* Ser. port 4 MCP 0 Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2468 | /* (audio) */ \ |
| 2469 | (0xB << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2470 | #define DDAR_Ser4MCP1Tr /* Ser. port 4 MCP 1 Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2471 | /* (telecom) */ \ |
| 2472 | (0xC << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2473 | #define DDAR_Ser4MCP1Rc /* Ser. port 4 MCP 1 Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2474 | /* (telecom) */ \ |
| 2475 | (0xD << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2476 | #define DDAR_Ser4SSPTr /* Ser. port 4 SSP Transmit */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2477 | (0xE << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2478 | #define DDAR_Ser4SSPRc /* Ser. port 4 SSP Receive */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2479 | (0xF << FShft (DDAR_DS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2480 | #define DDAR_DA Fld (24, 8) /* Device Address */ |
| 2481 | #define DDAR_DevAdd(Add) /* Device Address */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2482 | (((Add) & 0xF0000000) | \ |
| 2483 | (((Add) & 0X003FFFFC) << (FShft (DDAR_DA) - 2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2484 | #define DDAR_Ser0UDCWr /* Ser. port 0 UDC Write */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2485 | (DDAR_DevWr + DDAR_Brst8 + DDAR_8BitDev + \ |
| 2486 | DDAR_Ser0UDCTr + DDAR_DevAdd (_Ser0UDCDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2487 | #define DDAR_Ser0UDCRd /* Ser. port 0 UDC Read */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2488 | (DDAR_DevRd + DDAR_Brst8 + DDAR_8BitDev + \ |
| 2489 | DDAR_Ser0UDCRc + DDAR_DevAdd (_Ser0UDCDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2490 | #define DDAR_Ser1UARTWr /* Ser. port 1 UART Write */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2491 | (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2492 | DDAR_Ser1UARTTr + DDAR_DevAdd (_Ser1UTDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2493 | #define DDAR_Ser1UARTRd /* Ser. port 1 UART Read */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2494 | (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2495 | DDAR_Ser1UARTRc + DDAR_DevAdd (_Ser1UTDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2496 | #define DDAR_Ser1SDLCWr /* Ser. port 1 SDLC Write */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2497 | (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2498 | DDAR_Ser1SDLCTr + DDAR_DevAdd (_Ser1SDDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2499 | #define DDAR_Ser1SDLCRd /* Ser. port 1 SDLC Read */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2500 | (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2501 | DDAR_Ser1SDLCRc + DDAR_DevAdd (_Ser1SDDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2502 | #define DDAR_Ser2UARTWr /* Ser. port 2 UART Write */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2503 | (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2504 | DDAR_Ser2ICPTr + DDAR_DevAdd (_Ser2UTDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2505 | #define DDAR_Ser2UARTRd /* Ser. port 2 UART Read */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2506 | (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2507 | DDAR_Ser2ICPRc + DDAR_DevAdd (_Ser2UTDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2508 | #define DDAR_Ser2HSSPWr /* Ser. port 2 HSSP Write */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2509 | (DDAR_DevWr + DDAR_Brst8 + DDAR_8BitDev + \ |
| 2510 | DDAR_Ser2ICPTr + DDAR_DevAdd (_Ser2HSDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2511 | #define DDAR_Ser2HSSPRd /* Ser. port 2 HSSP Read */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2512 | (DDAR_DevRd + DDAR_Brst8 + DDAR_8BitDev + \ |
| 2513 | DDAR_Ser2ICPRc + DDAR_DevAdd (_Ser2HSDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2514 | #define DDAR_Ser3UARTWr /* Ser. port 3 UART Write */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2515 | (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2516 | DDAR_Ser3UARTTr + DDAR_DevAdd (_Ser3UTDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2517 | #define DDAR_Ser3UARTRd /* Ser. port 3 UART Read */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2518 | (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \ |
| 2519 | DDAR_Ser3UARTRc + DDAR_DevAdd (_Ser3UTDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2520 | #define DDAR_Ser4MCP0Wr /* Ser. port 4 MCP 0 Write (audio) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2521 | (DDAR_DevWr + DDAR_Brst4 + DDAR_16BitDev + \ |
| 2522 | DDAR_Ser4MCP0Tr + DDAR_DevAdd (_Ser4MCDR0)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2523 | #define DDAR_Ser4MCP0Rd /* Ser. port 4 MCP 0 Read (audio) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2524 | (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \ |
| 2525 | DDAR_Ser4MCP0Rc + DDAR_DevAdd (_Ser4MCDR0)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2526 | #define DDAR_Ser4MCP1Wr /* Ser. port 4 MCP 1 Write */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2527 | /* (telecom) */ \ |
| 2528 | (DDAR_DevWr + DDAR_Brst4 + DDAR_16BitDev + \ |
| 2529 | DDAR_Ser4MCP1Tr + DDAR_DevAdd (_Ser4MCDR1)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2530 | #define DDAR_Ser4MCP1Rd /* Ser. port 4 MCP 1 Read */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2531 | /* (telecom) */ \ |
| 2532 | (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \ |
| 2533 | DDAR_Ser4MCP1Rc + DDAR_DevAdd (_Ser4MCDR1)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2534 | #define DDAR_Ser4SSPWr /* Ser. port 4 SSP Write (16 bits) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2535 | (DDAR_DevWr + DDAR_Brst4 + DDAR_16BitDev + \ |
| 2536 | DDAR_Ser4SSPTr + DDAR_DevAdd (_Ser4SSDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2537 | #define DDAR_Ser4SSPRd /* Ser. port 4 SSP Read (16 bits) */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2538 | (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \ |
| 2539 | DDAR_Ser4SSPRc + DDAR_DevAdd (_Ser4SSDR)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2540 | |
| 2541 | #define DCSR_RUN 0x00000001 /* DMA RUNing */ |
| 2542 | #define DCSR_IE 0x00000002 /* DMA Interrupt Enable */ |
| 2543 | #define DCSR_ERROR 0x00000004 /* DMA ERROR */ |
| 2544 | #define DCSR_DONEA 0x00000008 /* DONE DMA transfer buffer A */ |
| 2545 | #define DCSR_STRTA 0x00000010 /* STaRTed DMA transfer buffer A */ |
| 2546 | #define DCSR_DONEB 0x00000020 /* DONE DMA transfer buffer B */ |
| 2547 | #define DCSR_STRTB 0x00000040 /* STaRTed DMA transfer buffer B */ |
| 2548 | #define DCSR_BIU 0x00000080 /* DMA Buffer In Use */ |
| 2549 | #define DCSR_BufA (DCSR_BIU*0) /* DMA Buffer A in use */ |
| 2550 | #define DCSR_BufB (DCSR_BIU*1) /* DMA Buffer B in use */ |
| 2551 | |
| 2552 | #define DBT_TC Fld (13, 0) /* Transfer Count */ |
| 2553 | #define DBTA_TCA DBT_TC /* Transfer Count buffer A */ |
| 2554 | #define DBTB_TCB DBT_TC /* Transfer Count buffer B */ |
| 2555 | |
| 2556 | |
| 2557 | /* |
| 2558 | * Liquid Crystal Display (LCD) control registers |
| 2559 | * |
| 2560 | * Registers |
| 2561 | * LCCR0 Liquid Crystal Display (LCD) Control Register 0 |
| 2562 | * (read/write). |
| 2563 | * [Bits LDM, BAM, and ERM are only implemented in |
| 2564 | * versions 2.0 (rev. = 8) and higher of the StrongARM |
| 2565 | * SA-1100.] |
| 2566 | * LCSR Liquid Crystal Display (LCD) Status Register |
| 2567 | * (read/write). |
| 2568 | * [Bit LDD can be only read in versions 1.0 (rev. = 1) |
| 2569 | * and 1.1 (rev. = 2) of the StrongARM SA-1100, it can be |
| 2570 | * read and written (cleared) in versions 2.0 (rev. = 8) |
| 2571 | * and higher.] |
| 2572 | * DBAR1 Liquid Crystal Display (LCD) Direct Memory Access |
| 2573 | * (DMA) Base Address Register channel 1 (read/write). |
| 2574 | * DCAR1 Liquid Crystal Display (LCD) Direct Memory Access |
| 2575 | * (DMA) Current Address Register channel 1 (read). |
| 2576 | * DBAR2 Liquid Crystal Display (LCD) Direct Memory Access |
| 2577 | * (DMA) Base Address Register channel 2 (read/write). |
| 2578 | * DCAR2 Liquid Crystal Display (LCD) Direct Memory Access |
| 2579 | * (DMA) Current Address Register channel 2 (read). |
| 2580 | * LCCR1 Liquid Crystal Display (LCD) Control Register 1 |
| 2581 | * (read/write). |
| 2582 | * [The LCCR1 register can be only written in |
| 2583 | * versions 1.0 (rev. = 1) and 1.1 (rev. = 2) of the |
| 2584 | * StrongARM SA-1100, it can be written and read in |
| 2585 | * versions 2.0 (rev. = 8) and higher.] |
| 2586 | * LCCR2 Liquid Crystal Display (LCD) Control Register 2 |
| 2587 | * (read/write). |
| 2588 | * [The LCCR1 register can be only written in |
| 2589 | * versions 1.0 (rev. = 1) and 1.1 (rev. = 2) of the |
| 2590 | * StrongARM SA-1100, it can be written and read in |
| 2591 | * versions 2.0 (rev. = 8) and higher.] |
| 2592 | * LCCR3 Liquid Crystal Display (LCD) Control Register 3 |
| 2593 | * (read/write). |
| 2594 | * [The LCCR1 register can be only written in |
| 2595 | * versions 1.0 (rev. = 1) and 1.1 (rev. = 2) of the |
| 2596 | * StrongARM SA-1100, it can be written and read in |
| 2597 | * versions 2.0 (rev. = 8) and higher. Bit PCP is only |
| 2598 | * implemented in versions 2.0 (rev. = 8) and higher of |
| 2599 | * the StrongARM SA-1100.] |
| 2600 | * |
| 2601 | * Clocks |
| 2602 | * fcpu, Tcpu Frequency, period of the CPU core clock (CCLK). |
| 2603 | * fmem, Tmem Frequency, period of the memory clock (fmem = fcpu/2). |
| 2604 | * fpix, Tpix Frequency, period of the pixel clock. |
| 2605 | * fln, Tln Frequency, period of the line clock. |
| 2606 | * fac, Tac Frequency, period of the AC bias clock. |
| 2607 | */ |
| 2608 | |
| 2609 | #define LCD_PEntrySp 2 /* LCD Palette Entry Space [byte] */ |
| 2610 | #define LCD_4BitPSp /* LCD 4-Bit pixel Palette Space */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2611 | /* [byte] */ \ |
| 2612 | (16*LCD_PEntrySp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2613 | #define LCD_8BitPSp /* LCD 8-Bit pixel Palette Space */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2614 | /* [byte] */ \ |
| 2615 | (256*LCD_PEntrySp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2616 | #define LCD_12_16BitPSp /* LCD 12/16-Bit pixel */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2617 | /* dummy-Palette Space [byte] */ \ |
| 2618 | (16*LCD_PEntrySp) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2619 | |
| 2620 | #define LCD_PGrey Fld (4, 0) /* LCD Palette entry Grey value */ |
| 2621 | #define LCD_PBlue Fld (4, 0) /* LCD Palette entry Blue value */ |
| 2622 | #define LCD_PGreen Fld (4, 4) /* LCD Palette entry Green value */ |
| 2623 | #define LCD_PRed Fld (4, 8) /* LCD Palette entry Red value */ |
| 2624 | #define LCD_PBS Fld (2, 12) /* LCD Pixel Bit Size */ |
| 2625 | #define LCD_4Bit /* LCD 4-Bit pixel mode */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2626 | (0 << FShft (LCD_PBS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2627 | #define LCD_8Bit /* LCD 8-Bit pixel mode */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2628 | (1 << FShft (LCD_PBS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2629 | #define LCD_12_16Bit /* LCD 12/16-Bit pixel mode */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2630 | (2 << FShft (LCD_PBS)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2631 | |
| 2632 | #define LCD_Int0_0 0x0 /* LCD Intensity = 0.0% = 0 */ |
| 2633 | #define LCD_Int11_1 0x1 /* LCD Intensity = 11.1% = 1/9 */ |
| 2634 | #define LCD_Int20_0 0x2 /* LCD Intensity = 20.0% = 1/5 */ |
| 2635 | #define LCD_Int26_7 0x3 /* LCD Intensity = 26.7% = 4/15 */ |
| 2636 | #define LCD_Int33_3 0x4 /* LCD Intensity = 33.3% = 3/9 */ |
| 2637 | #define LCD_Int40_0 0x5 /* LCD Intensity = 40.0% = 2/5 */ |
| 2638 | #define LCD_Int44_4 0x6 /* LCD Intensity = 44.4% = 4/9 */ |
| 2639 | #define LCD_Int50_0 0x7 /* LCD Intensity = 50.0% = 1/2 */ |
| 2640 | #define LCD_Int55_6 0x8 /* LCD Intensity = 55.6% = 5/9 */ |
| 2641 | #define LCD_Int60_0 0x9 /* LCD Intensity = 60.0% = 3/5 */ |
| 2642 | #define LCD_Int66_7 0xA /* LCD Intensity = 66.7% = 6/9 */ |
| 2643 | #define LCD_Int73_3 0xB /* LCD Intensity = 73.3% = 11/15 */ |
| 2644 | #define LCD_Int80_0 0xC /* LCD Intensity = 80.0% = 4/5 */ |
| 2645 | #define LCD_Int88_9 0xD /* LCD Intensity = 88.9% = 8/9 */ |
| 2646 | #define LCD_Int100_0 0xE /* LCD Intensity = 100.0% = 1 */ |
| 2647 | #define LCD_Int100_0A 0xF /* LCD Intensity = 100.0% = 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2648 | /* (Alternative) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2649 | |
| 2650 | #define _LCCR0 0xB0100000 /* LCD Control Reg. 0 */ |
| 2651 | #define _LCSR 0xB0100004 /* LCD Status Reg. */ |
| 2652 | #define _DBAR1 0xB0100010 /* LCD DMA Base Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2653 | /* channel 1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2654 | #define _DCAR1 0xB0100014 /* LCD DMA Current Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2655 | /* channel 1 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2656 | #define _DBAR2 0xB0100018 /* LCD DMA Base Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2657 | /* channel 2 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2658 | #define _DCAR2 0xB010001C /* LCD DMA Current Address Reg. */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2659 | /* channel 2 */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2660 | #define _LCCR1 0xB0100020 /* LCD Control Reg. 1 */ |
| 2661 | #define _LCCR2 0xB0100024 /* LCD Control Reg. 2 */ |
| 2662 | #define _LCCR3 0xB0100028 /* LCD Control Reg. 3 */ |
| 2663 | |
| 2664 | #if LANGUAGE == C |
| 2665 | #define LCCR0 /* LCD Control Reg. 0 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2666 | (*((volatile Word *) io_p2v (_LCCR0))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2667 | #define LCSR /* LCD Status Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2668 | (*((volatile Word *) io_p2v (_LCSR))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2669 | #define DBAR1 /* LCD DMA Base Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2670 | /* channel 1 */ \ |
| 2671 | (*((volatile Address *) io_p2v (_DBAR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2672 | #define DCAR1 /* LCD DMA Current Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2673 | /* channel 1 */ \ |
| 2674 | (*((volatile Address *) io_p2v (_DCAR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2675 | #define DBAR2 /* LCD DMA Base Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2676 | /* channel 2 */ \ |
| 2677 | (*((volatile Address *) io_p2v (_DBAR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2678 | #define DCAR2 /* LCD DMA Current Address Reg. */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2679 | /* channel 2 */ \ |
| 2680 | (*((volatile Address *) io_p2v (_DCAR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2681 | #define LCCR1 /* LCD Control Reg. 1 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2682 | (*((volatile Word *) io_p2v (_LCCR1))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2683 | #define LCCR2 /* LCD Control Reg. 2 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2684 | (*((volatile Word *) io_p2v (_LCCR2))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2685 | #define LCCR3 /* LCD Control Reg. 3 */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2686 | (*((volatile Word *) io_p2v (_LCCR3))) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2687 | #endif /* LANGUAGE == C */ |
| 2688 | |
| 2689 | #define LCCR0_LEN 0x00000001 /* LCD ENable */ |
| 2690 | #define LCCR0_CMS 0x00000002 /* Color/Monochrome display Select */ |
| 2691 | #define LCCR0_Color (LCCR0_CMS*0) /* Color display */ |
| 2692 | #define LCCR0_Mono (LCCR0_CMS*1) /* Monochrome display */ |
| 2693 | #define LCCR0_SDS 0x00000004 /* Single/Dual panel display */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2694 | /* Select */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2695 | #define LCCR0_Sngl (LCCR0_SDS*0) /* Single panel display */ |
| 2696 | #define LCCR0_Dual (LCCR0_SDS*1) /* Dual panel display */ |
| 2697 | #define LCCR0_LDM 0x00000008 /* LCD Disable done (LDD) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2698 | /* interrupt Mask (disable) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2699 | #define LCCR0_BAM 0x00000010 /* Base Address update (BAU) */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2700 | /* interrupt Mask (disable) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2701 | #define LCCR0_ERM 0x00000020 /* LCD ERror (BER, IOL, IUL, IOU, */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2702 | /* IUU, OOL, OUL, OOU, and OUU) */ |
| 2703 | /* interrupt Mask (disable) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2704 | #define LCCR0_PAS 0x00000080 /* Passive/Active display Select */ |
| 2705 | #define LCCR0_Pas (LCCR0_PAS*0) /* Passive display (STN) */ |
| 2706 | #define LCCR0_Act (LCCR0_PAS*1) /* Active display (TFT) */ |
| 2707 | #define LCCR0_BLE 0x00000100 /* Big/Little Endian select */ |
| 2708 | #define LCCR0_LtlEnd (LCCR0_BLE*0) /* Little Endian frame buffer */ |
| 2709 | #define LCCR0_BigEnd (LCCR0_BLE*1) /* Big Endian frame buffer */ |
| 2710 | #define LCCR0_DPD 0x00000200 /* Double Pixel Data (monochrome */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2711 | /* display mode) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2712 | #define LCCR0_4PixMono (LCCR0_DPD*0) /* 4-Pixel/clock Monochrome */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2713 | /* display */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2714 | #define LCCR0_8PixMono (LCCR0_DPD*1) /* 8-Pixel/clock Monochrome */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2715 | /* display */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2716 | #define LCCR0_PDD Fld (8, 12) /* Palette DMA request Delay */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2717 | /* [Tmem] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2718 | #define LCCR0_DMADel(Tcpu) /* palette DMA request Delay */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2719 | /* [0..510 Tcpu] */ \ |
| 2720 | ((Tcpu)/2 << FShft (LCCR0_PDD)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2721 | |
| 2722 | #define LCSR_LDD 0x00000001 /* LCD Disable Done */ |
| 2723 | #define LCSR_BAU 0x00000002 /* Base Address Update (read) */ |
| 2724 | #define LCSR_BER 0x00000004 /* Bus ERror */ |
| 2725 | #define LCSR_ABC 0x00000008 /* AC Bias clock Count */ |
| 2726 | #define LCSR_IOL 0x00000010 /* Input FIFO Over-run Lower */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2727 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2728 | #define LCSR_IUL 0x00000020 /* Input FIFO Under-run Lower */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2729 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2730 | #define LCSR_IOU 0x00000040 /* Input FIFO Over-run Upper */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2731 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2732 | #define LCSR_IUU 0x00000080 /* Input FIFO Under-run Upper */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2733 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2734 | #define LCSR_OOL 0x00000100 /* Output FIFO Over-run Lower */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2735 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2736 | #define LCSR_OUL 0x00000200 /* Output FIFO Under-run Lower */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2737 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2738 | #define LCSR_OOU 0x00000400 /* Output FIFO Over-run Upper */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2739 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2740 | #define LCSR_OUU 0x00000800 /* Output FIFO Under-run Upper */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2741 | /* panel */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2742 | |
| 2743 | #define LCCR1_PPL Fld (6, 4) /* Pixels Per Line/16 - 1 */ |
| 2744 | #define LCCR1_DisWdth(Pixel) /* Display Width [16..1024 pix.] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2745 | (((Pixel) - 16)/16 << FShft (LCCR1_PPL)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2746 | #define LCCR1_HSW Fld (6, 10) /* Horizontal Synchronization */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2747 | /* pulse Width - 2 [Tpix] (L_LCLK) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2748 | #define LCCR1_HorSnchWdth(Tpix) /* Horizontal Synchronization */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2749 | /* pulse Width [2..65 Tpix] */ \ |
| 2750 | (((Tpix) - 2) << FShft (LCCR1_HSW)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2751 | #define LCCR1_ELW Fld (8, 16) /* End-of-Line pixel clock Wait */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2752 | /* count - 1 [Tpix] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2753 | #define LCCR1_EndLnDel(Tpix) /* End-of-Line Delay */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2754 | /* [1..256 Tpix] */ \ |
| 2755 | (((Tpix) - 1) << FShft (LCCR1_ELW)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2756 | #define LCCR1_BLW Fld (8, 24) /* Beginning-of-Line pixel clock */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2757 | /* Wait count - 1 [Tpix] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2758 | #define LCCR1_BegLnDel(Tpix) /* Beginning-of-Line Delay */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2759 | /* [1..256 Tpix] */ \ |
| 2760 | (((Tpix) - 1) << FShft (LCCR1_BLW)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2761 | |
| 2762 | #define LCCR2_LPP Fld (10, 0) /* Line Per Panel - 1 */ |
| 2763 | #define LCCR2_DisHght(Line) /* Display Height [1..1024 lines] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2764 | (((Line) - 1) << FShft (LCCR2_LPP)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2765 | #define LCCR2_VSW Fld (6, 10) /* Vertical Synchronization pulse */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2766 | /* Width - 1 [Tln] (L_FCLK) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2767 | #define LCCR2_VrtSnchWdth(Tln) /* Vertical Synchronization pulse */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2768 | /* Width [1..64 Tln] */ \ |
| 2769 | (((Tln) - 1) << FShft (LCCR2_VSW)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2770 | #define LCCR2_EFW Fld (8, 16) /* End-of-Frame line clock Wait */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2771 | /* count [Tln] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2772 | #define LCCR2_EndFrmDel(Tln) /* End-of-Frame Delay */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2773 | /* [0..255 Tln] */ \ |
| 2774 | ((Tln) << FShft (LCCR2_EFW)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2775 | #define LCCR2_BFW Fld (8, 24) /* Beginning-of-Frame line clock */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2776 | /* Wait count [Tln] */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2777 | #define LCCR2_BegFrmDel(Tln) /* Beginning-of-Frame Delay */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2778 | /* [0..255 Tln] */ \ |
| 2779 | ((Tln) << FShft (LCCR2_BFW)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2780 | |
| 2781 | #define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor/2 - 2 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2782 | /* [1..255] (L_PCLK) */ |
| 2783 | /* fpix = fcpu/(2*(PCD + 2)) */ |
| 2784 | /* Tpix = 2*(PCD + 2)*Tcpu */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2785 | #define LCCR3_PixClkDiv(Div) /* Pixel Clock Divisor [6..514] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2786 | (((Div) - 4)/2 << FShft (LCCR3_PCD)) |
| 2787 | /* fpix = fcpu/(2*Floor (Div/2)) */ |
| 2788 | /* Tpix = 2*Floor (Div/2)*Tcpu */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2789 | #define LCCR3_CeilPixClkDiv(Div) /* Ceil. of PixClkDiv [6..514] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2790 | (((Div) - 3)/2 << FShft (LCCR3_PCD)) |
| 2791 | /* fpix = fcpu/(2*Ceil (Div/2)) */ |
| 2792 | /* Tpix = 2*Ceil (Div/2)*Tcpu */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2793 | #define LCCR3_ACB Fld (8, 8) /* AC Bias clock half period - 1 */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2794 | /* [Tln] (L_BIAS) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2795 | #define LCCR3_ACBsDiv(Div) /* AC Bias clock Divisor [2..512] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2796 | (((Div) - 2)/2 << FShft (LCCR3_ACB)) |
| 2797 | /* fac = fln/(2*Floor (Div/2)) */ |
| 2798 | /* Tac = 2*Floor (Div/2)*Tln */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2799 | #define LCCR3_CeilACBsDiv(Div) /* Ceil. of ACBsDiv [2..512] */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2800 | (((Div) - 1)/2 << FShft (LCCR3_ACB)) |
| 2801 | /* fac = fln/(2*Ceil (Div/2)) */ |
| 2802 | /* Tac = 2*Ceil (Div/2)*Tln */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2803 | #define LCCR3_API Fld (4, 16) /* AC bias Pin transitions per */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2804 | /* Interrupt */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2805 | #define LCCR3_ACBsCntOff /* AC Bias clock transition Count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2806 | /* Off */ \ |
| 2807 | (0 << FShft (LCCR3_API)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2808 | #define LCCR3_ACBsCnt(Trans) /* AC Bias clock transition Count */ \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2809 | /* [1..15] */ \ |
| 2810 | ((Trans) << FShft (LCCR3_API)) |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2811 | #define LCCR3_VSP 0x00100000 /* Vertical Synchronization pulse */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2812 | /* Polarity (L_FCLK) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2813 | #define LCCR3_VrtSnchH (LCCR3_VSP*0) /* Vertical Synchronization pulse */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2814 | /* active High */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2815 | #define LCCR3_VrtSnchL (LCCR3_VSP*1) /* Vertical Synchronization pulse */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2816 | /* active Low */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2817 | #define LCCR3_HSP 0x00200000 /* Horizontal Synchronization */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2818 | /* pulse Polarity (L_LCLK) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2819 | #define LCCR3_HorSnchH (LCCR3_HSP*0) /* Horizontal Synchronization */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2820 | /* pulse active High */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2821 | #define LCCR3_HorSnchL (LCCR3_HSP*1) /* Horizontal Synchronization */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2822 | /* pulse active Low */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2823 | #define LCCR3_PCP 0x00400000 /* Pixel Clock Polarity (L_PCLK) */ |
| 2824 | #define LCCR3_PixRsEdg (LCCR3_PCP*0) /* Pixel clock Rising-Edge */ |
| 2825 | #define LCCR3_PixFlEdg (LCCR3_PCP*1) /* Pixel clock Falling-Edge */ |
| 2826 | #define LCCR3_OEP 0x00800000 /* Output Enable Polarity (L_BIAS, */ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 2827 | /* active display mode) */ |
wdenk | 3b58acd | 2002-03-27 13:48:44 +0000 | [diff] [blame] | 2828 | #define LCCR3_OutEnH (LCCR3_OEP*0) /* Output Enable active High */ |
| 2829 | #define LCCR3_OutEnL (LCCR3_OEP*1) /* Output Enable active Low */ |
| 2830 | |
| 2831 | |
| 2832 | #undef C |
| 2833 | #undef Assembly |