diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 23:41:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 23:41:53 -0400 |
commit | d6dd9e93c7531fa31370e27d053a3940d8d662fb (patch) | |
tree | afab573031b3f0b9bbe5e417a890f7cae09a7224 /include/asm-mips | |
parent | dd9cd6d4351076c78bb8c0f9146d1904b481fdbb (diff) | |
parent | b4b2917cc8babe8eaf4bc133bca31b11ed7dac13 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (50 commits)
[MIPS] Add smp_call_function_single()
[MIPS] thread_info.h: kmalloc + memset conversion to kzalloc
[MIPS] Kexec: Fix several 64-bit bugs.
[MIPS] Kexec: Fix several warnings.
[MIPS] DDB5477: Remove support
[MIPS] Fulong: Remove unneeded header file
[MIPS] Cobalt: Enable UART on RaQ1
[MIPS] Remove unused GROUP_TOSHIBA_NAMES
[MIPS] remove some duplicate includes
[MIPS] Oprofile: Fix rm9000 performance counter handler
[MIPS] Use -Werror on subdirectories which build cleanly.
[MIPS] Yosemite: Fix warning.
[MIPS] PMON: Fix cpustart declaration.
[MIPS] Yosemite: Only build ll_ht_smp_irq_handler() if HYPERTRANSPORT.
[MIPS] Yosemite: Fix build error due to undeclared titan_mailbox_irq().
[MIPS] Yosemite: Don't declare titan_mailbox_irq() as asmlinkage.
[MIPS] Yosemite: Fix warnings in i2c-yoesmite by deleting the unused code.
[MIPS] Delete unused arch/mips/gt64120/common/
[MIPS] Fix build warning in unaligned load/store emulator.
[MIPS] IP32: Don't ignore request_irq's return value.
...
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/a.out.h | 3 | ||||
-rw-r--r-- | include/asm-mips/bootinfo.h | 13 | ||||
-rw-r--r-- | include/asm-mips/ddb5xxx/ddb5477.h | 342 | ||||
-rw-r--r-- | include/asm-mips/ddb5xxx/ddb5xxx.h | 263 | ||||
-rw-r--r-- | include/asm-mips/elf.h | 13 | ||||
-rw-r--r-- | include/asm-mips/hazards.h | 7 | ||||
-rw-r--r-- | include/asm-mips/mach-tx49xx/cpu-feature-overrides.h | 23 | ||||
-rw-r--r-- | include/asm-mips/mach-tx49xx/kmalloc.h | 8 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/generic.h | 1 | ||||
-rw-r--r-- | include/asm-mips/mips_mt.h | 6 | ||||
-rw-r--r-- | include/asm-mips/pmon.h | 2 | ||||
-rw-r--r-- | include/asm-mips/processor.h | 20 | ||||
-rw-r--r-- | include/asm-mips/seccomp.h | 37 | ||||
-rw-r--r-- | include/asm-mips/system.h | 8 | ||||
-rw-r--r-- | include/asm-mips/thread_info.h | 17 | ||||
-rw-r--r-- | include/asm-mips/tx4927/toshiba_rbtx4927.h | 2 | ||||
-rw-r--r-- | include/asm-mips/unistd.h | 15 | ||||
-rw-r--r-- | include/asm-mips/war.h | 5 |
18 files changed, 125 insertions, 660 deletions
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h index 1ad60ba186d0..bf55a5b34bef 100644 --- a/include/asm-mips/a.out.h +++ b/include/asm-mips/a.out.h | |||
@@ -38,7 +38,8 @@ struct exec | |||
38 | #define STACK_TOP TASK_SIZE | 38 | #define STACK_TOP TASK_SIZE |
39 | #endif | 39 | #endif |
40 | #ifdef CONFIG_64BIT | 40 | #ifdef CONFIG_64BIT |
41 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) | 41 | #define STACK_TOP \ |
42 | (test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE) | ||
42 | #endif | 43 | #endif |
43 | #define STACK_TOP_MAX TASK_SIZE | 44 | #define STACK_TOP_MAX TASK_SIZE |
44 | 45 | ||
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index 087126a5faf9..c0f052b37b9e 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h | |||
@@ -86,16 +86,6 @@ | |||
86 | #define MACH_COBALT_27 0 /* Proto "27" hardware */ | 86 | #define MACH_COBALT_27 0 /* Proto "27" hardware */ |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * Valid machtype for group NEC DDB | ||
90 | */ | ||
91 | #define MACH_GROUP_NEC_DDB 8 /* NEC DDB */ | ||
92 | #define MACH_NEC_DDB5074 0 /* NEC DDB Vrc-5074 */ | ||
93 | #define MACH_NEC_DDB5476 1 /* NEC DDB Vrc-5476 */ | ||
94 | #define MACH_NEC_DDB5477 2 /* NEC DDB Vrc-5477 */ | ||
95 | #define MACH_NEC_ROCKHOPPER 3 /* Rockhopper base board */ | ||
96 | #define MACH_NEC_ROCKHOPPERII 4 /* Rockhopper II base board */ | ||
97 | |||
98 | /* | ||
99 | * Valid machtype for group BAGET | 89 | * Valid machtype for group BAGET |
100 | */ | 90 | */ |
101 | #define MACH_GROUP_BAGET 9 /* Baget */ | 91 | #define MACH_GROUP_BAGET 9 /* Baget */ |
@@ -145,9 +135,6 @@ | |||
145 | #define MACH_TOSHIBA_RBTX4937 5 | 135 | #define MACH_TOSHIBA_RBTX4937 5 |
146 | #define MACH_TOSHIBA_RBTX4938 6 | 136 | #define MACH_TOSHIBA_RBTX4938 6 |
147 | 137 | ||
148 | #define GROUP_TOSHIBA_NAMES { "Pallas", "TopasCE", "JMR", "JMR TX3927", \ | ||
149 | "RBTX4927", "RBTX4937" } | ||
150 | |||
151 | /* | 138 | /* |
152 | * Valid machtype for group Alchemy | 139 | * Valid machtype for group Alchemy |
153 | */ | 140 | */ |
diff --git a/include/asm-mips/ddb5xxx/ddb5477.h b/include/asm-mips/ddb5xxx/ddb5477.h deleted file mode 100644 index 6cf177caf6d5..000000000000 --- a/include/asm-mips/ddb5xxx/ddb5477.h +++ /dev/null | |||
@@ -1,342 +0,0 @@ | |||
1 | /*********************************************************************** | ||
2 | * | ||
3 | * Copyright 2001 MontaVista Software Inc. | ||
4 | * Author: jsun@mvista.com or jsun@junsun.net | ||
5 | * | ||
6 | * include/asm-mips/ddb5xxx/ddb5477.h | ||
7 | * DDB 5477 specific definitions and macros. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | *********************************************************************** | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_DDB5XXX_DDB5477_H | ||
18 | #define __ASM_DDB5XXX_DDB5477_H | ||
19 | |||
20 | #include <irq.h> | ||
21 | |||
22 | /* | ||
23 | * This contains macros that are specific to DDB5477 or renamed from | ||
24 | * DDB5476. | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * renamed PADRs | ||
29 | */ | ||
30 | #define DDB_LCS0 DDB_DCS2 | ||
31 | #define DDB_LCS1 DDB_DCS3 | ||
32 | #define DDB_LCS2 DDB_DCS4 | ||
33 | #define DDB_VRC5477 DDB_INTCS | ||
34 | |||
35 | /* | ||
36 | * New CPU interface registers | ||
37 | */ | ||
38 | #define DDB_INTCTRL0 0x0400 /* Interrupt Control 0 */ | ||
39 | #define DDB_INTCTRL1 0x0404 /* Interrupt Control 1 */ | ||
40 | #define DDB_INTCTRL2 0x0408 /* Interrupt Control 2 */ | ||
41 | #define DDB_INTCTRL3 0x040c /* Interrupt Control 3 */ | ||
42 | |||
43 | #define DDB_INT0STAT 0x0420 /* INT0 Status [R] */ | ||
44 | #define DDB_INT1STAT 0x0428 /* INT1 Status [R] */ | ||
45 | #define DDB_INT2STAT 0x0430 /* INT2 Status [R] */ | ||
46 | #define DDB_INT3STAT 0x0438 /* INT3 Status [R] */ | ||
47 | #define DDB_INT4STAT 0x0440 /* INT4 Status [R] */ | ||
48 | #define DDB_NMISTAT 0x0450 /* NMI Status [R] */ | ||
49 | |||
50 | #define DDB_INTCLR32 0x0468 /* Interrupt Clear */ | ||
51 | |||
52 | #define DDB_INTPPES0 0x0470 /* PCI0 Interrupt Control */ | ||
53 | #define DDB_INTPPES1 0x0478 /* PCI1 Interrupt Control */ | ||
54 | |||
55 | #undef DDB_CPUSTAT /* duplicate in Vrc-5477 */ | ||
56 | #define DDB_CPUSTAT 0x0480 /* CPU Status [R] */ | ||
57 | #define DDB_BUSCTRL 0x0488 /* Internal Bus Control */ | ||
58 | |||
59 | |||
60 | /* | ||
61 | * Timer registers | ||
62 | */ | ||
63 | #define DDB_REFCTRL_L DDB_T0CTRL | ||
64 | #define DDB_REFCTRL_H (DDB_T0CTRL+4) | ||
65 | #define DDB_REFCNTR DDB_T0CNTR | ||
66 | #define DDB_SPT0CTRL_L DDB_T1CTRL | ||
67 | #define DDB_SPT0CTRL_H (DDB_T1CTRL+4) | ||
68 | #define DDB_SPT1CTRL_L DDB_T2CTRL | ||
69 | #define DDB_SPT1CTRL_H (DDB_T2CTRL+4) | ||
70 | #define DDB_SPT1CNTR DDB_T1CTRL | ||
71 | #define DDB_WDTCTRL_L DDB_T3CTRL | ||
72 | #define DDB_WDTCTRL_H (DDB_T3CTRL+4) | ||
73 | #define DDB_WDTCNTR DDB_T3CNTR | ||
74 | |||
75 | /* | ||
76 | * DMA registers are moved. We don't care about it for now. TODO. | ||
77 | */ | ||
78 | |||
79 | /* | ||
80 | * BARs for ext PCI (PCI0) | ||
81 | */ | ||
82 | #undef DDB_BARC | ||
83 | #undef DDB_BARB | ||
84 | |||
85 | #define DDB_BARC0 0x0210 /* PCI0 Control */ | ||
86 | #define DDB_BARM010 0x0218 /* PCI0 SDRAM bank01 */ | ||
87 | #define DDB_BARM230 0x0220 /* PCI0 SDRAM bank23 */ | ||
88 | #define DDB_BAR00 0x0240 /* PCI0 LDCS0 */ | ||
89 | #define DDB_BAR10 0x0248 /* PCI0 LDCS1 */ | ||
90 | #define DDB_BAR20 0x0250 /* PCI0 LDCS2 */ | ||
91 | #define DDB_BAR30 0x0258 /* PCI0 LDCS3 */ | ||
92 | #define DDB_BAR40 0x0260 /* PCI0 LDCS4 */ | ||
93 | #define DDB_BAR50 0x0268 /* PCI0 LDCS5 */ | ||
94 | #define DDB_BARB0 0x0280 /* PCI0 BOOT */ | ||
95 | #define DDB_BARP00 0x0290 /* PCI0 for IOPCI Window0 */ | ||
96 | #define DDB_BARP10 0x0298 /* PCI0 for IOPCI Window1 */ | ||
97 | |||
98 | /* | ||
99 | * BARs for IOPIC (PCI1) | ||
100 | */ | ||
101 | #define DDB_BARC1 0x0610 /* PCI1 Control */ | ||
102 | #define DDB_BARM011 0x0618 /* PCI1 SDRAM bank01 */ | ||
103 | #define DDB_BARM231 0x0620 /* PCI1 SDRAM bank23 */ | ||
104 | #define DDB_BAR01 0x0640 /* PCI1 LDCS0 */ | ||
105 | #define DDB_BAR11 0x0648 /* PCI1 LDCS1 */ | ||
106 | #define DDB_BAR21 0x0650 /* PCI1 LDCS2 */ | ||
107 | #define DDB_BAR31 0x0658 /* PCI1 LDCS3 */ | ||
108 | #define DDB_BAR41 0x0660 /* PCI1 LDCS4 */ | ||
109 | #define DDB_BAR51 0x0668 /* PCI1 LDCS5 */ | ||
110 | #define DDB_BARB1 0x0680 /* PCI1 BOOT */ | ||
111 | #define DDB_BARP01 0x0690 /* PCI1 for ext PCI Window0 */ | ||
112 | #define DDB_BARP11 0x0698 /* PCI1 for ext PCI Window1 */ | ||
113 | |||
114 | /* | ||
115 | * Other registers for ext PCI (PCI0) | ||
116 | */ | ||
117 | #define DDB_PCIINIT00 0x02f0 /* PCI0 Initiator 0 */ | ||
118 | #define DDB_PCIINIT10 0x02f8 /* PCI0 Initiator 1 */ | ||
119 | |||
120 | #define DDB_PCISWP0 0x02b0 /* PCI0 Swap */ | ||
121 | #define DDB_PCIERR0 0x02b8 /* PCI0 Error */ | ||
122 | |||
123 | #define DDB_PCICTL0_L 0x02e0 /* PCI0 Control-L */ | ||
124 | #define DDB_PCICTL0_H 0x02e4 /* PCI0 Control-H */ | ||
125 | #define DDB_PCIARB0_L 0x02e8 /* PCI0 Arbitration-L */ | ||
126 | #define DDB_PCIARB0_H 0x02ec /* PCI0 Arbitration-H */ | ||
127 | |||
128 | /* | ||
129 | * Other registers for IOPCI (PCI1) | ||
130 | */ | ||
131 | #define DDB_IOPCIW0 0x00d0 /* PCI Address Window 0 [R/W] */ | ||
132 | #define DDB_IOPCIW1 0x00d8 /* PCI Address Window 1 [R/W] */ | ||
133 | |||
134 | #define DDB_PCIINIT01 0x06f0 /* PCI1 Initiator 0 */ | ||
135 | #define DDB_PCIINIT11 0x06f8 /* PCI1 Initiator 1 */ | ||
136 | |||
137 | #define DDB_PCISWP1 0x06b0 /* PCI1 Swap */ | ||
138 | #define DDB_PCIERR1 0x06b8 /* PCI1 Error */ | ||
139 | |||
140 | #define DDB_PCICTL1_L 0x06e0 /* PCI1 Control-L */ | ||
141 | #define DDB_PCICTL1_H 0x06e4 /* PCI1 Control-H */ | ||
142 | #define DDB_PCIARB1_L 0x06e8 /* PCI1 Arbitration-L */ | ||
143 | #define DDB_PCIARB1_H 0x06ec /* PCI1 Arbitration-H */ | ||
144 | |||
145 | /* | ||
146 | * Local Bus | ||
147 | */ | ||
148 | #define DDB_LCST0 0x0110 /* LB Chip Select Timing 0 */ | ||
149 | #define DDB_LCST1 0x0118 /* LB Chip Select Timing 1 */ | ||
150 | #undef DDB_LCST2 | ||
151 | #define DDB_LCST2 0x0120 /* LB Chip Select Timing 2 */ | ||
152 | #undef DDB_LCST3 | ||
153 | #undef DDB_LCST4 | ||
154 | #undef DDB_LCST5 | ||
155 | #undef DDB_LCST6 | ||
156 | #undef DDB_LCST7 | ||
157 | #undef DDB_LCST8 | ||
158 | #define DDB_ERRADR 0x0150 /* Error Address Register */ | ||
159 | #define DDB_ERRCS 0x0160 | ||
160 | #define DDB_BTM 0x0170 /* Boot Time Mode value */ | ||
161 | |||
162 | /* | ||
163 | * MISC registers | ||
164 | */ | ||
165 | #define DDB_GIUFUNSEL 0x4040 /* select dual-func pins */ | ||
166 | #define DDB_PIBMISC 0x0750 /* USB buffer enable / power saving */ | ||
167 | |||
168 | /* | ||
169 | * Memory map (physical address) | ||
170 | * | ||
171 | * Note most of the following address must be properly aligned by the | ||
172 | * corresponding size. For example, if PCI_IO_SIZE is 16MB, then | ||
173 | * PCI_IO_BASE must be aligned along 16MB boundary. | ||
174 | */ | ||
175 | |||
176 | /* the actual ram size is detected at run-time */ | ||
177 | #define DDB_SDRAM_BASE 0x00000000 | ||
178 | #define DDB_MAX_SDRAM_SIZE 0x08000000 /* less than 128MB */ | ||
179 | |||
180 | #define DDB_PCI0_MEM_BASE 0x08000000 | ||
181 | #define DDB_PCI0_MEM_SIZE 0x08000000 /* 128 MB */ | ||
182 | |||
183 | #define DDB_PCI1_MEM_BASE 0x10000000 | ||
184 | #define DDB_PCI1_MEM_SIZE 0x08000000 /* 128 MB */ | ||
185 | |||
186 | #define DDB_PCI0_CONFIG_BASE 0x18000000 | ||
187 | #define DDB_PCI0_CONFIG_SIZE 0x01000000 /* 16 MB */ | ||
188 | |||
189 | #define DDB_PCI1_CONFIG_BASE 0x19000000 | ||
190 | #define DDB_PCI1_CONFIG_SIZE 0x01000000 /* 16 MB */ | ||
191 | |||
192 | #define DDB_PCI_IO_BASE 0x1a000000 /* we concatenate two IOs */ | ||
193 | #define DDB_PCI0_IO_BASE 0x1a000000 | ||
194 | #define DDB_PCI0_IO_SIZE 0x01000000 /* 16 MB */ | ||
195 | #define DDB_PCI1_IO_BASE 0x1b000000 | ||
196 | #define DDB_PCI1_IO_SIZE 0x01000000 /* 16 MB */ | ||
197 | |||
198 | #define DDB_LCS0_BASE 0x1c000000 /* flash memory */ | ||
199 | #define DDB_LCS0_SIZE 0x01000000 /* 16 MB */ | ||
200 | |||
201 | #define DDB_LCS1_BASE 0x1d000000 /* misc */ | ||
202 | #define DDB_LCS1_SIZE 0x01000000 /* 16 MB */ | ||
203 | |||
204 | #define DDB_LCS2_BASE 0x1e000000 /* Mezzanine */ | ||
205 | #define DDB_LCS2_SIZE 0x01000000 /* 16 MB */ | ||
206 | |||
207 | #define DDB_VRC5477_BASE 0x1fa00000 /* VRC5477 control regs */ | ||
208 | #define DDB_VRC5477_SIZE 0x00200000 /* 2MB */ | ||
209 | |||
210 | #define DDB_BOOTCS_BASE 0x1fc00000 /* Boot ROM / EPROM /Flash */ | ||
211 | #define DDB_BOOTCS_SIZE 0x00200000 /* 2 MB - doc says 4MB */ | ||
212 | |||
213 | #define DDB_LED DDB_LCS1_BASE + 0x10000 | ||
214 | |||
215 | |||
216 | /* | ||
217 | * DDB5477 specific functions | ||
218 | */ | ||
219 | #ifndef __ASSEMBLY__ | ||
220 | extern void ddb5477_irq_setup(void); | ||
221 | |||
222 | /* route irq to cpu int pin */ | ||
223 | extern void ll_vrc5477_irq_route(int vrc5477_irq, int ip); | ||
224 | |||
225 | /* low-level routine for enabling vrc5477 irq, bypassing high-level */ | ||
226 | extern void ll_vrc5477_irq_enable(int vrc5477_irq); | ||
227 | extern void ll_vrc5477_irq_disable(int vrc5477_irq); | ||
228 | #endif /* !__ASSEMBLY__ */ | ||
229 | |||
230 | /* PCI intr ack share PCIW0 with PCI IO */ | ||
231 | #define DDB_PCI_IACK_BASE DDB_PCI_IO_BASE | ||
232 | |||
233 | /* | ||
234 | * Interrupt mapping | ||
235 | * | ||
236 | * We have three interrupt controllers: | ||
237 | * | ||
238 | * . CPU itself - 8 sources | ||
239 | * . i8259 - 16 sources | ||
240 | * . vrc5477 - 32 sources | ||
241 | * | ||
242 | * They connected as follows: | ||
243 | * all vrc5477 interrupts are routed to cpu IP2 (by software setting) | ||
244 | * all i8359 are routed to INTC in vrc5477 (by hardware connection) | ||
245 | * | ||
246 | * All VRC5477 PCI interrupts are level-triggered (no ack needed). | ||
247 | * All PCI irq but INTC are active low. | ||
248 | */ | ||
249 | |||
250 | /* | ||
251 | * irq number block assignment | ||
252 | */ | ||
253 | |||
254 | #define NUM_CPU_IRQ 8 | ||
255 | #define NUM_VRC5477_IRQ 32 | ||
256 | |||
257 | #define CPU_IRQ_BASE MIPS_CPU_IRQ_BASE | ||
258 | #define VRC5477_IRQ_BASE (CPU_IRQ_BASE + NUM_CPU_IRQ) | ||
259 | |||
260 | /* | ||
261 | * vrc5477 irq defs | ||
262 | */ | ||
263 | |||
264 | #define VRC5477_IRQ_CPCE (0 + VRC5477_IRQ_BASE) /* cpu parity error */ | ||
265 | #define VRC5477_IRQ_CNTD (1 + VRC5477_IRQ_BASE) /* cpu no target */ | ||
266 | #define VRC5477_IRQ_I2C (2 + VRC5477_IRQ_BASE) /* I2C */ | ||
267 | #define VRC5477_IRQ_DMA (3 + VRC5477_IRQ_BASE) /* DMA */ | ||
268 | #define VRC5477_IRQ_UART0 (4 + VRC5477_IRQ_BASE) | ||
269 | #define VRC5477_IRQ_WDOG (5 + VRC5477_IRQ_BASE) /* watchdog timer */ | ||
270 | #define VRC5477_IRQ_SPT1 (6 + VRC5477_IRQ_BASE) /* special purpose timer 1 */ | ||
271 | #define VRC5477_IRQ_LBRT (7 + VRC5477_IRQ_BASE) /* local bus read timeout */ | ||
272 | #define VRC5477_IRQ_INTA (8 + VRC5477_IRQ_BASE) /* PCI INT #A */ | ||
273 | #define VRC5477_IRQ_INTB (9 + VRC5477_IRQ_BASE) /* PCI INT #B */ | ||
274 | #define VRC5477_IRQ_INTC (10 + VRC5477_IRQ_BASE) /* PCI INT #C */ | ||
275 | #define VRC5477_IRQ_INTD (11 + VRC5477_IRQ_BASE) /* PCI INT #D */ | ||
276 | #define VRC5477_IRQ_INTE (12 + VRC5477_IRQ_BASE) /* PCI INT #E */ | ||
277 | #define VRC5477_IRQ_RESERVED_13 (13 + VRC5477_IRQ_BASE) /* reserved */ | ||
278 | #define VRC5477_IRQ_PCIS (14 + VRC5477_IRQ_BASE) /* PCI SERR # */ | ||
279 | #define VRC5477_IRQ_PCI (15 + VRC5477_IRQ_BASE) /* PCI internal error */ | ||
280 | #define VRC5477_IRQ_IOPCI_INTA (16 + VRC5477_IRQ_BASE) /* USB-H */ | ||
281 | #define VRC5477_IRQ_IOPCI_INTB (17 + VRC5477_IRQ_BASE) /* USB-P */ | ||
282 | #define VRC5477_IRQ_IOPCI_INTC (18 + VRC5477_IRQ_BASE) /* AC97 */ | ||
283 | #define VRC5477_IRQ_IOPCI_INTD (19 + VRC5477_IRQ_BASE) /* Reserved */ | ||
284 | #define VRC5477_IRQ_UART1 (20 + VRC5477_IRQ_BASE) | ||
285 | #define VRC5477_IRQ_SPT0 (21 + VRC5477_IRQ_BASE) /* special purpose timer 0 */ | ||
286 | #define VRC5477_IRQ_GPT0 (22 + VRC5477_IRQ_BASE) /* general purpose timer 0 */ | ||
287 | #define VRC5477_IRQ_GPT1 (23 + VRC5477_IRQ_BASE) /* general purpose timer 1 */ | ||
288 | #define VRC5477_IRQ_GPT2 (24 + VRC5477_IRQ_BASE) /* general purpose timer 2 */ | ||
289 | #define VRC5477_IRQ_GPT3 (25 + VRC5477_IRQ_BASE) /* general purpose timer 3 */ | ||
290 | #define VRC5477_IRQ_GPIO (26 + VRC5477_IRQ_BASE) | ||
291 | #define VRC5477_IRQ_SIO0 (27 + VRC5477_IRQ_BASE) | ||
292 | #define VRC5477_IRQ_SIO1 (28 + VRC5477_IRQ_BASE) | ||
293 | #define VRC5477_IRQ_RESERVED_29 (29 + VRC5477_IRQ_BASE) /* reserved */ | ||
294 | #define VRC5477_IRQ_IOPCISERR (30 + VRC5477_IRQ_BASE) /* IO PCI SERR # */ | ||
295 | #define VRC5477_IRQ_IOPCI (31 + VRC5477_IRQ_BASE) | ||
296 | |||
297 | /* | ||
298 | * i2859 irq assignment | ||
299 | */ | ||
300 | #define I8259_IRQ_RESERVED_0 (0 + I8259A_IRQ_BASE) | ||
301 | #define I8259_IRQ_KEYBOARD (1 + I8259A_IRQ_BASE) /* M1543 default */ | ||
302 | #define I8259_IRQ_CASCADE (2 + I8259A_IRQ_BASE) | ||
303 | #define I8259_IRQ_UART_B (3 + I8259A_IRQ_BASE) /* M1543 default, may conflict with RTC according to schematic diagram */ | ||
304 | #define I8259_IRQ_UART_A (4 + I8259A_IRQ_BASE) /* M1543 default */ | ||
305 | #define I8259_IRQ_PARALLEL (5 + I8259A_IRQ_BASE) /* M1543 default */ | ||
306 | #define I8259_IRQ_RESERVED_6 (6 + I8259A_IRQ_BASE) | ||
307 | #define I8259_IRQ_RESERVED_7 (7 + I8259A_IRQ_BASE) | ||
308 | #define I8259_IRQ_RTC (8 + I8259A_IRQ_BASE) /* who set this? */ | ||
309 | #define I8259_IRQ_USB (9 + I8259A_IRQ_BASE) /* ddb_setup */ | ||
310 | #define I8259_IRQ_PMU (10 + I8259A_IRQ_BASE) /* ddb_setup */ | ||
311 | #define I8259_IRQ_RESERVED_11 (11 + I8259A_IRQ_BASE) | ||
312 | #define I8259_IRQ_RESERVED_12 (12 + I8259A_IRQ_BASE) /* m1543_irq_setup */ | ||
313 | #define I8259_IRQ_RESERVED_13 (13 + I8259A_IRQ_BASE) | ||
314 | #define I8259_IRQ_HDC1 (14 + I8259A_IRQ_BASE) /* default and ddb_setup */ | ||
315 | #define I8259_IRQ_HDC2 (15 + I8259A_IRQ_BASE) /* default */ | ||
316 | |||
317 | |||
318 | /* | ||
319 | * misc | ||
320 | */ | ||
321 | #define VRC5477_I8259_CASCADE (VRC5477_IRQ_INTC - VRC5477_IRQ_BASE) | ||
322 | #define CPU_VRC5477_CASCADE 2 | ||
323 | |||
324 | /* | ||
325 | * debug routines | ||
326 | */ | ||
327 | #ifndef __ASSEMBLY__ | ||
328 | #if defined(CONFIG_RUNTIME_DEBUG) | ||
329 | extern void vrc5477_show_pdar_regs(void); | ||
330 | extern void vrc5477_show_pci_regs(void); | ||
331 | extern void vrc5477_show_bar_regs(void); | ||
332 | extern void vrc5477_show_int_regs(void); | ||
333 | extern void vrc5477_show_all_regs(void); | ||
334 | #endif | ||
335 | |||
336 | /* | ||
337 | * RAM size | ||
338 | */ | ||
339 | extern int board_ram_size; | ||
340 | #endif /* !__ASSEMBLY__ */ | ||
341 | |||
342 | #endif /* __ASM_DDB5XXX_DDB5477_H */ | ||
diff --git a/include/asm-mips/ddb5xxx/ddb5xxx.h b/include/asm-mips/ddb5xxx/ddb5xxx.h deleted file mode 100644 index e97fcc8d548b..000000000000 --- a/include/asm-mips/ddb5xxx/ddb5xxx.h +++ /dev/null | |||
@@ -1,263 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2001 MontaVista Software Inc. | ||
3 | * Author: jsun@mvista.com or jsun@junsun.net | ||
4 | * | ||
5 | * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> | ||
6 | * Sony Software Development Center Europe (SDCE), Brussels | ||
7 | * | ||
8 | * include/asm-mips/ddb5xxx/ddb5xxx.h | ||
9 | * Common header for all NEC DDB 5xxx boards, including 5074, 5476, 5477. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_DDB5XXX_DDB5XXX_H | ||
19 | #define __ASM_DDB5XXX_DDB5XXX_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | /* | ||
24 | * This file is based on the following documentation: | ||
25 | * | ||
26 | * NEC Vrc 5074 System Controller Data Sheet, June 1998 | ||
27 | * | ||
28 | * [jsun] It is modified so that this file only contains the macros | ||
29 | * that are true for all DDB 5xxx boards. The modification is based on | ||
30 | * | ||
31 | * uPD31577(VRC5477) VR5432-SDRAM/PCI Bridge (Luke) | ||
32 | * Preliminary Specification Decoment, Rev 1.1, 27 Dec, 2000 | ||
33 | * | ||
34 | */ | ||
35 | |||
36 | |||
37 | #define DDB_BASE 0xbfa00000 | ||
38 | #define DDB_SIZE 0x00200000 /* 2 MB */ | ||
39 | |||
40 | |||
41 | /* | ||
42 | * Physical Device Address Registers (PDARs) | ||
43 | */ | ||
44 | |||
45 | #define DDB_SDRAM0 0x0000 /* SDRAM Bank 0 [R/W] */ | ||
46 | #define DDB_SDRAM1 0x0008 /* SDRAM Bank 1 [R/W] */ | ||
47 | #define DDB_DCS2 0x0010 /* Device Chip-Select 2 [R/W] */ | ||
48 | #define DDB_DCS3 0x0018 /* Device Chip-Select 3 [R/W] */ | ||
49 | #define DDB_DCS4 0x0020 /* Device Chip-Select 4 [R/W] */ | ||
50 | #define DDB_DCS5 0x0028 /* Device Chip-Select 5 [R/W] */ | ||
51 | #define DDB_DCS6 0x0030 /* Device Chip-Select 6 [R/W] */ | ||
52 | #define DDB_DCS7 0x0038 /* Device Chip-Select 7 [R/W] */ | ||
53 | #define DDB_DCS8 0x0040 /* Device Chip-Select 8 [R/W] */ | ||
54 | #define DDB_PCIW0 0x0060 /* PCI Address Window 0 [R/W] */ | ||
55 | #define DDB_PCIW1 0x0068 /* PCI Address Window 1 [R/W] */ | ||
56 | #define DDB_INTCS 0x0070 /* Controller Internal Registers and Devices */ | ||
57 | /* [R/W] */ | ||
58 | #define DDB_BOOTCS 0x0078 /* Boot ROM Chip-Select [R/W] */ | ||
59 | /* Vrc5477 has two more, IOPCIW0, IOPCIW1 */ | ||
60 | |||
61 | /* | ||
62 | * CPU Interface Registers | ||
63 | */ | ||
64 | #define DDB_CPUSTAT 0x0080 /* CPU Status [R/W] */ | ||
65 | #define DDB_INTCTRL 0x0088 /* Interrupt Control [R/W] */ | ||
66 | #define DDB_INTSTAT0 0x0090 /* Interrupt Status 0 [R] */ | ||
67 | #define DDB_INTSTAT1 0x0098 /* Interrupt Status 1 and CPU Interrupt */ | ||
68 | /* Enable [R/W] */ | ||
69 | #define DDB_INTCLR 0x00A0 /* Interrupt Clear [R/W] */ | ||
70 | #define DDB_INTPPES 0x00A8 /* PCI Interrupt Control [R/W] */ | ||
71 | |||
72 | |||
73 | /* | ||
74 | * Memory-Interface Registers | ||
75 | */ | ||
76 | #define DDB_MEMCTRL 0x00C0 /* Memory Control */ | ||
77 | #define DDB_ACSTIME 0x00C8 /* Memory Access Timing [R/W] */ | ||
78 | #define DDB_CHKERR 0x00D0 /* Memory Check Error Status [R] */ | ||
79 | |||
80 | |||
81 | /* | ||
82 | * PCI-Bus Registers | ||
83 | */ | ||
84 | #define DDB_PCICTRL 0x00E0 /* PCI Control [R/W] */ | ||
85 | #define DDB_PCIARB 0x00E8 /* PCI Arbiter [R/W] */ | ||
86 | #define DDB_PCIINIT0 0x00F0 /* PCI Master (Initiator) 0 [R/W] */ | ||
87 | #define DDB_PCIINIT1 0x00F8 /* PCI Master (Initiator) 1 [R/W] */ | ||
88 | #define DDB_PCIERR 0x00B8 /* PCI Error [R/W] */ | ||
89 | |||
90 | |||
91 | /* | ||
92 | * Local-Bus Registers | ||
93 | */ | ||
94 | #define DDB_LCNFG 0x0100 /* Local Bus Configuration [R/W] */ | ||
95 | #define DDB_LCST2 0x0110 /* Local Bus Chip-Select Timing 2 [R/W] */ | ||
96 | #define DDB_LCST3 0x0118 /* Local Bus Chip-Select Timing 3 [R/W] */ | ||
97 | #define DDB_LCST4 0x0120 /* Local Bus Chip-Select Timing 4 [R/W] */ | ||
98 | #define DDB_LCST5 0x0128 /* Local Bus Chip-Select Timing 5 [R/W] */ | ||
99 | #define DDB_LCST6 0x0130 /* Local Bus Chip-Select Timing 6 [R/W] */ | ||
100 | #define DDB_LCST7 0x0138 /* Local Bus Chip-Select Timing 7 [R/W] */ | ||
101 | #define DDB_LCST8 0x0140 /* Local Bus Chip-Select Timing 8 [R/W] */ | ||
102 | #define DDB_DCSFN 0x0150 /* Device Chip-Select Muxing and Output */ | ||
103 | /* Enables [R/W] */ | ||
104 | #define DDB_DCSIO 0x0158 /* Device Chip-Selects As I/O Bits [R/W] */ | ||
105 | #define DDB_BCST 0x0178 /* Local Boot Chip-Select Timing [R/W] */ | ||
106 | |||
107 | |||
108 | /* | ||
109 | * DMA Registers | ||
110 | */ | ||
111 | #define DDB_DMACTRL0 0x0180 /* DMA Control 0 [R/W] */ | ||
112 | #define DDB_DMASRCA0 0x0188 /* DMA Source Address 0 [R/W] */ | ||
113 | #define DDB_DMADESA0 0x0190 /* DMA Destination Address 0 [R/W] */ | ||
114 | #define DDB_DMACTRL1 0x0198 /* DMA Control 1 [R/W] */ | ||
115 | #define DDB_DMASRCA1 0x01A0 /* DMA Source Address 1 [R/W] */ | ||
116 | #define DDB_DMADESA1 0x01A8 /* DMA Destination Address 1 [R/W] */ | ||
117 | |||
118 | |||
119 | /* | ||
120 | * Timer Registers | ||
121 | */ | ||
122 | #define DDB_T0CTRL 0x01C0 /* SDRAM Refresh Control [R/W] */ | ||
123 | #define DDB_T0CNTR 0x01C8 /* SDRAM Refresh Counter [R/W] */ | ||
124 | #define DDB_T1CTRL 0x01D0 /* CPU-Bus Read Time-Out Control [R/W] */ | ||
125 | #define DDB_T1CNTR 0x01D8 /* CPU-Bus Read Time-Out Counter [R/W] */ | ||
126 | #define DDB_T2CTRL 0x01E0 /* General-Purpose Timer Control [R/W] */ | ||
127 | #define DDB_T2CNTR 0x01E8 /* General-Purpose Timer Counter [R/W] */ | ||
128 | #define DDB_T3CTRL 0x01F0 /* Watchdog Timer Control [R/W] */ | ||
129 | #define DDB_T3CNTR 0x01F8 /* Watchdog Timer Counter [R/W] */ | ||
130 | |||
131 | |||
132 | /* | ||
133 | * PCI Configuration Space Registers | ||
134 | */ | ||
135 | #define DDB_PCI_BASE 0x0200 | ||
136 | |||
137 | #define DDB_VID 0x0200 /* PCI Vendor ID [R] */ | ||
138 | #define DDB_DID 0x0202 /* PCI Device ID [R] */ | ||
139 | #define DDB_PCICMD 0x0204 /* PCI Command [R/W] */ | ||
140 | #define DDB_PCISTS 0x0206 /* PCI Status [R/W] */ | ||
141 | #define DDB_REVID 0x0208 /* PCI Revision ID [R] */ | ||
142 | #define DDB_CLASS 0x0209 /* PCI Class Code [R] */ | ||
143 | #define DDB_CLSIZ 0x020C /* PCI Cache Line Size [R/W] */ | ||
144 | #define DDB_MLTIM 0x020D /* PCI Latency Timer [R/W] */ | ||
145 | #define DDB_HTYPE 0x020E /* PCI Header Type [R] */ | ||
146 | #define DDB_BIST 0x020F /* BIST [R] (unimplemented) */ | ||
147 | #define DDB_BARC 0x0210 /* PCI Base Address Register Control [R/W] */ | ||
148 | #define DDB_BAR0 0x0218 /* PCI Base Address Register 0 [R/W] */ | ||
149 | #define DDB_BAR1 0x0220 /* PCI Base Address Register 1 [R/W] */ | ||
150 | #define DDB_CIS 0x0228 /* PCI Cardbus CIS Pointer [R] */ | ||
151 | /* (unimplemented) */ | ||
152 | #define DDB_SSVID 0x022C /* PCI Sub-System Vendor ID [R/W] */ | ||
153 | #define DDB_SSID 0x022E /* PCI Sub-System ID [R/W] */ | ||
154 | #define DDB_ROM 0x0230 /* Expansion ROM Base Address [R] */ | ||
155 | /* (unimplemented) */ | ||
156 | #define DDB_INTLIN 0x023C /* PCI Interrupt Line [R/W] */ | ||
157 | #define DDB_INTPIN 0x023D /* PCI Interrupt Pin [R] */ | ||
158 | #define DDB_MINGNT 0x023E /* PCI Min_Gnt [R] (unimplemented) */ | ||
159 | #define DDB_MAXLAT 0x023F /* PCI Max_Lat [R] (unimplemented) */ | ||
160 | #define DDB_BAR2 0x0240 /* PCI Base Address Register 2 [R/W] */ | ||
161 | #define DDB_BAR3 0x0248 /* PCI Base Address Register 3 [R/W] */ | ||
162 | #define DDB_BAR4 0x0250 /* PCI Base Address Register 4 [R/W] */ | ||
163 | #define DDB_BAR5 0x0258 /* PCI Base Address Register 5 [R/W] */ | ||
164 | #define DDB_BAR6 0x0260 /* PCI Base Address Register 6 [R/W] */ | ||
165 | #define DDB_BAR7 0x0268 /* PCI Base Address Register 7 [R/W] */ | ||
166 | #define DDB_BAR8 0x0270 /* PCI Base Address Register 8 [R/W] */ | ||
167 | #define DDB_BARB 0x0278 /* PCI Base Address Register BOOT [R/W] */ | ||
168 | |||
169 | |||
170 | /* | ||
171 | * Nile 4 Register Access | ||
172 | */ | ||
173 | |||
174 | static inline void ddb_sync(void) | ||
175 | { | ||
176 | volatile u32 *p = (volatile u32 *)0xbfc00000; | ||
177 | (void)(*p); | ||
178 | } | ||
179 | |||
180 | static inline void ddb_out32(u32 offset, u32 val) | ||
181 | { | ||
182 | *(volatile u32 *)(DDB_BASE+offset) = val; | ||
183 | ddb_sync(); | ||
184 | } | ||
185 | |||
186 | static inline u32 ddb_in32(u32 offset) | ||
187 | { | ||
188 | u32 val = *(volatile u32 *)(DDB_BASE+offset); | ||
189 | ddb_sync(); | ||
190 | return val; | ||
191 | } | ||
192 | |||
193 | static inline void ddb_out16(u32 offset, u16 val) | ||
194 | { | ||
195 | *(volatile u16 *)(DDB_BASE+offset) = val; | ||
196 | ddb_sync(); | ||
197 | } | ||
198 | |||
199 | static inline u16 ddb_in16(u32 offset) | ||
200 | { | ||
201 | u16 val = *(volatile u16 *)(DDB_BASE+offset); | ||
202 | ddb_sync(); | ||
203 | return val; | ||
204 | } | ||
205 | |||
206 | static inline void ddb_out8(u32 offset, u8 val) | ||
207 | { | ||
208 | *(volatile u8 *)(DDB_BASE+offset) = val; | ||
209 | ddb_sync(); | ||
210 | } | ||
211 | |||
212 | static inline u8 ddb_in8(u32 offset) | ||
213 | { | ||
214 | u8 val = *(volatile u8 *)(DDB_BASE+offset); | ||
215 | ddb_sync(); | ||
216 | return val; | ||
217 | } | ||
218 | |||
219 | |||
220 | /* | ||
221 | * Physical Device Address Registers | ||
222 | */ | ||
223 | |||
224 | extern u32 | ||
225 | ddb_calc_pdar(u32 phys, u32 size, int width, int on_memory_bus, int pci_visible); | ||
226 | extern void | ||
227 | ddb_set_pdar(u32 pdar, u32 phys, u32 size, int width, | ||
228 | int on_memory_bus, int pci_visible); | ||
229 | |||
230 | /* | ||
231 | * PCI Master Registers | ||
232 | */ | ||
233 | |||
234 | #define DDB_PCICMD_IACK 0 /* PCI Interrupt Acknowledge */ | ||
235 | #define DDB_PCICMD_IO 1 /* PCI I/O Space */ | ||
236 | #define DDB_PCICMD_MEM 3 /* PCI Memory Space */ | ||
237 | #define DDB_PCICMD_CFG 5 /* PCI Configuration Space */ | ||
238 | |||
239 | /* | ||
240 | * additional options for pci init reg (no shifting needed) | ||
241 | */ | ||
242 | #define DDB_PCI_CFGTYPE1 0x200 /* for pci init0/1 regs */ | ||
243 | #define DDB_PCI_ACCESS_32 0x10 /* for pci init0/1 regs */ | ||
244 | |||
245 | |||
246 | extern void ddb_set_pmr(u32 pmr, u32 type, u32 addr, u32 options); | ||
247 | |||
248 | /* | ||
249 | * we need to reset pci bus when we start up and shutdown | ||
250 | */ | ||
251 | extern void ddb_pci_reset_bus(void); | ||
252 | |||
253 | |||
254 | /* | ||
255 | * include the board dependent part | ||
256 | */ | ||
257 | #if defined(CONFIG_DDB5477) | ||
258 | #include <asm/ddb5xxx/ddb5477.h> | ||
259 | #else | ||
260 | #error "Unknown DDB board!" | ||
261 | #endif | ||
262 | |||
263 | #endif /* __ASM_DDB5XXX_DDB5XXX_H */ | ||
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h index ebd6bfb19d66..e7d95d48177d 100644 --- a/include/asm-mips/elf.h +++ b/include/asm-mips/elf.h | |||
@@ -265,7 +265,7 @@ do { \ | |||
265 | #ifdef CONFIG_MIPS32_N32 | 265 | #ifdef CONFIG_MIPS32_N32 |
266 | #define __SET_PERSONALITY32_N32() \ | 266 | #define __SET_PERSONALITY32_N32() \ |
267 | do { \ | 267 | do { \ |
268 | current->thread.mflags |= MF_N32; \ | 268 | set_thread_flag(TIF_32BIT_ADDR); \ |
269 | current->thread.abi = &mips_abi_n32; \ | 269 | current->thread.abi = &mips_abi_n32; \ |
270 | } while (0) | 270 | } while (0) |
271 | #else | 271 | #else |
@@ -276,7 +276,8 @@ do { \ | |||
276 | #ifdef CONFIG_MIPS32_O32 | 276 | #ifdef CONFIG_MIPS32_O32 |
277 | #define __SET_PERSONALITY32_O32() \ | 277 | #define __SET_PERSONALITY32_O32() \ |
278 | do { \ | 278 | do { \ |
279 | current->thread.mflags |= MF_O32; \ | 279 | set_thread_flag(TIF_32BIT_REGS); \ |
280 | set_thread_flag(TIF_32BIT_ADDR); \ | ||
280 | current->thread.abi = &mips_abi_32; \ | 281 | current->thread.abi = &mips_abi_32; \ |
281 | } while (0) | 282 | } while (0) |
282 | #else | 283 | #else |
@@ -299,13 +300,13 @@ do { \ | |||
299 | 300 | ||
300 | #define SET_PERSONALITY(ex, ibcs2) \ | 301 | #define SET_PERSONALITY(ex, ibcs2) \ |
301 | do { \ | 302 | do { \ |
302 | current->thread.mflags &= ~MF_ABI_MASK; \ | 303 | clear_thread_flag(TIF_32BIT_REGS); \ |
304 | clear_thread_flag(TIF_32BIT_ADDR); \ | ||
305 | \ | ||
303 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ | 306 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ |
304 | __SET_PERSONALITY32(ex); \ | 307 | __SET_PERSONALITY32(ex); \ |
305 | else { \ | 308 | else \ |
306 | current->thread.mflags |= MF_N64; \ | ||
307 | current->thread.abi = &mips_abi; \ | 309 | current->thread.abi = &mips_abi; \ |
308 | } \ | ||
309 | \ | 310 | \ |
310 | if (ibcs2) \ | 311 | if (ibcs2) \ |
311 | set_personality(PER_SVR4); \ | 312 | set_personality(PER_SVR4); \ |
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index d9119f43f9aa..918a4894b587 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003, 2004 Ralf Baechle <ralf@linux-mips.org> | 6 | * Copyright (C) 2003, 04, 07 Ralf Baechle <ralf@linux-mips.org> |
7 | * Copyright (C) MIPS Technologies, Inc. | 7 | * Copyright (C) MIPS Technologies, Inc. |
8 | * written by Ralf Baechle <ralf@linux-mips.org> | 8 | * written by Ralf Baechle <ralf@linux-mips.org> |
9 | */ | 9 | */ |
@@ -23,6 +23,11 @@ static inline void name(void) \ | |||
23 | __asm__ __volatile__ (#name); \ | 23 | __asm__ __volatile__ (#name); \ |
24 | } | 24 | } |
25 | 25 | ||
26 | /* | ||
27 | * MIPS R2 instruction hazard barrier. Needs to be called as a subroutine. | ||
28 | */ | ||
29 | extern void mips_ihb(void); | ||
30 | |||
26 | #endif | 31 | #endif |
27 | 32 | ||
28 | ASMMACRO(_ssnop, | 33 | ASMMACRO(_ssnop, |
diff --git a/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h b/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h new file mode 100644 index 000000000000..275eaf92c748 --- /dev/null +++ b/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #ifndef __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H | ||
2 | #define __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H | ||
3 | |||
4 | #define cpu_has_llsc 1 | ||
5 | #define cpu_has_64bits 1 | ||
6 | #define cpu_has_inclusive_pcaches 0 | ||
7 | |||
8 | #define cpu_has_mips16 0 | ||
9 | #define cpu_has_mdmx 0 | ||
10 | #define cpu_has_mips3d 0 | ||
11 | #define cpu_has_smartmips 0 | ||
12 | #define cpu_has_vtag_icache 0 | ||
13 | #define cpu_has_ic_fills_f_dc 0 | ||
14 | #define cpu_has_dsp 0 | ||
15 | #define cpu_has_mipsmt 0 | ||
16 | #define cpu_has_userlocal 0 | ||
17 | |||
18 | #define cpu_has_mips32r1 0 | ||
19 | #define cpu_has_mips32r2 0 | ||
20 | #define cpu_has_mips64r1 0 | ||
21 | #define cpu_has_mips64r2 0 | ||
22 | |||
23 | #endif /* __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/include/asm-mips/mach-tx49xx/kmalloc.h b/include/asm-mips/mach-tx49xx/kmalloc.h new file mode 100644 index 000000000000..913ff196259d --- /dev/null +++ b/include/asm-mips/mach-tx49xx/kmalloc.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H | ||
2 | #define __ASM_MACH_TX49XX_KMALLOC_H | ||
3 | |||
4 | /* | ||
5 | * All happy, no need to define ARCH_KMALLOC_MINALIGN | ||
6 | */ | ||
7 | |||
8 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ | ||
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h index c8ebcc3e1267..d58977483534 100644 --- a/include/asm-mips/mips-boards/generic.h +++ b/include/asm-mips/mips-boards/generic.h | |||
@@ -67,6 +67,7 @@ | |||
67 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 | 67 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 |
68 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 | 68 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 |
69 | #define MIPS_REVISION_CORID_CORE_24K 10 | 69 | #define MIPS_REVISION_CORID_CORE_24K 10 |
70 | #define MIPS_REVISION_CORID_CORE_FPGA4 11 | ||
70 | 71 | ||
71 | /**** Artificial corid defines ****/ | 72 | /**** Artificial corid defines ****/ |
72 | /* | 73 | /* |
diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h index 8045abc78d0f..ac7935203f89 100644 --- a/include/asm-mips/mips_mt.h +++ b/include/asm-mips/mips_mt.h | |||
@@ -8,6 +8,12 @@ | |||
8 | 8 | ||
9 | #include <linux/cpumask.h> | 9 | #include <linux/cpumask.h> |
10 | 10 | ||
11 | /* | ||
12 | * How many VPEs and TCs is Linux allowed to use? 0 means no limit. | ||
13 | */ | ||
14 | extern int tclimit; | ||
15 | extern int vpelimit; | ||
16 | |||
11 | extern cpumask_t mt_fpu_cpumask; | 17 | extern cpumask_t mt_fpu_cpumask; |
12 | extern unsigned long mt_fpemul_threshold; | 18 | extern unsigned long mt_fpemul_threshold; |
13 | 19 | ||
diff --git a/include/asm-mips/pmon.h b/include/asm-mips/pmon.h index 260f3448ccf1..6ad519189ce2 100644 --- a/include/asm-mips/pmon.h +++ b/include/asm-mips/pmon.h | |||
@@ -22,7 +22,7 @@ struct callvectors { | |||
22 | char* (*gets) (char*); | 22 | char* (*gets) (char*); |
23 | union { | 23 | union { |
24 | int (*smpfork) (unsigned long cp, char *sp); | 24 | int (*smpfork) (unsigned long cp, char *sp); |
25 | int (*cpustart) (long, long, long, long); | 25 | int (*cpustart) (long, void (*)(void), void *, long); |
26 | } _s; | 26 | } _s; |
27 | int (*semlock) (int sem); | 27 | int (*semlock) (int sem); |
28 | void (*semunlock) (int sem); | 28 | void (*semunlock) (int sem); |
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 1d8b9a8ae324..83bc94534084 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -62,8 +62,9 @@ extern unsigned int vced_count, vcei_count; | |||
62 | * This decides where the kernel will search for a free chunk of vm | 62 | * This decides where the kernel will search for a free chunk of vm |
63 | * space during mmap's. | 63 | * space during mmap's. |
64 | */ | 64 | */ |
65 | #define TASK_UNMAPPED_BASE ((current->thread.mflags & MF_32BIT_ADDR) ? \ | 65 | #define TASK_UNMAPPED_BASE \ |
66 | PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3)) | 66 | (test_thread_flag(TIF_32BIT_ADDR) ? \ |
67 | PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3)) | ||
67 | #endif | 68 | #endif |
68 | 69 | ||
69 | #define NUM_FPU_REGS 32 | 70 | #define NUM_FPU_REGS 32 |
@@ -132,22 +133,11 @@ struct thread_struct { | |||
132 | unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */ | 133 | unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */ |
133 | unsigned long error_code; | 134 | unsigned long error_code; |
134 | unsigned long trap_no; | 135 | unsigned long trap_no; |
135 | #define MF_FIXADE 1 /* Fix address errors in software */ | ||
136 | #define MF_LOGADE 2 /* Log address errors to syslog */ | ||
137 | #define MF_32BIT_REGS 4 /* also implies 16/32 fprs */ | ||
138 | #define MF_32BIT_ADDR 8 /* 32-bit address space (o32/n32) */ | ||
139 | #define MF_FPUBOUND 0x10 /* thread bound to FPU-full CPU set */ | ||
140 | unsigned long mflags; | ||
141 | unsigned long irix_trampoline; /* Wheee... */ | 136 | unsigned long irix_trampoline; /* Wheee... */ |
142 | unsigned long irix_oldctx; | 137 | unsigned long irix_oldctx; |
143 | struct mips_abi *abi; | 138 | struct mips_abi *abi; |
144 | }; | 139 | }; |
145 | 140 | ||
146 | #define MF_ABI_MASK (MF_32BIT_REGS | MF_32BIT_ADDR) | ||
147 | #define MF_O32 (MF_32BIT_REGS | MF_32BIT_ADDR) | ||
148 | #define MF_N32 MF_32BIT_ADDR | ||
149 | #define MF_N64 0 | ||
150 | |||
151 | #ifdef CONFIG_MIPS_MT_FPAFF | 141 | #ifdef CONFIG_MIPS_MT_FPAFF |
152 | #define FPAFF_INIT \ | 142 | #define FPAFF_INIT \ |
153 | .emulated_fp = 0, \ | 143 | .emulated_fp = 0, \ |
@@ -200,10 +190,6 @@ struct thread_struct { | |||
200 | .cp0_baduaddr = 0, \ | 190 | .cp0_baduaddr = 0, \ |
201 | .error_code = 0, \ | 191 | .error_code = 0, \ |
202 | .trap_no = 0, \ | 192 | .trap_no = 0, \ |
203 | /* \ | ||
204 | * For now the default is to fix address errors \ | ||
205 | */ \ | ||
206 | .mflags = MF_FIXADE, \ | ||
207 | .irix_trampoline = 0, \ | 193 | .irix_trampoline = 0, \ |
208 | .irix_oldctx = 0, \ | 194 | .irix_oldctx = 0, \ |
209 | } | 195 | } |
diff --git a/include/asm-mips/seccomp.h b/include/asm-mips/seccomp.h new file mode 100644 index 000000000000..36ed44070256 --- /dev/null +++ b/include/asm-mips/seccomp.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef __ASM_SECCOMP_H | ||
2 | |||
3 | #include <linux/thread_info.h> | ||
4 | #include <linux/unistd.h> | ||
5 | |||
6 | #define __NR_seccomp_read __NR_read | ||
7 | #define __NR_seccomp_write __NR_write | ||
8 | #define __NR_seccomp_exit __NR_exit | ||
9 | #define __NR_seccomp_sigreturn __NR_rt_sigreturn | ||
10 | |||
11 | /* | ||
12 | * Kludge alert: | ||
13 | * | ||
14 | * The generic seccomp code currently allows only a single compat ABI. Until | ||
15 | * this is fixed we priorize O32 as the compat ABI over N32. | ||
16 | */ | ||
17 | #ifdef CONFIG_MIPS32_O32 | ||
18 | |||
19 | #define TIF_32BIT TIF_32BIT_REGS | ||
20 | |||
21 | #define __NR_seccomp_read_32 4003 | ||
22 | #define __NR_seccomp_write_32 4004 | ||
23 | #define __NR_seccomp_exit_32 4001 | ||
24 | #define __NR_seccomp_sigreturn_32 4193 /* rt_sigreturn */ | ||
25 | |||
26 | #elif defined(CONFIG_MIPS32_N32) | ||
27 | |||
28 | #define TIF_32BIT _TIF_32BIT_ADDR | ||
29 | |||
30 | #define __NR_seccomp_read_32 6000 | ||
31 | #define __NR_seccomp_write_32 6001 | ||
32 | #define __NR_seccomp_exit_32 6058 | ||
33 | #define __NR_seccomp_sigreturn_32 6211 /* rt_sigreturn */ | ||
34 | |||
35 | #endif /* CONFIG_MIPS32_O32 */ | ||
36 | |||
37 | #endif /* __ASM_SECCOMP_H */ | ||
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 8d0b1cd4a45e..357251f42518 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -46,10 +46,12 @@ struct task_struct; | |||
46 | 46 | ||
47 | #define __mips_mt_fpaff_switch_to(prev) \ | 47 | #define __mips_mt_fpaff_switch_to(prev) \ |
48 | do { \ | 48 | do { \ |
49 | struct thread_info *__prev_ti = task_thread_info(prev); \ | ||
50 | \ | ||
49 | if (cpu_has_fpu && \ | 51 | if (cpu_has_fpu && \ |
50 | (prev->thread.mflags & MF_FPUBOUND) && \ | 52 | test_ti_thread_flag(__prev_ti, TIF_FPUBOUND) && \ |
51 | (!(KSTK_STATUS(prev) & ST0_CU1))) { \ | 53 | (!(KSTK_STATUS(prev) & ST0_CU1))) { \ |
52 | prev->thread.mflags &= ~MF_FPUBOUND; \ | 54 | clear_ti_thread_flag(__prev_ti, TIF_FPUBOUND); \ |
53 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ | 55 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ |
54 | } \ | 56 | } \ |
55 | next->thread.emulated_fp = 0; \ | 57 | next->thread.emulated_fp = 0; \ |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 645e7e2a5665..b2772df1a1bd 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
@@ -46,7 +46,7 @@ struct thread_info { | |||
46 | { \ | 46 | { \ |
47 | .task = &tsk, \ | 47 | .task = &tsk, \ |
48 | .exec_domain = &default_exec_domain, \ | 48 | .exec_domain = &default_exec_domain, \ |
49 | .flags = 0, \ | 49 | .flags = _TIF_FIXADE, \ |
50 | .cpu = 0, \ | 50 | .cpu = 0, \ |
51 | .preempt_count = 1, \ | 51 | .preempt_count = 1, \ |
52 | .addr_limit = KERNEL_DS, \ | 52 | .addr_limit = KERNEL_DS, \ |
@@ -87,9 +87,8 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
87 | ({ \ | 87 | ({ \ |
88 | struct thread_info *ret; \ | 88 | struct thread_info *ret; \ |
89 | \ | 89 | \ |
90 | ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \ | 90 | ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \ |
91 | if (ret) \ | 91 | \ |
92 | memset(ret, 0, THREAD_SIZE); \ | ||
93 | ret; \ | 92 | ret; \ |
94 | }) | 93 | }) |
95 | #else | 94 | #else |
@@ -118,6 +117,11 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
118 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 117 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
119 | #define TIF_MEMDIE 18 | 118 | #define TIF_MEMDIE 18 |
120 | #define TIF_FREEZE 19 | 119 | #define TIF_FREEZE 19 |
120 | #define TIF_FIXADE 20 /* Fix address errors in software */ | ||
121 | #define TIF_LOGADE 21 /* Log address errors to syslog */ | ||
122 | #define TIF_32BIT_REGS 22 /* also implies 16/32 fprs */ | ||
123 | #define TIF_32BIT_ADDR 23 /* 32-bit address space (o32/n32) */ | ||
124 | #define TIF_FPUBOUND 24 /* thread bound to FPU-full CPU set */ | ||
121 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ | 125 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ |
122 | 126 | ||
123 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 127 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
@@ -129,6 +133,11 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
129 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 133 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
130 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 134 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
131 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 135 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
136 | #define _TIF_FIXADE (1<<TIF_FIXADE) | ||
137 | #define _TIF_LOGADE (1<<TIF_LOGADE) | ||
138 | #define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) | ||
139 | #define _TIF_32BIT_ADDR (1<<TIF_32BIT_ADDR) | ||
140 | #define _TIF_FPUBOUND (1<<TIF_FPUBOUND) | ||
132 | 141 | ||
133 | /* work to do on interrupt/exception return */ | 142 | /* work to do on interrupt/exception return */ |
134 | #define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) | 143 | #define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) |
diff --git a/include/asm-mips/tx4927/toshiba_rbtx4927.h b/include/asm-mips/tx4927/toshiba_rbtx4927.h index 94bef03d9635..5dc40a867774 100644 --- a/include/asm-mips/tx4927/toshiba_rbtx4927.h +++ b/include/asm-mips/tx4927/toshiba_rbtx4927.h | |||
@@ -52,4 +52,6 @@ | |||
52 | #define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET) | 52 | #define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET) |
53 | #define RBTX4927_RTL_8019_IRQ (29) | 53 | #define RBTX4927_RTL_8019_IRQ (29) |
54 | 54 | ||
55 | int toshiba_rbtx4927_irq_nested(int sw_irq); | ||
56 | |||
55 | #endif /* __ASM_TX4927_TOSHIBA_RBTX4927_H */ | 57 | #endif /* __ASM_TX4927_TOSHIBA_RBTX4927_H */ |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index ed16de0a6398..fa9a587b3bf1 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -340,16 +340,17 @@ | |||
340 | #define __NR_signalfd (__NR_Linux + 317) | 340 | #define __NR_signalfd (__NR_Linux + 317) |
341 | #define __NR_timerfd (__NR_Linux + 318) | 341 | #define __NR_timerfd (__NR_Linux + 318) |
342 | #define __NR_eventfd (__NR_Linux + 319) | 342 | #define __NR_eventfd (__NR_Linux + 319) |
343 | #define __NR_fallocate (__NR_Linux + 320) | ||
343 | 344 | ||
344 | /* | 345 | /* |
345 | * Offset of the last Linux o32 flavoured syscall | 346 | * Offset of the last Linux o32 flavoured syscall |
346 | */ | 347 | */ |
347 | #define __NR_Linux_syscalls 319 | 348 | #define __NR_Linux_syscalls 320 |
348 | 349 | ||
349 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 350 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
350 | 351 | ||
351 | #define __NR_O32_Linux 4000 | 352 | #define __NR_O32_Linux 4000 |
352 | #define __NR_O32_Linux_syscalls 319 | 353 | #define __NR_O32_Linux_syscalls 320 |
353 | 354 | ||
354 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 355 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
355 | 356 | ||
@@ -636,16 +637,17 @@ | |||
636 | #define __NR_signalfd (__NR_Linux + 276) | 637 | #define __NR_signalfd (__NR_Linux + 276) |
637 | #define __NR_timerfd (__NR_Linux + 277) | 638 | #define __NR_timerfd (__NR_Linux + 277) |
638 | #define __NR_eventfd (__NR_Linux + 278) | 639 | #define __NR_eventfd (__NR_Linux + 278) |
640 | #define __NR_fallocate (__NR_Linux + 279) | ||
639 | 641 | ||
640 | /* | 642 | /* |
641 | * Offset of the last Linux 64-bit flavoured syscall | 643 | * Offset of the last Linux 64-bit flavoured syscall |
642 | */ | 644 | */ |
643 | #define __NR_Linux_syscalls 278 | 645 | #define __NR_Linux_syscalls 279 |
644 | 646 | ||
645 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 647 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
646 | 648 | ||
647 | #define __NR_64_Linux 5000 | 649 | #define __NR_64_Linux 5000 |
648 | #define __NR_64_Linux_syscalls 278 | 650 | #define __NR_64_Linux_syscalls 279 |
649 | 651 | ||
650 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 652 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
651 | 653 | ||
@@ -936,16 +938,17 @@ | |||
936 | #define __NR_signalfd (__NR_Linux + 280) | 938 | #define __NR_signalfd (__NR_Linux + 280) |
937 | #define __NR_timerfd (__NR_Linux + 281) | 939 | #define __NR_timerfd (__NR_Linux + 281) |
938 | #define __NR_eventfd (__NR_Linux + 282) | 940 | #define __NR_eventfd (__NR_Linux + 282) |
941 | #define __NR_fallocate (__NR_Linux + 283) | ||
939 | 942 | ||
940 | /* | 943 | /* |
941 | * Offset of the last N32 flavoured syscall | 944 | * Offset of the last N32 flavoured syscall |
942 | */ | 945 | */ |
943 | #define __NR_Linux_syscalls 282 | 946 | #define __NR_Linux_syscalls 283 |
944 | 947 | ||
945 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 948 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
946 | 949 | ||
947 | #define __NR_N32_Linux 6000 | 950 | #define __NR_N32_Linux 6000 |
948 | #define __NR_N32_Linux_syscalls 282 | 951 | #define __NR_N32_Linux_syscalls 283 |
949 | 952 | ||
950 | #ifdef __KERNEL__ | 953 | #ifdef __KERNEL__ |
951 | 954 | ||
diff --git a/include/asm-mips/war.h b/include/asm-mips/war.h index 2883ccc69ed0..c0715d0a6b28 100644 --- a/include/asm-mips/war.h +++ b/include/asm-mips/war.h | |||
@@ -182,9 +182,8 @@ | |||
182 | * exceptions. | 182 | * exceptions. |
183 | */ | 183 | */ |
184 | #if defined(CONFIG_BASLER_EXCITE) || defined(CONFIG_MIPS_ATLAS) || \ | 184 | #if defined(CONFIG_BASLER_EXCITE) || defined(CONFIG_MIPS_ATLAS) || \ |
185 | defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MOMENCO_OCELOT) || \ | 185 | defined(CONFIG_MIPS_MALTA) || defined(CONFIG_PMC_YOSEMITE) || \ |
186 | defined(CONFIG_PMC_YOSEMITE) || defined(CONFIG_SGI_IP32) || \ | 186 | defined(CONFIG_SGI_IP32) || defined(CONFIG_WR_PPMC) |
187 | defined(CONFIG_WR_PPMC) | ||
188 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 | 187 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 |
189 | #endif | 188 | #endif |
190 | 189 | ||