2 * include/asm-arm/arch-ns9xxx/regs-mem.h
4 * Copyright (C) 2006 by Digi International Inc.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
11 #ifndef __ASM_ARCH_REGSMEM_H
12 #define __ASM_ARCH_REGSMEM_H
14 #include <asm/hardware.h>
18 /* Control register */
19 #define MEM_CTRL __REG(0xa0700000)
22 #define MEM_STAT __REG(0xa0700004)
24 /* Configuration register */
25 #define MEM_CONF __REG(0xa0700008)
27 /* Dynamic Memory Control register */
28 #define MEM_DMCTRL __REG(0xa0700020)
30 /* Dynamic Memory Refresh Timer */
31 #define MEM_DMRT __REG(0xa0700024)
33 /* Dynamic Memory Read Configuration register */
34 #define MEM_DMRC __REG(0xa0700028)
36 /* Dynamic Memory Precharge Command Period (tRP) */
37 #define MEM_DMPCP __REG(0xa0700030)
39 /* Dynamic Memory Active to Precharge Command Period (tRAS) */
40 #define MEM_DMAPCP __REG(0xa0700034)
42 /* Dynamic Memory Self-Refresh Exit Time (tSREX) */
43 #define MEM_DMSRET __REG(0xa0700038)
45 /* Dynamic Memory Last Data Out to Active Time (tAPR) */
46 #define MEM_DMLDOAT __REG(0xa070003c)
48 /* Dynamic Memory Data-in to Active Command Time (tDAL or TAPW) */
49 #define MEM_DMDIACT __REG(0xa0700040)
51 /* Dynamic Memory Write Recovery Time (tWR, tDPL, tRWL, tRDL) */
52 #define MEM_DMWRT __REG(0xa0700044)
54 /* Dynamic Memory Active to Active Command Period (tRC) */
55 #define MEM_DMAACP __REG(0xa0700048)
57 /* Dynamic Memory Auto Refresh Period, and Auto Refresh to Active Command Period (tRFC) */
58 #define MEM_DMARP __REG(0xa070004c)
60 /* Dynamic Memory Exit Self-Refresh to Active Command (tXSR) */
61 #define MEM_DMESRAC __REG(0xa0700050)
63 /* Dynamic Memory Active Bank A to Active B Time (tRRD) */
64 #define MEM_DMABAABT __REG(0xa0700054)
66 /* Dynamic Memory Load Mode register to Active Command Time (tMRD) */
67 #define MEM_DMLMACT __REG(0xa0700058)
69 /* Static Memory Extended Wait */
70 #define MEM_SMEW __REG(0xa0700080)
72 /* Dynamic Memory Configuration Register x */
73 #define MEM_DMCONF(x) __REG2(0xa0700100, (x) << 3)
75 /* Dynamic Memory RAS and CAS Delay x */
76 #define MEM_DMRCD(x) __REG2(0xa0700104, (x) << 3)
78 /* Static Memory Configuration Register x */
79 #define MEM_SMC(x) __REG2(0xa0700200, (x) << 3)
81 /* Static Memory Configuration Register x: Write protect */
82 #define MEM_SMC_WSMC __REGBIT(20)
83 #define MEM_SMC_WSMC_OFF __REGVAL(MEM_SMC_WSMC, 0)
84 #define MEM_SMC_WSMC_ON __REGVAL(MEM_SMC_WSMC, 1)
86 /* Static Memory Configuration Register x: Buffer enable */
87 #define MEM_SMC_BSMC __REGBIT(19)
88 #define MEM_SMC_BSMC_OFF __REGVAL(MEM_SMC_BSMC, 0)
89 #define MEM_SMC_BSMC_ON __REGVAL(MEM_SMC_BSMC, 1)
91 /* Static Memory Configuration Register x: Extended Wait */
92 #define MEM_SMC_EW __REGBIT(8)
93 #define MEM_SMC_EW_OFF __REGVAL(MEM_SMC_EW, 0)
94 #define MEM_SMC_EW_ON __REGVAL(MEM_SMC_EW, 1)
96 /* Static Memory Configuration Register x: Byte lane state */
97 #define MEM_SMC_PB __REGBIT(7)
98 #define MEM_SMC_PB_0 __REGVAL(MEM_SMC_PB, 0)
99 #define MEM_SMC_PB_1 __REGVAL(MEM_SMC_PB, 1)
101 /* Static Memory Configuration Register x: Chip select polarity */
102 #define MEM_SMC_PC __REGBIT(6)
103 #define MEM_SMC_PC_AL __REGVAL(MEM_SMC_PC, 0)
104 #define MEM_SMC_PC_AH __REGVAL(MEM_SMC_PC, 1)
106 /* static memory configuration register x: page mode*/
107 #define MEM_SMC_PM __REGBIT(3)
108 #define MEM_SMC_PM_DIS __REGVAL(MEM_SMC_PM, 0)
109 #define MEM_SMC_PM_ASYNC __REGVAL(MEM_SMC_PM, 1)
111 /* static memory configuration register x: Memory width */
112 #define MEM_SMC_MW __REGBITS(1, 0)
113 #define MEM_SMC_MW_8 __REGVAL(MEM_SMC_MW, 0)
114 #define MEM_SMC_MW_16 __REGVAL(MEM_SMC_MW, 1)
115 #define MEM_SMC_MW_32 __REGVAL(MEM_SMC_MW, 2)
117 /* Static Memory Write Enable Delay x */
118 #define MEM_SMWED(x) __REG2(0xa0700204, (x) << 3)
120 /* Static Memory Output Enable Delay x */
121 #define MEM_SMOED(x) __REG2(0xa0700208, (x) << 3)
123 /* Static Memory Read Delay x */
124 #define MEM_SMRD(x) __REG2(0xa070020c, (x) << 3)
126 /* Static Memory Page Mode Read Delay 0 */
127 #define MEM_SMPMRD(x) __REG2(0xa0700210, (x) << 3)
129 /* Static Memory Write Delay */
130 #define MEM_SMWD(x) __REG2(0xa0700214, (x) << 3)
132 /* Static Memory Turn Round Delay x */
133 #define MEM_SWT(x) __REG2(0xa0700218, (x) << 3)
135 #endif /* ifndef __ASM_ARCH_REGSMEM_H */