diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-11 14:13:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-11 14:13:46 -0500 |
commit | 0969d11e201b82d30a158ccdb3aca67a7b845613 (patch) | |
tree | 25273891ff5ac341d5c65ee0f82fc0a55aa8cfb6 /arch/microblaze/include | |
parent | 16ee8db6a93ffbc021132599f33288613f042c3d (diff) | |
parent | d15be32c30e6108cdab76ca895a19b5f8b88b5ca (diff) |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: remove obsolete DEBUG_BOOTMEM
microblaze: trivial: Fix removed the part of line
microblaze: Fix __muldi3 function for little-endian.
microblaze: Clear i/dcache for sw breakpoints
microblaze: Remove useless early_init_dt_check_for_initrd
microblaze: Fix unaligned exception for little endian platform
microblaze: Add PVR for Microblaze v8.00.b
microblaze: Correct PVR access macros
Revert "microblaze: Simplify syscall rutine"
microblaze: Fix initramfs
arch/microblaze: Remove unnecessary semicolons
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r-- | arch/microblaze/include/asm/pvr.h | 185 |
1 files changed, 96 insertions, 89 deletions
diff --git a/arch/microblaze/include/asm/pvr.h b/arch/microblaze/include/asm/pvr.h index 37db96a15b45..a10bec62e857 100644 --- a/arch/microblaze/include/asm/pvr.h +++ b/arch/microblaze/include/asm/pvr.h | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Support for the MicroBlaze PVR (Processor Version Register) | 2 | * Support for the MicroBlaze PVR (Processor Version Register) |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Michal Simek <monstr@monstr.eu> | 4 | * Copyright (C) 2009 - 2011 Michal Simek <monstr@monstr.eu> |
5 | * Copyright (C) 2007 John Williams <john.williams@petalogix.com> | 5 | * Copyright (C) 2007 John Williams <john.williams@petalogix.com> |
6 | * Copyright (C) 2007 - 2009 PetaLogix | 6 | * Copyright (C) 2007 - 2011 PetaLogix |
7 | * | 7 | * |
8 | * This file is subject to the terms and conditions of the GNU General | 8 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file COPYING in the main directory of this | 9 | * Public License. See the file COPYING in the main directory of this |
@@ -46,11 +46,11 @@ struct pvr_s { | |||
46 | #define PVR2_I_LMB_MASK 0x10000000 | 46 | #define PVR2_I_LMB_MASK 0x10000000 |
47 | #define PVR2_INTERRUPT_IS_EDGE_MASK 0x08000000 | 47 | #define PVR2_INTERRUPT_IS_EDGE_MASK 0x08000000 |
48 | #define PVR2_EDGE_IS_POSITIVE_MASK 0x04000000 | 48 | #define PVR2_EDGE_IS_POSITIVE_MASK 0x04000000 |
49 | #define PVR2_D_PLB_MASK 0x02000000 /* new */ | 49 | #define PVR2_D_PLB_MASK 0x02000000 /* new */ |
50 | #define PVR2_I_PLB_MASK 0x01000000 /* new */ | 50 | #define PVR2_I_PLB_MASK 0x01000000 /* new */ |
51 | #define PVR2_INTERCONNECT 0x00800000 /* new */ | 51 | #define PVR2_INTERCONNECT 0x00800000 /* new */ |
52 | #define PVR2_USE_EXTEND_FSL 0x00080000 /* new */ | 52 | #define PVR2_USE_EXTEND_FSL 0x00080000 /* new */ |
53 | #define PVR2_USE_FSL_EXC 0x00040000 /* new */ | 53 | #define PVR2_USE_FSL_EXC 0x00040000 /* new */ |
54 | #define PVR2_USE_MSR_INSTR 0x00020000 | 54 | #define PVR2_USE_MSR_INSTR 0x00020000 |
55 | #define PVR2_USE_PCMP_INSTR 0x00010000 | 55 | #define PVR2_USE_PCMP_INSTR 0x00010000 |
56 | #define PVR2_AREA_OPTIMISED 0x00008000 | 56 | #define PVR2_AREA_OPTIMISED 0x00008000 |
@@ -59,7 +59,7 @@ struct pvr_s { | |||
59 | #define PVR2_USE_HW_MUL_MASK 0x00001000 | 59 | #define PVR2_USE_HW_MUL_MASK 0x00001000 |
60 | #define PVR2_USE_FPU_MASK 0x00000800 | 60 | #define PVR2_USE_FPU_MASK 0x00000800 |
61 | #define PVR2_USE_MUL64_MASK 0x00000400 | 61 | #define PVR2_USE_MUL64_MASK 0x00000400 |
62 | #define PVR2_USE_FPU2_MASK 0x00000200 /* new */ | 62 | #define PVR2_USE_FPU2_MASK 0x00000200 /* new */ |
63 | #define PVR2_USE_IPLBEXC 0x00000100 | 63 | #define PVR2_USE_IPLBEXC 0x00000100 |
64 | #define PVR2_USE_DPLBEXC 0x00000080 | 64 | #define PVR2_USE_DPLBEXC 0x00000080 |
65 | #define PVR2_OPCODE_0x0_ILL_MASK 0x00000040 | 65 | #define PVR2_OPCODE_0x0_ILL_MASK 0x00000040 |
@@ -122,96 +122,103 @@ struct pvr_s { | |||
122 | 122 | ||
123 | 123 | ||
124 | /* PVR access macros */ | 124 | /* PVR access macros */ |
125 | #define PVR_IS_FULL(pvr) (pvr.pvr[0] & PVR0_PVR_FULL_MASK) | 125 | #define PVR_IS_FULL(_pvr) (_pvr.pvr[0] & PVR0_PVR_FULL_MASK) |
126 | #define PVR_USE_BARREL(pvr) (pvr.pvr[0] & PVR0_USE_BARREL_MASK) | 126 | #define PVR_USE_BARREL(_pvr) (_pvr.pvr[0] & PVR0_USE_BARREL_MASK) |
127 | #define PVR_USE_DIV(pvr) (pvr.pvr[0] & PVR0_USE_DIV_MASK) | 127 | #define PVR_USE_DIV(_pvr) (_pvr.pvr[0] & PVR0_USE_DIV_MASK) |
128 | #define PVR_USE_HW_MUL(pvr) (pvr.pvr[0] & PVR0_USE_HW_MUL_MASK) | 128 | #define PVR_USE_HW_MUL(_pvr) (_pvr.pvr[0] & PVR0_USE_HW_MUL_MASK) |
129 | #define PVR_USE_FPU(pvr) (pvr.pvr[0] & PVR0_USE_FPU_MASK) | 129 | #define PVR_USE_FPU(_pvr) (_pvr.pvr[0] & PVR0_USE_FPU_MASK) |
130 | #define PVR_USE_FPU2(pvr) (pvr.pvr[2] & PVR2_USE_FPU2_MASK) | 130 | #define PVR_USE_FPU2(_pvr) (_pvr.pvr[2] & PVR2_USE_FPU2_MASK) |
131 | #define PVR_USE_ICACHE(pvr) (pvr.pvr[0] & PVR0_USE_ICACHE_MASK) | 131 | #define PVR_USE_ICACHE(_pvr) (_pvr.pvr[0] & PVR0_USE_ICACHE_MASK) |
132 | #define PVR_USE_DCACHE(pvr) (pvr.pvr[0] & PVR0_USE_DCACHE_MASK) | 132 | #define PVR_USE_DCACHE(_pvr) (_pvr.pvr[0] & PVR0_USE_DCACHE_MASK) |
133 | #define PVR_VERSION(pvr) ((pvr.pvr[0] & PVR0_VERSION_MASK) >> 8) | 133 | #define PVR_VERSION(_pvr) ((_pvr.pvr[0] & PVR0_VERSION_MASK) >> 8) |
134 | #define PVR_USER1(pvr) (pvr.pvr[0] & PVR0_USER1_MASK) | 134 | #define PVR_USER1(_pvr) (_pvr.pvr[0] & PVR0_USER1_MASK) |
135 | #define PVR_USER2(pvr) (pvr.pvr[1] & PVR1_USER2_MASK) | 135 | #define PVR_USER2(_pvr) (_pvr.pvr[1] & PVR1_USER2_MASK) |
136 | 136 | ||
137 | #define PVR_D_OPB(pvr) (pvr.pvr[2] & PVR2_D_OPB_MASK) | 137 | #define PVR_D_OPB(_pvr) (_pvr.pvr[2] & PVR2_D_OPB_MASK) |
138 | #define PVR_D_LMB(pvr) (pvr.pvr[2] & PVR2_D_LMB_MASK) | 138 | #define PVR_D_LMB(_pvr) (_pvr.pvr[2] & PVR2_D_LMB_MASK) |
139 | #define PVR_I_OPB(pvr) (pvr.pvr[2] & PVR2_I_OPB_MASK) | 139 | #define PVR_I_OPB(_pvr) (_pvr.pvr[2] & PVR2_I_OPB_MASK) |
140 | #define PVR_I_LMB(pvr) (pvr.pvr[2] & PVR2_I_LMB_MASK) | 140 | #define PVR_I_LMB(_pvr) (_pvr.pvr[2] & PVR2_I_LMB_MASK) |
141 | #define PVR_INTERRUPT_IS_EDGE(pvr) \ | 141 | #define PVR_INTERRUPT_IS_EDGE(_pvr) \ |
142 | (pvr.pvr[2] & PVR2_INTERRUPT_IS_EDGE_MASK) | 142 | (_pvr.pvr[2] & PVR2_INTERRUPT_IS_EDGE_MASK) |
143 | #define PVR_EDGE_IS_POSITIVE(pvr) \ | 143 | #define PVR_EDGE_IS_POSITIVE(_pvr) \ |
144 | (pvr.pvr[2] & PVR2_EDGE_IS_POSITIVE_MASK) | 144 | (_pvr.pvr[2] & PVR2_EDGE_IS_POSITIVE_MASK) |
145 | #define PVR_USE_MSR_INSTR(pvr) (pvr.pvr[2] & PVR2_USE_MSR_INSTR) | 145 | #define PVR_USE_MSR_INSTR(_pvr) (_pvr.pvr[2] & PVR2_USE_MSR_INSTR) |
146 | #define PVR_USE_PCMP_INSTR(pvr) (pvr.pvr[2] & PVR2_USE_PCMP_INSTR) | 146 | #define PVR_USE_PCMP_INSTR(_pvr) (_pvr.pvr[2] & PVR2_USE_PCMP_INSTR) |
147 | #define PVR_AREA_OPTIMISED(pvr) (pvr.pvr[2] & PVR2_AREA_OPTIMISED) | 147 | #define PVR_AREA_OPTIMISED(_pvr) (_pvr.pvr[2] & PVR2_AREA_OPTIMISED) |
148 | #define PVR_USE_MUL64(pvr) (pvr.pvr[2] & PVR2_USE_MUL64_MASK) | 148 | #define PVR_USE_MUL64(_pvr) (_pvr.pvr[2] & PVR2_USE_MUL64_MASK) |
149 | #define PVR_OPCODE_0x0_ILLEGAL(pvr) \ | 149 | #define PVR_OPCODE_0x0_ILLEGAL(_pvr) \ |
150 | (pvr.pvr[2] & PVR2_OPCODE_0x0_ILL_MASK) | 150 | (_pvr.pvr[2] & PVR2_OPCODE_0x0_ILL_MASK) |
151 | #define PVR_UNALIGNED_EXCEPTION(pvr) \ | 151 | #define PVR_UNALIGNED_EXCEPTION(_pvr) \ |
152 | (pvr.pvr[2] & PVR2_UNALIGNED_EXC_MASK) | 152 | (_pvr.pvr[2] & PVR2_UNALIGNED_EXC_MASK) |
153 | #define PVR_ILL_OPCODE_EXCEPTION(pvr) \ | 153 | #define PVR_ILL_OPCODE_EXCEPTION(_pvr) \ |
154 | (pvr.pvr[2] & PVR2_ILL_OPCODE_EXC_MASK) | 154 | (_pvr.pvr[2] & PVR2_ILL_OPCODE_EXC_MASK) |
155 | #define PVR_IOPB_BUS_EXCEPTION(pvr) \ | 155 | #define PVR_IOPB_BUS_EXCEPTION(_pvr) \ |
156 | (pvr.pvr[2] & PVR2_IOPB_BUS_EXC_MASK) | 156 | (_pvr.pvr[2] & PVR2_IOPB_BUS_EXC_MASK) |
157 | #define PVR_DOPB_BUS_EXCEPTION(pvr) \ | 157 | #define PVR_DOPB_BUS_EXCEPTION(_pvr) \ |
158 | (pvr.pvr[2] & PVR2_DOPB_BUS_EXC_MASK) | 158 | (_pvr.pvr[2] & PVR2_DOPB_BUS_EXC_MASK) |
159 | #define PVR_DIV_ZERO_EXCEPTION(pvr) \ | 159 | #define PVR_DIV_ZERO_EXCEPTION(_pvr) \ |
160 | (pvr.pvr[2] & PVR2_DIV_ZERO_EXC_MASK) | 160 | (_pvr.pvr[2] & PVR2_DIV_ZERO_EXC_MASK) |
161 | #define PVR_FPU_EXCEPTION(pvr) (pvr.pvr[2] & PVR2_FPU_EXC_MASK) | 161 | #define PVR_FPU_EXCEPTION(_pvr) (_pvr.pvr[2] & PVR2_FPU_EXC_MASK) |
162 | #define PVR_FSL_EXCEPTION(pvr) (pvr.pvr[2] & PVR2_USE_EXTEND_FSL) | 162 | #define PVR_FSL_EXCEPTION(_pvr) (_pvr.pvr[2] & PVR2_USE_EXTEND_FSL) |
163 | 163 | ||
164 | #define PVR_DEBUG_ENABLED(pvr) (pvr.pvr[3] & PVR3_DEBUG_ENABLED_MASK) | 164 | #define PVR_DEBUG_ENABLED(_pvr) (_pvr.pvr[3] & PVR3_DEBUG_ENABLED_MASK) |
165 | #define PVR_NUMBER_OF_PC_BRK(pvr) \ | 165 | #define PVR_NUMBER_OF_PC_BRK(_pvr) \ |
166 | ((pvr.pvr[3] & PVR3_NUMBER_OF_PC_BRK_MASK) >> 25) | 166 | ((_pvr.pvr[3] & PVR3_NUMBER_OF_PC_BRK_MASK) >> 25) |
167 | #define PVR_NUMBER_OF_RD_ADDR_BRK(pvr) \ | 167 | #define PVR_NUMBER_OF_RD_ADDR_BRK(_pvr) \ |
168 | ((pvr.pvr[3] & PVR3_NUMBER_OF_RD_ADDR_BRK_MASK) >> 19) | 168 | ((_pvr.pvr[3] & PVR3_NUMBER_OF_RD_ADDR_BRK_MASK) >> 19) |
169 | #define PVR_NUMBER_OF_WR_ADDR_BRK(pvr) \ | 169 | #define PVR_NUMBER_OF_WR_ADDR_BRK(_pvr) \ |
170 | ((pvr.pvr[3] & PVR3_NUMBER_OF_WR_ADDR_BRK_MASK) >> 13) | 170 | ((_pvr.pvr[3] & PVR3_NUMBER_OF_WR_ADDR_BRK_MASK) >> 13) |
171 | #define PVR_FSL_LINKS(pvr) ((pvr.pvr[3] & PVR3_FSL_LINKS_MASK) >> 7) | 171 | #define PVR_FSL_LINKS(_pvr) ((_pvr.pvr[3] & PVR3_FSL_LINKS_MASK) >> 7) |
172 | 172 | ||
173 | #define PVR_ICACHE_ADDR_TAG_BITS(pvr) \ | 173 | #define PVR_ICACHE_ADDR_TAG_BITS(_pvr) \ |
174 | ((pvr.pvr[4] & PVR4_ICACHE_ADDR_TAG_BITS_MASK) >> 26) | 174 | ((_pvr.pvr[4] & PVR4_ICACHE_ADDR_TAG_BITS_MASK) >> 26) |
175 | #define PVR_ICACHE_USE_FSL(pvr) (pvr.pvr[4] & PVR4_ICACHE_USE_FSL_MASK) | 175 | #define PVR_ICACHE_USE_FSL(_pvr) \ |
176 | #define PVR_ICACHE_ALLOW_WR(pvr) (pvr.pvr[4] & PVR4_ICACHE_ALLOW_WR_MASK) | 176 | (_pvr.pvr[4] & PVR4_ICACHE_USE_FSL_MASK) |
177 | #define PVR_ICACHE_LINE_LEN(pvr) \ | 177 | #define PVR_ICACHE_ALLOW_WR(_pvr) \ |
178 | (1 << ((pvr.pvr[4] & PVR4_ICACHE_LINE_LEN_MASK) >> 21)) | 178 | (_pvr.pvr[4] & PVR4_ICACHE_ALLOW_WR_MASK) |
179 | #define PVR_ICACHE_BYTE_SIZE(pvr) \ | 179 | #define PVR_ICACHE_LINE_LEN(_pvr) \ |
180 | (1 << ((pvr.pvr[4] & PVR4_ICACHE_BYTE_SIZE_MASK) >> 16)) | 180 | (1 << ((_pvr.pvr[4] & PVR4_ICACHE_LINE_LEN_MASK) >> 21)) |
181 | 181 | #define PVR_ICACHE_BYTE_SIZE(_pvr) \ | |
182 | #define PVR_DCACHE_ADDR_TAG_BITS(pvr) \ | 182 | (1 << ((_pvr.pvr[4] & PVR4_ICACHE_BYTE_SIZE_MASK) >> 16)) |
183 | ((pvr.pvr[5] & PVR5_DCACHE_ADDR_TAG_BITS_MASK) >> 26) | 183 | |
184 | #define PVR_DCACHE_USE_FSL(pvr) (pvr.pvr[5] & PVR5_DCACHE_USE_FSL_MASK) | 184 | #define PVR_DCACHE_ADDR_TAG_BITS(_pvr) \ |
185 | #define PVR_DCACHE_ALLOW_WR(pvr) (pvr.pvr[5] & PVR5_DCACHE_ALLOW_WR_MASK) | 185 | ((_pvr.pvr[5] & PVR5_DCACHE_ADDR_TAG_BITS_MASK) >> 26) |
186 | #define PVR_DCACHE_USE_FSL(_pvr) (_pvr.pvr[5] & PVR5_DCACHE_USE_FSL_MASK) | ||
187 | #define PVR_DCACHE_ALLOW_WR(_pvr) \ | ||
188 | (_pvr.pvr[5] & PVR5_DCACHE_ALLOW_WR_MASK) | ||
186 | /* FIXME two shifts on one line needs any comment */ | 189 | /* FIXME two shifts on one line needs any comment */ |
187 | #define PVR_DCACHE_LINE_LEN(pvr) \ | 190 | #define PVR_DCACHE_LINE_LEN(_pvr) \ |
188 | (1 << ((pvr.pvr[5] & PVR5_DCACHE_LINE_LEN_MASK) >> 21)) | 191 | (1 << ((_pvr.pvr[5] & PVR5_DCACHE_LINE_LEN_MASK) >> 21)) |
189 | #define PVR_DCACHE_BYTE_SIZE(pvr) \ | 192 | #define PVR_DCACHE_BYTE_SIZE(_pvr) \ |
190 | (1 << ((pvr.pvr[5] & PVR5_DCACHE_BYTE_SIZE_MASK) >> 16)) | 193 | (1 << ((_pvr.pvr[5] & PVR5_DCACHE_BYTE_SIZE_MASK) >> 16)) |
191 | 194 | ||
192 | #define PVR_DCACHE_USE_WRITEBACK(pvr) \ | 195 | #define PVR_DCACHE_USE_WRITEBACK(_pvr) \ |
193 | ((pvr.pvr[5] & PVR5_DCACHE_USE_WRITEBACK) >> 14) | 196 | ((_pvr.pvr[5] & PVR5_DCACHE_USE_WRITEBACK) >> 14) |
194 | 197 | ||
195 | #define PVR_ICACHE_BASEADDR(pvr) (pvr.pvr[6] & PVR6_ICACHE_BASEADDR_MASK) | 198 | #define PVR_ICACHE_BASEADDR(_pvr) \ |
196 | #define PVR_ICACHE_HIGHADDR(pvr) (pvr.pvr[7] & PVR7_ICACHE_HIGHADDR_MASK) | 199 | (_pvr.pvr[6] & PVR6_ICACHE_BASEADDR_MASK) |
200 | #define PVR_ICACHE_HIGHADDR(_pvr) \ | ||
201 | (_pvr.pvr[7] & PVR7_ICACHE_HIGHADDR_MASK) | ||
202 | #define PVR_DCACHE_BASEADDR(_pvr) \ | ||
203 | (_pvr.pvr[8] & PVR8_DCACHE_BASEADDR_MASK) | ||
204 | #define PVR_DCACHE_HIGHADDR(_pvr) \ | ||
205 | (_pvr.pvr[9] & PVR9_DCACHE_HIGHADDR_MASK) | ||
197 | 206 | ||
198 | #define PVR_DCACHE_BASEADDR(pvr) (pvr.pvr[8] & PVR8_DCACHE_BASEADDR_MASK) | 207 | #define PVR_TARGET_FAMILY(_pvr) \ |
199 | #define PVR_DCACHE_HIGHADDR(pvr) (pvr.pvr[9] & PVR9_DCACHE_HIGHADDR_MASK) | 208 | ((_pvr.pvr[10] & PVR10_TARGET_FAMILY_MASK) >> 24) |
200 | 209 | ||
201 | #define PVR_TARGET_FAMILY(pvr) ((pvr.pvr[10] & PVR10_TARGET_FAMILY_MASK) >> 24) | 210 | #define PVR_MSR_RESET_VALUE(_pvr) \ |
202 | 211 | (_pvr.pvr[11] & PVR11_MSR_RESET_VALUE_MASK) | |
203 | #define PVR_MSR_RESET_VALUE(pvr) \ | ||
204 | (pvr.pvr[11] & PVR11_MSR_RESET_VALUE_MASK) | ||
205 | 212 | ||
206 | /* mmu */ | 213 | /* mmu */ |
207 | #define PVR_USE_MMU(pvr) ((pvr.pvr[11] & PVR11_USE_MMU) >> 30) | 214 | #define PVR_USE_MMU(_pvr) ((_pvr.pvr[11] & PVR11_USE_MMU) >> 30) |
208 | #define PVR_MMU_ITLB_SIZE(pvr) (pvr.pvr[11] & PVR11_MMU_ITLB_SIZE) | 215 | #define PVR_MMU_ITLB_SIZE(_pvr) (_pvr.pvr[11] & PVR11_MMU_ITLB_SIZE) |
209 | #define PVR_MMU_DTLB_SIZE(pvr) (pvr.pvr[11] & PVR11_MMU_DTLB_SIZE) | 216 | #define PVR_MMU_DTLB_SIZE(_pvr) (_pvr.pvr[11] & PVR11_MMU_DTLB_SIZE) |
210 | #define PVR_MMU_TLB_ACCESS(pvr) (pvr.pvr[11] & PVR11_MMU_TLB_ACCESS) | 217 | #define PVR_MMU_TLB_ACCESS(_pvr) (_pvr.pvr[11] & PVR11_MMU_TLB_ACCESS) |
211 | #define PVR_MMU_ZONES(pvr) (pvr.pvr[11] & PVR11_MMU_ZONES) | 218 | #define PVR_MMU_ZONES(_pvr) (_pvr.pvr[11] & PVR11_MMU_ZONES) |
212 | 219 | ||
213 | /* endian */ | 220 | /* endian */ |
214 | #define PVR_ENDIAN(pvr) (pvr.pvr[0] & PVR0_ENDI) | 221 | #define PVR_ENDIAN(_pvr) (_pvr.pvr[0] & PVR0_ENDI) |
215 | 222 | ||
216 | int cpu_has_pvr(void); | 223 | int cpu_has_pvr(void); |
217 | void get_pvr(struct pvr_s *pvr); | 224 | void get_pvr(struct pvr_s *pvr); |