diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-11 09:36:25 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-11 09:36:25 -0400 |
commit | a8931ef380c92d121ae74ecfb03b2d63f72eea6f (patch) | |
tree | 980fb6b019e11e6cb1ece55b7faff184721a8053 /include | |
parent | 90574d0a4d4b73308ae54a2a57a4f3f1fa98e984 (diff) | |
parent | e5a5816f7875207cb0a0a7032e39a4686c5e10a4 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include')
499 files changed, 4984 insertions, 4245 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 06480bcabfdc..06ebb6ef72aa 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -319,6 +319,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
319 | #endif /* CONFIG_CPU_FREQ */ | 319 | #endif /* CONFIG_CPU_FREQ */ |
320 | 320 | ||
321 | /* in processor_throttling.c */ | 321 | /* in processor_throttling.c */ |
322 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | ||
322 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 323 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
323 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 324 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
324 | extern struct file_operations acpi_processor_throttling_fops; | 325 | extern struct file_operations acpi_processor_throttling_fops; |
diff --git a/include/asm-alpha/barrier.h b/include/asm-alpha/barrier.h index 384dc08d6f53..ac78eba909bc 100644 --- a/include/asm-alpha/barrier.h +++ b/include/asm-alpha/barrier.h | |||
@@ -24,7 +24,7 @@ __asm__ __volatile__("mb": : :"memory") | |||
24 | #define smp_mb() barrier() | 24 | #define smp_mb() barrier() |
25 | #define smp_rmb() barrier() | 25 | #define smp_rmb() barrier() |
26 | #define smp_wmb() barrier() | 26 | #define smp_wmb() barrier() |
27 | #define smp_read_barrier_depends() barrier() | 27 | #define smp_read_barrier_depends() do { } while (0) |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define set_mb(var, value) \ | 30 | #define set_mb(var, value) \ |
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h index 525b4f6a7ace..acf55b483472 100644 --- a/include/asm-alpha/core_mcpcia.h +++ b/include/asm-alpha/core_mcpcia.h | |||
@@ -261,7 +261,7 @@ struct el_MCPCIA_uncorrected_frame_mcheck { | |||
261 | } | 261 | } |
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | static inline int __mcpcia_is_mmio(unsigned long addr) | 264 | extern inline int __mcpcia_is_mmio(unsigned long addr) |
265 | { | 265 | { |
266 | return (addr & 0x80000000UL) == 0; | 266 | return (addr & 0x80000000UL) == 0; |
267 | } | 267 | } |
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h index 90e6b5d6c214..46bfff58f670 100644 --- a/include/asm-alpha/core_t2.h +++ b/include/asm-alpha/core_t2.h | |||
@@ -356,13 +356,13 @@ struct el_t2_frame_corrected { | |||
356 | #define vip volatile int * | 356 | #define vip volatile int * |
357 | #define vuip volatile unsigned int * | 357 | #define vuip volatile unsigned int * |
358 | 358 | ||
359 | static inline u8 t2_inb(unsigned long addr) | 359 | extern inline u8 t2_inb(unsigned long addr) |
360 | { | 360 | { |
361 | long result = *(vip) ((addr << 5) + T2_IO + 0x00); | 361 | long result = *(vip) ((addr << 5) + T2_IO + 0x00); |
362 | return __kernel_extbl(result, addr & 3); | 362 | return __kernel_extbl(result, addr & 3); |
363 | } | 363 | } |
364 | 364 | ||
365 | static inline void t2_outb(u8 b, unsigned long addr) | 365 | extern inline void t2_outb(u8 b, unsigned long addr) |
366 | { | 366 | { |
367 | unsigned long w; | 367 | unsigned long w; |
368 | 368 | ||
@@ -371,13 +371,13 @@ static inline void t2_outb(u8 b, unsigned long addr) | |||
371 | mb(); | 371 | mb(); |
372 | } | 372 | } |
373 | 373 | ||
374 | static inline u16 t2_inw(unsigned long addr) | 374 | extern inline u16 t2_inw(unsigned long addr) |
375 | { | 375 | { |
376 | long result = *(vip) ((addr << 5) + T2_IO + 0x08); | 376 | long result = *(vip) ((addr << 5) + T2_IO + 0x08); |
377 | return __kernel_extwl(result, addr & 3); | 377 | return __kernel_extwl(result, addr & 3); |
378 | } | 378 | } |
379 | 379 | ||
380 | static inline void t2_outw(u16 b, unsigned long addr) | 380 | extern inline void t2_outw(u16 b, unsigned long addr) |
381 | { | 381 | { |
382 | unsigned long w; | 382 | unsigned long w; |
383 | 383 | ||
@@ -386,12 +386,12 @@ static inline void t2_outw(u16 b, unsigned long addr) | |||
386 | mb(); | 386 | mb(); |
387 | } | 387 | } |
388 | 388 | ||
389 | static inline u32 t2_inl(unsigned long addr) | 389 | extern inline u32 t2_inl(unsigned long addr) |
390 | { | 390 | { |
391 | return *(vuip) ((addr << 5) + T2_IO + 0x18); | 391 | return *(vuip) ((addr << 5) + T2_IO + 0x18); |
392 | } | 392 | } |
393 | 393 | ||
394 | static inline void t2_outl(u32 b, unsigned long addr) | 394 | extern inline void t2_outl(u32 b, unsigned long addr) |
395 | { | 395 | { |
396 | *(vuip) ((addr << 5) + T2_IO + 0x18) = b; | 396 | *(vuip) ((addr << 5) + T2_IO + 0x18) = b; |
397 | mb(); | 397 | mb(); |
@@ -435,7 +435,7 @@ static inline void t2_outl(u32 b, unsigned long addr) | |||
435 | set_hae(msb); \ | 435 | set_hae(msb); \ |
436 | } | 436 | } |
437 | 437 | ||
438 | static DEFINE_SPINLOCK(t2_hae_lock); | 438 | extern spinlock_t t2_hae_lock; |
439 | 439 | ||
440 | /* | 440 | /* |
441 | * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since | 441 | * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since |
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 38f18cf18c9d..e971ab000f95 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
@@ -35,7 +35,7 @@ | |||
35 | * register not being up-to-date with respect to the hardware | 35 | * register not being up-to-date with respect to the hardware |
36 | * value. | 36 | * value. |
37 | */ | 37 | */ |
38 | static inline void __set_hae(unsigned long new_hae) | 38 | extern inline void __set_hae(unsigned long new_hae) |
39 | { | 39 | { |
40 | unsigned long flags; | 40 | unsigned long flags; |
41 | local_irq_save(flags); | 41 | local_irq_save(flags); |
@@ -49,7 +49,7 @@ static inline void __set_hae(unsigned long new_hae) | |||
49 | local_irq_restore(flags); | 49 | local_irq_restore(flags); |
50 | } | 50 | } |
51 | 51 | ||
52 | static inline void set_hae(unsigned long new_hae) | 52 | extern inline void set_hae(unsigned long new_hae) |
53 | { | 53 | { |
54 | if (new_hae != alpha_mv.hae_cache) | 54 | if (new_hae != alpha_mv.hae_cache) |
55 | __set_hae(new_hae); | 55 | __set_hae(new_hae); |
@@ -176,7 +176,7 @@ REMAP2(u64, writeq, volatile) | |||
176 | #undef REMAP1 | 176 | #undef REMAP1 |
177 | #undef REMAP2 | 177 | #undef REMAP2 |
178 | 178 | ||
179 | static inline void __iomem *generic_ioportmap(unsigned long a) | 179 | extern inline void __iomem *generic_ioportmap(unsigned long a) |
180 | { | 180 | { |
181 | return alpha_mv.mv_ioportmap(a); | 181 | return alpha_mv.mv_ioportmap(a); |
182 | } | 182 | } |
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h index 6a5be1f7debf..86c08a02d239 100644 --- a/include/asm-alpha/mmu_context.h +++ b/include/asm-alpha/mmu_context.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | 25 | ||
26 | extern inline unsigned long | 26 | static inline unsigned long |
27 | __reload_thread(struct pcb_struct *pcb) | 27 | __reload_thread(struct pcb_struct *pcb) |
28 | { | 28 | { |
29 | register unsigned long a0 __asm__("$16"); | 29 | register unsigned long a0 __asm__("$16"); |
@@ -114,7 +114,7 @@ extern unsigned long last_asn; | |||
114 | #define __MMU_EXTERN_INLINE | 114 | #define __MMU_EXTERN_INLINE |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | static inline unsigned long | 117 | extern inline unsigned long |
118 | __get_new_mm_context(struct mm_struct *mm, long cpu) | 118 | __get_new_mm_context(struct mm_struct *mm, long cpu) |
119 | { | 119 | { |
120 | unsigned long asn = cpu_last_asn(cpu); | 120 | unsigned long asn = cpu_last_asn(cpu); |
@@ -226,7 +226,7 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) | |||
226 | # endif | 226 | # endif |
227 | #endif | 227 | #endif |
228 | 228 | ||
229 | extern inline int | 229 | static inline int |
230 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 230 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
231 | { | 231 | { |
232 | int i; | 232 | int i; |
diff --git a/include/asm-alpha/param.h b/include/asm-alpha/param.h index 0982f1d39499..e691ecfedb2c 100644 --- a/include/asm-alpha/param.h +++ b/include/asm-alpha/param.h | |||
@@ -5,8 +5,12 @@ | |||
5 | hardware ignores reprogramming. We also need userland buy-in to the | 5 | hardware ignores reprogramming. We also need userland buy-in to the |
6 | change in HZ, since this is visible in the wait4 resources etc. */ | 6 | change in HZ, since this is visible in the wait4 resources etc. */ |
7 | 7 | ||
8 | #ifdef __KERNEL__ | ||
8 | #define HZ CONFIG_HZ | 9 | #define HZ CONFIG_HZ |
9 | #define USER_HZ HZ | 10 | #define USER_HZ HZ |
11 | #else | ||
12 | #define HZ 1024 | ||
13 | #endif | ||
10 | 14 | ||
11 | #define EXEC_PAGESIZE 8192 | 15 | #define EXEC_PAGESIZE 8192 |
12 | 16 | ||
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h index 48348fe34c19..3495e8e00d70 100644 --- a/include/asm-alpha/percpu.h +++ b/include/asm-alpha/percpu.h | |||
@@ -1,6 +1,78 @@ | |||
1 | #ifndef __ALPHA_PERCPU_H | 1 | #ifndef __ALPHA_PERCPU_H |
2 | #define __ALPHA_PERCPU_H | 2 | #define __ALPHA_PERCPU_H |
3 | #include <linux/compiler.h> | ||
4 | #include <linux/threads.h> | ||
3 | 5 | ||
4 | #include <asm-generic/percpu.h> | 6 | /* |
7 | * Determine the real variable name from the name visible in the | ||
8 | * kernel sources. | ||
9 | */ | ||
10 | #define per_cpu_var(var) per_cpu__##var | ||
11 | |||
12 | #ifdef CONFIG_SMP | ||
13 | |||
14 | /* | ||
15 | * per_cpu_offset() is the offset that has to be added to a | ||
16 | * percpu variable to get to the instance for a certain processor. | ||
17 | */ | ||
18 | extern unsigned long __per_cpu_offset[NR_CPUS]; | ||
19 | |||
20 | #define per_cpu_offset(x) (__per_cpu_offset[x]) | ||
21 | |||
22 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | ||
23 | #ifdef CONFIG_DEBUG_PREEMPT | ||
24 | #define my_cpu_offset per_cpu_offset(smp_processor_id()) | ||
25 | #else | ||
26 | #define my_cpu_offset __my_cpu_offset | ||
27 | #endif | ||
28 | |||
29 | #ifndef MODULE | ||
30 | #define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset)) | ||
31 | #define PER_CPU_ATTRIBUTES | ||
32 | #else | ||
33 | /* | ||
34 | * To calculate addresses of locally defined variables, GCC uses 32-bit | ||
35 | * displacement from the GP. Which doesn't work for per cpu variables in | ||
36 | * modules, as an offset to the kernel per cpu area is way above 4G. | ||
37 | * | ||
38 | * This forces allocation of a GOT entry for per cpu variable using | ||
39 | * ldq instruction with a 'literal' relocation. | ||
40 | */ | ||
41 | #define SHIFT_PERCPU_PTR(var, offset) ({ \ | ||
42 | extern int simple_identifier_##var(void); \ | ||
43 | unsigned long __ptr, tmp_gp; \ | ||
44 | asm ( "br %1, 1f \n\ | ||
45 | 1: ldgp %1, 0(%1) \n\ | ||
46 | ldq %0, per_cpu__" #var"(%1)\t!literal" \ | ||
47 | : "=&r"(__ptr), "=&r"(tmp_gp)); \ | ||
48 | (typeof(&per_cpu_var(var)))(__ptr + (offset)); }) | ||
49 | |||
50 | #define PER_CPU_ATTRIBUTES __used | ||
51 | |||
52 | #endif /* MODULE */ | ||
53 | |||
54 | /* | ||
55 | * A percpu variable may point to a discarded regions. The following are | ||
56 | * established ways to produce a usable pointer from the percpu variable | ||
57 | * offset. | ||
58 | */ | ||
59 | #define per_cpu(var, cpu) \ | ||
60 | (*SHIFT_PERCPU_PTR(var, per_cpu_offset(cpu))) | ||
61 | #define __get_cpu_var(var) \ | ||
62 | (*SHIFT_PERCPU_PTR(var, my_cpu_offset)) | ||
63 | #define __raw_get_cpu_var(var) \ | ||
64 | (*SHIFT_PERCPU_PTR(var, __my_cpu_offset)) | ||
65 | |||
66 | #else /* ! SMP */ | ||
67 | |||
68 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var))) | ||
69 | #define __get_cpu_var(var) per_cpu_var(var) | ||
70 | #define __raw_get_cpu_var(var) per_cpu_var(var) | ||
71 | |||
72 | #define PER_CPU_ATTRIBUTES | ||
73 | |||
74 | #endif /* SMP */ | ||
75 | |||
76 | #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name) | ||
5 | 77 | ||
6 | #endif /* __ALPHA_PERCPU_H */ | 78 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 05ce5fba43e3..3f0c59f6d8aa 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h | |||
@@ -287,17 +287,34 @@ extern inline pte_t pte_mkspecial(pte_t pte) { return pte; } | |||
287 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) | 287 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) |
288 | #define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) | 288 | #define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) |
289 | 289 | ||
290 | /* | ||
291 | * The smp_read_barrier_depends() in the following functions are required to | ||
292 | * order the load of *dir (the pointer in the top level page table) with any | ||
293 | * subsequent load of the returned pmd_t *ret (ret is data dependent on *dir). | ||
294 | * | ||
295 | * If this ordering is not enforced, the CPU might load an older value of | ||
296 | * *ret, which may be uninitialized data. See mm/memory.c:__pte_alloc for | ||
297 | * more details. | ||
298 | * | ||
299 | * Note that we never change the mm->pgd pointer after the task is running, so | ||
300 | * pgd_offset does not require such a barrier. | ||
301 | */ | ||
302 | |||
290 | /* Find an entry in the second-level page table.. */ | 303 | /* Find an entry in the second-level page table.. */ |
291 | extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | 304 | extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) |
292 | { | 305 | { |
293 | return (pmd_t *) pgd_page_vaddr(*dir) + ((address >> PMD_SHIFT) & (PTRS_PER_PAGE - 1)); | 306 | pmd_t *ret = (pmd_t *) pgd_page_vaddr(*dir) + ((address >> PMD_SHIFT) & (PTRS_PER_PAGE - 1)); |
307 | smp_read_barrier_depends(); /* see above */ | ||
308 | return ret; | ||
294 | } | 309 | } |
295 | 310 | ||
296 | /* Find an entry in the third-level page table.. */ | 311 | /* Find an entry in the third-level page table.. */ |
297 | extern inline pte_t * pte_offset_kernel(pmd_t * dir, unsigned long address) | 312 | extern inline pte_t * pte_offset_kernel(pmd_t * dir, unsigned long address) |
298 | { | 313 | { |
299 | return (pte_t *) pmd_page_vaddr(*dir) | 314 | pte_t *ret = (pte_t *) pmd_page_vaddr(*dir) |
300 | + ((address >> PAGE_SHIFT) & (PTRS_PER_PAGE - 1)); | 315 | + ((address >> PAGE_SHIFT) & (PTRS_PER_PAGE - 1)); |
316 | smp_read_barrier_depends(); /* see above */ | ||
317 | return ret; | ||
301 | } | 318 | } |
302 | 319 | ||
303 | #define pte_offset_map(dir,addr) pte_offset_kernel((dir),(addr)) | 320 | #define pte_offset_map(dir,addr) pte_offset_kernel((dir),(addr)) |
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index ed221d6408fc..afe20fa58c99 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -184,7 +184,7 @@ enum amask_enum { | |||
184 | __amask; }) | 184 | __amask; }) |
185 | 185 | ||
186 | #define __CALL_PAL_R0(NAME, TYPE) \ | 186 | #define __CALL_PAL_R0(NAME, TYPE) \ |
187 | static inline TYPE NAME(void) \ | 187 | extern inline TYPE NAME(void) \ |
188 | { \ | 188 | { \ |
189 | register TYPE __r0 __asm__("$0"); \ | 189 | register TYPE __r0 __asm__("$0"); \ |
190 | __asm__ __volatile__( \ | 190 | __asm__ __volatile__( \ |
@@ -196,7 +196,7 @@ static inline TYPE NAME(void) \ | |||
196 | } | 196 | } |
197 | 197 | ||
198 | #define __CALL_PAL_W1(NAME, TYPE0) \ | 198 | #define __CALL_PAL_W1(NAME, TYPE0) \ |
199 | static inline void NAME(TYPE0 arg0) \ | 199 | extern inline void NAME(TYPE0 arg0) \ |
200 | { \ | 200 | { \ |
201 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 201 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
202 | __asm__ __volatile__( \ | 202 | __asm__ __volatile__( \ |
@@ -207,7 +207,7 @@ static inline void NAME(TYPE0 arg0) \ | |||
207 | } | 207 | } |
208 | 208 | ||
209 | #define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ | 209 | #define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ |
210 | static inline void NAME(TYPE0 arg0, TYPE1 arg1) \ | 210 | extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \ |
211 | { \ | 211 | { \ |
212 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 212 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
213 | register TYPE1 __r17 __asm__("$17") = arg1; \ | 213 | register TYPE1 __r17 __asm__("$17") = arg1; \ |
@@ -219,7 +219,7 @@ static inline void NAME(TYPE0 arg0, TYPE1 arg1) \ | |||
219 | } | 219 | } |
220 | 220 | ||
221 | #define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ | 221 | #define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ |
222 | static inline RTYPE NAME(TYPE0 arg0) \ | 222 | extern inline RTYPE NAME(TYPE0 arg0) \ |
223 | { \ | 223 | { \ |
224 | register RTYPE __r0 __asm__("$0"); \ | 224 | register RTYPE __r0 __asm__("$0"); \ |
225 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 225 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
@@ -232,7 +232,7 @@ static inline RTYPE NAME(TYPE0 arg0) \ | |||
232 | } | 232 | } |
233 | 233 | ||
234 | #define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ | 234 | #define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ |
235 | static inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ | 235 | extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ |
236 | { \ | 236 | { \ |
237 | register RTYPE __r0 __asm__("$0"); \ | 237 | register RTYPE __r0 __asm__("$0"); \ |
238 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 238 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
diff --git a/include/asm-alpha/types.h b/include/asm-alpha/types.h index f5716139ec89..c1541353ccef 100644 --- a/include/asm-alpha/types.h +++ b/include/asm-alpha/types.h | |||
@@ -8,28 +8,12 @@ | |||
8 | * not a major issue. However, for interoperability, libraries still | 8 | * not a major issue. However, for interoperability, libraries still |
9 | * need to be careful to avoid a name clashes. | 9 | * need to be careful to avoid a name clashes. |
10 | */ | 10 | */ |
11 | #include <asm-generic/int-l64.h> | ||
11 | 12 | ||
12 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
13 | 14 | ||
14 | typedef unsigned int umode_t; | 15 | typedef unsigned int umode_t; |
15 | 16 | ||
16 | /* | ||
17 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
18 | * header files exported to user space | ||
19 | */ | ||
20 | |||
21 | typedef __signed__ char __s8; | ||
22 | typedef unsigned char __u8; | ||
23 | |||
24 | typedef __signed__ short __s16; | ||
25 | typedef unsigned short __u16; | ||
26 | |||
27 | typedef __signed__ int __s32; | ||
28 | typedef unsigned int __u32; | ||
29 | |||
30 | typedef __signed__ long __s64; | ||
31 | typedef unsigned long __u64; | ||
32 | |||
33 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLY__ */ |
34 | 18 | ||
35 | /* | 19 | /* |
@@ -41,18 +25,6 @@ typedef unsigned long __u64; | |||
41 | 25 | ||
42 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
43 | 27 | ||
44 | typedef signed char s8; | ||
45 | typedef unsigned char u8; | ||
46 | |||
47 | typedef signed short s16; | ||
48 | typedef unsigned short u16; | ||
49 | |||
50 | typedef signed int s32; | ||
51 | typedef unsigned int u32; | ||
52 | |||
53 | typedef signed long s64; | ||
54 | typedef unsigned long u64; | ||
55 | |||
56 | typedef u64 dma_addr_t; | 28 | typedef u64 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 29 | typedef u64 dma64_addr_t; |
58 | 30 | ||
diff --git a/include/asm-alpha/vga.h b/include/asm-alpha/vga.h index e8df1e7aae6b..c00106bac521 100644 --- a/include/asm-alpha/vga.h +++ b/include/asm-alpha/vga.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define VT_BUF_HAVE_MEMSETW | 13 | #define VT_BUF_HAVE_MEMSETW |
14 | #define VT_BUF_HAVE_MEMCPYW | 14 | #define VT_BUF_HAVE_MEMCPYW |
15 | 15 | ||
16 | extern inline void scr_writew(u16 val, volatile u16 *addr) | 16 | static inline void scr_writew(u16 val, volatile u16 *addr) |
17 | { | 17 | { |
18 | if (__is_ioaddr(addr)) | 18 | if (__is_ioaddr(addr)) |
19 | __raw_writew(val, (volatile u16 __iomem *) addr); | 19 | __raw_writew(val, (volatile u16 __iomem *) addr); |
@@ -21,7 +21,7 @@ extern inline void scr_writew(u16 val, volatile u16 *addr) | |||
21 | *addr = val; | 21 | *addr = val; |
22 | } | 22 | } |
23 | 23 | ||
24 | extern inline u16 scr_readw(volatile const u16 *addr) | 24 | static inline u16 scr_readw(volatile const u16 *addr) |
25 | { | 25 | { |
26 | if (__is_ioaddr(addr)) | 26 | if (__is_ioaddr(addr)) |
27 | return __raw_readw((volatile const u16 __iomem *) addr); | 27 | return __raw_readw((volatile const u16 __iomem *) addr); |
@@ -29,7 +29,7 @@ extern inline u16 scr_readw(volatile const u16 *addr) | |||
29 | return *addr; | 29 | return *addr; |
30 | } | 30 | } |
31 | 31 | ||
32 | extern inline void scr_memsetw(u16 *s, u16 c, unsigned int count) | 32 | static inline void scr_memsetw(u16 *s, u16 c, unsigned int count) |
33 | { | 33 | { |
34 | if (__is_ioaddr(s)) | 34 | if (__is_ioaddr(s)) |
35 | memsetw_io((u16 __iomem *) s, c, count); | 35 | memsetw_io((u16 __iomem *) s, c, count); |
diff --git a/include/asm-arm/arch-at91/io.h b/include/asm-arm/arch-at91/io.h index 80073fd36b8e..f8beaa228467 100644 --- a/include/asm-arm/arch-at91/io.h +++ b/include/asm-arm/arch-at91/io.h | |||
@@ -21,8 +21,6 @@ | |||
21 | #ifndef __ASM_ARCH_IO_H | 21 | #ifndef __ASM_ARCH_IO_H |
22 | #define __ASM_ARCH_IO_H | 22 | #define __ASM_ARCH_IO_H |
23 | 23 | ||
24 | #include <asm/io.h> | ||
25 | |||
26 | #define IO_SPACE_LIMIT 0xFFFFFFFF | 24 | #define IO_SPACE_LIMIT 0xFFFFFFFF |
27 | 25 | ||
28 | #define __io(a) ((void __iomem *)(a)) | 26 | #define __io(a) ((void __iomem *)(a)) |
diff --git a/include/asm-arm/arch-omap/board-palmte.h b/include/asm-arm/arch-omap/board-palmte.h index cd22035a7160..6fac2c8935be 100644 --- a/include/asm-arm/arch-omap/board-palmte.h +++ b/include/asm-arm/arch-omap/board-palmte.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #ifndef __OMAP_BOARD_PALMTE_H | 14 | #ifndef __OMAP_BOARD_PALMTE_H |
15 | #define __OMAP_BOARD_PALMTE_H | 15 | #define __OMAP_BOARD_PALMTE_H |
16 | 16 | ||
17 | #include <asm/arch/gpio.h> | ||
18 | |||
19 | #define PALMTE_USBDETECT_GPIO 0 | 17 | #define PALMTE_USBDETECT_GPIO 0 |
20 | #define PALMTE_USB_OR_DC_GPIO 1 | 18 | #define PALMTE_USB_OR_DC_GPIO 1 |
21 | #define PALMTE_TSC_GPIO 4 | 19 | #define PALMTE_TSC_GPIO 4 |
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index 57523bdb642b..12a5e4de9518 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h | |||
@@ -73,6 +73,8 @@ struct clk { | |||
73 | #endif | 73 | #endif |
74 | }; | 74 | }; |
75 | 75 | ||
76 | struct cpufreq_frequency_table; | ||
77 | |||
76 | struct clk_functions { | 78 | struct clk_functions { |
77 | int (*clk_enable)(struct clk *clk); | 79 | int (*clk_enable)(struct clk *clk); |
78 | void (*clk_disable)(struct clk *clk); | 80 | void (*clk_disable)(struct clk *clk); |
@@ -83,6 +85,9 @@ struct clk_functions { | |||
83 | void (*clk_allow_idle)(struct clk *clk); | 85 | void (*clk_allow_idle)(struct clk *clk); |
84 | void (*clk_deny_idle)(struct clk *clk); | 86 | void (*clk_deny_idle)(struct clk *clk); |
85 | void (*clk_disable_unused)(struct clk *clk); | 87 | void (*clk_disable_unused)(struct clk *clk); |
88 | #ifdef CONFIG_CPU_FREQ | ||
89 | void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **); | ||
90 | #endif | ||
86 | }; | 91 | }; |
87 | 92 | ||
88 | extern unsigned int mpurate; | 93 | extern unsigned int mpurate; |
diff --git a/include/asm-arm/arch-omap/common.h b/include/asm-arm/arch-omap/common.h index 224e009e5296..36a3b62d4d8d 100644 --- a/include/asm-arm/arch-omap/common.h +++ b/include/asm-arm/arch-omap/common.h | |||
@@ -47,4 +47,8 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, | |||
47 | } | 47 | } |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | void omap2_set_globals_242x(void); | ||
51 | void omap2_set_globals_243x(void); | ||
52 | void omap2_set_globals_343x(void); | ||
53 | |||
50 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ | 54 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ |
diff --git a/include/asm-arm/arch-omap/control.h b/include/asm-arm/arch-omap/control.h index 9944bb5d5330..59c0686f8be7 100644 --- a/include/asm-arm/arch-omap/control.h +++ b/include/asm-arm/arch-omap/control.h | |||
@@ -80,7 +80,7 @@ | |||
80 | #define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064) | 80 | #define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064) |
81 | #define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c) | 81 | #define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c) |
82 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070) | 82 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070) |
83 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074 | 83 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074) |
84 | #define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) | 84 | #define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) |
85 | #define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) | 85 | #define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) |
86 | #define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088) | 86 | #define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088) |
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S index 74cd57221c8e..369093a45fcf 100644 --- a/include/asm-arm/arch-omap/entry-macro.S +++ b/include/asm-arm/arch-omap/entry-macro.S | |||
@@ -8,6 +8,7 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <asm/hardware.h> | 10 | #include <asm/hardware.h> |
11 | #include <asm/arch/io.h> | ||
11 | #include <asm/arch/irqs.h> | 12 | #include <asm/arch/irqs.h> |
12 | 13 | ||
13 | #if defined(CONFIG_ARCH_OMAP1) | 14 | #if defined(CONFIG_ARCH_OMAP1) |
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h index 86621a04cd8f..5ee6a49864c3 100644 --- a/include/asm-arm/arch-omap/gpio.h +++ b/include/asm-arm/arch-omap/gpio.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #ifndef __ASM_ARCH_OMAP_GPIO_H | 26 | #ifndef __ASM_ARCH_OMAP_GPIO_H |
27 | #define __ASM_ARCH_OMAP_GPIO_H | 27 | #define __ASM_ARCH_OMAP_GPIO_H |
28 | 28 | ||
29 | #include <asm/hardware.h> | ||
30 | #include <asm/arch/irqs.h> | 29 | #include <asm/arch/irqs.h> |
31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
32 | 31 | ||
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index da572092e255..91d85b3417b7 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/types.h> | 41 | #include <asm/types.h> |
42 | #include <asm/arch/cpu.h> | 42 | #include <asm/arch/cpu.h> |
43 | #endif | 43 | #endif |
44 | #include <asm/arch/io.h> | ||
45 | #include <asm/arch/serial.h> | 44 | #include <asm/arch/serial.h> |
46 | 45 | ||
47 | /* | 46 | /* |
diff --git a/include/asm-arm/arch-omap/mmc.h b/include/asm-arm/arch-omap/mmc.h index c9588f49eb52..7cfc5f258560 100644 --- a/include/asm-arm/arch-omap/mmc.h +++ b/include/asm-arm/arch-omap/mmc.h | |||
@@ -15,21 +15,16 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/mmc/host.h> | 16 | #include <linux/mmc/host.h> |
17 | 17 | ||
18 | #include <asm/arch/board.h> | ||
19 | |||
18 | #define OMAP_MMC_MAX_SLOTS 2 | 20 | #define OMAP_MMC_MAX_SLOTS 2 |
19 | 21 | ||
20 | struct omap_mmc_platform_data { | 22 | struct omap_mmc_platform_data { |
21 | struct omap_mmc_conf conf; | 23 | struct omap_mmc_conf conf; |
22 | 24 | ||
23 | unsigned enabled:1; | ||
24 | /* number of slots on board */ | 25 | /* number of slots on board */ |
25 | unsigned nr_slots:2; | 26 | unsigned nr_slots:2; |
26 | /* nomux means "standard" muxing is wrong on this board, and that | 27 | |
27 | * board-specific code handled it before common init logic. | ||
28 | */ | ||
29 | unsigned nomux:1; | ||
30 | /* 4 wire signaling is optional, and is only used for SD/SDIO and | ||
31 | * MMCv4 */ | ||
32 | unsigned wire4:1; | ||
33 | /* set if your board has components or wiring that limits the | 28 | /* set if your board has components or wiring that limits the |
34 | * maximum frequency on the MMC bus */ | 29 | * maximum frequency on the MMC bus */ |
35 | unsigned int max_freq; | 30 | unsigned int max_freq; |
@@ -40,6 +35,11 @@ struct omap_mmc_platform_data { | |||
40 | * not supported */ | 35 | * not supported */ |
41 | int (* init)(struct device *dev); | 36 | int (* init)(struct device *dev); |
42 | void (* cleanup)(struct device *dev); | 37 | void (* cleanup)(struct device *dev); |
38 | void (* shutdown)(struct device *dev); | ||
39 | |||
40 | /* To handle board related suspend/resume functionality for MMC */ | ||
41 | int (*suspend)(struct device *dev, int slot); | ||
42 | int (*resume)(struct device *dev, int slot); | ||
43 | 43 | ||
44 | struct omap_mmc_slot_data { | 44 | struct omap_mmc_slot_data { |
45 | int (* set_bus_mode)(struct device *dev, int slot, int bus_mode); | 45 | int (* set_bus_mode)(struct device *dev, int slot, int bus_mode); |
@@ -56,13 +56,19 @@ struct omap_mmc_platform_data { | |||
56 | 56 | ||
57 | const char *name; | 57 | const char *name; |
58 | u32 ocr_mask; | 58 | u32 ocr_mask; |
59 | |||
60 | /* Card detection IRQs */ | ||
61 | int card_detect_irq; | ||
62 | int (* card_detect)(int irq); | ||
63 | |||
64 | unsigned int ban_openended:1; | ||
65 | |||
59 | } slots[OMAP_MMC_MAX_SLOTS]; | 66 | } slots[OMAP_MMC_MAX_SLOTS]; |
60 | }; | 67 | }; |
61 | 68 | ||
62 | extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info); | 69 | extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info); |
63 | 70 | ||
64 | /* called from board-specific card detection service routine */ | 71 | /* called from board-specific card detection service routine */ |
65 | extern void omap_mmc_notify_card_detect(struct device *dev, int slot, int detected); | ||
66 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed); | 72 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed); |
67 | 73 | ||
68 | #endif | 74 | #endif |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa27x.h b/include/asm-arm/arch-pxa/mfp-pxa27x.h index eb6eaa174f8d..bc73ab84167c 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa27x.h +++ b/include/asm-arm/arch-pxa/mfp-pxa27x.h | |||
@@ -112,6 +112,7 @@ | |||
112 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) | 112 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) |
113 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) | 113 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) |
114 | #define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) | 114 | #define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) |
115 | #define GPIO104_PSKTSEL MFP_CFG_OUT(GPIO104, AF1, DRIVE_HIGH) | ||
115 | 116 | ||
116 | /* I2C */ | 117 | /* I2C */ |
117 | #define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) | 118 | #define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) |
diff --git a/include/asm-arm/arch-pxa/pm.h b/include/asm-arm/arch-pxa/pm.h index 9d9f4b54b2ce..261e5bc958db 100644 --- a/include/asm-arm/arch-pxa/pm.h +++ b/include/asm-arm/arch-pxa/pm.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/suspend.h> | 10 | #include <linux/suspend.h> |
11 | 11 | ||
12 | struct pxa_cpu_pm_fns { | 12 | struct pxa_cpu_pm_fns { |
13 | int save_size; | 13 | int save_count; |
14 | void (*save)(unsigned long *); | 14 | void (*save)(unsigned long *); |
15 | void (*restore)(unsigned long *); | 15 | void (*restore)(unsigned long *); |
16 | int (*valid)(suspend_state_t state); | 16 | int (*valid)(suspend_state_t state); |
diff --git a/include/asm-arm/arch-pxa/pxa2xx-gpio.h b/include/asm-arm/arch-pxa/pxa2xx-gpio.h index 763313c5e6be..b81cd63cb2eb 100644 --- a/include/asm-arm/arch-pxa/pxa2xx-gpio.h +++ b/include/asm-arm/arch-pxa/pxa2xx-gpio.h | |||
@@ -134,7 +134,11 @@ | |||
134 | #define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ | 134 | #define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ |
135 | #define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ | 135 | #define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ |
136 | #define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ | 136 | #define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ |
137 | #define GPIO96_FFRXD 96 /* FFUART recieve */ | ||
138 | #define GPIO98_FFRTS 98 /* FFUART request to send */ | ||
137 | #define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ | 139 | #define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ |
140 | #define GPIO99_FFTXD 99 /* FFUART transmit data */ | ||
141 | #define GPIO100_FFCTS 100 /* FFUART Clear to send */ | ||
138 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ | 142 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ |
139 | #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ | 143 | #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ |
140 | #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ | 144 | #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ |
@@ -316,6 +320,8 @@ | |||
316 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | 320 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) |
317 | #define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) | 321 | #define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) |
318 | #define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) | 322 | #define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) |
323 | #define GPIO88_USBH1_PWR_MD (88 | GPIO_ALT_FN_1_IN) | ||
324 | #define GPIO89_USBH1_PEN_MD (89 | GPIO_ALT_FN_2_OUT) | ||
319 | #define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) | 325 | #define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) |
320 | #define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) | 326 | #define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) |
321 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | 327 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) |
@@ -324,8 +330,11 @@ | |||
324 | #define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) | 330 | #define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) |
325 | #define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) | 331 | #define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) |
326 | #define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) | 332 | #define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) |
333 | #define GPIO96_FFRXD_MD (96 | GPIO_ALT_FN_3_IN) | ||
327 | #define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) | 334 | #define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) |
328 | #define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) | 335 | #define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) |
336 | #define GPIO98_FFRTS_MD (98 | GPIO_ALT_FN_3_OUT) | ||
337 | #define GPIO99_FFTXD_MD (99 | GPIO_ALT_FN_3_OUT) | ||
329 | #define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) | 338 | #define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) |
330 | #define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) | 339 | #define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) |
331 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) | 340 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) |
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h index f762493f5141..3ba464c913a5 100644 --- a/include/asm-arm/arch-pxa/regs-lcd.h +++ b/include/asm-arm/arch-pxa/regs-lcd.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef __ASM_ARCH_REGS_LCD_H | 1 | #ifndef __ASM_ARCH_REGS_LCD_H |
2 | #define __ASM_ARCH_REGS_LCD_H | 2 | #define __ASM_ARCH_REGS_LCD_H |
3 | |||
4 | #include <asm/arch/bitfield.h> | ||
5 | |||
3 | /* | 6 | /* |
4 | * LCD Controller Registers and Bits Definitions | 7 | * LCD Controller Registers and Bits Definitions |
5 | */ | 8 | */ |
@@ -69,7 +72,7 @@ | |||
69 | #define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ | 72 | #define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ |
70 | #define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ | 73 | #define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ |
71 | #define LCCR0_PDD_S 12 | 74 | #define LCCR0_PDD_S 12 |
72 | #define LCCR0_BM (1 << 20) /* Branch mask */ | 75 | #define LCCR0_BM (1 << 20) /* Branch mask */ |
73 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ | 76 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ |
74 | #define LCCR0_LCDT (1 << 22) /* LCD panel type */ | 77 | #define LCCR0_LCDT (1 << 22) /* LCD panel type */ |
75 | #define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ | 78 | #define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ |
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h index a758a719180f..9aa6c2e939e8 100644 --- a/include/asm-arm/arch-pxa/system.h +++ b/include/asm-arm/arch-pxa/system.h | |||
@@ -22,7 +22,8 @@ static inline void arch_idle(void) | |||
22 | 22 | ||
23 | static inline void arch_reset(char mode) | 23 | static inline void arch_reset(char mode) |
24 | { | 24 | { |
25 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | 25 | if (cpu_is_pxa2xx()) |
26 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
26 | 27 | ||
27 | if (mode == 's') { | 28 | if (mode == 's') { |
28 | /* Jump into ROM at address 0 */ | 29 | /* Jump into ROM at address 0 */ |
diff --git a/include/asm-arm/arch-sa1100/collie.h b/include/asm-arm/arch-sa1100/collie.h index 14a344aa3cc7..762eba535813 100644 --- a/include/asm-arm/arch-sa1100/collie.h +++ b/include/asm-arm/arch-sa1100/collie.h | |||
@@ -34,9 +34,12 @@ | |||
34 | 34 | ||
35 | #define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) | 35 | #define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) |
36 | #define COLLIE_GPIO_AC_IN GPIO_GPIO (1) | 36 | #define COLLIE_GPIO_AC_IN GPIO_GPIO (1) |
37 | #define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11) | ||
37 | #define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) | 38 | #define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) |
38 | #define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) | 39 | #define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) |
39 | #define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) | 40 | #define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) |
41 | #define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17) | ||
42 | #define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18) | ||
40 | #define COLLIE_GPIO_CO GPIO_GPIO (20) | 43 | #define COLLIE_GPIO_CO GPIO_GPIO (20) |
41 | #define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) | 44 | #define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) |
42 | #define COLLIE_GPIO_CF_CD GPIO_GPIO (22) | 45 | #define COLLIE_GPIO_CF_CD GPIO_GPIO (22) |
@@ -49,6 +52,7 @@ | |||
49 | 52 | ||
50 | #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 | 53 | #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 |
51 | #define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1 | 54 | #define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1 |
55 | #define COLLIE_IRQ_GPIO_SDIO_IRQ IRQ_GPIO11 | ||
52 | #define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14 | 56 | #define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14 |
53 | #define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15 | 57 | #define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15 |
54 | #define COLLIE_IRQ_GPIO_CO IRQ_GPIO20 | 58 | #define COLLIE_IRQ_GPIO_CO IRQ_GPIO20 |
diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h index d7940683efb1..7bf80484bb77 100644 --- a/include/asm-arm/arch-sa1100/irqs.h +++ b/include/asm-arm/arch-sa1100/irqs.h | |||
@@ -141,7 +141,7 @@ | |||
141 | #define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17) | 141 | #define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17) |
142 | #define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18) | 142 | #define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18) |
143 | #define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19) | 143 | #define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19) |
144 | #define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20) | 144 | #define IRQ_LOCOMO_SPI_REND (IRQ_BOARD_END + 20) |
145 | #define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) | 145 | #define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) |
146 | 146 | ||
147 | /* | 147 | /* |
diff --git a/include/asm-arm/hardware/locomo.h b/include/asm-arm/hardware/locomo.h index adab77780ed3..fb0645de6f31 100644 --- a/include/asm-arm/hardware/locomo.h +++ b/include/asm-arm/hardware/locomo.h | |||
@@ -58,6 +58,11 @@ | |||
58 | #define LOCOMO_SPIMD 0x00 /* SPI mode setting */ | 58 | #define LOCOMO_SPIMD 0x00 /* SPI mode setting */ |
59 | #define LOCOMO_SPICT 0x04 /* SPI mode control */ | 59 | #define LOCOMO_SPICT 0x04 /* SPI mode control */ |
60 | #define LOCOMO_SPIST 0x08 /* SPI status */ | 60 | #define LOCOMO_SPIST 0x08 /* SPI status */ |
61 | #define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ | ||
62 | #define LOCOMO_SPI_REND (1 << 2) /* Receive end bit */ | ||
63 | #define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ | ||
64 | #define LOCOMO_SPI_RFR (1) /* read buffer bit */ | ||
65 | |||
61 | #define LOCOMO_SPIIS 0x10 /* SPI interrupt status */ | 66 | #define LOCOMO_SPIIS 0x10 /* SPI interrupt status */ |
62 | #define LOCOMO_SPIWE 0x14 /* SPI interrupt status write enable */ | 67 | #define LOCOMO_SPIWE 0x14 /* SPI interrupt status write enable */ |
63 | #define LOCOMO_SPIIE 0x18 /* SPI interrupt enable */ | 68 | #define LOCOMO_SPIIE 0x18 /* SPI interrupt enable */ |
@@ -66,16 +71,12 @@ | |||
66 | #define LOCOMO_SPIRD 0x24 /* SPI receive data read */ | 71 | #define LOCOMO_SPIRD 0x24 /* SPI receive data read */ |
67 | #define LOCOMO_SPITS 0x28 /* SPI transfer data shift */ | 72 | #define LOCOMO_SPITS 0x28 /* SPI transfer data shift */ |
68 | #define LOCOMO_SPIRS 0x2C /* SPI receive data shift */ | 73 | #define LOCOMO_SPIRS 0x2C /* SPI receive data shift */ |
69 | #define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ | ||
70 | #define LOCOMO_SPI_OVRN (1 << 2) /* Over Run bit */ | ||
71 | #define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ | ||
72 | #define LOCOMO_SPI_RFR (1) /* read buffer bit */ | ||
73 | 74 | ||
74 | /* GPIO */ | 75 | /* GPIO */ |
75 | #define LOCOMO_GPD 0x90 /* GPIO direction */ | 76 | #define LOCOMO_GPD 0x90 /* GPIO direction */ |
76 | #define LOCOMO_GPE 0x94 /* GPIO input enable */ | 77 | #define LOCOMO_GPE 0x94 /* GPIO input enable */ |
77 | #define LOCOMO_GPL 0x98 /* GPIO level */ | 78 | #define LOCOMO_GPL 0x98 /* GPIO level */ |
78 | #define LOCOMO_GPO 0x9c /* GPIO out data setteing */ | 79 | #define LOCOMO_GPO 0x9c /* GPIO out data setting */ |
79 | #define LOCOMO_GRIE 0xa0 /* GPIO rise detection */ | 80 | #define LOCOMO_GRIE 0xa0 /* GPIO rise detection */ |
80 | #define LOCOMO_GFIE 0xa4 /* GPIO fall detection */ | 81 | #define LOCOMO_GFIE 0xa4 /* GPIO fall detection */ |
81 | #define LOCOMO_GIS 0xa8 /* GPIO edge detection status */ | 82 | #define LOCOMO_GIS 0xa8 /* GPIO edge detection status */ |
@@ -96,6 +97,9 @@ | |||
96 | #define LOCOMO_GPIO_DAC_SDATA LOCOMO_GPIO(10) | 97 | #define LOCOMO_GPIO_DAC_SDATA LOCOMO_GPIO(10) |
97 | #define LOCOMO_GPIO_DAC_SCK LOCOMO_GPIO(11) | 98 | #define LOCOMO_GPIO_DAC_SCK LOCOMO_GPIO(11) |
98 | #define LOCOMO_GPIO_DAC_SLOAD LOCOMO_GPIO(12) | 99 | #define LOCOMO_GPIO_DAC_SLOAD LOCOMO_GPIO(12) |
100 | #define LOCOMO_GPIO_CARD_DETECT LOCOMO_GPIO(13) | ||
101 | #define LOCOMO_GPIO_WRITE_PROT LOCOMO_GPIO(14) | ||
102 | #define LOCOMO_GPIO_CARD_POWER LOCOMO_GPIO(15) | ||
99 | 103 | ||
100 | /* Start the definitions of the devices. Each device has an initial | 104 | /* Start the definitions of the devices. Each device has an initial |
101 | * base address and a series of offsets from that base address. */ | 105 | * base address and a series of offsets from that base address. */ |
@@ -122,7 +126,7 @@ | |||
122 | /* Audio controller */ | 126 | /* Audio controller */ |
123 | #define LOCOMO_AUDIO 0x54 | 127 | #define LOCOMO_AUDIO 0x54 |
124 | #define LOCOMO_ACC 0x00 /* Audio clock */ | 128 | #define LOCOMO_ACC 0x00 /* Audio clock */ |
125 | #define LOCOMO_PAIF 0x7C /* PCM audio interface */ | 129 | #define LOCOMO_PAIF 0xD0 /* PCM audio interface */ |
126 | /* Audio clock */ | 130 | /* Audio clock */ |
127 | #define LOCOMO_ACC_XON 0x80 | 131 | #define LOCOMO_ACC_XON 0x80 |
128 | #define LOCOMO_ACC_XEN 0x40 | 132 | #define LOCOMO_ACC_XEN 0x40 |
@@ -162,7 +166,7 @@ extern struct bus_type locomo_bus_type; | |||
162 | #define LOCOMO_DEVID_AUDIO 3 | 166 | #define LOCOMO_DEVID_AUDIO 3 |
163 | #define LOCOMO_DEVID_LED 4 | 167 | #define LOCOMO_DEVID_LED 4 |
164 | #define LOCOMO_DEVID_UART 5 | 168 | #define LOCOMO_DEVID_UART 5 |
165 | #define LOCOMO_DEVID_SPI 6 | 169 | #define LOCOMO_DEVID_SPI 6 |
166 | 170 | ||
167 | struct locomo_dev { | 171 | struct locomo_dev { |
168 | struct device dev; | 172 | struct device dev; |
@@ -204,7 +208,6 @@ int locomo_gpio_read_level(struct device *dev, unsigned int bits); | |||
204 | int locomo_gpio_read_output(struct device *dev, unsigned int bits); | 208 | int locomo_gpio_read_output(struct device *dev, unsigned int bits); |
205 | void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set); | 209 | void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set); |
206 | 210 | ||
207 | |||
208 | /* M62332 control function */ | 211 | /* M62332 control function */ |
209 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); | 212 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); |
210 | 213 | ||
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 5c22b0112106..8e05bdb5f12f 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -179,10 +179,10 @@ typedef unsigned long pgprot_t; | |||
179 | 179 | ||
180 | #endif /* STRICT_MM_TYPECHECKS */ | 180 | #endif /* STRICT_MM_TYPECHECKS */ |
181 | 181 | ||
182 | typedef struct page *pgtable_t; | ||
183 | |||
184 | #endif /* CONFIG_MMU */ | 182 | #endif /* CONFIG_MMU */ |
185 | 183 | ||
184 | typedef struct page *pgtable_t; | ||
185 | |||
186 | #include <asm/memory.h> | 186 | #include <asm/memory.h> |
187 | 187 | ||
188 | #endif /* !__ASSEMBLY__ */ | 188 | #endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h index 2e5868bbe03b..386fcc10a973 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/io.h> | ||
20 | 19 | ||
21 | /* | 20 | /* |
22 | * Trivial page table functions. | 21 | * Trivial page table functions. |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 800ba5254daf..2b41ebbfa7ff 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | /* write_can_lock - would write_trylock() succeed? */ | 144 | /* write_can_lock - would write_trylock() succeed? */ |
145 | #define __raw_write_can_lock(x) ((x)->lock == 0x80000000) | 145 | #define __raw_write_can_lock(x) ((x)->lock == 0) |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * Read locks are a bit more hairy: | 148 | * Read locks are a bit more hairy: |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 6335de9a2bb3..514af792a598 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -48,20 +48,6 @@ | |||
48 | #define CPUID_TCM 2 | 48 | #define CPUID_TCM 2 |
49 | #define CPUID_TLBTYPE 3 | 49 | #define CPUID_TLBTYPE 3 |
50 | 50 | ||
51 | #ifdef CONFIG_CPU_CP15 | ||
52 | #define read_cpuid(reg) \ | ||
53 | ({ \ | ||
54 | unsigned int __val; \ | ||
55 | asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \ | ||
56 | : "=r" (__val) \ | ||
57 | : \ | ||
58 | : "cc"); \ | ||
59 | __val; \ | ||
60 | }) | ||
61 | #else | ||
62 | #define read_cpuid(reg) (processor_id) | ||
63 | #endif | ||
64 | |||
65 | /* | 51 | /* |
66 | * This is used to ensure the compiler did actually allocate the register we | 52 | * This is used to ensure the compiler did actually allocate the register we |
67 | * asked it for some inline assembly sequences. Apparently we can't trust | 53 | * asked it for some inline assembly sequences. Apparently we can't trust |
@@ -78,6 +64,21 @@ | |||
78 | #include <linux/stringify.h> | 64 | #include <linux/stringify.h> |
79 | #include <linux/irqflags.h> | 65 | #include <linux/irqflags.h> |
80 | 66 | ||
67 | #ifdef CONFIG_CPU_CP15 | ||
68 | #define read_cpuid(reg) \ | ||
69 | ({ \ | ||
70 | unsigned int __val; \ | ||
71 | asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \ | ||
72 | : "=r" (__val) \ | ||
73 | : \ | ||
74 | : "cc"); \ | ||
75 | __val; \ | ||
76 | }) | ||
77 | #else | ||
78 | extern unsigned int processor_id; | ||
79 | #define read_cpuid(reg) (processor_id) | ||
80 | #endif | ||
81 | |||
81 | /* | 82 | /* |
82 | * The CPU ID never changes at run time, so we might as well tell the | 83 | * The CPU ID never changes at run time, so we might as well tell the |
83 | * compiler that it's constant. Use this function to read the CPU ID | 84 | * compiler that it's constant. Use this function to read the CPU ID |
diff --git a/include/asm-arm/types.h b/include/asm-arm/types.h index 3141451a9bd6..345df01534a4 100644 --- a/include/asm-arm/types.h +++ b/include/asm-arm/types.h | |||
@@ -1,29 +1,12 @@ | |||
1 | #ifndef __ASM_ARM_TYPES_H | 1 | #ifndef __ASM_ARM_TYPES_H |
2 | #define __ASM_ARM_TYPES_H | 2 | #define __ASM_ARM_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
5 | 7 | ||
6 | typedef unsigned short umode_t; | 8 | typedef unsigned short umode_t; |
7 | 9 | ||
8 | /* | ||
9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
10 | * header files exported to user space | ||
11 | */ | ||
12 | |||
13 | typedef __signed__ char __s8; | ||
14 | typedef unsigned char __u8; | ||
15 | |||
16 | typedef __signed__ short __s16; | ||
17 | typedef unsigned short __u16; | ||
18 | |||
19 | typedef __signed__ int __s32; | ||
20 | typedef unsigned int __u32; | ||
21 | |||
22 | #if defined(__GNUC__) | ||
23 | __extension__ typedef __signed__ long long __s64; | ||
24 | __extension__ typedef unsigned long long __u64; | ||
25 | #endif | ||
26 | |||
27 | #endif /* __ASSEMBLY__ */ | 10 | #endif /* __ASSEMBLY__ */ |
28 | 11 | ||
29 | /* | 12 | /* |
@@ -35,18 +18,6 @@ __extension__ typedef unsigned long long __u64; | |||
35 | 18 | ||
36 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
37 | 20 | ||
38 | typedef signed char s8; | ||
39 | typedef unsigned char u8; | ||
40 | |||
41 | typedef signed short s16; | ||
42 | typedef unsigned short u16; | ||
43 | |||
44 | typedef signed int s32; | ||
45 | typedef unsigned int u32; | ||
46 | |||
47 | typedef signed long long s64; | ||
48 | typedef unsigned long long u64; | ||
49 | |||
50 | /* Dma addresses are 32-bits wide. */ | 21 | /* Dma addresses are 32-bits wide. */ |
51 | 22 | ||
52 | typedef u32 dma_addr_t; | 23 | typedef u32 dma_addr_t; |
diff --git a/include/asm-avr32/types.h b/include/asm-avr32/types.h index 8999a3819403..9cefda6f534a 100644 --- a/include/asm-avr32/types.h +++ b/include/asm-avr32/types.h | |||
@@ -8,28 +8,12 @@ | |||
8 | #ifndef __ASM_AVR32_TYPES_H | 8 | #ifndef __ASM_AVR32_TYPES_H |
9 | #define __ASM_AVR32_TYPES_H | 9 | #define __ASM_AVR32_TYPES_H |
10 | 10 | ||
11 | #include <asm-generic/int-ll64.h> | ||
12 | |||
11 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
12 | 14 | ||
13 | typedef unsigned short umode_t; | 15 | typedef unsigned short umode_t; |
14 | 16 | ||
15 | /* | ||
16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
17 | * header files exported to user space | ||
18 | */ | ||
19 | typedef __signed__ char __s8; | ||
20 | typedef unsigned char __u8; | ||
21 | |||
22 | typedef __signed__ short __s16; | ||
23 | typedef unsigned short __u16; | ||
24 | |||
25 | typedef __signed__ int __s32; | ||
26 | typedef unsigned int __u32; | ||
27 | |||
28 | #if defined(__GNUC__) | ||
29 | __extension__ typedef __signed__ long long __s64; | ||
30 | __extension__ typedef unsigned long long __u64; | ||
31 | #endif | ||
32 | |||
33 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLY__ */ |
34 | 18 | ||
35 | /* | 19 | /* |
@@ -41,18 +25,6 @@ __extension__ typedef unsigned long long __u64; | |||
41 | 25 | ||
42 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
43 | 27 | ||
44 | typedef signed char s8; | ||
45 | typedef unsigned char u8; | ||
46 | |||
47 | typedef signed short s16; | ||
48 | typedef unsigned short u16; | ||
49 | |||
50 | typedef signed int s32; | ||
51 | typedef unsigned int u32; | ||
52 | |||
53 | typedef signed long long s64; | ||
54 | typedef unsigned long long u64; | ||
55 | |||
56 | /* Dma addresses are 32-bits wide. */ | 28 | /* Dma addresses are 32-bits wide. */ |
57 | 29 | ||
58 | typedef u32 dma_addr_t; | 30 | typedef u32 dma_addr_t; |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 716df7c85923..76033831eb35 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -37,7 +37,9 @@ | |||
37 | #include <linux/linkage.h> | 37 | #include <linux/linkage.h> |
38 | #include <linux/types.h> | 38 | #include <linux/types.h> |
39 | 39 | ||
40 | #if defined(CONFIG_DMA_UNCACHED_2M) | 40 | #if defined(CONFIG_DMA_UNCACHED_4M) |
41 | # define DMA_UNCACHED_REGION (4 * 1024 * 1024) | ||
42 | #elif defined(CONFIG_DMA_UNCACHED_2M) | ||
41 | # define DMA_UNCACHED_REGION (2 * 1024 * 1024) | 43 | # define DMA_UNCACHED_REGION (2 * 1024 * 1024) |
42 | #elif defined(CONFIG_DMA_UNCACHED_1M) | 44 | #elif defined(CONFIG_DMA_UNCACHED_1M) |
43 | # define DMA_UNCACHED_REGION (1024 * 1024) | 45 | # define DMA_UNCACHED_REGION (1024 * 1024) |
@@ -103,13 +105,6 @@ extern int sram_free(const void*); | |||
103 | extern void *sram_alloc_with_lsl(size_t, unsigned long); | 105 | extern void *sram_alloc_with_lsl(size_t, unsigned long); |
104 | extern int sram_free_with_lsl(const void*); | 106 | extern int sram_free_with_lsl(const void*); |
105 | 107 | ||
106 | extern void led_on(int); | ||
107 | extern void led_off(int); | ||
108 | extern void led_toggle(int); | ||
109 | extern void led_disp_num(int); | ||
110 | extern void led_toggle_num(int); | ||
111 | extern void init_leds(void); | ||
112 | |||
113 | extern const char bfin_board_name[]; | 108 | extern const char bfin_board_name[]; |
114 | extern unsigned long wall_jiffies; | 109 | extern unsigned long wall_jiffies; |
115 | 110 | ||
diff --git a/include/asm-blackfin/checksum.h b/include/asm-blackfin/checksum.h index 2638f2586d2f..6f6af2b8e9e0 100644 --- a/include/asm-blackfin/checksum.h +++ b/include/asm-blackfin/checksum.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * | 15 | * |
16 | * it's best to have buff aligned on a 32-bit boundary | 16 | * it's best to have buff aligned on a 32-bit boundary |
17 | */ | 17 | */ |
18 | unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); | 18 | __wsum csum_partial(const void *buff, int len, __wsum sum); |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * the same as csum_partial, but copies from src while it | 21 | * the same as csum_partial, but copies from src while it |
@@ -25,8 +25,8 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); | |||
25 | * better 64-bit) boundary | 25 | * better 64-bit) boundary |
26 | */ | 26 | */ |
27 | 27 | ||
28 | unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, | 28 | __wsum csum_partial_copy(const void *src, void *dst, |
29 | int len, int sum); | 29 | int len, __wsum sum); |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * the same as csum_partial_copy, but copies from user space. | 32 | * the same as csum_partial_copy, but copies from user space. |
@@ -35,20 +35,19 @@ unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, | |||
35 | * better 64-bit) boundary | 35 | * better 64-bit) boundary |
36 | */ | 36 | */ |
37 | 37 | ||
38 | extern unsigned int csum_partial_copy_from_user(const unsigned char *src, | 38 | extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, |
39 | unsigned char *dst, int len, | 39 | int len, __wsum sum, int *csum_err); |
40 | int sum, int *csum_err); | ||
41 | 40 | ||
42 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | 41 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ |
43 | csum_partial_copy((src), (dst), (len), (sum)) | 42 | csum_partial_copy((src), (dst), (len), (sum)) |
44 | 43 | ||
45 | unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl); | 44 | __sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl); |
46 | 45 | ||
47 | /* | 46 | /* |
48 | * Fold a partial checksum | 47 | * Fold a partial checksum |
49 | */ | 48 | */ |
50 | 49 | ||
51 | static inline unsigned int csum_fold(unsigned int sum) | 50 | static inline __sum16 csum_fold(__wsum sum) |
52 | { | 51 | { |
53 | while (sum >> 16) | 52 | while (sum >> 16) |
54 | sum = (sum & 0xffff) + (sum >> 16); | 53 | sum = (sum & 0xffff) + (sum >> 16); |
@@ -60,9 +59,9 @@ static inline unsigned int csum_fold(unsigned int sum) | |||
60 | * returns a 16-bit checksum, already complemented | 59 | * returns a 16-bit checksum, already complemented |
61 | */ | 60 | */ |
62 | 61 | ||
63 | static inline unsigned int | 62 | static inline __wsum |
64 | csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, | 63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, |
65 | unsigned short proto, unsigned int sum) | 64 | unsigned short proto, __wsum sum) |
66 | { | 65 | { |
67 | 66 | ||
68 | __asm__ ("%0 = %0 + %1;\n\t" | 67 | __asm__ ("%0 = %0 + %1;\n\t" |
@@ -84,9 +83,9 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, | |||
84 | return (sum); | 83 | return (sum); |
85 | } | 84 | } |
86 | 85 | ||
87 | static inline unsigned short int | 86 | static inline __sum16 |
88 | csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, | 87 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, |
89 | unsigned short proto, unsigned int sum) | 88 | unsigned short proto, __wsum sum) |
90 | { | 89 | { |
91 | return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); | 90 | return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); |
92 | } | 91 | } |
@@ -96,6 +95,6 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, | |||
96 | * in icmp.c | 95 | * in icmp.c |
97 | */ | 96 | */ |
98 | 97 | ||
99 | extern unsigned short ip_compute_csum(const unsigned char *buff, int len); | 98 | extern __sum16 ip_compute_csum(const void *buff, int len); |
100 | 99 | ||
101 | #endif /* _BFIN_CHECKSUM_H */ | 100 | #endif /* _BFIN_CHECKSUM_H */ |
diff --git a/include/asm-blackfin/dpmc.h b/include/asm-blackfin/dpmc.h index 686cf83a5269..7f34cd384f12 100644 --- a/include/asm-blackfin/dpmc.h +++ b/include/asm-blackfin/dpmc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-blackfin/dpmc.h - Miscellaneous IOCTL commands for Dynamic Power | 2 | * include/asm-blackfin/dpmc.h - Miscellaneous IOCTL commands for Dynamic Power |
3 | * Management Controller Driver. | 3 | * Management Controller Driver. |
4 | * Copyright (C) 2004 Analog Device Inc. | 4 | * Copyright (C) 2004-2008 Analog Device Inc. |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #ifndef _BLACKFIN_DPMC_H_ | 7 | #ifndef _BLACKFIN_DPMC_H_ |
@@ -65,6 +65,14 @@ void disable_wdog_timer(void); | |||
65 | extern unsigned long get_cclk(void); | 65 | extern unsigned long get_cclk(void); |
66 | extern unsigned long get_sclk(void); | 66 | extern unsigned long get_sclk(void); |
67 | 67 | ||
68 | struct bfin_dpmc_platform_data { | ||
69 | const unsigned int *tuple_tab; | ||
70 | unsigned short tabsize; | ||
71 | unsigned short vr_settling_time; /* in us */ | ||
72 | }; | ||
73 | |||
74 | #define VRPAIR(vlev, freq) (((vlev) << 16) | ((freq) >> 16)) | ||
75 | |||
68 | #endif /* __KERNEL__ */ | 76 | #endif /* __KERNEL__ */ |
69 | 77 | ||
70 | #endif /*_BLACKFIN_DPMC_H_*/ | 78 | #endif /*_BLACKFIN_DPMC_H_*/ |
diff --git a/include/asm-blackfin/entry.h b/include/asm-blackfin/entry.h index 562c6d3a3232..c4f721e0d00d 100644 --- a/include/asm-blackfin/entry.h +++ b/include/asm-blackfin/entry.h | |||
@@ -17,6 +17,11 @@ | |||
17 | #define PF_DTRACE_OFF 1 | 17 | #define PF_DTRACE_OFF 1 |
18 | #define PF_DTRACE_BIT 5 | 18 | #define PF_DTRACE_BIT 5 |
19 | 19 | ||
20 | /* | ||
21 | * NOTE! The single-stepping code assumes that all interrupt handlers | ||
22 | * start by saving SYSCFG on the stack with their first instruction. | ||
23 | */ | ||
24 | |||
20 | /* This one is used for exceptions, emulation, and NMI. It doesn't push | 25 | /* This one is used for exceptions, emulation, and NMI. It doesn't push |
21 | RETI and doesn't do cli. */ | 26 | RETI and doesn't do cli. */ |
22 | #define SAVE_ALL_SYS save_context_no_interrupts | 27 | #define SAVE_ALL_SYS save_context_no_interrupts |
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index 27ff532a806c..ff95e9d88342 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h | |||
@@ -437,7 +437,6 @@ void gpio_set_value(unsigned gpio, int arg); | |||
437 | int gpio_get_value(unsigned gpio); | 437 | int gpio_get_value(unsigned gpio); |
438 | 438 | ||
439 | #ifndef BF548_FAMILY | 439 | #ifndef BF548_FAMILY |
440 | #define gpio_get_value(gpio) get_gpio_data(gpio) | ||
441 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) | 440 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) |
442 | #endif | 441 | #endif |
443 | 442 | ||
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index 574fe56989d1..cbbf7ffdbbff 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h | |||
@@ -117,10 +117,12 @@ static inline unsigned int readl(const volatile void __iomem *addr) | |||
117 | 117 | ||
118 | extern void outsb(unsigned long port, const void *addr, unsigned long count); | 118 | extern void outsb(unsigned long port, const void *addr, unsigned long count); |
119 | extern void outsw(unsigned long port, const void *addr, unsigned long count); | 119 | extern void outsw(unsigned long port, const void *addr, unsigned long count); |
120 | extern void outsw_8(unsigned long port, const void *addr, unsigned long count); | ||
120 | extern void outsl(unsigned long port, const void *addr, unsigned long count); | 121 | extern void outsl(unsigned long port, const void *addr, unsigned long count); |
121 | 122 | ||
122 | extern void insb(unsigned long port, void *addr, unsigned long count); | 123 | extern void insb(unsigned long port, void *addr, unsigned long count); |
123 | extern void insw(unsigned long port, void *addr, unsigned long count); | 124 | extern void insw(unsigned long port, void *addr, unsigned long count); |
125 | extern void insw_8(unsigned long port, void *addr, unsigned long count); | ||
124 | extern void insl(unsigned long port, void *addr, unsigned long count); | 126 | extern void insl(unsigned long port, void *addr, unsigned long count); |
125 | extern void insl_16(unsigned long port, void *addr, unsigned long count); | 127 | extern void insl_16(unsigned long port, void *addr, unsigned long count); |
126 | 128 | ||
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h index 735fa02fafb2..4725268a5ada 100644 --- a/include/asm-blackfin/mach-bf527/anomaly.h +++ b/include/asm-blackfin/mach-bf527/anomaly.h | |||
@@ -15,12 +15,16 @@ | |||
15 | 15 | ||
16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ | 16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ |
17 | #define ANOMALY_05000074 (1) | 17 | #define ANOMALY_05000074 (1) |
18 | /* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ | ||
19 | #define ANOMALY_05000119 (1) | ||
18 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ | 20 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ |
19 | #define ANOMALY_05000122 (1) | 21 | #define ANOMALY_05000122 (1) |
20 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ | 22 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ |
21 | #define ANOMALY_05000245 (1) | 23 | #define ANOMALY_05000245 (1) |
22 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ | 24 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ |
23 | #define ANOMALY_05000265 (1) | 25 | #define ANOMALY_05000265 (1) |
26 | /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | ||
27 | #define ANOMALY_05000312 (1) | ||
24 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 28 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
25 | #define ANOMALY_05000328 (1) | 29 | #define ANOMALY_05000328 (1) |
26 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 30 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
@@ -92,7 +96,6 @@ | |||
92 | #define ANOMALY_05000266 (0) | 96 | #define ANOMALY_05000266 (0) |
93 | #define ANOMALY_05000273 (0) | 97 | #define ANOMALY_05000273 (0) |
94 | #define ANOMALY_05000311 (0) | 98 | #define ANOMALY_05000311 (0) |
95 | #define ANOMALY_05000312 (0) | ||
96 | #define ANOMALY_05000323 (0) | 99 | #define ANOMALY_05000323 (0) |
97 | #define ANOMALY_05000363 (0) | 100 | #define ANOMALY_05000363 (0) |
98 | 101 | ||
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h index f0ab2736a680..2526b6ed6faa 100644 --- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | |||
@@ -44,10 +44,21 @@ | |||
44 | #define UART_PUT_CHAR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_THR), v) | 44 | #define UART_PUT_CHAR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_THR), v) |
45 | #define UART_PUT_DLL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLL), v) | 45 | #define UART_PUT_DLL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLL), v) |
46 | #define UART_PUT_IER(uart, v) bfin_write16(((uart)->port.membase + OFFSET_IER), v) | 46 | #define UART_PUT_IER(uart, v) bfin_write16(((uart)->port.membase + OFFSET_IER), v) |
47 | #define UART_SET_IER(uart, v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v)) | ||
48 | #define UART_CLEAR_IER(uart, v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v)) | ||
47 | #define UART_PUT_DLH(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLH), v) | 49 | #define UART_PUT_DLH(uart, v) bfin_write16(((uart)->port.membase + OFFSET_DLH), v) |
48 | #define UART_PUT_LCR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_LCR), v) | 50 | #define UART_PUT_LCR(uart, v) bfin_write16(((uart)->port.membase + OFFSET_LCR), v) |
49 | #define UART_PUT_GCTL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_GCTL), v) | 51 | #define UART_PUT_GCTL(uart, v) bfin_write16(((uart)->port.membase + OFFSET_GCTL), v) |
50 | 52 | ||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | ||
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | ||
55 | |||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
51 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 62 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
52 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
53 | 64 | ||
@@ -85,7 +96,7 @@ struct bfin_serial_port { | |||
85 | struct work_struct tx_dma_workqueue; | 96 | struct work_struct tx_dma_workqueue; |
86 | #endif | 97 | #endif |
87 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 98 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
88 | struct work_struct cts_workqueue; | 99 | struct timer_list cts_timer; |
89 | int cts_pin; | 100 | int cts_pin; |
90 | int rts_pin; | 101 | int rts_pin; |
91 | #endif | 102 | #endif |
diff --git a/include/asm-blackfin/mach-bf527/blackfin.h b/include/asm-blackfin/mach-bf527/blackfin.h index 2891727b6176..297821e2d79a 100644 --- a/include/asm-blackfin/mach-bf527/blackfin.h +++ b/include/asm-blackfin/mach-bf527/blackfin.h | |||
@@ -39,22 +39,22 @@ | |||
39 | #include "defBF522.h" | 39 | #include "defBF522.h" |
40 | #include "anomaly.h" | 40 | #include "anomaly.h" |
41 | 41 | ||
42 | #if defined(CONFIG_BF527) | 42 | #if defined(CONFIG_BF527) || defined(CONFIG_BF526) |
43 | #include "defBF527.h" | 43 | #include "defBF527.h" |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #if defined(CONFIG_BF525) | 46 | #if defined(CONFIG_BF525) || defined(CONFIG_BF524) |
47 | #include "defBF525.h" | 47 | #include "defBF525.h" |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #if !defined(__ASSEMBLY__) | 50 | #if !defined(__ASSEMBLY__) |
51 | #include "cdefBF522.h" | 51 | #include "cdefBF522.h" |
52 | 52 | ||
53 | #if defined(CONFIG_BF527) | 53 | #if defined(CONFIG_BF527) || defined(CONFIG_BF526) |
54 | #include "cdefBF527.h" | 54 | #include "cdefBF527.h" |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #if defined(CONFIG_BF525) | 57 | #if defined(CONFIG_BF525) || defined(CONFIG_BF524) |
58 | #include "cdefBF525.h" | 58 | #include "cdefBF525.h" |
59 | #endif | 59 | #endif |
60 | #endif | 60 | #endif |
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index 5a6dcc5fa36c..8f7ea112fd3a 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf533/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf533/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -176,6 +176,21 @@ | |||
176 | #define ANOMALY_05000315 (1) | 176 | #define ANOMALY_05000315 (1) |
177 | /* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ | 177 | /* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ |
178 | #define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) | 178 | #define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) |
179 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
180 | #define ANOMALY_05000357 (1) | ||
181 | /* UART Break Signal Issues */ | ||
182 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
183 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
184 | #define ANOMALY_05000366 (1) | ||
185 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
186 | #define ANOMALY_05000371 (1) | ||
187 | /* PPI Does Not Start Properly In Specific Mode */ | ||
188 | #define ANOMALY_05000400 (__SILICON_REVISION__ >= 5) | ||
189 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
190 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) | ||
191 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
192 | #define ANOMALY_05000403 (1) | ||
193 | |||
179 | 194 | ||
180 | /* These anomalies have been "phased" out of analog.com anomaly sheets and are | 195 | /* These anomalies have been "phased" out of analog.com anomaly sheets and are |
181 | * here to show running on older silicon just isn't feasible. | 196 | * here to show running on older silicon just isn't feasible. |
@@ -249,20 +264,6 @@ | |||
249 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) | 264 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) |
250 | /* Internal Voltage Regulator may not start up */ | 265 | /* Internal Voltage Regulator may not start up */ |
251 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) | 266 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) |
252 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
253 | #define ANOMALY_05000357 (1) | ||
254 | /* UART Break Signal Issues */ | ||
255 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
256 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
257 | #define ANOMALY_05000366 (1) | ||
258 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
259 | #define ANOMALY_05000371 (1) | ||
260 | /* PPI Does Not Start Properly In Specific Mode */ | ||
261 | #define ANOMALY_05000400 (__SILICON_REVISION__ == 5) | ||
262 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
263 | #define ANOMALY_05000402 (__SILICON_REVISION__ == 5) | ||
264 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
265 | #define ANOMALY_05000403 (1) | ||
266 | 267 | ||
267 | /* Anomalies that don't exist on this proc */ | 268 | /* Anomalies that don't exist on this proc */ |
268 | #define ANOMALY_05000266 (0) | 269 | #define ANOMALY_05000266 (0) |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index fbe88dee3e2d..ebf592b59aab 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -44,10 +44,21 @@ | |||
44 | #define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) | 44 | #define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) |
45 | #define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) | 45 | #define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) |
46 | #define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v) | 46 | #define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v) |
47 | #define UART_SET_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v)) | ||
48 | #define UART_CLEAR_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v)) | ||
47 | #define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) | 49 | #define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) |
48 | #define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) | 50 | #define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) |
49 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) | 51 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) |
50 | 52 | ||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | ||
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | ||
55 | |||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
51 | #ifdef CONFIG_BFIN_UART0_CTSRTS | 62 | #ifdef CONFIG_BFIN_UART0_CTSRTS |
52 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
53 | # ifndef CONFIG_UART0_CTS_PIN | 64 | # ifndef CONFIG_UART0_CTS_PIN |
@@ -77,7 +88,7 @@ struct bfin_serial_port { | |||
77 | # endif | 88 | # endif |
78 | #endif | 89 | #endif |
79 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 90 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
80 | struct work_struct cts_workqueue; | 91 | struct timer_list cts_timer; |
81 | int cts_pin; | 92 | int cts_pin; |
82 | int rts_pin; | 93 | int rts_pin; |
83 | #endif | 94 | #endif |
diff --git a/include/asm-blackfin/mach-bf533/defBF532.h b/include/asm-blackfin/mach-bf533/defBF532.h index 17e1548cec08..0ab4dd7494cf 100644 --- a/include/asm-blackfin/mach-bf533/defBF532.h +++ b/include/asm-blackfin/mach-bf533/defBF532.h | |||
@@ -468,6 +468,8 @@ | |||
468 | #define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */ | 468 | #define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */ |
469 | #define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */ | 469 | #define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */ |
470 | #define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */ | 470 | #define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */ |
471 | #define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */ | ||
472 | #define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */ | ||
471 | 473 | ||
472 | #define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */ | 474 | #define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */ |
473 | #define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */ | 475 | #define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */ |
diff --git a/include/asm-blackfin/mach-bf533/irq.h b/include/asm-blackfin/mach-bf533/irq.h index 832e6f6122da..5aa38e5da6b7 100644 --- a/include/asm-blackfin/mach-bf533/irq.h +++ b/include/asm-blackfin/mach-bf533/irq.h | |||
@@ -66,12 +66,13 @@ Core Emulation ** | |||
66 | DMA8/9 Interrupt IVG13 28 | 66 | DMA8/9 Interrupt IVG13 28 |
67 | DMA10/11 Interrupt IVG13 29 | 67 | DMA10/11 Interrupt IVG13 29 |
68 | Watchdog Timer IVG13 30 | 68 | Watchdog Timer IVG13 30 |
69 | Software Interrupt 1 IVG14 31 | 69 | |
70 | Software Interrupt 2 -- | 70 | Softirq IVG14 31 |
71 | System Call -- | ||
71 | (lowest priority) IVG15 32 * | 72 | (lowest priority) IVG15 32 * |
72 | */ | 73 | */ |
73 | #define SYS_IRQS 32 | 74 | #define SYS_IRQS 31 |
74 | #define NR_PERI_INTS 24 | 75 | #define NR_PERI_INTS 24 |
75 | 76 | ||
76 | /* The ABSTRACT IRQ definitions */ | 77 | /* The ABSTRACT IRQ definitions */ |
77 | /** the first seven of the following are fixed, the rest you change if you need to **/ | 78 | /** the first seven of the following are fixed, the rest you change if you need to **/ |
@@ -96,7 +97,7 @@ Core Emulation ** | |||
96 | #define IRQ_SPORT0_TX 17 /*DMA2 Interrupt (SPORT0 TX) */ | 97 | #define IRQ_SPORT0_TX 17 /*DMA2 Interrupt (SPORT0 TX) */ |
97 | #define IRQ_SPORT1_RX 18 /*DMA3 Interrupt (SPORT1 RX) */ | 98 | #define IRQ_SPORT1_RX 18 /*DMA3 Interrupt (SPORT1 RX) */ |
98 | #define IRQ_SPORT1_TX 19 /*DMA4 Interrupt (SPORT1 TX) */ | 99 | #define IRQ_SPORT1_TX 19 /*DMA4 Interrupt (SPORT1 TX) */ |
99 | #define IRQ_SPI 20 /*DMA5 Interrupt (SPI) */ | 100 | #define IRQ_SPI 20 /*DMA5 Interrupt (SPI) */ |
100 | #define IRQ_UART_RX 21 /*DMA6 Interrupt (UART RX) */ | 101 | #define IRQ_UART_RX 21 /*DMA6 Interrupt (UART RX) */ |
101 | #define IRQ_UART_TX 22 /*DMA7 Interrupt (UART TX) */ | 102 | #define IRQ_UART_TX 22 /*DMA7 Interrupt (UART TX) */ |
102 | #define IRQ_TMR0 23 /*Timer 0 */ | 103 | #define IRQ_TMR0 23 /*Timer 0 */ |
@@ -108,9 +109,6 @@ Core Emulation ** | |||
108 | #define IRQ_MEM_DMA1 29 /*DMA10/11 Interrupt (Memory DMA Stream 1) */ | 109 | #define IRQ_MEM_DMA1 29 /*DMA10/11 Interrupt (Memory DMA Stream 1) */ |
109 | #define IRQ_WATCH 30 /*Watch Dog Timer */ | 110 | #define IRQ_WATCH 30 /*Watch Dog Timer */ |
110 | 111 | ||
111 | #define IRQ_SW_INT1 31 /*Software Int 1 */ | ||
112 | #define IRQ_SW_INT2 32 /*Software Int 2 (reserved for SYSCALL) */ | ||
113 | |||
114 | #define IRQ_PF0 33 | 112 | #define IRQ_PF0 33 |
115 | #define IRQ_PF1 34 | 113 | #define IRQ_PF1 34 |
116 | #define IRQ_PF2 35 | 114 | #define IRQ_PF2 35 |
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index a6b08facb242..8460ab9c324f 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf537/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf537/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -132,8 +132,8 @@ | |||
132 | #define ANOMALY_05000322 (1) | 132 | #define ANOMALY_05000322 (1) |
133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | 133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ |
134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) | 134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) |
135 | /* New Feature: UART Remains Enabled after UART Boot (Not Available on Older Silicon) */ | 135 | /* New Feature: UART Remains Enabled after UART Boot */ |
136 | #define ANOMALY_05000350 (__SILICON_REVISION__ < 3) | 136 | #define ANOMALY_05000350 (__SILICON_REVISION__ >= 3) |
137 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | 137 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ |
138 | #define ANOMALY_05000355 (1) | 138 | #define ANOMALY_05000355 (1) |
139 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 139 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
@@ -145,12 +145,10 @@ | |||
145 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 145 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
146 | #define ANOMALY_05000371 (1) | 146 | #define ANOMALY_05000371 (1) |
147 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | 147 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ |
148 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 3) | 148 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) |
149 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | 149 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ |
150 | #define ANOMALY_05000403 (1) | 150 | #define ANOMALY_05000403 (1) |
151 | 151 | ||
152 | |||
153 | |||
154 | /* Anomalies that don't exist on this proc */ | 152 | /* Anomalies that don't exist on this proc */ |
155 | #define ANOMALY_05000125 (0) | 153 | #define ANOMALY_05000125 (0) |
156 | #define ANOMALY_05000158 (0) | 154 | #define ANOMALY_05000158 (0) |
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h index fd100a415b98..1bf56ffa22f9 100644 --- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | |||
@@ -44,10 +44,21 @@ | |||
44 | #define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) | 44 | #define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) |
45 | #define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) | 45 | #define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) |
46 | #define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v) | 46 | #define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v) |
47 | #define UART_SET_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v)) | ||
48 | #define UART_CLEAR_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v)) | ||
47 | #define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) | 49 | #define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) |
48 | #define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) | 50 | #define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) |
49 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) | 51 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) |
50 | 52 | ||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | ||
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | ||
55 | |||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
51 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 62 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
52 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
53 | 64 | ||
@@ -85,7 +96,7 @@ struct bfin_serial_port { | |||
85 | struct work_struct tx_dma_workqueue; | 96 | struct work_struct tx_dma_workqueue; |
86 | #endif | 97 | #endif |
87 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 98 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
88 | struct work_struct cts_workqueue; | 99 | struct timer_list cts_timer; |
89 | int cts_pin; | 100 | int cts_pin; |
90 | int rts_pin; | 101 | int rts_pin; |
91 | #endif | 102 | #endif |
diff --git a/include/asm-blackfin/mach-bf537/irq.h b/include/asm-blackfin/mach-bf537/irq.h index be6f2ff77f31..2e68a8a1e730 100644 --- a/include/asm-blackfin/mach-bf537/irq.h +++ b/include/asm-blackfin/mach-bf537/irq.h | |||
@@ -34,24 +34,23 @@ | |||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Interrupt source definitions | 36 | * Interrupt source definitions |
37 | Event Source Core Event Name | 37 | * Event Source Core Event Name |
38 | Core Emulation ** | 38 | * Core Emulation ** |
39 | Events (highest priority) EMU 0 | 39 | * Events (highest priority) EMU 0 |
40 | Reset RST 1 | 40 | * Reset RST 1 |
41 | NMI NMI 2 | 41 | * NMI NMI 2 |
42 | Exception EVX 3 | 42 | * Exception EVX 3 |
43 | Reserved -- 4 | 43 | * Reserved -- 4 |
44 | Hardware Error IVHW 5 | 44 | * Hardware Error IVHW 5 |
45 | Core Timer IVTMR 6 * | 45 | * Core Timer IVTMR 6 |
46 | 46 | * ..... | |
47 | ..... | 47 | * |
48 | 48 | * Softirq IVG14 | |
49 | Software Interrupt 1 IVG14 31 | 49 | * System Call -- |
50 | Software Interrupt 2 -- | 50 | * (lowest priority) IVG15 |
51 | (lowest priority) IVG15 32 * | ||
52 | */ | 51 | */ |
53 | 52 | ||
54 | #define SYS_IRQS 41 | 53 | #define SYS_IRQS 39 |
55 | #define NR_PERI_INTS 32 | 54 | #define NR_PERI_INTS 32 |
56 | 55 | ||
57 | /* The ABSTRACT IRQ definitions */ | 56 | /* The ABSTRACT IRQ definitions */ |
@@ -95,10 +94,8 @@ Core Emulation ** | |||
95 | #define IRQ_PORTG_INTB 35 /* PF Port G (PF15:0) Interrupt B */ | 94 | #define IRQ_PORTG_INTB 35 /* PF Port G (PF15:0) Interrupt B */ |
96 | #define IRQ_MEM_DMA0 36 /*(Memory DMA Stream 0) */ | 95 | #define IRQ_MEM_DMA0 36 /*(Memory DMA Stream 0) */ |
97 | #define IRQ_MEM_DMA1 37 /*(Memory DMA Stream 1) */ | 96 | #define IRQ_MEM_DMA1 37 /*(Memory DMA Stream 1) */ |
98 | #define IRQ_PROG_INTB 38 /* PF Ports F (PF15:0) Interrupt B */ | 97 | #define IRQ_PROG_INTB 38 /* PF Ports F (PF15:0) Interrupt B */ |
99 | #define IRQ_WATCH 38 /*Watch Dog Timer */ | 98 | #define IRQ_WATCH 38 /*Watch Dog Timer */ |
100 | #define IRQ_SW_INT1 40 /*Software Int 1 */ | ||
101 | #define IRQ_SW_INT2 41 /*Software Int 2 (reserved for SYSCALL) */ | ||
102 | 99 | ||
103 | #define IRQ_PPI_ERROR 42 /*PPI Error Interrupt */ | 100 | #define IRQ_PPI_ERROR 42 /*PPI Error Interrupt */ |
104 | #define IRQ_CAN_ERROR 43 /*CAN Error Interrupt */ | 101 | #define IRQ_CAN_ERROR 43 /*CAN Error Interrupt */ |
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h index 49d3cebc5293..3ad59655881a 100644 --- a/include/asm-blackfin/mach-bf548/anomaly.h +++ b/include/asm-blackfin/mach-bf548/anomaly.h | |||
@@ -75,6 +75,8 @@ | |||
75 | #define ANOMALY_05000365 (1) | 75 | #define ANOMALY_05000365 (1) |
76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ | 76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ |
77 | #define ANOMALY_05000369 (1) | 77 | #define ANOMALY_05000369 (1) |
78 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
79 | #define ANOMALY_05000371 (1) | ||
78 | /* Mobile DDR Operation Not Functional */ | 80 | /* Mobile DDR Operation Not Functional */ |
79 | #define ANOMALY_05000377 (1) | 81 | #define ANOMALY_05000377 (1) |
80 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ | 82 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ |
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h index 6547027cd3e6..5e29446a8e03 100644 --- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | |||
@@ -54,6 +54,15 @@ | |||
54 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) | 54 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) |
55 | #define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v) | 55 | #define UART_PUT_MCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_MCR),v) |
56 | 56 | ||
57 | #define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ | ||
58 | #define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ | ||
59 | |||
60 | #define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS) | ||
61 | #define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS)) | ||
62 | #define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS)) | ||
63 | #define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v) | ||
64 | #define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF) | ||
65 | |||
57 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 66 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
58 | # define CONFIG_SERIAL_BFIN_CTSRTS | 67 | # define CONFIG_SERIAL_BFIN_CTSRTS |
59 | 68 | ||
@@ -90,7 +99,7 @@ struct bfin_serial_port { | |||
90 | struct work_struct tx_dma_workqueue; | 99 | struct work_struct tx_dma_workqueue; |
91 | #endif | 100 | #endif |
92 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 101 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
93 | struct work_struct cts_workqueue; | 102 | struct timer_list cts_timer; |
94 | int cts_pin; | 103 | int cts_pin; |
95 | int rts_pin; | 104 | int rts_pin; |
96 | #endif | 105 | #endif |
@@ -178,7 +187,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
178 | 187 | ||
179 | #ifdef CONFIG_BFIN_UART1_CTSRTS | 188 | #ifdef CONFIG_BFIN_UART1_CTSRTS |
180 | peripheral_request(P_UART1_RTS, DRIVER_NAME); | 189 | peripheral_request(P_UART1_RTS, DRIVER_NAME); |
181 | peripheral_request(P_UART1_CTS DRIVER_NAME); | 190 | peripheral_request(P_UART1_CTS, DRIVER_NAME); |
182 | #endif | 191 | #endif |
183 | #endif | 192 | #endif |
184 | 193 | ||
@@ -193,7 +202,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
193 | 202 | ||
194 | #ifdef CONFIG_BFIN_UART3_CTSRTS | 203 | #ifdef CONFIG_BFIN_UART3_CTSRTS |
195 | peripheral_request(P_UART3_RTS, DRIVER_NAME); | 204 | peripheral_request(P_UART3_RTS, DRIVER_NAME); |
196 | peripheral_request(P_UART3_CTS DRIVER_NAME); | 205 | peripheral_request(P_UART3_CTS, DRIVER_NAME); |
197 | #endif | 206 | #endif |
198 | #endif | 207 | #endif |
199 | SSYNC(); | 208 | SSYNC(); |
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h index 08f90c21fe8a..e022e896cb18 100644 --- a/include/asm-blackfin/mach-bf548/defBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h | |||
@@ -2329,6 +2329,26 @@ | |||
2329 | #define KPADWE 0x1000 /* Keypad Wake-Up Enable */ | 2329 | #define KPADWE 0x1000 /* Keypad Wake-Up Enable */ |
2330 | #define ROTWE 0x2000 /* Rotary Wake-Up Enable */ | 2330 | #define ROTWE 0x2000 /* Rotary Wake-Up Enable */ |
2331 | 2331 | ||
2332 | #define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */ | ||
2333 | #define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */ | ||
2334 | #define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */ | ||
2335 | |||
2336 | #define GAIN_5 0x0000 /* GAIN = 5*/ | ||
2337 | #define GAIN_10 0x0004 /* GAIN = 1*/ | ||
2338 | #define GAIN_20 0x0008 /* GAIN = 2*/ | ||
2339 | #define GAIN_50 0x000C /* GAIN = 5*/ | ||
2340 | |||
2341 | #define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */ | ||
2342 | #define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */ | ||
2343 | #define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */ | ||
2344 | #define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */ | ||
2345 | #define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */ | ||
2346 | #define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */ | ||
2347 | #define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */ | ||
2348 | #define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */ | ||
2349 | #define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */ | ||
2350 | #define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */ | ||
2351 | |||
2332 | /* Bit masks for NFC_CTL */ | 2352 | /* Bit masks for NFC_CTL */ |
2333 | 2353 | ||
2334 | #define WR_DLY 0xf /* Write Strobe Delay */ | 2354 | #define WR_DLY 0xf /* Write Strobe Delay */ |
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h index 82157caa96a2..5c5d7d7d695f 100644 --- a/include/asm-blackfin/mach-bf561/anomaly.h +++ b/include/asm-blackfin/mach-bf561/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf561/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf561/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index 8a4e66d1db37..8aa02780e642 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -44,10 +44,21 @@ | |||
44 | #define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) | 44 | #define UART_PUT_CHAR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_THR),v) |
45 | #define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) | 45 | #define UART_PUT_DLL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLL),v) |
46 | #define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v) | 46 | #define UART_PUT_IER(uart,v) bfin_write16(((uart)->port.membase + OFFSET_IER),v) |
47 | #define UART_SET_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) | (v)) | ||
48 | #define UART_CLEAR_IER(uart,v) UART_PUT_IER(uart, UART_GET_IER(uart) & ~(v)) | ||
47 | #define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) | 49 | #define UART_PUT_DLH(uart,v) bfin_write16(((uart)->port.membase + OFFSET_DLH),v) |
48 | #define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) | 50 | #define UART_PUT_LCR(uart,v) bfin_write16(((uart)->port.membase + OFFSET_LCR),v) |
49 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) | 51 | #define UART_PUT_GCTL(uart,v) bfin_write16(((uart)->port.membase + OFFSET_GCTL),v) |
50 | 52 | ||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | ||
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | ||
55 | |||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
51 | #ifdef CONFIG_BFIN_UART0_CTSRTS | 62 | #ifdef CONFIG_BFIN_UART0_CTSRTS |
52 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
53 | # ifndef CONFIG_UART0_CTS_PIN | 64 | # ifndef CONFIG_UART0_CTS_PIN |
@@ -77,7 +88,7 @@ struct bfin_serial_port { | |||
77 | # endif | 88 | # endif |
78 | #endif | 89 | #endif |
79 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS | 90 | #ifdef CONFIG_SERIAL_BFIN_CTSRTS |
80 | struct work_struct cts_workqueue; | 91 | struct timer_list cts_timer; |
81 | int cts_pin; | 92 | int cts_pin; |
82 | int rts_pin; | 93 | int rts_pin; |
83 | #endif | 94 | #endif |
diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h index 366c9b9a0cb7..1ab50e906fe7 100644 --- a/include/asm-blackfin/mach-bf561/defBF561.h +++ b/include/asm-blackfin/mach-bf561/defBF561.h | |||
@@ -868,6 +868,34 @@ | |||
868 | #define CHIPID_FAMILY 0x0FFFF000 | 868 | #define CHIPID_FAMILY 0x0FFFF000 |
869 | #define CHIPID_MANUFACTURE 0x00000FFE | 869 | #define CHIPID_MANUFACTURE 0x00000FFE |
870 | 870 | ||
871 | /* VR_CTL Masks */ | ||
872 | #define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */ | ||
873 | #define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */ | ||
874 | #define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */ | ||
875 | #define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */ | ||
876 | #define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */ | ||
877 | |||
878 | #define GAIN 0x000C /* Voltage Level Gain */ | ||
879 | #define GAIN_5 0x0000 /* GAIN = 5*/ | ||
880 | #define GAIN_10 0x0004 /* GAIN = 1*/ | ||
881 | #define GAIN_20 0x0008 /* GAIN = 2*/ | ||
882 | #define GAIN_50 0x000C /* GAIN = 5*/ | ||
883 | |||
884 | #define VLEV 0x00F0 /* Internal Voltage Level */ | ||
885 | #define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */ | ||
886 | #define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */ | ||
887 | #define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */ | ||
888 | #define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */ | ||
889 | #define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */ | ||
890 | #define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */ | ||
891 | #define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */ | ||
892 | #define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */ | ||
893 | #define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */ | ||
894 | #define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */ | ||
895 | |||
896 | #define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */ | ||
897 | #define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */ | ||
898 | |||
871 | /* PLL_DIV Masks */ | 899 | /* PLL_DIV Masks */ |
872 | #define SCLK_DIV(x) (x) /* SCLK = VCO / x */ | 900 | #define SCLK_DIV(x) (x) /* SCLK = VCO / x */ |
873 | 901 | ||
diff --git a/include/asm-blackfin/mach-bf561/dma.h b/include/asm-blackfin/mach-bf561/dma.h index 21d982003e75..8bc46cd89a02 100644 --- a/include/asm-blackfin/mach-bf561/dma.h +++ b/include/asm-blackfin/mach-bf561/dma.h | |||
@@ -25,11 +25,11 @@ | |||
25 | #define CH_MEM_STREAM1_SRC 27 /* RX */ | 25 | #define CH_MEM_STREAM1_SRC 27 /* RX */ |
26 | #define CH_MEM_STREAM2_DEST 28 | 26 | #define CH_MEM_STREAM2_DEST 28 |
27 | #define CH_MEM_STREAM2_SRC 29 | 27 | #define CH_MEM_STREAM2_SRC 29 |
28 | #define CH_MEM_STREAM3_SRC 30 | 28 | #define CH_MEM_STREAM3_DEST 30 |
29 | #define CH_MEM_STREAM3_DEST 31 | 29 | #define CH_MEM_STREAM3_SRC 31 |
30 | #define CH_IMEM_STREAM0_DEST 32 | 30 | #define CH_IMEM_STREAM0_DEST 32 |
31 | #define CH_IMEM_STREAM0_SRC 33 | 31 | #define CH_IMEM_STREAM0_SRC 33 |
32 | #define CH_IMEM_STREAM1_SRC 34 | 32 | #define CH_IMEM_STREAM1_DEST 34 |
33 | #define CH_IMEM_STREAM1_DEST 35 | 33 | #define CH_IMEM_STREAM1_SRC 35 |
34 | 34 | ||
35 | #endif | 35 | #endif |
diff --git a/include/asm-blackfin/mach-bf561/irq.h b/include/asm-blackfin/mach-bf561/irq.h index 83f0383957d2..6698389c5564 100644 --- a/include/asm-blackfin/mach-bf561/irq.h +++ b/include/asm-blackfin/mach-bf561/irq.h | |||
@@ -118,12 +118,13 @@ | |||
118 | Supplemental interrupt 0 IVG7 69 | 118 | Supplemental interrupt 0 IVG7 69 |
119 | supplemental interrupt 1 IVG7 70 | 119 | supplemental interrupt 1 IVG7 70 |
120 | 120 | ||
121 | Software Interrupt 1 IVG14 71 | 121 | Softirq IVG14 |
122 | Software Interrupt 2 IVG15 72 * | 122 | System Call -- |
123 | (lowest priority) | 123 | (lowest priority) IVG15 |
124 | |||
124 | **********************************************************************/ | 125 | **********************************************************************/ |
125 | 126 | ||
126 | #define SYS_IRQS 72 | 127 | #define SYS_IRQS 71 |
127 | #define NR_PERI_INTS 64 | 128 | #define NR_PERI_INTS 64 |
128 | 129 | ||
129 | /* | 130 | /* |
@@ -237,9 +238,7 @@ | |||
237 | #define IRQ_RESERVED_2 (IVG_BASE + 61) /* Reserved interrupt */ | 238 | #define IRQ_RESERVED_2 (IVG_BASE + 61) /* Reserved interrupt */ |
238 | #define IRQ_SUPPLE_0 (IVG_BASE + 62) /* Supplemental interrupt 0 */ | 239 | #define IRQ_SUPPLE_0 (IVG_BASE + 62) /* Supplemental interrupt 0 */ |
239 | #define IRQ_SUPPLE_1 (IVG_BASE + 63) /* supplemental interrupt 1 */ | 240 | #define IRQ_SUPPLE_1 (IVG_BASE + 63) /* supplemental interrupt 1 */ |
240 | #define IRQ_SW_INT1 71 /* Software Interrupt 1 */ | 241 | |
241 | #define IRQ_SW_INT2 72 /* Software Interrupt 2 */ | ||
242 | /* reserved for SYSCALL */ | ||
243 | #define IRQ_PF0 73 | 242 | #define IRQ_PF0 73 |
244 | #define IRQ_PF1 74 | 243 | #define IRQ_PF1 74 |
245 | #define IRQ_PF2 75 | 244 | #define IRQ_PF2 75 |
diff --git a/include/asm-blackfin/mach-common/context.S b/include/asm-blackfin/mach-common/context.S index fd0ebe1862b8..c0e630edfb9a 100644 --- a/include/asm-blackfin/mach-common/context.S +++ b/include/asm-blackfin/mach-common/context.S | |||
@@ -28,6 +28,11 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * NOTE! The single-stepping code assumes that all interrupt handlers | ||
32 | * start by saving SYSCFG on the stack with their first instruction. | ||
33 | */ | ||
34 | |||
35 | /* | ||
31 | * Code to save processor context. | 36 | * Code to save processor context. |
32 | * We even save the register which are preserved by a function call | 37 | * We even save the register which are preserved by a function call |
33 | * - r4, r5, r6, r7, p3, p4, p5 | 38 | * - r4, r5, r6, r7, p3, p4, p5 |
diff --git a/include/asm-blackfin/serial.h b/include/asm-blackfin/serial.h new file mode 100644 index 000000000000..994dd869558c --- /dev/null +++ b/include/asm-blackfin/serial.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * include/asm-blackfin/serial.h | ||
3 | */ | ||
4 | |||
5 | #define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH | ||
diff --git a/include/asm-blackfin/time.h b/include/asm-blackfin/time.h index 6e5859b6ea32..ddc43ce38533 100644 --- a/include/asm-blackfin/time.h +++ b/include/asm-blackfin/time.h | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | #ifndef CONFIG_CPU_FREQ | 25 | #ifndef CONFIG_CPU_FREQ |
26 | #define TIME_SCALE 1 | 26 | #define TIME_SCALE 1 |
27 | #define __bfin_cycles_off (0) | ||
28 | #define __bfin_cycles_mod (0) | ||
27 | #else | 29 | #else |
28 | /* | 30 | /* |
29 | * Blackfin CPU frequency scaling supports max Core Clock 1, 1/2 and 1/4 . | 31 | * Blackfin CPU frequency scaling supports max Core Clock 1, 1/2 and 1/4 . |
@@ -31,6 +33,8 @@ | |||
31 | * adjust the Core Timer Presale Register. This way we don't lose time. | 33 | * adjust the Core Timer Presale Register. This way we don't lose time. |
32 | */ | 34 | */ |
33 | #define TIME_SCALE 4 | 35 | #define TIME_SCALE 4 |
36 | extern unsigned long long __bfin_cycles_off; | ||
37 | extern unsigned int __bfin_cycles_mod; | ||
34 | #endif | 38 | #endif |
35 | 39 | ||
36 | #endif | 40 | #endif |
diff --git a/include/asm-blackfin/types.h b/include/asm-blackfin/types.h index 9785a6d531c6..8441cbc2bf9e 100644 --- a/include/asm-blackfin/types.h +++ b/include/asm-blackfin/types.h | |||
@@ -8,30 +8,12 @@ | |||
8 | * not a major issue. However, for interoperability, libraries still | 8 | * not a major issue. However, for interoperability, libraries still |
9 | * need to be careful to avoid a name clashes. | 9 | * need to be careful to avoid a name clashes. |
10 | */ | 10 | */ |
11 | #include <asm-generic/int-ll64.h> | ||
12 | |||
11 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
12 | 14 | ||
13 | typedef unsigned short umode_t; | 15 | typedef unsigned short umode_t; |
14 | 16 | ||
15 | /* | ||
16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
17 | * header files exported to user space | ||
18 | */ | ||
19 | |||
20 | typedef __signed__ char __s8; | ||
21 | typedef unsigned char __u8; | ||
22 | |||
23 | typedef __signed__ short __s16; | ||
24 | typedef unsigned short __u16; | ||
25 | |||
26 | typedef __signed__ int __s32; | ||
27 | typedef unsigned int __u32; | ||
28 | |||
29 | /* HK0617 -- Changes to unsigned long temporarily */ | ||
30 | #if defined(__GNUC__) | ||
31 | __extension__ typedef __signed__ long long __s64; | ||
32 | __extension__ typedef unsigned long long __u64; | ||
33 | #endif | ||
34 | |||
35 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLY__ */ |
36 | /* | 18 | /* |
37 | * These aren't exported outside the kernel to avoid name space clashes | 19 | * These aren't exported outside the kernel to avoid name space clashes |
@@ -42,18 +24,6 @@ __extension__ typedef unsigned long long __u64; | |||
42 | 24 | ||
43 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
44 | 26 | ||
45 | typedef signed char s8; | ||
46 | typedef unsigned char u8; | ||
47 | |||
48 | typedef signed short s16; | ||
49 | typedef unsigned short u16; | ||
50 | |||
51 | typedef signed int s32; | ||
52 | typedef unsigned int u32; | ||
53 | |||
54 | typedef signed long long s64; | ||
55 | typedef unsigned long long u64; | ||
56 | |||
57 | /* Dma addresses are 32-bits wide. */ | 27 | /* Dma addresses are 32-bits wide. */ |
58 | 28 | ||
59 | typedef u32 dma_addr_t; | 29 | typedef u32 dma_addr_t; |
diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h index 5a21c42bc6c5..5790262cbe8a 100644 --- a/include/asm-cris/types.h +++ b/include/asm-cris/types.h | |||
@@ -1,29 +1,12 @@ | |||
1 | #ifndef _ETRAX_TYPES_H | 1 | #ifndef _ETRAX_TYPES_H |
2 | #define _ETRAX_TYPES_H | 2 | #define _ETRAX_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
5 | 7 | ||
6 | typedef unsigned short umode_t; | 8 | typedef unsigned short umode_t; |
7 | 9 | ||
8 | /* | ||
9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
10 | * header files exported to user space | ||
11 | */ | ||
12 | |||
13 | typedef __signed__ char __s8; | ||
14 | typedef unsigned char __u8; | ||
15 | |||
16 | typedef __signed__ short __s16; | ||
17 | typedef unsigned short __u16; | ||
18 | |||
19 | typedef __signed__ int __s32; | ||
20 | typedef unsigned int __u32; | ||
21 | |||
22 | #if defined(__GNUC__) | ||
23 | __extension__ typedef __signed__ long long __s64; | ||
24 | __extension__ typedef unsigned long long __u64; | ||
25 | #endif | ||
26 | |||
27 | #endif /* __ASSEMBLY__ */ | 10 | #endif /* __ASSEMBLY__ */ |
28 | 11 | ||
29 | /* | 12 | /* |
@@ -35,18 +18,6 @@ __extension__ typedef unsigned long long __u64; | |||
35 | 18 | ||
36 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
37 | 20 | ||
38 | typedef signed char s8; | ||
39 | typedef unsigned char u8; | ||
40 | |||
41 | typedef signed short s16; | ||
42 | typedef unsigned short u16; | ||
43 | |||
44 | typedef signed int s32; | ||
45 | typedef unsigned int u32; | ||
46 | |||
47 | typedef signed long long s64; | ||
48 | typedef unsigned long long u64; | ||
49 | |||
50 | /* Dma addresses are 32-bits wide, just like our other addresses. */ | 21 | /* Dma addresses are 32-bits wide, just like our other addresses. */ |
51 | 22 | ||
52 | typedef u32 dma_addr_t; | 23 | typedef u32 dma_addr_t; |
diff --git a/include/asm-frv/checksum.h b/include/asm-frv/checksum.h index 9b1689850187..269da09ff637 100644 --- a/include/asm-frv/checksum.h +++ b/include/asm-frv/checksum.h | |||
@@ -75,7 +75,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
75 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) | 75 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) |
76 | : "0" (sum), "1" (iph), "2" (ihl), "3" (4), | 76 | : "0" (sum), "1" (iph), "2" (ihl), "3" (4), |
77 | "m"(*(volatile struct { int _[100]; } *)iph) | 77 | "m"(*(volatile struct { int _[100]; } *)iph) |
78 | : "icc0", "icc1" | 78 | : "icc0", "icc1", "memory" |
79 | ); | 79 | ); |
80 | 80 | ||
81 | return (__force __sum16)~sum; | 81 | return (__force __sum16)~sum; |
diff --git a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h index 734a1d0583b6..2947764fc0e0 100644 --- a/include/asm-frv/mem-layout.h +++ b/include/asm-frv/mem-layout.h | |||
@@ -31,6 +31,13 @@ | |||
31 | 31 | ||
32 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 32 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
33 | 33 | ||
34 | /* | ||
35 | * the slab must be aligned such that load- and store-double instructions don't | ||
36 | * fault if used | ||
37 | */ | ||
38 | #define ARCH_KMALLOC_MINALIGN 8 | ||
39 | #define ARCH_SLAB_MINALIGN 8 | ||
40 | |||
34 | /*****************************************************************************/ | 41 | /*****************************************************************************/ |
35 | /* | 42 | /* |
36 | * virtual memory layout from kernel's point of view | 43 | * virtual memory layout from kernel's point of view |
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index cb307f8a6b48..d3a12a9079f7 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h | |||
@@ -179,7 +179,7 @@ do { \ | |||
179 | #define mb() asm volatile ("membar" : : :"memory") | 179 | #define mb() asm volatile ("membar" : : :"memory") |
180 | #define rmb() asm volatile ("membar" : : :"memory") | 180 | #define rmb() asm volatile ("membar" : : :"memory") |
181 | #define wmb() asm volatile ("membar" : : :"memory") | 181 | #define wmb() asm volatile ("membar" : : :"memory") |
182 | #define read_barrier_depends() barrier() | 182 | #define read_barrier_depends() do { } while (0) |
183 | 183 | ||
184 | #ifdef CONFIG_SMP | 184 | #ifdef CONFIG_SMP |
185 | #define smp_mb() mb() | 185 | #define smp_mb() mb() |
diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 767e5ed71c4b..613bf1e962f0 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h | |||
@@ -12,29 +12,12 @@ | |||
12 | #ifndef _ASM_TYPES_H | 12 | #ifndef _ASM_TYPES_H |
13 | #define _ASM_TYPES_H | 13 | #define _ASM_TYPES_H |
14 | 14 | ||
15 | #include <asm-generic/int-ll64.h> | ||
16 | |||
15 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
16 | 18 | ||
17 | typedef unsigned short umode_t; | 19 | typedef unsigned short umode_t; |
18 | 20 | ||
19 | /* | ||
20 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
21 | * header files exported to user space | ||
22 | */ | ||
23 | |||
24 | typedef __signed__ char __s8; | ||
25 | typedef unsigned char __u8; | ||
26 | |||
27 | typedef __signed__ short __s16; | ||
28 | typedef unsigned short __u16; | ||
29 | |||
30 | typedef __signed__ int __s32; | ||
31 | typedef unsigned int __u32; | ||
32 | |||
33 | #if defined(__GNUC__) | ||
34 | __extension__ typedef __signed__ long long __s64; | ||
35 | __extension__ typedef unsigned long long __u64; | ||
36 | #endif | ||
37 | |||
38 | #endif /* __ASSEMBLY__ */ | 21 | #endif /* __ASSEMBLY__ */ |
39 | 22 | ||
40 | /* | 23 | /* |
@@ -46,19 +29,6 @@ __extension__ typedef unsigned long long __u64; | |||
46 | 29 | ||
47 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
48 | 31 | ||
49 | |||
50 | typedef signed char s8; | ||
51 | typedef unsigned char u8; | ||
52 | |||
53 | typedef signed short s16; | ||
54 | typedef unsigned short u16; | ||
55 | |||
56 | typedef signed int s32; | ||
57 | typedef unsigned int u32; | ||
58 | |||
59 | typedef signed long long s64; | ||
60 | typedef unsigned long long u64; | ||
61 | |||
62 | /* Dma addresses are 32-bits wide. */ | 32 | /* Dma addresses are 32-bits wide. */ |
63 | 33 | ||
64 | typedef u32 dma_addr_t; | 34 | typedef u32 dma_addr_t; |
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index c18110ee30f1..4c9932a2503f 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild | |||
@@ -7,5 +7,7 @@ header-y += poll.h | |||
7 | header-y += signal.h | 7 | header-y += signal.h |
8 | header-y += statfs.h | 8 | header-y += statfs.h |
9 | 9 | ||
10 | unifdef-y += int-l64.h | ||
11 | unifdef-y += int-ll64.h | ||
10 | unifdef-y += resource.h | 12 | unifdef-y += resource.h |
11 | unifdef-y += siginfo.h | 13 | unifdef-y += siginfo.h |
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index 92a6d91d0c1a..7cd25b8e7c9a 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm | |||
@@ -1,6 +1,6 @@ | |||
1 | header-y += kvm.h | 1 | header-y += kvm.h |
2 | 2 | ||
3 | ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h) | 3 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),) |
4 | unifdef-y += a.out.h | 4 | unifdef-y += a.out.h |
5 | endif | 5 | endif |
6 | unifdef-y += auxvec.h | 6 | unifdef-y += auxvec.h |
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 85fd0aa27a8c..4ec0a296bdec 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_GENERIC_ATOMIC_H | 2 | #define _ASM_GENERIC_ATOMIC_H |
3 | /* | 3 | /* |
4 | * Copyright (C) 2005 Silicon Graphics, Inc. | 4 | * Copyright (C) 2005 Silicon Graphics, Inc. |
5 | * Christoph Lameter <clameter@sgi.com> | 5 | * Christoph Lameter |
6 | * | 6 | * |
7 | * Allows to provide arch independent atomic definitions without the need to | 7 | * Allows to provide arch independent atomic definitions without the need to |
8 | * edit all arch specific atomic.h files. | 8 | * edit all arch specific atomic.h files. |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index ecf675a59d21..6be061d09da9 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -1,8 +1,12 @@ | |||
1 | #ifndef _ASM_GENERIC_GPIO_H | 1 | #ifndef _ASM_GENERIC_GPIO_H |
2 | #define _ASM_GENERIC_GPIO_H | 2 | #define _ASM_GENERIC_GPIO_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #ifdef CONFIG_HAVE_GPIO_LIB | 6 | #ifdef CONFIG_HAVE_GPIO_LIB |
5 | 7 | ||
8 | #include <linux/compiler.h> | ||
9 | |||
6 | /* Platforms may implement their GPIO interface with library code, | 10 | /* Platforms may implement their GPIO interface with library code, |
7 | * at a small performance cost for non-inlined operations and some | 11 | * at a small performance cost for non-inlined operations and some |
8 | * extra memory (for code and for per-GPIO table entries). | 12 | * extra memory (for code and for per-GPIO table entries). |
@@ -74,7 +78,7 @@ struct gpio_chip { | |||
74 | 78 | ||
75 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, | 79 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, |
76 | unsigned offset); | 80 | unsigned offset); |
77 | extern int __init __must_check gpiochip_reserve(int start, int ngpio); | 81 | extern int __must_check gpiochip_reserve(int start, int ngpio); |
78 | 82 | ||
79 | /* add/remove chips */ | 83 | /* add/remove chips */ |
80 | extern int gpiochip_add(struct gpio_chip *chip); | 84 | extern int gpiochip_add(struct gpio_chip *chip); |
diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h new file mode 100644 index 000000000000..2af9b75d77db --- /dev/null +++ b/include/asm-generic/int-l64.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * asm-generic/int-l64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_GENERIC_INT_L64_H | ||
9 | #define _ASM_GENERIC_INT_L64_H | ||
10 | |||
11 | #ifndef __ASSEMBLY__ | ||
12 | /* | ||
13 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
14 | * header files exported to user space | ||
15 | */ | ||
16 | |||
17 | typedef __signed__ char __s8; | ||
18 | typedef unsigned char __u8; | ||
19 | |||
20 | typedef __signed__ short __s16; | ||
21 | typedef unsigned short __u16; | ||
22 | |||
23 | typedef __signed__ int __s32; | ||
24 | typedef unsigned int __u32; | ||
25 | |||
26 | typedef __signed__ long __s64; | ||
27 | typedef unsigned long __u64; | ||
28 | |||
29 | #endif /* __ASSEMBLY__ */ | ||
30 | |||
31 | #ifdef __KERNEL__ | ||
32 | |||
33 | #ifndef __ASSEMBLY__ | ||
34 | |||
35 | typedef signed char s8; | ||
36 | typedef unsigned char u8; | ||
37 | |||
38 | typedef signed short s16; | ||
39 | typedef unsigned short u16; | ||
40 | |||
41 | typedef signed int s32; | ||
42 | typedef unsigned int u32; | ||
43 | |||
44 | typedef signed long s64; | ||
45 | typedef unsigned long u64; | ||
46 | |||
47 | #define S8_C(x) x | ||
48 | #define U8_C(x) x ## U | ||
49 | #define S16_C(x) x | ||
50 | #define U16_C(x) x ## U | ||
51 | #define S32_C(x) x | ||
52 | #define U32_C(x) x ## U | ||
53 | #define S64_C(x) x ## L | ||
54 | #define U64_C(x) x ## UL | ||
55 | |||
56 | #else /* __ASSEMBLY__ */ | ||
57 | |||
58 | #define S8_C(x) x | ||
59 | #define U8_C(x) x | ||
60 | #define S16_C(x) x | ||
61 | #define U16_C(x) x | ||
62 | #define S32_C(x) x | ||
63 | #define U32_C(x) x | ||
64 | #define S64_C(x) x | ||
65 | #define U64_C(x) x | ||
66 | |||
67 | #endif /* __ASSEMBLY__ */ | ||
68 | |||
69 | #endif /* __KERNEL__ */ | ||
70 | |||
71 | #endif /* _ASM_GENERIC_INT_L64_H */ | ||
diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h new file mode 100644 index 000000000000..260948905e4e --- /dev/null +++ b/include/asm-generic/int-ll64.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * asm-generic/int-ll64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_GENERIC_INT_LL64_H | ||
9 | #define _ASM_GENERIC_INT_LL64_H | ||
10 | |||
11 | #ifndef __ASSEMBLY__ | ||
12 | /* | ||
13 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
14 | * header files exported to user space | ||
15 | */ | ||
16 | |||
17 | typedef __signed__ char __s8; | ||
18 | typedef unsigned char __u8; | ||
19 | |||
20 | typedef __signed__ short __s16; | ||
21 | typedef unsigned short __u16; | ||
22 | |||
23 | typedef __signed__ int __s32; | ||
24 | typedef unsigned int __u32; | ||
25 | |||
26 | #ifdef __GNUC__ | ||
27 | __extension__ typedef __signed__ long long __s64; | ||
28 | __extension__ typedef unsigned long long __u64; | ||
29 | #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | ||
30 | typedef __signed__ long long __s64; | ||
31 | typedef unsigned long long __u64; | ||
32 | #endif | ||
33 | |||
34 | #endif /* __ASSEMBLY__ */ | ||
35 | |||
36 | #ifdef __KERNEL__ | ||
37 | |||
38 | #ifndef __ASSEMBLY__ | ||
39 | |||
40 | typedef signed char s8; | ||
41 | typedef unsigned char u8; | ||
42 | |||
43 | typedef signed short s16; | ||
44 | typedef unsigned short u16; | ||
45 | |||
46 | typedef signed int s32; | ||
47 | typedef unsigned int u32; | ||
48 | |||
49 | typedef signed long long s64; | ||
50 | typedef unsigned long long u64; | ||
51 | |||
52 | #define S8_C(x) x | ||
53 | #define U8_C(x) x ## U | ||
54 | #define S16_C(x) x | ||
55 | #define U16_C(x) x ## U | ||
56 | #define S32_C(x) x | ||
57 | #define U32_C(x) x ## U | ||
58 | #define S64_C(x) x ## LL | ||
59 | #define U64_C(x) x ## ULL | ||
60 | |||
61 | #else /* __ASSEMBLY__ */ | ||
62 | |||
63 | #define S8_C(x) x | ||
64 | #define U8_C(x) x | ||
65 | #define S16_C(x) x | ||
66 | #define U16_C(x) x | ||
67 | #define S32_C(x) x | ||
68 | #define U32_C(x) x | ||
69 | #define S64_C(x) x | ||
70 | #define U64_C(x) x | ||
71 | |||
72 | #endif /* __ASSEMBLY__ */ | ||
73 | |||
74 | #endif /* __KERNEL__ */ | ||
75 | |||
76 | #endif /* _ASM_GENERIC_INT_LL64_H */ | ||
diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h index 71210d141b64..5ffdca217b95 100644 --- a/include/asm-h8300/cacheflush.h +++ b/include/asm-h8300/cacheflush.h | |||
@@ -3,7 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef _ASM_H8300_CACHEFLUSH_H | 5 | #ifndef _ASM_H8300_CACHEFLUSH_H |
6 | #define _AMS_H8300_CACHEFLUSH_H | 6 | #define _ASM_H8300_CACHEFLUSH_H |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Cache handling functions | 9 | * Cache handling functions |
diff --git a/include/asm-h8300/param.h b/include/asm-h8300/param.h index 04f64f100379..1c72fb8080ff 100644 --- a/include/asm-h8300/param.h +++ b/include/asm-h8300/param.h | |||
@@ -1,14 +1,12 @@ | |||
1 | #ifndef _H8300_PARAM_H | 1 | #ifndef _H8300_PARAM_H |
2 | #define _H8300_PARAM_H | 2 | #define _H8300_PARAM_H |
3 | 3 | ||
4 | |||
5 | #ifndef HZ | ||
6 | #define HZ CONFIG_HZ | ||
7 | #endif | ||
8 | |||
9 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #define HZ CONFIG_HZ | ||
10 | #define USER_HZ HZ | 6 | #define USER_HZ HZ |
11 | #define CLOCKS_PER_SEC (USER_HZ) | 7 | #define CLOCKS_PER_SEC (USER_HZ) |
8 | #else | ||
9 | #define HZ 100 | ||
12 | #endif | 10 | #endif |
13 | 11 | ||
14 | #define EXEC_PAGESIZE 4096 | 12 | #define EXEC_PAGESIZE 4096 |
diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h index 56566e2a09fd..12875190b156 100644 --- a/include/asm-h8300/types.h +++ b/include/asm-h8300/types.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _H8300_TYPES_H | 1 | #ifndef _H8300_TYPES_H |
2 | #define _H8300_TYPES_H | 2 | #define _H8300_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
4 | #if !defined(__ASSEMBLY__) | 6 | #if !defined(__ASSEMBLY__) |
5 | 7 | ||
6 | /* | 8 | /* |
@@ -14,41 +16,10 @@ | |||
14 | typedef unsigned short umode_t; | 16 | typedef unsigned short umode_t; |
15 | 17 | ||
16 | /* | 18 | /* |
17 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
18 | * header files exported to user space | ||
19 | */ | ||
20 | |||
21 | typedef __signed__ char __s8; | ||
22 | typedef unsigned char __u8; | ||
23 | |||
24 | typedef __signed__ short __s16; | ||
25 | typedef unsigned short __u16; | ||
26 | |||
27 | typedef __signed__ int __s32; | ||
28 | typedef unsigned int __u32; | ||
29 | |||
30 | #if defined(__GNUC__) | ||
31 | __extension__ typedef __signed__ long long __s64; | ||
32 | __extension__ typedef unsigned long long __u64; | ||
33 | #endif | ||
34 | |||
35 | /* | ||
36 | * These aren't exported outside the kernel to avoid name space clashes | 19 | * These aren't exported outside the kernel to avoid name space clashes |
37 | */ | 20 | */ |
38 | #ifdef __KERNEL__ | 21 | #ifdef __KERNEL__ |
39 | 22 | ||
40 | typedef signed char s8; | ||
41 | typedef unsigned char u8; | ||
42 | |||
43 | typedef signed short s16; | ||
44 | typedef unsigned short u16; | ||
45 | |||
46 | typedef signed int s32; | ||
47 | typedef unsigned int u32; | ||
48 | |||
49 | typedef signed long long s64; | ||
50 | typedef unsigned long long u64; | ||
51 | |||
52 | #define BITS_PER_LONG 32 | 23 | #define BITS_PER_LONG 32 |
53 | 24 | ||
54 | /* Dma addresses are 32-bits wide. */ | 25 | /* Dma addresses are 32-bits wide. */ |
diff --git a/include/asm-ia64/cpu.h b/include/asm-ia64/cpu.h index e87fa3210a2b..fcca30b9f110 100644 --- a/include/asm-ia64/cpu.h +++ b/include/asm-ia64/cpu.h | |||
@@ -14,8 +14,8 @@ DECLARE_PER_CPU(struct ia64_cpu, cpu_devices); | |||
14 | 14 | ||
15 | DECLARE_PER_CPU(int, cpu_state); | 15 | DECLARE_PER_CPU(int, cpu_state); |
16 | 16 | ||
17 | extern int arch_register_cpu(int num); | ||
18 | #ifdef CONFIG_HOTPLUG_CPU | 17 | #ifdef CONFIG_HOTPLUG_CPU |
18 | extern int arch_register_cpu(int num); | ||
19 | extern void arch_unregister_cpu(int); | 19 | extern void arch_unregister_cpu(int); |
20 | #endif | 20 | #endif |
21 | 21 | ||
diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h index eb2d3559d089..3f6a090cbd9a 100644 --- a/include/asm-ia64/kvm.h +++ b/include/asm-ia64/kvm.h | |||
@@ -22,14 +22,13 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | #include <asm/fpu.h> | ||
26 | 25 | ||
27 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
28 | 27 | ||
29 | /* Architectural interrupt line count. */ | 28 | /* Architectural interrupt line count. */ |
30 | #define KVM_NR_INTERRUPTS 256 | 29 | #define KVM_NR_INTERRUPTS 256 |
31 | 30 | ||
32 | #define KVM_IOAPIC_NUM_PINS 24 | 31 | #define KVM_IOAPIC_NUM_PINS 48 |
33 | 32 | ||
34 | struct kvm_ioapic_state { | 33 | struct kvm_ioapic_state { |
35 | __u64 base_address; | 34 | __u64 base_address; |
@@ -61,6 +60,13 @@ struct kvm_ioapic_state { | |||
61 | 60 | ||
62 | #define KVM_CONTEXT_SIZE 8*1024 | 61 | #define KVM_CONTEXT_SIZE 8*1024 |
63 | 62 | ||
63 | struct kvm_fpreg { | ||
64 | union { | ||
65 | unsigned long bits[2]; | ||
66 | long double __dummy; /* force 16-byte alignment */ | ||
67 | } u; | ||
68 | }; | ||
69 | |||
64 | union context { | 70 | union context { |
65 | /* 8K size */ | 71 | /* 8K size */ |
66 | char dummy[KVM_CONTEXT_SIZE]; | 72 | char dummy[KVM_CONTEXT_SIZE]; |
@@ -77,7 +83,7 @@ union context { | |||
77 | unsigned long ibr[8]; | 83 | unsigned long ibr[8]; |
78 | unsigned long dbr[8]; | 84 | unsigned long dbr[8]; |
79 | unsigned long pkr[8]; | 85 | unsigned long pkr[8]; |
80 | struct ia64_fpreg fr[128]; | 86 | struct kvm_fpreg fr[128]; |
81 | }; | 87 | }; |
82 | }; | 88 | }; |
83 | 89 | ||
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index 9f020eb825c5..0721a5e8271e 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -126,6 +126,8 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); | |||
126 | # include <asm/machvec_hpzx1_swiotlb.h> | 126 | # include <asm/machvec_hpzx1_swiotlb.h> |
127 | # elif defined (CONFIG_IA64_SGI_SN2) | 127 | # elif defined (CONFIG_IA64_SGI_SN2) |
128 | # include <asm/machvec_sn2.h> | 128 | # include <asm/machvec_sn2.h> |
129 | # elif defined (CONFIG_IA64_SGI_UV) | ||
130 | # include <asm/machvec_uv.h> | ||
129 | # elif defined (CONFIG_IA64_GENERIC) | 131 | # elif defined (CONFIG_IA64_GENERIC) |
130 | 132 | ||
131 | # ifdef MACHVEC_PLATFORM_HEADER | 133 | # ifdef MACHVEC_PLATFORM_HEADER |
diff --git a/include/asm-ia64/machvec_uv.h b/include/asm-ia64/machvec_uv.h new file mode 100644 index 000000000000..2931447f3813 --- /dev/null +++ b/include/asm-ia64/machvec_uv.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * SGI UV Core Functions | ||
7 | * | ||
8 | * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. | ||
9 | */ | ||
10 | |||
11 | #ifndef _ASM_IA64_MACHVEC_UV_H | ||
12 | #define _ASM_IA64_MACHVEC_UV_H | ||
13 | |||
14 | extern ia64_mv_setup_t uv_setup; | ||
15 | |||
16 | /* | ||
17 | * This stuff has dual use! | ||
18 | * | ||
19 | * For a generic kernel, the macros are used to initialize the | ||
20 | * platform's machvec structure. When compiling a non-generic kernel, | ||
21 | * the macros are used directly. | ||
22 | */ | ||
23 | #define platform_name "uv" | ||
24 | #define platform_setup uv_setup | ||
25 | |||
26 | #endif /* _ASM_IA64_MACHVEC_UV_H */ | ||
diff --git a/include/asm-ia64/patch.h b/include/asm-ia64/patch.h index a71543084fb4..295fe6ab4584 100644 --- a/include/asm-ia64/patch.h +++ b/include/asm-ia64/patch.h | |||
@@ -21,6 +21,7 @@ extern void ia64_patch_imm60 (u64 insn_addr, u64 val); /* patch "brl" w/ip-rel | |||
21 | extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); | 21 | extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); |
22 | extern void ia64_patch_vtop (unsigned long start, unsigned long end); | 22 | extern void ia64_patch_vtop (unsigned long start, unsigned long end); |
23 | extern void ia64_patch_phys_stack_reg(unsigned long val); | 23 | extern void ia64_patch_phys_stack_reg(unsigned long val); |
24 | extern void ia64_patch_rse (unsigned long start, unsigned long end); | ||
24 | extern void ia64_patch_gate (void); | 25 | extern void ia64_patch_gate (void); |
25 | 26 | ||
26 | #endif /* _ASM_IA64_PATCH_H */ | 27 | #endif /* _ASM_IA64_PATCH_H */ |
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index 4b2a8d40ebc5..15f8dcfe6eee 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h | |||
@@ -76,7 +76,7 @@ | |||
76 | # define KERNEL_STACK_SIZE_ORDER 0 | 76 | # define KERNEL_STACK_SIZE_ORDER 0 |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 15) & ~15) | 79 | #define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31) |
80 | #define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) | 80 | #define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) |
81 | 81 | ||
82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET | 82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET |
diff --git a/include/asm-ia64/sections.h b/include/asm-ia64/sections.h index dc42a359894f..7286e4a9fe84 100644 --- a/include/asm-ia64/sections.h +++ b/include/asm-ia64/sections.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; | 11 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; |
12 | extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; | 12 | extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; |
13 | extern char __start___rse_patchlist[], __end___rse_patchlist[]; | ||
13 | extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; | 14 | extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; |
14 | extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; | 15 | extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; |
15 | extern char __start_gate_section[]; | 16 | extern char __start_gate_section[]; |
diff --git a/include/asm-ia64/sn/simulator.h b/include/asm-ia64/sn/simulator.h index c3fd3eb25768..c2611f6cfe33 100644 --- a/include/asm-ia64/sn/simulator.h +++ b/include/asm-ia64/sn/simulator.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef _ASM_IA64_SN_SIMULATOR_H | 8 | #ifndef _ASM_IA64_SN_SIMULATOR_H |
9 | #define _ASM_IA64_SN_SIMULATOR_H | 9 | #define _ASM_IA64_SN_SIMULATOR_H |
10 | 10 | ||
11 | 11 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_SGI_UV) | |
12 | #define SNMAGIC 0xaeeeeeee8badbeefL | 12 | #define SNMAGIC 0xaeeeeeee8badbeefL |
13 | #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) | 13 | #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) |
14 | 14 | ||
@@ -16,5 +16,10 @@ | |||
16 | #define IS_RUNNING_ON_SIMULATOR() (sn_prom_type) | 16 | #define IS_RUNNING_ON_SIMULATOR() (sn_prom_type) |
17 | #define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2) | 17 | #define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2) |
18 | extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ | 18 | extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ |
19 | #else | ||
20 | #define IS_MEDUSA() 0 | ||
21 | #define SIMULATOR_SLEEP() | ||
22 | #define IS_RUNNING_ON_SIMULATOR() 0 | ||
23 | #endif | ||
19 | 24 | ||
20 | #endif /* _ASM_IA64_SN_SIMULATOR_H */ | 25 | #endif /* _ASM_IA64_SN_SIMULATOR_H */ |
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index f30e05583869..2422ac61658a 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -108,13 +108,11 @@ extern void tsk_clear_notify_resume(struct task_struct *tsk); | |||
108 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ | 108 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ |
109 | #define TIF_FREEZE 20 /* is freezing for suspend */ | 109 | #define TIF_FREEZE 20 /* is freezing for suspend */ |
110 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ | 110 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ |
111 | #define TIF_RESTORE_SIGMASK 22 /* restore signal mask in do_signal() */ | ||
112 | 111 | ||
113 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 112 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
114 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 113 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
115 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 114 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
116 | #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) | 115 | #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) |
117 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
118 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 116 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
119 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 117 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
120 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 118 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
@@ -131,7 +129,18 @@ extern void tsk_clear_notify_resume(struct task_struct *tsk); | |||
131 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) | 129 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) |
132 | 130 | ||
133 | #define TS_POLLING 1 /* true if in idle loop and not sleeping */ | 131 | #define TS_POLLING 1 /* true if in idle loop and not sleeping */ |
132 | #define TS_RESTORE_SIGMASK 2 /* restore signal mask in do_signal() */ | ||
134 | 133 | ||
135 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) | 134 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) |
136 | 135 | ||
136 | #ifndef __ASSEMBLY__ | ||
137 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
138 | static inline void set_restore_sigmask(void) | ||
139 | { | ||
140 | struct thread_info *ti = current_thread_info(); | ||
141 | ti->status |= TS_RESTORE_SIGMASK; | ||
142 | set_bit(TIF_SIGPENDING, &ti->flags); | ||
143 | } | ||
144 | #endif /* !__ASSEMBLY__ */ | ||
145 | |||
137 | #endif /* _ASM_IA64_THREAD_INFO_H */ | 146 | #endif /* _ASM_IA64_THREAD_INFO_H */ |
diff --git a/include/asm-ia64/types.h b/include/asm-ia64/types.h index 902850d12424..e36b3716e718 100644 --- a/include/asm-ia64/types.h +++ b/include/asm-ia64/types.h | |||
@@ -13,6 +13,8 @@ | |||
13 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 13 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <asm-generic/int-l64.h> | ||
17 | |||
16 | #ifdef __ASSEMBLY__ | 18 | #ifdef __ASSEMBLY__ |
17 | # define __IA64_UL(x) (x) | 19 | # define __IA64_UL(x) (x) |
18 | # define __IA64_UL_CONST(x) x | 20 | # define __IA64_UL_CONST(x) x |
@@ -28,39 +30,10 @@ | |||
28 | typedef unsigned int umode_t; | 30 | typedef unsigned int umode_t; |
29 | 31 | ||
30 | /* | 32 | /* |
31 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
32 | * header files exported to user space | ||
33 | */ | ||
34 | |||
35 | typedef __signed__ char __s8; | ||
36 | typedef unsigned char __u8; | ||
37 | |||
38 | typedef __signed__ short __s16; | ||
39 | typedef unsigned short __u16; | ||
40 | |||
41 | typedef __signed__ int __s32; | ||
42 | typedef unsigned int __u32; | ||
43 | |||
44 | typedef __signed__ long __s64; | ||
45 | typedef unsigned long __u64; | ||
46 | |||
47 | /* | ||
48 | * These aren't exported outside the kernel to avoid name space clashes | 33 | * These aren't exported outside the kernel to avoid name space clashes |
49 | */ | 34 | */ |
50 | # ifdef __KERNEL__ | 35 | # ifdef __KERNEL__ |
51 | 36 | ||
52 | typedef __s8 s8; | ||
53 | typedef __u8 u8; | ||
54 | |||
55 | typedef __s16 s16; | ||
56 | typedef __u16 u16; | ||
57 | |||
58 | typedef __s32 s32; | ||
59 | typedef __u32 u32; | ||
60 | |||
61 | typedef __s64 s64; | ||
62 | typedef __u64 u64; | ||
63 | |||
64 | #define BITS_PER_LONG 64 | 37 | #define BITS_PER_LONG 64 |
65 | 38 | ||
66 | /* DMA addresses are 64-bits wide, in general. */ | 39 | /* DMA addresses are 64-bits wide, in general. */ |
diff --git a/include/asm-ia64/uv/uv_hub.h b/include/asm-ia64/uv/uv_hub.h new file mode 100644 index 000000000000..f607018af4a1 --- /dev/null +++ b/include/asm-ia64/uv/uv_hub.h | |||
@@ -0,0 +1,309 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * SGI UV architectural definitions | ||
7 | * | ||
8 | * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_IA64_UV_HUB_H__ | ||
12 | #define __ASM_IA64_UV_HUB_H__ | ||
13 | |||
14 | #include <linux/numa.h> | ||
15 | #include <linux/percpu.h> | ||
16 | #include <asm/types.h> | ||
17 | #include <asm/percpu.h> | ||
18 | |||
19 | |||
20 | /* | ||
21 | * Addressing Terminology | ||
22 | * | ||
23 | * M - The low M bits of a physical address represent the offset | ||
24 | * into the blade local memory. RAM memory on a blade is physically | ||
25 | * contiguous (although various IO spaces may punch holes in | ||
26 | * it).. | ||
27 | * | ||
28 | * N - Number of bits in the node portion of a socket physical | ||
29 | * address. | ||
30 | * | ||
31 | * NASID - network ID of a router, Mbrick or Cbrick. Nasid values of | ||
32 | * routers always have low bit of 1, C/MBricks have low bit | ||
33 | * equal to 0. Most addressing macros that target UV hub chips | ||
34 | * right shift the NASID by 1 to exclude the always-zero bit. | ||
35 | * NASIDs contain up to 15 bits. | ||
36 | * | ||
37 | * GNODE - NASID right shifted by 1 bit. Most mmrs contain gnodes instead | ||
38 | * of nasids. | ||
39 | * | ||
40 | * PNODE - the low N bits of the GNODE. The PNODE is the most useful variant | ||
41 | * of the nasid for socket usage. | ||
42 | * | ||
43 | * | ||
44 | * NumaLink Global Physical Address Format: | ||
45 | * +--------------------------------+---------------------+ | ||
46 | * |00..000| GNODE | NodeOffset | | ||
47 | * +--------------------------------+---------------------+ | ||
48 | * |<-------53 - M bits --->|<--------M bits -----> | ||
49 | * | ||
50 | * M - number of node offset bits (35 .. 40) | ||
51 | * | ||
52 | * | ||
53 | * Memory/UV-HUB Processor Socket Address Format: | ||
54 | * +----------------+---------------+---------------------+ | ||
55 | * |00..000000000000| PNODE | NodeOffset | | ||
56 | * +----------------+---------------+---------------------+ | ||
57 | * <--- N bits --->|<--------M bits -----> | ||
58 | * | ||
59 | * M - number of node offset bits (35 .. 40) | ||
60 | * N - number of PNODE bits (0 .. 10) | ||
61 | * | ||
62 | * Note: M + N cannot currently exceed 44 (x86_64) or 46 (IA64). | ||
63 | * The actual values are configuration dependent and are set at | ||
64 | * boot time. M & N values are set by the hardware/BIOS at boot. | ||
65 | */ | ||
66 | |||
67 | |||
68 | /* | ||
69 | * Maximum number of bricks in all partitions and in all coherency domains. | ||
70 | * This is the total number of bricks accessible in the numalink fabric. It | ||
71 | * includes all C & M bricks. Routers are NOT included. | ||
72 | * | ||
73 | * This value is also the value of the maximum number of non-router NASIDs | ||
74 | * in the numalink fabric. | ||
75 | * | ||
76 | * NOTE: a brick may contain 1 or 2 OS nodes. Don't get these confused. | ||
77 | */ | ||
78 | #define UV_MAX_NUMALINK_BLADES 16384 | ||
79 | |||
80 | /* | ||
81 | * Maximum number of C/Mbricks within a software SSI (hardware may support | ||
82 | * more). | ||
83 | */ | ||
84 | #define UV_MAX_SSI_BLADES 1 | ||
85 | |||
86 | /* | ||
87 | * The largest possible NASID of a C or M brick (+ 2) | ||
88 | */ | ||
89 | #define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_NODES * 2) | ||
90 | |||
91 | /* | ||
92 | * The following defines attributes of the HUB chip. These attributes are | ||
93 | * frequently referenced and are kept in the per-cpu data areas of each cpu. | ||
94 | * They are kept together in a struct to minimize cache misses. | ||
95 | */ | ||
96 | struct uv_hub_info_s { | ||
97 | unsigned long global_mmr_base; | ||
98 | unsigned long gpa_mask; | ||
99 | unsigned long gnode_upper; | ||
100 | unsigned long lowmem_remap_top; | ||
101 | unsigned long lowmem_remap_base; | ||
102 | unsigned short pnode; | ||
103 | unsigned short pnode_mask; | ||
104 | unsigned short coherency_domain_number; | ||
105 | unsigned short numa_blade_id; | ||
106 | unsigned char blade_processor_id; | ||
107 | unsigned char m_val; | ||
108 | unsigned char n_val; | ||
109 | }; | ||
110 | DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); | ||
111 | #define uv_hub_info (&__get_cpu_var(__uv_hub_info)) | ||
112 | #define uv_cpu_hub_info(cpu) (&per_cpu(__uv_hub_info, cpu)) | ||
113 | |||
114 | /* | ||
115 | * Local & Global MMR space macros. | ||
116 | * Note: macros are intended to be used ONLY by inline functions | ||
117 | * in this file - not by other kernel code. | ||
118 | * n - NASID (full 15-bit global nasid) | ||
119 | * g - GNODE (full 15-bit global nasid, right shifted 1) | ||
120 | * p - PNODE (local part of nsids, right shifted 1) | ||
121 | */ | ||
122 | #define UV_NASID_TO_PNODE(n) (((n) >> 1) & uv_hub_info->pnode_mask) | ||
123 | #define UV_PNODE_TO_NASID(p) (((p) << 1) | uv_hub_info->gnode_upper) | ||
124 | |||
125 | #define UV_LOCAL_MMR_BASE 0xf4000000UL | ||
126 | #define UV_GLOBAL_MMR32_BASE 0xf8000000UL | ||
127 | #define UV_GLOBAL_MMR64_BASE (uv_hub_info->global_mmr_base) | ||
128 | |||
129 | #define UV_GLOBAL_MMR32_PNODE_SHIFT 15 | ||
130 | #define UV_GLOBAL_MMR64_PNODE_SHIFT 26 | ||
131 | |||
132 | #define UV_GLOBAL_MMR32_PNODE_BITS(p) ((p) << (UV_GLOBAL_MMR32_PNODE_SHIFT)) | ||
133 | |||
134 | #define UV_GLOBAL_MMR64_PNODE_BITS(p) \ | ||
135 | ((unsigned long)(p) << UV_GLOBAL_MMR64_PNODE_SHIFT) | ||
136 | |||
137 | /* | ||
138 | * Macros for converting between kernel virtual addresses, socket local physical | ||
139 | * addresses, and UV global physical addresses. | ||
140 | * Note: use the standard __pa() & __va() macros for converting | ||
141 | * between socket virtual and socket physical addresses. | ||
142 | */ | ||
143 | |||
144 | /* socket phys RAM --> UV global physical address */ | ||
145 | static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr) | ||
146 | { | ||
147 | if (paddr < uv_hub_info->lowmem_remap_top) | ||
148 | paddr += uv_hub_info->lowmem_remap_base; | ||
149 | return paddr | uv_hub_info->gnode_upper; | ||
150 | } | ||
151 | |||
152 | |||
153 | /* socket virtual --> UV global physical address */ | ||
154 | static inline unsigned long uv_gpa(void *v) | ||
155 | { | ||
156 | return __pa(v) | uv_hub_info->gnode_upper; | ||
157 | } | ||
158 | |||
159 | /* socket virtual --> UV global physical address */ | ||
160 | static inline void *uv_vgpa(void *v) | ||
161 | { | ||
162 | return (void *)uv_gpa(v); | ||
163 | } | ||
164 | |||
165 | /* UV global physical address --> socket virtual */ | ||
166 | static inline void *uv_va(unsigned long gpa) | ||
167 | { | ||
168 | return __va(gpa & uv_hub_info->gpa_mask); | ||
169 | } | ||
170 | |||
171 | /* pnode, offset --> socket virtual */ | ||
172 | static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset) | ||
173 | { | ||
174 | return __va(((unsigned long)pnode << uv_hub_info->m_val) | offset); | ||
175 | } | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Access global MMRs using the low memory MMR32 space. This region supports | ||
180 | * faster MMR access but not all MMRs are accessible in this space. | ||
181 | */ | ||
182 | static inline unsigned long *uv_global_mmr32_address(int pnode, | ||
183 | unsigned long offset) | ||
184 | { | ||
185 | return __va(UV_GLOBAL_MMR32_BASE | | ||
186 | UV_GLOBAL_MMR32_PNODE_BITS(pnode) | offset); | ||
187 | } | ||
188 | |||
189 | static inline void uv_write_global_mmr32(int pnode, unsigned long offset, | ||
190 | unsigned long val) | ||
191 | { | ||
192 | *uv_global_mmr32_address(pnode, offset) = val; | ||
193 | } | ||
194 | |||
195 | static inline unsigned long uv_read_global_mmr32(int pnode, | ||
196 | unsigned long offset) | ||
197 | { | ||
198 | return *uv_global_mmr32_address(pnode, offset); | ||
199 | } | ||
200 | |||
201 | /* | ||
202 | * Access Global MMR space using the MMR space located at the top of physical | ||
203 | * memory. | ||
204 | */ | ||
205 | static inline unsigned long *uv_global_mmr64_address(int pnode, | ||
206 | unsigned long offset) | ||
207 | { | ||
208 | return __va(UV_GLOBAL_MMR64_BASE | | ||
209 | UV_GLOBAL_MMR64_PNODE_BITS(pnode) | offset); | ||
210 | } | ||
211 | |||
212 | static inline void uv_write_global_mmr64(int pnode, unsigned long offset, | ||
213 | unsigned long val) | ||
214 | { | ||
215 | *uv_global_mmr64_address(pnode, offset) = val; | ||
216 | } | ||
217 | |||
218 | static inline unsigned long uv_read_global_mmr64(int pnode, | ||
219 | unsigned long offset) | ||
220 | { | ||
221 | return *uv_global_mmr64_address(pnode, offset); | ||
222 | } | ||
223 | |||
224 | /* | ||
225 | * Access hub local MMRs. Faster than using global space but only local MMRs | ||
226 | * are accessible. | ||
227 | */ | ||
228 | static inline unsigned long *uv_local_mmr_address(unsigned long offset) | ||
229 | { | ||
230 | return __va(UV_LOCAL_MMR_BASE | offset); | ||
231 | } | ||
232 | |||
233 | static inline unsigned long uv_read_local_mmr(unsigned long offset) | ||
234 | { | ||
235 | return *uv_local_mmr_address(offset); | ||
236 | } | ||
237 | |||
238 | static inline void uv_write_local_mmr(unsigned long offset, unsigned long val) | ||
239 | { | ||
240 | *uv_local_mmr_address(offset) = val; | ||
241 | } | ||
242 | |||
243 | /* | ||
244 | * Structures and definitions for converting between cpu, node, pnode, and blade | ||
245 | * numbers. | ||
246 | */ | ||
247 | |||
248 | /* Blade-local cpu number of current cpu. Numbered 0 .. <# cpus on the blade> */ | ||
249 | static inline int uv_blade_processor_id(void) | ||
250 | { | ||
251 | return smp_processor_id(); | ||
252 | } | ||
253 | |||
254 | /* Blade number of current cpu. Numnbered 0 .. <#blades -1> */ | ||
255 | static inline int uv_numa_blade_id(void) | ||
256 | { | ||
257 | return 0; | ||
258 | } | ||
259 | |||
260 | /* Convert a cpu number to the the UV blade number */ | ||
261 | static inline int uv_cpu_to_blade_id(int cpu) | ||
262 | { | ||
263 | return 0; | ||
264 | } | ||
265 | |||
266 | /* Convert linux node number to the UV blade number */ | ||
267 | static inline int uv_node_to_blade_id(int nid) | ||
268 | { | ||
269 | return 0; | ||
270 | } | ||
271 | |||
272 | /* Convert a blade id to the PNODE of the blade */ | ||
273 | static inline int uv_blade_to_pnode(int bid) | ||
274 | { | ||
275 | return 0; | ||
276 | } | ||
277 | |||
278 | /* Determine the number of possible cpus on a blade */ | ||
279 | static inline int uv_blade_nr_possible_cpus(int bid) | ||
280 | { | ||
281 | return num_possible_cpus(); | ||
282 | } | ||
283 | |||
284 | /* Determine the number of online cpus on a blade */ | ||
285 | static inline int uv_blade_nr_online_cpus(int bid) | ||
286 | { | ||
287 | return num_online_cpus(); | ||
288 | } | ||
289 | |||
290 | /* Convert a cpu id to the PNODE of the blade containing the cpu */ | ||
291 | static inline int uv_cpu_to_pnode(int cpu) | ||
292 | { | ||
293 | return 0; | ||
294 | } | ||
295 | |||
296 | /* Convert a linux node number to the PNODE of the blade */ | ||
297 | static inline int uv_node_to_pnode(int nid) | ||
298 | { | ||
299 | return 0; | ||
300 | } | ||
301 | |||
302 | /* Maximum possible number of blades */ | ||
303 | static inline int uv_num_possible_blades(void) | ||
304 | { | ||
305 | return 1; | ||
306 | } | ||
307 | |||
308 | #endif /* __ASM_IA64_UV_HUB__ */ | ||
309 | |||
diff --git a/include/asm-ia64/uv/uv_mmrs.h b/include/asm-ia64/uv/uv_mmrs.h new file mode 100644 index 000000000000..1cc1dbb0182f --- /dev/null +++ b/include/asm-ia64/uv/uv_mmrs.h | |||
@@ -0,0 +1,266 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * SGI UV MMR definitions | ||
7 | * | ||
8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_IA64_UV_MMRS__ | ||
12 | #define __ASM_IA64_UV_MMRS__ | ||
13 | |||
14 | /* | ||
15 | * AUTO GENERATED - Do not edit | ||
16 | */ | ||
17 | |||
18 | #define UV_MMR_ENABLE (1UL << 63) | ||
19 | |||
20 | /* ========================================================================= */ | ||
21 | /* UVH_NODE_ID */ | ||
22 | /* ========================================================================= */ | ||
23 | #define UVH_NODE_ID 0x0UL | ||
24 | |||
25 | #define UVH_NODE_ID_FORCE1_SHFT 0 | ||
26 | #define UVH_NODE_ID_FORCE1_MASK 0x0000000000000001UL | ||
27 | #define UVH_NODE_ID_MANUFACTURER_SHFT 1 | ||
28 | #define UVH_NODE_ID_MANUFACTURER_MASK 0x0000000000000ffeUL | ||
29 | #define UVH_NODE_ID_PART_NUMBER_SHFT 12 | ||
30 | #define UVH_NODE_ID_PART_NUMBER_MASK 0x000000000ffff000UL | ||
31 | #define UVH_NODE_ID_REVISION_SHFT 28 | ||
32 | #define UVH_NODE_ID_REVISION_MASK 0x00000000f0000000UL | ||
33 | #define UVH_NODE_ID_NODE_ID_SHFT 32 | ||
34 | #define UVH_NODE_ID_NODE_ID_MASK 0x00007fff00000000UL | ||
35 | #define UVH_NODE_ID_NODES_PER_BIT_SHFT 48 | ||
36 | #define UVH_NODE_ID_NODES_PER_BIT_MASK 0x007f000000000000UL | ||
37 | #define UVH_NODE_ID_NI_PORT_SHFT 56 | ||
38 | #define UVH_NODE_ID_NI_PORT_MASK 0x0f00000000000000UL | ||
39 | |||
40 | union uvh_node_id_u { | ||
41 | unsigned long v; | ||
42 | struct uvh_node_id_s { | ||
43 | unsigned long force1 : 1; /* RO */ | ||
44 | unsigned long manufacturer : 11; /* RO */ | ||
45 | unsigned long part_number : 16; /* RO */ | ||
46 | unsigned long revision : 4; /* RO */ | ||
47 | unsigned long node_id : 15; /* RW */ | ||
48 | unsigned long rsvd_47 : 1; /* */ | ||
49 | unsigned long nodes_per_bit : 7; /* RW */ | ||
50 | unsigned long rsvd_55 : 1; /* */ | ||
51 | unsigned long ni_port : 4; /* RO */ | ||
52 | unsigned long rsvd_60_63 : 4; /* */ | ||
53 | } s; | ||
54 | }; | ||
55 | |||
56 | /* ========================================================================= */ | ||
57 | /* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR */ | ||
58 | /* ========================================================================= */ | ||
59 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR 0x16000d0UL | ||
60 | |||
61 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_SHFT 24 | ||
62 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_MASK 0x00003fffff000000UL | ||
63 | |||
64 | union uvh_rh_gam_alias210_redirect_config_0_mmr_u { | ||
65 | unsigned long v; | ||
66 | struct uvh_rh_gam_alias210_redirect_config_0_mmr_s { | ||
67 | unsigned long rsvd_0_23 : 24; /* */ | ||
68 | unsigned long dest_base : 22; /* RW */ | ||
69 | unsigned long rsvd_46_63: 18; /* */ | ||
70 | } s; | ||
71 | }; | ||
72 | |||
73 | /* ========================================================================= */ | ||
74 | /* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR */ | ||
75 | /* ========================================================================= */ | ||
76 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR 0x16000e0UL | ||
77 | |||
78 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_SHFT 24 | ||
79 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_MASK 0x00003fffff000000UL | ||
80 | |||
81 | union uvh_rh_gam_alias210_redirect_config_1_mmr_u { | ||
82 | unsigned long v; | ||
83 | struct uvh_rh_gam_alias210_redirect_config_1_mmr_s { | ||
84 | unsigned long rsvd_0_23 : 24; /* */ | ||
85 | unsigned long dest_base : 22; /* RW */ | ||
86 | unsigned long rsvd_46_63: 18; /* */ | ||
87 | } s; | ||
88 | }; | ||
89 | |||
90 | /* ========================================================================= */ | ||
91 | /* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR */ | ||
92 | /* ========================================================================= */ | ||
93 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR 0x16000f0UL | ||
94 | |||
95 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_SHFT 24 | ||
96 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_MASK 0x00003fffff000000UL | ||
97 | |||
98 | union uvh_rh_gam_alias210_redirect_config_2_mmr_u { | ||
99 | unsigned long v; | ||
100 | struct uvh_rh_gam_alias210_redirect_config_2_mmr_s { | ||
101 | unsigned long rsvd_0_23 : 24; /* */ | ||
102 | unsigned long dest_base : 22; /* RW */ | ||
103 | unsigned long rsvd_46_63: 18; /* */ | ||
104 | } s; | ||
105 | }; | ||
106 | |||
107 | /* ========================================================================= */ | ||
108 | /* UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR */ | ||
109 | /* ========================================================================= */ | ||
110 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR 0x1600010UL | ||
111 | |||
112 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_SHFT 28 | ||
113 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffff0000000UL | ||
114 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_SHFT 46 | ||
115 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_MASK 0x0000400000000000UL | ||
116 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_SHFT 52 | ||
117 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_MASK 0x00f0000000000000UL | ||
118 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63 | ||
119 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL | ||
120 | |||
121 | union uvh_rh_gam_gru_overlay_config_mmr_u { | ||
122 | unsigned long v; | ||
123 | struct uvh_rh_gam_gru_overlay_config_mmr_s { | ||
124 | unsigned long rsvd_0_27: 28; /* */ | ||
125 | unsigned long base : 18; /* RW */ | ||
126 | unsigned long gr4 : 1; /* RW */ | ||
127 | unsigned long rsvd_47_51: 5; /* */ | ||
128 | unsigned long n_gru : 4; /* RW */ | ||
129 | unsigned long rsvd_56_62: 7; /* */ | ||
130 | unsigned long enable : 1; /* RW */ | ||
131 | } s; | ||
132 | }; | ||
133 | |||
134 | /* ========================================================================= */ | ||
135 | /* UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR */ | ||
136 | /* ========================================================================= */ | ||
137 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR 0x1600028UL | ||
138 | |||
139 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_SHFT 26 | ||
140 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffffc000000UL | ||
141 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_SHFT 46 | ||
142 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_MASK 0x0000400000000000UL | ||
143 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63 | ||
144 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL | ||
145 | |||
146 | union uvh_rh_gam_mmr_overlay_config_mmr_u { | ||
147 | unsigned long v; | ||
148 | struct uvh_rh_gam_mmr_overlay_config_mmr_s { | ||
149 | unsigned long rsvd_0_25: 26; /* */ | ||
150 | unsigned long base : 20; /* RW */ | ||
151 | unsigned long dual_hub : 1; /* RW */ | ||
152 | unsigned long rsvd_47_62: 16; /* */ | ||
153 | unsigned long enable : 1; /* RW */ | ||
154 | } s; | ||
155 | }; | ||
156 | |||
157 | /* ========================================================================= */ | ||
158 | /* UVH_RTC */ | ||
159 | /* ========================================================================= */ | ||
160 | #define UVH_RTC 0x28000UL | ||
161 | |||
162 | #define UVH_RTC_REAL_TIME_CLOCK_SHFT 0 | ||
163 | #define UVH_RTC_REAL_TIME_CLOCK_MASK 0x00ffffffffffffffUL | ||
164 | |||
165 | union uvh_rtc_u { | ||
166 | unsigned long v; | ||
167 | struct uvh_rtc_s { | ||
168 | unsigned long real_time_clock : 56; /* RW */ | ||
169 | unsigned long rsvd_56_63 : 8; /* */ | ||
170 | } s; | ||
171 | }; | ||
172 | |||
173 | /* ========================================================================= */ | ||
174 | /* UVH_SI_ADDR_MAP_CONFIG */ | ||
175 | /* ========================================================================= */ | ||
176 | #define UVH_SI_ADDR_MAP_CONFIG 0xc80000UL | ||
177 | |||
178 | #define UVH_SI_ADDR_MAP_CONFIG_M_SKT_SHFT 0 | ||
179 | #define UVH_SI_ADDR_MAP_CONFIG_M_SKT_MASK 0x000000000000003fUL | ||
180 | #define UVH_SI_ADDR_MAP_CONFIG_N_SKT_SHFT 8 | ||
181 | #define UVH_SI_ADDR_MAP_CONFIG_N_SKT_MASK 0x0000000000000f00UL | ||
182 | |||
183 | union uvh_si_addr_map_config_u { | ||
184 | unsigned long v; | ||
185 | struct uvh_si_addr_map_config_s { | ||
186 | unsigned long m_skt : 6; /* RW */ | ||
187 | unsigned long rsvd_6_7: 2; /* */ | ||
188 | unsigned long n_skt : 4; /* RW */ | ||
189 | unsigned long rsvd_12_63: 52; /* */ | ||
190 | } s; | ||
191 | }; | ||
192 | |||
193 | /* ========================================================================= */ | ||
194 | /* UVH_SI_ALIAS0_OVERLAY_CONFIG */ | ||
195 | /* ========================================================================= */ | ||
196 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG 0xc80008UL | ||
197 | |||
198 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_SHFT 24 | ||
199 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL | ||
200 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_SHFT 48 | ||
201 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL | ||
202 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_SHFT 63 | ||
203 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL | ||
204 | |||
205 | union uvh_si_alias0_overlay_config_u { | ||
206 | unsigned long v; | ||
207 | struct uvh_si_alias0_overlay_config_s { | ||
208 | unsigned long rsvd_0_23: 24; /* */ | ||
209 | unsigned long base : 8; /* RW */ | ||
210 | unsigned long rsvd_32_47: 16; /* */ | ||
211 | unsigned long m_alias : 5; /* RW */ | ||
212 | unsigned long rsvd_53_62: 10; /* */ | ||
213 | unsigned long enable : 1; /* RW */ | ||
214 | } s; | ||
215 | }; | ||
216 | |||
217 | /* ========================================================================= */ | ||
218 | /* UVH_SI_ALIAS1_OVERLAY_CONFIG */ | ||
219 | /* ========================================================================= */ | ||
220 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG 0xc80010UL | ||
221 | |||
222 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_SHFT 24 | ||
223 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL | ||
224 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_SHFT 48 | ||
225 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL | ||
226 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_SHFT 63 | ||
227 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL | ||
228 | |||
229 | union uvh_si_alias1_overlay_config_u { | ||
230 | unsigned long v; | ||
231 | struct uvh_si_alias1_overlay_config_s { | ||
232 | unsigned long rsvd_0_23: 24; /* */ | ||
233 | unsigned long base : 8; /* RW */ | ||
234 | unsigned long rsvd_32_47: 16; /* */ | ||
235 | unsigned long m_alias : 5; /* RW */ | ||
236 | unsigned long rsvd_53_62: 10; /* */ | ||
237 | unsigned long enable : 1; /* RW */ | ||
238 | } s; | ||
239 | }; | ||
240 | |||
241 | /* ========================================================================= */ | ||
242 | /* UVH_SI_ALIAS2_OVERLAY_CONFIG */ | ||
243 | /* ========================================================================= */ | ||
244 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG 0xc80018UL | ||
245 | |||
246 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_SHFT 24 | ||
247 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL | ||
248 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_SHFT 48 | ||
249 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL | ||
250 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_SHFT 63 | ||
251 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL | ||
252 | |||
253 | union uvh_si_alias2_overlay_config_u { | ||
254 | unsigned long v; | ||
255 | struct uvh_si_alias2_overlay_config_s { | ||
256 | unsigned long rsvd_0_23: 24; /* */ | ||
257 | unsigned long base : 8; /* RW */ | ||
258 | unsigned long rsvd_32_47: 16; /* */ | ||
259 | unsigned long m_alias : 5; /* RW */ | ||
260 | unsigned long rsvd_53_62: 10; /* */ | ||
261 | unsigned long enable : 1; /* RW */ | ||
262 | } s; | ||
263 | }; | ||
264 | |||
265 | |||
266 | #endif /* __ASM_IA64_UV_MMRS__ */ | ||
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index b64c16639a7b..bc9f7fff0ac3 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h | |||
@@ -1,28 +1,12 @@ | |||
1 | #ifndef _ASM_M32R_TYPES_H | 1 | #ifndef _ASM_M32R_TYPES_H |
2 | #define _ASM_M32R_TYPES_H | 2 | #define _ASM_M32R_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
5 | 7 | ||
6 | typedef unsigned short umode_t; | 8 | typedef unsigned short umode_t; |
7 | 9 | ||
8 | /* | ||
9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
10 | * header files exported to user space | ||
11 | */ | ||
12 | |||
13 | typedef __signed__ char __s8; | ||
14 | typedef unsigned char __u8; | ||
15 | |||
16 | typedef __signed__ short __s16; | ||
17 | typedef unsigned short __u16; | ||
18 | |||
19 | typedef __signed__ int __s32; | ||
20 | typedef unsigned int __u32; | ||
21 | |||
22 | #if defined(__GNUC__) | ||
23 | __extension__ typedef __signed__ long long __s64; | ||
24 | __extension__ typedef unsigned long long __u64; | ||
25 | #endif | ||
26 | #endif /* __ASSEMBLY__ */ | 10 | #endif /* __ASSEMBLY__ */ |
27 | 11 | ||
28 | /* | 12 | /* |
@@ -34,18 +18,6 @@ __extension__ typedef unsigned long long __u64; | |||
34 | 18 | ||
35 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
36 | 20 | ||
37 | typedef signed char s8; | ||
38 | typedef unsigned char u8; | ||
39 | |||
40 | typedef signed short s16; | ||
41 | typedef unsigned short u16; | ||
42 | |||
43 | typedef signed int s32; | ||
44 | typedef unsigned int u32; | ||
45 | |||
46 | typedef signed long long s64; | ||
47 | typedef unsigned long long u64; | ||
48 | |||
49 | /* DMA addresses are 32-bits wide. */ | 21 | /* DMA addresses are 32-bits wide. */ |
50 | 22 | ||
51 | typedef u32 dma_addr_t; | 23 | typedef u32 dma_addr_t; |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index bd8c83765a5c..1c7047bea200 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/setup.h> | ||
17 | 18 | ||
18 | #define VERIFY_READ 0 | 19 | #define VERIFY_READ 0 |
19 | #define VERIFY_WRITE 1 | 20 | #define VERIFY_WRITE 1 |
@@ -106,7 +107,6 @@ static inline void set_fs(mm_segment_t s) | |||
106 | #else | 107 | #else |
107 | static inline int access_ok(int type, const void *addr, unsigned long size) | 108 | static inline int access_ok(int type, const void *addr, unsigned long size) |
108 | { | 109 | { |
109 | extern unsigned long memory_start, memory_end; | ||
110 | unsigned long val = (unsigned long)addr; | 110 | unsigned long val = (unsigned long)addr; |
111 | 111 | ||
112 | return ((val >= memory_start) && ((val + size) < memory_end)); | 112 | return ((val >= memory_start) && ((val + size) < memory_end)); |
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 83d1f286230b..3e8106442d5a 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h | |||
@@ -410,8 +410,49 @@ static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size, | |||
410 | res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); | 410 | res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); |
411 | return (p - addr) * 32 + res; | 411 | return (p - addr) * 32 + res; |
412 | } | 412 | } |
413 | #define ext2_find_next_bit(addr, size, off) \ | 413 | |
414 | generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) | 414 | static inline int ext2_find_first_bit(const void *vaddr, unsigned size) |
415 | { | ||
416 | const unsigned long *p = vaddr, *addr = vaddr; | ||
417 | int res; | ||
418 | |||
419 | if (!size) | ||
420 | return 0; | ||
421 | |||
422 | size = (size >> 5) + ((size & 31) > 0); | ||
423 | while (*p++ == 0UL) { | ||
424 | if (--size == 0) | ||
425 | return (p - addr) << 5; | ||
426 | } | ||
427 | |||
428 | --p; | ||
429 | for (res = 0; res < 32; res++) | ||
430 | if (ext2_test_bit(res, p)) | ||
431 | break; | ||
432 | return (p - addr) * 32 + res; | ||
433 | } | ||
434 | |||
435 | static inline int ext2_find_next_bit(const void *vaddr, unsigned size, | ||
436 | unsigned offset) | ||
437 | { | ||
438 | const unsigned long *addr = vaddr; | ||
439 | const unsigned long *p = addr + (offset >> 5); | ||
440 | int bit = offset & 31UL, res; | ||
441 | |||
442 | if (offset >= size) | ||
443 | return size; | ||
444 | |||
445 | if (bit) { | ||
446 | /* Look for one in first longword */ | ||
447 | for (res = bit; res < 32; res++) | ||
448 | if (ext2_test_bit(res, p)) | ||
449 | return (p - addr) * 32 + res; | ||
450 | p++; | ||
451 | } | ||
452 | /* No set bit yet, search remaining full bytes for a set bit */ | ||
453 | res = ext2_find_first_bit(p, size - 32 * (p - addr)); | ||
454 | return (p - addr) * 32 + res; | ||
455 | } | ||
415 | 456 | ||
416 | #endif /* __KERNEL__ */ | 457 | #endif /* __KERNEL__ */ |
417 | 458 | ||
diff --git a/include/asm-m68k/bug.h b/include/asm-m68k/bug.h index 7b60776cc966..e5b528deb8a8 100644 --- a/include/asm-m68k/bug.h +++ b/include/asm-m68k/bug.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #ifndef CONFIG_SUN3 | 7 | #ifndef CONFIG_SUN3 |
8 | #define BUG() do { \ | 8 | #define BUG() do { \ |
9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 9 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ |
10 | asm volatile("illegal"); \ | 10 | __builtin_trap(); \ |
11 | } while (0) | 11 | } while (0) |
12 | #else | 12 | #else |
13 | #define BUG() do { \ | 13 | #define BUG() do { \ |
@@ -17,7 +17,7 @@ | |||
17 | #endif | 17 | #endif |
18 | #else | 18 | #else |
19 | #define BUG() do { \ | 19 | #define BUG() do { \ |
20 | asm volatile("illegal"); \ | 20 | __builtin_trap(); \ |
21 | } while (0) | 21 | } while (0) |
22 | #endif | 22 | #endif |
23 | 23 | ||
diff --git a/include/asm-m68k/io.h b/include/asm-m68k/io.h index baf4f9b8acfc..657187f0c7c2 100644 --- a/include/asm-m68k/io.h +++ b/include/asm-m68k/io.h | |||
@@ -91,20 +91,20 @@ extern unsigned long gg2_isa_base; | |||
91 | #undef MULTI_ISA | 91 | #undef MULTI_ISA |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #define Q40_ISA (1) | 94 | #define ISA_TYPE_Q40 (1) |
95 | #define GG2_ISA (2) | 95 | #define ISA_TYPE_GG2 (2) |
96 | #define AG_ISA (3) | 96 | #define ISA_TYPE_AG (3) |
97 | 97 | ||
98 | #if defined(CONFIG_Q40) && !defined(MULTI_ISA) | 98 | #if defined(CONFIG_Q40) && !defined(MULTI_ISA) |
99 | #define ISA_TYPE Q40_ISA | 99 | #define ISA_TYPE ISA_TYPE_Q40 |
100 | #define ISA_SEX 0 | 100 | #define ISA_SEX 0 |
101 | #endif | 101 | #endif |
102 | #if defined(CONFIG_AMIGA_PCMCIA) && !defined(MULTI_ISA) | 102 | #if defined(CONFIG_AMIGA_PCMCIA) && !defined(MULTI_ISA) |
103 | #define ISA_TYPE AG_ISA | 103 | #define ISA_TYPE ISA_TYPE_AG |
104 | #define ISA_SEX 1 | 104 | #define ISA_SEX 1 |
105 | #endif | 105 | #endif |
106 | #if defined(CONFIG_GG2) && !defined(MULTI_ISA) | 106 | #if defined(CONFIG_GG2) && !defined(MULTI_ISA) |
107 | #define ISA_TYPE GG2_ISA | 107 | #define ISA_TYPE ISA_TYPE_GG2 |
108 | #define ISA_SEX 0 | 108 | #define ISA_SEX 0 |
109 | #endif | 109 | #endif |
110 | 110 | ||
@@ -126,13 +126,13 @@ static inline u8 __iomem *isa_itb(unsigned long addr) | |||
126 | switch(ISA_TYPE) | 126 | switch(ISA_TYPE) |
127 | { | 127 | { |
128 | #ifdef CONFIG_Q40 | 128 | #ifdef CONFIG_Q40 |
129 | case Q40_ISA: return (u8 __iomem *)Q40_ISA_IO_B(addr); | 129 | case ISA_TYPE_Q40: return (u8 __iomem *)Q40_ISA_IO_B(addr); |
130 | #endif | 130 | #endif |
131 | #ifdef CONFIG_GG2 | 131 | #ifdef CONFIG_GG2 |
132 | case GG2_ISA: return (u8 __iomem *)GG2_ISA_IO_B(addr); | 132 | case ISA_TYPE_GG2: return (u8 __iomem *)GG2_ISA_IO_B(addr); |
133 | #endif | 133 | #endif |
134 | #ifdef CONFIG_AMIGA_PCMCIA | 134 | #ifdef CONFIG_AMIGA_PCMCIA |
135 | case AG_ISA: return (u8 __iomem *)AG_ISA_IO_B(addr); | 135 | case ISA_TYPE_AG: return (u8 __iomem *)AG_ISA_IO_B(addr); |
136 | #endif | 136 | #endif |
137 | default: return NULL; /* avoid warnings, just in case */ | 137 | default: return NULL; /* avoid warnings, just in case */ |
138 | } | 138 | } |
@@ -142,13 +142,13 @@ static inline u16 __iomem *isa_itw(unsigned long addr) | |||
142 | switch(ISA_TYPE) | 142 | switch(ISA_TYPE) |
143 | { | 143 | { |
144 | #ifdef CONFIG_Q40 | 144 | #ifdef CONFIG_Q40 |
145 | case Q40_ISA: return (u16 __iomem *)Q40_ISA_IO_W(addr); | 145 | case ISA_TYPE_Q40: return (u16 __iomem *)Q40_ISA_IO_W(addr); |
146 | #endif | 146 | #endif |
147 | #ifdef CONFIG_GG2 | 147 | #ifdef CONFIG_GG2 |
148 | case GG2_ISA: return (u16 __iomem *)GG2_ISA_IO_W(addr); | 148 | case ISA_TYPE_GG2: return (u16 __iomem *)GG2_ISA_IO_W(addr); |
149 | #endif | 149 | #endif |
150 | #ifdef CONFIG_AMIGA_PCMCIA | 150 | #ifdef CONFIG_AMIGA_PCMCIA |
151 | case AG_ISA: return (u16 __iomem *)AG_ISA_IO_W(addr); | 151 | case ISA_TYPE_AG: return (u16 __iomem *)AG_ISA_IO_W(addr); |
152 | #endif | 152 | #endif |
153 | default: return NULL; /* avoid warnings, just in case */ | 153 | default: return NULL; /* avoid warnings, just in case */ |
154 | } | 154 | } |
@@ -158,7 +158,7 @@ static inline u32 __iomem *isa_itl(unsigned long addr) | |||
158 | switch(ISA_TYPE) | 158 | switch(ISA_TYPE) |
159 | { | 159 | { |
160 | #ifdef CONFIG_AMIGA_PCMCIA | 160 | #ifdef CONFIG_AMIGA_PCMCIA |
161 | case AG_ISA: return (u32 __iomem *)AG_ISA_IO_W(addr); | 161 | case ISA_TYPE_AG: return (u32 __iomem *)AG_ISA_IO_W(addr); |
162 | #endif | 162 | #endif |
163 | default: return 0; /* avoid warnings, just in case */ | 163 | default: return 0; /* avoid warnings, just in case */ |
164 | } | 164 | } |
@@ -168,13 +168,13 @@ static inline u8 __iomem *isa_mtb(unsigned long addr) | |||
168 | switch(ISA_TYPE) | 168 | switch(ISA_TYPE) |
169 | { | 169 | { |
170 | #ifdef CONFIG_Q40 | 170 | #ifdef CONFIG_Q40 |
171 | case Q40_ISA: return (u8 __iomem *)Q40_ISA_MEM_B(addr); | 171 | case ISA_TYPE_Q40: return (u8 __iomem *)Q40_ISA_MEM_B(addr); |
172 | #endif | 172 | #endif |
173 | #ifdef CONFIG_GG2 | 173 | #ifdef CONFIG_GG2 |
174 | case GG2_ISA: return (u8 __iomem *)GG2_ISA_MEM_B(addr); | 174 | case ISA_TYPE_GG2: return (u8 __iomem *)GG2_ISA_MEM_B(addr); |
175 | #endif | 175 | #endif |
176 | #ifdef CONFIG_AMIGA_PCMCIA | 176 | #ifdef CONFIG_AMIGA_PCMCIA |
177 | case AG_ISA: return (u8 __iomem *)addr; | 177 | case ISA_TYPE_AG: return (u8 __iomem *)addr; |
178 | #endif | 178 | #endif |
179 | default: return NULL; /* avoid warnings, just in case */ | 179 | default: return NULL; /* avoid warnings, just in case */ |
180 | } | 180 | } |
@@ -184,13 +184,13 @@ static inline u16 __iomem *isa_mtw(unsigned long addr) | |||
184 | switch(ISA_TYPE) | 184 | switch(ISA_TYPE) |
185 | { | 185 | { |
186 | #ifdef CONFIG_Q40 | 186 | #ifdef CONFIG_Q40 |
187 | case Q40_ISA: return (u16 __iomem *)Q40_ISA_MEM_W(addr); | 187 | case ISA_TYPE_Q40: return (u16 __iomem *)Q40_ISA_MEM_W(addr); |
188 | #endif | 188 | #endif |
189 | #ifdef CONFIG_GG2 | 189 | #ifdef CONFIG_GG2 |
190 | case GG2_ISA: return (u16 __iomem *)GG2_ISA_MEM_W(addr); | 190 | case ISA_TYPE_GG2: return (u16 __iomem *)GG2_ISA_MEM_W(addr); |
191 | #endif | 191 | #endif |
192 | #ifdef CONFIG_AMIGA_PCMCIA | 192 | #ifdef CONFIG_AMIGA_PCMCIA |
193 | case AG_ISA: return (u16 __iomem *)addr; | 193 | case ISA_TYPE_AG: return (u16 __iomem *)addr; |
194 | #endif | 194 | #endif |
195 | default: return NULL; /* avoid warnings, just in case */ | 195 | default: return NULL; /* avoid warnings, just in case */ |
196 | } | 196 | } |
@@ -218,13 +218,13 @@ static inline void isa_delay(void) | |||
218 | switch(ISA_TYPE) | 218 | switch(ISA_TYPE) |
219 | { | 219 | { |
220 | #ifdef CONFIG_Q40 | 220 | #ifdef CONFIG_Q40 |
221 | case Q40_ISA: isa_outb(0,0x80); break; | 221 | case ISA_TYPE_Q40: isa_outb(0,0x80); break; |
222 | #endif | 222 | #endif |
223 | #ifdef CONFIG_GG2 | 223 | #ifdef CONFIG_GG2 |
224 | case GG2_ISA: break; | 224 | case ISA_TYPE_GG2: break; |
225 | #endif | 225 | #endif |
226 | #ifdef CONFIG_AMIGA_PCMCIA | 226 | #ifdef CONFIG_AMIGA_PCMCIA |
227 | case AG_ISA: break; | 227 | case ISA_TYPE_AG: break; |
228 | #endif | 228 | #endif |
229 | default: break; /* avoid warnings */ | 229 | default: break; /* avoid warnings */ |
230 | } | 230 | } |
diff --git a/include/asm-m68k/machw.h b/include/asm-m68k/machw.h index d2e0e25d5c90..35624998291c 100644 --- a/include/asm-m68k/machw.h +++ b/include/asm-m68k/machw.h | |||
@@ -66,36 +66,6 @@ struct MAC_SCC | |||
66 | # define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS)) | 66 | # define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS)) |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | /* hardware stuff */ | ||
70 | |||
71 | #define MACHW_DECLARE(name) unsigned name : 1 | ||
72 | #define MACHW_SET(name) (mac_hw_present.name = 1) | ||
73 | #define MACHW_PRESENT(name) (mac_hw_present.name) | ||
74 | |||
75 | struct mac_hw_present { | ||
76 | /* video hardware */ | ||
77 | /* sound hardware */ | ||
78 | /* disk storage interfaces */ | ||
79 | MACHW_DECLARE(MAC_SCSI_80); /* Directly mapped NCR5380 */ | ||
80 | MACHW_DECLARE(MAC_SCSI_96); /* 53c9[46] */ | ||
81 | MACHW_DECLARE(MAC_SCSI_96_2); /* 2nd 53c9[46] Q900 and Q950 */ | ||
82 | MACHW_DECLARE(IDE); /* IDE Interface */ | ||
83 | /* other I/O hardware */ | ||
84 | MACHW_DECLARE(SCC); /* Serial Communications Contr. */ | ||
85 | /* DMA */ | ||
86 | MACHW_DECLARE(SCSI_DMA); /* DMA for the NCR5380 */ | ||
87 | /* real time clocks */ | ||
88 | MACHW_DECLARE(RTC_CLK); /* clock chip */ | ||
89 | /* supporting hardware */ | ||
90 | MACHW_DECLARE(VIA1); /* Versatile Interface Ad. 1 */ | ||
91 | MACHW_DECLARE(VIA2); /* Versatile Interface Ad. 2 */ | ||
92 | MACHW_DECLARE(RBV); /* Versatile Interface Ad. 2+ */ | ||
93 | /* NUBUS */ | ||
94 | MACHW_DECLARE(NUBUS); /* NUBUS */ | ||
95 | }; | ||
96 | |||
97 | extern struct mac_hw_present mac_hw_present; | ||
98 | |||
99 | #endif /* __ASSEMBLY__ */ | 69 | #endif /* __ASSEMBLY__ */ |
100 | 70 | ||
101 | #endif /* linux/machw.h */ | 71 | #endif /* linux/machw.h */ |
diff --git a/include/asm-m68k/setup.h b/include/asm-m68k/setup.h index 2a8853cd6554..4dfb3952b375 100644 --- a/include/asm-m68k/setup.h +++ b/include/asm-m68k/setup.h | |||
@@ -248,7 +248,7 @@ extern unsigned long m68k_machtype; | |||
248 | #ifndef __ASSEMBLY__ | 248 | #ifndef __ASSEMBLY__ |
249 | extern unsigned long m68k_cputype; | 249 | extern unsigned long m68k_cputype; |
250 | extern unsigned long m68k_fputype; | 250 | extern unsigned long m68k_fputype; |
251 | extern unsigned long m68k_mmutype; /* Not really used yet */ | 251 | extern unsigned long m68k_mmutype; |
252 | #ifdef CONFIG_VME | 252 | #ifdef CONFIG_VME |
253 | extern unsigned long vme_brdtype; | 253 | extern unsigned long vme_brdtype; |
254 | #endif | 254 | #endif |
diff --git a/include/asm-m68k/types.h b/include/asm-m68k/types.h index c35c09d93b66..6441cb5f8e7c 100644 --- a/include/asm-m68k/types.h +++ b/include/asm-m68k/types.h | |||
@@ -8,30 +8,12 @@ | |||
8 | * not a major issue. However, for interoperability, libraries still | 8 | * not a major issue. However, for interoperability, libraries still |
9 | * need to be careful to avoid a name clashes. | 9 | * need to be careful to avoid a name clashes. |
10 | */ | 10 | */ |
11 | #include <asm-generic/int-ll64.h> | ||
11 | 12 | ||
12 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
13 | 14 | ||
14 | typedef unsigned short umode_t; | 15 | typedef unsigned short umode_t; |
15 | 16 | ||
16 | /* | ||
17 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
18 | * header files exported to user space | ||
19 | */ | ||
20 | |||
21 | typedef __signed__ char __s8; | ||
22 | typedef unsigned char __u8; | ||
23 | |||
24 | typedef __signed__ short __s16; | ||
25 | typedef unsigned short __u16; | ||
26 | |||
27 | typedef __signed__ int __s32; | ||
28 | typedef unsigned int __u32; | ||
29 | |||
30 | #if defined(__GNUC__) | ||
31 | __extension__ typedef __signed__ long long __s64; | ||
32 | __extension__ typedef unsigned long long __u64; | ||
33 | #endif | ||
34 | |||
35 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLY__ */ |
36 | 18 | ||
37 | /* | 19 | /* |
@@ -43,18 +25,6 @@ __extension__ typedef unsigned long long __u64; | |||
43 | 25 | ||
44 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
45 | 27 | ||
46 | typedef signed char s8; | ||
47 | typedef unsigned char u8; | ||
48 | |||
49 | typedef signed short s16; | ||
50 | typedef unsigned short u16; | ||
51 | |||
52 | typedef signed int s32; | ||
53 | typedef unsigned int u32; | ||
54 | |||
55 | typedef signed long long s64; | ||
56 | typedef unsigned long long u64; | ||
57 | |||
58 | /* DMA addresses are always 32-bits wide */ | 28 | /* DMA addresses are always 32-bits wide */ |
59 | 29 | ||
60 | typedef u32 dma_addr_t; | 30 | typedef u32 dma_addr_t; |
diff --git a/include/asm-m68k/uaccess.h b/include/asm-m68k/uaccess.h index 5c1264cf0c65..7107f3fbdbb6 100644 --- a/include/asm-m68k/uaccess.h +++ b/include/asm-m68k/uaccess.h | |||
@@ -14,7 +14,11 @@ | |||
14 | #define VERIFY_WRITE 1 | 14 | #define VERIFY_WRITE 1 |
15 | 15 | ||
16 | /* We let the MMU do all checking */ | 16 | /* We let the MMU do all checking */ |
17 | #define access_ok(type,addr,size) 1 | 17 | static inline int access_ok(int type, const void __user *addr, |
18 | unsigned long size) | ||
19 | { | ||
20 | return 1; | ||
21 | } | ||
18 | 22 | ||
19 | /* | 23 | /* |
20 | * The exception table consists of pairs of addresses: the first is the | 24 | * The exception table consists of pairs of addresses: the first is the |
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index a798d6299a79..1232be3885b0 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -283,10 +283,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
283 | " beqz %0, 2f \n" | 283 | " beqz %0, 2f \n" |
284 | " subu %0, %1, %3 \n" | 284 | " subu %0, %1, %3 \n" |
285 | " .set reorder \n" | 285 | " .set reorder \n" |
286 | "1: \n" | ||
287 | " .subsection 2 \n" | 286 | " .subsection 2 \n" |
288 | "2: b 1b \n" | 287 | "2: b 1b \n" |
289 | " .previous \n" | 288 | " .previous \n" |
289 | "1: \n" | ||
290 | " .set mips0 \n" | 290 | " .set mips0 \n" |
291 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 291 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
292 | : "Ir" (i), "m" (v->counter) | 292 | : "Ir" (i), "m" (v->counter) |
@@ -664,10 +664,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
664 | " beqz %0, 2f \n" | 664 | " beqz %0, 2f \n" |
665 | " dsubu %0, %1, %3 \n" | 665 | " dsubu %0, %1, %3 \n" |
666 | " .set reorder \n" | 666 | " .set reorder \n" |
667 | "1: \n" | ||
668 | " .subsection 2 \n" | 667 | " .subsection 2 \n" |
669 | "2: b 1b \n" | 668 | "2: b 1b \n" |
670 | " .previous \n" | 669 | " .previous \n" |
670 | "1: \n" | ||
671 | " .set mips0 \n" | 671 | " .set mips0 \n" |
672 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 672 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
673 | : "Ir" (i), "m" (v->counter) | 673 | : "Ir" (i), "m" (v->counter) |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index c2bd126c3b4e..642724734eba 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -558,11 +558,13 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long * | |||
558 | __clear_bit(nr, addr); | 558 | __clear_bit(nr, addr); |
559 | } | 559 | } |
560 | 560 | ||
561 | #if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) | ||
562 | |||
561 | /* | 563 | /* |
562 | * Return the bit position (0..63) of the most significant 1 bit in a word | 564 | * Return the bit position (0..63) of the most significant 1 bit in a word |
563 | * Returns -1 if no 1 bit exists | 565 | * Returns -1 if no 1 bit exists |
564 | */ | 566 | */ |
565 | static inline int __ilog2(unsigned long x) | 567 | static inline unsigned long __fls(unsigned long x) |
566 | { | 568 | { |
567 | int lz; | 569 | int lz; |
568 | 570 | ||
@@ -591,13 +593,6 @@ static inline int __ilog2(unsigned long x) | |||
591 | return 63 - lz; | 593 | return 63 - lz; |
592 | } | 594 | } |
593 | 595 | ||
594 | static inline unsigned long __fls(unsigned long x) | ||
595 | { | ||
596 | return __ilog2(x); | ||
597 | } | ||
598 | |||
599 | #if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) | ||
600 | |||
601 | /* | 596 | /* |
602 | * __ffs - find first bit in word. | 597 | * __ffs - find first bit in word. |
603 | * @word: The word to search | 598 | * @word: The word to search |
@@ -607,7 +602,7 @@ static inline unsigned long __fls(unsigned long x) | |||
607 | */ | 602 | */ |
608 | static inline unsigned long __ffs(unsigned long word) | 603 | static inline unsigned long __ffs(unsigned long word) |
609 | { | 604 | { |
610 | return __ilog2(word & -word); | 605 | return __fls(word & -word); |
611 | } | 606 | } |
612 | 607 | ||
613 | /* | 608 | /* |
@@ -654,6 +649,7 @@ static inline int ffs(int word) | |||
654 | #else | 649 | #else |
655 | 650 | ||
656 | #include <asm-generic/bitops/__ffs.h> | 651 | #include <asm-generic/bitops/__ffs.h> |
652 | #include <asm-generic/bitops/__fls.h> | ||
657 | #include <asm-generic/bitops/ffs.h> | 653 | #include <asm-generic/bitops/ffs.h> |
658 | #include <asm-generic/bitops/fls.h> | 654 | #include <asm-generic/bitops/fls.h> |
659 | #include <asm-generic/bitops/fls64.h> | 655 | #include <asm-generic/bitops/fls64.h> |
diff --git a/include/asm-mips/compiler.h b/include/asm-mips/compiler.h index aa6b876bbd78..71f5c5cfc58a 100644 --- a/include/asm-mips/compiler.h +++ b/include/asm-mips/compiler.h | |||
@@ -9,10 +9,10 @@ | |||
9 | #define _ASM_COMPILER_H | 9 | #define _ASM_COMPILER_H |
10 | 10 | ||
11 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) | 11 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) |
12 | #define GCC_IMM_ASM "n" | 12 | #define GCC_IMM_ASM() "n" |
13 | #define GCC_REG_ACCUM "$0" | 13 | #define GCC_REG_ACCUM "$0" |
14 | #else | 14 | #else |
15 | #define GCC_IMM_ASM "rn" | 15 | #define GCC_IMM_ASM() "rn" |
16 | #define GCC_REG_ACCUM "accum" | 16 | #define GCC_REG_ACCUM "accum" |
17 | #endif | 17 | #endif |
18 | 18 | ||
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h index 0c5a358863f3..2de73dbb2e9e 100644 --- a/include/asm-mips/cpu-info.h +++ b/include/asm-mips/cpu-info.h | |||
@@ -56,7 +56,7 @@ struct cpuinfo_mips { | |||
56 | struct cache_desc tcache; /* Tertiary/split secondary cache */ | 56 | struct cache_desc tcache; /* Tertiary/split secondary cache */ |
57 | int srsets; /* Shadow register sets */ | 57 | int srsets; /* Shadow register sets */ |
58 | int core; /* physical core number */ | 58 | int core; /* physical core number */ |
59 | #if defined(CONFIG_MIPS_MT_SMTC) | 59 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) |
60 | /* | 60 | /* |
61 | * In the MIPS MT "SMTC" model, each TC is considered | 61 | * In the MIPS MT "SMTC" model, each TC is considered |
62 | * to be a "CPU" for the purposes of scheduling, but | 62 | * to be a "CPU" for the purposes of scheduling, but |
@@ -64,7 +64,7 @@ struct cpuinfo_mips { | |||
64 | * to all TCs within the same VPE. | 64 | * to all TCs within the same VPE. |
65 | */ | 65 | */ |
66 | int vpe_id; /* Virtual Processor number */ | 66 | int vpe_id; /* Virtual Processor number */ |
67 | #endif /* CONFIG_MIPS_MT */ | 67 | #endif |
68 | #ifdef CONFIG_MIPS_MT_SMTC | 68 | #ifdef CONFIG_MIPS_MT_SMTC |
69 | int tc_id; /* Thread Context number */ | 69 | int tc_id; /* Thread Context number */ |
70 | #endif | 70 | #endif |
diff --git a/include/asm-mips/gic.h b/include/asm-mips/gic.h index 01b2f92dc33d..954807d9d66a 100644 --- a/include/asm-mips/gic.h +++ b/include/asm-mips/gic.h | |||
@@ -24,8 +24,8 @@ | |||
24 | 24 | ||
25 | #define MSK(n) ((1 << (n)) - 1) | 25 | #define MSK(n) ((1 << (n)) - 1) |
26 | #define REG32(addr) (*(volatile unsigned int *) (addr)) | 26 | #define REG32(addr) (*(volatile unsigned int *) (addr)) |
27 | #define REG(base, offs) REG32((unsigned int)(base) + offs##_##OFS) | 27 | #define REG(base, offs) REG32((unsigned long)(base) + offs##_##OFS) |
28 | #define REGP(base, phys) REG32((unsigned int)(base) + (phys)) | 28 | #define REGP(base, phys) REG32((unsigned long)(base) + (phys)) |
29 | 29 | ||
30 | /* Accessors */ | 30 | /* Accessors */ |
31 | #define GIC_REG(segment, offset) \ | 31 | #define GIC_REG(segment, offset) \ |
@@ -330,7 +330,7 @@ | |||
330 | 330 | ||
331 | #define GIC_SH_RMASK_OFS 0x0300 | 331 | #define GIC_SH_RMASK_OFS 0x0300 |
332 | #define GIC_CLR_INTR_MASK(intr, val) \ | 332 | #define GIC_CLR_INTR_MASK(intr, val) \ |
333 | GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_RMASK_OFS + 4 + (((((intr) / 32) ^ 1) - 1) * 4)), ((val) << ((intr) % 32)) | 333 | GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_RMASK_OFS + 4 + (((((intr) / 32) ^ 1) - 1) * 4)), ((val) << ((intr) % 32))) |
334 | 334 | ||
335 | /* Register Map for Local Section */ | 335 | /* Register Map for Local Section */ |
336 | #define GIC_VPE_CTL_OFS 0x0000 | 336 | #define GIC_VPE_CTL_OFS 0x0000 |
diff --git a/include/asm-mips/lasat/serial.h b/include/asm-mips/lasat/serial.h index bafe68b10614..1c37d70579b8 100644 --- a/include/asm-mips/lasat/serial.h +++ b/include/asm-mips/lasat/serial.h | |||
@@ -4,10 +4,10 @@ | |||
4 | #define LASAT_BASE_BAUD_100 (7372800 / 16) | 4 | #define LASAT_BASE_BAUD_100 (7372800 / 16) |
5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 | 5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 |
6 | #define LASAT_UART_REGS_SHIFT_100 2 | 6 | #define LASAT_UART_REGS_SHIFT_100 2 |
7 | #define LASATINT_UART_100 8 | 7 | #define LASATINT_UART_100 16 |
8 | 8 | ||
9 | /* * LASAT 200 boards serial configuration */ | 9 | /* * LASAT 200 boards serial configuration */ |
10 | #define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) | 10 | #define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) |
11 | #define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) | 11 | #define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) |
12 | #define LASAT_UART_REGS_SHIFT_200 3 | 12 | #define LASAT_UART_REGS_SHIFT_200 3 |
13 | #define LASATINT_UART_200 13 | 13 | #define LASATINT_UART_200 21 |
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index a05555165d05..0d302bad4492 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h | |||
@@ -40,8 +40,8 @@ | |||
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
42 | 42 | ||
43 | #include <asm/io.h> | 43 | #include <linux/io.h> |
44 | #include <asm/irq.h> | 44 | #include <linux/irq.h> |
45 | 45 | ||
46 | /* cpu pipeline flush */ | 46 | /* cpu pipeline flush */ |
47 | void static inline au_sync(void) | 47 | void static inline au_sync(void) |
@@ -63,32 +63,32 @@ void static inline au_sync_delay(int ms) | |||
63 | 63 | ||
64 | void static inline au_writeb(u8 val, unsigned long reg) | 64 | void static inline au_writeb(u8 val, unsigned long reg) |
65 | { | 65 | { |
66 | *(volatile u8 *)(reg) = val; | 66 | *(volatile u8 *)reg = val; |
67 | } | 67 | } |
68 | 68 | ||
69 | void static inline au_writew(u16 val, unsigned long reg) | 69 | void static inline au_writew(u16 val, unsigned long reg) |
70 | { | 70 | { |
71 | *(volatile u16 *)(reg) = val; | 71 | *(volatile u16 *)reg = val; |
72 | } | 72 | } |
73 | 73 | ||
74 | void static inline au_writel(u32 val, unsigned long reg) | 74 | void static inline au_writel(u32 val, unsigned long reg) |
75 | { | 75 | { |
76 | *(volatile u32 *)(reg) = val; | 76 | *(volatile u32 *)reg = val; |
77 | } | 77 | } |
78 | 78 | ||
79 | static inline u8 au_readb(unsigned long reg) | 79 | static inline u8 au_readb(unsigned long reg) |
80 | { | 80 | { |
81 | return (*(volatile u8 *)reg); | 81 | return *(volatile u8 *)reg; |
82 | } | 82 | } |
83 | 83 | ||
84 | static inline u16 au_readw(unsigned long reg) | 84 | static inline u16 au_readw(unsigned long reg) |
85 | { | 85 | { |
86 | return (*(volatile u16 *)reg); | 86 | return *(volatile u16 *)reg; |
87 | } | 87 | } |
88 | 88 | ||
89 | static inline u32 au_readl(unsigned long reg) | 89 | static inline u32 au_readl(unsigned long reg) |
90 | { | 90 | { |
91 | return (*(volatile u32 *)reg); | 91 | return *(volatile u32 *)reg; |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
@@ -117,76 +117,77 @@ extern struct au1xxx_irqmap au1xxx_irq_map[]; | |||
117 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | 117 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * SDRAM Register Offsets | 120 | * SDRAM register offsets |
121 | */ | 121 | */ |
122 | #if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1100) | 122 | #if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || \ |
123 | #define MEM_SDMODE0 (0x0000) | 123 | defined(CONFIG_SOC_AU1100) |
124 | #define MEM_SDMODE1 (0x0004) | 124 | #define MEM_SDMODE0 0x0000 |
125 | #define MEM_SDMODE2 (0x0008) | 125 | #define MEM_SDMODE1 0x0004 |
126 | #define MEM_SDADDR0 (0x000C) | 126 | #define MEM_SDMODE2 0x0008 |
127 | #define MEM_SDADDR1 (0x0010) | 127 | #define MEM_SDADDR0 0x000C |
128 | #define MEM_SDADDR2 (0x0014) | 128 | #define MEM_SDADDR1 0x0010 |
129 | #define MEM_SDREFCFG (0x0018) | 129 | #define MEM_SDADDR2 0x0014 |
130 | #define MEM_SDPRECMD (0x001C) | 130 | #define MEM_SDREFCFG 0x0018 |
131 | #define MEM_SDAUTOREF (0x0020) | 131 | #define MEM_SDPRECMD 0x001C |
132 | #define MEM_SDWRMD0 (0x0024) | 132 | #define MEM_SDAUTOREF 0x0020 |
133 | #define MEM_SDWRMD1 (0x0028) | 133 | #define MEM_SDWRMD0 0x0024 |
134 | #define MEM_SDWRMD2 (0x002C) | 134 | #define MEM_SDWRMD1 0x0028 |
135 | #define MEM_SDSLEEP (0x0030) | 135 | #define MEM_SDWRMD2 0x002C |
136 | #define MEM_SDSMCKE (0x0034) | 136 | #define MEM_SDSLEEP 0x0030 |
137 | #define MEM_SDSMCKE 0x0034 | ||
137 | 138 | ||
138 | /* | 139 | /* |
139 | * MEM_SDMODE register content definitions | 140 | * MEM_SDMODE register content definitions |
140 | */ | 141 | */ |
141 | #define MEM_SDMODE_F (1<<22) | 142 | #define MEM_SDMODE_F (1 << 22) |
142 | #define MEM_SDMODE_SR (1<<21) | 143 | #define MEM_SDMODE_SR (1 << 21) |
143 | #define MEM_SDMODE_BS (1<<20) | 144 | #define MEM_SDMODE_BS (1 << 20) |
144 | #define MEM_SDMODE_RS (3<<18) | 145 | #define MEM_SDMODE_RS (3 << 18) |
145 | #define MEM_SDMODE_CS (7<<15) | 146 | #define MEM_SDMODE_CS (7 << 15) |
146 | #define MEM_SDMODE_TRAS (15<<11) | 147 | #define MEM_SDMODE_TRAS (15 << 11) |
147 | #define MEM_SDMODE_TMRD (3<<9) | 148 | #define MEM_SDMODE_TMRD (3 << 9) |
148 | #define MEM_SDMODE_TWR (3<<7) | 149 | #define MEM_SDMODE_TWR (3 << 7) |
149 | #define MEM_SDMODE_TRP (3<<5) | 150 | #define MEM_SDMODE_TRP (3 << 5) |
150 | #define MEM_SDMODE_TRCD (3<<3) | 151 | #define MEM_SDMODE_TRCD (3 << 3) |
151 | #define MEM_SDMODE_TCL (7<<0) | 152 | #define MEM_SDMODE_TCL (7 << 0) |
152 | 153 | ||
153 | #define MEM_SDMODE_BS_2Bank (0<<20) | 154 | #define MEM_SDMODE_BS_2Bank (0 << 20) |
154 | #define MEM_SDMODE_BS_4Bank (1<<20) | 155 | #define MEM_SDMODE_BS_4Bank (1 << 20) |
155 | #define MEM_SDMODE_RS_11Row (0<<18) | 156 | #define MEM_SDMODE_RS_11Row (0 << 18) |
156 | #define MEM_SDMODE_RS_12Row (1<<18) | 157 | #define MEM_SDMODE_RS_12Row (1 << 18) |
157 | #define MEM_SDMODE_RS_13Row (2<<18) | 158 | #define MEM_SDMODE_RS_13Row (2 << 18) |
158 | #define MEM_SDMODE_RS_N(N) ((N)<<18) | 159 | #define MEM_SDMODE_RS_N(N) ((N) << 18) |
159 | #define MEM_SDMODE_CS_7Col (0<<15) | 160 | #define MEM_SDMODE_CS_7Col (0 << 15) |
160 | #define MEM_SDMODE_CS_8Col (1<<15) | 161 | #define MEM_SDMODE_CS_8Col (1 << 15) |
161 | #define MEM_SDMODE_CS_9Col (2<<15) | 162 | #define MEM_SDMODE_CS_9Col (2 << 15) |
162 | #define MEM_SDMODE_CS_10Col (3<<15) | 163 | #define MEM_SDMODE_CS_10Col (3 << 15) |
163 | #define MEM_SDMODE_CS_11Col (4<<15) | 164 | #define MEM_SDMODE_CS_11Col (4 << 15) |
164 | #define MEM_SDMODE_CS_N(N) ((N)<<15) | 165 | #define MEM_SDMODE_CS_N(N) ((N) << 15) |
165 | #define MEM_SDMODE_TRAS_N(N) ((N)<<11) | 166 | #define MEM_SDMODE_TRAS_N(N) ((N) << 11) |
166 | #define MEM_SDMODE_TMRD_N(N) ((N)<<9) | 167 | #define MEM_SDMODE_TMRD_N(N) ((N) << 9) |
167 | #define MEM_SDMODE_TWR_N(N) ((N)<<7) | 168 | #define MEM_SDMODE_TWR_N(N) ((N) << 7) |
168 | #define MEM_SDMODE_TRP_N(N) ((N)<<5) | 169 | #define MEM_SDMODE_TRP_N(N) ((N) << 5) |
169 | #define MEM_SDMODE_TRCD_N(N) ((N)<<3) | 170 | #define MEM_SDMODE_TRCD_N(N) ((N) << 3) |
170 | #define MEM_SDMODE_TCL_N(N) ((N)<<0) | 171 | #define MEM_SDMODE_TCL_N(N) ((N) << 0) |
171 | 172 | ||
172 | /* | 173 | /* |
173 | * MEM_SDADDR register contents definitions | 174 | * MEM_SDADDR register contents definitions |
174 | */ | 175 | */ |
175 | #define MEM_SDADDR_E (1<<20) | 176 | #define MEM_SDADDR_E (1 << 20) |
176 | #define MEM_SDADDR_CSBA (0x03FF<<10) | 177 | #define MEM_SDADDR_CSBA (0x03FF << 10) |
177 | #define MEM_SDADDR_CSMASK (0x03FF<<0) | 178 | #define MEM_SDADDR_CSMASK (0x03FF << 0) |
178 | #define MEM_SDADDR_CSBA_N(N) ((N)&(0x03FF<<22)>>12) | 179 | #define MEM_SDADDR_CSBA_N(N) ((N) & (0x03FF << 22) >> 12) |
179 | #define MEM_SDADDR_CSMASK_N(N) ((N)&(0x03FF<<22)>>22) | 180 | #define MEM_SDADDR_CSMASK_N(N) ((N)&(0x03FF << 22) >> 22) |
180 | 181 | ||
181 | /* | 182 | /* |
182 | * MEM_SDREFCFG register content definitions | 183 | * MEM_SDREFCFG register content definitions |
183 | */ | 184 | */ |
184 | #define MEM_SDREFCFG_TRC (15<<28) | 185 | #define MEM_SDREFCFG_TRC (15 << 28) |
185 | #define MEM_SDREFCFG_TRPM (3<<26) | 186 | #define MEM_SDREFCFG_TRPM (3 << 26) |
186 | #define MEM_SDREFCFG_E (1<<25) | 187 | #define MEM_SDREFCFG_E (1 << 25) |
187 | #define MEM_SDREFCFG_RE (0x1ffffff<<0) | 188 | #define MEM_SDREFCFG_RE (0x1ffffff << 0) |
188 | #define MEM_SDREFCFG_TRC_N(N) ((N)<<MEM_SDREFCFG_TRC) | 189 | #define MEM_SDREFCFG_TRC_N(N) ((N) << MEM_SDREFCFG_TRC) |
189 | #define MEM_SDREFCFG_TRPM_N(N) ((N)<<MEM_SDREFCFG_TRPM) | 190 | #define MEM_SDREFCFG_TRPM_N(N) ((N) << MEM_SDREFCFG_TRPM) |
190 | #define MEM_SDREFCFG_REF_N(N) (N) | 191 | #define MEM_SDREFCFG_REF_N(N) (N) |
191 | #endif | 192 | #endif |
192 | 193 | ||
@@ -199,25 +200,25 @@ extern struct au1xxx_irqmap au1xxx_irq_map[]; | |||
199 | /***********************************************************************/ | 200 | /***********************************************************************/ |
200 | 201 | ||
201 | #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) | 202 | #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) |
202 | #define MEM_SDMODE0 (0x0800) | 203 | #define MEM_SDMODE0 0x0800 |
203 | #define MEM_SDMODE1 (0x0808) | 204 | #define MEM_SDMODE1 0x0808 |
204 | #define MEM_SDMODE2 (0x0810) | 205 | #define MEM_SDMODE2 0x0810 |
205 | #define MEM_SDADDR0 (0x0820) | 206 | #define MEM_SDADDR0 0x0820 |
206 | #define MEM_SDADDR1 (0x0828) | 207 | #define MEM_SDADDR1 0x0828 |
207 | #define MEM_SDADDR2 (0x0830) | 208 | #define MEM_SDADDR2 0x0830 |
208 | #define MEM_SDCONFIGA (0x0840) | 209 | #define MEM_SDCONFIGA 0x0840 |
209 | #define MEM_SDCONFIGB (0x0848) | 210 | #define MEM_SDCONFIGB 0x0848 |
210 | #define MEM_SDSTAT (0x0850) | 211 | #define MEM_SDSTAT 0x0850 |
211 | #define MEM_SDERRADDR (0x0858) | 212 | #define MEM_SDERRADDR 0x0858 |
212 | #define MEM_SDSTRIDE0 (0x0860) | 213 | #define MEM_SDSTRIDE0 0x0860 |
213 | #define MEM_SDSTRIDE1 (0x0868) | 214 | #define MEM_SDSTRIDE1 0x0868 |
214 | #define MEM_SDSTRIDE2 (0x0870) | 215 | #define MEM_SDSTRIDE2 0x0870 |
215 | #define MEM_SDWRMD0 (0x0880) | 216 | #define MEM_SDWRMD0 0x0880 |
216 | #define MEM_SDWRMD1 (0x0888) | 217 | #define MEM_SDWRMD1 0x0888 |
217 | #define MEM_SDWRMD2 (0x0890) | 218 | #define MEM_SDWRMD2 0x0890 |
218 | #define MEM_SDPRECMD (0x08C0) | 219 | #define MEM_SDPRECMD 0x08C0 |
219 | #define MEM_SDAUTOREF (0x08C8) | 220 | #define MEM_SDAUTOREF 0x08C8 |
220 | #define MEM_SDSREF (0x08D0) | 221 | #define MEM_SDSREF 0x08D0 |
221 | #define MEM_SDSLEEP MEM_SDSREF | 222 | #define MEM_SDSLEEP MEM_SDSREF |
222 | 223 | ||
223 | #endif | 224 | #endif |
@@ -256,9 +257,9 @@ extern struct au1xxx_irqmap au1xxx_irq_map[]; | |||
256 | #define SSI0_PHYS_ADDR 0x11600000 | 257 | #define SSI0_PHYS_ADDR 0x11600000 |
257 | #define SSI1_PHYS_ADDR 0x11680000 | 258 | #define SSI1_PHYS_ADDR 0x11680000 |
258 | #define SYS_PHYS_ADDR 0x11900000 | 259 | #define SYS_PHYS_ADDR 0x11900000 |
259 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL | 260 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL |
260 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL | 261 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL |
261 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL | 262 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL |
262 | #endif | 263 | #endif |
263 | 264 | ||
264 | /********************************************************************/ | 265 | /********************************************************************/ |
@@ -290,13 +291,13 @@ extern struct au1xxx_irqmap au1xxx_irq_map[]; | |||
290 | #define UART3_PHYS_ADDR 0x11400000 | 291 | #define UART3_PHYS_ADDR 0x11400000 |
291 | #define GPIO2_PHYS_ADDR 0x11700000 | 292 | #define GPIO2_PHYS_ADDR 0x11700000 |
292 | #define SYS_PHYS_ADDR 0x11900000 | 293 | #define SYS_PHYS_ADDR 0x11900000 |
293 | #define PCI_MEM_PHYS_ADDR 0x400000000ULL | 294 | #define PCI_MEM_PHYS_ADDR 0x400000000ULL |
294 | #define PCI_IO_PHYS_ADDR 0x500000000ULL | 295 | #define PCI_IO_PHYS_ADDR 0x500000000ULL |
295 | #define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL | 296 | #define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL |
296 | #define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL | 297 | #define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL |
297 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL | 298 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL |
298 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL | 299 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL |
299 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL | 300 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL |
300 | #endif | 301 | #endif |
301 | 302 | ||
302 | /********************************************************************/ | 303 | /********************************************************************/ |
@@ -333,9 +334,9 @@ extern struct au1xxx_irqmap au1xxx_irq_map[]; | |||
333 | #define GPIO2_PHYS_ADDR 0x11700000 | 334 | #define GPIO2_PHYS_ADDR 0x11700000 |
334 | #define SYS_PHYS_ADDR 0x11900000 | 335 | #define SYS_PHYS_ADDR 0x11900000 |
335 | #define LCD_PHYS_ADDR 0x15000000 | 336 | #define LCD_PHYS_ADDR 0x15000000 |
336 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL | 337 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL |
337 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL | 338 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL |
338 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL | 339 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL |
339 | #endif | 340 | #endif |
340 | 341 | ||
341 | /***********************************************************************/ | 342 | /***********************************************************************/ |
@@ -360,17 +361,17 @@ extern struct au1xxx_irqmap au1xxx_irq_map[]; | |||
360 | #define SYS_PHYS_ADDR 0x11900000 | 361 | #define SYS_PHYS_ADDR 0x11900000 |
361 | #define DDMA_PHYS_ADDR 0x14002000 | 362 | #define DDMA_PHYS_ADDR 0x14002000 |
362 | #define PE_PHYS_ADDR 0x14008000 | 363 | #define PE_PHYS_ADDR 0x14008000 |
363 | #define PSC0_PHYS_ADDR 0x11A00000 | 364 | #define PSC0_PHYS_ADDR 0x11A00000 |
364 | #define PSC1_PHYS_ADDR 0x11B00000 | 365 | #define PSC1_PHYS_ADDR 0x11B00000 |
365 | #define PSC2_PHYS_ADDR 0x10A00000 | 366 | #define PSC2_PHYS_ADDR 0x10A00000 |
366 | #define PSC3_PHYS_ADDR 0x10B00000 | 367 | #define PSC3_PHYS_ADDR 0x10B00000 |
367 | #define PCI_MEM_PHYS_ADDR 0x400000000ULL | 368 | #define PCI_MEM_PHYS_ADDR 0x400000000ULL |
368 | #define PCI_IO_PHYS_ADDR 0x500000000ULL | 369 | #define PCI_IO_PHYS_ADDR 0x500000000ULL |
369 | #define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL | 370 | #define PCI_CONFIG0_PHYS_ADDR 0x600000000ULL |
370 | #define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL | 371 | #define PCI_CONFIG1_PHYS_ADDR 0x680000000ULL |
371 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL | 372 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL |
372 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL | 373 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL |
373 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL | 374 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL |
374 | #endif | 375 | #endif |
375 | 376 | ||
376 | /***********************************************************************/ | 377 | /***********************************************************************/ |
@@ -397,122 +398,121 @@ extern struct au1xxx_irqmap au1xxx_irq_map[]; | |||
397 | #define SWCNT_PHYS_ADDR 0x1110010C | 398 | #define SWCNT_PHYS_ADDR 0x1110010C |
398 | #define MAEFE_PHYS_ADDR 0x14012000 | 399 | #define MAEFE_PHYS_ADDR 0x14012000 |
399 | #define MAEBE_PHYS_ADDR 0x14010000 | 400 | #define MAEBE_PHYS_ADDR 0x14010000 |
400 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL | 401 | #define PCMCIA_IO_PHYS_ADDR 0xF00000000ULL |
401 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL | 402 | #define PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL |
402 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL | 403 | #define PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL |
403 | #endif | 404 | #endif |
404 | 405 | ||
405 | |||
406 | /* Static Bus Controller */ | 406 | /* Static Bus Controller */ |
407 | #define MEM_STCFG0 0xB4001000 | 407 | #define MEM_STCFG0 0xB4001000 |
408 | #define MEM_STTIME0 0xB4001004 | 408 | #define MEM_STTIME0 0xB4001004 |
409 | #define MEM_STADDR0 0xB4001008 | 409 | #define MEM_STADDR0 0xB4001008 |
410 | 410 | ||
411 | #define MEM_STCFG1 0xB4001010 | 411 | #define MEM_STCFG1 0xB4001010 |
412 | #define MEM_STTIME1 0xB4001014 | 412 | #define MEM_STTIME1 0xB4001014 |
413 | #define MEM_STADDR1 0xB4001018 | 413 | #define MEM_STADDR1 0xB4001018 |
414 | 414 | ||
415 | #define MEM_STCFG2 0xB4001020 | 415 | #define MEM_STCFG2 0xB4001020 |
416 | #define MEM_STTIME2 0xB4001024 | 416 | #define MEM_STTIME2 0xB4001024 |
417 | #define MEM_STADDR2 0xB4001028 | 417 | #define MEM_STADDR2 0xB4001028 |
418 | 418 | ||
419 | #define MEM_STCFG3 0xB4001030 | 419 | #define MEM_STCFG3 0xB4001030 |
420 | #define MEM_STTIME3 0xB4001034 | 420 | #define MEM_STTIME3 0xB4001034 |
421 | #define MEM_STADDR3 0xB4001038 | 421 | #define MEM_STADDR3 0xB4001038 |
422 | 422 | ||
423 | #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) | 423 | #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) |
424 | #define MEM_STNDCTL 0xB4001100 | 424 | #define MEM_STNDCTL 0xB4001100 |
425 | #define MEM_STSTAT 0xB4001104 | 425 | #define MEM_STSTAT 0xB4001104 |
426 | 426 | ||
427 | #define MEM_STNAND_CMD (0x0) | 427 | #define MEM_STNAND_CMD 0x0 |
428 | #define MEM_STNAND_ADDR (0x4) | 428 | #define MEM_STNAND_ADDR 0x4 |
429 | #define MEM_STNAND_DATA (0x20) | 429 | #define MEM_STNAND_DATA 0x20 |
430 | #endif | 430 | #endif |
431 | 431 | ||
432 | /* Interrupt Controller 0 */ | 432 | /* Interrupt Controller 0 */ |
433 | #define IC0_CFG0RD 0xB0400040 | 433 | #define IC0_CFG0RD 0xB0400040 |
434 | #define IC0_CFG0SET 0xB0400040 | 434 | #define IC0_CFG0SET 0xB0400040 |
435 | #define IC0_CFG0CLR 0xB0400044 | 435 | #define IC0_CFG0CLR 0xB0400044 |
436 | 436 | ||
437 | #define IC0_CFG1RD 0xB0400048 | 437 | #define IC0_CFG1RD 0xB0400048 |
438 | #define IC0_CFG1SET 0xB0400048 | 438 | #define IC0_CFG1SET 0xB0400048 |
439 | #define IC0_CFG1CLR 0xB040004C | 439 | #define IC0_CFG1CLR 0xB040004C |
440 | 440 | ||
441 | #define IC0_CFG2RD 0xB0400050 | 441 | #define IC0_CFG2RD 0xB0400050 |
442 | #define IC0_CFG2SET 0xB0400050 | 442 | #define IC0_CFG2SET 0xB0400050 |
443 | #define IC0_CFG2CLR 0xB0400054 | 443 | #define IC0_CFG2CLR 0xB0400054 |
444 | 444 | ||
445 | #define IC0_REQ0INT 0xB0400054 | 445 | #define IC0_REQ0INT 0xB0400054 |
446 | #define IC0_SRCRD 0xB0400058 | 446 | #define IC0_SRCRD 0xB0400058 |
447 | #define IC0_SRCSET 0xB0400058 | 447 | #define IC0_SRCSET 0xB0400058 |
448 | #define IC0_SRCCLR 0xB040005C | 448 | #define IC0_SRCCLR 0xB040005C |
449 | #define IC0_REQ1INT 0xB040005C | 449 | #define IC0_REQ1INT 0xB040005C |
450 | 450 | ||
451 | #define IC0_ASSIGNRD 0xB0400060 | 451 | #define IC0_ASSIGNRD 0xB0400060 |
452 | #define IC0_ASSIGNSET 0xB0400060 | 452 | #define IC0_ASSIGNSET 0xB0400060 |
453 | #define IC0_ASSIGNCLR 0xB0400064 | 453 | #define IC0_ASSIGNCLR 0xB0400064 |
454 | 454 | ||
455 | #define IC0_WAKERD 0xB0400068 | 455 | #define IC0_WAKERD 0xB0400068 |
456 | #define IC0_WAKESET 0xB0400068 | 456 | #define IC0_WAKESET 0xB0400068 |
457 | #define IC0_WAKECLR 0xB040006C | 457 | #define IC0_WAKECLR 0xB040006C |
458 | 458 | ||
459 | #define IC0_MASKRD 0xB0400070 | 459 | #define IC0_MASKRD 0xB0400070 |
460 | #define IC0_MASKSET 0xB0400070 | 460 | #define IC0_MASKSET 0xB0400070 |
461 | #define IC0_MASKCLR 0xB0400074 | 461 | #define IC0_MASKCLR 0xB0400074 |
462 | 462 | ||
463 | #define IC0_RISINGRD 0xB0400078 | 463 | #define IC0_RISINGRD 0xB0400078 |
464 | #define IC0_RISINGCLR 0xB0400078 | 464 | #define IC0_RISINGCLR 0xB0400078 |
465 | #define IC0_FALLINGRD 0xB040007C | 465 | #define IC0_FALLINGRD 0xB040007C |
466 | #define IC0_FALLINGCLR 0xB040007C | 466 | #define IC0_FALLINGCLR 0xB040007C |
467 | 467 | ||
468 | #define IC0_TESTBIT 0xB0400080 | 468 | #define IC0_TESTBIT 0xB0400080 |
469 | 469 | ||
470 | /* Interrupt Controller 1 */ | 470 | /* Interrupt Controller 1 */ |
471 | #define IC1_CFG0RD 0xB1800040 | 471 | #define IC1_CFG0RD 0xB1800040 |
472 | #define IC1_CFG0SET 0xB1800040 | 472 | #define IC1_CFG0SET 0xB1800040 |
473 | #define IC1_CFG0CLR 0xB1800044 | 473 | #define IC1_CFG0CLR 0xB1800044 |
474 | 474 | ||
475 | #define IC1_CFG1RD 0xB1800048 | 475 | #define IC1_CFG1RD 0xB1800048 |
476 | #define IC1_CFG1SET 0xB1800048 | 476 | #define IC1_CFG1SET 0xB1800048 |
477 | #define IC1_CFG1CLR 0xB180004C | 477 | #define IC1_CFG1CLR 0xB180004C |
478 | 478 | ||
479 | #define IC1_CFG2RD 0xB1800050 | 479 | #define IC1_CFG2RD 0xB1800050 |
480 | #define IC1_CFG2SET 0xB1800050 | 480 | #define IC1_CFG2SET 0xB1800050 |
481 | #define IC1_CFG2CLR 0xB1800054 | 481 | #define IC1_CFG2CLR 0xB1800054 |
482 | 482 | ||
483 | #define IC1_REQ0INT 0xB1800054 | 483 | #define IC1_REQ0INT 0xB1800054 |
484 | #define IC1_SRCRD 0xB1800058 | 484 | #define IC1_SRCRD 0xB1800058 |
485 | #define IC1_SRCSET 0xB1800058 | 485 | #define IC1_SRCSET 0xB1800058 |
486 | #define IC1_SRCCLR 0xB180005C | 486 | #define IC1_SRCCLR 0xB180005C |
487 | #define IC1_REQ1INT 0xB180005C | 487 | #define IC1_REQ1INT 0xB180005C |
488 | 488 | ||
489 | #define IC1_ASSIGNRD 0xB1800060 | 489 | #define IC1_ASSIGNRD 0xB1800060 |
490 | #define IC1_ASSIGNSET 0xB1800060 | 490 | #define IC1_ASSIGNSET 0xB1800060 |
491 | #define IC1_ASSIGNCLR 0xB1800064 | 491 | #define IC1_ASSIGNCLR 0xB1800064 |
492 | 492 | ||
493 | #define IC1_WAKERD 0xB1800068 | 493 | #define IC1_WAKERD 0xB1800068 |
494 | #define IC1_WAKESET 0xB1800068 | 494 | #define IC1_WAKESET 0xB1800068 |
495 | #define IC1_WAKECLR 0xB180006C | 495 | #define IC1_WAKECLR 0xB180006C |
496 | 496 | ||
497 | #define IC1_MASKRD 0xB1800070 | 497 | #define IC1_MASKRD 0xB1800070 |
498 | #define IC1_MASKSET 0xB1800070 | 498 | #define IC1_MASKSET 0xB1800070 |
499 | #define IC1_MASKCLR 0xB1800074 | 499 | #define IC1_MASKCLR 0xB1800074 |
500 | 500 | ||
501 | #define IC1_RISINGRD 0xB1800078 | 501 | #define IC1_RISINGRD 0xB1800078 |
502 | #define IC1_RISINGCLR 0xB1800078 | 502 | #define IC1_RISINGCLR 0xB1800078 |
503 | #define IC1_FALLINGRD 0xB180007C | 503 | #define IC1_FALLINGRD 0xB180007C |
504 | #define IC1_FALLINGCLR 0xB180007C | 504 | #define IC1_FALLINGCLR 0xB180007C |
505 | 505 | ||
506 | #define IC1_TESTBIT 0xB1800080 | 506 | #define IC1_TESTBIT 0xB1800080 |
507 | 507 | ||
508 | /* Interrupt Configuration Modes */ | 508 | /* Interrupt Configuration Modes */ |
509 | #define INTC_INT_DISABLED 0 | 509 | #define INTC_INT_DISABLED 0x0 |
510 | #define INTC_INT_RISE_EDGE 0x1 | 510 | #define INTC_INT_RISE_EDGE 0x1 |
511 | #define INTC_INT_FALL_EDGE 0x2 | 511 | #define INTC_INT_FALL_EDGE 0x2 |
512 | #define INTC_INT_RISE_AND_FALL_EDGE 0x3 | 512 | #define INTC_INT_RISE_AND_FALL_EDGE 0x3 |
513 | #define INTC_INT_HIGH_LEVEL 0x5 | 513 | #define INTC_INT_HIGH_LEVEL 0x5 |
514 | #define INTC_INT_LOW_LEVEL 0x6 | 514 | #define INTC_INT_LOW_LEVEL 0x6 |
515 | #define INTC_INT_HIGH_AND_LOW_LEVEL 0x7 | 515 | #define INTC_INT_HIGH_AND_LOW_LEVEL 0x7 |
516 | 516 | ||
517 | /* Interrupt Numbers */ | 517 | /* Interrupt Numbers */ |
518 | /* Au1000 */ | 518 | /* Au1000 */ |
@@ -579,18 +579,18 @@ enum soc_au1000_ints { | |||
579 | AU1000_GPIO_31, | 579 | AU1000_GPIO_31, |
580 | }; | 580 | }; |
581 | 581 | ||
582 | #define UART0_ADDR 0xB1100000 | 582 | #define UART0_ADDR 0xB1100000 |
583 | #define UART1_ADDR 0xB1200000 | 583 | #define UART1_ADDR 0xB1200000 |
584 | #define UART2_ADDR 0xB1300000 | 584 | #define UART2_ADDR 0xB1300000 |
585 | #define UART3_ADDR 0xB1400000 | 585 | #define UART3_ADDR 0xB1400000 |
586 | 586 | ||
587 | #define USB_OHCI_BASE 0x10100000 // phys addr for ioremap | 587 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ |
588 | #define USB_HOST_CONFIG 0xB017fffc | 588 | #define USB_HOST_CONFIG 0xB017FFFC |
589 | 589 | ||
590 | #define AU1000_ETH0_BASE 0xB0500000 | 590 | #define AU1000_ETH0_BASE 0xB0500000 |
591 | #define AU1000_ETH1_BASE 0xB0510000 | 591 | #define AU1000_ETH1_BASE 0xB0510000 |
592 | #define AU1000_MAC0_ENABLE 0xB0520000 | 592 | #define AU1000_MAC0_ENABLE 0xB0520000 |
593 | #define AU1000_MAC1_ENABLE 0xB0520004 | 593 | #define AU1000_MAC1_ENABLE 0xB0520004 |
594 | #define NUM_ETH_INTERFACES 2 | 594 | #define NUM_ETH_INTERFACES 2 |
595 | #endif /* CONFIG_SOC_AU1000 */ | 595 | #endif /* CONFIG_SOC_AU1000 */ |
596 | 596 | ||
@@ -615,6 +615,7 @@ enum soc_au1500_ints { | |||
615 | AU1000_RTC_MATCH1_INT, | 615 | AU1000_RTC_MATCH1_INT, |
616 | AU1000_RTC_MATCH2_INT, | 616 | AU1000_RTC_MATCH2_INT, |
617 | AU1500_PCI_ERR_INT, | 617 | AU1500_PCI_ERR_INT, |
618 | AU1500_RESERVED_INT, | ||
618 | AU1000_USB_DEV_REQ_INT, | 619 | AU1000_USB_DEV_REQ_INT, |
619 | AU1000_USB_DEV_SUS_INT, | 620 | AU1000_USB_DEV_SUS_INT, |
620 | AU1000_USB_HOST_INT, | 621 | AU1000_USB_HOST_INT, |
@@ -662,16 +663,16 @@ enum soc_au1500_ints { | |||
662 | #define INTC AU1000_PCI_INTC | 663 | #define INTC AU1000_PCI_INTC |
663 | #define INTD AU1000_PCI_INTD | 664 | #define INTD AU1000_PCI_INTD |
664 | 665 | ||
665 | #define UART0_ADDR 0xB1100000 | 666 | #define UART0_ADDR 0xB1100000 |
666 | #define UART3_ADDR 0xB1400000 | 667 | #define UART3_ADDR 0xB1400000 |
667 | 668 | ||
668 | #define USB_OHCI_BASE 0x10100000 // phys addr for ioremap | 669 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ |
669 | #define USB_HOST_CONFIG 0xB017fffc | 670 | #define USB_HOST_CONFIG 0xB017fffc |
670 | 671 | ||
671 | #define AU1500_ETH0_BASE 0xB1500000 | 672 | #define AU1500_ETH0_BASE 0xB1500000 |
672 | #define AU1500_ETH1_BASE 0xB1510000 | 673 | #define AU1500_ETH1_BASE 0xB1510000 |
673 | #define AU1500_MAC0_ENABLE 0xB1520000 | 674 | #define AU1500_MAC0_ENABLE 0xB1520000 |
674 | #define AU1500_MAC1_ENABLE 0xB1520004 | 675 | #define AU1500_MAC1_ENABLE 0xB1520004 |
675 | #define NUM_ETH_INTERFACES 2 | 676 | #define NUM_ETH_INTERFACES 2 |
676 | #endif /* CONFIG_SOC_AU1500 */ | 677 | #endif /* CONFIG_SOC_AU1500 */ |
677 | 678 | ||
@@ -739,15 +740,15 @@ enum soc_au1100_ints { | |||
739 | AU1000_GPIO_31, | 740 | AU1000_GPIO_31, |
740 | }; | 741 | }; |
741 | 742 | ||
742 | #define UART0_ADDR 0xB1100000 | 743 | #define UART0_ADDR 0xB1100000 |
743 | #define UART1_ADDR 0xB1200000 | 744 | #define UART1_ADDR 0xB1200000 |
744 | #define UART3_ADDR 0xB1400000 | 745 | #define UART3_ADDR 0xB1400000 |
745 | 746 | ||
746 | #define USB_OHCI_BASE 0x10100000 // phys addr for ioremap | 747 | #define USB_OHCI_BASE 0x10100000 /* phys addr for ioremap */ |
747 | #define USB_HOST_CONFIG 0xB017fffc | 748 | #define USB_HOST_CONFIG 0xB017FFFC |
748 | 749 | ||
749 | #define AU1100_ETH0_BASE 0xB0500000 | 750 | #define AU1100_ETH0_BASE 0xB0500000 |
750 | #define AU1100_MAC0_ENABLE 0xB0520000 | 751 | #define AU1100_MAC0_ENABLE 0xB0520000 |
751 | #define NUM_ETH_INTERFACES 1 | 752 | #define NUM_ETH_INTERFACES 1 |
752 | #endif /* CONFIG_SOC_AU1100 */ | 753 | #endif /* CONFIG_SOC_AU1100 */ |
753 | 754 | ||
@@ -826,18 +827,18 @@ enum soc_au1550_ints { | |||
826 | #define INTC AU1550_PCI_INTC | 827 | #define INTC AU1550_PCI_INTC |
827 | #define INTD AU1550_PCI_INTD | 828 | #define INTD AU1550_PCI_INTD |
828 | 829 | ||
829 | #define UART0_ADDR 0xB1100000 | 830 | #define UART0_ADDR 0xB1100000 |
830 | #define UART1_ADDR 0xB1200000 | 831 | #define UART1_ADDR 0xB1200000 |
831 | #define UART3_ADDR 0xB1400000 | 832 | #define UART3_ADDR 0xB1400000 |
832 | 833 | ||
833 | #define USB_OHCI_BASE 0x14020000 // phys addr for ioremap | 834 | #define USB_OHCI_BASE 0x14020000 /* phys addr for ioremap */ |
834 | #define USB_OHCI_LEN 0x00060000 | 835 | #define USB_OHCI_LEN 0x00060000 |
835 | #define USB_HOST_CONFIG 0xB4027ffc | 836 | #define USB_HOST_CONFIG 0xB4027ffc |
836 | 837 | ||
837 | #define AU1550_ETH0_BASE 0xB0500000 | 838 | #define AU1550_ETH0_BASE 0xB0500000 |
838 | #define AU1550_ETH1_BASE 0xB0510000 | 839 | #define AU1550_ETH1_BASE 0xB0510000 |
839 | #define AU1550_MAC0_ENABLE 0xB0520000 | 840 | #define AU1550_MAC0_ENABLE 0xB0520000 |
840 | #define AU1550_MAC1_ENABLE 0xB0520004 | 841 | #define AU1550_MAC1_ENABLE 0xB0520004 |
841 | #define NUM_ETH_INTERFACES 2 | 842 | #define NUM_ETH_INTERFACES 2 |
842 | #endif /* CONFIG_SOC_AU1550 */ | 843 | #endif /* CONFIG_SOC_AU1550 */ |
843 | 844 | ||
@@ -911,32 +912,32 @@ enum soc_au1200_ints { | |||
911 | AU1000_GPIO_31, | 912 | AU1000_GPIO_31, |
912 | }; | 913 | }; |
913 | 914 | ||
914 | #define UART0_ADDR 0xB1100000 | 915 | #define UART0_ADDR 0xB1100000 |
915 | #define UART1_ADDR 0xB1200000 | 916 | #define UART1_ADDR 0xB1200000 |
916 | 917 | ||
917 | #define USB_UOC_BASE 0x14020020 | 918 | #define USB_UOC_BASE 0x14020020 |
918 | #define USB_UOC_LEN 0x20 | 919 | #define USB_UOC_LEN 0x20 |
919 | #define USB_OHCI_BASE 0x14020100 | 920 | #define USB_OHCI_BASE 0x14020100 |
920 | #define USB_OHCI_LEN 0x100 | 921 | #define USB_OHCI_LEN 0x100 |
921 | #define USB_EHCI_BASE 0x14020200 | 922 | #define USB_EHCI_BASE 0x14020200 |
922 | #define USB_EHCI_LEN 0x100 | 923 | #define USB_EHCI_LEN 0x100 |
923 | #define USB_UDC_BASE 0x14022000 | 924 | #define USB_UDC_BASE 0x14022000 |
924 | #define USB_UDC_LEN 0x2000 | 925 | #define USB_UDC_LEN 0x2000 |
925 | #define USB_MSR_BASE 0xB4020000 | 926 | #define USB_MSR_BASE 0xB4020000 |
926 | #define USB_MSR_MCFG 4 | 927 | #define USB_MSR_MCFG 4 |
927 | #define USBMSRMCFG_OMEMEN 0 | 928 | #define USBMSRMCFG_OMEMEN 0 |
928 | #define USBMSRMCFG_OBMEN 1 | 929 | #define USBMSRMCFG_OBMEN 1 |
929 | #define USBMSRMCFG_EMEMEN 2 | 930 | #define USBMSRMCFG_EMEMEN 2 |
930 | #define USBMSRMCFG_EBMEN 3 | 931 | #define USBMSRMCFG_EBMEN 3 |
931 | #define USBMSRMCFG_DMEMEN 4 | 932 | #define USBMSRMCFG_DMEMEN 4 |
932 | #define USBMSRMCFG_DBMEN 5 | 933 | #define USBMSRMCFG_DBMEN 5 |
933 | #define USBMSRMCFG_GMEMEN 6 | 934 | #define USBMSRMCFG_GMEMEN 6 |
934 | #define USBMSRMCFG_OHCCLKEN 16 | 935 | #define USBMSRMCFG_OHCCLKEN 16 |
935 | #define USBMSRMCFG_EHCCLKEN 17 | 936 | #define USBMSRMCFG_EHCCLKEN 17 |
936 | #define USBMSRMCFG_UDCCLKEN 18 | 937 | #define USBMSRMCFG_UDCCLKEN 18 |
937 | #define USBMSRMCFG_PHYPLLEN 19 | 938 | #define USBMSRMCFG_PHYPLLEN 19 |
938 | #define USBMSRMCFG_RDCOMB 30 | 939 | #define USBMSRMCFG_RDCOMB 30 |
939 | #define USBMSRMCFG_PFEN 31 | 940 | #define USBMSRMCFG_PFEN 31 |
940 | 941 | ||
941 | #endif /* CONFIG_SOC_AU1200 */ | 942 | #endif /* CONFIG_SOC_AU1200 */ |
942 | 943 | ||
@@ -949,259 +950,258 @@ enum soc_au1200_ints { | |||
949 | #define INTX 0xFF /* not valid */ | 950 | #define INTX 0xFF /* not valid */ |
950 | 951 | ||
951 | /* Programmable Counters 0 and 1 */ | 952 | /* Programmable Counters 0 and 1 */ |
952 | #define SYS_BASE 0xB1900000 | 953 | #define SYS_BASE 0xB1900000 |
953 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) | 954 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) |
954 | # define SYS_CNTRL_E1S (1<<23) | 955 | # define SYS_CNTRL_E1S (1 << 23) |
955 | # define SYS_CNTRL_T1S (1<<20) | 956 | # define SYS_CNTRL_T1S (1 << 20) |
956 | # define SYS_CNTRL_M21 (1<<19) | 957 | # define SYS_CNTRL_M21 (1 << 19) |
957 | # define SYS_CNTRL_M11 (1<<18) | 958 | # define SYS_CNTRL_M11 (1 << 18) |
958 | # define SYS_CNTRL_M01 (1<<17) | 959 | # define SYS_CNTRL_M01 (1 << 17) |
959 | # define SYS_CNTRL_C1S (1<<16) | 960 | # define SYS_CNTRL_C1S (1 << 16) |
960 | # define SYS_CNTRL_BP (1<<14) | 961 | # define SYS_CNTRL_BP (1 << 14) |
961 | # define SYS_CNTRL_EN1 (1<<13) | 962 | # define SYS_CNTRL_EN1 (1 << 13) |
962 | # define SYS_CNTRL_BT1 (1<<12) | 963 | # define SYS_CNTRL_BT1 (1 << 12) |
963 | # define SYS_CNTRL_EN0 (1<<11) | 964 | # define SYS_CNTRL_EN0 (1 << 11) |
964 | # define SYS_CNTRL_BT0 (1<<10) | 965 | # define SYS_CNTRL_BT0 (1 << 10) |
965 | # define SYS_CNTRL_E0 (1<<8) | 966 | # define SYS_CNTRL_E0 (1 << 8) |
966 | # define SYS_CNTRL_E0S (1<<7) | 967 | # define SYS_CNTRL_E0S (1 << 7) |
967 | # define SYS_CNTRL_32S (1<<5) | 968 | # define SYS_CNTRL_32S (1 << 5) |
968 | # define SYS_CNTRL_T0S (1<<4) | 969 | # define SYS_CNTRL_T0S (1 << 4) |
969 | # define SYS_CNTRL_M20 (1<<3) | 970 | # define SYS_CNTRL_M20 (1 << 3) |
970 | # define SYS_CNTRL_M10 (1<<2) | 971 | # define SYS_CNTRL_M10 (1 << 2) |
971 | # define SYS_CNTRL_M00 (1<<1) | 972 | # define SYS_CNTRL_M00 (1 << 1) |
972 | # define SYS_CNTRL_C0S (1<<0) | 973 | # define SYS_CNTRL_C0S (1 << 0) |
973 | 974 | ||
974 | /* Programmable Counter 0 Registers */ | 975 | /* Programmable Counter 0 Registers */ |
975 | #define SYS_TOYTRIM (SYS_BASE + 0) | 976 | #define SYS_TOYTRIM (SYS_BASE + 0) |
976 | #define SYS_TOYWRITE (SYS_BASE + 4) | 977 | #define SYS_TOYWRITE (SYS_BASE + 4) |
977 | #define SYS_TOYMATCH0 (SYS_BASE + 8) | 978 | #define SYS_TOYMATCH0 (SYS_BASE + 8) |
978 | #define SYS_TOYMATCH1 (SYS_BASE + 0xC) | 979 | #define SYS_TOYMATCH1 (SYS_BASE + 0xC) |
979 | #define SYS_TOYMATCH2 (SYS_BASE + 0x10) | 980 | #define SYS_TOYMATCH2 (SYS_BASE + 0x10) |
980 | #define SYS_TOYREAD (SYS_BASE + 0x40) | 981 | #define SYS_TOYREAD (SYS_BASE + 0x40) |
981 | 982 | ||
982 | /* Programmable Counter 1 Registers */ | 983 | /* Programmable Counter 1 Registers */ |
983 | #define SYS_RTCTRIM (SYS_BASE + 0x44) | 984 | #define SYS_RTCTRIM (SYS_BASE + 0x44) |
984 | #define SYS_RTCWRITE (SYS_BASE + 0x48) | 985 | #define SYS_RTCWRITE (SYS_BASE + 0x48) |
985 | #define SYS_RTCMATCH0 (SYS_BASE + 0x4C) | 986 | #define SYS_RTCMATCH0 (SYS_BASE + 0x4C) |
986 | #define SYS_RTCMATCH1 (SYS_BASE + 0x50) | 987 | #define SYS_RTCMATCH1 (SYS_BASE + 0x50) |
987 | #define SYS_RTCMATCH2 (SYS_BASE + 0x54) | 988 | #define SYS_RTCMATCH2 (SYS_BASE + 0x54) |
988 | #define SYS_RTCREAD (SYS_BASE + 0x58) | 989 | #define SYS_RTCREAD (SYS_BASE + 0x58) |
989 | 990 | ||
990 | /* I2S Controller */ | 991 | /* I2S Controller */ |
991 | #define I2S_DATA 0xB1000000 | 992 | #define I2S_DATA 0xB1000000 |
992 | # define I2S_DATA_MASK (0xffffff) | 993 | # define I2S_DATA_MASK 0xffffff |
993 | #define I2S_CONFIG 0xB1000004 | 994 | #define I2S_CONFIG 0xB1000004 |
994 | # define I2S_CONFIG_XU (1<<25) | 995 | # define I2S_CONFIG_XU (1 << 25) |
995 | # define I2S_CONFIG_XO (1<<24) | 996 | # define I2S_CONFIG_XO (1 << 24) |
996 | # define I2S_CONFIG_RU (1<<23) | 997 | # define I2S_CONFIG_RU (1 << 23) |
997 | # define I2S_CONFIG_RO (1<<22) | 998 | # define I2S_CONFIG_RO (1 << 22) |
998 | # define I2S_CONFIG_TR (1<<21) | 999 | # define I2S_CONFIG_TR (1 << 21) |
999 | # define I2S_CONFIG_TE (1<<20) | 1000 | # define I2S_CONFIG_TE (1 << 20) |
1000 | # define I2S_CONFIG_TF (1<<19) | 1001 | # define I2S_CONFIG_TF (1 << 19) |
1001 | # define I2S_CONFIG_RR (1<<18) | 1002 | # define I2S_CONFIG_RR (1 << 18) |
1002 | # define I2S_CONFIG_RE (1<<17) | 1003 | # define I2S_CONFIG_RE (1 << 17) |
1003 | # define I2S_CONFIG_RF (1<<16) | 1004 | # define I2S_CONFIG_RF (1 << 16) |
1004 | # define I2S_CONFIG_PD (1<<11) | 1005 | # define I2S_CONFIG_PD (1 << 11) |
1005 | # define I2S_CONFIG_LB (1<<10) | 1006 | # define I2S_CONFIG_LB (1 << 10) |
1006 | # define I2S_CONFIG_IC (1<<9) | 1007 | # define I2S_CONFIG_IC (1 << 9) |
1007 | # define I2S_CONFIG_FM_BIT 7 | 1008 | # define I2S_CONFIG_FM_BIT 7 |
1008 | # define I2S_CONFIG_FM_MASK (0x3 << I2S_CONFIG_FM_BIT) | 1009 | # define I2S_CONFIG_FM_MASK (0x3 << I2S_CONFIG_FM_BIT) |
1009 | # define I2S_CONFIG_FM_I2S (0x0 << I2S_CONFIG_FM_BIT) | 1010 | # define I2S_CONFIG_FM_I2S (0x0 << I2S_CONFIG_FM_BIT) |
1010 | # define I2S_CONFIG_FM_LJ (0x1 << I2S_CONFIG_FM_BIT) | 1011 | # define I2S_CONFIG_FM_LJ (0x1 << I2S_CONFIG_FM_BIT) |
1011 | # define I2S_CONFIG_FM_RJ (0x2 << I2S_CONFIG_FM_BIT) | 1012 | # define I2S_CONFIG_FM_RJ (0x2 << I2S_CONFIG_FM_BIT) |
1012 | # define I2S_CONFIG_TN (1<<6) | 1013 | # define I2S_CONFIG_TN (1 << 6) |
1013 | # define I2S_CONFIG_RN (1<<5) | 1014 | # define I2S_CONFIG_RN (1 << 5) |
1014 | # define I2S_CONFIG_SZ_BIT 0 | 1015 | # define I2S_CONFIG_SZ_BIT 0 |
1015 | # define I2S_CONFIG_SZ_MASK (0x1F << I2S_CONFIG_SZ_BIT) | 1016 | # define I2S_CONFIG_SZ_MASK (0x1F << I2S_CONFIG_SZ_BIT) |
1016 | 1017 | ||
1017 | #define I2S_CONTROL 0xB1000008 | 1018 | #define I2S_CONTROL 0xB1000008 |
1018 | # define I2S_CONTROL_D (1<<1) | 1019 | # define I2S_CONTROL_D (1 << 1) |
1019 | # define I2S_CONTROL_CE (1<<0) | 1020 | # define I2S_CONTROL_CE (1 << 0) |
1020 | 1021 | ||
1021 | /* USB Host Controller */ | 1022 | /* USB Host Controller */ |
1022 | #ifndef USB_OHCI_LEN | 1023 | #ifndef USB_OHCI_LEN |
1023 | #define USB_OHCI_LEN 0x00100000 | 1024 | #define USB_OHCI_LEN 0x00100000 |
1024 | #endif | 1025 | #endif |
1025 | 1026 | ||
1026 | #ifndef CONFIG_SOC_AU1200 | 1027 | #ifndef CONFIG_SOC_AU1200 |
1027 | 1028 | ||
1028 | /* USB Device Controller */ | 1029 | /* USB Device Controller */ |
1029 | #define USBD_EP0RD 0xB0200000 | 1030 | #define USBD_EP0RD 0xB0200000 |
1030 | #define USBD_EP0WR 0xB0200004 | 1031 | #define USBD_EP0WR 0xB0200004 |
1031 | #define USBD_EP2WR 0xB0200008 | 1032 | #define USBD_EP2WR 0xB0200008 |
1032 | #define USBD_EP3WR 0xB020000C | 1033 | #define USBD_EP3WR 0xB020000C |
1033 | #define USBD_EP4RD 0xB0200010 | 1034 | #define USBD_EP4RD 0xB0200010 |
1034 | #define USBD_EP5RD 0xB0200014 | 1035 | #define USBD_EP5RD 0xB0200014 |
1035 | #define USBD_INTEN 0xB0200018 | 1036 | #define USBD_INTEN 0xB0200018 |
1036 | #define USBD_INTSTAT 0xB020001C | 1037 | #define USBD_INTSTAT 0xB020001C |
1037 | # define USBDEV_INT_SOF (1<<12) | 1038 | # define USBDEV_INT_SOF (1 << 12) |
1038 | # define USBDEV_INT_HF_BIT 6 | 1039 | # define USBDEV_INT_HF_BIT 6 |
1039 | # define USBDEV_INT_HF_MASK (0x3f << USBDEV_INT_HF_BIT) | 1040 | # define USBDEV_INT_HF_MASK (0x3f << USBDEV_INT_HF_BIT) |
1040 | # define USBDEV_INT_CMPLT_BIT 0 | 1041 | # define USBDEV_INT_CMPLT_BIT 0 |
1041 | # define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT) | 1042 | # define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT) |
1042 | #define USBD_CONFIG 0xB0200020 | 1043 | #define USBD_CONFIG 0xB0200020 |
1043 | #define USBD_EP0CS 0xB0200024 | 1044 | #define USBD_EP0CS 0xB0200024 |
1044 | #define USBD_EP2CS 0xB0200028 | 1045 | #define USBD_EP2CS 0xB0200028 |
1045 | #define USBD_EP3CS 0xB020002C | 1046 | #define USBD_EP3CS 0xB020002C |
1046 | #define USBD_EP4CS 0xB0200030 | 1047 | #define USBD_EP4CS 0xB0200030 |
1047 | #define USBD_EP5CS 0xB0200034 | 1048 | #define USBD_EP5CS 0xB0200034 |
1048 | # define USBDEV_CS_SU (1<<14) | 1049 | # define USBDEV_CS_SU (1 << 14) |
1049 | # define USBDEV_CS_NAK (1<<13) | 1050 | # define USBDEV_CS_NAK (1 << 13) |
1050 | # define USBDEV_CS_ACK (1<<12) | 1051 | # define USBDEV_CS_ACK (1 << 12) |
1051 | # define USBDEV_CS_BUSY (1<<11) | 1052 | # define USBDEV_CS_BUSY (1 << 11) |
1052 | # define USBDEV_CS_TSIZE_BIT 1 | 1053 | # define USBDEV_CS_TSIZE_BIT 1 |
1053 | # define USBDEV_CS_TSIZE_MASK (0x3ff << USBDEV_CS_TSIZE_BIT) | 1054 | # define USBDEV_CS_TSIZE_MASK (0x3ff << USBDEV_CS_TSIZE_BIT) |
1054 | # define USBDEV_CS_STALL (1<<0) | 1055 | # define USBDEV_CS_STALL (1 << 0) |
1055 | #define USBD_EP0RDSTAT 0xB0200040 | 1056 | #define USBD_EP0RDSTAT 0xB0200040 |
1056 | #define USBD_EP0WRSTAT 0xB0200044 | 1057 | #define USBD_EP0WRSTAT 0xB0200044 |
1057 | #define USBD_EP2WRSTAT 0xB0200048 | 1058 | #define USBD_EP2WRSTAT 0xB0200048 |
1058 | #define USBD_EP3WRSTAT 0xB020004C | 1059 | #define USBD_EP3WRSTAT 0xB020004C |
1059 | #define USBD_EP4RDSTAT 0xB0200050 | 1060 | #define USBD_EP4RDSTAT 0xB0200050 |
1060 | #define USBD_EP5RDSTAT 0xB0200054 | 1061 | #define USBD_EP5RDSTAT 0xB0200054 |
1061 | # define USBDEV_FSTAT_FLUSH (1<<6) | 1062 | # define USBDEV_FSTAT_FLUSH (1 << 6) |
1062 | # define USBDEV_FSTAT_UF (1<<5) | 1063 | # define USBDEV_FSTAT_UF (1 << 5) |
1063 | # define USBDEV_FSTAT_OF (1<<4) | 1064 | # define USBDEV_FSTAT_OF (1 << 4) |
1064 | # define USBDEV_FSTAT_FCNT_BIT 0 | 1065 | # define USBDEV_FSTAT_FCNT_BIT 0 |
1065 | # define USBDEV_FSTAT_FCNT_MASK (0x0f << USBDEV_FSTAT_FCNT_BIT) | 1066 | # define USBDEV_FSTAT_FCNT_MASK (0x0f << USBDEV_FSTAT_FCNT_BIT) |
1066 | #define USBD_ENABLE 0xB0200058 | 1067 | #define USBD_ENABLE 0xB0200058 |
1067 | # define USBDEV_ENABLE (1<<1) | 1068 | # define USBDEV_ENABLE (1 << 1) |
1068 | # define USBDEV_CE (1<<0) | 1069 | # define USBDEV_CE (1 << 0) |
1069 | 1070 | ||
1070 | #endif /* !CONFIG_SOC_AU1200 */ | 1071 | #endif /* !CONFIG_SOC_AU1200 */ |
1071 | 1072 | ||
1072 | /* Ethernet Controllers */ | 1073 | /* Ethernet Controllers */ |
1073 | 1074 | ||
1074 | /* 4 byte offsets from AU1000_ETH_BASE */ | 1075 | /* 4 byte offsets from AU1000_ETH_BASE */ |
1075 | #define MAC_CONTROL 0x0 | 1076 | #define MAC_CONTROL 0x0 |
1076 | # define MAC_RX_ENABLE (1<<2) | 1077 | # define MAC_RX_ENABLE (1 << 2) |
1077 | # define MAC_TX_ENABLE (1<<3) | 1078 | # define MAC_TX_ENABLE (1 << 3) |
1078 | # define MAC_DEF_CHECK (1<<5) | 1079 | # define MAC_DEF_CHECK (1 << 5) |
1079 | # define MAC_SET_BL(X) (((X)&0x3)<<6) | 1080 | # define MAC_SET_BL(X) (((X) & 0x3) << 6) |
1080 | # define MAC_AUTO_PAD (1<<8) | 1081 | # define MAC_AUTO_PAD (1 << 8) |
1081 | # define MAC_DISABLE_RETRY (1<<10) | 1082 | # define MAC_DISABLE_RETRY (1 << 10) |
1082 | # define MAC_DISABLE_BCAST (1<<11) | 1083 | # define MAC_DISABLE_BCAST (1 << 11) |
1083 | # define MAC_LATE_COL (1<<12) | 1084 | # define MAC_LATE_COL (1 << 12) |
1084 | # define MAC_HASH_MODE (1<<13) | 1085 | # define MAC_HASH_MODE (1 << 13) |
1085 | # define MAC_HASH_ONLY (1<<15) | 1086 | # define MAC_HASH_ONLY (1 << 15) |
1086 | # define MAC_PASS_ALL (1<<16) | 1087 | # define MAC_PASS_ALL (1 << 16) |
1087 | # define MAC_INVERSE_FILTER (1<<17) | 1088 | # define MAC_INVERSE_FILTER (1 << 17) |
1088 | # define MAC_PROMISCUOUS (1<<18) | 1089 | # define MAC_PROMISCUOUS (1 << 18) |
1089 | # define MAC_PASS_ALL_MULTI (1<<19) | 1090 | # define MAC_PASS_ALL_MULTI (1 << 19) |
1090 | # define MAC_FULL_DUPLEX (1<<20) | 1091 | # define MAC_FULL_DUPLEX (1 << 20) |
1091 | # define MAC_NORMAL_MODE 0 | 1092 | # define MAC_NORMAL_MODE 0 |
1092 | # define MAC_INT_LOOPBACK (1<<21) | 1093 | # define MAC_INT_LOOPBACK (1 << 21) |
1093 | # define MAC_EXT_LOOPBACK (1<<22) | 1094 | # define MAC_EXT_LOOPBACK (1 << 22) |
1094 | # define MAC_DISABLE_RX_OWN (1<<23) | 1095 | # define MAC_DISABLE_RX_OWN (1 << 23) |
1095 | # define MAC_BIG_ENDIAN (1<<30) | 1096 | # define MAC_BIG_ENDIAN (1 << 30) |
1096 | # define MAC_RX_ALL (1<<31) | 1097 | # define MAC_RX_ALL (1 << 31) |
1097 | #define MAC_ADDRESS_HIGH 0x4 | 1098 | #define MAC_ADDRESS_HIGH 0x4 |
1098 | #define MAC_ADDRESS_LOW 0x8 | 1099 | #define MAC_ADDRESS_LOW 0x8 |
1099 | #define MAC_MCAST_HIGH 0xC | 1100 | #define MAC_MCAST_HIGH 0xC |
1100 | #define MAC_MCAST_LOW 0x10 | 1101 | #define MAC_MCAST_LOW 0x10 |
1101 | #define MAC_MII_CNTRL 0x14 | 1102 | #define MAC_MII_CNTRL 0x14 |
1102 | # define MAC_MII_BUSY (1<<0) | 1103 | # define MAC_MII_BUSY (1 << 0) |
1103 | # define MAC_MII_READ 0 | 1104 | # define MAC_MII_READ 0 |
1104 | # define MAC_MII_WRITE (1<<1) | 1105 | # define MAC_MII_WRITE (1 << 1) |
1105 | # define MAC_SET_MII_SELECT_REG(X) (((X)&0x1f)<<6) | 1106 | # define MAC_SET_MII_SELECT_REG(X) (((X) & 0x1f) << 6) |
1106 | # define MAC_SET_MII_SELECT_PHY(X) (((X)&0x1f)<<11) | 1107 | # define MAC_SET_MII_SELECT_PHY(X) (((X) & 0x1f) << 11) |
1107 | #define MAC_MII_DATA 0x18 | 1108 | #define MAC_MII_DATA 0x18 |
1108 | #define MAC_FLOW_CNTRL 0x1C | 1109 | #define MAC_FLOW_CNTRL 0x1C |
1109 | # define MAC_FLOW_CNTRL_BUSY (1<<0) | 1110 | # define MAC_FLOW_CNTRL_BUSY (1 << 0) |
1110 | # define MAC_FLOW_CNTRL_ENABLE (1<<1) | 1111 | # define MAC_FLOW_CNTRL_ENABLE (1 << 1) |
1111 | # define MAC_PASS_CONTROL (1<<2) | 1112 | # define MAC_PASS_CONTROL (1 << 2) |
1112 | # define MAC_SET_PAUSE(X) (((X)&0xffff)<<16) | 1113 | # define MAC_SET_PAUSE(X) (((X) & 0xffff) << 16) |
1113 | #define MAC_VLAN1_TAG 0x20 | 1114 | #define MAC_VLAN1_TAG 0x20 |
1114 | #define MAC_VLAN2_TAG 0x24 | 1115 | #define MAC_VLAN2_TAG 0x24 |
1115 | 1116 | ||
1116 | /* Ethernet Controller Enable */ | 1117 | /* Ethernet Controller Enable */ |
1117 | 1118 | ||
1118 | # define MAC_EN_CLOCK_ENABLE (1<<0) | 1119 | # define MAC_EN_CLOCK_ENABLE (1 << 0) |
1119 | # define MAC_EN_RESET0 (1<<1) | 1120 | # define MAC_EN_RESET0 (1 << 1) |
1120 | # define MAC_EN_TOSS (0<<2) | 1121 | # define MAC_EN_TOSS (0 << 2) |
1121 | # define MAC_EN_CACHEABLE (1<<3) | 1122 | # define MAC_EN_CACHEABLE (1 << 3) |
1122 | # define MAC_EN_RESET1 (1<<4) | 1123 | # define MAC_EN_RESET1 (1 << 4) |
1123 | # define MAC_EN_RESET2 (1<<5) | 1124 | # define MAC_EN_RESET2 (1 << 5) |
1124 | # define MAC_DMA_RESET (1<<6) | 1125 | # define MAC_DMA_RESET (1 << 6) |
1125 | 1126 | ||
1126 | /* Ethernet Controller DMA Channels */ | 1127 | /* Ethernet Controller DMA Channels */ |
1127 | 1128 | ||
1128 | #define MAC0_TX_DMA_ADDR 0xB4004000 | 1129 | #define MAC0_TX_DMA_ADDR 0xB4004000 |
1129 | #define MAC1_TX_DMA_ADDR 0xB4004200 | 1130 | #define MAC1_TX_DMA_ADDR 0xB4004200 |
1130 | /* offsets from MAC_TX_RING_ADDR address */ | 1131 | /* offsets from MAC_TX_RING_ADDR address */ |
1131 | #define MAC_TX_BUFF0_STATUS 0x0 | 1132 | #define MAC_TX_BUFF0_STATUS 0x0 |
1132 | # define TX_FRAME_ABORTED (1<<0) | 1133 | # define TX_FRAME_ABORTED (1 << 0) |
1133 | # define TX_JAB_TIMEOUT (1<<1) | 1134 | # define TX_JAB_TIMEOUT (1 << 1) |
1134 | # define TX_NO_CARRIER (1<<2) | 1135 | # define TX_NO_CARRIER (1 << 2) |
1135 | # define TX_LOSS_CARRIER (1<<3) | 1136 | # define TX_LOSS_CARRIER (1 << 3) |
1136 | # define TX_EXC_DEF (1<<4) | 1137 | # define TX_EXC_DEF (1 << 4) |
1137 | # define TX_LATE_COLL_ABORT (1<<5) | 1138 | # define TX_LATE_COLL_ABORT (1 << 5) |
1138 | # define TX_EXC_COLL (1<<6) | 1139 | # define TX_EXC_COLL (1 << 6) |
1139 | # define TX_UNDERRUN (1<<7) | 1140 | # define TX_UNDERRUN (1 << 7) |
1140 | # define TX_DEFERRED (1<<8) | 1141 | # define TX_DEFERRED (1 << 8) |
1141 | # define TX_LATE_COLL (1<<9) | 1142 | # define TX_LATE_COLL (1 << 9) |
1142 | # define TX_COLL_CNT_MASK (0xF<<10) | 1143 | # define TX_COLL_CNT_MASK (0xF << 10) |
1143 | # define TX_PKT_RETRY (1<<31) | 1144 | # define TX_PKT_RETRY (1 << 31) |
1144 | #define MAC_TX_BUFF0_ADDR 0x4 | 1145 | #define MAC_TX_BUFF0_ADDR 0x4 |
1145 | # define TX_DMA_ENABLE (1<<0) | 1146 | # define TX_DMA_ENABLE (1 << 0) |
1146 | # define TX_T_DONE (1<<1) | 1147 | # define TX_T_DONE (1 << 1) |
1147 | # define TX_GET_DMA_BUFFER(X) (((X)>>2)&0x3) | 1148 | # define TX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) |
1148 | #define MAC_TX_BUFF0_LEN 0x8 | 1149 | #define MAC_TX_BUFF0_LEN 0x8 |
1149 | #define MAC_TX_BUFF1_STATUS 0x10 | 1150 | #define MAC_TX_BUFF1_STATUS 0x10 |
1150 | #define MAC_TX_BUFF1_ADDR 0x14 | 1151 | #define MAC_TX_BUFF1_ADDR 0x14 |
1151 | #define MAC_TX_BUFF1_LEN 0x18 | 1152 | #define MAC_TX_BUFF1_LEN 0x18 |
1152 | #define MAC_TX_BUFF2_STATUS 0x20 | 1153 | #define MAC_TX_BUFF2_STATUS 0x20 |
1153 | #define MAC_TX_BUFF2_ADDR 0x24 | 1154 | #define MAC_TX_BUFF2_ADDR 0x24 |
1154 | #define MAC_TX_BUFF2_LEN 0x28 | 1155 | #define MAC_TX_BUFF2_LEN 0x28 |
1155 | #define MAC_TX_BUFF3_STATUS 0x30 | 1156 | #define MAC_TX_BUFF3_STATUS 0x30 |
1156 | #define MAC_TX_BUFF3_ADDR 0x34 | 1157 | #define MAC_TX_BUFF3_ADDR 0x34 |
1157 | #define MAC_TX_BUFF3_LEN 0x38 | 1158 | #define MAC_TX_BUFF3_LEN 0x38 |
1158 | 1159 | ||
1159 | #define MAC0_RX_DMA_ADDR 0xB4004100 | 1160 | #define MAC0_RX_DMA_ADDR 0xB4004100 |
1160 | #define MAC1_RX_DMA_ADDR 0xB4004300 | 1161 | #define MAC1_RX_DMA_ADDR 0xB4004300 |
1161 | /* offsets from MAC_RX_RING_ADDR */ | 1162 | /* offsets from MAC_RX_RING_ADDR */ |
1162 | #define MAC_RX_BUFF0_STATUS 0x0 | 1163 | #define MAC_RX_BUFF0_STATUS 0x0 |
1163 | # define RX_FRAME_LEN_MASK 0x3fff | 1164 | # define RX_FRAME_LEN_MASK 0x3fff |
1164 | # define RX_WDOG_TIMER (1<<14) | 1165 | # define RX_WDOG_TIMER (1 << 14) |
1165 | # define RX_RUNT (1<<15) | 1166 | # define RX_RUNT (1 << 15) |
1166 | # define RX_OVERLEN (1<<16) | 1167 | # define RX_OVERLEN (1 << 16) |
1167 | # define RX_COLL (1<<17) | 1168 | # define RX_COLL (1 << 17) |
1168 | # define RX_ETHER (1<<18) | 1169 | # define RX_ETHER (1 << 18) |
1169 | # define RX_MII_ERROR (1<<19) | 1170 | # define RX_MII_ERROR (1 << 19) |
1170 | # define RX_DRIBBLING (1<<20) | 1171 | # define RX_DRIBBLING (1 << 20) |
1171 | # define RX_CRC_ERROR (1<<21) | 1172 | # define RX_CRC_ERROR (1 << 21) |
1172 | # define RX_VLAN1 (1<<22) | 1173 | # define RX_VLAN1 (1 << 22) |
1173 | # define RX_VLAN2 (1<<23) | 1174 | # define RX_VLAN2 (1 << 23) |
1174 | # define RX_LEN_ERROR (1<<24) | 1175 | # define RX_LEN_ERROR (1 << 24) |
1175 | # define RX_CNTRL_FRAME (1<<25) | 1176 | # define RX_CNTRL_FRAME (1 << 25) |
1176 | # define RX_U_CNTRL_FRAME (1<<26) | 1177 | # define RX_U_CNTRL_FRAME (1 << 26) |
1177 | # define RX_MCAST_FRAME (1<<27) | 1178 | # define RX_MCAST_FRAME (1 << 27) |
1178 | # define RX_BCAST_FRAME (1<<28) | 1179 | # define RX_BCAST_FRAME (1 << 28) |
1179 | # define RX_FILTER_FAIL (1<<29) | 1180 | # define RX_FILTER_FAIL (1 << 29) |
1180 | # define RX_PACKET_FILTER (1<<30) | 1181 | # define RX_PACKET_FILTER (1 << 30) |
1181 | # define RX_MISSED_FRAME (1<<31) | 1182 | # define RX_MISSED_FRAME (1 << 31) |
1182 | 1183 | ||
1183 | # define RX_ERROR (RX_WDOG_TIMER | RX_RUNT | RX_OVERLEN | \ | 1184 | # define RX_ERROR (RX_WDOG_TIMER | RX_RUNT | RX_OVERLEN | \ |
1184 | RX_COLL | RX_MII_ERROR | RX_CRC_ERROR | \ | 1185 | RX_COLL | RX_MII_ERROR | RX_CRC_ERROR | \ |
1185 | RX_LEN_ERROR | RX_U_CNTRL_FRAME | RX_MISSED_FRAME) | 1186 | RX_LEN_ERROR | RX_U_CNTRL_FRAME | RX_MISSED_FRAME) |
1186 | #define MAC_RX_BUFF0_ADDR 0x4 | 1187 | #define MAC_RX_BUFF0_ADDR 0x4 |
1187 | # define RX_DMA_ENABLE (1<<0) | 1188 | # define RX_DMA_ENABLE (1 << 0) |
1188 | # define RX_T_DONE (1<<1) | 1189 | # define RX_T_DONE (1 << 1) |
1189 | # define RX_GET_DMA_BUFFER(X) (((X)>>2)&0x3) | 1190 | # define RX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) |
1190 | # define RX_SET_BUFF_ADDR(X) ((X)&0xffffffc0) | 1191 | # define RX_SET_BUFF_ADDR(X) ((X) & 0xffffffc0) |
1191 | #define MAC_RX_BUFF1_STATUS 0x10 | 1192 | #define MAC_RX_BUFF1_STATUS 0x10 |
1192 | #define MAC_RX_BUFF1_ADDR 0x14 | 1193 | #define MAC_RX_BUFF1_ADDR 0x14 |
1193 | #define MAC_RX_BUFF2_STATUS 0x20 | 1194 | #define MAC_RX_BUFF2_STATUS 0x20 |
1194 | #define MAC_RX_BUFF2_ADDR 0x24 | 1195 | #define MAC_RX_BUFF2_ADDR 0x24 |
1195 | #define MAC_RX_BUFF3_STATUS 0x30 | 1196 | #define MAC_RX_BUFF3_STATUS 0x30 |
1196 | #define MAC_RX_BUFF3_ADDR 0x34 | 1197 | #define MAC_RX_BUFF3_ADDR 0x34 |
1197 | |||
1198 | 1198 | ||
1199 | /* UARTS 0-3 */ | 1199 | /* UARTS 0-3 */ |
1200 | #define UART_BASE UART0_ADDR | 1200 | #define UART_BASE UART0_ADDR |
1201 | #ifdef CONFIG_SOC_AU1200 | 1201 | #ifdef CONFIG_SOC_AU1200 |
1202 | #define UART_DEBUG_BASE UART1_ADDR | 1202 | #define UART_DEBUG_BASE UART1_ADDR |
1203 | #else | 1203 | #else |
1204 | #define UART_DEBUG_BASE UART3_ADDR | 1204 | #define UART_DEBUG_BASE UART3_ADDR |
1205 | #endif | 1205 | #endif |
1206 | 1206 | ||
1207 | #define UART_RX 0 /* Receive buffer */ | 1207 | #define UART_RX 0 /* Receive buffer */ |
@@ -1294,341 +1294,337 @@ enum soc_au1200_ints { | |||
1294 | #define UART_MSR_DCTS 0x01 /* Delta CTS */ | 1294 | #define UART_MSR_DCTS 0x01 /* Delta CTS */ |
1295 | #define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */ | 1295 | #define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */ |
1296 | 1296 | ||
1297 | |||
1298 | |||
1299 | /* SSIO */ | 1297 | /* SSIO */ |
1300 | #define SSI0_STATUS 0xB1600000 | 1298 | #define SSI0_STATUS 0xB1600000 |
1301 | # define SSI_STATUS_BF (1<<4) | 1299 | # define SSI_STATUS_BF (1 << 4) |
1302 | # define SSI_STATUS_OF (1<<3) | 1300 | # define SSI_STATUS_OF (1 << 3) |
1303 | # define SSI_STATUS_UF (1<<2) | 1301 | # define SSI_STATUS_UF (1 << 2) |
1304 | # define SSI_STATUS_D (1<<1) | 1302 | # define SSI_STATUS_D (1 << 1) |
1305 | # define SSI_STATUS_B (1<<0) | 1303 | # define SSI_STATUS_B (1 << 0) |
1306 | #define SSI0_INT 0xB1600004 | 1304 | #define SSI0_INT 0xB1600004 |
1307 | # define SSI_INT_OI (1<<3) | 1305 | # define SSI_INT_OI (1 << 3) |
1308 | # define SSI_INT_UI (1<<2) | 1306 | # define SSI_INT_UI (1 << 2) |
1309 | # define SSI_INT_DI (1<<1) | 1307 | # define SSI_INT_DI (1 << 1) |
1310 | #define SSI0_INT_ENABLE 0xB1600008 | 1308 | #define SSI0_INT_ENABLE 0xB1600008 |
1311 | # define SSI_INTE_OIE (1<<3) | 1309 | # define SSI_INTE_OIE (1 << 3) |
1312 | # define SSI_INTE_UIE (1<<2) | 1310 | # define SSI_INTE_UIE (1 << 2) |
1313 | # define SSI_INTE_DIE (1<<1) | 1311 | # define SSI_INTE_DIE (1 << 1) |
1314 | #define SSI0_CONFIG 0xB1600020 | 1312 | #define SSI0_CONFIG 0xB1600020 |
1315 | # define SSI_CONFIG_AO (1<<24) | 1313 | # define SSI_CONFIG_AO (1 << 24) |
1316 | # define SSI_CONFIG_DO (1<<23) | 1314 | # define SSI_CONFIG_DO (1 << 23) |
1317 | # define SSI_CONFIG_ALEN_BIT 20 | 1315 | # define SSI_CONFIG_ALEN_BIT 20 |
1318 | # define SSI_CONFIG_ALEN_MASK (0x7<<20) | 1316 | # define SSI_CONFIG_ALEN_MASK (0x7 << 20) |
1319 | # define SSI_CONFIG_DLEN_BIT 16 | 1317 | # define SSI_CONFIG_DLEN_BIT 16 |
1320 | # define SSI_CONFIG_DLEN_MASK (0x7<<16) | 1318 | # define SSI_CONFIG_DLEN_MASK (0x7 << 16) |
1321 | # define SSI_CONFIG_DD (1<<11) | 1319 | # define SSI_CONFIG_DD (1 << 11) |
1322 | # define SSI_CONFIG_AD (1<<10) | 1320 | # define SSI_CONFIG_AD (1 << 10) |
1323 | # define SSI_CONFIG_BM_BIT 8 | 1321 | # define SSI_CONFIG_BM_BIT 8 |
1324 | # define SSI_CONFIG_BM_MASK (0x3<<8) | 1322 | # define SSI_CONFIG_BM_MASK (0x3 << 8) |
1325 | # define SSI_CONFIG_CE (1<<7) | 1323 | # define SSI_CONFIG_CE (1 << 7) |
1326 | # define SSI_CONFIG_DP (1<<6) | 1324 | # define SSI_CONFIG_DP (1 << 6) |
1327 | # define SSI_CONFIG_DL (1<<5) | 1325 | # define SSI_CONFIG_DL (1 << 5) |
1328 | # define SSI_CONFIG_EP (1<<4) | 1326 | # define SSI_CONFIG_EP (1 << 4) |
1329 | #define SSI0_ADATA 0xB1600024 | 1327 | #define SSI0_ADATA 0xB1600024 |
1330 | # define SSI_AD_D (1<<24) | 1328 | # define SSI_AD_D (1 << 24) |
1331 | # define SSI_AD_ADDR_BIT 16 | 1329 | # define SSI_AD_ADDR_BIT 16 |
1332 | # define SSI_AD_ADDR_MASK (0xff<<16) | 1330 | # define SSI_AD_ADDR_MASK (0xff << 16) |
1333 | # define SSI_AD_DATA_BIT 0 | 1331 | # define SSI_AD_DATA_BIT 0 |
1334 | # define SSI_AD_DATA_MASK (0xfff<<0) | 1332 | # define SSI_AD_DATA_MASK (0xfff << 0) |
1335 | #define SSI0_CLKDIV 0xB1600028 | 1333 | #define SSI0_CLKDIV 0xB1600028 |
1336 | #define SSI0_CONTROL 0xB1600100 | 1334 | #define SSI0_CONTROL 0xB1600100 |
1337 | # define SSI_CONTROL_CD (1<<1) | 1335 | # define SSI_CONTROL_CD (1 << 1) |
1338 | # define SSI_CONTROL_E (1<<0) | 1336 | # define SSI_CONTROL_E (1 << 0) |
1339 | 1337 | ||
1340 | /* SSI1 */ | 1338 | /* SSI1 */ |
1341 | #define SSI1_STATUS 0xB1680000 | 1339 | #define SSI1_STATUS 0xB1680000 |
1342 | #define SSI1_INT 0xB1680004 | 1340 | #define SSI1_INT 0xB1680004 |
1343 | #define SSI1_INT_ENABLE 0xB1680008 | 1341 | #define SSI1_INT_ENABLE 0xB1680008 |
1344 | #define SSI1_CONFIG 0xB1680020 | 1342 | #define SSI1_CONFIG 0xB1680020 |
1345 | #define SSI1_ADATA 0xB1680024 | 1343 | #define SSI1_ADATA 0xB1680024 |
1346 | #define SSI1_CLKDIV 0xB1680028 | 1344 | #define SSI1_CLKDIV 0xB1680028 |
1347 | #define SSI1_ENABLE 0xB1680100 | 1345 | #define SSI1_ENABLE 0xB1680100 |
1348 | 1346 | ||
1349 | /* | 1347 | /* |
1350 | * Register content definitions | 1348 | * Register content definitions |
1351 | */ | 1349 | */ |
1352 | #define SSI_STATUS_BF (1<<4) | 1350 | #define SSI_STATUS_BF (1 << 4) |
1353 | #define SSI_STATUS_OF (1<<3) | 1351 | #define SSI_STATUS_OF (1 << 3) |
1354 | #define SSI_STATUS_UF (1<<2) | 1352 | #define SSI_STATUS_UF (1 << 2) |
1355 | #define SSI_STATUS_D (1<<1) | 1353 | #define SSI_STATUS_D (1 << 1) |
1356 | #define SSI_STATUS_B (1<<0) | 1354 | #define SSI_STATUS_B (1 << 0) |
1357 | 1355 | ||
1358 | /* SSI_INT */ | 1356 | /* SSI_INT */ |
1359 | #define SSI_INT_OI (1<<3) | 1357 | #define SSI_INT_OI (1 << 3) |
1360 | #define SSI_INT_UI (1<<2) | 1358 | #define SSI_INT_UI (1 << 2) |
1361 | #define SSI_INT_DI (1<<1) | 1359 | #define SSI_INT_DI (1 << 1) |
1362 | 1360 | ||
1363 | /* SSI_INTEN */ | 1361 | /* SSI_INTEN */ |
1364 | #define SSI_INTEN_OIE (1<<3) | 1362 | #define SSI_INTEN_OIE (1 << 3) |
1365 | #define SSI_INTEN_UIE (1<<2) | 1363 | #define SSI_INTEN_UIE (1 << 2) |
1366 | #define SSI_INTEN_DIE (1<<1) | 1364 | #define SSI_INTEN_DIE (1 << 1) |
1367 | 1365 | ||
1368 | #define SSI_CONFIG_AO (1<<24) | 1366 | #define SSI_CONFIG_AO (1 << 24) |
1369 | #define SSI_CONFIG_DO (1<<23) | 1367 | #define SSI_CONFIG_DO (1 << 23) |
1370 | #define SSI_CONFIG_ALEN (7<<20) | 1368 | #define SSI_CONFIG_ALEN (7 << 20) |
1371 | #define SSI_CONFIG_DLEN (15<<16) | 1369 | #define SSI_CONFIG_DLEN (15 << 16) |
1372 | #define SSI_CONFIG_DD (1<<11) | 1370 | #define SSI_CONFIG_DD (1 << 11) |
1373 | #define SSI_CONFIG_AD (1<<10) | 1371 | #define SSI_CONFIG_AD (1 << 10) |
1374 | #define SSI_CONFIG_BM (3<<8) | 1372 | #define SSI_CONFIG_BM (3 << 8) |
1375 | #define SSI_CONFIG_CE (1<<7) | 1373 | #define SSI_CONFIG_CE (1 << 7) |
1376 | #define SSI_CONFIG_DP (1<<6) | 1374 | #define SSI_CONFIG_DP (1 << 6) |
1377 | #define SSI_CONFIG_DL (1<<5) | 1375 | #define SSI_CONFIG_DL (1 << 5) |
1378 | #define SSI_CONFIG_EP (1<<4) | 1376 | #define SSI_CONFIG_EP (1 << 4) |
1379 | #define SSI_CONFIG_ALEN_N(N) ((N-1)<<20) | 1377 | #define SSI_CONFIG_ALEN_N(N) ((N-1) << 20) |
1380 | #define SSI_CONFIG_DLEN_N(N) ((N-1)<<16) | 1378 | #define SSI_CONFIG_DLEN_N(N) ((N-1) << 16) |
1381 | #define SSI_CONFIG_BM_HI (0<<8) | 1379 | #define SSI_CONFIG_BM_HI (0 << 8) |
1382 | #define SSI_CONFIG_BM_LO (1<<8) | 1380 | #define SSI_CONFIG_BM_LO (1 << 8) |
1383 | #define SSI_CONFIG_BM_CY (2<<8) | 1381 | #define SSI_CONFIG_BM_CY (2 << 8) |
1384 | 1382 | ||
1385 | #define SSI_ADATA_D (1<<24) | 1383 | #define SSI_ADATA_D (1 << 24) |
1386 | #define SSI_ADATA_ADDR (0xFF<<16) | 1384 | #define SSI_ADATA_ADDR (0xFF << 16) |
1387 | #define SSI_ADATA_DATA (0x0FFF) | 1385 | #define SSI_ADATA_DATA 0x0FFF |
1388 | #define SSI_ADATA_ADDR_N(N) (N<<16) | 1386 | #define SSI_ADATA_ADDR_N(N) (N << 16) |
1389 | 1387 | ||
1390 | #define SSI_ENABLE_CD (1<<1) | 1388 | #define SSI_ENABLE_CD (1 << 1) |
1391 | #define SSI_ENABLE_E (1<<0) | 1389 | #define SSI_ENABLE_E (1 << 0) |
1392 | |||
1393 | 1390 | ||
1394 | /* IrDA Controller */ | 1391 | /* IrDA Controller */ |
1395 | #define IRDA_BASE 0xB0300000 | 1392 | #define IRDA_BASE 0xB0300000 |
1396 | #define IR_RING_PTR_STATUS (IRDA_BASE+0x00) | 1393 | #define IR_RING_PTR_STATUS (IRDA_BASE + 0x00) |
1397 | #define IR_RING_BASE_ADDR_H (IRDA_BASE+0x04) | 1394 | #define IR_RING_BASE_ADDR_H (IRDA_BASE + 0x04) |
1398 | #define IR_RING_BASE_ADDR_L (IRDA_BASE+0x08) | 1395 | #define IR_RING_BASE_ADDR_L (IRDA_BASE + 0x08) |
1399 | #define IR_RING_SIZE (IRDA_BASE+0x0C) | 1396 | #define IR_RING_SIZE (IRDA_BASE + 0x0C) |
1400 | #define IR_RING_PROMPT (IRDA_BASE+0x10) | 1397 | #define IR_RING_PROMPT (IRDA_BASE + 0x10) |
1401 | #define IR_RING_ADDR_CMPR (IRDA_BASE+0x14) | 1398 | #define IR_RING_ADDR_CMPR (IRDA_BASE + 0x14) |
1402 | #define IR_INT_CLEAR (IRDA_BASE+0x18) | 1399 | #define IR_INT_CLEAR (IRDA_BASE + 0x18) |
1403 | #define IR_CONFIG_1 (IRDA_BASE+0x20) | 1400 | #define IR_CONFIG_1 (IRDA_BASE + 0x20) |
1404 | # define IR_RX_INVERT_LED (1<<0) | 1401 | # define IR_RX_INVERT_LED (1 << 0) |
1405 | # define IR_TX_INVERT_LED (1<<1) | 1402 | # define IR_TX_INVERT_LED (1 << 1) |
1406 | # define IR_ST (1<<2) | 1403 | # define IR_ST (1 << 2) |
1407 | # define IR_SF (1<<3) | 1404 | # define IR_SF (1 << 3) |
1408 | # define IR_SIR (1<<4) | 1405 | # define IR_SIR (1 << 4) |
1409 | # define IR_MIR (1<<5) | 1406 | # define IR_MIR (1 << 5) |
1410 | # define IR_FIR (1<<6) | 1407 | # define IR_FIR (1 << 6) |
1411 | # define IR_16CRC (1<<7) | 1408 | # define IR_16CRC (1 << 7) |
1412 | # define IR_TD (1<<8) | 1409 | # define IR_TD (1 << 8) |
1413 | # define IR_RX_ALL (1<<9) | 1410 | # define IR_RX_ALL (1 << 9) |
1414 | # define IR_DMA_ENABLE (1<<10) | 1411 | # define IR_DMA_ENABLE (1 << 10) |
1415 | # define IR_RX_ENABLE (1<<11) | 1412 | # define IR_RX_ENABLE (1 << 11) |
1416 | # define IR_TX_ENABLE (1<<12) | 1413 | # define IR_TX_ENABLE (1 << 12) |
1417 | # define IR_LOOPBACK (1<<14) | 1414 | # define IR_LOOPBACK (1 << 14) |
1418 | # define IR_SIR_MODE (IR_SIR | IR_DMA_ENABLE | \ | 1415 | # define IR_SIR_MODE (IR_SIR | IR_DMA_ENABLE | \ |
1419 | IR_RX_ALL | IR_RX_ENABLE | IR_SF | IR_16CRC) | 1416 | IR_RX_ALL | IR_RX_ENABLE | IR_SF | IR_16CRC) |
1420 | #define IR_SIR_FLAGS (IRDA_BASE+0x24) | 1417 | #define IR_SIR_FLAGS (IRDA_BASE + 0x24) |
1421 | #define IR_ENABLE (IRDA_BASE+0x28) | 1418 | #define IR_ENABLE (IRDA_BASE + 0x28) |
1422 | # define IR_RX_STATUS (1<<9) | 1419 | # define IR_RX_STATUS (1 << 9) |
1423 | # define IR_TX_STATUS (1<<10) | 1420 | # define IR_TX_STATUS (1 << 10) |
1424 | #define IR_READ_PHY_CONFIG (IRDA_BASE+0x2C) | 1421 | #define IR_READ_PHY_CONFIG (IRDA_BASE + 0x2C) |
1425 | #define IR_WRITE_PHY_CONFIG (IRDA_BASE+0x30) | 1422 | #define IR_WRITE_PHY_CONFIG (IRDA_BASE + 0x30) |
1426 | #define IR_MAX_PKT_LEN (IRDA_BASE+0x34) | 1423 | #define IR_MAX_PKT_LEN (IRDA_BASE + 0x34) |
1427 | #define IR_RX_BYTE_CNT (IRDA_BASE+0x38) | 1424 | #define IR_RX_BYTE_CNT (IRDA_BASE + 0x38) |
1428 | #define IR_CONFIG_2 (IRDA_BASE+0x3C) | 1425 | #define IR_CONFIG_2 (IRDA_BASE + 0x3C) |
1429 | # define IR_MODE_INV (1<<0) | 1426 | # define IR_MODE_INV (1 << 0) |
1430 | # define IR_ONE_PIN (1<<1) | 1427 | # define IR_ONE_PIN (1 << 1) |
1431 | #define IR_INTERFACE_CONFIG (IRDA_BASE+0x40) | 1428 | #define IR_INTERFACE_CONFIG (IRDA_BASE + 0x40) |
1432 | 1429 | ||
1433 | /* GPIO */ | 1430 | /* GPIO */ |
1434 | #define SYS_PINFUNC 0xB190002C | 1431 | #define SYS_PINFUNC 0xB190002C |
1435 | # define SYS_PF_USB (1<<15) /* 2nd USB device/host */ | 1432 | # define SYS_PF_USB (1 << 15) /* 2nd USB device/host */ |
1436 | # define SYS_PF_U3 (1<<14) /* GPIO23/U3TXD */ | 1433 | # define SYS_PF_U3 (1 << 14) /* GPIO23/U3TXD */ |
1437 | # define SYS_PF_U2 (1<<13) /* GPIO22/U2TXD */ | 1434 | # define SYS_PF_U2 (1 << 13) /* GPIO22/U2TXD */ |
1438 | # define SYS_PF_U1 (1<<12) /* GPIO21/U1TXD */ | 1435 | # define SYS_PF_U1 (1 << 12) /* GPIO21/U1TXD */ |
1439 | # define SYS_PF_SRC (1<<11) /* GPIO6/SROMCKE */ | 1436 | # define SYS_PF_SRC (1 << 11) /* GPIO6/SROMCKE */ |
1440 | # define SYS_PF_CK5 (1<<10) /* GPIO3/CLK5 */ | 1437 | # define SYS_PF_CK5 (1 << 10) /* GPIO3/CLK5 */ |
1441 | # define SYS_PF_CK4 (1<<9) /* GPIO2/CLK4 */ | 1438 | # define SYS_PF_CK4 (1 << 9) /* GPIO2/CLK4 */ |
1442 | # define SYS_PF_IRF (1<<8) /* GPIO15/IRFIRSEL */ | 1439 | # define SYS_PF_IRF (1 << 8) /* GPIO15/IRFIRSEL */ |
1443 | # define SYS_PF_UR3 (1<<7) /* GPIO[14:9]/UART3 */ | 1440 | # define SYS_PF_UR3 (1 << 7) /* GPIO[14:9]/UART3 */ |
1444 | # define SYS_PF_I2D (1<<6) /* GPIO8/I2SDI */ | 1441 | # define SYS_PF_I2D (1 << 6) /* GPIO8/I2SDI */ |
1445 | # define SYS_PF_I2S (1<<5) /* I2S/GPIO[29:31] */ | 1442 | # define SYS_PF_I2S (1 << 5) /* I2S/GPIO[29:31] */ |
1446 | # define SYS_PF_NI2 (1<<4) /* NI2/GPIO[24:28] */ | 1443 | # define SYS_PF_NI2 (1 << 4) /* NI2/GPIO[24:28] */ |
1447 | # define SYS_PF_U0 (1<<3) /* U0TXD/GPIO20 */ | 1444 | # define SYS_PF_U0 (1 << 3) /* U0TXD/GPIO20 */ |
1448 | # define SYS_PF_RD (1<<2) /* IRTXD/GPIO19 */ | 1445 | # define SYS_PF_RD (1 << 2) /* IRTXD/GPIO19 */ |
1449 | # define SYS_PF_A97 (1<<1) /* AC97/SSL1 */ | 1446 | # define SYS_PF_A97 (1 << 1) /* AC97/SSL1 */ |
1450 | # define SYS_PF_S0 (1<<0) /* SSI_0/GPIO[16:18] */ | 1447 | # define SYS_PF_S0 (1 << 0) /* SSI_0/GPIO[16:18] */ |
1451 | 1448 | ||
1452 | /* Au1100 Only */ | 1449 | /* Au1100 only */ |
1453 | # define SYS_PF_PC (1<<18) /* PCMCIA/GPIO[207:204] */ | 1450 | # define SYS_PF_PC (1 << 18) /* PCMCIA/GPIO[207:204] */ |
1454 | # define SYS_PF_LCD (1<<17) /* extern lcd/GPIO[203:200] */ | 1451 | # define SYS_PF_LCD (1 << 17) /* extern lcd/GPIO[203:200] */ |
1455 | # define SYS_PF_CS (1<<16) /* EXTCLK0/32khz to gpio2 */ | 1452 | # define SYS_PF_CS (1 << 16) /* EXTCLK0/32KHz to gpio2 */ |
1456 | # define SYS_PF_EX0 (1<<9) /* gpio2/clock */ | 1453 | # define SYS_PF_EX0 (1 << 9) /* GPIO2/clock */ |
1457 | 1454 | ||
1458 | /* Au1550 Only. Redefines lots of pins */ | 1455 | /* Au1550 only. Redefines lots of pins */ |
1459 | # define SYS_PF_PSC2_MASK (7 << 17) | 1456 | # define SYS_PF_PSC2_MASK (7 << 17) |
1460 | # define SYS_PF_PSC2_AC97 (0) | 1457 | # define SYS_PF_PSC2_AC97 0 |
1461 | # define SYS_PF_PSC2_SPI (0) | 1458 | # define SYS_PF_PSC2_SPI 0 |
1462 | # define SYS_PF_PSC2_I2S (1 << 17) | 1459 | # define SYS_PF_PSC2_I2S (1 << 17) |
1463 | # define SYS_PF_PSC2_SMBUS (3 << 17) | 1460 | # define SYS_PF_PSC2_SMBUS (3 << 17) |
1464 | # define SYS_PF_PSC2_GPIO (7 << 17) | 1461 | # define SYS_PF_PSC2_GPIO (7 << 17) |
1465 | # define SYS_PF_PSC3_MASK (7 << 20) | 1462 | # define SYS_PF_PSC3_MASK (7 << 20) |
1466 | # define SYS_PF_PSC3_AC97 (0) | 1463 | # define SYS_PF_PSC3_AC97 0 |
1467 | # define SYS_PF_PSC3_SPI (0) | 1464 | # define SYS_PF_PSC3_SPI 0 |
1468 | # define SYS_PF_PSC3_I2S (1 << 20) | 1465 | # define SYS_PF_PSC3_I2S (1 << 20) |
1469 | # define SYS_PF_PSC3_SMBUS (3 << 20) | 1466 | # define SYS_PF_PSC3_SMBUS (3 << 20) |
1470 | # define SYS_PF_PSC3_GPIO (7 << 20) | 1467 | # define SYS_PF_PSC3_GPIO (7 << 20) |
1471 | # define SYS_PF_PSC1_S1 (1 << 1) | 1468 | # define SYS_PF_PSC1_S1 (1 << 1) |
1472 | # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) | 1469 | # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) |
1473 | 1470 | ||
1474 | /* Au1200 Only */ | 1471 | /* Au1200 only */ |
1475 | #ifdef CONFIG_SOC_AU1200 | 1472 | #ifdef CONFIG_SOC_AU1200 |
1476 | #define SYS_PINFUNC_DMA (1<<31) | 1473 | #define SYS_PINFUNC_DMA (1 << 31) |
1477 | #define SYS_PINFUNC_S0A (1<<30) | 1474 | #define SYS_PINFUNC_S0A (1 << 30) |
1478 | #define SYS_PINFUNC_S1A (1<<29) | 1475 | #define SYS_PINFUNC_S1A (1 << 29) |
1479 | #define SYS_PINFUNC_LP0 (1<<28) | 1476 | #define SYS_PINFUNC_LP0 (1 << 28) |
1480 | #define SYS_PINFUNC_LP1 (1<<27) | 1477 | #define SYS_PINFUNC_LP1 (1 << 27) |
1481 | #define SYS_PINFUNC_LD16 (1<<26) | 1478 | #define SYS_PINFUNC_LD16 (1 << 26) |
1482 | #define SYS_PINFUNC_LD8 (1<<25) | 1479 | #define SYS_PINFUNC_LD8 (1 << 25) |
1483 | #define SYS_PINFUNC_LD1 (1<<24) | 1480 | #define SYS_PINFUNC_LD1 (1 << 24) |
1484 | #define SYS_PINFUNC_LD0 (1<<23) | 1481 | #define SYS_PINFUNC_LD0 (1 << 23) |
1485 | #define SYS_PINFUNC_P1A (3<<21) | 1482 | #define SYS_PINFUNC_P1A (3 << 21) |
1486 | #define SYS_PINFUNC_P1B (1<<20) | 1483 | #define SYS_PINFUNC_P1B (1 << 20) |
1487 | #define SYS_PINFUNC_FS3 (1<<19) | 1484 | #define SYS_PINFUNC_FS3 (1 << 19) |
1488 | #define SYS_PINFUNC_P0A (3<<17) | 1485 | #define SYS_PINFUNC_P0A (3 << 17) |
1489 | #define SYS_PINFUNC_CS (1<<16) | 1486 | #define SYS_PINFUNC_CS (1 << 16) |
1490 | #define SYS_PINFUNC_CIM (1<<15) | 1487 | #define SYS_PINFUNC_CIM (1 << 15) |
1491 | #define SYS_PINFUNC_P1C (1<<14) | 1488 | #define SYS_PINFUNC_P1C (1 << 14) |
1492 | #define SYS_PINFUNC_U1T (1<<12) | 1489 | #define SYS_PINFUNC_U1T (1 << 12) |
1493 | #define SYS_PINFUNC_U1R (1<<11) | 1490 | #define SYS_PINFUNC_U1R (1 << 11) |
1494 | #define SYS_PINFUNC_EX1 (1<<10) | 1491 | #define SYS_PINFUNC_EX1 (1 << 10) |
1495 | #define SYS_PINFUNC_EX0 (1<<9) | 1492 | #define SYS_PINFUNC_EX0 (1 << 9) |
1496 | #define SYS_PINFUNC_U0R (1<<8) | 1493 | #define SYS_PINFUNC_U0R (1 << 8) |
1497 | #define SYS_PINFUNC_MC (1<<7) | 1494 | #define SYS_PINFUNC_MC (1 << 7) |
1498 | #define SYS_PINFUNC_S0B (1<<6) | 1495 | #define SYS_PINFUNC_S0B (1 << 6) |
1499 | #define SYS_PINFUNC_S0C (1<<5) | 1496 | #define SYS_PINFUNC_S0C (1 << 5) |
1500 | #define SYS_PINFUNC_P0B (1<<4) | 1497 | #define SYS_PINFUNC_P0B (1 << 4) |
1501 | #define SYS_PINFUNC_U0T (1<<3) | 1498 | #define SYS_PINFUNC_U0T (1 << 3) |
1502 | #define SYS_PINFUNC_S1B (1<<2) | 1499 | #define SYS_PINFUNC_S1B (1 << 2) |
1503 | #endif | 1500 | #endif |
1504 | 1501 | ||
1505 | #define SYS_TRIOUTRD 0xB1900100 | 1502 | #define SYS_TRIOUTRD 0xB1900100 |
1506 | #define SYS_TRIOUTCLR 0xB1900100 | 1503 | #define SYS_TRIOUTCLR 0xB1900100 |
1507 | #define SYS_OUTPUTRD 0xB1900108 | 1504 | #define SYS_OUTPUTRD 0xB1900108 |
1508 | #define SYS_OUTPUTSET 0xB1900108 | 1505 | #define SYS_OUTPUTSET 0xB1900108 |
1509 | #define SYS_OUTPUTCLR 0xB190010C | 1506 | #define SYS_OUTPUTCLR 0xB190010C |
1510 | #define SYS_PINSTATERD 0xB1900110 | 1507 | #define SYS_PINSTATERD 0xB1900110 |
1511 | #define SYS_PININPUTEN 0xB1900110 | 1508 | #define SYS_PININPUTEN 0xB1900110 |
1512 | 1509 | ||
1513 | /* GPIO2, Au1500, Au1550 only */ | 1510 | /* GPIO2, Au1500, Au1550 only */ |
1514 | #define GPIO2_BASE 0xB1700000 | 1511 | #define GPIO2_BASE 0xB1700000 |
1515 | #define GPIO2_DIR (GPIO2_BASE + 0) | 1512 | #define GPIO2_DIR (GPIO2_BASE + 0) |
1516 | #define GPIO2_OUTPUT (GPIO2_BASE + 8) | 1513 | #define GPIO2_OUTPUT (GPIO2_BASE + 8) |
1517 | #define GPIO2_PINSTATE (GPIO2_BASE + 0xC) | 1514 | #define GPIO2_PINSTATE (GPIO2_BASE + 0xC) |
1518 | #define GPIO2_INTENABLE (GPIO2_BASE + 0x10) | 1515 | #define GPIO2_INTENABLE (GPIO2_BASE + 0x10) |
1519 | #define GPIO2_ENABLE (GPIO2_BASE + 0x14) | 1516 | #define GPIO2_ENABLE (GPIO2_BASE + 0x14) |
1520 | 1517 | ||
1521 | /* Power Management */ | 1518 | /* Power Management */ |
1522 | #define SYS_SCRATCH0 0xB1900018 | 1519 | #define SYS_SCRATCH0 0xB1900018 |
1523 | #define SYS_SCRATCH1 0xB190001C | 1520 | #define SYS_SCRATCH1 0xB190001C |
1524 | #define SYS_WAKEMSK 0xB1900034 | 1521 | #define SYS_WAKEMSK 0xB1900034 |
1525 | #define SYS_ENDIAN 0xB1900038 | 1522 | #define SYS_ENDIAN 0xB1900038 |
1526 | #define SYS_POWERCTRL 0xB190003C | 1523 | #define SYS_POWERCTRL 0xB190003C |
1527 | #define SYS_WAKESRC 0xB190005C | 1524 | #define SYS_WAKESRC 0xB190005C |
1528 | #define SYS_SLPPWR 0xB1900078 | 1525 | #define SYS_SLPPWR 0xB1900078 |
1529 | #define SYS_SLEEP 0xB190007C | 1526 | #define SYS_SLEEP 0xB190007C |
1530 | 1527 | ||
1531 | /* Clock Controller */ | 1528 | /* Clock Controller */ |
1532 | #define SYS_FREQCTRL0 0xB1900020 | 1529 | #define SYS_FREQCTRL0 0xB1900020 |
1533 | # define SYS_FC_FRDIV2_BIT 22 | 1530 | # define SYS_FC_FRDIV2_BIT 22 |
1534 | # define SYS_FC_FRDIV2_MASK (0xff << SYS_FC_FRDIV2_BIT) | 1531 | # define SYS_FC_FRDIV2_MASK (0xff << SYS_FC_FRDIV2_BIT) |
1535 | # define SYS_FC_FE2 (1<<21) | 1532 | # define SYS_FC_FE2 (1 << 21) |
1536 | # define SYS_FC_FS2 (1<<20) | 1533 | # define SYS_FC_FS2 (1 << 20) |
1537 | # define SYS_FC_FRDIV1_BIT 12 | 1534 | # define SYS_FC_FRDIV1_BIT 12 |
1538 | # define SYS_FC_FRDIV1_MASK (0xff << SYS_FC_FRDIV1_BIT) | 1535 | # define SYS_FC_FRDIV1_MASK (0xff << SYS_FC_FRDIV1_BIT) |
1539 | # define SYS_FC_FE1 (1<<11) | 1536 | # define SYS_FC_FE1 (1 << 11) |
1540 | # define SYS_FC_FS1 (1<<10) | 1537 | # define SYS_FC_FS1 (1 << 10) |
1541 | # define SYS_FC_FRDIV0_BIT 2 | 1538 | # define SYS_FC_FRDIV0_BIT 2 |
1542 | # define SYS_FC_FRDIV0_MASK (0xff << SYS_FC_FRDIV0_BIT) | 1539 | # define SYS_FC_FRDIV0_MASK (0xff << SYS_FC_FRDIV0_BIT) |
1543 | # define SYS_FC_FE0 (1<<1) | 1540 | # define SYS_FC_FE0 (1 << 1) |
1544 | # define SYS_FC_FS0 (1<<0) | 1541 | # define SYS_FC_FS0 (1 << 0) |
1545 | #define SYS_FREQCTRL1 0xB1900024 | 1542 | #define SYS_FREQCTRL1 0xB1900024 |
1546 | # define SYS_FC_FRDIV5_BIT 22 | 1543 | # define SYS_FC_FRDIV5_BIT 22 |
1547 | # define SYS_FC_FRDIV5_MASK (0xff << SYS_FC_FRDIV5_BIT) | 1544 | # define SYS_FC_FRDIV5_MASK (0xff << SYS_FC_FRDIV5_BIT) |
1548 | # define SYS_FC_FE5 (1<<21) | 1545 | # define SYS_FC_FE5 (1 << 21) |
1549 | # define SYS_FC_FS5 (1<<20) | 1546 | # define SYS_FC_FS5 (1 << 20) |
1550 | # define SYS_FC_FRDIV4_BIT 12 | 1547 | # define SYS_FC_FRDIV4_BIT 12 |
1551 | # define SYS_FC_FRDIV4_MASK (0xff << SYS_FC_FRDIV4_BIT) | 1548 | # define SYS_FC_FRDIV4_MASK (0xff << SYS_FC_FRDIV4_BIT) |
1552 | # define SYS_FC_FE4 (1<<11) | 1549 | # define SYS_FC_FE4 (1 << 11) |
1553 | # define SYS_FC_FS4 (1<<10) | 1550 | # define SYS_FC_FS4 (1 << 10) |
1554 | # define SYS_FC_FRDIV3_BIT 2 | 1551 | # define SYS_FC_FRDIV3_BIT 2 |
1555 | # define SYS_FC_FRDIV3_MASK (0xff << SYS_FC_FRDIV3_BIT) | 1552 | # define SYS_FC_FRDIV3_MASK (0xff << SYS_FC_FRDIV3_BIT) |
1556 | # define SYS_FC_FE3 (1<<1) | 1553 | # define SYS_FC_FE3 (1 << 1) |
1557 | # define SYS_FC_FS3 (1<<0) | 1554 | # define SYS_FC_FS3 (1 << 0) |
1558 | #define SYS_CLKSRC 0xB1900028 | 1555 | #define SYS_CLKSRC 0xB1900028 |
1559 | # define SYS_CS_ME1_BIT 27 | 1556 | # define SYS_CS_ME1_BIT 27 |
1560 | # define SYS_CS_ME1_MASK (0x7<<SYS_CS_ME1_BIT) | 1557 | # define SYS_CS_ME1_MASK (0x7 << SYS_CS_ME1_BIT) |
1561 | # define SYS_CS_DE1 (1<<26) | 1558 | # define SYS_CS_DE1 (1 << 26) |
1562 | # define SYS_CS_CE1 (1<<25) | 1559 | # define SYS_CS_CE1 (1 << 25) |
1563 | # define SYS_CS_ME0_BIT 22 | 1560 | # define SYS_CS_ME0_BIT 22 |
1564 | # define SYS_CS_ME0_MASK (0x7<<SYS_CS_ME0_BIT) | 1561 | # define SYS_CS_ME0_MASK (0x7 << SYS_CS_ME0_BIT) |
1565 | # define SYS_CS_DE0 (1<<21) | 1562 | # define SYS_CS_DE0 (1 << 21) |
1566 | # define SYS_CS_CE0 (1<<20) | 1563 | # define SYS_CS_CE0 (1 << 20) |
1567 | # define SYS_CS_MI2_BIT 17 | 1564 | # define SYS_CS_MI2_BIT 17 |
1568 | # define SYS_CS_MI2_MASK (0x7<<SYS_CS_MI2_BIT) | 1565 | # define SYS_CS_MI2_MASK (0x7 << SYS_CS_MI2_BIT) |
1569 | # define SYS_CS_DI2 (1<<16) | 1566 | # define SYS_CS_DI2 (1 << 16) |
1570 | # define SYS_CS_CI2 (1<<15) | 1567 | # define SYS_CS_CI2 (1 << 15) |
1571 | #ifdef CONFIG_SOC_AU1100 | 1568 | #ifdef CONFIG_SOC_AU1100 |
1572 | # define SYS_CS_ML_BIT 7 | 1569 | # define SYS_CS_ML_BIT 7 |
1573 | # define SYS_CS_ML_MASK (0x7<<SYS_CS_ML_BIT) | 1570 | # define SYS_CS_ML_MASK (0x7 << SYS_CS_ML_BIT) |
1574 | # define SYS_CS_DL (1<<6) | 1571 | # define SYS_CS_DL (1 << 6) |
1575 | # define SYS_CS_CL (1<<5) | 1572 | # define SYS_CS_CL (1 << 5) |
1576 | #else | 1573 | #else |
1577 | # define SYS_CS_MUH_BIT 12 | 1574 | # define SYS_CS_MUH_BIT 12 |
1578 | # define SYS_CS_MUH_MASK (0x7<<SYS_CS_MUH_BIT) | 1575 | # define SYS_CS_MUH_MASK (0x7 << SYS_CS_MUH_BIT) |
1579 | # define SYS_CS_DUH (1<<11) | 1576 | # define SYS_CS_DUH (1 << 11) |
1580 | # define SYS_CS_CUH (1<<10) | 1577 | # define SYS_CS_CUH (1 << 10) |
1581 | # define SYS_CS_MUD_BIT 7 | 1578 | # define SYS_CS_MUD_BIT 7 |
1582 | # define SYS_CS_MUD_MASK (0x7<<SYS_CS_MUD_BIT) | 1579 | # define SYS_CS_MUD_MASK (0x7 << SYS_CS_MUD_BIT) |
1583 | # define SYS_CS_DUD (1<<6) | 1580 | # define SYS_CS_DUD (1 << 6) |
1584 | # define SYS_CS_CUD (1<<5) | 1581 | # define SYS_CS_CUD (1 << 5) |
1585 | #endif | 1582 | #endif |
1586 | # define SYS_CS_MIR_BIT 2 | 1583 | # define SYS_CS_MIR_BIT 2 |
1587 | # define SYS_CS_MIR_MASK (0x7<<SYS_CS_MIR_BIT) | 1584 | # define SYS_CS_MIR_MASK (0x7 << SYS_CS_MIR_BIT) |
1588 | # define SYS_CS_DIR (1<<1) | 1585 | # define SYS_CS_DIR (1 << 1) |
1589 | # define SYS_CS_CIR (1<<0) | 1586 | # define SYS_CS_CIR (1 << 0) |
1590 | 1587 | ||
1591 | # define SYS_CS_MUX_AUX 0x1 | 1588 | # define SYS_CS_MUX_AUX 0x1 |
1592 | # define SYS_CS_MUX_FQ0 0x2 | 1589 | # define SYS_CS_MUX_FQ0 0x2 |
1593 | # define SYS_CS_MUX_FQ1 0x3 | 1590 | # define SYS_CS_MUX_FQ1 0x3 |
1594 | # define SYS_CS_MUX_FQ2 0x4 | 1591 | # define SYS_CS_MUX_FQ2 0x4 |
1595 | # define SYS_CS_MUX_FQ3 0x5 | 1592 | # define SYS_CS_MUX_FQ3 0x5 |
1596 | # define SYS_CS_MUX_FQ4 0x6 | 1593 | # define SYS_CS_MUX_FQ4 0x6 |
1597 | # define SYS_CS_MUX_FQ5 0x7 | 1594 | # define SYS_CS_MUX_FQ5 0x7 |
1598 | #define SYS_CPUPLL 0xB1900060 | 1595 | #define SYS_CPUPLL 0xB1900060 |
1599 | #define SYS_AUXPLL 0xB1900064 | 1596 | #define SYS_AUXPLL 0xB1900064 |
1600 | 1597 | ||
1601 | /* AC97 Controller */ | 1598 | /* AC97 Controller */ |
1602 | #define AC97C_CONFIG 0xB0000000 | 1599 | #define AC97C_CONFIG 0xB0000000 |
1603 | # define AC97C_RECV_SLOTS_BIT 13 | 1600 | # define AC97C_RECV_SLOTS_BIT 13 |
1604 | # define AC97C_RECV_SLOTS_MASK (0x3ff << AC97C_RECV_SLOTS_BIT) | 1601 | # define AC97C_RECV_SLOTS_MASK (0x3ff << AC97C_RECV_SLOTS_BIT) |
1605 | # define AC97C_XMIT_SLOTS_BIT 3 | 1602 | # define AC97C_XMIT_SLOTS_BIT 3 |
1606 | # define AC97C_XMIT_SLOTS_MASK (0x3ff << AC97C_XMIT_SLOTS_BIT) | 1603 | # define AC97C_XMIT_SLOTS_MASK (0x3ff << AC97C_XMIT_SLOTS_BIT) |
1607 | # define AC97C_SG (1<<2) | 1604 | # define AC97C_SG (1 << 2) |
1608 | # define AC97C_SYNC (1<<1) | 1605 | # define AC97C_SYNC (1 << 1) |
1609 | # define AC97C_RESET (1<<0) | 1606 | # define AC97C_RESET (1 << 0) |
1610 | #define AC97C_STATUS 0xB0000004 | 1607 | #define AC97C_STATUS 0xB0000004 |
1611 | # define AC97C_XU (1<<11) | 1608 | # define AC97C_XU (1 << 11) |
1612 | # define AC97C_XO (1<<10) | 1609 | # define AC97C_XO (1 << 10) |
1613 | # define AC97C_RU (1<<9) | 1610 | # define AC97C_RU (1 << 9) |
1614 | # define AC97C_RO (1<<8) | 1611 | # define AC97C_RO (1 << 8) |
1615 | # define AC97C_READY (1<<7) | 1612 | # define AC97C_READY (1 << 7) |
1616 | # define AC97C_CP (1<<6) | 1613 | # define AC97C_CP (1 << 6) |
1617 | # define AC97C_TR (1<<5) | 1614 | # define AC97C_TR (1 << 5) |
1618 | # define AC97C_TE (1<<4) | 1615 | # define AC97C_TE (1 << 4) |
1619 | # define AC97C_TF (1<<3) | 1616 | # define AC97C_TF (1 << 3) |
1620 | # define AC97C_RR (1<<2) | 1617 | # define AC97C_RR (1 << 2) |
1621 | # define AC97C_RE (1<<1) | 1618 | # define AC97C_RE (1 << 1) |
1622 | # define AC97C_RF (1<<0) | 1619 | # define AC97C_RF (1 << 0) |
1623 | #define AC97C_DATA 0xB0000008 | 1620 | #define AC97C_DATA 0xB0000008 |
1624 | #define AC97C_CMD 0xB000000C | 1621 | #define AC97C_CMD 0xB000000C |
1625 | # define AC97C_WD_BIT 16 | 1622 | # define AC97C_WD_BIT 16 |
1626 | # define AC97C_READ (1<<7) | 1623 | # define AC97C_READ (1 << 7) |
1627 | # define AC97C_INDEX_MASK 0x7f | 1624 | # define AC97C_INDEX_MASK 0x7f |
1628 | #define AC97C_CNTRL 0xB0000010 | 1625 | #define AC97C_CNTRL 0xB0000010 |
1629 | # define AC97C_RS (1<<1) | 1626 | # define AC97C_RS (1 << 1) |
1630 | # define AC97C_CE (1<<0) | 1627 | # define AC97C_CE (1 << 0) |
1631 | |||
1632 | 1628 | ||
1633 | /* Secure Digital (SD) Controller */ | 1629 | /* Secure Digital (SD) Controller */ |
1634 | #define SD0_XMIT_FIFO 0xB0600000 | 1630 | #define SD0_XMIT_FIFO 0xB0600000 |
@@ -1638,73 +1634,74 @@ enum soc_au1200_ints { | |||
1638 | 1634 | ||
1639 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) | 1635 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) |
1640 | /* Au1500 PCI Controller */ | 1636 | /* Au1500 PCI Controller */ |
1641 | #define Au1500_CFG_BASE 0xB4005000 // virtual, kseg0 addr | 1637 | #define Au1500_CFG_BASE 0xB4005000 /* virtual, KSEG1 addr */ |
1642 | #define Au1500_PCI_CMEM (Au1500_CFG_BASE + 0) | 1638 | #define Au1500_PCI_CMEM (Au1500_CFG_BASE + 0) |
1643 | #define Au1500_PCI_CFG (Au1500_CFG_BASE + 4) | 1639 | #define Au1500_PCI_CFG (Au1500_CFG_BASE + 4) |
1644 | # define PCI_ERROR ((1<<22) | (1<<23) | (1<<24) | (1<<25) | (1<<26) | (1<<27)) | 1640 | # define PCI_ERROR ((1 << 22) | (1 << 23) | (1 << 24) | \ |
1645 | #define Au1500_PCI_B2BMASK_CCH (Au1500_CFG_BASE + 8) | 1641 | (1 << 25) | (1 << 26) | (1 << 27)) |
1646 | #define Au1500_PCI_B2B0_VID (Au1500_CFG_BASE + 0xC) | 1642 | #define Au1500_PCI_B2BMASK_CCH (Au1500_CFG_BASE + 8) |
1647 | #define Au1500_PCI_B2B1_ID (Au1500_CFG_BASE + 0x10) | 1643 | #define Au1500_PCI_B2B0_VID (Au1500_CFG_BASE + 0xC) |
1648 | #define Au1500_PCI_MWMASK_DEV (Au1500_CFG_BASE + 0x14) | 1644 | #define Au1500_PCI_B2B1_ID (Au1500_CFG_BASE + 0x10) |
1645 | #define Au1500_PCI_MWMASK_DEV (Au1500_CFG_BASE + 0x14) | ||
1649 | #define Au1500_PCI_MWBASE_REV_CCL (Au1500_CFG_BASE + 0x18) | 1646 | #define Au1500_PCI_MWBASE_REV_CCL (Au1500_CFG_BASE + 0x18) |
1650 | #define Au1500_PCI_ERR_ADDR (Au1500_CFG_BASE + 0x1C) | 1647 | #define Au1500_PCI_ERR_ADDR (Au1500_CFG_BASE + 0x1C) |
1651 | #define Au1500_PCI_SPEC_INTACK (Au1500_CFG_BASE + 0x20) | 1648 | #define Au1500_PCI_SPEC_INTACK (Au1500_CFG_BASE + 0x20) |
1652 | #define Au1500_PCI_ID (Au1500_CFG_BASE + 0x100) | 1649 | #define Au1500_PCI_ID (Au1500_CFG_BASE + 0x100) |
1653 | #define Au1500_PCI_STATCMD (Au1500_CFG_BASE + 0x104) | 1650 | #define Au1500_PCI_STATCMD (Au1500_CFG_BASE + 0x104) |
1654 | #define Au1500_PCI_CLASSREV (Au1500_CFG_BASE + 0x108) | 1651 | #define Au1500_PCI_CLASSREV (Au1500_CFG_BASE + 0x108) |
1655 | #define Au1500_PCI_HDRTYPE (Au1500_CFG_BASE + 0x10C) | 1652 | #define Au1500_PCI_HDRTYPE (Au1500_CFG_BASE + 0x10C) |
1656 | #define Au1500_PCI_MBAR (Au1500_CFG_BASE + 0x110) | 1653 | #define Au1500_PCI_MBAR (Au1500_CFG_BASE + 0x110) |
1657 | 1654 | ||
1658 | #define Au1500_PCI_HDR 0xB4005100 // virtual, kseg0 addr | 1655 | #define Au1500_PCI_HDR 0xB4005100 /* virtual, KSEG1 addr */ |
1659 | 1656 | ||
1660 | /* All of our structures, like pci resource, have 32 bit members. | 1657 | /* |
1658 | * All of our structures, like PCI resource, have 32-bit members. | ||
1661 | * Drivers are expected to do an ioremap on the PCI MEM resource, but it's | 1659 | * Drivers are expected to do an ioremap on the PCI MEM resource, but it's |
1662 | * hard to store 0x4 0000 0000 in a 32 bit type. We require a small patch | 1660 | * hard to store 0x4 0000 0000 in a 32-bit type. We require a small patch |
1663 | * to __ioremap to check for addresses between (u32)Au1500_PCI_MEM_START and | 1661 | * to __ioremap to check for addresses between (u32)Au1500_PCI_MEM_START and |
1664 | * (u32)Au1500_PCI_MEM_END and change those to the full 36 bit PCI MEM | 1662 | * (u32)Au1500_PCI_MEM_END and change those to the full 36-bit PCI MEM |
1665 | * addresses. For PCI IO, it's simpler because we get to do the ioremap | 1663 | * addresses. For PCI I/O, it's simpler because we get to do the ioremap |
1666 | * ourselves and then adjust the device's resources. | 1664 | * ourselves and then adjust the device's resources. |
1667 | */ | 1665 | */ |
1668 | #define Au1500_EXT_CFG 0x600000000ULL | 1666 | #define Au1500_EXT_CFG 0x600000000ULL |
1669 | #define Au1500_EXT_CFG_TYPE1 0x680000000ULL | 1667 | #define Au1500_EXT_CFG_TYPE1 0x680000000ULL |
1670 | #define Au1500_PCI_IO_START 0x500000000ULL | 1668 | #define Au1500_PCI_IO_START 0x500000000ULL |
1671 | #define Au1500_PCI_IO_END 0x5000FFFFFULL | 1669 | #define Au1500_PCI_IO_END 0x5000FFFFFULL |
1672 | #define Au1500_PCI_MEM_START 0x440000000ULL | 1670 | #define Au1500_PCI_MEM_START 0x440000000ULL |
1673 | #define Au1500_PCI_MEM_END 0x44FFFFFFFULL | 1671 | #define Au1500_PCI_MEM_END 0x44FFFFFFFULL |
1674 | 1672 | ||
1675 | #define PCI_IO_START 0x00001000 | 1673 | #define PCI_IO_START 0x00001000 |
1676 | #define PCI_IO_END 0x000FFFFF | 1674 | #define PCI_IO_END 0x000FFFFF |
1677 | #define PCI_MEM_START 0x40000000 | 1675 | #define PCI_MEM_START 0x40000000 |
1678 | #define PCI_MEM_END 0x4FFFFFFF | 1676 | #define PCI_MEM_END 0x4FFFFFFF |
1679 | 1677 | ||
1680 | #define PCI_FIRST_DEVFN (0<<3) | 1678 | #define PCI_FIRST_DEVFN (0 << 3) |
1681 | #define PCI_LAST_DEVFN (19<<3) | 1679 | #define PCI_LAST_DEVFN (19 << 3) |
1682 | 1680 | ||
1683 | #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */ | 1681 | #define IOPORT_RESOURCE_START 0x00001000 /* skip legacy probing */ |
1684 | #define IOPORT_RESOURCE_END 0xffffffff | 1682 | #define IOPORT_RESOURCE_END 0xffffffff |
1685 | #define IOMEM_RESOURCE_START 0x10000000 | 1683 | #define IOMEM_RESOURCE_START 0x10000000 |
1686 | #define IOMEM_RESOURCE_END 0xffffffff | 1684 | #define IOMEM_RESOURCE_END 0xffffffff |
1687 | 1685 | ||
1688 | #else /* Au1000 and Au1100 and Au1200 */ | 1686 | #else /* Au1000 and Au1100 and Au1200 */ |
1689 | 1687 | ||
1690 | /* don't allow any legacy ports probing */ | 1688 | /* Don't allow any legacy ports probing */ |
1691 | #define IOPORT_RESOURCE_START 0x10000000 | 1689 | #define IOPORT_RESOURCE_START 0x10000000 |
1692 | #define IOPORT_RESOURCE_END 0xffffffff | 1690 | #define IOPORT_RESOURCE_END 0xffffffff |
1693 | #define IOMEM_RESOURCE_START 0x10000000 | 1691 | #define IOMEM_RESOURCE_START 0x10000000 |
1694 | #define IOMEM_RESOURCE_END 0xffffffff | 1692 | #define IOMEM_RESOURCE_END 0xffffffff |
1695 | 1693 | ||
1696 | #define PCI_IO_START 0 | 1694 | #define PCI_IO_START 0 |
1697 | #define PCI_IO_END 0 | 1695 | #define PCI_IO_END 0 |
1698 | #define PCI_MEM_START 0 | 1696 | #define PCI_MEM_START 0 |
1699 | #define PCI_MEM_END 0 | 1697 | #define PCI_MEM_END 0 |
1700 | #define PCI_FIRST_DEVFN 0 | 1698 | #define PCI_FIRST_DEVFN 0 |
1701 | #define PCI_LAST_DEVFN 0 | 1699 | #define PCI_LAST_DEVFN 0 |
1702 | 1700 | ||
1703 | #endif | 1701 | #endif |
1704 | 1702 | ||
1705 | #ifndef _LANGUAGE_ASSEMBLY | 1703 | #ifndef _LANGUAGE_ASSEMBLY |
1706 | typedef volatile struct | 1704 | typedef volatile struct { |
1707 | { | ||
1708 | /* 0x0000 */ u32 toytrim; | 1705 | /* 0x0000 */ u32 toytrim; |
1709 | /* 0x0004 */ u32 toywrite; | 1706 | /* 0x0004 */ u32 toywrite; |
1710 | /* 0x0008 */ u32 toymatch0; | 1707 | /* 0x0008 */ u32 toymatch0; |
@@ -1746,13 +1743,14 @@ typedef volatile struct | |||
1746 | /* 0x010C */ u32 outputclr; | 1743 | /* 0x010C */ u32 outputclr; |
1747 | /* 0x0110 */ u32 pinstaterd; | 1744 | /* 0x0110 */ u32 pinstaterd; |
1748 | #define pininputen pinstaterd | 1745 | #define pininputen pinstaterd |
1749 | |||
1750 | } AU1X00_SYS; | 1746 | } AU1X00_SYS; |
1751 | 1747 | ||
1752 | static AU1X00_SYS* const sys = (AU1X00_SYS *)SYS_BASE; | 1748 | static AU1X00_SYS * const sys = (AU1X00_SYS *)SYS_BASE; |
1753 | 1749 | ||
1754 | #endif | 1750 | #endif |
1755 | /* Processor information base on prid. | 1751 | |
1752 | /* | ||
1753 | * Processor information based on PRID. | ||
1756 | * Copied from PowerPC. | 1754 | * Copied from PowerPC. |
1757 | */ | 1755 | */ |
1758 | #ifndef _LANGUAGE_ASSEMBLY | 1756 | #ifndef _LANGUAGE_ASSEMBLY |
@@ -1767,9 +1765,8 @@ struct cpu_spec { | |||
1767 | unsigned char cpu_pll_wo; /* sys_cpupll reg. write-only */ | 1765 | unsigned char cpu_pll_wo; /* sys_cpupll reg. write-only */ |
1768 | }; | 1766 | }; |
1769 | 1767 | ||
1770 | extern struct cpu_spec cpu_specs[]; | 1768 | extern struct cpu_spec cpu_specs[]; |
1771 | extern struct cpu_spec *cur_cpu_spec[]; | 1769 | extern struct cpu_spec *cur_cpu_spec[]; |
1772 | #endif | 1770 | #endif |
1773 | 1771 | ||
1774 | #endif | 1772 | #endif |
1775 | |||
diff --git a/include/asm-mips/mach-au1x00/au1000_dma.h b/include/asm-mips/mach-au1x00/au1000_dma.h index 9f29520e8fb0..c333b4e1cd44 100644 --- a/include/asm-mips/mach-au1x00/au1000_dma.h +++ b/include/asm-mips/mach-au1x00/au1000_dma.h | |||
@@ -1,11 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * BRIEF MODULE DESCRIPTION | 2 | * BRIEF MODULE DESCRIPTION |
3 | * Defines for using and allocating dma channels on the Alchemy | 3 | * Defines for using and allocating DMA channels on the Alchemy |
4 | * Au1000 mips processor. | 4 | * Au1x00 MIPS processors. |
5 | * | 5 | * |
6 | * Copyright 2000 MontaVista Software Inc. | 6 | * Copyright 2000, 2008 MontaVista Software Inc. |
7 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. <source@mvista.com> |
8 | * stevel@mvista.com or source@mvista.com | ||
9 | * | 8 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
@@ -31,7 +30,7 @@ | |||
31 | #ifndef __ASM_AU1000_DMA_H | 30 | #ifndef __ASM_AU1000_DMA_H |
32 | #define __ASM_AU1000_DMA_H | 31 | #define __ASM_AU1000_DMA_H |
33 | 32 | ||
34 | #include <asm/io.h> /* need byte IO */ | 33 | #include <linux/io.h> /* need byte IO */ |
35 | #include <linux/spinlock.h> /* And spinlocks */ | 34 | #include <linux/spinlock.h> /* And spinlocks */ |
36 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
37 | #include <asm/system.h> | 36 | #include <asm/system.h> |
@@ -50,36 +49,36 @@ | |||
50 | #define DMA_DAH_MASK (0x0f << 20) | 49 | #define DMA_DAH_MASK (0x0f << 20) |
51 | #define DMA_DID_BIT 16 | 50 | #define DMA_DID_BIT 16 |
52 | #define DMA_DID_MASK (0x0f << DMA_DID_BIT) | 51 | #define DMA_DID_MASK (0x0f << DMA_DID_BIT) |
53 | #define DMA_DS (1<<15) | 52 | #define DMA_DS (1 << 15) |
54 | #define DMA_BE (1<<13) | 53 | #define DMA_BE (1 << 13) |
55 | #define DMA_DR (1<<12) | 54 | #define DMA_DR (1 << 12) |
56 | #define DMA_TS8 (1<<11) | 55 | #define DMA_TS8 (1 << 11) |
57 | #define DMA_DW_BIT 9 | 56 | #define DMA_DW_BIT 9 |
58 | #define DMA_DW_MASK (0x03 << DMA_DW_BIT) | 57 | #define DMA_DW_MASK (0x03 << DMA_DW_BIT) |
59 | #define DMA_DW8 (0 << DMA_DW_BIT) | 58 | #define DMA_DW8 (0 << DMA_DW_BIT) |
60 | #define DMA_DW16 (1 << DMA_DW_BIT) | 59 | #define DMA_DW16 (1 << DMA_DW_BIT) |
61 | #define DMA_DW32 (2 << DMA_DW_BIT) | 60 | #define DMA_DW32 (2 << DMA_DW_BIT) |
62 | #define DMA_NC (1<<8) | 61 | #define DMA_NC (1 << 8) |
63 | #define DMA_IE (1<<7) | 62 | #define DMA_IE (1 << 7) |
64 | #define DMA_HALT (1<<6) | 63 | #define DMA_HALT (1 << 6) |
65 | #define DMA_GO (1<<5) | 64 | #define DMA_GO (1 << 5) |
66 | #define DMA_AB (1<<4) | 65 | #define DMA_AB (1 << 4) |
67 | #define DMA_D1 (1<<3) | 66 | #define DMA_D1 (1 << 3) |
68 | #define DMA_BE1 (1<<2) | 67 | #define DMA_BE1 (1 << 2) |
69 | #define DMA_D0 (1<<1) | 68 | #define DMA_D0 (1 << 1) |
70 | #define DMA_BE0 (1<<0) | 69 | #define DMA_BE0 (1 << 0) |
71 | 70 | ||
72 | #define DMA_PERIPHERAL_ADDR 0x00000008 | 71 | #define DMA_PERIPHERAL_ADDR 0x00000008 |
73 | #define DMA_BUFFER0_START 0x0000000C | 72 | #define DMA_BUFFER0_START 0x0000000C |
74 | #define DMA_BUFFER1_START 0x00000014 | 73 | #define DMA_BUFFER1_START 0x00000014 |
75 | #define DMA_BUFFER0_COUNT 0x00000010 | 74 | #define DMA_BUFFER0_COUNT 0x00000010 |
76 | #define DMA_BUFFER1_COUNT 0x00000018 | 75 | #define DMA_BUFFER1_COUNT 0x00000018 |
77 | #define DMA_BAH_BIT 16 | 76 | #define DMA_BAH_BIT 16 |
78 | #define DMA_BAH_MASK (0x0f << DMA_BAH_BIT) | 77 | #define DMA_BAH_MASK (0x0f << DMA_BAH_BIT) |
79 | #define DMA_COUNT_BIT 0 | 78 | #define DMA_COUNT_BIT 0 |
80 | #define DMA_COUNT_MASK (0xffff << DMA_COUNT_BIT) | 79 | #define DMA_COUNT_MASK (0xffff << DMA_COUNT_BIT) |
81 | 80 | ||
82 | /* DMA Device ID's follow */ | 81 | /* DMA Device IDs follow */ |
83 | enum { | 82 | enum { |
84 | DMA_ID_UART0_TX = 0, | 83 | DMA_ID_UART0_TX = 0, |
85 | DMA_ID_UART0_RX, | 84 | DMA_ID_UART0_RX, |
@@ -110,7 +109,8 @@ enum { | |||
110 | }; | 109 | }; |
111 | 110 | ||
112 | struct dma_chan { | 111 | struct dma_chan { |
113 | int dev_id; // this channel is allocated if >=0, free otherwise | 112 | int dev_id; /* this channel is allocated if >= 0, */ |
113 | /* free otherwise */ | ||
114 | unsigned int io; | 114 | unsigned int io; |
115 | const char *dev_str; | 115 | const char *dev_str; |
116 | int irq; | 116 | int irq; |
@@ -132,23 +132,23 @@ extern int au1000_dma_read_proc(char *buf, char **start, off_t fpos, | |||
132 | extern void dump_au1000_dma_channel(unsigned int dmanr); | 132 | extern void dump_au1000_dma_channel(unsigned int dmanr); |
133 | extern spinlock_t au1000_dma_spin_lock; | 133 | extern spinlock_t au1000_dma_spin_lock; |
134 | 134 | ||
135 | 135 | static inline struct dma_chan *get_dma_chan(unsigned int dmanr) | |
136 | static __inline__ struct dma_chan *get_dma_chan(unsigned int dmanr) | ||
137 | { | 136 | { |
138 | if (dmanr >= NUM_AU1000_DMA_CHANNELS | 137 | if (dmanr >= NUM_AU1000_DMA_CHANNELS || |
139 | || au1000_dma_table[dmanr].dev_id < 0) | 138 | au1000_dma_table[dmanr].dev_id < 0) |
140 | return NULL; | 139 | return NULL; |
141 | return &au1000_dma_table[dmanr]; | 140 | return &au1000_dma_table[dmanr]; |
142 | } | 141 | } |
143 | 142 | ||
144 | static __inline__ unsigned long claim_dma_lock(void) | 143 | static inline unsigned long claim_dma_lock(void) |
145 | { | 144 | { |
146 | unsigned long flags; | 145 | unsigned long flags; |
146 | |||
147 | spin_lock_irqsave(&au1000_dma_spin_lock, flags); | 147 | spin_lock_irqsave(&au1000_dma_spin_lock, flags); |
148 | return flags; | 148 | return flags; |
149 | } | 149 | } |
150 | 150 | ||
151 | static __inline__ void release_dma_lock(unsigned long flags) | 151 | static inline void release_dma_lock(unsigned long flags) |
152 | { | 152 | { |
153 | spin_unlock_irqrestore(&au1000_dma_spin_lock, flags); | 153 | spin_unlock_irqrestore(&au1000_dma_spin_lock, flags); |
154 | } | 154 | } |
@@ -156,48 +156,53 @@ static __inline__ void release_dma_lock(unsigned long flags) | |||
156 | /* | 156 | /* |
157 | * Set the DMA buffer enable bits in the mode register. | 157 | * Set the DMA buffer enable bits in the mode register. |
158 | */ | 158 | */ |
159 | static __inline__ void enable_dma_buffer0(unsigned int dmanr) | 159 | static inline void enable_dma_buffer0(unsigned int dmanr) |
160 | { | 160 | { |
161 | struct dma_chan *chan = get_dma_chan(dmanr); | 161 | struct dma_chan *chan = get_dma_chan(dmanr); |
162 | |||
162 | if (!chan) | 163 | if (!chan) |
163 | return; | 164 | return; |
164 | au_writel(DMA_BE0, chan->io + DMA_MODE_SET); | 165 | au_writel(DMA_BE0, chan->io + DMA_MODE_SET); |
165 | } | 166 | } |
166 | static __inline__ void enable_dma_buffer1(unsigned int dmanr) | 167 | |
168 | static inline void enable_dma_buffer1(unsigned int dmanr) | ||
167 | { | 169 | { |
168 | struct dma_chan *chan = get_dma_chan(dmanr); | 170 | struct dma_chan *chan = get_dma_chan(dmanr); |
171 | |||
169 | if (!chan) | 172 | if (!chan) |
170 | return; | 173 | return; |
171 | au_writel(DMA_BE1, chan->io + DMA_MODE_SET); | 174 | au_writel(DMA_BE1, chan->io + DMA_MODE_SET); |
172 | } | 175 | } |
173 | static __inline__ void enable_dma_buffers(unsigned int dmanr) | 176 | static inline void enable_dma_buffers(unsigned int dmanr) |
174 | { | 177 | { |
175 | struct dma_chan *chan = get_dma_chan(dmanr); | 178 | struct dma_chan *chan = get_dma_chan(dmanr); |
179 | |||
176 | if (!chan) | 180 | if (!chan) |
177 | return; | 181 | return; |
178 | au_writel(DMA_BE0 | DMA_BE1, chan->io + DMA_MODE_SET); | 182 | au_writel(DMA_BE0 | DMA_BE1, chan->io + DMA_MODE_SET); |
179 | } | 183 | } |
180 | 184 | ||
181 | static __inline__ void start_dma(unsigned int dmanr) | 185 | static inline void start_dma(unsigned int dmanr) |
182 | { | 186 | { |
183 | struct dma_chan *chan = get_dma_chan(dmanr); | 187 | struct dma_chan *chan = get_dma_chan(dmanr); |
188 | |||
184 | if (!chan) | 189 | if (!chan) |
185 | return; | 190 | return; |
186 | |||
187 | au_writel(DMA_GO, chan->io + DMA_MODE_SET); | 191 | au_writel(DMA_GO, chan->io + DMA_MODE_SET); |
188 | } | 192 | } |
189 | 193 | ||
190 | #define DMA_HALT_POLL 0x5000 | 194 | #define DMA_HALT_POLL 0x5000 |
191 | 195 | ||
192 | static __inline__ void halt_dma(unsigned int dmanr) | 196 | static inline void halt_dma(unsigned int dmanr) |
193 | { | 197 | { |
194 | struct dma_chan *chan = get_dma_chan(dmanr); | 198 | struct dma_chan *chan = get_dma_chan(dmanr); |
195 | int i; | 199 | int i; |
200 | |||
196 | if (!chan) | 201 | if (!chan) |
197 | return; | 202 | return; |
198 | |||
199 | au_writel(DMA_GO, chan->io + DMA_MODE_CLEAR); | 203 | au_writel(DMA_GO, chan->io + DMA_MODE_CLEAR); |
200 | // poll the halt bit | 204 | |
205 | /* Poll the halt bit */ | ||
201 | for (i = 0; i < DMA_HALT_POLL; i++) | 206 | for (i = 0; i < DMA_HALT_POLL; i++) |
202 | if (au_readl(chan->io + DMA_MODE_READ) & DMA_HALT) | 207 | if (au_readl(chan->io + DMA_MODE_READ) & DMA_HALT) |
203 | break; | 208 | break; |
@@ -205,55 +210,57 @@ static __inline__ void halt_dma(unsigned int dmanr) | |||
205 | printk(KERN_INFO "halt_dma: HALT poll expired!\n"); | 210 | printk(KERN_INFO "halt_dma: HALT poll expired!\n"); |
206 | } | 211 | } |
207 | 212 | ||
208 | 213 | static inline void disable_dma(unsigned int dmanr) | |
209 | static __inline__ void disable_dma(unsigned int dmanr) | ||
210 | { | 214 | { |
211 | struct dma_chan *chan = get_dma_chan(dmanr); | 215 | struct dma_chan *chan = get_dma_chan(dmanr); |
216 | |||
212 | if (!chan) | 217 | if (!chan) |
213 | return; | 218 | return; |
214 | 219 | ||
215 | halt_dma(dmanr); | 220 | halt_dma(dmanr); |
216 | 221 | ||
217 | // now we can disable the buffers | 222 | /* Now we can disable the buffers */ |
218 | au_writel(~DMA_GO, chan->io + DMA_MODE_CLEAR); | 223 | au_writel(~DMA_GO, chan->io + DMA_MODE_CLEAR); |
219 | } | 224 | } |
220 | 225 | ||
221 | static __inline__ int dma_halted(unsigned int dmanr) | 226 | static inline int dma_halted(unsigned int dmanr) |
222 | { | 227 | { |
223 | struct dma_chan *chan = get_dma_chan(dmanr); | 228 | struct dma_chan *chan = get_dma_chan(dmanr); |
229 | |||
224 | if (!chan) | 230 | if (!chan) |
225 | return 1; | 231 | return 1; |
226 | return (au_readl(chan->io + DMA_MODE_READ) & DMA_HALT) ? 1 : 0; | 232 | return (au_readl(chan->io + DMA_MODE_READ) & DMA_HALT) ? 1 : 0; |
227 | } | 233 | } |
228 | 234 | ||
229 | /* initialize a DMA channel */ | 235 | /* Initialize a DMA channel. */ |
230 | static __inline__ void init_dma(unsigned int dmanr) | 236 | static inline void init_dma(unsigned int dmanr) |
231 | { | 237 | { |
232 | struct dma_chan *chan = get_dma_chan(dmanr); | 238 | struct dma_chan *chan = get_dma_chan(dmanr); |
233 | u32 mode; | 239 | u32 mode; |
240 | |||
234 | if (!chan) | 241 | if (!chan) |
235 | return; | 242 | return; |
236 | 243 | ||
237 | disable_dma(dmanr); | 244 | disable_dma(dmanr); |
238 | 245 | ||
239 | // set device FIFO address | 246 | /* Set device FIFO address */ |
240 | au_writel(CPHYSADDR(chan->fifo_addr), | 247 | au_writel(CPHYSADDR(chan->fifo_addr), chan->io + DMA_PERIPHERAL_ADDR); |
241 | chan->io + DMA_PERIPHERAL_ADDR); | ||
242 | 248 | ||
243 | mode = chan->mode | (chan->dev_id << DMA_DID_BIT); | 249 | mode = chan->mode | (chan->dev_id << DMA_DID_BIT); |
244 | if (chan->irq) | 250 | if (chan->irq) |
245 | mode |= DMA_IE; | 251 | mode |= DMA_IE; |
246 | 252 | ||
247 | au_writel(~mode, chan->io + DMA_MODE_CLEAR); | 253 | au_writel(~mode, chan->io + DMA_MODE_CLEAR); |
248 | au_writel(mode, chan->io + DMA_MODE_SET); | 254 | au_writel(mode, chan->io + DMA_MODE_SET); |
249 | } | 255 | } |
250 | 256 | ||
251 | /* | 257 | /* |
252 | * set mode for a specific DMA channel | 258 | * Set mode for a specific DMA channel |
253 | */ | 259 | */ |
254 | static __inline__ void set_dma_mode(unsigned int dmanr, unsigned int mode) | 260 | static inline void set_dma_mode(unsigned int dmanr, unsigned int mode) |
255 | { | 261 | { |
256 | struct dma_chan *chan = get_dma_chan(dmanr); | 262 | struct dma_chan *chan = get_dma_chan(dmanr); |
263 | |||
257 | if (!chan) | 264 | if (!chan) |
258 | return; | 265 | return; |
259 | /* | 266 | /* |
@@ -266,36 +273,37 @@ static __inline__ void set_dma_mode(unsigned int dmanr, unsigned int mode) | |||
266 | chan->mode |= mode; | 273 | chan->mode |= mode; |
267 | } | 274 | } |
268 | 275 | ||
269 | static __inline__ unsigned int get_dma_mode(unsigned int dmanr) | 276 | static inline unsigned int get_dma_mode(unsigned int dmanr) |
270 | { | 277 | { |
271 | struct dma_chan *chan = get_dma_chan(dmanr); | 278 | struct dma_chan *chan = get_dma_chan(dmanr); |
279 | |||
272 | if (!chan) | 280 | if (!chan) |
273 | return 0; | 281 | return 0; |
274 | return chan->mode; | 282 | return chan->mode; |
275 | } | 283 | } |
276 | 284 | ||
277 | static __inline__ int get_dma_active_buffer(unsigned int dmanr) | 285 | static inline int get_dma_active_buffer(unsigned int dmanr) |
278 | { | 286 | { |
279 | struct dma_chan *chan = get_dma_chan(dmanr); | 287 | struct dma_chan *chan = get_dma_chan(dmanr); |
288 | |||
280 | if (!chan) | 289 | if (!chan) |
281 | return -1; | 290 | return -1; |
282 | return (au_readl(chan->io + DMA_MODE_READ) & DMA_AB) ? 1 : 0; | 291 | return (au_readl(chan->io + DMA_MODE_READ) & DMA_AB) ? 1 : 0; |
283 | } | 292 | } |
284 | 293 | ||
285 | |||
286 | /* | 294 | /* |
287 | * set the device FIFO address for a specific DMA channel - only | 295 | * Set the device FIFO address for a specific DMA channel - only |
288 | * applicable to GPO4 and GPO5. All the other devices have fixed | 296 | * applicable to GPO4 and GPO5. All the other devices have fixed |
289 | * FIFO addresses. | 297 | * FIFO addresses. |
290 | */ | 298 | */ |
291 | static __inline__ void set_dma_fifo_addr(unsigned int dmanr, | 299 | static inline void set_dma_fifo_addr(unsigned int dmanr, unsigned int a) |
292 | unsigned int a) | ||
293 | { | 300 | { |
294 | struct dma_chan *chan = get_dma_chan(dmanr); | 301 | struct dma_chan *chan = get_dma_chan(dmanr); |
302 | |||
295 | if (!chan) | 303 | if (!chan) |
296 | return; | 304 | return; |
297 | 305 | ||
298 | if (chan->mode & DMA_DS) /* second bank of device ids */ | 306 | if (chan->mode & DMA_DS) /* second bank of device IDs */ |
299 | return; | 307 | return; |
300 | 308 | ||
301 | if (chan->dev_id != DMA_ID_GP04 && chan->dev_id != DMA_ID_GP05) | 309 | if (chan->dev_id != DMA_ID_GP04 && chan->dev_id != DMA_ID_GP05) |
@@ -307,16 +315,19 @@ static __inline__ void set_dma_fifo_addr(unsigned int dmanr, | |||
307 | /* | 315 | /* |
308 | * Clear the DMA buffer done bits in the mode register. | 316 | * Clear the DMA buffer done bits in the mode register. |
309 | */ | 317 | */ |
310 | static __inline__ void clear_dma_done0(unsigned int dmanr) | 318 | static inline void clear_dma_done0(unsigned int dmanr) |
311 | { | 319 | { |
312 | struct dma_chan *chan = get_dma_chan(dmanr); | 320 | struct dma_chan *chan = get_dma_chan(dmanr); |
321 | |||
313 | if (!chan) | 322 | if (!chan) |
314 | return; | 323 | return; |
315 | au_writel(DMA_D0, chan->io + DMA_MODE_CLEAR); | 324 | au_writel(DMA_D0, chan->io + DMA_MODE_CLEAR); |
316 | } | 325 | } |
317 | static __inline__ void clear_dma_done1(unsigned int dmanr) | 326 | |
327 | static inline void clear_dma_done1(unsigned int dmanr) | ||
318 | { | 328 | { |
319 | struct dma_chan *chan = get_dma_chan(dmanr); | 329 | struct dma_chan *chan = get_dma_chan(dmanr); |
330 | |||
320 | if (!chan) | 331 | if (!chan) |
321 | return; | 332 | return; |
322 | au_writel(DMA_D1, chan->io + DMA_MODE_CLEAR); | 333 | au_writel(DMA_D1, chan->io + DMA_MODE_CLEAR); |
@@ -325,16 +336,17 @@ static __inline__ void clear_dma_done1(unsigned int dmanr) | |||
325 | /* | 336 | /* |
326 | * This does nothing - not applicable to Au1000 DMA. | 337 | * This does nothing - not applicable to Au1000 DMA. |
327 | */ | 338 | */ |
328 | static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) | 339 | static inline void set_dma_page(unsigned int dmanr, char pagenr) |
329 | { | 340 | { |
330 | } | 341 | } |
331 | 342 | ||
332 | /* | 343 | /* |
333 | * Set Buffer 0 transfer address for specific DMA channel. | 344 | * Set Buffer 0 transfer address for specific DMA channel. |
334 | */ | 345 | */ |
335 | static __inline__ void set_dma_addr0(unsigned int dmanr, unsigned int a) | 346 | static inline void set_dma_addr0(unsigned int dmanr, unsigned int a) |
336 | { | 347 | { |
337 | struct dma_chan *chan = get_dma_chan(dmanr); | 348 | struct dma_chan *chan = get_dma_chan(dmanr); |
349 | |||
338 | if (!chan) | 350 | if (!chan) |
339 | return; | 351 | return; |
340 | au_writel(a, chan->io + DMA_BUFFER0_START); | 352 | au_writel(a, chan->io + DMA_BUFFER0_START); |
@@ -343,9 +355,10 @@ static __inline__ void set_dma_addr0(unsigned int dmanr, unsigned int a) | |||
343 | /* | 355 | /* |
344 | * Set Buffer 1 transfer address for specific DMA channel. | 356 | * Set Buffer 1 transfer address for specific DMA channel. |
345 | */ | 357 | */ |
346 | static __inline__ void set_dma_addr1(unsigned int dmanr, unsigned int a) | 358 | static inline void set_dma_addr1(unsigned int dmanr, unsigned int a) |
347 | { | 359 | { |
348 | struct dma_chan *chan = get_dma_chan(dmanr); | 360 | struct dma_chan *chan = get_dma_chan(dmanr); |
361 | |||
349 | if (!chan) | 362 | if (!chan) |
350 | return; | 363 | return; |
351 | au_writel(a, chan->io + DMA_BUFFER1_START); | 364 | au_writel(a, chan->io + DMA_BUFFER1_START); |
@@ -355,10 +368,10 @@ static __inline__ void set_dma_addr1(unsigned int dmanr, unsigned int a) | |||
355 | /* | 368 | /* |
356 | * Set Buffer 0 transfer size (max 64k) for a specific DMA channel. | 369 | * Set Buffer 0 transfer size (max 64k) for a specific DMA channel. |
357 | */ | 370 | */ |
358 | static __inline__ void set_dma_count0(unsigned int dmanr, | 371 | static inline void set_dma_count0(unsigned int dmanr, unsigned int count) |
359 | unsigned int count) | ||
360 | { | 372 | { |
361 | struct dma_chan *chan = get_dma_chan(dmanr); | 373 | struct dma_chan *chan = get_dma_chan(dmanr); |
374 | |||
362 | if (!chan) | 375 | if (!chan) |
363 | return; | 376 | return; |
364 | count &= DMA_COUNT_MASK; | 377 | count &= DMA_COUNT_MASK; |
@@ -368,10 +381,10 @@ static __inline__ void set_dma_count0(unsigned int dmanr, | |||
368 | /* | 381 | /* |
369 | * Set Buffer 1 transfer size (max 64k) for a specific DMA channel. | 382 | * Set Buffer 1 transfer size (max 64k) for a specific DMA channel. |
370 | */ | 383 | */ |
371 | static __inline__ void set_dma_count1(unsigned int dmanr, | 384 | static inline void set_dma_count1(unsigned int dmanr, unsigned int count) |
372 | unsigned int count) | ||
373 | { | 385 | { |
374 | struct dma_chan *chan = get_dma_chan(dmanr); | 386 | struct dma_chan *chan = get_dma_chan(dmanr); |
387 | |||
375 | if (!chan) | 388 | if (!chan) |
376 | return; | 389 | return; |
377 | count &= DMA_COUNT_MASK; | 390 | count &= DMA_COUNT_MASK; |
@@ -381,10 +394,10 @@ static __inline__ void set_dma_count1(unsigned int dmanr, | |||
381 | /* | 394 | /* |
382 | * Set both buffer transfer sizes (max 64k) for a specific DMA channel. | 395 | * Set both buffer transfer sizes (max 64k) for a specific DMA channel. |
383 | */ | 396 | */ |
384 | static __inline__ void set_dma_count(unsigned int dmanr, | 397 | static inline void set_dma_count(unsigned int dmanr, unsigned int count) |
385 | unsigned int count) | ||
386 | { | 398 | { |
387 | struct dma_chan *chan = get_dma_chan(dmanr); | 399 | struct dma_chan *chan = get_dma_chan(dmanr); |
400 | |||
388 | if (!chan) | 401 | if (!chan) |
389 | return; | 402 | return; |
390 | count &= DMA_COUNT_MASK; | 403 | count &= DMA_COUNT_MASK; |
@@ -396,35 +409,36 @@ static __inline__ void set_dma_count(unsigned int dmanr, | |||
396 | * Returns which buffer has its done bit set in the mode register. | 409 | * Returns which buffer has its done bit set in the mode register. |
397 | * Returns -1 if neither or both done bits set. | 410 | * Returns -1 if neither or both done bits set. |
398 | */ | 411 | */ |
399 | static __inline__ unsigned int get_dma_buffer_done(unsigned int dmanr) | 412 | static inline unsigned int get_dma_buffer_done(unsigned int dmanr) |
400 | { | 413 | { |
401 | struct dma_chan *chan = get_dma_chan(dmanr); | 414 | struct dma_chan *chan = get_dma_chan(dmanr); |
415 | |||
402 | if (!chan) | 416 | if (!chan) |
403 | return 0; | 417 | return 0; |
404 | 418 | return au_readl(chan->io + DMA_MODE_READ) & (DMA_D0 | DMA_D1); | |
405 | return au_readl(chan->io + DMA_MODE_READ) & (DMA_D0 | DMA_D1); | ||
406 | } | 419 | } |
407 | 420 | ||
408 | 421 | ||
409 | /* | 422 | /* |
410 | * Returns the DMA channel's Buffer Done IRQ number. | 423 | * Returns the DMA channel's Buffer Done IRQ number. |
411 | */ | 424 | */ |
412 | static __inline__ int get_dma_done_irq(unsigned int dmanr) | 425 | static inline int get_dma_done_irq(unsigned int dmanr) |
413 | { | 426 | { |
414 | struct dma_chan *chan = get_dma_chan(dmanr); | 427 | struct dma_chan *chan = get_dma_chan(dmanr); |
428 | |||
415 | if (!chan) | 429 | if (!chan) |
416 | return -1; | 430 | return -1; |
417 | |||
418 | return chan->irq; | 431 | return chan->irq; |
419 | } | 432 | } |
420 | 433 | ||
421 | /* | 434 | /* |
422 | * Get DMA residue count. Returns the number of _bytes_ left to transfer. | 435 | * Get DMA residue count. Returns the number of _bytes_ left to transfer. |
423 | */ | 436 | */ |
424 | static __inline__ int get_dma_residue(unsigned int dmanr) | 437 | static inline int get_dma_residue(unsigned int dmanr) |
425 | { | 438 | { |
426 | int curBufCntReg, count; | 439 | int curBufCntReg, count; |
427 | struct dma_chan *chan = get_dma_chan(dmanr); | 440 | struct dma_chan *chan = get_dma_chan(dmanr); |
441 | |||
428 | if (!chan) | 442 | if (!chan) |
429 | return 0; | 443 | return 0; |
430 | 444 | ||
@@ -442,4 +456,3 @@ static __inline__ int get_dma_residue(unsigned int dmanr) | |||
442 | } | 456 | } |
443 | 457 | ||
444 | #endif /* __ASM_AU1000_DMA_H */ | 458 | #endif /* __ASM_AU1000_DMA_H */ |
445 | |||
diff --git a/include/asm-mips/mach-au1x00/au1000_gpio.h b/include/asm-mips/mach-au1x00/au1000_gpio.h index 298f92012e8e..d8c96fda5549 100644 --- a/include/asm-mips/mach-au1x00/au1000_gpio.h +++ b/include/asm-mips/mach-au1x00/au1000_gpio.h | |||
@@ -2,12 +2,12 @@ | |||
2 | * FILE NAME au1000_gpio.h | 2 | * FILE NAME au1000_gpio.h |
3 | * | 3 | * |
4 | * BRIEF MODULE DESCRIPTION | 4 | * BRIEF MODULE DESCRIPTION |
5 | * API to Alchemy Au1000 GPIO device. | 5 | * API to Alchemy Au1xx0 GPIO device. |
6 | * | 6 | * |
7 | * Author: MontaVista Software, Inc. <source@mvista.com> | 7 | * Author: MontaVista Software, Inc. <source@mvista.com> |
8 | * Steve Longerbeam <stevel@mvista.com> | 8 | * Steve Longerbeam |
9 | * | 9 | * |
10 | * Copyright 2001 MontaVista Software Inc. | 10 | * Copyright 2001, 2008 MontaVista Software Inc. |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
@@ -37,12 +37,12 @@ | |||
37 | 37 | ||
38 | #define AU1000GPIO_IOC_MAGIC 'A' | 38 | #define AU1000GPIO_IOC_MAGIC 'A' |
39 | 39 | ||
40 | #define AU1000GPIO_IN _IOR (AU1000GPIO_IOC_MAGIC, 0, int) | 40 | #define AU1000GPIO_IN _IOR(AU1000GPIO_IOC_MAGIC, 0, int) |
41 | #define AU1000GPIO_SET _IOW (AU1000GPIO_IOC_MAGIC, 1, int) | 41 | #define AU1000GPIO_SET _IOW(AU1000GPIO_IOC_MAGIC, 1, int) |
42 | #define AU1000GPIO_CLEAR _IOW (AU1000GPIO_IOC_MAGIC, 2, int) | 42 | #define AU1000GPIO_CLEAR _IOW(AU1000GPIO_IOC_MAGIC, 2, int) |
43 | #define AU1000GPIO_OUT _IOW (AU1000GPIO_IOC_MAGIC, 3, int) | 43 | #define AU1000GPIO_OUT _IOW(AU1000GPIO_IOC_MAGIC, 3, int) |
44 | #define AU1000GPIO_TRISTATE _IOW (AU1000GPIO_IOC_MAGIC, 4, int) | 44 | #define AU1000GPIO_TRISTATE _IOW(AU1000GPIO_IOC_MAGIC, 4, int) |
45 | #define AU1000GPIO_AVAIL_MASK _IOR (AU1000GPIO_IOC_MAGIC, 5, int) | 45 | #define AU1000GPIO_AVAIL_MASK _IOR(AU1000GPIO_IOC_MAGIC, 5, int) |
46 | 46 | ||
47 | #ifdef __KERNEL__ | 47 | #ifdef __KERNEL__ |
48 | extern u32 get_au1000_avail_gpio_mask(void); | 48 | extern u32 get_au1000_avail_gpio_mask(void); |
diff --git a/include/asm-mips/mach-au1x00/au1550_spi.h b/include/asm-mips/mach-au1x00/au1550_spi.h index c2f0466523ec..40e6c489833a 100644 --- a/include/asm-mips/mach-au1x00/au1550_spi.h +++ b/include/asm-mips/mach-au1x00/au1550_spi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * au1550_spi.h - au1550 psc spi controller driver - platform data struct | 2 | * au1550_spi.h - Au1550 PSC SPI controller driver - platform data structure |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef _AU1550_SPI_H_ | 5 | #ifndef _AU1550_SPI_H_ |
diff --git a/include/asm-mips/mach-au1x00/au1xxx.h b/include/asm-mips/mach-au1x00/au1xxx.h index 947135941033..1b3655090ed3 100644 --- a/include/asm-mips/mach-au1x00/au1xxx.h +++ b/include/asm-mips/mach-au1x00/au1xxx.h | |||
@@ -23,10 +23,10 @@ | |||
23 | #ifndef _AU1XXX_H_ | 23 | #ifndef _AU1XXX_H_ |
24 | #define _AU1XXX_H_ | 24 | #define _AU1XXX_H_ |
25 | 25 | ||
26 | |||
27 | #include <asm/mach-au1x00/au1000.h> | 26 | #include <asm/mach-au1x00/au1000.h> |
28 | 27 | ||
29 | #if defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) | 28 | #if defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || \ |
29 | defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) | ||
30 | #include <asm/mach-db1x00/db1x00.h> | 30 | #include <asm/mach-db1x00/db1x00.h> |
31 | 31 | ||
32 | #elif defined(CONFIG_MIPS_PB1550) | 32 | #elif defined(CONFIG_MIPS_PB1550) |
diff --git a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h index 93d507cea518..44a67bf05dc1 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h +++ b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h | |||
@@ -28,17 +28,18 @@ | |||
28 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 28 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | /* Specifics for the Au1xxx Descriptor-Based DMA Controllers, first | 31 | /* |
32 | * seen in the AU1550 part. | 32 | * Specifics for the Au1xxx Descriptor-Based DMA Controller, |
33 | * first seen in the AU1550 part. | ||
33 | */ | 34 | */ |
34 | #ifndef _AU1000_DBDMA_H_ | 35 | #ifndef _AU1000_DBDMA_H_ |
35 | #define _AU1000_DBDMA_H_ | 36 | #define _AU1000_DBDMA_H_ |
36 | 37 | ||
37 | |||
38 | #ifndef _LANGUAGE_ASSEMBLY | 38 | #ifndef _LANGUAGE_ASSEMBLY |
39 | 39 | ||
40 | /* The DMA base addresses. | 40 | /* |
41 | * The Channels are every 256 bytes (0x0100) from the channel 0 base. | 41 | * The DMA base addresses. |
42 | * The channels are every 256 bytes (0x0100) from the channel 0 base. | ||
42 | * Interrupt status/enable is bits 15:0 for channels 15 to zero. | 43 | * Interrupt status/enable is bits 15:0 for channels 15 to zero. |
43 | */ | 44 | */ |
44 | #define DDMA_GLOBAL_BASE 0xb4003000 | 45 | #define DDMA_GLOBAL_BASE 0xb4003000 |
@@ -51,16 +52,14 @@ typedef volatile struct dbdma_global { | |||
51 | u32 ddma_inten; | 52 | u32 ddma_inten; |
52 | } dbdma_global_t; | 53 | } dbdma_global_t; |
53 | 54 | ||
54 | /* General Configuration. | 55 | /* General Configuration. */ |
55 | */ | ||
56 | #define DDMA_CONFIG_AF (1 << 2) | 56 | #define DDMA_CONFIG_AF (1 << 2) |
57 | #define DDMA_CONFIG_AH (1 << 1) | 57 | #define DDMA_CONFIG_AH (1 << 1) |
58 | #define DDMA_CONFIG_AL (1 << 0) | 58 | #define DDMA_CONFIG_AL (1 << 0) |
59 | 59 | ||
60 | #define DDMA_THROTTLE_EN (1 << 31) | 60 | #define DDMA_THROTTLE_EN (1 << 31) |
61 | 61 | ||
62 | /* The structure of a DMA Channel. | 62 | /* The structure of a DMA Channel. */ |
63 | */ | ||
64 | typedef volatile struct au1xxx_dma_channel { | 63 | typedef volatile struct au1xxx_dma_channel { |
65 | u32 ddma_cfg; /* See below */ | 64 | u32 ddma_cfg; /* See below */ |
66 | u32 ddma_desptr; /* 32-byte aligned pointer to descriptor */ | 65 | u32 ddma_desptr; /* 32-byte aligned pointer to descriptor */ |
@@ -69,8 +68,7 @@ typedef volatile struct au1xxx_dma_channel { | |||
69 | u32 ddma_irq; /* If bit 0 set, interrupt pending */ | 68 | u32 ddma_irq; /* If bit 0 set, interrupt pending */ |
70 | u32 ddma_stat; /* See below */ | 69 | u32 ddma_stat; /* See below */ |
71 | u32 ddma_bytecnt; /* Byte count, valid only when chan idle */ | 70 | u32 ddma_bytecnt; /* Byte count, valid only when chan idle */ |
72 | /* Remainder, up to the 256 byte boundary, is reserved. | 71 | /* Remainder, up to the 256 byte boundary, is reserved. */ |
73 | */ | ||
74 | } au1x_dma_chan_t; | 72 | } au1x_dma_chan_t; |
75 | 73 | ||
76 | #define DDMA_CFG_SED (1 << 9) /* source DMA level/edge detect */ | 74 | #define DDMA_CFG_SED (1 << 9) /* source DMA level/edge detect */ |
@@ -84,7 +82,8 @@ typedef volatile struct au1xxx_dma_channel { | |||
84 | #define DDMA_CFG_DBE (1 << 1) /* Destination big endian */ | 82 | #define DDMA_CFG_DBE (1 << 1) /* Destination big endian */ |
85 | #define DDMA_CFG_EN (1 << 0) /* Channel enable */ | 83 | #define DDMA_CFG_EN (1 << 0) /* Channel enable */ |
86 | 84 | ||
87 | /* Always set when descriptor processing done, regardless of | 85 | /* |
86 | * Always set when descriptor processing done, regardless of | ||
88 | * interrupt enable state. Reflected in global intstat, don't | 87 | * interrupt enable state. Reflected in global intstat, don't |
89 | * clear this until global intstat is read/used. | 88 | * clear this until global intstat is read/used. |
90 | */ | 89 | */ |
@@ -94,7 +93,8 @@ typedef volatile struct au1xxx_dma_channel { | |||
94 | #define DDMA_STAT_V (1 << 1) /* Descriptor valid */ | 93 | #define DDMA_STAT_V (1 << 1) /* Descriptor valid */ |
95 | #define DDMA_STAT_H (1 << 0) /* Channel Halted */ | 94 | #define DDMA_STAT_H (1 << 0) /* Channel Halted */ |
96 | 95 | ||
97 | /* "Standard" DDMA Descriptor. | 96 | /* |
97 | * "Standard" DDMA Descriptor. | ||
98 | * Must be 32-byte aligned. | 98 | * Must be 32-byte aligned. |
99 | */ | 99 | */ |
100 | typedef volatile struct au1xxx_ddma_desc { | 100 | typedef volatile struct au1xxx_ddma_desc { |
@@ -106,8 +106,9 @@ typedef volatile struct au1xxx_ddma_desc { | |||
106 | u32 dscr_dest1; /* See below */ | 106 | u32 dscr_dest1; /* See below */ |
107 | u32 dscr_stat; /* completion status */ | 107 | u32 dscr_stat; /* completion status */ |
108 | u32 dscr_nxtptr; /* Next descriptor pointer (mostly) */ | 108 | u32 dscr_nxtptr; /* Next descriptor pointer (mostly) */ |
109 | /* First 32bytes are HW specific!!! | 109 | /* |
110 | Lets have some SW data following.. make sure its 32bytes | 110 | * First 32 bytes are HW specific!!! |
111 | * Lets have some SW data following -- make sure it's 32 bytes. | ||
111 | */ | 112 | */ |
112 | u32 sw_status; | 113 | u32 sw_status; |
113 | u32 sw_context; | 114 | u32 sw_context; |
@@ -130,10 +131,9 @@ typedef volatile struct au1xxx_ddma_desc { | |||
130 | #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */ | 131 | #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */ |
131 | #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */ | 132 | #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */ |
132 | 133 | ||
133 | #define SW_STATUS_INUSE (1<<0) | 134 | #define SW_STATUS_INUSE (1 << 0) |
134 | 135 | ||
135 | /* Command 0 device IDs. | 136 | /* Command 0 device IDs. */ |
136 | */ | ||
137 | #ifdef CONFIG_SOC_AU1550 | 137 | #ifdef CONFIG_SOC_AU1550 |
138 | #define DSCR_CMD0_UART0_TX 0 | 138 | #define DSCR_CMD0_UART0_TX 0 |
139 | #define DSCR_CMD0_UART0_RX 1 | 139 | #define DSCR_CMD0_UART0_RX 1 |
@@ -198,16 +198,15 @@ typedef volatile struct au1xxx_ddma_desc { | |||
198 | #define DSCR_CMD0_THROTTLE 30 | 198 | #define DSCR_CMD0_THROTTLE 30 |
199 | #define DSCR_CMD0_ALWAYS 31 | 199 | #define DSCR_CMD0_ALWAYS 31 |
200 | #define DSCR_NDEV_IDS 32 | 200 | #define DSCR_NDEV_IDS 32 |
201 | /* THis macro is used to find/create custom device types */ | 201 | /* This macro is used to find/create custom device types */ |
202 | #define DSCR_DEV2CUSTOM_ID(x, d) (((((x)&0xFFFF)<<8)|0x32000000)|((d)&0xFF)) | 202 | #define DSCR_DEV2CUSTOM_ID(x, d) (((((x) & 0xFFFF) << 8) | 0x32000000) | \ |
203 | #define DSCR_CUSTOM2DEV_ID(x) ((x)&0xFF) | 203 | ((d) & 0xFF)) |
204 | 204 | #define DSCR_CUSTOM2DEV_ID(x) ((x) & 0xFF) | |
205 | 205 | ||
206 | #define DSCR_CMD0_SID(x) (((x) & 0x1f) << 25) | 206 | #define DSCR_CMD0_SID(x) (((x) & 0x1f) << 25) |
207 | #define DSCR_CMD0_DID(x) (((x) & 0x1f) << 20) | 207 | #define DSCR_CMD0_DID(x) (((x) & 0x1f) << 20) |
208 | 208 | ||
209 | /* Source/Destination transfer width. | 209 | /* Source/Destination transfer width. */ |
210 | */ | ||
211 | #define DSCR_CMD0_BYTE 0 | 210 | #define DSCR_CMD0_BYTE 0 |
212 | #define DSCR_CMD0_HALFWORD 1 | 211 | #define DSCR_CMD0_HALFWORD 1 |
213 | #define DSCR_CMD0_WORD 2 | 212 | #define DSCR_CMD0_WORD 2 |
@@ -215,16 +214,14 @@ typedef volatile struct au1xxx_ddma_desc { | |||
215 | #define DSCR_CMD0_SW(x) (((x) & 0x3) << 18) | 214 | #define DSCR_CMD0_SW(x) (((x) & 0x3) << 18) |
216 | #define DSCR_CMD0_DW(x) (((x) & 0x3) << 16) | 215 | #define DSCR_CMD0_DW(x) (((x) & 0x3) << 16) |
217 | 216 | ||
218 | /* DDMA Descriptor Type. | 217 | /* DDMA Descriptor Type. */ |
219 | */ | ||
220 | #define DSCR_CMD0_STANDARD 0 | 218 | #define DSCR_CMD0_STANDARD 0 |
221 | #define DSCR_CMD0_LITERAL 1 | 219 | #define DSCR_CMD0_LITERAL 1 |
222 | #define DSCR_CMD0_CMP_BRANCH 2 | 220 | #define DSCR_CMD0_CMP_BRANCH 2 |
223 | 221 | ||
224 | #define DSCR_CMD0_DT(x) (((x) & 0x3) << 13) | 222 | #define DSCR_CMD0_DT(x) (((x) & 0x3) << 13) |
225 | 223 | ||
226 | /* Status Instruction. | 224 | /* Status Instruction. */ |
227 | */ | ||
228 | #define DSCR_CMD0_ST_NOCHANGE 0 /* Don't change */ | 225 | #define DSCR_CMD0_ST_NOCHANGE 0 /* Don't change */ |
229 | #define DSCR_CMD0_ST_CURRENT 1 /* Write current status */ | 226 | #define DSCR_CMD0_ST_CURRENT 1 /* Write current status */ |
230 | #define DSCR_CMD0_ST_CMD0 2 /* Write cmd0 with V cleared */ | 227 | #define DSCR_CMD0_ST_CMD0 2 /* Write cmd0 with V cleared */ |
@@ -232,23 +229,20 @@ typedef volatile struct au1xxx_ddma_desc { | |||
232 | 229 | ||
233 | #define DSCR_CMD0_ST(x) (((x) & 0x3) << 0) | 230 | #define DSCR_CMD0_ST(x) (((x) & 0x3) << 0) |
234 | 231 | ||
235 | /* Descriptor Command 1 | 232 | /* Descriptor Command 1. */ |
236 | */ | ||
237 | #define DSCR_CMD1_SUPTR_MASK (0xf << 28) /* upper 4 bits of src addr */ | 233 | #define DSCR_CMD1_SUPTR_MASK (0xf << 28) /* upper 4 bits of src addr */ |
238 | #define DSCR_CMD1_DUPTR_MASK (0xf << 24) /* upper 4 bits of dest addr */ | 234 | #define DSCR_CMD1_DUPTR_MASK (0xf << 24) /* upper 4 bits of dest addr */ |
239 | #define DSCR_CMD1_FL_MASK (0x3 << 22) /* Flag bits */ | 235 | #define DSCR_CMD1_FL_MASK (0x3 << 22) /* Flag bits */ |
240 | #define DSCR_CMD1_BC_MASK (0x3fffff) /* Byte count */ | 236 | #define DSCR_CMD1_BC_MASK (0x3fffff) /* Byte count */ |
241 | 237 | ||
242 | /* Flag description. | 238 | /* Flag description. */ |
243 | */ | ||
244 | #define DSCR_CMD1_FL_MEM_STRIDE0 0 | 239 | #define DSCR_CMD1_FL_MEM_STRIDE0 0 |
245 | #define DSCR_CMD1_FL_MEM_STRIDE1 1 | 240 | #define DSCR_CMD1_FL_MEM_STRIDE1 1 |
246 | #define DSCR_CMD1_FL_MEM_STRIDE2 2 | 241 | #define DSCR_CMD1_FL_MEM_STRIDE2 2 |
247 | 242 | ||
248 | #define DSCR_CMD1_FL(x) (((x) & 0x3) << 22) | 243 | #define DSCR_CMD1_FL(x) (((x) & 0x3) << 22) |
249 | 244 | ||
250 | /* Source1, 1-dimensional stride. | 245 | /* Source1, 1-dimensional stride. */ |
251 | */ | ||
252 | #define DSCR_SRC1_STS_MASK (3 << 30) /* Src xfer size */ | 246 | #define DSCR_SRC1_STS_MASK (3 << 30) /* Src xfer size */ |
253 | #define DSCR_SRC1_SAM_MASK (3 << 28) /* Src xfer movement */ | 247 | #define DSCR_SRC1_SAM_MASK (3 << 28) /* Src xfer movement */ |
254 | #define DSCR_SRC1_SB_MASK (0x3fff << 14) /* Block size */ | 248 | #define DSCR_SRC1_SB_MASK (0x3fff << 14) /* Block size */ |
@@ -256,8 +250,7 @@ typedef volatile struct au1xxx_ddma_desc { | |||
256 | #define DSCR_SRC1_SS_MASK (0x3fff << 0) /* Stride */ | 250 | #define DSCR_SRC1_SS_MASK (0x3fff << 0) /* Stride */ |
257 | #define DSCR_SRC1_SS(x) (((x) & 0x3fff) << 0) | 251 | #define DSCR_SRC1_SS(x) (((x) & 0x3fff) << 0) |
258 | 252 | ||
259 | /* Dest1, 1-dimensional stride. | 253 | /* Dest1, 1-dimensional stride. */ |
260 | */ | ||
261 | #define DSCR_DEST1_DTS_MASK (3 << 30) /* Dest xfer size */ | 254 | #define DSCR_DEST1_DTS_MASK (3 << 30) /* Dest xfer size */ |
262 | #define DSCR_DEST1_DAM_MASK (3 << 28) /* Dest xfer movement */ | 255 | #define DSCR_DEST1_DAM_MASK (3 << 28) /* Dest xfer movement */ |
263 | #define DSCR_DEST1_DB_MASK (0x3fff << 14) /* Block size */ | 256 | #define DSCR_DEST1_DB_MASK (0x3fff << 14) /* Block size */ |
@@ -279,29 +272,27 @@ typedef volatile struct au1xxx_ddma_desc { | |||
279 | #define DSCR_SRC1_SAM(x) (((x) & 3) << 28) | 272 | #define DSCR_SRC1_SAM(x) (((x) & 3) << 28) |
280 | #define DSCR_DEST1_DAM(x) (((x) & 3) << 28) | 273 | #define DSCR_DEST1_DAM(x) (((x) & 3) << 28) |
281 | 274 | ||
282 | /* The next descriptor pointer. | 275 | /* The next descriptor pointer. */ |
283 | */ | ||
284 | #define DSCR_NXTPTR_MASK (0x07ffffff) | 276 | #define DSCR_NXTPTR_MASK (0x07ffffff) |
285 | #define DSCR_NXTPTR(x) ((x) >> 5) | 277 | #define DSCR_NXTPTR(x) ((x) >> 5) |
286 | #define DSCR_GET_NXTPTR(x) ((x) << 5) | 278 | #define DSCR_GET_NXTPTR(x) ((x) << 5) |
287 | #define DSCR_NXTPTR_MS (1 << 27) | 279 | #define DSCR_NXTPTR_MS (1 << 27) |
288 | 280 | ||
289 | /* The number of DBDMA channels. | 281 | /* The number of DBDMA channels. */ |
290 | */ | ||
291 | #define NUM_DBDMA_CHANS 16 | 282 | #define NUM_DBDMA_CHANS 16 |
292 | 283 | ||
293 | /* | 284 | /* |
294 | * Ddma API definitions | 285 | * DDMA API definitions |
295 | * FIXME: may not fit to this header file | 286 | * FIXME: may not fit to this header file |
296 | */ | 287 | */ |
297 | typedef struct dbdma_device_table { | 288 | typedef struct dbdma_device_table { |
298 | u32 dev_id; | 289 | u32 dev_id; |
299 | u32 dev_flags; | 290 | u32 dev_flags; |
300 | u32 dev_tsize; | 291 | u32 dev_tsize; |
301 | u32 dev_devwidth; | 292 | u32 dev_devwidth; |
302 | u32 dev_physaddr; /* If FIFO */ | 293 | u32 dev_physaddr; /* If FIFO */ |
303 | u32 dev_intlevel; | 294 | u32 dev_intlevel; |
304 | u32 dev_intpolarity; | 295 | u32 dev_intpolarity; |
305 | } dbdev_tab_t; | 296 | } dbdev_tab_t; |
306 | 297 | ||
307 | 298 | ||
@@ -316,44 +307,41 @@ typedef struct dbdma_chan_config { | |||
316 | au1x_ddma_desc_t *chan_desc_base; | 307 | au1x_ddma_desc_t *chan_desc_base; |
317 | au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr; | 308 | au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr; |
318 | void *chan_callparam; | 309 | void *chan_callparam; |
319 | void (*chan_callback)(int, void *); | 310 | void (*chan_callback)(int, void *); |
320 | } chan_tab_t; | 311 | } chan_tab_t; |
321 | 312 | ||
322 | #define DEV_FLAGS_INUSE (1 << 0) | 313 | #define DEV_FLAGS_INUSE (1 << 0) |
323 | #define DEV_FLAGS_ANYUSE (1 << 1) | 314 | #define DEV_FLAGS_ANYUSE (1 << 1) |
324 | #define DEV_FLAGS_OUT (1 << 2) | 315 | #define DEV_FLAGS_OUT (1 << 2) |
325 | #define DEV_FLAGS_IN (1 << 3) | 316 | #define DEV_FLAGS_IN (1 << 3) |
326 | #define DEV_FLAGS_BURSTABLE (1 << 4) | 317 | #define DEV_FLAGS_BURSTABLE (1 << 4) |
327 | #define DEV_FLAGS_SYNC (1 << 5) | 318 | #define DEV_FLAGS_SYNC (1 << 5) |
328 | /* end Ddma API definitions */ | 319 | /* end DDMA API definitions */ |
329 | 320 | ||
330 | /* External functions for drivers to use. | 321 | /* |
331 | */ | 322 | * External functions for drivers to use. |
332 | /* Use this to allocate a dbdma channel. The device ids are one of the | 323 | * Use this to allocate a DBDMA channel. The device IDs are one of |
333 | * DSCR_CMD0 devices IDs, which is usually redefined to a more | 324 | * the DSCR_CMD0 devices IDs, which is usually redefined to a more |
334 | * meaningful name. The 'callback' is called during dma completion | 325 | * meaningful name. The 'callback' is called during DMA completion |
335 | * interrupt. | 326 | * interrupt. |
336 | */ | 327 | */ |
337 | extern u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, | 328 | extern u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, |
338 | void (*callback)(int, void *), void *callparam); | 329 | void (*callback)(int, void *), |
330 | void *callparam); | ||
339 | 331 | ||
340 | #define DBDMA_MEM_CHAN DSCR_CMD0_ALWAYS | 332 | #define DBDMA_MEM_CHAN DSCR_CMD0_ALWAYS |
341 | 333 | ||
342 | /* Set the device width of a in/out fifo. | 334 | /* Set the device width of an in/out FIFO. */ |
343 | */ | ||
344 | u32 au1xxx_dbdma_set_devwidth(u32 chanid, int bits); | 335 | u32 au1xxx_dbdma_set_devwidth(u32 chanid, int bits); |
345 | 336 | ||
346 | /* Allocate a ring of descriptors for dbdma. | 337 | /* Allocate a ring of descriptors for DBDMA. */ |
347 | */ | ||
348 | u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries); | 338 | u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries); |
349 | 339 | ||
350 | /* Put buffers on source/destination descriptors. | 340 | /* Put buffers on source/destination descriptors. */ |
351 | */ | ||
352 | u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags); | 341 | u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags); |
353 | u32 _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags); | 342 | u32 _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags); |
354 | 343 | ||
355 | /* Get a buffer from the destination descriptor. | 344 | /* Get a buffer from the destination descriptor. */ |
356 | */ | ||
357 | u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes); | 345 | u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes); |
358 | 346 | ||
359 | void au1xxx_dbdma_stop(u32 chanid); | 347 | void au1xxx_dbdma_stop(u32 chanid); |
@@ -364,29 +352,35 @@ u32 au1xxx_get_dma_residue(u32 chanid); | |||
364 | void au1xxx_dbdma_chan_free(u32 chanid); | 352 | void au1xxx_dbdma_chan_free(u32 chanid); |
365 | void au1xxx_dbdma_dump(u32 chanid); | 353 | void au1xxx_dbdma_dump(u32 chanid); |
366 | 354 | ||
367 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr ); | 355 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); |
368 | 356 | ||
369 | u32 au1xxx_ddma_add_device( dbdev_tab_t *dev ); | 357 | u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); |
370 | void * au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); | 358 | extern void au1xxx_ddma_del_device(u32 devid); |
359 | void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); | ||
371 | 360 | ||
372 | /* | 361 | /* |
373 | Some compatibilty macros -- | 362 | * Some compatibilty macros -- needed to make changes to API |
374 | Needed to make changes to API without breaking existing drivers | 363 | * without breaking existing drivers. |
375 | */ | 364 | */ |
376 | #define au1xxx_dbdma_put_source(chanid, buf, nbytes)_au1xxx_dbdma_put_source(chanid, buf, nbytes, DDMA_FLAGS_IE) | 365 | #define au1xxx_dbdma_put_source(chanid, buf, nbytes) \ |
377 | #define au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags) _au1xxx_dbdma_put_source(chanid, buf, nbytes, flags) | 366 | _au1xxx_dbdma_put_source(chanid, buf, nbytes, DDMA_FLAGS_IE) |
378 | #define put_source_flags(chanid, buf, nbytes, flags) au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags) | 367 | #define au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags) \ |
379 | 368 | _au1xxx_dbdma_put_source(chanid, buf, nbytes, flags) | |
380 | 369 | #define put_source_flags(chanid, buf, nbytes, flags) \ | |
381 | #define au1xxx_dbdma_put_dest(chanid, buf, nbytes) _au1xxx_dbdma_put_dest(chanid, buf, nbytes, DDMA_FLAGS_IE) | 370 | au1xxx_dbdma_put_source_flags(chanid, buf, nbytes, flags) |
382 | #define au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags) _au1xxx_dbdma_put_dest(chanid, buf, nbytes, flags) | 371 | |
383 | #define put_dest_flags(chanid, buf, nbytes, flags) au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags) | 372 | #define au1xxx_dbdma_put_dest(chanid, buf, nbytes) \ |
373 | _au1xxx_dbdma_put_dest(chanid, buf, nbytes, DDMA_FLAGS_IE) | ||
374 | #define au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags) \ | ||
375 | _au1xxx_dbdma_put_dest(chanid, buf, nbytes, flags) | ||
376 | #define put_dest_flags(chanid, buf, nbytes, flags) \ | ||
377 | au1xxx_dbdma_put_dest_flags(chanid, buf, nbytes, flags) | ||
384 | 378 | ||
385 | /* | 379 | /* |
386 | * Flags for the put_source/put_dest functions. | 380 | * Flags for the put_source/put_dest functions. |
387 | */ | 381 | */ |
388 | #define DDMA_FLAGS_IE (1<<0) | 382 | #define DDMA_FLAGS_IE (1 << 0) |
389 | #define DDMA_FLAGS_NOIE (1<<1) | 383 | #define DDMA_FLAGS_NOIE (1 << 1) |
390 | 384 | ||
391 | #endif /* _LANGUAGE_ASSEMBLY */ | 385 | #endif /* _LANGUAGE_ASSEMBLY */ |
392 | #endif /* _AU1000_DBDMA_H_ */ | 386 | #endif /* _AU1000_DBDMA_H_ */ |
diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h index b493a5e46c63..60638b8969ba 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h | |||
@@ -31,167 +31,164 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 33 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
34 | #define DMA_WAIT_TIMEOUT 100 | 34 | #define DMA_WAIT_TIMEOUT 100 |
35 | #define NUM_DESCRIPTORS PRD_ENTRIES | 35 | #define NUM_DESCRIPTORS PRD_ENTRIES |
36 | #else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */ | 36 | #else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */ |
37 | #define NUM_DESCRIPTORS 2 | 37 | #define NUM_DESCRIPTORS 2 |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifndef AU1XXX_ATA_RQSIZE | 40 | #ifndef AU1XXX_ATA_RQSIZE |
41 | #define AU1XXX_ATA_RQSIZE 128 | 41 | #define AU1XXX_ATA_RQSIZE 128 |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | /* Disable Burstable-Support for DBDMA */ | 44 | /* Disable Burstable-Support for DBDMA */ |
45 | #ifndef CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON | 45 | #ifndef CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON |
46 | #define CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON 0 | 46 | #define CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON 0 |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #ifdef CONFIG_PM | 49 | #ifdef CONFIG_PM |
50 | /* | 50 | /* |
51 | * This will enable the device to be powered up when write() or read() | 51 | * This will enable the device to be powered up when write() or read() |
52 | * is called. If this is not defined, the driver will return -EBUSY. | 52 | * is called. If this is not defined, the driver will return -EBUSY. |
53 | */ | 53 | */ |
54 | #define WAKE_ON_ACCESS 1 | 54 | #define WAKE_ON_ACCESS 1 |
55 | 55 | ||
56 | typedef struct | 56 | typedef struct { |
57 | { | 57 | spinlock_t lock; /* Used to block on state transitions */ |
58 | spinlock_t lock; /* Used to block on state transitions */ | 58 | au1xxx_power_dev_t *dev; /* Power Managers device structure */ |
59 | au1xxx_power_dev_t *dev; /* Power Managers device structure */ | 59 | unsigned stopped; /* Used to signal device is stopped */ |
60 | unsigned stopped; /* USed to signaling device is stopped */ | ||
61 | } pm_state; | 60 | } pm_state; |
62 | #endif | 61 | #endif |
63 | 62 | ||
64 | 63 | typedef struct { | |
65 | typedef struct | 64 | u32 tx_dev_id, rx_dev_id, target_dev_id; |
66 | { | 65 | u32 tx_chan, rx_chan; |
67 | u32 tx_dev_id, rx_dev_id, target_dev_id; | 66 | void *tx_desc_head, *rx_desc_head; |
68 | u32 tx_chan, rx_chan; | 67 | ide_hwif_t *hwif; |
69 | void *tx_desc_head, *rx_desc_head; | ||
70 | ide_hwif_t *hwif; | ||
71 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 68 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
72 | ide_drive_t *drive; | 69 | ide_drive_t *drive; |
73 | struct dbdma_cmd *dma_table_cpu; | 70 | struct dbdma_cmd *dma_table_cpu; |
74 | dma_addr_t dma_table_dma; | 71 | dma_addr_t dma_table_dma; |
75 | #endif | 72 | #endif |
76 | int irq; | 73 | int irq; |
77 | u32 regbase; | 74 | u32 regbase; |
78 | #ifdef CONFIG_PM | 75 | #ifdef CONFIG_PM |
79 | pm_state pm; | 76 | pm_state pm; |
80 | #endif | 77 | #endif |
81 | } _auide_hwif; | 78 | } _auide_hwif; |
82 | 79 | ||
83 | /******************************************************************************* | 80 | /******************************************************************************/ |
84 | * PIO Mode timing calculation : * | 81 | /* PIO Mode timing calculation : */ |
85 | * * | 82 | /* */ |
86 | * Static Bus Spec ATA Spec * | 83 | /* Static Bus Spec ATA Spec */ |
87 | * Tcsoe = t1 * | 84 | /* Tcsoe = t1 */ |
88 | * Toecs = t9 * | 85 | /* Toecs = t9 */ |
89 | * Twcs = t9 * | 86 | /* Twcs = t9 */ |
90 | * Tcsh = t2i | t2 * | 87 | /* Tcsh = t2i | t2 */ |
91 | * Tcsoff = t2i | t2 * | 88 | /* Tcsoff = t2i | t2 */ |
92 | * Twp = t2 * | 89 | /* Twp = t2 */ |
93 | * Tcsw = t1 * | 90 | /* Tcsw = t1 */ |
94 | * Tpm = 0 * | 91 | /* Tpm = 0 */ |
95 | * Ta = t1+t2 * | 92 | /* Ta = t1+t2 */ |
96 | *******************************************************************************/ | 93 | /******************************************************************************/ |
97 | 94 | ||
98 | #define TCSOE_MASK (0x07<<29) | 95 | #define TCSOE_MASK (0x07 << 29) |
99 | #define TOECS_MASK (0x07<<26) | 96 | #define TOECS_MASK (0x07 << 26) |
100 | #define TWCS_MASK (0x07<<28) | 97 | #define TWCS_MASK (0x07 << 28) |
101 | #define TCSH_MASK (0x0F<<24) | 98 | #define TCSH_MASK (0x0F << 24) |
102 | #define TCSOFF_MASK (0x07<<20) | 99 | #define TCSOFF_MASK (0x07 << 20) |
103 | #define TWP_MASK (0x3F<<14) | 100 | #define TWP_MASK (0x3F << 14) |
104 | #define TCSW_MASK (0x0F<<10) | 101 | #define TCSW_MASK (0x0F << 10) |
105 | #define TPM_MASK (0x0F<<6) | 102 | #define TPM_MASK (0x0F << 6) |
106 | #define TA_MASK (0x3F<<0) | 103 | #define TA_MASK (0x3F << 0) |
107 | #define TS_MASK (1<<8) | 104 | #define TS_MASK (1 << 8) |
108 | 105 | ||
109 | /* Timing parameters PIO mode 0 */ | 106 | /* Timing parameters PIO mode 0 */ |
110 | #define SBC_IDE_PIO0_TCSOE (0x04<<29) | 107 | #define SBC_IDE_PIO0_TCSOE (0x04 << 29) |
111 | #define SBC_IDE_PIO0_TOECS (0x01<<26) | 108 | #define SBC_IDE_PIO0_TOECS (0x01 << 26) |
112 | #define SBC_IDE_PIO0_TWCS (0x02<<28) | 109 | #define SBC_IDE_PIO0_TWCS (0x02 << 28) |
113 | #define SBC_IDE_PIO0_TCSH (0x08<<24) | 110 | #define SBC_IDE_PIO0_TCSH (0x08 << 24) |
114 | #define SBC_IDE_PIO0_TCSOFF (0x07<<20) | 111 | #define SBC_IDE_PIO0_TCSOFF (0x07 << 20) |
115 | #define SBC_IDE_PIO0_TWP (0x10<<14) | 112 | #define SBC_IDE_PIO0_TWP (0x10 << 14) |
116 | #define SBC_IDE_PIO0_TCSW (0x04<<10) | 113 | #define SBC_IDE_PIO0_TCSW (0x04 << 10) |
117 | #define SBC_IDE_PIO0_TPM (0x0<<6) | 114 | #define SBC_IDE_PIO0_TPM (0x00 << 6) |
118 | #define SBC_IDE_PIO0_TA (0x15<<0) | 115 | #define SBC_IDE_PIO0_TA (0x15 << 0) |
119 | /* Timing parameters PIO mode 1 */ | 116 | /* Timing parameters PIO mode 1 */ |
120 | #define SBC_IDE_PIO1_TCSOE (0x03<<29) | 117 | #define SBC_IDE_PIO1_TCSOE (0x03 << 29) |
121 | #define SBC_IDE_PIO1_TOECS (0x01<<26) | 118 | #define SBC_IDE_PIO1_TOECS (0x01 << 26) |
122 | #define SBC_IDE_PIO1_TWCS (0x01<<28) | 119 | #define SBC_IDE_PIO1_TWCS (0x01 << 28) |
123 | #define SBC_IDE_PIO1_TCSH (0x06<<24) | 120 | #define SBC_IDE_PIO1_TCSH (0x06 << 24) |
124 | #define SBC_IDE_PIO1_TCSOFF (0x06<<20) | 121 | #define SBC_IDE_PIO1_TCSOFF (0x06 << 20) |
125 | #define SBC_IDE_PIO1_TWP (0x08<<14) | 122 | #define SBC_IDE_PIO1_TWP (0x08 << 14) |
126 | #define SBC_IDE_PIO1_TCSW (0x03<<10) | 123 | #define SBC_IDE_PIO1_TCSW (0x03 << 10) |
127 | #define SBC_IDE_PIO1_TPM (0x00<<6) | 124 | #define SBC_IDE_PIO1_TPM (0x00 << 6) |
128 | #define SBC_IDE_PIO1_TA (0x0B<<0) | 125 | #define SBC_IDE_PIO1_TA (0x0B << 0) |
129 | /* Timing parameters PIO mode 2 */ | 126 | /* Timing parameters PIO mode 2 */ |
130 | #define SBC_IDE_PIO2_TCSOE (0x05<<29) | 127 | #define SBC_IDE_PIO2_TCSOE (0x05 << 29) |
131 | #define SBC_IDE_PIO2_TOECS (0x01<<26) | 128 | #define SBC_IDE_PIO2_TOECS (0x01 << 26) |
132 | #define SBC_IDE_PIO2_TWCS (0x01<<28) | 129 | #define SBC_IDE_PIO2_TWCS (0x01 << 28) |
133 | #define SBC_IDE_PIO2_TCSH (0x07<<24) | 130 | #define SBC_IDE_PIO2_TCSH (0x07 << 24) |
134 | #define SBC_IDE_PIO2_TCSOFF (0x07<<20) | 131 | #define SBC_IDE_PIO2_TCSOFF (0x07 << 20) |
135 | #define SBC_IDE_PIO2_TWP (0x1F<<14) | 132 | #define SBC_IDE_PIO2_TWP (0x1F << 14) |
136 | #define SBC_IDE_PIO2_TCSW (0x05<<10) | 133 | #define SBC_IDE_PIO2_TCSW (0x05 << 10) |
137 | #define SBC_IDE_PIO2_TPM (0x00<<6) | 134 | #define SBC_IDE_PIO2_TPM (0x00 << 6) |
138 | #define SBC_IDE_PIO2_TA (0x22<<0) | 135 | #define SBC_IDE_PIO2_TA (0x22 << 0) |
139 | /* Timing parameters PIO mode 3 */ | 136 | /* Timing parameters PIO mode 3 */ |
140 | #define SBC_IDE_PIO3_TCSOE (0x05<<29) | 137 | #define SBC_IDE_PIO3_TCSOE (0x05 << 29) |
141 | #define SBC_IDE_PIO3_TOECS (0x01<<26) | 138 | #define SBC_IDE_PIO3_TOECS (0x01 << 26) |
142 | #define SBC_IDE_PIO3_TWCS (0x01<<28) | 139 | #define SBC_IDE_PIO3_TWCS (0x01 << 28) |
143 | #define SBC_IDE_PIO3_TCSH (0x0D<<24) | 140 | #define SBC_IDE_PIO3_TCSH (0x0D << 24) |
144 | #define SBC_IDE_PIO3_TCSOFF (0x0D<<20) | 141 | #define SBC_IDE_PIO3_TCSOFF (0x0D << 20) |
145 | #define SBC_IDE_PIO3_TWP (0x15<<14) | 142 | #define SBC_IDE_PIO3_TWP (0x15 << 14) |
146 | #define SBC_IDE_PIO3_TCSW (0x05<<10) | 143 | #define SBC_IDE_PIO3_TCSW (0x05 << 10) |
147 | #define SBC_IDE_PIO3_TPM (0x00<<6) | 144 | #define SBC_IDE_PIO3_TPM (0x00 << 6) |
148 | #define SBC_IDE_PIO3_TA (0x1A<<0) | 145 | #define SBC_IDE_PIO3_TA (0x1A << 0) |
149 | /* Timing parameters PIO mode 4 */ | 146 | /* Timing parameters PIO mode 4 */ |
150 | #define SBC_IDE_PIO4_TCSOE (0x04<<29) | 147 | #define SBC_IDE_PIO4_TCSOE (0x04 << 29) |
151 | #define SBC_IDE_PIO4_TOECS (0x01<<26) | 148 | #define SBC_IDE_PIO4_TOECS (0x01 << 26) |
152 | #define SBC_IDE_PIO4_TWCS (0x01<<28) | 149 | #define SBC_IDE_PIO4_TWCS (0x01 << 28) |
153 | #define SBC_IDE_PIO4_TCSH (0x04<<24) | 150 | #define SBC_IDE_PIO4_TCSH (0x04 << 24) |
154 | #define SBC_IDE_PIO4_TCSOFF (0x04<<20) | 151 | #define SBC_IDE_PIO4_TCSOFF (0x04 << 20) |
155 | #define SBC_IDE_PIO4_TWP (0x0D<<14) | 152 | #define SBC_IDE_PIO4_TWP (0x0D << 14) |
156 | #define SBC_IDE_PIO4_TCSW (0x03<<10) | 153 | #define SBC_IDE_PIO4_TCSW (0x03 << 10) |
157 | #define SBC_IDE_PIO4_TPM (0x00<<6) | 154 | #define SBC_IDE_PIO4_TPM (0x00 << 6) |
158 | #define SBC_IDE_PIO4_TA (0x12<<0) | 155 | #define SBC_IDE_PIO4_TA (0x12 << 0) |
159 | /* Timing parameters MDMA mode 0 */ | 156 | /* Timing parameters MDMA mode 0 */ |
160 | #define SBC_IDE_MDMA0_TCSOE (0x03<<29) | 157 | #define SBC_IDE_MDMA0_TCSOE (0x03 << 29) |
161 | #define SBC_IDE_MDMA0_TOECS (0x01<<26) | 158 | #define SBC_IDE_MDMA0_TOECS (0x01 << 26) |
162 | #define SBC_IDE_MDMA0_TWCS (0x01<<28) | 159 | #define SBC_IDE_MDMA0_TWCS (0x01 << 28) |
163 | #define SBC_IDE_MDMA0_TCSH (0x07<<24) | 160 | #define SBC_IDE_MDMA0_TCSH (0x07 << 24) |
164 | #define SBC_IDE_MDMA0_TCSOFF (0x07<<20) | 161 | #define SBC_IDE_MDMA0_TCSOFF (0x07 << 20) |
165 | #define SBC_IDE_MDMA0_TWP (0x0C<<14) | 162 | #define SBC_IDE_MDMA0_TWP (0x0C << 14) |
166 | #define SBC_IDE_MDMA0_TCSW (0x03<<10) | 163 | #define SBC_IDE_MDMA0_TCSW (0x03 << 10) |
167 | #define SBC_IDE_MDMA0_TPM (0x00<<6) | 164 | #define SBC_IDE_MDMA0_TPM (0x00 << 6) |
168 | #define SBC_IDE_MDMA0_TA (0x0F<<0) | 165 | #define SBC_IDE_MDMA0_TA (0x0F << 0) |
169 | /* Timing parameters MDMA mode 1 */ | 166 | /* Timing parameters MDMA mode 1 */ |
170 | #define SBC_IDE_MDMA1_TCSOE (0x05<<29) | 167 | #define SBC_IDE_MDMA1_TCSOE (0x05 << 29) |
171 | #define SBC_IDE_MDMA1_TOECS (0x01<<26) | 168 | #define SBC_IDE_MDMA1_TOECS (0x01 << 26) |
172 | #define SBC_IDE_MDMA1_TWCS (0x01<<28) | 169 | #define SBC_IDE_MDMA1_TWCS (0x01 << 28) |
173 | #define SBC_IDE_MDMA1_TCSH (0x05<<24) | 170 | #define SBC_IDE_MDMA1_TCSH (0x05 << 24) |
174 | #define SBC_IDE_MDMA1_TCSOFF (0x05<<20) | 171 | #define SBC_IDE_MDMA1_TCSOFF (0x05 << 20) |
175 | #define SBC_IDE_MDMA1_TWP (0x0F<<14) | 172 | #define SBC_IDE_MDMA1_TWP (0x0F << 14) |
176 | #define SBC_IDE_MDMA1_TCSW (0x05<<10) | 173 | #define SBC_IDE_MDMA1_TCSW (0x05 << 10) |
177 | #define SBC_IDE_MDMA1_TPM (0x00<<6) | 174 | #define SBC_IDE_MDMA1_TPM (0x00 << 6) |
178 | #define SBC_IDE_MDMA1_TA (0x15<<0) | 175 | #define SBC_IDE_MDMA1_TA (0x15 << 0) |
179 | /* Timing parameters MDMA mode 2 */ | 176 | /* Timing parameters MDMA mode 2 */ |
180 | #define SBC_IDE_MDMA2_TCSOE (0x04<<29) | 177 | #define SBC_IDE_MDMA2_TCSOE (0x04 << 29) |
181 | #define SBC_IDE_MDMA2_TOECS (0x01<<26) | 178 | #define SBC_IDE_MDMA2_TOECS (0x01 << 26) |
182 | #define SBC_IDE_MDMA2_TWCS (0x01<<28) | 179 | #define SBC_IDE_MDMA2_TWCS (0x01 << 28) |
183 | #define SBC_IDE_MDMA2_TCSH (0x04<<24) | 180 | #define SBC_IDE_MDMA2_TCSH (0x04 << 24) |
184 | #define SBC_IDE_MDMA2_TCSOFF (0x04<<20) | 181 | #define SBC_IDE_MDMA2_TCSOFF (0x04 << 20) |
185 | #define SBC_IDE_MDMA2_TWP (0x0D<<14) | 182 | #define SBC_IDE_MDMA2_TWP (0x0D << 14) |
186 | #define SBC_IDE_MDMA2_TCSW (0x04<<10) | 183 | #define SBC_IDE_MDMA2_TCSW (0x04 << 10) |
187 | #define SBC_IDE_MDMA2_TPM (0x00<<6) | 184 | #define SBC_IDE_MDMA2_TPM (0x00 << 6) |
188 | #define SBC_IDE_MDMA2_TA (0x12<<0) | 185 | #define SBC_IDE_MDMA2_TA (0x12 << 0) |
189 | 186 | ||
190 | #define SBC_IDE_TIMING(mode) \ | 187 | #define SBC_IDE_TIMING(mode) \ |
191 | SBC_IDE_##mode##_TWCS | \ | 188 | (SBC_IDE_##mode##_TWCS | \ |
192 | SBC_IDE_##mode##_TCSH | \ | 189 | SBC_IDE_##mode##_TCSH | \ |
193 | SBC_IDE_##mode##_TCSOFF | \ | 190 | SBC_IDE_##mode##_TCSOFF | \ |
194 | SBC_IDE_##mode##_TWP | \ | 191 | SBC_IDE_##mode##_TWP | \ |
195 | SBC_IDE_##mode##_TCSW | \ | 192 | SBC_IDE_##mode##_TCSW | \ |
196 | SBC_IDE_##mode##_TPM | \ | 193 | SBC_IDE_##mode##_TPM | \ |
197 | SBC_IDE_##mode##_TA | 194 | SBC_IDE_##mode##_TA) |
diff --git a/include/asm-mips/mach-au1x00/au1xxx_psc.h b/include/asm-mips/mach-au1x00/au1xxx_psc.h index 1bd4e27caf6b..dae4eca2417e 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_psc.h +++ b/include/asm-mips/mach-au1x00/au1xxx_psc.h | |||
@@ -33,7 +33,6 @@ | |||
33 | #ifndef _AU1000_PSC_H_ | 33 | #ifndef _AU1000_PSC_H_ |
34 | #define _AU1000_PSC_H_ | 34 | #define _AU1000_PSC_H_ |
35 | 35 | ||
36 | |||
37 | /* The PSC base addresses. */ | 36 | /* The PSC base addresses. */ |
38 | #ifdef CONFIG_SOC_AU1550 | 37 | #ifdef CONFIG_SOC_AU1550 |
39 | #define PSC0_BASE_ADDR 0xb1a00000 | 38 | #define PSC0_BASE_ADDR 0xb1a00000 |
@@ -47,8 +46,8 @@ | |||
47 | #define PSC1_BASE_ADDR 0xb1b00000 | 46 | #define PSC1_BASE_ADDR 0xb1b00000 |
48 | #endif | 47 | #endif |
49 | 48 | ||
50 | /* The PSC select and control registers are common to | 49 | /* |
51 | * all protocols. | 50 | * The PSC select and control registers are common to all protocols. |
52 | */ | 51 | */ |
53 | #define PSC_SEL_OFFSET 0x00000000 | 52 | #define PSC_SEL_OFFSET 0x00000000 |
54 | #define PSC_CTRL_OFFSET 0x00000004 | 53 | #define PSC_CTRL_OFFSET 0x00000004 |
@@ -59,18 +58,17 @@ | |||
59 | #define PSC_SEL_CLK_SERCLK (2 << 4) | 58 | #define PSC_SEL_CLK_SERCLK (2 << 4) |
60 | 59 | ||
61 | #define PSC_SEL_PS_MASK 0x00000007 | 60 | #define PSC_SEL_PS_MASK 0x00000007 |
62 | #define PSC_SEL_PS_DISABLED (0) | 61 | #define PSC_SEL_PS_DISABLED 0 |
63 | #define PSC_SEL_PS_SPIMODE (2) | 62 | #define PSC_SEL_PS_SPIMODE 2 |
64 | #define PSC_SEL_PS_I2SMODE (3) | 63 | #define PSC_SEL_PS_I2SMODE 3 |
65 | #define PSC_SEL_PS_AC97MODE (4) | 64 | #define PSC_SEL_PS_AC97MODE 4 |
66 | #define PSC_SEL_PS_SMBUSMODE (5) | 65 | #define PSC_SEL_PS_SMBUSMODE 5 |
67 | 66 | ||
68 | #define PSC_CTRL_DISABLE (0) | 67 | #define PSC_CTRL_DISABLE 0 |
69 | #define PSC_CTRL_SUSPEND (2) | 68 | #define PSC_CTRL_SUSPEND 2 |
70 | #define PSC_CTRL_ENABLE (3) | 69 | #define PSC_CTRL_ENABLE 3 |
71 | 70 | ||
72 | /* AC97 Registers. | 71 | /* AC97 Registers. */ |
73 | */ | ||
74 | #define PSC_AC97CFG_OFFSET 0x00000008 | 72 | #define PSC_AC97CFG_OFFSET 0x00000008 |
75 | #define PSC_AC97MSK_OFFSET 0x0000000c | 73 | #define PSC_AC97MSK_OFFSET 0x0000000c |
76 | #define PSC_AC97PCR_OFFSET 0x00000010 | 74 | #define PSC_AC97PCR_OFFSET 0x00000010 |
@@ -95,8 +93,7 @@ | |||
95 | #define PSC_AC97GPO (AC97_PSC_BASE + PSC_AC97GPO_OFFSET) | 93 | #define PSC_AC97GPO (AC97_PSC_BASE + PSC_AC97GPO_OFFSET) |
96 | #define PSC_AC97GPI (AC97_PSC_BASE + PSC_AC97GPI_OFFSET) | 94 | #define PSC_AC97GPI (AC97_PSC_BASE + PSC_AC97GPI_OFFSET) |
97 | 95 | ||
98 | /* AC97 Config Register. | 96 | /* AC97 Config Register. */ |
99 | */ | ||
100 | #define PSC_AC97CFG_RT_MASK (3 << 30) | 97 | #define PSC_AC97CFG_RT_MASK (3 << 30) |
101 | #define PSC_AC97CFG_RT_FIFO1 (0 << 30) | 98 | #define PSC_AC97CFG_RT_FIFO1 (0 << 30) |
102 | #define PSC_AC97CFG_RT_FIFO2 (1 << 30) | 99 | #define PSC_AC97CFG_RT_FIFO2 (1 << 30) |
@@ -118,20 +115,19 @@ | |||
118 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) | 115 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) |
119 | #define PSC_AC97CFG_GE_ENABLE (1) | 116 | #define PSC_AC97CFG_GE_ENABLE (1) |
120 | 117 | ||
121 | /* Enable slots 3-12. | 118 | /* Enable slots 3-12. */ |
122 | */ | ||
123 | #define PSC_AC97CFG_TXSLOT_ENA(x) (1 << (((x) - 3) + 11)) | 119 | #define PSC_AC97CFG_TXSLOT_ENA(x) (1 << (((x) - 3) + 11)) |
124 | #define PSC_AC97CFG_RXSLOT_ENA(x) (1 << (((x) - 3) + 1)) | 120 | #define PSC_AC97CFG_RXSLOT_ENA(x) (1 << (((x) - 3) + 1)) |
125 | 121 | ||
126 | /* The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. | 122 | /* |
123 | * The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. | ||
127 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the | 124 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the |
128 | * arithmetic in the macro. | 125 | * arithmetic in the macro. |
129 | */ | 126 | */ |
130 | #define PSC_AC97CFG_SET_LEN(x) (((((x)-2)/2) & 0xf) << 21) | 127 | #define PSC_AC97CFG_SET_LEN(x) (((((x) - 2) / 2) & 0xf) << 21) |
131 | #define PSC_AC97CFG_GET_LEN(x) (((((x) >> 21) & 0xf) * 2) + 2) | 128 | #define PSC_AC97CFG_GET_LEN(x) (((((x) >> 21) & 0xf) * 2) + 2) |
132 | 129 | ||
133 | /* AC97 Mask Register. | 130 | /* AC97 Mask Register. */ |
134 | */ | ||
135 | #define PSC_AC97MSK_GR (1 << 25) | 131 | #define PSC_AC97MSK_GR (1 << 25) |
136 | #define PSC_AC97MSK_CD (1 << 24) | 132 | #define PSC_AC97MSK_CD (1 << 24) |
137 | #define PSC_AC97MSK_RR (1 << 13) | 133 | #define PSC_AC97MSK_RR (1 << 13) |
@@ -148,8 +144,7 @@ | |||
148 | PSC_AC97MSK_TO | PSC_AC97MSK_TU | \ | 144 | PSC_AC97MSK_TO | PSC_AC97MSK_TU | \ |
149 | PSC_AC97MSK_RD | PSC_AC97MSK_TD) | 145 | PSC_AC97MSK_RD | PSC_AC97MSK_TD) |
150 | 146 | ||
151 | /* AC97 Protocol Control Register. | 147 | /* AC97 Protocol Control Register. */ |
152 | */ | ||
153 | #define PSC_AC97PCR_RC (1 << 6) | 148 | #define PSC_AC97PCR_RC (1 << 6) |
154 | #define PSC_AC97PCR_RP (1 << 5) | 149 | #define PSC_AC97PCR_RP (1 << 5) |
155 | #define PSC_AC97PCR_RS (1 << 4) | 150 | #define PSC_AC97PCR_RS (1 << 4) |
@@ -157,8 +152,7 @@ | |||
157 | #define PSC_AC97PCR_TP (1 << 1) | 152 | #define PSC_AC97PCR_TP (1 << 1) |
158 | #define PSC_AC97PCR_TS (1 << 0) | 153 | #define PSC_AC97PCR_TS (1 << 0) |
159 | 154 | ||
160 | /* AC97 Status register (read only). | 155 | /* AC97 Status register (read only). */ |
161 | */ | ||
162 | #define PSC_AC97STAT_CB (1 << 26) | 156 | #define PSC_AC97STAT_CB (1 << 26) |
163 | #define PSC_AC97STAT_CP (1 << 25) | 157 | #define PSC_AC97STAT_CP (1 << 25) |
164 | #define PSC_AC97STAT_CR (1 << 24) | 158 | #define PSC_AC97STAT_CR (1 << 24) |
@@ -174,8 +168,7 @@ | |||
174 | #define PSC_AC97STAT_DR (1 << 1) | 168 | #define PSC_AC97STAT_DR (1 << 1) |
175 | #define PSC_AC97STAT_SR (1 << 0) | 169 | #define PSC_AC97STAT_SR (1 << 0) |
176 | 170 | ||
177 | /* AC97 Event Register. | 171 | /* AC97 Event Register. */ |
178 | */ | ||
179 | #define PSC_AC97EVNT_GR (1 << 25) | 172 | #define PSC_AC97EVNT_GR (1 << 25) |
180 | #define PSC_AC97EVNT_CD (1 << 24) | 173 | #define PSC_AC97EVNT_CD (1 << 24) |
181 | #define PSC_AC97EVNT_RR (1 << 13) | 174 | #define PSC_AC97EVNT_RR (1 << 13) |
@@ -187,22 +180,18 @@ | |||
187 | #define PSC_AC97EVNT_RD (1 << 5) | 180 | #define PSC_AC97EVNT_RD (1 << 5) |
188 | #define PSC_AC97EVNT_TD (1 << 4) | 181 | #define PSC_AC97EVNT_TD (1 << 4) |
189 | 182 | ||
190 | /* CODEC Command Register. | 183 | /* CODEC Command Register. */ |
191 | */ | ||
192 | #define PSC_AC97CDC_RD (1 << 25) | 184 | #define PSC_AC97CDC_RD (1 << 25) |
193 | #define PSC_AC97CDC_ID_MASK (3 << 23) | 185 | #define PSC_AC97CDC_ID_MASK (3 << 23) |
194 | #define PSC_AC97CDC_INDX_MASK (0x7f << 16) | 186 | #define PSC_AC97CDC_INDX_MASK (0x7f << 16) |
195 | #define PSC_AC97CDC_ID(x) (((x) & 0x3) << 23) | 187 | #define PSC_AC97CDC_ID(x) (((x) & 0x03) << 23) |
196 | #define PSC_AC97CDC_INDX(x) (((x) & 0x7f) << 16) | 188 | #define PSC_AC97CDC_INDX(x) (((x) & 0x7f) << 16) |
197 | 189 | ||
198 | /* AC97 Reset Control Register. | 190 | /* AC97 Reset Control Register. */ |
199 | */ | ||
200 | #define PSC_AC97RST_RST (1 << 1) | 191 | #define PSC_AC97RST_RST (1 << 1) |
201 | #define PSC_AC97RST_SNC (1 << 0) | 192 | #define PSC_AC97RST_SNC (1 << 0) |
202 | 193 | ||
203 | 194 | /* PSC in I2S Mode. */ | |
204 | /* PSC in I2S Mode. | ||
205 | */ | ||
206 | typedef struct psc_i2s { | 195 | typedef struct psc_i2s { |
207 | u32 psc_sel; | 196 | u32 psc_sel; |
208 | u32 psc_ctrl; | 197 | u32 psc_ctrl; |
@@ -215,8 +204,7 @@ typedef struct psc_i2s { | |||
215 | u32 psc_i2sudf; | 204 | u32 psc_i2sudf; |
216 | } psc_i2s_t; | 205 | } psc_i2s_t; |
217 | 206 | ||
218 | /* I2S Config Register. | 207 | /* I2S Config Register. */ |
219 | */ | ||
220 | #define PSC_I2SCFG_RT_MASK (3 << 30) | 208 | #define PSC_I2SCFG_RT_MASK (3 << 30) |
221 | #define PSC_I2SCFG_RT_FIFO1 (0 << 30) | 209 | #define PSC_I2SCFG_RT_FIFO1 (0 << 30) |
222 | #define PSC_I2SCFG_RT_FIFO2 (1 << 30) | 210 | #define PSC_I2SCFG_RT_FIFO2 (1 << 30) |
@@ -247,8 +235,7 @@ typedef struct psc_i2s { | |||
247 | #define PSC_I2SCFG_MLJ (1 << 10) | 235 | #define PSC_I2SCFG_MLJ (1 << 10) |
248 | #define PSC_I2SCFG_XM (1 << 9) | 236 | #define PSC_I2SCFG_XM (1 << 9) |
249 | 237 | ||
250 | /* The word length equation is simply LEN+1. | 238 | /* The word length equation is simply LEN+1. */ |
251 | */ | ||
252 | #define PSC_I2SCFG_SET_LEN(x) ((((x) - 1) & 0x1f) << 4) | 239 | #define PSC_I2SCFG_SET_LEN(x) ((((x) - 1) & 0x1f) << 4) |
253 | #define PSC_I2SCFG_GET_LEN(x) ((((x) >> 4) & 0x1f) + 1) | 240 | #define PSC_I2SCFG_GET_LEN(x) ((((x) >> 4) & 0x1f) + 1) |
254 | 241 | ||
@@ -256,8 +243,7 @@ typedef struct psc_i2s { | |||
256 | #define PSC_I2SCFG_MLF (1 << 1) | 243 | #define PSC_I2SCFG_MLF (1 << 1) |
257 | #define PSC_I2SCFG_MS (1 << 0) | 244 | #define PSC_I2SCFG_MS (1 << 0) |
258 | 245 | ||
259 | /* I2S Mask Register. | 246 | /* I2S Mask Register. */ |
260 | */ | ||
261 | #define PSC_I2SMSK_RR (1 << 13) | 247 | #define PSC_I2SMSK_RR (1 << 13) |
262 | #define PSC_I2SMSK_RO (1 << 12) | 248 | #define PSC_I2SMSK_RO (1 << 12) |
263 | #define PSC_I2SMSK_RU (1 << 11) | 249 | #define PSC_I2SMSK_RU (1 << 11) |
@@ -271,8 +257,7 @@ typedef struct psc_i2s { | |||
271 | PSC_I2SMSK_TO | PSC_I2SMSK_TU | \ | 257 | PSC_I2SMSK_TO | PSC_I2SMSK_TU | \ |
272 | PSC_I2SMSK_RD | PSC_I2SMSK_TD) | 258 | PSC_I2SMSK_RD | PSC_I2SMSK_TD) |
273 | 259 | ||
274 | /* I2S Protocol Control Register. | 260 | /* I2S Protocol Control Register. */ |
275 | */ | ||
276 | #define PSC_I2SPCR_RC (1 << 6) | 261 | #define PSC_I2SPCR_RC (1 << 6) |
277 | #define PSC_I2SPCR_RP (1 << 5) | 262 | #define PSC_I2SPCR_RP (1 << 5) |
278 | #define PSC_I2SPCR_RS (1 << 4) | 263 | #define PSC_I2SPCR_RS (1 << 4) |
@@ -280,8 +265,7 @@ typedef struct psc_i2s { | |||
280 | #define PSC_I2SPCR_TP (1 << 1) | 265 | #define PSC_I2SPCR_TP (1 << 1) |
281 | #define PSC_I2SPCR_TS (1 << 0) | 266 | #define PSC_I2SPCR_TS (1 << 0) |
282 | 267 | ||
283 | /* I2S Status register (read only). | 268 | /* I2S Status register (read only). */ |
284 | */ | ||
285 | #define PSC_I2SSTAT_RF (1 << 13) | 269 | #define PSC_I2SSTAT_RF (1 << 13) |
286 | #define PSC_I2SSTAT_RE (1 << 12) | 270 | #define PSC_I2SSTAT_RE (1 << 12) |
287 | #define PSC_I2SSTAT_RR (1 << 11) | 271 | #define PSC_I2SSTAT_RR (1 << 11) |
@@ -294,8 +278,7 @@ typedef struct psc_i2s { | |||
294 | #define PSC_I2SSTAT_DR (1 << 1) | 278 | #define PSC_I2SSTAT_DR (1 << 1) |
295 | #define PSC_I2SSTAT_SR (1 << 0) | 279 | #define PSC_I2SSTAT_SR (1 << 0) |
296 | 280 | ||
297 | /* I2S Event Register. | 281 | /* I2S Event Register. */ |
298 | */ | ||
299 | #define PSC_I2SEVNT_RR (1 << 13) | 282 | #define PSC_I2SEVNT_RR (1 << 13) |
300 | #define PSC_I2SEVNT_RO (1 << 12) | 283 | #define PSC_I2SEVNT_RO (1 << 12) |
301 | #define PSC_I2SEVNT_RU (1 << 11) | 284 | #define PSC_I2SEVNT_RU (1 << 11) |
@@ -305,8 +288,7 @@ typedef struct psc_i2s { | |||
305 | #define PSC_I2SEVNT_RD (1 << 5) | 288 | #define PSC_I2SEVNT_RD (1 << 5) |
306 | #define PSC_I2SEVNT_TD (1 << 4) | 289 | #define PSC_I2SEVNT_TD (1 << 4) |
307 | 290 | ||
308 | /* PSC in SPI Mode. | 291 | /* PSC in SPI Mode. */ |
309 | */ | ||
310 | typedef struct psc_spi { | 292 | typedef struct psc_spi { |
311 | u32 psc_sel; | 293 | u32 psc_sel; |
312 | u32 psc_ctrl; | 294 | u32 psc_ctrl; |
@@ -318,8 +300,7 @@ typedef struct psc_spi { | |||
318 | u32 psc_spitxrx; | 300 | u32 psc_spitxrx; |
319 | } psc_spi_t; | 301 | } psc_spi_t; |
320 | 302 | ||
321 | /* SPI Config Register. | 303 | /* SPI Config Register. */ |
322 | */ | ||
323 | #define PSC_SPICFG_RT_MASK (3 << 30) | 304 | #define PSC_SPICFG_RT_MASK (3 << 30) |
324 | #define PSC_SPICFG_RT_FIFO1 (0 << 30) | 305 | #define PSC_SPICFG_RT_FIFO1 (0 << 30) |
325 | #define PSC_SPICFG_RT_FIFO2 (1 << 30) | 306 | #define PSC_SPICFG_RT_FIFO2 (1 << 30) |
@@ -355,8 +336,7 @@ typedef struct psc_spi { | |||
355 | #define PSC_SPICFG_MLF (1 << 1) | 336 | #define PSC_SPICFG_MLF (1 << 1) |
356 | #define PSC_SPICFG_MO (1 << 0) | 337 | #define PSC_SPICFG_MO (1 << 0) |
357 | 338 | ||
358 | /* SPI Mask Register. | 339 | /* SPI Mask Register. */ |
359 | */ | ||
360 | #define PSC_SPIMSK_MM (1 << 16) | 340 | #define PSC_SPIMSK_MM (1 << 16) |
361 | #define PSC_SPIMSK_RR (1 << 13) | 341 | #define PSC_SPIMSK_RR (1 << 13) |
362 | #define PSC_SPIMSK_RO (1 << 12) | 342 | #define PSC_SPIMSK_RO (1 << 12) |
@@ -371,16 +351,14 @@ typedef struct psc_spi { | |||
371 | PSC_SPIMSK_TU | PSC_SPIMSK_SD | \ | 351 | PSC_SPIMSK_TU | PSC_SPIMSK_SD | \ |
372 | PSC_SPIMSK_MD) | 352 | PSC_SPIMSK_MD) |
373 | 353 | ||
374 | /* SPI Protocol Control Register. | 354 | /* SPI Protocol Control Register. */ |
375 | */ | ||
376 | #define PSC_SPIPCR_RC (1 << 6) | 355 | #define PSC_SPIPCR_RC (1 << 6) |
377 | #define PSC_SPIPCR_SP (1 << 5) | 356 | #define PSC_SPIPCR_SP (1 << 5) |
378 | #define PSC_SPIPCR_SS (1 << 4) | 357 | #define PSC_SPIPCR_SS (1 << 4) |
379 | #define PSC_SPIPCR_TC (1 << 2) | 358 | #define PSC_SPIPCR_TC (1 << 2) |
380 | #define PSC_SPIPCR_MS (1 << 0) | 359 | #define PSC_SPIPCR_MS (1 << 0) |
381 | 360 | ||
382 | /* SPI Status register (read only). | 361 | /* SPI Status register (read only). */ |
383 | */ | ||
384 | #define PSC_SPISTAT_RF (1 << 13) | 362 | #define PSC_SPISTAT_RF (1 << 13) |
385 | #define PSC_SPISTAT_RE (1 << 12) | 363 | #define PSC_SPISTAT_RE (1 << 12) |
386 | #define PSC_SPISTAT_RR (1 << 11) | 364 | #define PSC_SPISTAT_RR (1 << 11) |
@@ -393,8 +371,7 @@ typedef struct psc_spi { | |||
393 | #define PSC_SPISTAT_DR (1 << 1) | 371 | #define PSC_SPISTAT_DR (1 << 1) |
394 | #define PSC_SPISTAT_SR (1 << 0) | 372 | #define PSC_SPISTAT_SR (1 << 0) |
395 | 373 | ||
396 | /* SPI Event Register. | 374 | /* SPI Event Register. */ |
397 | */ | ||
398 | #define PSC_SPIEVNT_MM (1 << 16) | 375 | #define PSC_SPIEVNT_MM (1 << 16) |
399 | #define PSC_SPIEVNT_RR (1 << 13) | 376 | #define PSC_SPIEVNT_RR (1 << 13) |
400 | #define PSC_SPIEVNT_RO (1 << 12) | 377 | #define PSC_SPIEVNT_RO (1 << 12) |
@@ -405,13 +382,11 @@ typedef struct psc_spi { | |||
405 | #define PSC_SPIEVNT_SD (1 << 5) | 382 | #define PSC_SPIEVNT_SD (1 << 5) |
406 | #define PSC_SPIEVNT_MD (1 << 4) | 383 | #define PSC_SPIEVNT_MD (1 << 4) |
407 | 384 | ||
408 | /* Transmit register control. | 385 | /* Transmit register control. */ |
409 | */ | ||
410 | #define PSC_SPITXRX_LC (1 << 29) | 386 | #define PSC_SPITXRX_LC (1 << 29) |
411 | #define PSC_SPITXRX_SR (1 << 28) | 387 | #define PSC_SPITXRX_SR (1 << 28) |
412 | 388 | ||
413 | /* PSC in SMBus (I2C) Mode. | 389 | /* PSC in SMBus (I2C) Mode. */ |
414 | */ | ||
415 | typedef struct psc_smb { | 390 | typedef struct psc_smb { |
416 | u32 psc_sel; | 391 | u32 psc_sel; |
417 | u32 psc_ctrl; | 392 | u32 psc_ctrl; |
@@ -424,8 +399,7 @@ typedef struct psc_smb { | |||
424 | u32 psc_smbtmr; | 399 | u32 psc_smbtmr; |
425 | } psc_smb_t; | 400 | } psc_smb_t; |
426 | 401 | ||
427 | /* SMBus Config Register. | 402 | /* SMBus Config Register. */ |
428 | */ | ||
429 | #define PSC_SMBCFG_RT_MASK (3 << 30) | 403 | #define PSC_SMBCFG_RT_MASK (3 << 30) |
430 | #define PSC_SMBCFG_RT_FIFO1 (0 << 30) | 404 | #define PSC_SMBCFG_RT_FIFO1 (0 << 30) |
431 | #define PSC_SMBCFG_RT_FIFO2 (1 << 30) | 405 | #define PSC_SMBCFG_RT_FIFO2 (1 << 30) |
@@ -452,8 +426,7 @@ typedef struct psc_smb { | |||
452 | 426 | ||
453 | #define PSC_SMBCFG_SET_SLV(x) (((x) & 0x7f) << 1) | 427 | #define PSC_SMBCFG_SET_SLV(x) (((x) & 0x7f) << 1) |
454 | 428 | ||
455 | /* SMBus Mask Register. | 429 | /* SMBus Mask Register. */ |
456 | */ | ||
457 | #define PSC_SMBMSK_DN (1 << 30) | 430 | #define PSC_SMBMSK_DN (1 << 30) |
458 | #define PSC_SMBMSK_AN (1 << 29) | 431 | #define PSC_SMBMSK_AN (1 << 29) |
459 | #define PSC_SMBMSK_AL (1 << 28) | 432 | #define PSC_SMBMSK_AL (1 << 28) |
@@ -471,13 +444,11 @@ typedef struct psc_smb { | |||
471 | PSC_SMBMSK_TU | PSC_SMBMSK_SD | \ | 444 | PSC_SMBMSK_TU | PSC_SMBMSK_SD | \ |
472 | PSC_SMBMSK_MD) | 445 | PSC_SMBMSK_MD) |
473 | 446 | ||
474 | /* SMBus Protocol Control Register. | 447 | /* SMBus Protocol Control Register. */ |
475 | */ | ||
476 | #define PSC_SMBPCR_DC (1 << 2) | 448 | #define PSC_SMBPCR_DC (1 << 2) |
477 | #define PSC_SMBPCR_MS (1 << 0) | 449 | #define PSC_SMBPCR_MS (1 << 0) |
478 | 450 | ||
479 | /* SMBus Status register (read only). | 451 | /* SMBus Status register (read only). */ |
480 | */ | ||
481 | #define PSC_SMBSTAT_BB (1 << 28) | 452 | #define PSC_SMBSTAT_BB (1 << 28) |
482 | #define PSC_SMBSTAT_RF (1 << 13) | 453 | #define PSC_SMBSTAT_RF (1 << 13) |
483 | #define PSC_SMBSTAT_RE (1 << 12) | 454 | #define PSC_SMBSTAT_RE (1 << 12) |
@@ -491,8 +462,7 @@ typedef struct psc_smb { | |||
491 | #define PSC_SMBSTAT_DR (1 << 1) | 462 | #define PSC_SMBSTAT_DR (1 << 1) |
492 | #define PSC_SMBSTAT_SR (1 << 0) | 463 | #define PSC_SMBSTAT_SR (1 << 0) |
493 | 464 | ||
494 | /* SMBus Event Register. | 465 | /* SMBus Event Register. */ |
495 | */ | ||
496 | #define PSC_SMBEVNT_DN (1 << 30) | 466 | #define PSC_SMBEVNT_DN (1 << 30) |
497 | #define PSC_SMBEVNT_AN (1 << 29) | 467 | #define PSC_SMBEVNT_AN (1 << 29) |
498 | #define PSC_SMBEVNT_AL (1 << 28) | 468 | #define PSC_SMBEVNT_AL (1 << 28) |
@@ -510,15 +480,13 @@ typedef struct psc_smb { | |||
510 | PSC_SMBEVNT_TU | PSC_SMBEVNT_SD | \ | 480 | PSC_SMBEVNT_TU | PSC_SMBEVNT_SD | \ |
511 | PSC_SMBEVNT_MD) | 481 | PSC_SMBEVNT_MD) |
512 | 482 | ||
513 | /* Transmit register control. | 483 | /* Transmit register control. */ |
514 | */ | ||
515 | #define PSC_SMBTXRX_RSR (1 << 28) | 484 | #define PSC_SMBTXRX_RSR (1 << 28) |
516 | #define PSC_SMBTXRX_STP (1 << 29) | 485 | #define PSC_SMBTXRX_STP (1 << 29) |
517 | #define PSC_SMBTXRX_DATAMASK (0xff) | 486 | #define PSC_SMBTXRX_DATAMASK 0xff |
518 | 487 | ||
519 | /* SMBus protocol timers register. | 488 | /* SMBus protocol timers register. */ |
520 | */ | 489 | #define PSC_SMBTMR_SET_TH(x) (((x) & 0x03) << 30) |
521 | #define PSC_SMBTMR_SET_TH(x) (((x) & 0x3) << 30) | ||
522 | #define PSC_SMBTMR_SET_PS(x) (((x) & 0x1f) << 25) | 490 | #define PSC_SMBTMR_SET_PS(x) (((x) & 0x1f) << 25) |
523 | #define PSC_SMBTMR_SET_PU(x) (((x) & 0x1f) << 20) | 491 | #define PSC_SMBTMR_SET_PU(x) (((x) & 0x1f) << 20) |
524 | #define PSC_SMBTMR_SET_SH(x) (((x) & 0x1f) << 15) | 492 | #define PSC_SMBTMR_SET_SH(x) (((x) & 0x1f) << 15) |
@@ -526,5 +494,4 @@ typedef struct psc_smb { | |||
526 | #define PSC_SMBTMR_SET_CL(x) (((x) & 0x1f) << 5) | 494 | #define PSC_SMBTMR_SET_CL(x) (((x) & 0x1f) << 5) |
527 | #define PSC_SMBTMR_SET_CH(x) (((x) & 0x1f) << 0) | 495 | #define PSC_SMBTMR_SET_CH(x) (((x) & 0x1f) << 0) |
528 | 496 | ||
529 | |||
530 | #endif /* _AU1000_PSC_H_ */ | 497 | #endif /* _AU1000_PSC_H_ */ |
diff --git a/include/asm-mips/mach-db1x00/db1200.h b/include/asm-mips/mach-db1x00/db1200.h index eedd048a7261..27f26102b1bb 100644 --- a/include/asm-mips/mach-db1x00/db1200.h +++ b/include/asm-mips/mach-db1x00/db1200.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * AMD Alchemy DB1200 Referrence Board | 2 | * AMD Alchemy DBAu1200 Reference Board |
3 | * Board Registers defines. | 3 | * Board register defines. |
4 | * | 4 | * |
5 | * ######################################################################## | 5 | * ######################################################################## |
6 | * | 6 | * |
@@ -27,26 +27,25 @@ | |||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <asm/mach-au1x00/au1xxx_psc.h> | 28 | #include <asm/mach-au1x00/au1xxx_psc.h> |
29 | 29 | ||
30 | // This is defined in au1000.h with bogus value | 30 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX |
31 | #undef AU1X00_EXTERNAL_INT | 31 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX |
32 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX | ||
33 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX | ||
32 | 34 | ||
33 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX | 35 | /* |
34 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX | 36 | * SPI and SMB are muxed on the DBAu1200 board. |
35 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX | 37 | * Refer to board documentation. |
36 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX | ||
37 | |||
38 | /* SPI and SMB are muxed on the Pb1200 board. | ||
39 | Refer to board documentation. | ||
40 | */ | 38 | */ |
41 | #define SPI_PSC_BASE PSC0_BASE_ADDR | 39 | #define SPI_PSC_BASE PSC0_BASE_ADDR |
42 | #define SMBUS_PSC_BASE PSC0_BASE_ADDR | 40 | #define SMBUS_PSC_BASE PSC0_BASE_ADDR |
43 | /* AC97 and I2S are muxed on the Pb1200 board. | 41 | /* |
44 | Refer to board documentation. | 42 | * AC'97 and I2S are muxed on the DBAu1200 board. |
43 | * Refer to board documentation. | ||
45 | */ | 44 | */ |
46 | #define AC97_PSC_BASE PSC1_BASE_ADDR | 45 | #define AC97_PSC_BASE PSC1_BASE_ADDR |
47 | #define I2S_PSC_BASE PSC1_BASE_ADDR | 46 | #define I2S_PSC_BASE PSC1_BASE_ADDR |
48 | 47 | ||
49 | #define BCSR_KSEG1_ADDR 0xB9800000 | 48 | #define BCSR_KSEG1_ADDR 0xB9800000 |
50 | 49 | ||
51 | typedef volatile struct | 50 | typedef volatile struct |
52 | { | 51 | { |
@@ -102,9 +101,9 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
102 | #define BCSR_STATUS_SWAPBOOT 0x0040 | 101 | #define BCSR_STATUS_SWAPBOOT 0x0040 |
103 | #define BCSR_STATUS_FLASHBUSY 0x0100 | 102 | #define BCSR_STATUS_FLASHBUSY 0x0100 |
104 | #define BCSR_STATUS_IDECBLID 0x0200 | 103 | #define BCSR_STATUS_IDECBLID 0x0200 |
105 | #define BCSR_STATUS_SD0WP 0x0400 | 104 | #define BCSR_STATUS_SD0WP 0x0400 |
106 | #define BCSR_STATUS_U0RXD 0x1000 | 105 | #define BCSR_STATUS_U0RXD 0x1000 |
107 | #define BCSR_STATUS_U1RXD 0x2000 | 106 | #define BCSR_STATUS_U1RXD 0x2000 |
108 | 107 | ||
109 | #define BCSR_SWITCHES_OCTAL 0x00FF | 108 | #define BCSR_SWITCHES_OCTAL 0x00FF |
110 | #define BCSR_SWITCHES_DIP_1 0x0080 | 109 | #define BCSR_SWITCHES_DIP_1 0x0080 |
@@ -122,8 +121,8 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
122 | #define BCSR_RESETS_DC 0x0004 | 121 | #define BCSR_RESETS_DC 0x0004 |
123 | #define BCSR_RESETS_IDE 0x0008 | 122 | #define BCSR_RESETS_IDE 0x0008 |
124 | #define BCSR_RESETS_TV 0x0010 | 123 | #define BCSR_RESETS_TV 0x0010 |
125 | /* not resets but in the same register */ | 124 | /* Not resets but in the same register */ |
126 | #define BCSR_RESETS_PWMR1mUX 0x0800 | 125 | #define BCSR_RESETS_PWMR1MUX 0x0800 |
127 | #define BCSR_RESETS_PCS0MUX 0x1000 | 126 | #define BCSR_RESETS_PCS0MUX 0x1000 |
128 | #define BCSR_RESETS_PCS1MUX 0x2000 | 127 | #define BCSR_RESETS_PCS1MUX 0x2000 |
129 | #define BCSR_RESETS_SPISEL 0x4000 | 128 | #define BCSR_RESETS_SPISEL 0x4000 |
@@ -160,7 +159,7 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
160 | #define BCSR_INT_PC0STSCHG 0x0008 | 159 | #define BCSR_INT_PC0STSCHG 0x0008 |
161 | #define BCSR_INT_PC1 0x0010 | 160 | #define BCSR_INT_PC1 0x0010 |
162 | #define BCSR_INT_PC1STSCHG 0x0020 | 161 | #define BCSR_INT_PC1STSCHG 0x0020 |
163 | #define BCSR_INT_DC 0x0040 | 162 | #define BCSR_INT_DC 0x0040 |
164 | #define BCSR_INT_FLASHBUSY 0x0080 | 163 | #define BCSR_INT_FLASHBUSY 0x0080 |
165 | #define BCSR_INT_PC0INSERT 0x0100 | 164 | #define BCSR_INT_PC0INSERT 0x0100 |
166 | #define BCSR_INT_PC0EJECT 0x0200 | 165 | #define BCSR_INT_PC0EJECT 0x0200 |
@@ -179,10 +178,10 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
179 | #define IDE_DDMA_REQ DSCR_CMD0_DMA_REQ1 | 178 | #define IDE_DDMA_REQ DSCR_CMD0_DMA_REQ1 |
180 | #define IDE_RQSIZE 128 | 179 | #define IDE_RQSIZE 128 |
181 | 180 | ||
182 | #define NAND_PHYS_ADDR 0x20000000 | 181 | #define NAND_PHYS_ADDR 0x20000000 |
183 | 182 | ||
184 | /* | 183 | /* |
185 | * External Interrupts for Pb1200 as of 8/6/2004. | 184 | * External Interrupts for DBAu1200 as of 8/6/2004. |
186 | * Bit positions in the CPLD registers can be calculated by taking | 185 | * Bit positions in the CPLD registers can be calculated by taking |
187 | * the interrupt define and subtracting the DB1200_INT_BEGIN value. | 186 | * the interrupt define and subtracting the DB1200_INT_BEGIN value. |
188 | * | 187 | * |
@@ -211,23 +210,21 @@ enum external_pb1200_ints { | |||
211 | }; | 210 | }; |
212 | 211 | ||
213 | 212 | ||
214 | /* For drivers/pcmcia/au1000_db1x00.c */ | 213 | /* |
215 | 214 | * DBAu1200 specific PCMCIA defines for drivers/pcmcia/au1000_db1x00.c | |
216 | /* PCMCIA Db1x00 specific defines */ | 215 | */ |
217 | 216 | #define PCMCIA_MAX_SOCK 1 | |
218 | #define PCMCIA_MAX_SOCK 1 | 217 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) |
219 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | ||
220 | 218 | ||
221 | /* VPP/VCC */ | 219 | /* VPP/VCC */ |
222 | #define SET_VCC_VPP(VCC, VPP, SLOT)\ | 220 | #define SET_VCC_VPP(VCC, VPP, SLOT) \ |
223 | ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8)) | 221 | ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8)) |
224 | 222 | ||
225 | #define BOARD_PC0_INT DB1200_PC0_INT | 223 | #define BOARD_PC0_INT DB1200_PC0_INT |
226 | #define BOARD_PC1_INT DB1200_PC1_INT | 224 | #define BOARD_PC1_INT DB1200_PC1_INT |
227 | #define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET))) | 225 | #define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1 << (8 + (2 * SOCKET))) |
228 | 226 | ||
229 | /* Nand chip select */ | 227 | /* NAND chip select */ |
230 | #define NAND_CS 1 | 228 | #define NAND_CS 1 |
231 | 229 | ||
232 | #endif /* __ASM_DB1200_H */ | 230 | #endif /* __ASM_DB1200_H */ |
233 | |||
diff --git a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h index e7a88ba35833..612ae90dbcb8 100644 --- a/include/asm-mips/mach-db1x00/db1x00.h +++ b/include/asm-mips/mach-db1x00/db1x00.h | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * AMD Alchemy DB1x00 Reference Boards | 2 | * AMD Alchemy DBAu1x00 Reference Boards |
3 | * | 3 | * |
4 | * Copyright 2001 MontaVista Software Inc. | 4 | * Copyright 2001, 2008 MontaVista Software Inc. |
5 | * Author: MontaVista Software, Inc. | 5 | * Author: MontaVista Software, Inc. <source@mvista.com> |
6 | * ppopov@mvista.com or source@mvista.com | ||
7 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) | 6 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) |
8 | * | 7 | * |
9 | * ######################################################################## | 8 | * ######################################################################## |
@@ -32,26 +31,26 @@ | |||
32 | 31 | ||
33 | #ifdef CONFIG_MIPS_DB1550 | 32 | #ifdef CONFIG_MIPS_DB1550 |
34 | 33 | ||
35 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX | 34 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX |
36 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX | 35 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX |
37 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX | 36 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX |
38 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX | 37 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX |
39 | 38 | ||
40 | #define SPI_PSC_BASE PSC0_BASE_ADDR | 39 | #define SPI_PSC_BASE PSC0_BASE_ADDR |
41 | #define AC97_PSC_BASE PSC1_BASE_ADDR | 40 | #define AC97_PSC_BASE PSC1_BASE_ADDR |
42 | #define SMBUS_PSC_BASE PSC2_BASE_ADDR | 41 | #define SMBUS_PSC_BASE PSC2_BASE_ADDR |
43 | #define I2S_PSC_BASE PSC3_BASE_ADDR | 42 | #define I2S_PSC_BASE PSC3_BASE_ADDR |
44 | 43 | ||
45 | #define BCSR_KSEG1_ADDR 0xAF000000 | 44 | #define BCSR_KSEG1_ADDR 0xAF000000 |
46 | #define NAND_PHYS_ADDR 0x20000000 | 45 | #define NAND_PHYS_ADDR 0x20000000 |
47 | 46 | ||
48 | #else | 47 | #else |
49 | #define BCSR_KSEG1_ADDR 0xAE000000 | 48 | #define BCSR_KSEG1_ADDR 0xAE000000 |
50 | #endif | 49 | #endif |
51 | 50 | ||
52 | /* | 51 | /* |
53 | * Overlay data structure of the Db1x00 board registers. | 52 | * Overlay data structure of the DBAu1x00 board registers. |
54 | * Registers located at physical 0E0000xx, KSEG1 0xAE0000xx | 53 | * Registers are located at physical 0E0000xx, KSEG1 0xAE0000xx. |
55 | */ | 54 | */ |
56 | typedef volatile struct | 55 | typedef volatile struct |
57 | { | 56 | { |
@@ -138,18 +137,19 @@ typedef volatile struct | |||
138 | 137 | ||
139 | #define BCSR_SWRESET_RESET 0x0080 | 138 | #define BCSR_SWRESET_RESET 0x0080 |
140 | 139 | ||
141 | /* PCMCIA Db1x00 specific defines */ | 140 | /* PCMCIA DBAu1x00 specific defines */ |
142 | #define PCMCIA_MAX_SOCK 1 | 141 | #define PCMCIA_MAX_SOCK 1 |
143 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | 142 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) |
144 | 143 | ||
145 | /* VPP/VCC */ | 144 | /* VPP/VCC */ |
146 | #define SET_VCC_VPP(VCC, VPP, SLOT)\ | 145 | #define SET_VCC_VPP(VCC, VPP, SLOT)\ |
147 | ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8)) | 146 | ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8)) |
148 | 147 | ||
149 | /* SD controller macros */ | ||
150 | /* | 148 | /* |
151 | * Detect card. | 149 | * SD controller macros |
152 | */ | 150 | */ |
151 | |||
152 | /* Detect card. */ | ||
153 | #define mmc_card_inserted(_n_, _res_) \ | 153 | #define mmc_card_inserted(_n_, _res_) \ |
154 | do { \ | 154 | do { \ |
155 | BCSR * const bcsr = (BCSR *)0xAE000000; \ | 155 | BCSR * const bcsr = (BCSR *)0xAE000000; \ |
@@ -176,10 +176,10 @@ typedef volatile struct | |||
176 | unsigned long mmc_pwr, mmc_wp, board_specific; \ | 176 | unsigned long mmc_pwr, mmc_wp, board_specific; \ |
177 | if ((_n_)) { \ | 177 | if ((_n_)) { \ |
178 | mmc_pwr = BCSR_BOARD_SD1_PWR; \ | 178 | mmc_pwr = BCSR_BOARD_SD1_PWR; \ |
179 | mmc_wp = BCSR_BOARD_SD1_WP; \ | 179 | mmc_wp = BCSR_BOARD_SD1_WP; \ |
180 | } else { \ | 180 | } else { \ |
181 | mmc_pwr = BCSR_BOARD_SD0_PWR; \ | 181 | mmc_pwr = BCSR_BOARD_SD0_PWR; \ |
182 | mmc_wp = BCSR_BOARD_SD0_WP; \ | 182 | mmc_wp = BCSR_BOARD_SD0_WP; \ |
183 | } \ | 183 | } \ |
184 | board_specific = au_readl((unsigned long)(&bcsr->specific)); \ | 184 | board_specific = au_readl((unsigned long)(&bcsr->specific)); \ |
185 | if (!(board_specific & mmc_wp)) {/* low means card present */ \ | 185 | if (!(board_specific & mmc_wp)) {/* low means card present */ \ |
@@ -190,17 +190,19 @@ typedef volatile struct | |||
190 | } while (0) | 190 | } while (0) |
191 | 191 | ||
192 | 192 | ||
193 | /* NAND defines */ | 193 | /* |
194 | /* Timing values as described in databook, * ns value stripped of | 194 | * NAND defines |
195 | * | ||
196 | * Timing values as described in databook, * ns value stripped of the | ||
195 | * lower 2 bits. | 197 | * lower 2 bits. |
196 | * These defines are here rather than an SOC1550 generic file because | 198 | * These defines are here rather than an Au1550 generic file because |
197 | * the parts chosen on another board may be different and may require | 199 | * the parts chosen on another board may be different and may require |
198 | * different timings. | 200 | * different timings. |
199 | */ | 201 | */ |
200 | #define NAND_T_H (18 >> 2) | 202 | #define NAND_T_H (18 >> 2) |
201 | #define NAND_T_PUL (30 >> 2) | 203 | #define NAND_T_PUL (30 >> 2) |
202 | #define NAND_T_SU (30 >> 2) | 204 | #define NAND_T_SU (30 >> 2) |
203 | #define NAND_T_WH (30 >> 2) | 205 | #define NAND_T_WH (30 >> 2) |
204 | 206 | ||
205 | /* Bitfield shift amounts */ | 207 | /* Bitfield shift amounts */ |
206 | #define NAND_T_H_SHIFT 0 | 208 | #define NAND_T_H_SHIFT 0 |
@@ -208,16 +210,15 @@ typedef volatile struct | |||
208 | #define NAND_T_SU_SHIFT 8 | 210 | #define NAND_T_SU_SHIFT 8 |
209 | #define NAND_T_WH_SHIFT 12 | 211 | #define NAND_T_WH_SHIFT 12 |
210 | 212 | ||
211 | #define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ | 213 | #define NAND_TIMING (((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ |
212 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ | 214 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ |
213 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ | 215 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ |
214 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT) | 216 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)) |
215 | #define NAND_CS 1 | 217 | #define NAND_CS 1 |
216 | 218 | ||
217 | /* should be done by yamon */ | 219 | /* Should be done by YAMON */ |
218 | #define NAND_STCFG 0x00400005 /* 8-bit NAND */ | 220 | #define NAND_STCFG 0x00400005 /* 8-bit NAND */ |
219 | #define NAND_STTIME 0x00007774 /* valid for 396MHz SD=2 only */ | 221 | #define NAND_STTIME 0x00007774 /* valid for 396 MHz SD=2 only */ |
220 | #define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */ | 222 | #define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */ |
221 | 223 | ||
222 | #endif /* __ASM_DB1X00_H */ | 224 | #endif /* __ASM_DB1X00_H */ |
223 | |||
diff --git a/include/asm-mips/mach-pb1x00/pb1000.h b/include/asm-mips/mach-pb1x00/pb1000.h index b52e0e7ee3fb..6d1ff9060e44 100644 --- a/include/asm-mips/mach-pb1x00/pb1000.h +++ b/include/asm-mips/mach-pb1x00/pb1000.h | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Alchemy Semi PB1000 Referrence Board | 2 | * Alchemy Semi Pb1000 Referrence Board |
3 | * | 3 | * |
4 | * Copyright 2001 MontaVista Software Inc. | 4 | * Copyright 2001, 2008 MontaVista Software Inc. |
5 | * Author: MontaVista Software, Inc. | 5 | * Author: MontaVista Software, Inc. <source@mvista.com> |
6 | * ppopov@mvista.com or source@mvista.com | ||
7 | * | 6 | * |
8 | * ######################################################################## | 7 | * ######################################################################## |
9 | * | 8 | * |
@@ -28,145 +27,61 @@ | |||
28 | #define __ASM_PB1000_H | 27 | #define __ASM_PB1000_H |
29 | 28 | ||
30 | /* PCMCIA PB1000 specific defines */ | 29 | /* PCMCIA PB1000 specific defines */ |
31 | #define PCMCIA_MAX_SOCK 1 | 30 | #define PCMCIA_MAX_SOCK 1 |
32 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | 31 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) |
33 | 32 | ||
34 | #define PB1000_PCR 0xBE000000 | 33 | #define PB1000_PCR 0xBE000000 |
35 | # define PCR_SLOT_0_VPP0 (1<<0) | 34 | # define PCR_SLOT_0_VPP0 (1 << 0) |
36 | # define PCR_SLOT_0_VPP1 (1<<1) | 35 | # define PCR_SLOT_0_VPP1 (1 << 1) |
37 | # define PCR_SLOT_0_VCC0 (1<<2) | 36 | # define PCR_SLOT_0_VCC0 (1 << 2) |
38 | # define PCR_SLOT_0_VCC1 (1<<3) | 37 | # define PCR_SLOT_0_VCC1 (1 << 3) |
39 | # define PCR_SLOT_0_RST (1<<4) | 38 | # define PCR_SLOT_0_RST (1 << 4) |
40 | 39 | # define PCR_SLOT_1_VPP0 (1 << 8) | |
41 | # define PCR_SLOT_1_VPP0 (1<<8) | 40 | # define PCR_SLOT_1_VPP1 (1 << 9) |
42 | # define PCR_SLOT_1_VPP1 (1<<9) | 41 | # define PCR_SLOT_1_VCC0 (1 << 10) |
43 | # define PCR_SLOT_1_VCC0 (1<<10) | 42 | # define PCR_SLOT_1_VCC1 (1 << 11) |
44 | # define PCR_SLOT_1_VCC1 (1<<11) | 43 | # define PCR_SLOT_1_RST (1 << 12) |
45 | # define PCR_SLOT_1_RST (1<<12) | 44 | |
46 | 45 | #define PB1000_MDR 0xBE000004 | |
47 | #define PB1000_MDR 0xBE000004 | 46 | # define MDR_PI (1 << 5) /* PCMCIA int latch */ |
48 | # define MDR_PI (1<<5) /* pcmcia int latch */ | 47 | # define MDR_EPI (1 << 14) /* enable PCMCIA int */ |
49 | # define MDR_EPI (1<<14) /* enable pcmcia int */ | 48 | # define MDR_CPI (1 << 15) /* clear PCMCIA int */ |
50 | # define MDR_CPI (1<<15) /* clear pcmcia int */ | 49 | |
51 | 50 | #define PB1000_ACR1 0xBE000008 | |
52 | #define PB1000_ACR1 0xBE000008 | 51 | # define ACR1_SLOT_0_CD1 (1 << 0) /* card detect 1 */ |
53 | # define ACR1_SLOT_0_CD1 (1<<0) /* card detect 1 */ | 52 | # define ACR1_SLOT_0_CD2 (1 << 1) /* card detect 2 */ |
54 | # define ACR1_SLOT_0_CD2 (1<<1) /* card detect 2 */ | 53 | # define ACR1_SLOT_0_READY (1 << 2) /* ready */ |
55 | # define ACR1_SLOT_0_READY (1<<2) /* ready */ | 54 | # define ACR1_SLOT_0_STATUS (1 << 3) /* status change */ |
56 | # define ACR1_SLOT_0_STATUS (1<<3) /* status change */ | 55 | # define ACR1_SLOT_0_VS1 (1 << 4) /* voltage sense 1 */ |
57 | # define ACR1_SLOT_0_VS1 (1<<4) /* voltage sense 1 */ | 56 | # define ACR1_SLOT_0_VS2 (1 << 5) /* voltage sense 2 */ |
58 | # define ACR1_SLOT_0_VS2 (1<<5) /* voltage sense 2 */ | 57 | # define ACR1_SLOT_0_INPACK (1 << 6) /* inpack pin status */ |
59 | # define ACR1_SLOT_0_INPACK (1<<6) /* inpack pin status */ | 58 | # define ACR1_SLOT_1_CD1 (1 << 8) /* card detect 1 */ |
60 | # define ACR1_SLOT_1_CD1 (1<<8) /* card detect 1 */ | 59 | # define ACR1_SLOT_1_CD2 (1 << 9) /* card detect 2 */ |
61 | # define ACR1_SLOT_1_CD2 (1<<9) /* card detect 2 */ | 60 | # define ACR1_SLOT_1_READY (1 << 10) /* ready */ |
62 | # define ACR1_SLOT_1_READY (1<<10) /* ready */ | 61 | # define ACR1_SLOT_1_STATUS (1 << 11) /* status change */ |
63 | # define ACR1_SLOT_1_STATUS (1<<11) /* status change */ | 62 | # define ACR1_SLOT_1_VS1 (1 << 12) /* voltage sense 1 */ |
64 | # define ACR1_SLOT_1_VS1 (1<<12) /* voltage sense 1 */ | 63 | # define ACR1_SLOT_1_VS2 (1 << 13) /* voltage sense 2 */ |
65 | # define ACR1_SLOT_1_VS2 (1<<13) /* voltage sense 2 */ | 64 | # define ACR1_SLOT_1_INPACK (1 << 14) /* inpack pin status */ |
66 | # define ACR1_SLOT_1_INPACK (1<<14) /* inpack pin status */ | 65 | |
67 | 66 | #define CPLD_AUX0 0xBE00000C | |
68 | #define CPLD_AUX0 0xBE00000C | 67 | #define CPLD_AUX1 0xBE000010 |
69 | #define CPLD_AUX1 0xBE000010 | 68 | #define CPLD_AUX2 0xBE000014 |
70 | #define CPLD_AUX2 0xBE000014 | ||
71 | 69 | ||
72 | /* Voltage levels */ | 70 | /* Voltage levels */ |
73 | 71 | ||
74 | /* VPPEN1 - VPPEN0 */ | 72 | /* VPPEN1 - VPPEN0 */ |
75 | #define VPP_GND ((0<<1) | (0<<0)) | 73 | #define VPP_GND ((0 << 1) | (0 << 0)) |
76 | #define VPP_5V ((1<<1) | (0<<0)) | 74 | #define VPP_5V ((1 << 1) | (0 << 0)) |
77 | #define VPP_3V ((0<<1) | (1<<0)) | 75 | #define VPP_3V ((0 << 1) | (1 << 0)) |
78 | #define VPP_12V ((0<<1) | (1<<0)) | 76 | #define VPP_12V ((0 << 1) | (1 << 0)) |
79 | #define VPP_HIZ ((1<<1) | (1<<0)) | 77 | #define VPP_HIZ ((1 << 1) | (1 << 0)) |
80 | 78 | ||
81 | /* VCCEN1 - VCCEN0 */ | 79 | /* VCCEN1 - VCCEN0 */ |
82 | #define VCC_3V ((0<<1) | (1<<0)) | 80 | #define VCC_3V ((0 << 1) | (1 << 0)) |
83 | #define VCC_5V ((1<<1) | (0<<0)) | 81 | #define VCC_5V ((1 << 1) | (0 << 0)) |
84 | #define VCC_HIZ ((0<<1) | (0<<0)) | 82 | #define VCC_HIZ ((0 << 1) | (0 << 0)) |
85 | 83 | ||
86 | /* VPP/VCC */ | 84 | /* VPP/VCC */ |
87 | #define SET_VCC_VPP(VCC, VPP, SLOT)\ | 85 | #define SET_VCC_VPP(VCC, VPP, SLOT) \ |
88 | ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8)) | 86 | ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8)) |
89 | |||
90 | |||
91 | /* PCI PB1000 specific defines */ | ||
92 | /* The reason these defines are here instead of au1000.h is because | ||
93 | * the Au1000 does not have a PCI bus controller so the PCI implementation | ||
94 | * on the some of the older Pb1000 boards was very board specific. | ||
95 | */ | ||
96 | #define PCI_CONFIG_BASE 0xBA020000 /* the only external slot */ | ||
97 | |||
98 | #define SDRAM_DEVID 0xBA010000 | ||
99 | #define SDRAM_CMD 0xBA010004 | ||
100 | #define SDRAM_CLASS 0xBA010008 | ||
101 | #define SDRAM_MISC 0xBA01000C | ||
102 | #define SDRAM_MBAR 0xBA010010 | ||
103 | |||
104 | #define PCI_IO_DATA_PORT 0xBA800000 | ||
105 | |||
106 | #define PCI_IO_ADDR 0xBE00001C | ||
107 | #define PCI_INT_ACK 0xBBC00000 | ||
108 | #define PCI_IO_READ 0xBBC00020 | ||
109 | #define PCI_IO_WRITE 0xBBC00030 | ||
110 | |||
111 | #define PCI_BRIDGE_CONFIG 0xBE000018 | ||
112 | |||
113 | #define PCI_IO_START 0x10000000 | ||
114 | #define PCI_IO_END 0x1000ffff | ||
115 | #define PCI_MEM_START 0x18000000 | ||
116 | #define PCI_MEM_END 0x18ffffff | ||
117 | |||
118 | #define PCI_FIRST_DEVFN 0 | ||
119 | #define PCI_LAST_DEVFN 1 | ||
120 | |||
121 | static inline u8 au_pci_io_readb(u32 addr) | ||
122 | { | ||
123 | writel(addr, PCI_IO_ADDR); | ||
124 | writel((readl(PCI_BRIDGE_CONFIG) & 0xffffcfff) | (1<<12), PCI_BRIDGE_CONFIG); | ||
125 | return (readl(PCI_IO_DATA_PORT) & 0xff); | ||
126 | } | ||
127 | |||
128 | static inline u16 au_pci_io_readw(u32 addr) | ||
129 | { | ||
130 | writel(addr, PCI_IO_ADDR); | ||
131 | writel((readl(PCI_BRIDGE_CONFIG) & 0xffffcfff) | (1<<13), PCI_BRIDGE_CONFIG); | ||
132 | return (readl(PCI_IO_DATA_PORT) & 0xffff); | ||
133 | } | ||
134 | |||
135 | static inline u32 au_pci_io_readl(u32 addr) | ||
136 | { | ||
137 | writel(addr, PCI_IO_ADDR); | ||
138 | writel((readl(PCI_BRIDGE_CONFIG) & 0xffffcfff), PCI_BRIDGE_CONFIG); | ||
139 | return readl(PCI_IO_DATA_PORT); | ||
140 | } | ||
141 | |||
142 | static inline void au_pci_io_writeb(u8 val, u32 addr) | ||
143 | { | ||
144 | writel(addr, PCI_IO_ADDR); | ||
145 | writel((readl(PCI_BRIDGE_CONFIG) & 0xffffcfff) | (1<<12), PCI_BRIDGE_CONFIG); | ||
146 | writel(val, PCI_IO_DATA_PORT); | ||
147 | } | ||
148 | |||
149 | static inline void au_pci_io_writew(u16 val, u32 addr) | ||
150 | { | ||
151 | writel(addr, PCI_IO_ADDR); | ||
152 | writel((readl(PCI_BRIDGE_CONFIG) & 0xffffcfff) | (1<<13), PCI_BRIDGE_CONFIG); | ||
153 | writel(val, PCI_IO_DATA_PORT); | ||
154 | } | ||
155 | |||
156 | static inline void au_pci_io_writel(u32 val, u32 addr) | ||
157 | { | ||
158 | writel(addr, PCI_IO_ADDR); | ||
159 | writel(readl(PCI_BRIDGE_CONFIG) & 0xffffcfff, PCI_BRIDGE_CONFIG); | ||
160 | writel(val, PCI_IO_DATA_PORT); | ||
161 | } | ||
162 | |||
163 | static inline void set_sdram_extbyte(void) | ||
164 | { | ||
165 | writel(readl(PCI_BRIDGE_CONFIG) & 0xffffff00, PCI_BRIDGE_CONFIG); | ||
166 | } | ||
167 | |||
168 | static inline void set_slot_extbyte(void) | ||
169 | { | ||
170 | writel((readl(PCI_BRIDGE_CONFIG) & 0xffffbf00) | 0x18, PCI_BRIDGE_CONFIG); | ||
171 | } | ||
172 | #endif /* __ASM_PB1000_H */ | 87 | #endif /* __ASM_PB1000_H */ |
diff --git a/include/asm-mips/mach-pb1x00/pb1100.h b/include/asm-mips/mach-pb1x00/pb1100.h index 63aa3926b297..b1a60f1cbd02 100644 --- a/include/asm-mips/mach-pb1x00/pb1100.h +++ b/include/asm-mips/mach-pb1x00/pb1100.h | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Alchemy Semi PB1100 Referrence Board | 2 | * Alchemy Semi Pb1100 Referrence Board |
3 | * | 3 | * |
4 | * Copyright 2001 MontaVista Software Inc. | 4 | * Copyright 2001, 2008 MontaVista Software Inc. |
5 | * Author: MontaVista Software, Inc. | 5 | * Author: MontaVista Software, Inc. <source@mvista.com> |
6 | * ppopov@mvista.com or source@mvista.com | ||
7 | * | 6 | * |
8 | * ######################################################################## | 7 | * ######################################################################## |
9 | * | 8 | * |
@@ -27,59 +26,60 @@ | |||
27 | #ifndef __ASM_PB1100_H | 26 | #ifndef __ASM_PB1100_H |
28 | #define __ASM_PB1100_H | 27 | #define __ASM_PB1100_H |
29 | 28 | ||
30 | #define PB1100_IDENT 0xAE000000 | 29 | #define PB1100_IDENT 0xAE000000 |
31 | #define BOARD_STATUS_REG 0xAE000004 | 30 | #define BOARD_STATUS_REG 0xAE000004 |
32 | # define PB1100_ROM_SEL (1<<15) | 31 | # define PB1100_ROM_SEL (1 << 15) |
33 | # define PB1100_ROM_SIZ (1<<14) | 32 | # define PB1100_ROM_SIZ (1 << 14) |
34 | # define PB1100_SWAP_BOOT (1<<13) | 33 | # define PB1100_SWAP_BOOT (1 << 13) |
35 | # define PB1100_FLASH_WP (1<<12) | 34 | # define PB1100_FLASH_WP (1 << 12) |
36 | # define PB1100_ROM_H_STS (1<<11) | 35 | # define PB1100_ROM_H_STS (1 << 11) |
37 | # define PB1100_ROM_L_STS (1<<10) | 36 | # define PB1100_ROM_L_STS (1 << 10) |
38 | # define PB1100_FLASH_H_STS (1<<9) | 37 | # define PB1100_FLASH_H_STS (1 << 9) |
39 | # define PB1100_FLASH_L_STS (1<<8) | 38 | # define PB1100_FLASH_L_STS (1 << 8) |
40 | # define PB1100_SRAM_SIZ (1<<7) | 39 | # define PB1100_SRAM_SIZ (1 << 7) |
41 | # define PB1100_TSC_BUSY (1<<6) | 40 | # define PB1100_TSC_BUSY (1 << 6) |
42 | # define PB1100_PCMCIA_VS_MASK (3<<4) | 41 | # define PB1100_PCMCIA_VS_MASK (3 << 4) |
43 | # define PB1100_RS232_CD (1<<3) | 42 | # define PB1100_RS232_CD (1 << 3) |
44 | # define PB1100_RS232_CTS (1<<2) | 43 | # define PB1100_RS232_CTS (1 << 2) |
45 | # define PB1100_RS232_DSR (1<<1) | 44 | # define PB1100_RS232_DSR (1 << 1) |
46 | # define PB1100_RS232_RI (1<<0) | 45 | # define PB1100_RS232_RI (1 << 0) |
47 | 46 | ||
48 | #define PB1100_IRDA_RS232 0xAE00000C | 47 | #define PB1100_IRDA_RS232 0xAE00000C |
49 | # define PB1100_IRDA_FULL (0<<14) /* full power */ | 48 | # define PB1100_IRDA_FULL (0 << 14) /* full power */ |
50 | # define PB1100_IRDA_SHUTDOWN (1<<14) | 49 | # define PB1100_IRDA_SHUTDOWN (1 << 14) |
51 | # define PB1100_IRDA_TT (2<<14) /* 2/3 power */ | 50 | # define PB1100_IRDA_TT (2 << 14) /* 2/3 power */ |
52 | # define PB1100_IRDA_OT (3<<14) /* 1/3 power */ | 51 | # define PB1100_IRDA_OT (3 << 14) /* 1/3 power */ |
53 | # define PB1100_IRDA_FIR (1<<13) | 52 | # define PB1100_IRDA_FIR (1 << 13) |
54 | 53 | ||
55 | #define PCMCIA_BOARD_REG 0xAE000010 | 54 | #define PCMCIA_BOARD_REG 0xAE000010 |
56 | # define PB1100_SD_WP1_RO (1<<15) /* read only */ | 55 | # define PB1100_SD_WP1_RO (1 << 15) /* read only */ |
57 | # define PB1100_SD_WP0_RO (1<<14) /* read only */ | 56 | # define PB1100_SD_WP0_RO (1 << 14) /* read only */ |
58 | # define PB1100_SD_PWR1 (1<<11) /* applies power to SD1 */ | 57 | # define PB1100_SD_PWR1 (1 << 11) /* applies power to SD1 */ |
59 | # define PB1100_SD_PWR0 (1<<10) /* applies power to SD0 */ | 58 | # define PB1100_SD_PWR0 (1 << 10) /* applies power to SD0 */ |
60 | # define PB1100_SEL_SD_CONN1 (1<<9) | 59 | # define PB1100_SEL_SD_CONN1 (1 << 9) |
61 | # define PB1100_SEL_SD_CONN0 (1<<8) | 60 | # define PB1100_SEL_SD_CONN0 (1 << 8) |
62 | # define PC_DEASSERT_RST (1<<7) | 61 | # define PC_DEASSERT_RST (1 << 7) |
63 | # define PC_DRV_EN (1<<4) | 62 | # define PC_DRV_EN (1 << 4) |
64 | 63 | ||
65 | #define PB1100_G_CONTROL 0xAE000014 /* graphics control */ | 64 | #define PB1100_G_CONTROL 0xAE000014 /* graphics control */ |
66 | 65 | ||
67 | #define PB1100_RST_VDDI 0xAE00001C | 66 | #define PB1100_RST_VDDI 0xAE00001C |
68 | # define PB1100_SOFT_RESET (1<<15) /* clear to reset the board */ | 67 | # define PB1100_SOFT_RESET (1 << 15) /* clear to reset the board */ |
69 | # define PB1100_VDDI_MASK (0x1F) | 68 | # define PB1100_VDDI_MASK 0x1F |
70 | 69 | ||
71 | #define PB1100_LEDS 0xAE000018 | 70 | #define PB1100_LEDS 0xAE000018 |
72 | 71 | ||
73 | /* 11:8 is 4 discreet LEDs. Clearing a bit illuminates the LED. | 72 | /* |
74 | * 7:0 is the LED Display's decimal points. | 73 | * 11:8 is 4 discreet LEDs. Clearing a bit illuminates the LED. |
74 | * 7:0 is the LED Display's decimal points. | ||
75 | */ | 75 | */ |
76 | #define PB1100_HEX_LED 0xAE000018 | 76 | #define PB1100_HEX_LED 0xAE000018 |
77 | 77 | ||
78 | /* PCMCIA PB1100 specific defines */ | 78 | /* PCMCIA Pb1100 specific defines */ |
79 | #define PCMCIA_MAX_SOCK 0 | 79 | #define PCMCIA_MAX_SOCK 0 |
80 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | 80 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) |
81 | 81 | ||
82 | /* VPP/VCC */ | 82 | /* VPP/VCC */ |
83 | #define SET_VCC_VPP(VCC, VPP) (((VCC)<<2) | ((VPP)<<0)) | 83 | #define SET_VCC_VPP(VCC, VPP) (((VCC) << 2) | ((VPP) << 0)) |
84 | 84 | ||
85 | #endif /* __ASM_PB1100_H */ | 85 | #endif /* __ASM_PB1100_H */ |
diff --git a/include/asm-mips/mach-pb1x00/pb1200.h b/include/asm-mips/mach-pb1x00/pb1200.h index e2c6bcac3b42..c8618df88cb5 100644 --- a/include/asm-mips/mach-pb1x00/pb1200.h +++ b/include/asm-mips/mach-pb1x00/pb1200.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * AMD Alchemy PB1200 Referrence Board | 2 | * AMD Alchemy Pb1200 Referrence Board |
3 | * Board Registers defines. | 3 | * Board Registers defines. |
4 | * | 4 | * |
5 | * ######################################################################## | 5 | * ######################################################################## |
@@ -27,21 +27,20 @@ | |||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <asm/mach-au1x00/au1xxx_psc.h> | 28 | #include <asm/mach-au1x00/au1xxx_psc.h> |
29 | 29 | ||
30 | // This is defined in au1000.h with bogus value | 30 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX |
31 | #undef AU1X00_EXTERNAL_INT | 31 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX |
32 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX | ||
33 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX | ||
32 | 34 | ||
33 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX | 35 | /* |
34 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX | 36 | * SPI and SMB are muxed on the Pb1200 board. |
35 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX | 37 | * Refer to board documentation. |
36 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX | ||
37 | |||
38 | /* SPI and SMB are muxed on the Pb1200 board. | ||
39 | Refer to board documentation. | ||
40 | */ | 38 | */ |
41 | #define SPI_PSC_BASE PSC0_BASE_ADDR | 39 | #define SPI_PSC_BASE PSC0_BASE_ADDR |
42 | #define SMBUS_PSC_BASE PSC0_BASE_ADDR | 40 | #define SMBUS_PSC_BASE PSC0_BASE_ADDR |
43 | /* AC97 and I2S are muxed on the Pb1200 board. | 41 | /* |
44 | Refer to board documentation. | 42 | * AC97 and I2S are muxed on the Pb1200 board. |
43 | * Refer to board documentation. | ||
45 | */ | 44 | */ |
46 | #define AC97_PSC_BASE PSC1_BASE_ADDR | 45 | #define AC97_PSC_BASE PSC1_BASE_ADDR |
47 | #define I2S_PSC_BASE PSC1_BASE_ADDR | 46 | #define I2S_PSC_BASE PSC1_BASE_ADDR |
@@ -102,10 +101,10 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
102 | #define BCSR_STATUS_SWAPBOOT 0x0040 | 101 | #define BCSR_STATUS_SWAPBOOT 0x0040 |
103 | #define BCSR_STATUS_FLASHBUSY 0x0100 | 102 | #define BCSR_STATUS_FLASHBUSY 0x0100 |
104 | #define BCSR_STATUS_IDECBLID 0x0200 | 103 | #define BCSR_STATUS_IDECBLID 0x0200 |
105 | #define BCSR_STATUS_SD0WP 0x0400 | 104 | #define BCSR_STATUS_SD0WP 0x0400 |
106 | #define BCSR_STATUS_SD1WP 0x0800 | 105 | #define BCSR_STATUS_SD1WP 0x0800 |
107 | #define BCSR_STATUS_U0RXD 0x1000 | 106 | #define BCSR_STATUS_U0RXD 0x1000 |
108 | #define BCSR_STATUS_U1RXD 0x2000 | 107 | #define BCSR_STATUS_U1RXD 0x2000 |
109 | 108 | ||
110 | #define BCSR_SWITCHES_OCTAL 0x00FF | 109 | #define BCSR_SWITCHES_OCTAL 0x00FF |
111 | #define BCSR_SWITCHES_DIP_1 0x0080 | 110 | #define BCSR_SWITCHES_DIP_1 0x0080 |
@@ -123,11 +122,11 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
123 | #define BCSR_RESETS_DC 0x0004 | 122 | #define BCSR_RESETS_DC 0x0004 |
124 | #define BCSR_RESETS_IDE 0x0008 | 123 | #define BCSR_RESETS_IDE 0x0008 |
125 | /* not resets but in the same register */ | 124 | /* not resets but in the same register */ |
126 | #define BCSR_RESETS_WSCFSM 0x0800 | 125 | #define BCSR_RESETS_WSCFSM 0x0800 |
127 | #define BCSR_RESETS_PCS0MUX 0x1000 | 126 | #define BCSR_RESETS_PCS0MUX 0x1000 |
128 | #define BCSR_RESETS_PCS1MUX 0x2000 | 127 | #define BCSR_RESETS_PCS1MUX 0x2000 |
129 | #define BCSR_RESETS_SPISEL 0x4000 | 128 | #define BCSR_RESETS_SPISEL 0x4000 |
130 | #define BCSR_RESETS_SD1MUX 0x8000 | 129 | #define BCSR_RESETS_SD1MUX 0x8000 |
131 | 130 | ||
132 | #define BCSR_PCMCIA_PC0VPP 0x0003 | 131 | #define BCSR_PCMCIA_PC0VPP 0x0003 |
133 | #define BCSR_PCMCIA_PC0VCC 0x000C | 132 | #define BCSR_PCMCIA_PC0VCC 0x000C |
@@ -163,7 +162,7 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
163 | #define BCSR_INT_PC0STSCHG 0x0008 | 162 | #define BCSR_INT_PC0STSCHG 0x0008 |
164 | #define BCSR_INT_PC1 0x0010 | 163 | #define BCSR_INT_PC1 0x0010 |
165 | #define BCSR_INT_PC1STSCHG 0x0020 | 164 | #define BCSR_INT_PC1STSCHG 0x0020 |
166 | #define BCSR_INT_DC 0x0040 | 165 | #define BCSR_INT_DC 0x0040 |
167 | #define BCSR_INT_FLASHBUSY 0x0080 | 166 | #define BCSR_INT_FLASHBUSY 0x0080 |
168 | #define BCSR_INT_PC0INSERT 0x0100 | 167 | #define BCSR_INT_PC0INSERT 0x0100 |
169 | #define BCSR_INT_PC0EJECT 0x0200 | 168 | #define BCSR_INT_PC0EJECT 0x0200 |
@@ -174,14 +173,6 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
174 | #define BCSR_INT_SD1INSERT 0x4000 | 173 | #define BCSR_INT_SD1INSERT 0x4000 |
175 | #define BCSR_INT_SD1EJECT 0x8000 | 174 | #define BCSR_INT_SD1EJECT 0x8000 |
176 | 175 | ||
177 | /* PCMCIA Db1x00 specific defines */ | ||
178 | #define PCMCIA_MAX_SOCK 1 | ||
179 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | ||
180 | |||
181 | /* VPP/VCC */ | ||
182 | #define SET_VCC_VPP(VCC, VPP, SLOT)\ | ||
183 | ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8)) | ||
184 | |||
185 | #define SMC91C111_PHYS_ADDR 0x0D000300 | 176 | #define SMC91C111_PHYS_ADDR 0x0D000300 |
186 | #define SMC91C111_INT PB1200_ETH_INT | 177 | #define SMC91C111_INT PB1200_ETH_INT |
187 | 178 | ||
@@ -192,18 +183,19 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
192 | #define IDE_DDMA_REQ DSCR_CMD0_DMA_REQ1 | 183 | #define IDE_DDMA_REQ DSCR_CMD0_DMA_REQ1 |
193 | #define IDE_RQSIZE 128 | 184 | #define IDE_RQSIZE 128 |
194 | 185 | ||
195 | #define NAND_PHYS_ADDR 0x1C000000 | 186 | #define NAND_PHYS_ADDR 0x1C000000 |
196 | 187 | ||
197 | /* Timing values as described in databook, * ns value stripped of | 188 | /* |
189 | * Timing values as described in databook, * ns value stripped of | ||
198 | * lower 2 bits. | 190 | * lower 2 bits. |
199 | * These defines are here rather than an SOC1200 generic file because | 191 | * These defines are here rather than an Au1200 generic file because |
200 | * the parts chosen on another board may be different and may require | 192 | * the parts chosen on another board may be different and may require |
201 | * different timings. | 193 | * different timings. |
202 | */ | 194 | */ |
203 | #define NAND_T_H (18 >> 2) | 195 | #define NAND_T_H (18 >> 2) |
204 | #define NAND_T_PUL (30 >> 2) | 196 | #define NAND_T_PUL (30 >> 2) |
205 | #define NAND_T_SU (30 >> 2) | 197 | #define NAND_T_SU (30 >> 2) |
206 | #define NAND_T_WH (30 >> 2) | 198 | #define NAND_T_WH (30 >> 2) |
207 | 199 | ||
208 | /* Bitfield shift amounts */ | 200 | /* Bitfield shift amounts */ |
209 | #define NAND_T_H_SHIFT 0 | 201 | #define NAND_T_H_SHIFT 0 |
@@ -211,11 +203,10 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; | |||
211 | #define NAND_T_SU_SHIFT 8 | 203 | #define NAND_T_SU_SHIFT 8 |
212 | #define NAND_T_WH_SHIFT 12 | 204 | #define NAND_T_WH_SHIFT 12 |
213 | 205 | ||
214 | #define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ | 206 | #define NAND_TIMING (((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ |
215 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ | 207 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ |
216 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ | 208 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ |
217 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT) | 209 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)) |
218 | |||
219 | 210 | ||
220 | /* | 211 | /* |
221 | * External Interrupts for Pb1200 as of 8/6/2004. | 212 | * External Interrupts for Pb1200 as of 8/6/2004. |
@@ -248,13 +239,21 @@ enum external_pb1200_ints { | |||
248 | PB1200_INT_END = PB1200_INT_BEGIN + 15 | 239 | PB1200_INT_END = PB1200_INT_BEGIN + 15 |
249 | }; | 240 | }; |
250 | 241 | ||
251 | /* For drivers/pcmcia/au1000_db1x00.c */ | 242 | /* |
252 | #define BOARD_PC0_INT PB1200_PC0_INT | 243 | * Pb1200 specific PCMCIA defines for drivers/pcmcia/au1000_db1x00.c |
253 | #define BOARD_PC1_INT PB1200_PC1_INT | 244 | */ |
254 | #define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET))) | 245 | #define PCMCIA_MAX_SOCK 1 |
246 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) | ||
255 | 247 | ||
256 | /* Nand chip select */ | 248 | /* VPP/VCC */ |
249 | #define SET_VCC_VPP(VCC, VPP, SLOT) \ | ||
250 | ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8)) | ||
251 | |||
252 | #define BOARD_PC0_INT PB1200_PC0_INT | ||
253 | #define BOARD_PC1_INT PB1200_PC1_INT | ||
254 | #define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1 << (8 + (2 * SOCKET))) | ||
255 | |||
256 | /* NAND chip select */ | ||
257 | #define NAND_CS 1 | 257 | #define NAND_CS 1 |
258 | 258 | ||
259 | #endif /* __ASM_PB1200_H */ | 259 | #endif /* __ASM_PB1200_H */ |
260 | |||
diff --git a/include/asm-mips/mach-pb1x00/pb1500.h b/include/asm-mips/mach-pb1x00/pb1500.h index ff6d40c87a25..da51a2eb7b82 100644 --- a/include/asm-mips/mach-pb1x00/pb1500.h +++ b/include/asm-mips/mach-pb1x00/pb1500.h | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Alchemy Semi PB1500 Referrence Board | 2 | * Alchemy Semi Pb1500 Referrence Board |
3 | * | 3 | * |
4 | * Copyright 2001 MontaVista Software Inc. | 4 | * Copyright 2001, 2008 MontaVista Software Inc. |
5 | * Author: MontaVista Software, Inc. | 5 | * Author: MontaVista Software, Inc. <source@mvista.com> |
6 | * ppopov@mvista.com or source@mvista.com | ||
7 | * | 6 | * |
8 | * ######################################################################## | 7 | * ######################################################################## |
9 | * | 8 | * |
@@ -27,25 +26,24 @@ | |||
27 | #ifndef __ASM_PB1500_H | 26 | #ifndef __ASM_PB1500_H |
28 | #define __ASM_PB1500_H | 27 | #define __ASM_PB1500_H |
29 | 28 | ||
29 | #define IDENT_BOARD_REG 0xAE000000 | ||
30 | #define BOARD_STATUS_REG 0xAE000004 | ||
31 | #define PCI_BOARD_REG 0xAE000010 | ||
32 | #define PCMCIA_BOARD_REG 0xAE000010 | ||
33 | # define PC_DEASSERT_RST 0x80 | ||
34 | # define PC_DRV_EN 0x10 | ||
35 | #define PB1500_G_CONTROL 0xAE000014 | ||
36 | #define PB1500_RST_VDDI 0xAE00001C | ||
37 | #define PB1500_LEDS 0xAE000018 | ||
30 | 38 | ||
31 | #define IDENT_BOARD_REG 0xAE000000 | 39 | #define PB1500_HEX_LED 0xAF000004 |
32 | #define BOARD_STATUS_REG 0xAE000004 | 40 | #define PB1500_HEX_LED_BLANK 0xAF000008 |
33 | #define PCI_BOARD_REG 0xAE000010 | ||
34 | #define PCMCIA_BOARD_REG 0xAE000010 | ||
35 | #define PC_DEASSERT_RST 0x80 | ||
36 | #define PC_DRV_EN 0x10 | ||
37 | #define PB1500_G_CONTROL 0xAE000014 | ||
38 | #define PB1500_RST_VDDI 0xAE00001C | ||
39 | #define PB1500_LEDS 0xAE000018 | ||
40 | 41 | ||
41 | #define PB1500_HEX_LED 0xAF000004 | 42 | /* PCMCIA Pb1500 specific defines */ |
42 | #define PB1500_HEX_LED_BLANK 0xAF000008 | 43 | #define PCMCIA_MAX_SOCK 0 |
43 | 44 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) | |
44 | /* PCMCIA PB1500 specific defines */ | ||
45 | #define PCMCIA_MAX_SOCK 0 | ||
46 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | ||
47 | 45 | ||
48 | /* VPP/VCC */ | 46 | /* VPP/VCC */ |
49 | #define SET_VCC_VPP(VCC, VPP) (((VCC)<<2) | ((VPP)<<0)) | 47 | #define SET_VCC_VPP(VCC, VPP) (((VCC) << 2) | ((VPP) << 0)) |
50 | 48 | ||
51 | #endif /* __ASM_PB1500_H */ | 49 | #endif /* __ASM_PB1500_H */ |
diff --git a/include/asm-mips/mach-pb1x00/pb1550.h b/include/asm-mips/mach-pb1x00/pb1550.h index c2ab0e2df4ae..6704a11497db 100644 --- a/include/asm-mips/mach-pb1x00/pb1550.h +++ b/include/asm-mips/mach-pb1x00/pb1550.h | |||
@@ -30,15 +30,15 @@ | |||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <asm/mach-au1x00/au1xxx_psc.h> | 31 | #include <asm/mach-au1x00/au1xxx_psc.h> |
32 | 32 | ||
33 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX | 33 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX |
34 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX | 34 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX |
35 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX | 35 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX |
36 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX | 36 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX |
37 | 37 | ||
38 | #define SPI_PSC_BASE PSC0_BASE_ADDR | 38 | #define SPI_PSC_BASE PSC0_BASE_ADDR |
39 | #define AC97_PSC_BASE PSC1_BASE_ADDR | 39 | #define AC97_PSC_BASE PSC1_BASE_ADDR |
40 | #define SMBUS_PSC_BASE PSC2_BASE_ADDR | 40 | #define SMBUS_PSC_BASE PSC2_BASE_ADDR |
41 | #define I2S_PSC_BASE PSC3_BASE_ADDR | 41 | #define I2S_PSC_BASE PSC3_BASE_ADDR |
42 | 42 | ||
43 | #define BCSR_PHYS_ADDR 0xAF000000 | 43 | #define BCSR_PHYS_ADDR 0xAF000000 |
44 | 44 | ||
@@ -129,12 +129,12 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR; | |||
129 | #define BCSR_SYSTEM_POWEROFF 0x4000 | 129 | #define BCSR_SYSTEM_POWEROFF 0x4000 |
130 | #define BCSR_SYSTEM_RESET 0x8000 | 130 | #define BCSR_SYSTEM_RESET 0x8000 |
131 | 131 | ||
132 | #define PCMCIA_MAX_SOCK 1 | 132 | #define PCMCIA_MAX_SOCK 1 |
133 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | 133 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) |
134 | 134 | ||
135 | /* VPP/VCC */ | 135 | /* VPP/VCC */ |
136 | #define SET_VCC_VPP(VCC, VPP, SLOT)\ | 136 | #define SET_VCC_VPP(VCC, VPP, SLOT) \ |
137 | ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8)) | 137 | ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8)) |
138 | 138 | ||
139 | #if defined(CONFIG_MTD_PB1550_BOOT) && defined(CONFIG_MTD_PB1550_USER) | 139 | #if defined(CONFIG_MTD_PB1550_BOOT) && defined(CONFIG_MTD_PB1550_USER) |
140 | #define PB1550_BOTH_BANKS | 140 | #define PB1550_BOTH_BANKS |
@@ -144,16 +144,17 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR; | |||
144 | #define PB1550_USER_ONLY | 144 | #define PB1550_USER_ONLY |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | /* Timing values as described in databook, * ns value stripped of | 147 | /* |
148 | * Timing values as described in databook, * ns value stripped of | ||
148 | * lower 2 bits. | 149 | * lower 2 bits. |
149 | * These defines are here rather than an SOC1550 generic file because | 150 | * These defines are here rather than an SOC1550 generic file because |
150 | * the parts chosen on another board may be different and may require | 151 | * the parts chosen on another board may be different and may require |
151 | * different timings. | 152 | * different timings. |
152 | */ | 153 | */ |
153 | #define NAND_T_H (18 >> 2) | 154 | #define NAND_T_H (18 >> 2) |
154 | #define NAND_T_PUL (30 >> 2) | 155 | #define NAND_T_PUL (30 >> 2) |
155 | #define NAND_T_SU (30 >> 2) | 156 | #define NAND_T_SU (30 >> 2) |
156 | #define NAND_T_WH (30 >> 2) | 157 | #define NAND_T_WH (30 >> 2) |
157 | 158 | ||
158 | /* Bitfield shift amounts */ | 159 | /* Bitfield shift amounts */ |
159 | #define NAND_T_H_SHIFT 0 | 160 | #define NAND_T_H_SHIFT 0 |
@@ -161,16 +162,16 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR; | |||
161 | #define NAND_T_SU_SHIFT 8 | 162 | #define NAND_T_SU_SHIFT 8 |
162 | #define NAND_T_WH_SHIFT 12 | 163 | #define NAND_T_WH_SHIFT 12 |
163 | 164 | ||
164 | #define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ | 165 | #define NAND_TIMING (((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ |
165 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ | 166 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ |
166 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ | 167 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ |
167 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT) | 168 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)) |
168 | 169 | ||
169 | #define NAND_CS 1 | 170 | #define NAND_CS 1 |
170 | 171 | ||
171 | /* should be done by yamon */ | 172 | /* Should be done by YAMON */ |
172 | #define NAND_STCFG 0x00400005 /* 8-bit NAND */ | 173 | #define NAND_STCFG 0x00400005 /* 8-bit NAND */ |
173 | #define NAND_STTIME 0x00007774 /* valid for 396MHz SD=2 only */ | 174 | #define NAND_STTIME 0x00007774 /* valid for 396 MHz SD=2 only */ |
174 | #define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */ | 175 | #define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */ |
175 | 176 | ||
176 | #endif /* __ASM_PB1550_H */ | 177 | #endif /* __ASM_PB1550_H */ |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index aa17f658f73c..a46f8e258e6b 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -765,6 +765,9 @@ do { \ | |||
765 | #define read_c0_index() __read_32bit_c0_register($0, 0) | 765 | #define read_c0_index() __read_32bit_c0_register($0, 0) |
766 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) | 766 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) |
767 | 767 | ||
768 | #define read_c0_random() __read_32bit_c0_register($1, 0) | ||
769 | #define write_c0_random(val) __write_32bit_c0_register($1, 0, val) | ||
770 | |||
768 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) | 771 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) |
769 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) | 772 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) |
770 | 773 | ||
diff --git a/include/asm-mips/pgtable-bits.h b/include/asm-mips/pgtable-bits.h index 60e2f9338fcd..51b34a48c84a 100644 --- a/include/asm-mips/pgtable-bits.h +++ b/include/asm-mips/pgtable-bits.h | |||
@@ -134,6 +134,4 @@ | |||
134 | 134 | ||
135 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) | 135 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) |
136 | 136 | ||
137 | #define CONF_CM_DEFAULT (PAGE_CACHABLE_DEFAULT>>_CACHE_SHIFT) | ||
138 | |||
139 | #endif /* _ASM_PGTABLE_BITS_H */ | 137 | #endif /* _ASM_PGTABLE_BITS_H */ |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 2f597eea4448..6a0edf72ffbc 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -239,9 +239,10 @@ static inline pte_t pte_mkdirty(pte_t pte) | |||
239 | static inline pte_t pte_mkyoung(pte_t pte) | 239 | static inline pte_t pte_mkyoung(pte_t pte) |
240 | { | 240 | { |
241 | pte.pte_low |= _PAGE_ACCESSED; | 241 | pte.pte_low |= _PAGE_ACCESSED; |
242 | if (pte.pte_low & _PAGE_READ) | 242 | if (pte.pte_low & _PAGE_READ) { |
243 | pte.pte_low |= _PAGE_SILENT_READ; | 243 | pte.pte_low |= _PAGE_SILENT_READ; |
244 | pte.pte_high |= _PAGE_SILENT_READ; | 244 | pte.pte_high |= _PAGE_SILENT_READ; |
245 | } | ||
245 | return pte; | 246 | return pte; |
246 | } | 247 | } |
247 | #else | 248 | #else |
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h index 65778c890a62..4ca3063ed2ce 100644 --- a/include/asm-mips/rtlx.h +++ b/include/asm-mips/rtlx.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __ASM_RTLX_H | 6 | #ifndef __ASM_RTLX_H_ |
7 | #define __ASM_RTLX_H_ | 7 | #define __ASM_RTLX_H_ |
8 | 8 | ||
9 | #include <irq.h> | 9 | #include <irq.h> |
@@ -29,13 +29,13 @@ extern unsigned int rtlx_read_poll(int index, int can_sleep); | |||
29 | extern unsigned int rtlx_write_poll(int index); | 29 | extern unsigned int rtlx_write_poll(int index); |
30 | 30 | ||
31 | enum rtlx_state { | 31 | enum rtlx_state { |
32 | RTLX_STATE_UNUSED, | 32 | RTLX_STATE_UNUSED = 0, |
33 | RTLX_STATE_INITIALISED, | 33 | RTLX_STATE_INITIALISED, |
34 | RTLX_STATE_REMOTE_READY, | 34 | RTLX_STATE_REMOTE_READY, |
35 | RTLX_STATE_OPENED | 35 | RTLX_STATE_OPENED |
36 | }; | 36 | }; |
37 | 37 | ||
38 | #define RTLX_BUFFER_SIZE 1024 | 38 | #define RTLX_BUFFER_SIZE 2048 |
39 | 39 | ||
40 | /* each channel supports read and write. | 40 | /* each channel supports read and write. |
41 | linux (vpe0) reads lx_buffer and writes rt_buffer | 41 | linux (vpe0) reads lx_buffer and writes rt_buffer |
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index 2dd147f519d1..bcbb8d675af5 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h | |||
@@ -9,37 +9,15 @@ | |||
9 | #ifndef _ASM_TYPES_H | 9 | #ifndef _ASM_TYPES_H |
10 | #define _ASM_TYPES_H | 10 | #define _ASM_TYPES_H |
11 | 11 | ||
12 | #ifndef __ASSEMBLY__ | 12 | #if _MIPS_SZLONG == 64 |
13 | 13 | # include <asm-generic/int-l64.h> | |
14 | typedef unsigned short umode_t; | ||
15 | |||
16 | /* | ||
17 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
18 | * header files exported to user space | ||
19 | */ | ||
20 | |||
21 | typedef __signed__ char __s8; | ||
22 | typedef unsigned char __u8; | ||
23 | |||
24 | typedef __signed__ short __s16; | ||
25 | typedef unsigned short __u16; | ||
26 | |||
27 | typedef __signed__ int __s32; | ||
28 | typedef unsigned int __u32; | ||
29 | |||
30 | #if (_MIPS_SZLONG == 64) | ||
31 | |||
32 | typedef __signed__ long __s64; | ||
33 | typedef unsigned long __u64; | ||
34 | |||
35 | #else | 14 | #else |
36 | 15 | # include <asm-generic/int-ll64.h> | |
37 | #if defined(__GNUC__) | ||
38 | __extension__ typedef __signed__ long long __s64; | ||
39 | __extension__ typedef unsigned long long __u64; | ||
40 | #endif | 16 | #endif |
41 | 17 | ||
42 | #endif | 18 | #ifndef __ASSEMBLY__ |
19 | |||
20 | typedef unsigned short umode_t; | ||
43 | 21 | ||
44 | #endif /* __ASSEMBLY__ */ | 22 | #endif /* __ASSEMBLY__ */ |
45 | 23 | ||
@@ -52,30 +30,6 @@ __extension__ typedef unsigned long long __u64; | |||
52 | 30 | ||
53 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
54 | 32 | ||
55 | |||
56 | typedef __signed char s8; | ||
57 | typedef unsigned char u8; | ||
58 | |||
59 | typedef __signed short s16; | ||
60 | typedef unsigned short u16; | ||
61 | |||
62 | typedef __signed int s32; | ||
63 | typedef unsigned int u32; | ||
64 | |||
65 | #if (_MIPS_SZLONG == 64) | ||
66 | |||
67 | typedef __signed__ long s64; | ||
68 | typedef unsigned long u64; | ||
69 | |||
70 | #else | ||
71 | |||
72 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) | ||
73 | typedef __signed__ long long s64; | ||
74 | typedef unsigned long long u64; | ||
75 | #endif | ||
76 | |||
77 | #endif | ||
78 | |||
79 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ | 33 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ |
80 | || defined(CONFIG_64BIT) | 34 | || defined(CONFIG_64BIT) |
81 | typedef u64 dma_addr_t; | 35 | typedef u64 dma_addr_t; |
diff --git a/include/asm-mn10300/ipcbuf.h b/include/asm-mn10300/ipcbuf.h index efbbef8d1c69..f6f63d448272 100644 --- a/include/asm-mn10300/ipcbuf.h +++ b/include/asm-mn10300/ipcbuf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | #ifndef _ASM_IPCBUF_H_ | 1 | #ifndef _ASM_IPCBUF_H |
2 | #define _ASM_IPCBUF_H | 2 | #define _ASM_IPCBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
diff --git a/include/asm-mn10300/processor.h b/include/asm-mn10300/processor.h index f1b081f53468..73239271873d 100644 --- a/include/asm-mn10300/processor.h +++ b/include/asm-mn10300/processor.h | |||
@@ -58,7 +58,7 @@ extern struct mn10300_cpuinfo boot_cpu_data; | |||
58 | extern void identify_cpu(struct mn10300_cpuinfo *); | 58 | extern void identify_cpu(struct mn10300_cpuinfo *); |
59 | extern void print_cpu_info(struct mn10300_cpuinfo *); | 59 | extern void print_cpu_info(struct mn10300_cpuinfo *); |
60 | extern void dodgy_tsc(void); | 60 | extern void dodgy_tsc(void); |
61 | #define cpu_relax() do {} while (0) | 61 | #define cpu_relax() barrier() |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * User space process size: 1.75GB (default). | 64 | * User space process size: 1.75GB (default). |
diff --git a/include/asm-mn10300/types.h b/include/asm-mn10300/types.h index d40ea7628bfc..7b9f01042fd4 100644 --- a/include/asm-mn10300/types.h +++ b/include/asm-mn10300/types.h | |||
@@ -11,29 +11,12 @@ | |||
11 | #ifndef _ASM_TYPES_H | 11 | #ifndef _ASM_TYPES_H |
12 | #define _ASM_TYPES_H | 12 | #define _ASM_TYPES_H |
13 | 13 | ||
14 | #include <asm-generic/int-ll64.h> | ||
15 | |||
14 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
15 | 17 | ||
16 | typedef unsigned short umode_t; | 18 | typedef unsigned short umode_t; |
17 | 19 | ||
18 | /* | ||
19 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
20 | * header files exported to user space | ||
21 | */ | ||
22 | |||
23 | typedef __signed__ char __s8; | ||
24 | typedef unsigned char __u8; | ||
25 | |||
26 | typedef __signed__ short __s16; | ||
27 | typedef unsigned short __u16; | ||
28 | |||
29 | typedef __signed__ int __s32; | ||
30 | typedef unsigned int __u32; | ||
31 | |||
32 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) | ||
33 | typedef __signed__ long long __s64; | ||
34 | typedef unsigned long long __u64; | ||
35 | #endif | ||
36 | |||
37 | #endif /* __ASSEMBLY__ */ | 20 | #endif /* __ASSEMBLY__ */ |
38 | 21 | ||
39 | /* | 22 | /* |
@@ -45,18 +28,6 @@ typedef unsigned long long __u64; | |||
45 | 28 | ||
46 | #ifndef __ASSEMBLY__ | 29 | #ifndef __ASSEMBLY__ |
47 | 30 | ||
48 | typedef signed char s8; | ||
49 | typedef unsigned char u8; | ||
50 | |||
51 | typedef signed short s16; | ||
52 | typedef unsigned short u16; | ||
53 | |||
54 | typedef signed int s32; | ||
55 | typedef unsigned int u32; | ||
56 | |||
57 | typedef signed long long s64; | ||
58 | typedef unsigned long long u64; | ||
59 | |||
60 | /* Dma addresses are 32-bits wide. */ | 31 | /* Dma addresses are 32-bits wide. */ |
61 | typedef u32 dma_addr_t; | 32 | typedef u32 dma_addr_t; |
62 | 33 | ||
diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h index 5587f0023881..ffb208840ecc 100644 --- a/include/asm-parisc/assembly.h +++ b/include/asm-parisc/assembly.h | |||
@@ -31,9 +31,8 @@ | |||
31 | #define STREGM std,ma | 31 | #define STREGM std,ma |
32 | #define SHRREG shrd | 32 | #define SHRREG shrd |
33 | #define SHLREG shld | 33 | #define SHLREG shld |
34 | #define ADDIB addib,* | ||
35 | #define CMPB cmpb,* | ||
36 | #define ANDCM andcm,* | 34 | #define ANDCM andcm,* |
35 | #define COND(x) * ## x | ||
37 | #define RP_OFFSET 16 | 36 | #define RP_OFFSET 16 |
38 | #define FRAME_SIZE 128 | 37 | #define FRAME_SIZE 128 |
39 | #define CALLEE_REG_FRAME_SIZE 144 | 38 | #define CALLEE_REG_FRAME_SIZE 144 |
@@ -46,9 +45,8 @@ | |||
46 | #define STREGM stwm | 45 | #define STREGM stwm |
47 | #define SHRREG shr | 46 | #define SHRREG shr |
48 | #define SHLREG shlw | 47 | #define SHLREG shlw |
49 | #define ADDIB addib, | ||
50 | #define CMPB cmpb, | ||
51 | #define ANDCM andcm | 48 | #define ANDCM andcm |
49 | #define COND(x) x | ||
52 | #define RP_OFFSET 20 | 50 | #define RP_OFFSET 20 |
53 | #define FRAME_SIZE 64 | 51 | #define FRAME_SIZE 64 |
54 | #define CALLEE_REG_FRAME_SIZE 128 | 52 | #define CALLEE_REG_FRAME_SIZE 128 |
diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h index cc3ec1bd8919..e9639ccc3fce 100644 --- a/include/asm-parisc/checksum.h +++ b/include/asm-parisc/checksum.h | |||
@@ -65,7 +65,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
65 | "2:\n" | 65 | "2:\n" |
66 | : "=r" (sum), "=r" (iph), "=r" (ihl) | 66 | : "=r" (sum), "=r" (iph), "=r" (ihl) |
67 | : "1" (iph), "2" (ihl) | 67 | : "1" (iph), "2" (ihl) |
68 | : "r19", "r20", "r21" ); | 68 | : "r19", "r20", "r21", "memory"); |
69 | 69 | ||
70 | return (__force __sum16)sum; | 70 | return (__force __sum16)sum; |
71 | } | 71 | } |
diff --git a/include/asm-parisc/ioctl.h b/include/asm-parisc/ioctl.h index 68338d2bda4e..ec8efa02beda 100644 --- a/include/asm-parisc/ioctl.h +++ b/include/asm-parisc/ioctl.h | |||
@@ -32,21 +32,6 @@ | |||
32 | * NOTE: This limits the max parameter size to 16kB -1 ! | 32 | * NOTE: This limits the max parameter size to 16kB -1 ! |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #define _IOC_NRBITS 8 | ||
36 | #define _IOC_TYPEBITS 8 | ||
37 | #define _IOC_SIZEBITS 14 | ||
38 | #define _IOC_DIRBITS 2 | ||
39 | |||
40 | #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) | ||
41 | #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) | ||
42 | #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) | ||
43 | #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) | ||
44 | |||
45 | #define _IOC_NRSHIFT 0 | ||
46 | #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) | ||
47 | #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) | ||
48 | #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) | ||
49 | |||
50 | /* | 35 | /* |
51 | * Direction bits. | 36 | * Direction bits. |
52 | */ | 37 | */ |
@@ -54,40 +39,6 @@ | |||
54 | #define _IOC_WRITE 2U | 39 | #define _IOC_WRITE 2U |
55 | #define _IOC_READ 1U | 40 | #define _IOC_READ 1U |
56 | 41 | ||
57 | #define _IOC(dir,type,nr,size) \ | 42 | #include <asm-generic/ioctl.h> |
58 | (((dir) << _IOC_DIRSHIFT) | \ | ||
59 | ((type) << _IOC_TYPESHIFT) | \ | ||
60 | ((nr) << _IOC_NRSHIFT) | \ | ||
61 | ((size) << _IOC_SIZESHIFT)) | ||
62 | |||
63 | /* provoke compile error for invalid uses of size argument */ | ||
64 | extern unsigned int __invalid_size_argument_for_IOC; | ||
65 | #define _IOC_TYPECHECK(t) \ | ||
66 | ((sizeof(t) == sizeof(t[1]) && \ | ||
67 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ | ||
68 | sizeof(t) : __invalid_size_argument_for_IOC) | ||
69 | |||
70 | /* used to create numbers */ | ||
71 | #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) | ||
72 | #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) | ||
73 | #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
74 | #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
75 | #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) | ||
76 | #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) | ||
77 | #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) | ||
78 | |||
79 | /* used to decode ioctl numbers.. */ | ||
80 | #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) | ||
81 | #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) | ||
82 | #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) | ||
83 | #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) | ||
84 | |||
85 | /* ...and for the drivers/sound files... */ | ||
86 | |||
87 | #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) | ||
88 | #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) | ||
89 | #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) | ||
90 | #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) | ||
91 | #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) | ||
92 | 43 | ||
93 | #endif /* _ASM_PARISC_IOCTL_H */ | 44 | #endif /* _ASM_PARISC_IOCTL_H */ |
diff --git a/include/asm-parisc/ioctls.h b/include/asm-parisc/ioctls.h index ee84e4172c36..6747fad07a3e 100644 --- a/include/asm-parisc/ioctls.h +++ b/include/asm-parisc/ioctls.h | |||
@@ -46,6 +46,10 @@ | |||
46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
48 | #define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */ | 48 | #define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */ |
49 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
50 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
51 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
49 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
50 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
51 | 55 | ||
diff --git a/include/asm-parisc/termbits.h b/include/asm-parisc/termbits.h index e847fe979684..d8bbc73b16b7 100644 --- a/include/asm-parisc/termbits.h +++ b/include/asm-parisc/termbits.h | |||
@@ -141,6 +141,7 @@ struct ktermios { | |||
141 | #define HUPCL 0002000 | 141 | #define HUPCL 0002000 |
142 | #define CLOCAL 0004000 | 142 | #define CLOCAL 0004000 |
143 | #define CBAUDEX 0010000 | 143 | #define CBAUDEX 0010000 |
144 | #define BOTHER 0010000 | ||
144 | #define B57600 0010001 | 145 | #define B57600 0010001 |
145 | #define B115200 0010002 | 146 | #define B115200 0010002 |
146 | #define B230400 0010003 | 147 | #define B230400 0010003 |
@@ -156,10 +157,12 @@ struct ktermios { | |||
156 | #define B3000000 0010015 | 157 | #define B3000000 0010015 |
157 | #define B3500000 0010016 | 158 | #define B3500000 0010016 |
158 | #define B4000000 0010017 | 159 | #define B4000000 0010017 |
159 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 160 | #define CIBAUD 002003600000 /* input baud rate */ |
160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
161 | #define CRTSCTS 020000000000 /* flow control */ | 162 | #define CRTSCTS 020000000000 /* flow control */ |
162 | 163 | ||
164 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
165 | |||
163 | 166 | ||
164 | /* c_lflag bits */ | 167 | /* c_lflag bits */ |
165 | #define ISIG 0000001 | 168 | #define ISIG 0000001 |
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h index 5345b3420475..a2a57a4548af 100644 --- a/include/asm-parisc/termios.h +++ b/include/asm-parisc/termios.h | |||
@@ -80,8 +80,10 @@ struct termio { | |||
80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
81 | }) | 81 | }) |
82 | 82 | ||
83 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 83 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
84 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 84 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
85 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
86 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
85 | 87 | ||
86 | #endif /* __KERNEL__ */ | 88 | #endif /* __KERNEL__ */ |
87 | 89 | ||
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 56c84802da59..7f5a39bfb4ce 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h | |||
@@ -1,29 +1,12 @@ | |||
1 | #ifndef _PARISC_TYPES_H | 1 | #ifndef _PARISC_TYPES_H |
2 | #define _PARISC_TYPES_H | 2 | #define _PARISC_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
5 | 7 | ||
6 | typedef unsigned short umode_t; | 8 | typedef unsigned short umode_t; |
7 | 9 | ||
8 | /* | ||
9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
10 | * header files exported to user space | ||
11 | */ | ||
12 | |||
13 | typedef __signed__ char __s8; | ||
14 | typedef unsigned char __u8; | ||
15 | |||
16 | typedef __signed__ short __s16; | ||
17 | typedef unsigned short __u16; | ||
18 | |||
19 | typedef __signed__ int __s32; | ||
20 | typedef unsigned int __u32; | ||
21 | |||
22 | #if defined(__GNUC__) | ||
23 | __extension__ typedef __signed__ long long __s64; | ||
24 | __extension__ typedef unsigned long long __u64; | ||
25 | #endif | ||
26 | |||
27 | #endif /* __ASSEMBLY__ */ | 10 | #endif /* __ASSEMBLY__ */ |
28 | 11 | ||
29 | /* | 12 | /* |
@@ -41,18 +24,6 @@ __extension__ typedef unsigned long long __u64; | |||
41 | 24 | ||
42 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
43 | 26 | ||
44 | typedef signed char s8; | ||
45 | typedef unsigned char u8; | ||
46 | |||
47 | typedef signed short s16; | ||
48 | typedef unsigned short u16; | ||
49 | |||
50 | typedef signed int s32; | ||
51 | typedef unsigned int u32; | ||
52 | |||
53 | typedef signed long long s64; | ||
54 | typedef unsigned long long u64; | ||
55 | |||
56 | /* Dma addresses are 32-bits wide. */ | 27 | /* Dma addresses are 32-bits wide. */ |
57 | 28 | ||
58 | typedef u32 dma_addr_t; | 29 | typedef u32 dma_addr_t; |
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 7381916dfcbb..bca352e033c3 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild | |||
@@ -1,6 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += a.out.h | ||
4 | header-y += auxvec.h | 3 | header-y += auxvec.h |
5 | header-y += ioctls.h | 4 | header-y += ioctls.h |
6 | header-y += mman.h | 5 | header-y += mman.h |
diff --git a/include/asm-powerpc/hugetlb.h b/include/asm-powerpc/hugetlb.h index 649c6c3b87b3..be32ff02f4a0 100644 --- a/include/asm-powerpc/hugetlb.h +++ b/include/asm-powerpc/hugetlb.h | |||
@@ -49,12 +49,6 @@ static inline pte_t huge_pte_wrprotect(pte_t pte) | |||
49 | return pte_wrprotect(pte); | 49 | return pte_wrprotect(pte); |
50 | } | 50 | } |
51 | 51 | ||
52 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | ||
53 | unsigned long addr, pte_t *ptep) | ||
54 | { | ||
55 | ptep_set_wrprotect(mm, addr, ptep); | ||
56 | } | ||
57 | |||
58 | static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, | 52 | static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, |
59 | unsigned long addr, pte_t *ptep, | 53 | unsigned long addr, pte_t *ptep, |
60 | pte_t pte, int dirty) | 54 | pte_t pte, int dirty) |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index afae0697e8ce..89189488e286 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_POWERPC_IO_H | 2 | #define _ASM_POWERPC_IO_H |
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | /* | 5 | /* |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
@@ -18,6 +18,9 @@ extern int check_legacy_ioport(unsigned long base_port); | |||
18 | #define _PNPWRP 0xa79 | 18 | #define _PNPWRP 0xa79 |
19 | #define PNPBIOS_BASE 0xf000 | 19 | #define PNPBIOS_BASE 0xf000 |
20 | 20 | ||
21 | #include <linux/device.h> | ||
22 | #include <linux/io.h> | ||
23 | |||
21 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
22 | #include <asm/page.h> | 25 | #include <asm/page.h> |
23 | #include <asm/byteorder.h> | 26 | #include <asm/byteorder.h> |
@@ -97,7 +100,7 @@ static inline type name(const volatile type __iomem *addr) \ | |||
97 | { \ | 100 | { \ |
98 | type ret; \ | 101 | type ret; \ |
99 | __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ | 102 | __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ |
100 | : "=r" (ret) : "r" (addr), "m" (*addr)); \ | 103 | : "=r" (ret) : "r" (addr), "m" (*addr) : "memory"); \ |
101 | return ret; \ | 104 | return ret; \ |
102 | } | 105 | } |
103 | 106 | ||
@@ -105,8 +108,8 @@ static inline type name(const volatile type __iomem *addr) \ | |||
105 | static inline void name(volatile type __iomem *addr, type val) \ | 108 | static inline void name(volatile type __iomem *addr, type val) \ |
106 | { \ | 109 | { \ |
107 | __asm__ __volatile__("sync;" insn \ | 110 | __asm__ __volatile__("sync;" insn \ |
108 | : "=m" (*addr) : "r" (val), "r" (addr)); \ | 111 | : "=m" (*addr) : "r" (val), "r" (addr) : "memory"); \ |
109 | IO_SET_SYNC_FLAG(); \ | 112 | IO_SET_SYNC_FLAG(); \ |
110 | } | 113 | } |
111 | 114 | ||
112 | 115 | ||
@@ -330,7 +333,8 @@ static inline unsigned int name(unsigned int port) \ | |||
330 | " .long 3b,5b\n" \ | 333 | " .long 3b,5b\n" \ |
331 | ".previous" \ | 334 | ".previous" \ |
332 | : "=&r" (x) \ | 335 | : "=&r" (x) \ |
333 | : "r" (port + _IO_BASE)); \ | 336 | : "r" (port + _IO_BASE) \ |
337 | : "memory"); \ | ||
334 | return x; \ | 338 | return x; \ |
335 | } | 339 | } |
336 | 340 | ||
@@ -347,7 +351,8 @@ static inline void name(unsigned int val, unsigned int port) \ | |||
347 | " .long 0b,2b\n" \ | 351 | " .long 0b,2b\n" \ |
348 | " .long 1b,2b\n" \ | 352 | " .long 1b,2b\n" \ |
349 | ".previous" \ | 353 | ".previous" \ |
350 | : : "r" (val), "r" (port + _IO_BASE)); \ | 354 | : : "r" (val), "r" (port + _IO_BASE) \ |
355 | : "memory"); \ | ||
351 | } | 356 | } |
352 | 357 | ||
353 | __do_in_asm(_rec_inb, "lbzx") | 358 | __do_in_asm(_rec_inb, "lbzx") |
@@ -744,6 +749,9 @@ static inline void * bus_to_virt(unsigned long address) | |||
744 | 749 | ||
745 | #define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set) | 750 | #define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set) |
746 | 751 | ||
752 | void __iomem *devm_ioremap_prot(struct device *dev, resource_size_t offset, | ||
753 | size_t size, unsigned long flags); | ||
754 | |||
747 | #endif /* __KERNEL__ */ | 755 | #endif /* __KERNEL__ */ |
748 | 756 | ||
749 | #endif /* _ASM_POWERPC_IO_H */ | 757 | #endif /* _ASM_POWERPC_IO_H */ |
diff --git a/include/asm-powerpc/kvm_host.h b/include/asm-powerpc/kvm_host.h index 04ffbb8e0a35..81a69d711017 100644 --- a/include/asm-powerpc/kvm_host.h +++ b/include/asm-powerpc/kvm_host.h | |||
@@ -59,6 +59,7 @@ struct kvm_vcpu_stat { | |||
59 | u32 emulated_inst_exits; | 59 | u32 emulated_inst_exits; |
60 | u32 dec_exits; | 60 | u32 dec_exits; |
61 | u32 ext_intr_exits; | 61 | u32 ext_intr_exits; |
62 | u32 halt_wakeup; | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | struct tlbe { | 65 | struct tlbe { |
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h index 7ac820308a7e..5a21115228af 100644 --- a/include/asm-powerpc/kvm_ppc.h +++ b/include/asm-powerpc/kvm_ppc.h | |||
@@ -57,6 +57,7 @@ extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
57 | 57 | ||
58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, | 58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, |
59 | struct kvm_vcpu *vcpu); | 59 | struct kvm_vcpu *vcpu); |
60 | extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu); | ||
60 | 61 | ||
61 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, | 62 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, |
62 | u64 asid, u32 flags); | 63 | u64 asid, u32 flags); |
@@ -77,12 +78,17 @@ static inline void kvmppc_clear_exception(struct kvm_vcpu *vcpu, int exception) | |||
77 | clear_bit(priority, &vcpu->arch.pending_exceptions); | 78 | clear_bit(priority, &vcpu->arch.pending_exceptions); |
78 | } | 79 | } |
79 | 80 | ||
81 | /* Helper function for "full" MSR writes. No need to call this if only EE is | ||
82 | * changing. */ | ||
80 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) | 83 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) |
81 | { | 84 | { |
82 | if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR)) | 85 | if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR)) |
83 | kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); | 86 | kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); |
84 | 87 | ||
85 | vcpu->arch.msr = new_msr; | 88 | vcpu->arch.msr = new_msr; |
89 | |||
90 | if (vcpu->arch.msr & MSR_WE) | ||
91 | kvm_vcpu_block(vcpu); | ||
86 | } | 92 | } |
87 | 93 | ||
88 | #endif /* __POWERPC_KVM_PPC_H__ */ | 94 | #endif /* __POWERPC_KVM_PPC_H__ */ |
diff --git a/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h index df111c362a7f..b2efb3325808 100644 --- a/include/asm-powerpc/mediabay.h +++ b/include/asm-powerpc/mediabay.h | |||
@@ -17,8 +17,6 @@ | |||
17 | #define MB_POWER 6 /* media bay contains a Power device (???) */ | 17 | #define MB_POWER 6 /* media bay contains a Power device (???) */ |
18 | #define MB_NO 7 /* media bay contains nothing */ | 18 | #define MB_NO 7 /* media bay contains nothing */ |
19 | 19 | ||
20 | int check_media_bay(struct device_node *which_bay, int what); | ||
21 | |||
22 | /* Number of bays in the machine or 0 */ | 20 | /* Number of bays in the machine or 0 */ |
23 | extern int media_bay_count; | 21 | extern int media_bay_count; |
24 | 22 | ||
@@ -29,6 +27,16 @@ int check_media_bay_by_base(unsigned long base, int what); | |||
29 | /* called by IDE PMAC host driver to register IDE controller for media bay */ | 27 | /* called by IDE PMAC host driver to register IDE controller for media bay */ |
30 | int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, | 28 | int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, |
31 | int irq, ide_hwif_t *hwif); | 29 | int irq, ide_hwif_t *hwif); |
30 | |||
31 | int check_media_bay(struct device_node *which_bay, int what); | ||
32 | |||
33 | #else | ||
34 | |||
35 | static inline int check_media_bay(struct device_node *which_bay, int what) | ||
36 | { | ||
37 | return -ENODEV; | ||
38 | } | ||
39 | |||
32 | #endif | 40 | #endif |
33 | 41 | ||
34 | #endif /* __KERNEL__ */ | 42 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h index 0dff76776044..39c5c5f62bf5 100644 --- a/include/asm-powerpc/mmu-hash64.h +++ b/include/asm-powerpc/mmu-hash64.h | |||
@@ -177,6 +177,7 @@ extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; | |||
177 | extern int mmu_linear_psize; | 177 | extern int mmu_linear_psize; |
178 | extern int mmu_virtual_psize; | 178 | extern int mmu_virtual_psize; |
179 | extern int mmu_vmalloc_psize; | 179 | extern int mmu_vmalloc_psize; |
180 | extern int mmu_vmemmap_psize; | ||
180 | extern int mmu_io_psize; | 181 | extern int mmu_io_psize; |
181 | extern int mmu_kernel_ssize; | 182 | extern int mmu_kernel_ssize; |
182 | extern int mmu_highuser_ssize; | 183 | extern int mmu_highuser_ssize; |
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index 943c5a3fac8a..a4d0f876b427 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -428,12 +428,11 @@ extern void mpic_init(struct mpic *mpic); | |||
428 | */ | 428 | */ |
429 | 429 | ||
430 | 430 | ||
431 | /* Change/Read the priority of an interrupt. Default is 8 for irqs and | 431 | /* Change the priority of an interrupt. Default is 8 for irqs and |
432 | * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the | 432 | * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the |
433 | * IPI number is then the offset'ed (linux irq number mapped to the IPI) | 433 | * IPI number is then the offset'ed (linux irq number mapped to the IPI) |
434 | */ | 434 | */ |
435 | extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri); | 435 | extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri); |
436 | extern unsigned int mpic_irq_get_priority(unsigned int irq); | ||
437 | 436 | ||
438 | /* Setup a non-boot CPU */ | 437 | /* Setup a non-boot CPU */ |
439 | extern void mpic_setup_this_cpu(void); | 438 | extern void mpic_setup_this_cpu(void); |
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 7c97b5a08d08..c08e714d0c42 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -209,6 +209,13 @@ extern int icache_44x_need_flush; | |||
209 | * 0 1 2 3 4 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 209 | * 0 1 2 3 4 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
210 | * - - - - - - U0 U1 U2 U3 W I M G E - UX UW UR SX SW SR | 210 | * - - - - - - U0 U1 U2 U3 W I M G E - UX UW UR SX SW SR |
211 | * | 211 | * |
212 | * Newer 440 cores (440x6 as used on AMCC 460EX/460GT) have additional | ||
213 | * TLB2 storage attibute fields. Those are: | ||
214 | * | ||
215 | * TLB2: | ||
216 | * 0...10 11 12 13 14 15 16...31 | ||
217 | * no change WL1 IL1I IL1D IL2I IL2D no change | ||
218 | * | ||
212 | * There are some constrains and options, to decide mapping software bits | 219 | * There are some constrains and options, to decide mapping software bits |
213 | * into TLB entry. | 220 | * into TLB entry. |
214 | * | 221 | * |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index 27f18695f7d6..7686569a0bef 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -65,15 +65,15 @@ | |||
65 | 65 | ||
66 | #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) | 66 | #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) |
67 | #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) | 67 | #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) |
68 | #define VMEMMAP_REGION_ID (0xfUL) | ||
68 | #define USER_REGION_ID (0UL) | 69 | #define USER_REGION_ID (0UL) |
69 | 70 | ||
70 | /* | 71 | /* |
71 | * Defines the address of the vmemap area, in the top 16th of the | 72 | * Defines the address of the vmemap area, in its own region |
72 | * kernel region. | ||
73 | */ | 73 | */ |
74 | #define VMEMMAP_BASE (ASM_CONST(CONFIG_KERNEL_START) + \ | 74 | #define VMEMMAP_BASE (VMEMMAP_REGION_ID << REGION_SHIFT) |
75 | (0xfUL << (REGION_SHIFT - 4))) | 75 | #define vmemmap ((struct page *)VMEMMAP_BASE) |
76 | #define vmemmap ((struct page *)VMEMMAP_BASE) | 76 | |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * Common bits in a linux-style PTE. These match the bits in the | 79 | * Common bits in a linux-style PTE. These match the bits in the |
@@ -314,6 +314,16 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
314 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); | 314 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); |
315 | } | 315 | } |
316 | 316 | ||
317 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | ||
318 | unsigned long addr, pte_t *ptep) | ||
319 | { | ||
320 | unsigned long old; | ||
321 | |||
322 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | ||
323 | return; | ||
324 | old = pte_update(mm, addr, ptep, _PAGE_RW, 1); | ||
325 | } | ||
326 | |||
317 | /* | 327 | /* |
318 | * We currently remove entries from the hashtable regardless of whether | 328 | * We currently remove entries from the hashtable regardless of whether |
319 | * the entry was young or dirty. The generic routines only flush if the | 329 | * the entry was young or dirty. The generic routines only flush if the |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 9e8ed6824e15..81ffe3b3c1ce 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -178,9 +178,6 @@ enum ps3_cpu_binding { | |||
178 | PS3_BINDING_CPU_1 = 1, | 178 | PS3_BINDING_CPU_1 = 1, |
179 | }; | 179 | }; |
180 | 180 | ||
181 | int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet, | ||
182 | unsigned int *virq); | ||
183 | int ps3_virq_destroy(unsigned int virq); | ||
184 | int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet, | 181 | int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet, |
185 | unsigned int *virq); | 182 | unsigned int *virq); |
186 | int ps3_irq_plug_destroy(unsigned int virq); | 183 | int ps3_irq_plug_destroy(unsigned int virq); |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index e3c845b0f764..99348c1f4cab 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -100,6 +100,7 @@ | |||
100 | 100 | ||
101 | /* Flag indicating progress during context switch. */ | 101 | /* Flag indicating progress during context switch. */ |
102 | #define SPU_CONTEXT_SWITCH_PENDING 0UL | 102 | #define SPU_CONTEXT_SWITCH_PENDING 0UL |
103 | #define SPU_CONTEXT_FAULT_PENDING 1UL | ||
103 | 104 | ||
104 | struct spu_context; | 105 | struct spu_context; |
105 | struct spu_runqueue; | 106 | struct spu_runqueue; |
@@ -128,9 +129,10 @@ struct spu { | |||
128 | unsigned int irqs[3]; | 129 | unsigned int irqs[3]; |
129 | u32 node; | 130 | u32 node; |
130 | u64 flags; | 131 | u64 flags; |
131 | u64 dar; | ||
132 | u64 dsisr; | ||
133 | u64 class_0_pending; | 132 | u64 class_0_pending; |
133 | u64 class_0_dar; | ||
134 | u64 class_1_dar; | ||
135 | u64 class_1_dsisr; | ||
134 | size_t ls_size; | 136 | size_t ls_size; |
135 | unsigned int slb_replace; | 137 | unsigned int slb_replace; |
136 | struct mm_struct *mm; | 138 | struct mm_struct *mm; |
@@ -143,7 +145,7 @@ struct spu { | |||
143 | 145 | ||
144 | void (* wbox_callback)(struct spu *spu); | 146 | void (* wbox_callback)(struct spu *spu); |
145 | void (* ibox_callback)(struct spu *spu); | 147 | void (* ibox_callback)(struct spu *spu); |
146 | void (* stop_callback)(struct spu *spu); | 148 | void (* stop_callback)(struct spu *spu, int irq); |
147 | void (* mfc_callback)(struct spu *spu); | 149 | void (* mfc_callback)(struct spu *spu); |
148 | 150 | ||
149 | char irq_c0[8]; | 151 | char irq_c0[8]; |
diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h index 0ab6bff86078..a40fd491250c 100644 --- a/include/asm-powerpc/spu_csa.h +++ b/include/asm-powerpc/spu_csa.h | |||
@@ -254,7 +254,8 @@ struct spu_state { | |||
254 | u64 spu_chnldata_RW[32]; | 254 | u64 spu_chnldata_RW[32]; |
255 | u32 spu_mailbox_data[4]; | 255 | u32 spu_mailbox_data[4]; |
256 | u32 pu_mailbox_data[1]; | 256 | u32 pu_mailbox_data[1]; |
257 | u64 dar, dsisr, class_0_pending; | 257 | u64 class_0_dar, class_0_pending; |
258 | u64 class_1_dar, class_1_dsisr; | ||
258 | unsigned long suspend_time; | 259 | unsigned long suspend_time; |
259 | spinlock_t register_lock; | 260 | spinlock_t register_lock; |
260 | }; | 261 | }; |
diff --git a/include/asm-powerpc/syscalls.h b/include/asm-powerpc/syscalls.h index b3ca41fc8bb1..2b8a458f990a 100644 --- a/include/asm-powerpc/syscalls.h +++ b/include/asm-powerpc/syscalls.h | |||
@@ -30,7 +30,7 @@ asmlinkage int sys_fork(unsigned long p1, unsigned long p2, | |||
30 | asmlinkage int sys_vfork(unsigned long p1, unsigned long p2, | 30 | asmlinkage int sys_vfork(unsigned long p1, unsigned long p2, |
31 | unsigned long p3, unsigned long p4, unsigned long p5, | 31 | unsigned long p3, unsigned long p4, unsigned long p5, |
32 | unsigned long p6, struct pt_regs *regs); | 32 | unsigned long p6, struct pt_regs *regs); |
33 | asmlinkage int sys_pipe(int __user *fildes); | 33 | asmlinkage long sys_pipe(int __user *fildes); |
34 | asmlinkage long sys_rt_sigaction(int sig, | 34 | asmlinkage long sys_rt_sigaction(int sig, |
35 | const struct sigaction __user *act, | 35 | const struct sigaction __user *act, |
36 | struct sigaction __user *oact, size_t sigsetsize); | 36 | struct sigaction __user *oact, size_t sigsetsize); |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 2b6559a6d113..5235f875b932 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -34,7 +34,7 @@ | |||
34 | * SMP since it is only used to order updates to system memory. | 34 | * SMP since it is only used to order updates to system memory. |
35 | */ | 35 | */ |
36 | #define mb() __asm__ __volatile__ ("sync" : : : "memory") | 36 | #define mb() __asm__ __volatile__ ("sync" : : : "memory") |
37 | #define rmb() __asm__ __volatile__ (__stringify(LWSYNC) : : : "memory") | 37 | #define rmb() __asm__ __volatile__ ("sync" : : : "memory") |
38 | #define wmb() __asm__ __volatile__ ("sync" : : : "memory") | 38 | #define wmb() __asm__ __volatile__ ("sync" : : : "memory") |
39 | #define read_barrier_depends() do { } while(0) | 39 | #define read_barrier_depends() do { } while(0) |
40 | 40 | ||
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h index c243a6ac60e5..d3374bc865ba 100644 --- a/include/asm-powerpc/types.h +++ b/include/asm-powerpc/types.h | |||
@@ -1,6 +1,12 @@ | |||
1 | #ifndef _ASM_POWERPC_TYPES_H | 1 | #ifndef _ASM_POWERPC_TYPES_H |
2 | #define _ASM_POWERPC_TYPES_H | 2 | #define _ASM_POWERPC_TYPES_H |
3 | 3 | ||
4 | #ifdef __powerpc64__ | ||
5 | # include <asm-generic/int-l64.h> | ||
6 | #else | ||
7 | # include <asm-generic/int-ll64.h> | ||
8 | #endif | ||
9 | |||
4 | #ifndef __ASSEMBLY__ | 10 | #ifndef __ASSEMBLY__ |
5 | 11 | ||
6 | /* | 12 | /* |
@@ -22,30 +28,6 @@ typedef unsigned int umode_t; | |||
22 | typedef unsigned short umode_t; | 28 | typedef unsigned short umode_t; |
23 | #endif | 29 | #endif |
24 | 30 | ||
25 | /* | ||
26 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
27 | * header files exported to user space | ||
28 | */ | ||
29 | |||
30 | typedef __signed__ char __s8; | ||
31 | typedef unsigned char __u8; | ||
32 | |||
33 | typedef __signed__ short __s16; | ||
34 | typedef unsigned short __u16; | ||
35 | |||
36 | typedef __signed__ int __s32; | ||
37 | typedef unsigned int __u32; | ||
38 | |||
39 | #ifdef __powerpc64__ | ||
40 | typedef __signed__ long __s64; | ||
41 | typedef unsigned long __u64; | ||
42 | #else | ||
43 | #if defined(__GNUC__) | ||
44 | __extension__ typedef __signed__ long long __s64; | ||
45 | __extension__ typedef unsigned long long __u64; | ||
46 | #endif | ||
47 | #endif /* __powerpc64__ */ | ||
48 | |||
49 | typedef struct { | 31 | typedef struct { |
50 | __u32 u[4]; | 32 | __u32 u[4]; |
51 | } __attribute__((aligned(16))) __vector128; | 33 | } __attribute__((aligned(16))) __vector128; |
@@ -64,24 +46,6 @@ typedef struct { | |||
64 | 46 | ||
65 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
66 | 48 | ||
67 | |||
68 | typedef signed char s8; | ||
69 | typedef unsigned char u8; | ||
70 | |||
71 | typedef signed short s16; | ||
72 | typedef unsigned short u16; | ||
73 | |||
74 | typedef signed int s32; | ||
75 | typedef unsigned int u32; | ||
76 | |||
77 | #ifdef __powerpc64__ | ||
78 | typedef signed long s64; | ||
79 | typedef unsigned long u64; | ||
80 | #else | ||
81 | typedef signed long long s64; | ||
82 | typedef unsigned long long u64; | ||
83 | #endif | ||
84 | |||
85 | typedef __vector128 vector128; | 49 | typedef __vector128 vector128; |
86 | 50 | ||
87 | /* Physical address used by some IO functions */ | 51 | /* Physical address used by some IO functions */ |
diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h index 8e798e3758bc..1a0736f8803f 100644 --- a/include/asm-powerpc/uaccess.h +++ b/include/asm-powerpc/uaccess.h | |||
@@ -380,7 +380,7 @@ static inline unsigned long __copy_from_user_inatomic(void *to, | |||
380 | const void __user *from, unsigned long n) | 380 | const void __user *from, unsigned long n) |
381 | { | 381 | { |
382 | if (__builtin_constant_p(n) && (n <= 8)) { | 382 | if (__builtin_constant_p(n) && (n <= 8)) { |
383 | unsigned long ret; | 383 | unsigned long ret = 1; |
384 | 384 | ||
385 | switch (n) { | 385 | switch (n) { |
386 | case 1: | 386 | case 1: |
@@ -406,7 +406,7 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to, | |||
406 | const void *from, unsigned long n) | 406 | const void *from, unsigned long n) |
407 | { | 407 | { |
408 | if (__builtin_constant_p(n) && (n <= 8)) { | 408 | if (__builtin_constant_p(n) && (n <= 8)) { |
409 | unsigned long ret; | 409 | unsigned long ret = 1; |
410 | 410 | ||
411 | switch (n) { | 411 | switch (n) { |
412 | case 1: | 412 | case 1: |
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 0593cb889d45..70ebd333c55b 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
@@ -178,7 +178,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size | |||
178 | 178 | ||
179 | } | 179 | } |
180 | 180 | ||
181 | extern inline void * xchg_ptr(void * m, void * val) | 181 | static inline void * xchg_ptr(void * m, void * val) |
182 | { | 182 | { |
183 | return (void *) xchg_u32(m, (unsigned long) val); | 183 | return (void *) xchg_u32(m, (unsigned long) val); |
184 | } | 184 | } |
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 335baf4fc64f..9450ce6e32de 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -120,10 +120,10 @@ debug_entry_t* debug_exception_common(debug_info_t* id, int level, | |||
120 | 120 | ||
121 | /* Debug Feature API: */ | 121 | /* Debug Feature API: */ |
122 | 122 | ||
123 | debug_info_t* debug_register(char* name, int pages, int nr_areas, | 123 | debug_info_t *debug_register(const char *name, int pages, int nr_areas, |
124 | int buf_size); | 124 | int buf_size); |
125 | 125 | ||
126 | debug_info_t *debug_register_mode(char *name, int pages, int nr_areas, | 126 | debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, |
127 | int buf_size, mode_t mode, uid_t uid, | 127 | int buf_size, mode_t mode, uid_t uid, |
128 | gid_t gid); | 128 | gid_t gid); |
129 | 129 | ||
diff --git a/include/asm-s390/kvm_host.h b/include/asm-s390/kvm_host.h index f8204a4f2e02..18cbd8a39796 100644 --- a/include/asm-s390/kvm_host.h +++ b/include/asm-s390/kvm_host.h | |||
@@ -104,6 +104,7 @@ struct sie_block { | |||
104 | 104 | ||
105 | struct kvm_vcpu_stat { | 105 | struct kvm_vcpu_stat { |
106 | u32 exit_userspace; | 106 | u32 exit_userspace; |
107 | u32 exit_null; | ||
107 | u32 exit_external_request; | 108 | u32 exit_external_request; |
108 | u32 exit_external_interrupt; | 109 | u32 exit_external_interrupt; |
109 | u32 exit_stop_request; | 110 | u32 exit_stop_request; |
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index f0f4579eac13..12fd9c4f0f15 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -125,6 +125,17 @@ page_get_storage_key(unsigned long addr) | |||
125 | return skey; | 125 | return skey; |
126 | } | 126 | } |
127 | 127 | ||
128 | #ifdef CONFIG_PAGE_STATES | ||
129 | |||
130 | struct page; | ||
131 | void arch_free_page(struct page *page, int order); | ||
132 | void arch_alloc_page(struct page *page, int order); | ||
133 | |||
134 | #define HAVE_ARCH_FREE_PAGE | ||
135 | #define HAVE_ARCH_ALLOC_PAGE | ||
136 | |||
137 | #endif | ||
138 | |||
128 | #endif /* !__ASSEMBLY__ */ | 139 | #endif /* !__ASSEMBLY__ */ |
129 | 140 | ||
130 | /* to align the pointer to the (next) page boundary */ | 141 | /* to align the pointer to the (next) page boundary */ |
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index c7f4f8e3e297..bd0ea191dfa9 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -223,6 +223,9 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
223 | #define _PAGE_SPECIAL 0x004 /* SW associated with special page */ | 223 | #define _PAGE_SPECIAL 0x004 /* SW associated with special page */ |
224 | #define __HAVE_ARCH_PTE_SPECIAL | 224 | #define __HAVE_ARCH_PTE_SPECIAL |
225 | 225 | ||
226 | /* Set of bits not changed in pte_modify */ | ||
227 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_SPECIAL) | ||
228 | |||
226 | /* Six different types of pages. */ | 229 | /* Six different types of pages. */ |
227 | #define _PAGE_TYPE_EMPTY 0x400 | 230 | #define _PAGE_TYPE_EMPTY 0x400 |
228 | #define _PAGE_TYPE_NONE 0x401 | 231 | #define _PAGE_TYPE_NONE 0x401 |
@@ -681,7 +684,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt | |||
681 | */ | 684 | */ |
682 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 685 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
683 | { | 686 | { |
684 | pte_val(pte) &= PAGE_MASK; | 687 | pte_val(pte) &= _PAGE_CHG_MASK; |
685 | pte_val(pte) |= pgprot_val(newprot); | 688 | pte_val(pte) |= pgprot_val(newprot); |
686 | return pte; | 689 | return pte; |
687 | } | 690 | } |
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index 441d7c260857..d7d4e2eb3e6f 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h | |||
@@ -471,6 +471,8 @@ struct task_struct; | |||
471 | extern void user_enable_single_step(struct task_struct *); | 471 | extern void user_enable_single_step(struct task_struct *); |
472 | extern void user_disable_single_step(struct task_struct *); | 472 | extern void user_disable_single_step(struct task_struct *); |
473 | 473 | ||
474 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | ||
475 | |||
474 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) | 476 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) |
475 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) | 477 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) |
476 | #define regs_return_value(regs)((regs)->gprs[2]) | 478 | #define regs_return_value(regs)((regs)->gprs[2]) |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index c819ae25a842..819e7d99ca0c 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -116,6 +116,12 @@ extern void pfault_fini(void); | |||
116 | #define pfault_fini() do { } while (0) | 116 | #define pfault_fini() do { } while (0) |
117 | #endif /* CONFIG_PFAULT */ | 117 | #endif /* CONFIG_PFAULT */ |
118 | 118 | ||
119 | #ifdef CONFIG_PAGE_STATES | ||
120 | extern void cmma_init(void); | ||
121 | #else | ||
122 | static inline void cmma_init(void) { } | ||
123 | #endif | ||
124 | |||
119 | #define finish_arch_switch(prev) do { \ | 125 | #define finish_arch_switch(prev) do { \ |
120 | set_fs(current->thread.mm_segment); \ | 126 | set_fs(current->thread.mm_segment); \ |
121 | account_vtime(prev); \ | 127 | account_vtime(prev); \ |
@@ -309,14 +315,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
309 | asm volatile( \ | 315 | asm volatile( \ |
310 | " lctlg %1,%2,0(%0)\n" \ | 316 | " lctlg %1,%2,0(%0)\n" \ |
311 | : : "a" (&array), "i" (low), "i" (high), \ | 317 | : : "a" (&array), "i" (low), "i" (high), \ |
312 | "m" (*(addrtype *)(array))); \ | 318 | "m" (*(addrtype *)(&array))); \ |
313 | }) | 319 | }) |
314 | 320 | ||
315 | #define __ctl_store(array, low, high) ({ \ | 321 | #define __ctl_store(array, low, high) ({ \ |
316 | typedef struct { char _[sizeof(array)]; } addrtype; \ | 322 | typedef struct { char _[sizeof(array)]; } addrtype; \ |
317 | asm volatile( \ | 323 | asm volatile( \ |
318 | " stctg %2,%3,0(%1)\n" \ | 324 | " stctg %2,%3,0(%1)\n" \ |
319 | : "=m" (*(addrtype *)(array)) \ | 325 | : "=m" (*(addrtype *)(&array)) \ |
320 | : "a" (&array), "i" (low), "i" (high)); \ | 326 | : "a" (&array), "i" (low), "i" (high)); \ |
321 | }) | 327 | }) |
322 | 328 | ||
@@ -327,14 +333,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
327 | asm volatile( \ | 333 | asm volatile( \ |
328 | " lctl %1,%2,0(%0)\n" \ | 334 | " lctl %1,%2,0(%0)\n" \ |
329 | : : "a" (&array), "i" (low), "i" (high), \ | 335 | : : "a" (&array), "i" (low), "i" (high), \ |
330 | "m" (*(addrtype *)(array))); \ | 336 | "m" (*(addrtype *)(&array))); \ |
331 | }) | 337 | }) |
332 | 338 | ||
333 | #define __ctl_store(array, low, high) ({ \ | 339 | #define __ctl_store(array, low, high) ({ \ |
334 | typedef struct { char _[sizeof(array)]; } addrtype; \ | 340 | typedef struct { char _[sizeof(array)]; } addrtype; \ |
335 | asm volatile( \ | 341 | asm volatile( \ |
336 | " stctl %2,%3,0(%1)\n" \ | 342 | " stctl %2,%3,0(%1)\n" \ |
337 | : "=m" (*(addrtype *)(array)) \ | 343 | : "=m" (*(addrtype *)(&array)) \ |
338 | : "a" (&array), "i" (low), "i" (high)); \ | 344 | : "a" (&array), "i" (low), "i" (high)); \ |
339 | }) | 345 | }) |
340 | 346 | ||
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 2c5879ae90ca..41c547656130 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h | |||
@@ -9,34 +9,16 @@ | |||
9 | #ifndef _S390_TYPES_H | 9 | #ifndef _S390_TYPES_H |
10 | #define _S390_TYPES_H | 10 | #define _S390_TYPES_H |
11 | 11 | ||
12 | #ifndef __s390x__ | ||
13 | # include <asm-generic/int-ll64.h> | ||
14 | #else | ||
15 | # include <asm-generic/int-l64.h> | ||
16 | #endif | ||
17 | |||
12 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
13 | 19 | ||
14 | typedef unsigned short umode_t; | 20 | typedef unsigned short umode_t; |
15 | 21 | ||
16 | /* | ||
17 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
18 | * header files exported to user space | ||
19 | */ | ||
20 | |||
21 | typedef __signed__ char __s8; | ||
22 | typedef unsigned char __u8; | ||
23 | |||
24 | typedef __signed__ short __s16; | ||
25 | typedef unsigned short __u16; | ||
26 | |||
27 | typedef __signed__ int __s32; | ||
28 | typedef unsigned int __u32; | ||
29 | |||
30 | #ifndef __s390x__ | ||
31 | #if defined(__GNUC__) | ||
32 | __extension__ typedef __signed__ long long __s64; | ||
33 | __extension__ typedef unsigned long long __u64; | ||
34 | #endif | ||
35 | #else /* __s390x__ */ | ||
36 | typedef __signed__ long __s64; | ||
37 | typedef unsigned long __u64; | ||
38 | #endif | ||
39 | |||
40 | /* A address type so that arithmetic can be done on it & it can be upgraded to | 22 | /* A address type so that arithmetic can be done on it & it can be upgraded to |
41 | 64 bit when necessary | 23 | 64 bit when necessary |
42 | */ | 24 | */ |
@@ -58,25 +40,13 @@ typedef __signed__ long saddr_t; | |||
58 | 40 | ||
59 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
60 | 42 | ||
61 | 43 | typedef u64 dma64_addr_t; | |
62 | typedef signed char s8; | 44 | #ifdef __s390x__ |
63 | typedef unsigned char u8; | 45 | /* DMA addresses come in 32-bit and 64-bit flavours. */ |
64 | 46 | typedef u64 dma_addr_t; | |
65 | typedef signed short s16; | 47 | #else |
66 | typedef unsigned short u16; | ||
67 | |||
68 | typedef signed int s32; | ||
69 | typedef unsigned int u32; | ||
70 | |||
71 | #ifndef __s390x__ | ||
72 | typedef signed long long s64; | ||
73 | typedef unsigned long long u64; | ||
74 | #else /* __s390x__ */ | ||
75 | typedef signed long s64; | ||
76 | typedef unsigned long u64; | ||
77 | #endif /* __s390x__ */ | ||
78 | |||
79 | typedef u32 dma_addr_t; | 48 | typedef u32 dma_addr_t; |
49 | #endif | ||
80 | 50 | ||
81 | #ifndef __s390x__ | 51 | #ifndef __s390x__ |
82 | typedef union { | 52 | typedef union { |
diff --git a/include/asm-sh/checksum_32.h b/include/asm-sh/checksum_32.h index 4bc8357e8892..14b7ac2f0a07 100644 --- a/include/asm-sh/checksum_32.h +++ b/include/asm-sh/checksum_32.h | |||
@@ -109,7 +109,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
109 | will assume they contain their original values. */ | 109 | will assume they contain their original values. */ |
110 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) | 110 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) |
111 | : "1" (iph), "2" (ihl) | 111 | : "1" (iph), "2" (ihl) |
112 | : "t"); | 112 | : "t", "memory"); |
113 | 113 | ||
114 | return csum_fold(sum); | 114 | return csum_fold(sum); |
115 | } | 115 | } |
diff --git a/include/asm-sh/cpu-sh3/dma.h b/include/asm-sh/cpu-sh3/dma.h index 092ff9d872c3..6813c3220a1d 100644 --- a/include/asm-sh/cpu-sh3/dma.h +++ b/include/asm-sh/cpu-sh3/dma.h | |||
@@ -3,19 +3,19 @@ | |||
3 | 3 | ||
4 | 4 | ||
5 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 5 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
6 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 6 | defined(CONFIG_CPU_SUBTYPE_SH7721) |
7 | defined(CONFIG_CPU_SUBTYPE_SH7709) | ||
8 | #define SH_DMAC_BASE 0xa4010020 | 7 | #define SH_DMAC_BASE 0xa4010020 |
8 | #else | ||
9 | #define SH_DMAC_BASE 0xa4000020 | ||
10 | #endif | ||
9 | 11 | ||
12 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) || defined(CONFIG_CPU_SUBTYPE_SH7709) | ||
10 | #define DMTE0_IRQ 48 | 13 | #define DMTE0_IRQ 48 |
11 | #define DMTE1_IRQ 49 | 14 | #define DMTE1_IRQ 49 |
12 | #define DMTE2_IRQ 50 | 15 | #define DMTE2_IRQ 50 |
13 | #define DMTE3_IRQ 51 | 16 | #define DMTE3_IRQ 51 |
14 | #define DMTE4_IRQ 76 | 17 | #define DMTE4_IRQ 76 |
15 | #define DMTE5_IRQ 77 | 18 | #define DMTE5_IRQ 77 |
16 | |||
17 | #else | ||
18 | #define SH_DMAC_BASE 0xa4000020 | ||
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* Definitions for the SuperH DMAC */ | 21 | /* Definitions for the SuperH DMAC */ |
diff --git a/include/asm-sh/hw_irq.h b/include/asm-sh/hw_irq.h index c958fdaa0095..7438d1e21bc9 100644 --- a/include/asm-sh/hw_irq.h +++ b/include/asm-sh/hw_irq.h | |||
@@ -79,6 +79,10 @@ struct intc_desc { | |||
79 | struct intc_sense_reg *sense_regs; | 79 | struct intc_sense_reg *sense_regs; |
80 | unsigned int nr_sense_regs; | 80 | unsigned int nr_sense_regs; |
81 | char *name; | 81 | char *name; |
82 | #ifdef CONFIG_CPU_SH3 | ||
83 | struct intc_mask_reg *ack_regs; | ||
84 | unsigned int nr_ack_regs; | ||
85 | #endif | ||
82 | }; | 86 | }; |
83 | 87 | ||
84 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) | 88 | #define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) |
@@ -91,10 +95,25 @@ struct intc_desc symbol __initdata = { \ | |||
91 | chipname, \ | 95 | chipname, \ |
92 | } | 96 | } |
93 | 97 | ||
98 | #ifdef CONFIG_CPU_SH3 | ||
99 | #define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ | ||
100 | mask_regs, prio_regs, sense_regs, ack_regs) \ | ||
101 | struct intc_desc symbol __initdata = { \ | ||
102 | _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ | ||
103 | _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ | ||
104 | _INTC_ARRAY(sense_regs), \ | ||
105 | chipname, \ | ||
106 | _INTC_ARRAY(ack_regs), \ | ||
107 | } | ||
108 | #endif | ||
109 | |||
94 | void __init register_intc_controller(struct intc_desc *desc); | 110 | void __init register_intc_controller(struct intc_desc *desc); |
95 | int intc_set_priority(unsigned int irq, unsigned int prio); | 111 | int intc_set_priority(unsigned int irq, unsigned int prio); |
96 | 112 | ||
97 | void __init plat_irq_setup(void); | 113 | void __init plat_irq_setup(void); |
114 | #ifdef CONFIG_CPU_SH3 | ||
115 | void __init plat_irq_setup_sh3(void); | ||
116 | #endif | ||
98 | 117 | ||
99 | enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210, | 118 | enum { IRQ_MODE_IRQ, IRQ_MODE_IRQ7654, IRQ_MODE_IRQ3210, |
100 | IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK, | 119 | IRQ_MODE_IRL7654_MASK, IRQ_MODE_IRL3210_MASK, |
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index 356e50d06745..a4fbf0c84fb1 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -268,11 +268,6 @@ unsigned long long peek_real_address_q(unsigned long long addr); | |||
268 | unsigned long long poke_real_address_q(unsigned long long addr, | 268 | unsigned long long poke_real_address_q(unsigned long long addr, |
269 | unsigned long long val); | 269 | unsigned long long val); |
270 | 270 | ||
271 | /* arch/sh/mm/ioremap_64.c */ | ||
272 | unsigned long onchip_remap(unsigned long addr, unsigned long size, | ||
273 | const char *name); | ||
274 | extern void onchip_unmap(unsigned long vaddr); | ||
275 | |||
276 | #if !defined(CONFIG_MMU) | 271 | #if !defined(CONFIG_MMU) |
277 | #define virt_to_phys(address) ((unsigned long)(address)) | 272 | #define virt_to_phys(address) ((unsigned long)(address)) |
278 | #define phys_to_virt(address) ((void *)(address)) | 273 | #define phys_to_virt(address) ((void *)(address)) |
@@ -302,9 +297,16 @@ extern void onchip_unmap(unsigned long vaddr); | |||
302 | void __iomem *__ioremap(unsigned long offset, unsigned long size, | 297 | void __iomem *__ioremap(unsigned long offset, unsigned long size, |
303 | unsigned long flags); | 298 | unsigned long flags); |
304 | void __iounmap(void __iomem *addr); | 299 | void __iounmap(void __iomem *addr); |
300 | |||
301 | /* arch/sh/mm/ioremap_64.c */ | ||
302 | unsigned long onchip_remap(unsigned long addr, unsigned long size, | ||
303 | const char *name); | ||
304 | extern void onchip_unmap(unsigned long vaddr); | ||
305 | #else | 305 | #else |
306 | #define __ioremap(offset, size, flags) ((void __iomem *)(offset)) | 306 | #define __ioremap(offset, size, flags) ((void __iomem *)(offset)) |
307 | #define __iounmap(addr) do { } while (0) | 307 | #define __iounmap(addr) do { } while (0) |
308 | #define onchip_remap(addr, size, name) (addr) | ||
309 | #define onchip_unmap(addr) do { } while (0) | ||
308 | #endif /* CONFIG_MMU */ | 310 | #endif /* CONFIG_MMU */ |
309 | 311 | ||
310 | static inline void __iomem * | 312 | static inline void __iomem * |
diff --git a/include/asm-sh/keyboard.h b/include/asm-sh/keyboard.h deleted file mode 100644 index 31dcc4fa5f28..000000000000 --- a/include/asm-sh/keyboard.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ASM_SH_KEYBOARD_H | ||
2 | #define __ASM_SH_KEYBOARD_H | ||
3 | /* | ||
4 | * $Id: keyboard.h,v 1.1.1.1 2001/10/15 20:45:09 mrbrown Exp $ | ||
5 | */ | ||
6 | |||
7 | #include <linux/kd.h> | ||
8 | #include <asm/machvec.h> | ||
9 | |||
10 | #ifdef CONFIG_SH_MPC1211 | ||
11 | #include <asm/mpc1211/keyboard-mpc1211.h> | ||
12 | #endif | ||
13 | #endif | ||
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h index 4bc8cb187d11..24e42078f36f 100644 --- a/include/asm-sh/kgdb.h +++ b/include/asm-sh/kgdb.h | |||
@@ -66,18 +66,4 @@ extern int setjmp(jmp_buf __jmpb); | |||
66 | /* Forced breakpoint */ | 66 | /* Forced breakpoint */ |
67 | #define breakpoint() __asm__ __volatile__("trapa #0x3c") | 67 | #define breakpoint() __asm__ __volatile__("trapa #0x3c") |
68 | 68 | ||
69 | /* Taken from sh-stub.c of GDB 4.18 */ | ||
70 | static const char hexchars[] = "0123456789abcdef"; | ||
71 | |||
72 | /* Get high hex bits */ | ||
73 | static inline char highhex(const int x) | ||
74 | { | ||
75 | return hexchars[(x >> 4) & 0xf]; | ||
76 | } | ||
77 | |||
78 | /* Get low hex bits */ | ||
79 | static inline char lowhex(const int x) | ||
80 | { | ||
81 | return hexchars[x & 0xf]; | ||
82 | } | ||
83 | #endif | 69 | #endif |
diff --git a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h index fe58d00b250c..87e812f68bb0 100644 --- a/include/asm-sh/mmu_context.h +++ b/include/asm-sh/mmu_context.h | |||
@@ -27,6 +27,7 @@ | |||
27 | /* ASID is 8-bit value, so it can't be 0x100 */ | 27 | /* ASID is 8-bit value, so it can't be 0x100 */ |
28 | #define MMU_NO_ASID 0x100 | 28 | #define MMU_NO_ASID 0x100 |
29 | 29 | ||
30 | #ifdef CONFIG_MMU | ||
30 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) | 31 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) |
31 | #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) | 32 | #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) |
32 | 33 | ||
@@ -38,7 +39,6 @@ | |||
38 | */ | 39 | */ |
39 | #define MMU_VPN_MASK 0xfffff000 | 40 | #define MMU_VPN_MASK 0xfffff000 |
40 | 41 | ||
41 | #ifdef CONFIG_MMU | ||
42 | #if defined(CONFIG_SUPERH32) | 42 | #if defined(CONFIG_SUPERH32) |
43 | #include "mmu_context_32.h" | 43 | #include "mmu_context_32.h" |
44 | #else | 44 | #else |
@@ -129,6 +129,8 @@ static inline void switch_mm(struct mm_struct *prev, | |||
129 | #define destroy_context(mm) do { } while (0) | 129 | #define destroy_context(mm) do { } while (0) |
130 | #define set_asid(asid) do { } while (0) | 130 | #define set_asid(asid) do { } while (0) |
131 | #define get_asid() (0) | 131 | #define get_asid() (0) |
132 | #define cpu_asid(cpu, mm) ({ (void)cpu; 0; }) | ||
133 | #define switch_and_save_asid(asid) (0) | ||
132 | #define set_TTB(pgd) do { } while (0) | 134 | #define set_TTB(pgd) do { } while (0) |
133 | #define get_TTB() (0) | 135 | #define get_TTB() (0) |
134 | #define activate_context(mm,cpu) do { } while (0) | 136 | #define activate_context(mm,cpu) do { } while (0) |
diff --git a/include/asm-sh/mmzone.h b/include/asm-sh/mmzone.h index 7969f381dff2..2969253c4042 100644 --- a/include/asm-sh/mmzone.h +++ b/include/asm-sh/mmzone.h | |||
@@ -41,6 +41,8 @@ void __init plat_mem_setup(void); | |||
41 | 41 | ||
42 | /* arch/sh/kernel/setup.c */ | 42 | /* arch/sh/kernel/setup.c */ |
43 | void __init setup_bootmem_allocator(unsigned long start_pfn); | 43 | void __init setup_bootmem_allocator(unsigned long start_pfn); |
44 | void __init __add_active_range(unsigned int nid, unsigned long start_pfn, | ||
45 | unsigned long end_pfn); | ||
44 | 46 | ||
45 | #endif /* __KERNEL__ */ | 47 | #endif /* __KERNEL__ */ |
46 | #endif /* __ASM_SH_MMZONE_H */ | 48 | #endif /* __ASM_SH_MMZONE_H */ |
diff --git a/include/asm-sh/mpc1211/dma.h b/include/asm-sh/mpc1211/dma.h deleted file mode 100644 index e506d1aaa0d0..000000000000 --- a/include/asm-sh/mpc1211/dma.h +++ /dev/null | |||
@@ -1,303 +0,0 @@ | |||
1 | /* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $ | ||
2 | * linux/include/asm/dma.h: Defines for using and allocating dma channels. | ||
3 | * Written by Hennus Bergman, 1992. | ||
4 | * High DMA channel support & info by Hannu Savolainen | ||
5 | * and John Boyd, Nov. 1992. | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_MPC1211_DMA_H | ||
9 | #define _ASM_MPC1211_DMA_H | ||
10 | |||
11 | #include <linux/spinlock.h> /* And spinlocks */ | ||
12 | #include <asm/io.h> /* need byte IO */ | ||
13 | #include <linux/delay.h> | ||
14 | |||
15 | |||
16 | #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER | ||
17 | #define dma_outb outb_p | ||
18 | #else | ||
19 | #define dma_outb outb | ||
20 | #endif | ||
21 | |||
22 | #define dma_inb inb | ||
23 | |||
24 | /* | ||
25 | * NOTES about DMA transfers: | ||
26 | * | ||
27 | * controller 1: channels 0-3, byte operations, ports 00-1F | ||
28 | * controller 2: channels 4-7, word operations, ports C0-DF | ||
29 | * | ||
30 | * - ALL registers are 8 bits only, regardless of transfer size | ||
31 | * - channel 4 is not used - cascades 1 into 2. | ||
32 | * - channels 0-3 are byte - addresses/counts are for physical bytes | ||
33 | * - channels 5-7 are word - addresses/counts are for physical words | ||
34 | * - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries | ||
35 | * - transfer count loaded to registers is 1 less than actual count | ||
36 | * - controller 2 offsets are all even (2x offsets for controller 1) | ||
37 | * - page registers for 5-7 don't use data bit 0, represent 128K pages | ||
38 | * - page registers for 0-3 use bit 0, represent 64K pages | ||
39 | * | ||
40 | * DMA transfers are limited to the lower 16MB of _physical_ memory. | ||
41 | * Note that addresses loaded into registers must be _physical_ addresses, | ||
42 | * not logical addresses (which may differ if paging is active). | ||
43 | * | ||
44 | * Address mapping for channels 0-3: | ||
45 | * | ||
46 | * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses) | ||
47 | * | ... | | ... | | ... | | ||
48 | * | ... | | ... | | ... | | ||
49 | * | ... | | ... | | ... | | ||
50 | * P7 ... P0 A7 ... A0 A7 ... A0 | ||
51 | * | Page | Addr MSB | Addr LSB | (DMA registers) | ||
52 | * | ||
53 | * Address mapping for channels 5-7: | ||
54 | * | ||
55 | * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses) | ||
56 | * | ... | \ \ ... \ \ \ ... \ \ | ||
57 | * | ... | \ \ ... \ \ \ ... \ (not used) | ||
58 | * | ... | \ \ ... \ \ \ ... \ | ||
59 | * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0 | ||
60 | * | Page | Addr MSB | Addr LSB | (DMA registers) | ||
61 | * | ||
62 | * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses | ||
63 | * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at | ||
64 | * the hardware level, so odd-byte transfers aren't possible). | ||
65 | * | ||
66 | * Transfer count (_not # bytes_) is limited to 64K, represented as actual | ||
67 | * count - 1 : 64K => 0xFFFF, 1 => 0x0000. Thus, count is always 1 or more, | ||
68 | * and up to 128K bytes may be transferred on channels 5-7 in one operation. | ||
69 | * | ||
70 | */ | ||
71 | |||
72 | #define MAX_DMA_CHANNELS 8 | ||
73 | |||
74 | /* The maximum address that we can perform a DMA transfer to on this platform */ | ||
75 | #define MAX_DMA_ADDRESS (PAGE_OFFSET+0x10000000) | ||
76 | |||
77 | /* 8237 DMA controllers */ | ||
78 | #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ | ||
79 | #define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */ | ||
80 | |||
81 | /* DMA controller registers */ | ||
82 | #define DMA1_CMD_REG 0x08 /* command register (w) */ | ||
83 | #define DMA1_STAT_REG 0x08 /* status register (r) */ | ||
84 | #define DMA1_REQ_REG 0x09 /* request register (w) */ | ||
85 | #define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ | ||
86 | #define DMA1_MODE_REG 0x0B /* mode register (w) */ | ||
87 | #define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ | ||
88 | #define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ | ||
89 | #define DMA1_RESET_REG 0x0D /* Master Clear (w) */ | ||
90 | #define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ | ||
91 | #define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ | ||
92 | |||
93 | #define DMA2_CMD_REG 0xD0 /* command register (w) */ | ||
94 | #define DMA2_STAT_REG 0xD0 /* status register (r) */ | ||
95 | #define DMA2_REQ_REG 0xD2 /* request register (w) */ | ||
96 | #define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ | ||
97 | #define DMA2_MODE_REG 0xD6 /* mode register (w) */ | ||
98 | #define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ | ||
99 | #define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ | ||
100 | #define DMA2_RESET_REG 0xDA /* Master Clear (w) */ | ||
101 | #define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ | ||
102 | #define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ | ||
103 | |||
104 | #define DMA_ADDR_0 0x00 /* DMA address registers */ | ||
105 | #define DMA_ADDR_1 0x02 | ||
106 | #define DMA_ADDR_2 0x04 | ||
107 | #define DMA_ADDR_3 0x06 | ||
108 | #define DMA_ADDR_4 0xC0 | ||
109 | #define DMA_ADDR_5 0xC4 | ||
110 | #define DMA_ADDR_6 0xC8 | ||
111 | #define DMA_ADDR_7 0xCC | ||
112 | |||
113 | #define DMA_CNT_0 0x01 /* DMA count registers */ | ||
114 | #define DMA_CNT_1 0x03 | ||
115 | #define DMA_CNT_2 0x05 | ||
116 | #define DMA_CNT_3 0x07 | ||
117 | #define DMA_CNT_4 0xC2 | ||
118 | #define DMA_CNT_5 0xC6 | ||
119 | #define DMA_CNT_6 0xCA | ||
120 | #define DMA_CNT_7 0xCE | ||
121 | |||
122 | #define DMA_PAGE_0 0x87 /* DMA page registers */ | ||
123 | #define DMA_PAGE_1 0x83 | ||
124 | #define DMA_PAGE_2 0x81 | ||
125 | #define DMA_PAGE_3 0x82 | ||
126 | #define DMA_PAGE_5 0x8B | ||
127 | #define DMA_PAGE_6 0x89 | ||
128 | #define DMA_PAGE_7 0x8A | ||
129 | |||
130 | #define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ | ||
131 | #define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ | ||
132 | #define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ | ||
133 | |||
134 | #define DMA_AUTOINIT 0x10 | ||
135 | |||
136 | |||
137 | extern spinlock_t dma_spin_lock; | ||
138 | |||
139 | static __inline__ unsigned long claim_dma_lock(void) | ||
140 | { | ||
141 | unsigned long flags; | ||
142 | spin_lock_irqsave(&dma_spin_lock, flags); | ||
143 | return flags; | ||
144 | } | ||
145 | |||
146 | static __inline__ void release_dma_lock(unsigned long flags) | ||
147 | { | ||
148 | spin_unlock_irqrestore(&dma_spin_lock, flags); | ||
149 | } | ||
150 | |||
151 | /* enable/disable a specific DMA channel */ | ||
152 | static __inline__ void enable_dma(unsigned int dmanr) | ||
153 | { | ||
154 | if (dmanr<=3) | ||
155 | dma_outb(dmanr, DMA1_MASK_REG); | ||
156 | else | ||
157 | dma_outb(dmanr & 3, DMA2_MASK_REG); | ||
158 | } | ||
159 | |||
160 | static __inline__ void disable_dma(unsigned int dmanr) | ||
161 | { | ||
162 | if (dmanr<=3) | ||
163 | dma_outb(dmanr | 4, DMA1_MASK_REG); | ||
164 | else | ||
165 | dma_outb((dmanr & 3) | 4, DMA2_MASK_REG); | ||
166 | } | ||
167 | |||
168 | /* Clear the 'DMA Pointer Flip Flop'. | ||
169 | * Write 0 for LSB/MSB, 1 for MSB/LSB access. | ||
170 | * Use this once to initialize the FF to a known state. | ||
171 | * After that, keep track of it. :-) | ||
172 | * --- In order to do that, the DMA routines below should --- | ||
173 | * --- only be used while holding the DMA lock ! --- | ||
174 | */ | ||
175 | static __inline__ void clear_dma_ff(unsigned int dmanr) | ||
176 | { | ||
177 | if (dmanr<=3) | ||
178 | dma_outb(0, DMA1_CLEAR_FF_REG); | ||
179 | else | ||
180 | dma_outb(0, DMA2_CLEAR_FF_REG); | ||
181 | } | ||
182 | |||
183 | /* set mode (above) for a specific DMA channel */ | ||
184 | static __inline__ void set_dma_mode(unsigned int dmanr, char mode) | ||
185 | { | ||
186 | if (dmanr<=3) | ||
187 | dma_outb(mode | dmanr, DMA1_MODE_REG); | ||
188 | else | ||
189 | dma_outb(mode | (dmanr&3), DMA2_MODE_REG); | ||
190 | } | ||
191 | |||
192 | /* Set only the page register bits of the transfer address. | ||
193 | * This is used for successive transfers when we know the contents of | ||
194 | * the lower 16 bits of the DMA current address register, but a 64k boundary | ||
195 | * may have been crossed. | ||
196 | */ | ||
197 | static __inline__ void set_dma_page(unsigned int dmanr, unsigned int pagenr) | ||
198 | { | ||
199 | switch(dmanr) { | ||
200 | case 0: | ||
201 | dma_outb( pagenr & 0xff, DMA_PAGE_0); | ||
202 | dma_outb((pagenr >> 8) & 0xff, DMA_PAGE_0 + 0x400); | ||
203 | break; | ||
204 | case 1: | ||
205 | dma_outb( pagenr & 0xff, DMA_PAGE_1); | ||
206 | dma_outb((pagenr >> 8) & 0xff, DMA_PAGE_1 + 0x400); | ||
207 | break; | ||
208 | case 2: | ||
209 | dma_outb( pagenr & 0xff, DMA_PAGE_2); | ||
210 | dma_outb((pagenr >> 8) & 0xff, DMA_PAGE_2 + 0x400); | ||
211 | break; | ||
212 | case 3: | ||
213 | dma_outb( pagenr & 0xff, DMA_PAGE_3); | ||
214 | dma_outb((pagenr >> 8) & 0xff, DMA_PAGE_3 + 0x400); | ||
215 | break; | ||
216 | case 5: | ||
217 | dma_outb( pagenr & 0xfe, DMA_PAGE_5); | ||
218 | dma_outb((pagenr >> 8) & 0xff, DMA_PAGE_5 + 0x400); | ||
219 | break; | ||
220 | case 6: | ||
221 | dma_outb( pagenr & 0xfe, DMA_PAGE_6); | ||
222 | dma_outb((pagenr >> 8) & 0xff, DMA_PAGE_6 + 0x400); | ||
223 | break; | ||
224 | case 7: | ||
225 | dma_outb( pagenr & 0xfe, DMA_PAGE_7); | ||
226 | dma_outb((pagenr >> 8) & 0xff, DMA_PAGE_7 + 0x400); | ||
227 | break; | ||
228 | } | ||
229 | } | ||
230 | |||
231 | |||
232 | /* Set transfer address & page bits for specific DMA channel. | ||
233 | * Assumes dma flipflop is clear. | ||
234 | */ | ||
235 | static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) | ||
236 | { | ||
237 | set_dma_page(dmanr, a>>16); | ||
238 | if (dmanr <= 3) { | ||
239 | dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); | ||
240 | dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); | ||
241 | } else { | ||
242 | dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); | ||
243 | dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); | ||
244 | } | ||
245 | } | ||
246 | |||
247 | |||
248 | /* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for | ||
249 | * a specific DMA channel. | ||
250 | * You must ensure the parameters are valid. | ||
251 | * NOTE: from a manual: "the number of transfers is one more | ||
252 | * than the initial word count"! This is taken into account. | ||
253 | * Assumes dma flip-flop is clear. | ||
254 | * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7. | ||
255 | */ | ||
256 | static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) | ||
257 | { | ||
258 | count--; | ||
259 | if (dmanr <= 3) { | ||
260 | dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); | ||
261 | dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); | ||
262 | } else { | ||
263 | dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); | ||
264 | dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); | ||
265 | } | ||
266 | } | ||
267 | |||
268 | |||
269 | /* Get DMA residue count. After a DMA transfer, this | ||
270 | * should return zero. Reading this while a DMA transfer is | ||
271 | * still in progress will return unpredictable results. | ||
272 | * If called before the channel has been used, it may return 1. | ||
273 | * Otherwise, it returns the number of _bytes_ left to transfer. | ||
274 | * | ||
275 | * Assumes DMA flip-flop is clear. | ||
276 | */ | ||
277 | static __inline__ int get_dma_residue(unsigned int dmanr) | ||
278 | { | ||
279 | unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE | ||
280 | : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE; | ||
281 | |||
282 | /* using short to get 16-bit wrap around */ | ||
283 | unsigned short count; | ||
284 | |||
285 | count = 1 + dma_inb(io_port); | ||
286 | count += dma_inb(io_port) << 8; | ||
287 | return (dmanr<=3)? count : (count<<1); | ||
288 | } | ||
289 | |||
290 | |||
291 | /* These are in kernel/dma.c: */ | ||
292 | extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */ | ||
293 | extern void free_dma(unsigned int dmanr); /* release it again */ | ||
294 | |||
295 | /* From PCI */ | ||
296 | |||
297 | #ifdef CONFIG_PCI | ||
298 | extern int isa_dma_bridge_buggy; | ||
299 | #else | ||
300 | #define isa_dma_bridge_buggy (0) | ||
301 | #endif | ||
302 | |||
303 | #endif /* _ASM_MPC1211_DMA_H */ | ||
diff --git a/include/asm-sh/mpc1211/io.h b/include/asm-sh/mpc1211/io.h deleted file mode 100644 index 6298370bec2d..000000000000 --- a/include/asm-sh/mpc1211/io.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/mpc1211/io.h | ||
3 | * | ||
4 | * Copyright 2001 Saito.K & Jeanne | ||
5 | * | ||
6 | * IO functions for an Interface MPC-1211 | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_SH_IO_MPC1211_H | ||
10 | #define _ASM_SH_IO_MPC1211_H | ||
11 | |||
12 | #include <linux/time.h> | ||
13 | |||
14 | extern int mpc1211_irq_demux(int irq); | ||
15 | |||
16 | extern void init_mpc1211_IRQ(void); | ||
17 | extern void heartbeat_mpc1211(void); | ||
18 | |||
19 | extern void mpc1211_rtc_gettimeofday(struct timeval *tv); | ||
20 | extern int mpc1211_rtc_settimeofday(const struct timeval *tv); | ||
21 | |||
22 | #endif /* _ASM_SH_IO_MPC1211_H */ | ||
diff --git a/include/asm-sh/mpc1211/keyboard.h b/include/asm-sh/mpc1211/keyboard.h deleted file mode 100644 index 9020feee7b4c..000000000000 --- a/include/asm-sh/mpc1211/keyboard.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * MPC1211 specific keybord definitions | ||
3 | * Taken from the old asm-i386/keybord.h for PC/AT-style definitions | ||
4 | * created 3 Nov 1996 by Geert Uytterhoeven. | ||
5 | */ | ||
6 | |||
7 | #ifdef __KERNEL__ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/ioport.h> | ||
11 | #include <linux/kd.h> | ||
12 | #include <linux/pm.h> | ||
13 | #include <asm/io.h> | ||
14 | |||
15 | #define KEYBOARD_IRQ 1 | ||
16 | #define DISABLE_KBD_DURING_INTERRUPTS 0 | ||
17 | |||
18 | extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); | ||
19 | extern int pckbd_getkeycode(unsigned int scancode); | ||
20 | extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, | ||
21 | char raw_mode); | ||
22 | extern char pckbd_unexpected_up(unsigned char keycode); | ||
23 | extern void pckbd_leds(unsigned char leds); | ||
24 | extern void pckbd_init_hw(void); | ||
25 | extern int pckbd_pm_resume(struct pm_dev *, pm_request_t, void *); | ||
26 | extern pm_callback pm_kbd_request_override; | ||
27 | |||
28 | #define kbd_setkeycode pckbd_setkeycode | ||
29 | #define kbd_getkeycode pckbd_getkeycode | ||
30 | #define kbd_translate pckbd_translate | ||
31 | #define kbd_unexpected_up pckbd_unexpected_up | ||
32 | #define kbd_leds pckbd_leds | ||
33 | #define kbd_init_hw pckbd_init_hw | ||
34 | |||
35 | /* resource allocation */ | ||
36 | #define kbd_request_region() | ||
37 | #define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \ | ||
38 | "keyboard", NULL) | ||
39 | |||
40 | /* How to access the keyboard macros on this platform. */ | ||
41 | #define kbd_read_input() inb(KBD_DATA_REG) | ||
42 | #define kbd_read_status() inb(KBD_STATUS_REG) | ||
43 | #define kbd_write_output(val) outb(val, KBD_DATA_REG) | ||
44 | #define kbd_write_command(val) outb(val, KBD_CNTL_REG) | ||
45 | |||
46 | /* Some stoneage hardware needs delays after some operations. */ | ||
47 | #define kbd_pause() do { } while(0) | ||
48 | |||
49 | /* | ||
50 | * Machine specific bits for the PS/2 driver | ||
51 | */ | ||
52 | |||
53 | #define AUX_IRQ 12 | ||
54 | |||
55 | #define aux_request_irq(hand, dev_id) \ | ||
56 | request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id) | ||
57 | |||
58 | #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) | ||
59 | |||
60 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-sh/mpc1211/m1543c.h b/include/asm-sh/mpc1211/m1543c.h deleted file mode 100644 index c95d13236c3b..000000000000 --- a/include/asm-sh/mpc1211/m1543c.h +++ /dev/null | |||
@@ -1,200 +0,0 @@ | |||
1 | #ifndef __ASM_SH_M1543C_H | ||
2 | #define __ASM_SH_M1543C_H | ||
3 | |||
4 | /* | ||
5 | * linux/include/asm-sh/m1543c.h | ||
6 | * Copyright (C) 2001 Nobuhiro Sakawa | ||
7 | * M1543C:PCI-ISA Bus Bridge with Super IO Chip support | ||
8 | * | ||
9 | * from | ||
10 | * | ||
11 | * linux/include/asm-sh/smc37c93x.h | ||
12 | * | ||
13 | * Copyright (C) 2000 Kazumoto Kojima | ||
14 | * | ||
15 | * SMSC 37C93x Super IO Chip support | ||
16 | */ | ||
17 | |||
18 | /* Default base I/O address */ | ||
19 | #define FDC_PRIMARY_BASE 0x3f0 | ||
20 | #define IDE1_PRIMARY_BASE 0x1f0 | ||
21 | #define IDE1_SECONDARY_BASE 0x170 | ||
22 | #define PARPORT_PRIMARY_BASE 0x378 | ||
23 | #define COM1_PRIMARY_BASE 0x2f8 | ||
24 | #define COM2_PRIMARY_BASE 0x3f8 | ||
25 | #define COM3_PRIMARY_BASE 0x3e8 | ||
26 | #define RTC_PRIMARY_BASE 0x070 | ||
27 | #define KBC_PRIMARY_BASE 0x060 | ||
28 | #define AUXIO_PRIMARY_BASE 0x000 /* XXX */ | ||
29 | #define I8259_M_CR 0x20 | ||
30 | #define I8259_M_MR 0x21 | ||
31 | #define I8259_S_CR 0xa0 | ||
32 | #define I8259_S_MR 0xa1 | ||
33 | |||
34 | /* Logical device number */ | ||
35 | #define LDN_FDC 0 | ||
36 | #define LDN_IDE1 1 | ||
37 | #define LDN_IDE2 2 | ||
38 | #define LDN_PARPORT 3 | ||
39 | #define LDN_COM1 4 | ||
40 | #define LDN_COM2 5 | ||
41 | #define LDN_COM3 11 | ||
42 | #define LDN_RTC 6 | ||
43 | #define LDN_KBC 7 | ||
44 | |||
45 | /* Configuration port and key */ | ||
46 | #define CONFIG_PORT 0x3f0 | ||
47 | #define INDEX_PORT CONFIG_PORT | ||
48 | #define DATA_PORT 0x3f1 | ||
49 | #define CONFIG_ENTER1 0x51 | ||
50 | #define CONFIG_ENTER2 0x23 | ||
51 | #define CONFIG_EXIT 0xbb | ||
52 | |||
53 | /* Configuration index */ | ||
54 | #define CURRENT_LDN_INDEX 0x07 | ||
55 | #define POWER_CONTROL_INDEX 0x22 | ||
56 | #define ACTIVATE_INDEX 0x30 | ||
57 | #define IO_BASE_HI_INDEX 0x60 | ||
58 | #define IO_BASE_LO_INDEX 0x61 | ||
59 | #define IRQ_SELECT_INDEX 0x70 | ||
60 | #define PS2_IRQ_INDEX 0x72 | ||
61 | #define DMA_SELECT_INDEX 0x74 | ||
62 | |||
63 | /* UART stuff. Only for debugging. */ | ||
64 | /* UART Register */ | ||
65 | |||
66 | #define UART_RBR 0x0 /* Receiver Buffer Register (Read Only) */ | ||
67 | #define UART_THR 0x0 /* Transmitter Holding Register (Write Only) */ | ||
68 | #define UART_IER 0x2 /* Interrupt Enable Register */ | ||
69 | #define UART_IIR 0x4 /* Interrupt Ident Register (Read Only) */ | ||
70 | #define UART_FCR 0x4 /* FIFO Control Register (Write Only) */ | ||
71 | #define UART_LCR 0x6 /* Line Control Register */ | ||
72 | #define UART_MCR 0x8 /* MODEM Control Register */ | ||
73 | #define UART_LSR 0xa /* Line Status Register */ | ||
74 | #define UART_MSR 0xc /* MODEM Status Register */ | ||
75 | #define UART_SCR 0xe /* Scratch Register */ | ||
76 | #define UART_DLL 0x0 /* Divisor Latch (LS) */ | ||
77 | #define UART_DLM 0x2 /* Divisor Latch (MS) */ | ||
78 | |||
79 | #ifndef __ASSEMBLY__ | ||
80 | typedef struct uart_reg { | ||
81 | volatile __u16 rbr; | ||
82 | volatile __u16 ier; | ||
83 | volatile __u16 iir; | ||
84 | volatile __u16 lcr; | ||
85 | volatile __u16 mcr; | ||
86 | volatile __u16 lsr; | ||
87 | volatile __u16 msr; | ||
88 | volatile __u16 scr; | ||
89 | } uart_reg; | ||
90 | #endif /* ! __ASSEMBLY__ */ | ||
91 | |||
92 | /* Alias for Write Only Register */ | ||
93 | |||
94 | #define thr rbr | ||
95 | #define tcr iir | ||
96 | |||
97 | /* Alias for Divisor Latch Register */ | ||
98 | |||
99 | #define dll rbr | ||
100 | #define dlm ier | ||
101 | #define fcr iir | ||
102 | |||
103 | /* Interrupt Enable Register */ | ||
104 | |||
105 | #define IER_ERDAI 0x0100 /* Enable Received Data Available Interrupt */ | ||
106 | #define IER_ETHREI 0x0200 /* Enable Transmitter Holding Register Empty Interrupt */ | ||
107 | #define IER_ELSI 0x0400 /* Enable Receiver Line Status Interrupt */ | ||
108 | #define IER_EMSI 0x0800 /* Enable MODEM Status Interrupt */ | ||
109 | |||
110 | /* Interrupt Ident Register */ | ||
111 | |||
112 | #define IIR_IP 0x0100 /* "0" if Interrupt Pending */ | ||
113 | #define IIR_IIB0 0x0200 /* Interrupt ID Bit 0 */ | ||
114 | #define IIR_IIB1 0x0400 /* Interrupt ID Bit 1 */ | ||
115 | #define IIR_IIB2 0x0800 /* Interrupt ID Bit 2 */ | ||
116 | #define IIR_FIFO 0xc000 /* FIFOs enabled */ | ||
117 | |||
118 | /* FIFO Control Register */ | ||
119 | |||
120 | #define FCR_FEN 0x0100 /* FIFO enable */ | ||
121 | #define FCR_RFRES 0x0200 /* Receiver FIFO reset */ | ||
122 | #define FCR_TFRES 0x0400 /* Transmitter FIFO reset */ | ||
123 | #define FCR_DMA 0x0800 /* DMA mode select */ | ||
124 | #define FCR_RTL 0x4000 /* Receiver triger (LSB) */ | ||
125 | #define FCR_RTM 0x8000 /* Receiver triger (MSB) */ | ||
126 | |||
127 | /* Line Control Register */ | ||
128 | |||
129 | #define LCR_WLS0 0x0100 /* Word Length Select Bit 0 */ | ||
130 | #define LCR_WLS1 0x0200 /* Word Length Select Bit 1 */ | ||
131 | #define LCR_STB 0x0400 /* Number of Stop Bits */ | ||
132 | #define LCR_PEN 0x0800 /* Parity Enable */ | ||
133 | #define LCR_EPS 0x1000 /* Even Parity Select */ | ||
134 | #define LCR_SP 0x2000 /* Stick Parity */ | ||
135 | #define LCR_SB 0x4000 /* Set Break */ | ||
136 | #define LCR_DLAB 0x8000 /* Divisor Latch Access Bit */ | ||
137 | |||
138 | /* MODEM Control Register */ | ||
139 | |||
140 | #define MCR_DTR 0x0100 /* Data Terminal Ready */ | ||
141 | #define MCR_RTS 0x0200 /* Request to Send */ | ||
142 | #define MCR_OUT1 0x0400 /* Out 1 */ | ||
143 | #define MCR_IRQEN 0x0800 /* IRQ Enable */ | ||
144 | #define MCR_LOOP 0x1000 /* Loop */ | ||
145 | |||
146 | /* Line Status Register */ | ||
147 | |||
148 | #define LSR_DR 0x0100 /* Data Ready */ | ||
149 | #define LSR_OE 0x0200 /* Overrun Error */ | ||
150 | #define LSR_PE 0x0400 /* Parity Error */ | ||
151 | #define LSR_FE 0x0800 /* Framing Error */ | ||
152 | #define LSR_BI 0x1000 /* Break Interrupt */ | ||
153 | #define LSR_THRE 0x2000 /* Transmitter Holding Register Empty */ | ||
154 | #define LSR_TEMT 0x4000 /* Transmitter Empty */ | ||
155 | #define LSR_FIFOE 0x8000 /* Receiver FIFO error */ | ||
156 | |||
157 | /* MODEM Status Register */ | ||
158 | |||
159 | #define MSR_DCTS 0x0100 /* Delta Clear to Send */ | ||
160 | #define MSR_DDSR 0x0200 /* Delta Data Set Ready */ | ||
161 | #define MSR_TERI 0x0400 /* Trailing Edge Ring Indicator */ | ||
162 | #define MSR_DDCD 0x0800 /* Delta Data Carrier Detect */ | ||
163 | #define MSR_CTS 0x1000 /* Clear to Send */ | ||
164 | #define MSR_DSR 0x2000 /* Data Set Ready */ | ||
165 | #define MSR_RI 0x4000 /* Ring Indicator */ | ||
166 | #define MSR_DCD 0x8000 /* Data Carrier Detect */ | ||
167 | |||
168 | /* Baud Rate Divisor */ | ||
169 | |||
170 | #define UART_CLK (1843200) /* 1.8432 MHz */ | ||
171 | #define UART_BAUD(x) (UART_CLK / (16 * (x))) | ||
172 | |||
173 | /* RTC register definition */ | ||
174 | #define RTC_SECONDS 0 | ||
175 | #define RTC_SECONDS_ALARM 1 | ||
176 | #define RTC_MINUTES 2 | ||
177 | #define RTC_MINUTES_ALARM 3 | ||
178 | #define RTC_HOURS 4 | ||
179 | #define RTC_HOURS_ALARM 5 | ||
180 | #define RTC_DAY_OF_WEEK 6 | ||
181 | #define RTC_DAY_OF_MONTH 7 | ||
182 | #define RTC_MONTH 8 | ||
183 | #define RTC_YEAR 9 | ||
184 | #define RTC_FREQ_SELECT 10 | ||
185 | # define RTC_UIP 0x80 | ||
186 | # define RTC_DIV_CTL 0x70 | ||
187 | /* This RTC can work under 32.768KHz clock only. */ | ||
188 | # define RTC_OSC_ENABLE 0x20 | ||
189 | # define RTC_OSC_DISABLE 0x00 | ||
190 | #define RTC_CONTROL 11 | ||
191 | # define RTC_SET 0x80 | ||
192 | # define RTC_PIE 0x40 | ||
193 | # define RTC_AIE 0x20 | ||
194 | # define RTC_UIE 0x10 | ||
195 | # define RTC_SQWE 0x08 | ||
196 | # define RTC_DM_BINARY 0x04 | ||
197 | # define RTC_24H 0x02 | ||
198 | # define RTC_DST_EN 0x01 | ||
199 | |||
200 | #endif /* __ASM_SH_M1543C_H */ | ||
diff --git a/include/asm-sh/mpc1211/mc146818rtc.h b/include/asm-sh/mpc1211/mc146818rtc.h deleted file mode 100644 index e245f2a3cd78..000000000000 --- a/include/asm-sh/mpc1211/mc146818rtc.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /* | ||
2 | * MPC1211 uses PC/AT style RTC definitions. | ||
3 | */ | ||
4 | #include <asm-x86/mc146818rtc_32.h> | ||
5 | |||
6 | |||
diff --git a/include/asm-sh/mpc1211/mpc1211.h b/include/asm-sh/mpc1211/mpc1211.h deleted file mode 100644 index fa456c3e4e01..000000000000 --- a/include/asm-sh/mpc1211/mpc1211.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef __ASM_SH_MPC1211_H | ||
2 | #define __ASM_SH_MPC1211_H | ||
3 | |||
4 | /* | ||
5 | * linux/include/asm-sh/mpc1211.h | ||
6 | * | ||
7 | * Copyright (C) 2001 Saito.K & Jeanne | ||
8 | * | ||
9 | * Interface MPC-1211 support | ||
10 | */ | ||
11 | |||
12 | #define PA_PCI_IO (0xa4000000) /* PCI I/O space */ | ||
13 | #define PA_PCI_MEM (0xb0000000) /* PCI MEM space */ | ||
14 | |||
15 | #define PCIPAR (0xa4000cf8) /* PCI Config address */ | ||
16 | #define PCIPDR (0xa4000cfc) /* PCI Config data */ | ||
17 | |||
18 | #endif /* __ASM_SH_MPC1211_H */ | ||
diff --git a/include/asm-sh/mpc1211/pci.h b/include/asm-sh/mpc1211/pci.h deleted file mode 100644 index d9162c5ed76a..000000000000 --- a/include/asm-sh/mpc1211/pci.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * Low-Level PCI Support for MPC-1211 | ||
3 | * | ||
4 | * (c) 2002 Saito.K & Jeanne | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | #ifndef _PCI_MPC1211_H_ | ||
9 | #define _PCI_MPC1211_H_ | ||
10 | |||
11 | #include <linux/pci.h> | ||
12 | |||
13 | /* set debug level 4=verbose...1=terse */ | ||
14 | //#define DEBUG_PCI 3 | ||
15 | #undef DEBUG_PCI | ||
16 | |||
17 | #ifdef DEBUG_PCI | ||
18 | #define PCIDBG(n, x...) { if(DEBUG_PCI>=n) printk(x); } | ||
19 | #else | ||
20 | #define PCIDBG(n, x...) | ||
21 | #endif | ||
22 | |||
23 | /* startup values */ | ||
24 | #define PCI_PROBE_BIOS 1 | ||
25 | #define PCI_PROBE_CONF1 2 | ||
26 | #define PCI_PROBE_CONF2 4 | ||
27 | #define PCI_NO_CHECKS 0x400 | ||
28 | #define PCI_ASSIGN_ROMS 0x1000 | ||
29 | #define PCI_BIOS_IRQ_SCAN 0x2000 | ||
30 | |||
31 | /* MPC-1211 Specific Values */ | ||
32 | #define PCIPAR (0xa4000cf8) /* PCI Config address */ | ||
33 | #define PCIPDR (0xa4000cfc) /* PCI Config data */ | ||
34 | |||
35 | #define PA_PCI_IO (0xa4000000) /* PCI I/O space */ | ||
36 | #define PA_PCI_MEM (0xb0000000) /* PCI MEM space */ | ||
37 | |||
38 | #endif /* _PCI_MPC1211_H_ */ | ||
diff --git a/include/asm-sh/r7780rp.h b/include/asm-sh/r7780rp.h index a33838f23a6d..306f7359f7d4 100644 --- a/include/asm-sh/r7780rp.h +++ b/include/asm-sh/r7780rp.h | |||
@@ -193,8 +193,6 @@ | |||
193 | #define IRQ_SCIF0 (HL_FPGA_IRQ_BASE + 15) | 193 | #define IRQ_SCIF0 (HL_FPGA_IRQ_BASE + 15) |
194 | #define IRQ_SCIF1 (HL_FPGA_IRQ_BASE + 16) | 194 | #define IRQ_SCIF1 (HL_FPGA_IRQ_BASE + 16) |
195 | 195 | ||
196 | unsigned char *highlander_init_irq_r7780mp(void); | 196 | unsigned char *highlander_plat_irq_setup(void); |
197 | unsigned char *highlander_init_irq_r7780rp(void); | ||
198 | unsigned char *highlander_init_irq_r7785rp(void); | ||
199 | 197 | ||
200 | #endif /* __ASM_SH_RENESAS_R7780RP */ | 198 | #endif /* __ASM_SH_RENESAS_R7780RP */ |
diff --git a/include/asm-sh/tlb_64.h b/include/asm-sh/tlb_64.h index 0308e05fc57b..0a96f3af69e3 100644 --- a/include/asm-sh/tlb_64.h +++ b/include/asm-sh/tlb_64.h | |||
@@ -56,6 +56,7 @@ static inline void __flush_tlb_slot(unsigned long long slot) | |||
56 | __asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot)); | 56 | __asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot)); |
57 | } | 57 | } |
58 | 58 | ||
59 | #ifdef CONFIG_MMU | ||
59 | /* arch/sh64/mm/tlb.c */ | 60 | /* arch/sh64/mm/tlb.c */ |
60 | int sh64_tlb_init(void); | 61 | int sh64_tlb_init(void); |
61 | unsigned long long sh64_next_free_dtlb_entry(void); | 62 | unsigned long long sh64_next_free_dtlb_entry(void); |
@@ -64,6 +65,13 @@ int sh64_put_wired_dtlb_entry(unsigned long long entry); | |||
64 | void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, | 65 | void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, |
65 | unsigned long asid, unsigned long paddr); | 66 | unsigned long asid, unsigned long paddr); |
66 | void sh64_teardown_tlb_slot(unsigned long long config_addr); | 67 | void sh64_teardown_tlb_slot(unsigned long long config_addr); |
67 | 68 | #else | |
69 | #define sh64_tlb_init() do { } while (0) | ||
70 | #define sh64_next_free_dtlb_entry() (0) | ||
71 | #define sh64_get_wired_dtlb_entry() (0) | ||
72 | #define sh64_put_wired_dtlb_entry(entry) do { } while (0) | ||
73 | #define sh64_setup_tlb_slot(conf, virt, asid, phys) do { } while (0) | ||
74 | #define sh64_teardown_tlb_slot(addr) do { } while (0) | ||
75 | #endif /* CONFIG_MMU */ | ||
68 | #endif /* __ASSEMBLY__ */ | 76 | #endif /* __ASSEMBLY__ */ |
69 | #endif /* __ASM_SH_TLB_64_H */ | 77 | #endif /* __ASM_SH_TLB_64_H */ |
diff --git a/include/asm-sh/topology.h b/include/asm-sh/topology.h index 34cdb28e8f44..95f0085e098a 100644 --- a/include/asm-sh/topology.h +++ b/include/asm-sh/topology.h | |||
@@ -29,6 +29,17 @@ | |||
29 | .nr_balance_failed = 0, \ | 29 | .nr_balance_failed = 0, \ |
30 | } | 30 | } |
31 | 31 | ||
32 | #define cpu_to_node(cpu) ((void)(cpu),0) | ||
33 | #define parent_node(node) ((void)(node),0) | ||
34 | |||
35 | #define node_to_cpumask(node) ((void)node, cpu_online_map) | ||
36 | #define node_to_first_cpu(node) ((void)(node),0) | ||
37 | |||
38 | #define pcibus_to_node(bus) ((void)(bus), -1) | ||
39 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ | ||
40 | CPU_MASK_ALL : \ | ||
41 | node_to_cpumask(pcibus_to_node(bus)) \ | ||
42 | ) | ||
32 | #endif | 43 | #endif |
33 | 44 | ||
34 | #include <asm-generic/topology.h> | 45 | #include <asm-generic/topology.h> |
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index a6e1d4126e67..beea4e6f8dfd 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h | |||
@@ -1,29 +1,12 @@ | |||
1 | #ifndef __ASM_SH_TYPES_H | 1 | #ifndef __ASM_SH_TYPES_H |
2 | #define __ASM_SH_TYPES_H | 2 | #define __ASM_SH_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
5 | 7 | ||
6 | typedef unsigned short umode_t; | 8 | typedef unsigned short umode_t; |
7 | 9 | ||
8 | /* | ||
9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
10 | * header files exported to user space | ||
11 | */ | ||
12 | |||
13 | typedef __signed__ char __s8; | ||
14 | typedef unsigned char __u8; | ||
15 | |||
16 | typedef __signed__ short __s16; | ||
17 | typedef unsigned short __u16; | ||
18 | |||
19 | typedef __signed__ int __s32; | ||
20 | typedef unsigned int __u32; | ||
21 | |||
22 | #if defined(__GNUC__) | ||
23 | __extension__ typedef __signed__ long long __s64; | ||
24 | __extension__ typedef unsigned long long __u64; | ||
25 | #endif | ||
26 | |||
27 | #endif /* __ASSEMBLY__ */ | 10 | #endif /* __ASSEMBLY__ */ |
28 | 11 | ||
29 | /* | 12 | /* |
@@ -35,19 +18,6 @@ __extension__ typedef unsigned long long __u64; | |||
35 | 18 | ||
36 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
37 | 20 | ||
38 | |||
39 | typedef __signed__ char s8; | ||
40 | typedef unsigned char u8; | ||
41 | |||
42 | typedef __signed__ short s16; | ||
43 | typedef unsigned short u16; | ||
44 | |||
45 | typedef __signed__ int s32; | ||
46 | typedef unsigned int u32; | ||
47 | |||
48 | typedef __signed__ long long s64; | ||
49 | typedef unsigned long long u64; | ||
50 | |||
51 | /* Dma addresses are 32-bits wide. */ | 21 | /* Dma addresses are 32-bits wide. */ |
52 | 22 | ||
53 | typedef u32 dma_addr_t; | 23 | typedef u32 dma_addr_t; |
diff --git a/include/asm-sh/uaccess_64.h b/include/asm-sh/uaccess_64.h index f956b7b316c7..a9b68d094844 100644 --- a/include/asm-sh/uaccess_64.h +++ b/include/asm-sh/uaccess_64.h | |||
@@ -274,7 +274,9 @@ struct exception_table_entry | |||
274 | unsigned long insn, fixup; | 274 | unsigned long insn, fixup; |
275 | }; | 275 | }; |
276 | 276 | ||
277 | #ifdef CONFIG_MMU | ||
277 | #define ARCH_HAS_SEARCH_EXTABLE | 278 | #define ARCH_HAS_SEARCH_EXTABLE |
279 | #endif | ||
278 | 280 | ||
279 | /* Returns 0 if exception not found and fixup.unit otherwise. */ | 281 | /* Returns 0 if exception not found and fixup.unit otherwise. */ |
280 | extern unsigned long search_exception_table(unsigned long addr); | 282 | extern unsigned long search_exception_table(unsigned long addr); |
diff --git a/include/asm-sparc/asi.h b/include/asm-sparc/asi.h index 58c3754da926..158f9b00d43f 100644 --- a/include/asm-sparc/asi.h +++ b/include/asm-sparc/asi.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: asi.h,v 1.18 1998/03/09 14:04:46 jj Exp $ */ | ||
2 | #ifndef _SPARC_ASI_H | 1 | #ifndef _SPARC_ASI_H |
3 | #define _SPARC_ASI_H | 2 | #define _SPARC_ASI_H |
4 | 3 | ||
diff --git a/include/asm-sparc/auxio.h b/include/asm-sparc/auxio.h index ee83aefb20dc..e552b8d68450 100644 --- a/include/asm-sparc/auxio.h +++ b/include/asm-sparc/auxio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: auxio.h,v 1.18 1997/11/07 15:01:45 jj Exp $ | 1 | /* |
2 | * auxio.h: Definitions and code for the Auxiliary I/O register. | 2 | * auxio.h: Definitions and code for the Auxiliary I/O register. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h index cb3cefab6e09..68b98a7e6454 100644 --- a/include/asm-sparc/bitops.h +++ b/include/asm-sparc/bitops.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bitops.h,v 1.67 2001/11/19 18:36:34 davem Exp $ | 1 | /* |
2 | * bitops.h: Bit string operations on the Sparc. | 2 | * bitops.h: Bit string operations on the Sparc. |
3 | * | 3 | * |
4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/btfixup.h b/include/asm-sparc/btfixup.h index c2868d0f60b6..08277e6fb4cd 100644 --- a/include/asm-sparc/btfixup.h +++ b/include/asm-sparc/btfixup.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: btfixup.h,v 1.4 1998/03/09 14:04:43 jj Exp $ | 1 | /* |
2 | * asm-sparc/btfixup.h: Macros for boot time linking. | 2 | * asm-sparc/btfixup.h: Macros for boot time linking. |
3 | * | 3 | * |
4 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/include/asm-sparc/checksum.h b/include/asm-sparc/checksum.h index 34518ea7bf1b..d044ddb5a3cf 100644 --- a/include/asm-sparc/checksum.h +++ b/include/asm-sparc/checksum.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: checksum.h,v 1.33 2002/02/01 22:01:05 davem Exp $ */ | ||
2 | #ifndef __SPARC_CHECKSUM_H | 1 | #ifndef __SPARC_CHECKSUM_H |
3 | #define __SPARC_CHECKSUM_H | 2 | #define __SPARC_CHECKSUM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/clock.h b/include/asm-sparc/clock.h index e708e6b50d2b..2cf99dadec56 100644 --- a/include/asm-sparc/clock.h +++ b/include/asm-sparc/clock.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: clock.h,v 1.3 1995/11/25 02:31:25 davem Exp $ | 1 | /* |
2 | * clock.h: Definitions for clock operations on the Sparc. | 2 | * clock.h: Definitions for clock operations on the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/contregs.h b/include/asm-sparc/contregs.h index 0e05afe02d44..48fa8a4ef357 100644 --- a/include/asm-sparc/contregs.h +++ b/include/asm-sparc/contregs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: contregs.h,v 1.8 2000/12/28 22:49:11 davem Exp $ */ | ||
2 | #ifndef _SPARC_CONTREGS_H | 1 | #ifndef _SPARC_CONTREGS_H |
3 | #define _SPARC_CONTREGS_H | 2 | #define _SPARC_CONTREGS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/cypress.h b/include/asm-sparc/cypress.h index 99599533efbc..95e9772ea394 100644 --- a/include/asm-sparc/cypress.h +++ b/include/asm-sparc/cypress.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: cypress.h,v 1.6 1996/08/29 09:48:09 davem Exp $ | 1 | /* |
2 | * cypress.h: Cypress module specific definitions and defines. | 2 | * cypress.h: Cypress module specific definitions and defines. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/delay.h b/include/asm-sparc/delay.h index 48aa70eef997..bc9aba2bead6 100644 --- a/include/asm-sparc/delay.h +++ b/include/asm-sparc/delay.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: delay.h,v 1.11 2001/01/01 01:46:15 davem Exp $ | 1 | /* |
2 | * delay.h: Linux delay routines on the Sparc. | 2 | * delay.h: Linux delay routines on the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu). | 4 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu). |
diff --git a/include/asm-sparc/ebus.h b/include/asm-sparc/ebus.h index 54652887c127..491f85d662df 100644 --- a/include/asm-sparc/ebus.h +++ b/include/asm-sparc/ebus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ebus.h,v 1.2 1999/09/11 23:05:55 zaitcev Exp $ | 1 | /* |
2 | * ebus.h: PCI to Ebus pseudo driver software state. | 2 | * ebus.h: PCI to Ebus pseudo driver software state. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
diff --git a/include/asm-sparc/ecc.h b/include/asm-sparc/ecc.h index 8e27ceccb76d..ccb84b66fef1 100644 --- a/include/asm-sparc/ecc.h +++ b/include/asm-sparc/ecc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ecc.h,v 1.3 1996/04/25 06:12:57 davem Exp $ | 1 | /* |
2 | * ecc.h: Definitions and defines for the external cache/memory | 2 | * ecc.h: Definitions and defines for the external cache/memory |
3 | * controller on the sun4m. | 3 | * controller on the sun4m. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/eeprom.h b/include/asm-sparc/eeprom.h index a8ff7496ddf5..e17beeceb405 100644 --- a/include/asm-sparc/eeprom.h +++ b/include/asm-sparc/eeprom.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: eeprom.h,v 1.3 1995/11/25 02:31:38 davem Exp $ | 1 | /* |
2 | * eeprom.h: Definitions for the Sun eeprom. | 2 | * eeprom.h: Definitions for the Sun eeprom. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h index d2516eed3a38..d043f80bc2fd 100644 --- a/include/asm-sparc/elf.h +++ b/include/asm-sparc/elf.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: elf.h,v 1.22 2000/07/12 01:27:08 davem Exp $ */ | ||
2 | #ifndef __ASMSPARC_ELF_H | 1 | #ifndef __ASMSPARC_ELF_H |
3 | #define __ASMSPARC_ELF_H | 2 | #define __ASMSPARC_ELF_H |
4 | 3 | ||
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index 5ec546349fc8..07bd2d80257f 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: fcntl.h,v 1.16 2001/09/20 00:35:33 davem Exp $ */ | ||
2 | #ifndef _SPARC_FCNTL_H | 1 | #ifndef _SPARC_FCNTL_H |
3 | #define _SPARC_FCNTL_H | 2 | #define _SPARC_FCNTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc/head.h b/include/asm-sparc/head.h index e6532c3e09c9..7c35491a8b53 100644 --- a/include/asm-sparc/head.h +++ b/include/asm-sparc/head.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: head.h,v 1.39 2000/05/26 22:18:45 ecd Exp $ */ | ||
2 | #ifndef __SPARC_HEAD_H | 1 | #ifndef __SPARC_HEAD_H |
3 | #define __SPARC_HEAD_H | 2 | #define __SPARC_HEAD_H |
4 | 3 | ||
diff --git a/include/asm-sparc/idprom.h b/include/asm-sparc/idprom.h index 59083ed85232..41adb417a4e5 100644 --- a/include/asm-sparc/idprom.h +++ b/include/asm-sparc/idprom.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: idprom.h,v 1.6 1996/08/04 10:35:07 ecd Exp $ | 1 | /* |
2 | * idprom.h: Macros and defines for idprom routines | 2 | * idprom.h: Macros and defines for idprom routines |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index 243bf8e9a058..3a3e7bdb06b3 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h | |||
@@ -1,6 +1,3 @@ | |||
1 | /* | ||
2 | * $Id: io.h,v 1.30 2001/12/21 01:23:21 davem Exp $ | ||
3 | */ | ||
4 | #ifndef __SPARC_IO_H | 1 | #ifndef __SPARC_IO_H |
5 | #define __SPARC_IO_H | 2 | #define __SPARC_IO_H |
6 | 3 | ||
diff --git a/include/asm-sparc/ioctl.h b/include/asm-sparc/ioctl.h index e6fc4de19940..7d6bd51321b9 100644 --- a/include/asm-sparc/ioctl.h +++ b/include/asm-sparc/ioctl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ioctl.h,v 1.6 1999/12/01 23:58:36 davem Exp $ */ | ||
2 | #ifndef _SPARC_IOCTL_H | 1 | #ifndef _SPARC_IOCTL_H |
3 | #define _SPARC_IOCTL_H | 2 | #define _SPARC_IOCTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc/kdebug.h b/include/asm-sparc/kdebug.h index 631f15ffef73..f69fe7d84b3c 100644 --- a/include/asm-sparc/kdebug.h +++ b/include/asm-sparc/kdebug.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: kdebug.h,v 1.11 2000/06/04 06:23:53 anton Exp $ | 1 | /* |
2 | * kdebug.h: Defines and definitions for debugging the Linux kernel | 2 | * kdebug.h: Defines and definitions for debugging the Linux kernel |
3 | * under various kernel debuggers. | 3 | * under various kernel debuggers. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/machines.h b/include/asm-sparc/machines.h index d831350f5428..d6c6bf836206 100644 --- a/include/asm-sparc/machines.h +++ b/include/asm-sparc/machines.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: machines.h,v 1.4 1995/11/25 02:31:58 davem Exp $ | 1 | /* |
2 | * machines.h: Defines for taking apart the machine type value in the | 2 | * machines.h: Defines for taking apart the machine type value in the |
3 | * idprom and determining the kind of machine we are on. | 3 | * idprom and determining the kind of machine we are on. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/mbus.h b/include/asm-sparc/mbus.h index ecacdf4075d7..bb5ae614b166 100644 --- a/include/asm-sparc/mbus.h +++ b/include/asm-sparc/mbus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mbus.h,v 1.9 1997/06/24 15:48:12 jj Exp $ | 1 | /* |
2 | * mbus.h: Various defines for MBUS modules. | 2 | * mbus.h: Various defines for MBUS modules. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/memreg.h b/include/asm-sparc/memreg.h index 5fb95c828da6..845ad2b39183 100644 --- a/include/asm-sparc/memreg.h +++ b/include/asm-sparc/memreg.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: memreg.h,v 1.8 1996/08/29 09:48:23 davem Exp $ */ | ||
2 | #ifndef _SPARC_MEMREG_H | 1 | #ifndef _SPARC_MEMREG_H |
3 | #define _SPARC_MEMREG_H | 2 | #define _SPARC_MEMREG_H |
4 | /* memreg.h: Definitions of the values found in the synchronous | 3 | /* memreg.h: Definitions of the values found in the synchronous |
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index e18be984c01d..fdfbbf0a4736 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: mman.h,v 1.9 2000/03/15 02:44:23 davem Exp $ */ | ||
2 | #ifndef __SPARC_MMAN_H__ | 1 | #ifndef __SPARC_MMAN_H__ |
3 | #define __SPARC_MMAN_H__ | 2 | #define __SPARC_MMAN_H__ |
4 | 3 | ||
@@ -24,9 +23,8 @@ | |||
24 | 23 | ||
25 | #ifdef __KERNEL__ | 24 | #ifdef __KERNEL__ |
26 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
27 | #define arch_mmap_check sparc_mmap_check | 26 | #define arch_mmap_check(addr,len,flags) sparc_mmap_check(addr,len) |
28 | int sparc_mmap_check(unsigned long addr, unsigned long len, | 27 | int sparc_mmap_check(unsigned long addr, unsigned long len); |
29 | unsigned long flags); | ||
30 | #endif | 28 | #endif |
31 | #endif | 29 | #endif |
32 | 30 | ||
diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h index 958d0513a6d4..29aad11b8f00 100644 --- a/include/asm-sparc/mostek.h +++ b/include/asm-sparc/mostek.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mostek.h,v 1.13 2001/01/11 15:07:09 davem Exp $ | 1 | /* |
2 | * mostek.h: Describes the various Mostek time of day clock registers. | 2 | * mostek.h: Describes the various Mostek time of day clock registers. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/mpmbox.h b/include/asm-sparc/mpmbox.h index 0e1bc5801d8a..f8423039b242 100644 --- a/include/asm-sparc/mpmbox.h +++ b/include/asm-sparc/mpmbox.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mpmbox.h,v 1.4 1996/04/25 06:13:19 davem Exp $ | 1 | /* |
2 | * mpmbox.h: Interface and defines for the OpenProm mailbox | 2 | * mpmbox.h: Interface and defines for the OpenProm mailbox |
3 | * facilities for MP machines under Linux. | 3 | * facilities for MP machines under Linux. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/msi.h b/include/asm-sparc/msi.h index ff72cbd946a4..724ca5667052 100644 --- a/include/asm-sparc/msi.h +++ b/include/asm-sparc/msi.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: msi.h,v 1.3 1996/08/29 09:48:25 davem Exp $ | 1 | /* |
2 | * msi.h: Defines specific to the MBus - Sbus - Interface. | 2 | * msi.h: Defines specific to the MBus - Sbus - Interface. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/mxcc.h b/include/asm-sparc/mxcc.h index 128fe9708135..c0517bd05bde 100644 --- a/include/asm-sparc/mxcc.h +++ b/include/asm-sparc/mxcc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mxcc.h,v 1.7 1997/04/20 14:11:46 ecd Exp $ | 1 | /* |
2 | * mxcc.h: Definitions of the Viking MXCC registers | 2 | * mxcc.h: Definitions of the Viking MXCC registers |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/namei.h b/include/asm-sparc/namei.h index 618344d89cc4..0646102fb020 100644 --- a/include/asm-sparc/namei.h +++ b/include/asm-sparc/namei.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: namei.h,v 1.16 2000/04/13 00:55:54 davem Exp $ | 1 | /* |
2 | * linux/include/asm-sparc/namei.h | 2 | * linux/include/asm-sparc/namei.h |
3 | * | 3 | * |
4 | * Routines to handle famous /usr/gnemul/s*. | 4 | * Routines to handle famous /usr/gnemul/s*. |
diff --git a/include/asm-sparc/obio.h b/include/asm-sparc/obio.h index 47854a2a12cf..1a7544ceb574 100644 --- a/include/asm-sparc/obio.h +++ b/include/asm-sparc/obio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: obio.h,v 1.4 1998/03/09 14:04:55 jj Exp $ | 1 | /* |
2 | * obio.h: Some useful locations in 0xFXXXXXXXX PA obio space on sun4d. | 2 | * obio.h: Some useful locations in 0xFXXXXXXXX PA obio space on sun4d. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> | 4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> |
diff --git a/include/asm-sparc/openprom.h b/include/asm-sparc/openprom.h index 12929a20f536..ed4b6bc2b102 100644 --- a/include/asm-sparc/openprom.h +++ b/include/asm-sparc/openprom.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: openprom.h,v 1.24 2000/06/04 06:23:53 anton Exp $ */ | ||
2 | #ifndef __SPARC_OPENPROM_H | 1 | #ifndef __SPARC_OPENPROM_H |
3 | #define __SPARC_OPENPROM_H | 2 | #define __SPARC_OPENPROM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h index 17ba82ee220a..61c3ca6a8ac3 100644 --- a/include/asm-sparc/oplib.h +++ b/include/asm-sparc/oplib.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: oplib.h,v 1.23 2001/12/21 00:54:31 davem Exp $ | 1 | /* |
2 | * oplib.h: Describes the interface and available routines in the | 2 | * oplib.h: Describes the interface and available routines in the |
3 | * Linux Prom library. | 3 | * Linux Prom library. |
4 | * | 4 | * |
@@ -34,9 +34,6 @@ extern unsigned int prom_rev, prom_prev; | |||
34 | */ | 34 | */ |
35 | extern int prom_root_node; | 35 | extern int prom_root_node; |
36 | 36 | ||
37 | /* PROM stdin and stdout */ | ||
38 | extern int prom_stdin, prom_stdout; | ||
39 | |||
40 | /* Pointer to prom structure containing the device tree traversal | 37 | /* Pointer to prom structure containing the device tree traversal |
41 | * and usage utility functions. Only prom-lib should use these, | 38 | * and usage utility functions. Only prom-lib should use these, |
42 | * users use the interface defined by the library only! | 39 | * users use the interface defined by the library only! |
@@ -84,20 +81,6 @@ extern int prom_devclose(int device_handle); | |||
84 | extern void prom_seek(int device_handle, unsigned int seek_hival, | 81 | extern void prom_seek(int device_handle, unsigned int seek_hival, |
85 | unsigned int seek_lowval); | 82 | unsigned int seek_lowval); |
86 | 83 | ||
87 | /* Machine memory configuration routine. */ | ||
88 | |||
89 | /* This function returns a V0 format memory descriptor table, it has three | ||
90 | * entries. One for the total amount of physical ram on the machine, one | ||
91 | * for the amount of physical ram available, and one describing the virtual | ||
92 | * areas which are allocated by the prom. So, in a sense the physical | ||
93 | * available is a calculation of the total physical minus the physical mapped | ||
94 | * by the prom with virtual mappings. | ||
95 | * | ||
96 | * These lists are returned pre-sorted, this should make your life easier | ||
97 | * since the prom itself is way too lazy to do such nice things. | ||
98 | */ | ||
99 | extern struct linux_mem_v0 *prom_meminfo(void); | ||
100 | |||
101 | /* Miscellaneous routines, don't really fit in any category per se. */ | 84 | /* Miscellaneous routines, don't really fit in any category per se. */ |
102 | 85 | ||
103 | /* Reboot the machine with the command line passed. */ | 86 | /* Reboot the machine with the command line passed. */ |
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 39ccf2da297c..6aa9e4c910cf 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: page.h,v 1.55 2000/10/30 21:01:41 davem Exp $ | 1 | /* |
2 | * page.h: Various defines and such for MMU operations on the Sparc for | 2 | * page.h: Various defines and such for MMU operations on the Sparc for |
3 | * the Linux kernel. | 3 | * the Linux kernel. |
4 | * | 4 | * |
@@ -38,12 +38,11 @@ | |||
38 | 38 | ||
39 | /* The following structure is used to hold the physical | 39 | /* The following structure is used to hold the physical |
40 | * memory configuration of the machine. This is filled in | 40 | * memory configuration of the machine. This is filled in |
41 | * probe_memory() and is later used by mem_init() to set up | 41 | * prom_meminit() and is later used by mem_init() to set up |
42 | * mem_map[]. We statically allocate SPARC_PHYS_BANKS of | 42 | * mem_map[]. We statically allocate SPARC_PHYS_BANKS+1 of |
43 | * these structs, this is arbitrary. The entry after the | 43 | * these structs, this is arbitrary. The entry after the |
44 | * last valid one has num_bytes==0. | 44 | * last valid one has num_bytes==0. |
45 | */ | 45 | */ |
46 | |||
47 | struct sparc_phys_banks { | 46 | struct sparc_phys_banks { |
48 | unsigned long base_addr; | 47 | unsigned long base_addr; |
49 | unsigned long num_bytes; | 48 | unsigned long num_bytes; |
diff --git a/include/asm-sparc/param.h b/include/asm-sparc/param.h index 86ba59af9d2c..9836d9a3cb9a 100644 --- a/include/asm-sparc/param.h +++ b/include/asm-sparc/param.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: param.h,v 1.4 2000/10/30 21:01:41 davem Exp $ */ | ||
2 | #ifndef _ASMSPARC_PARAM_H | 1 | #ifndef _ASMSPARC_PARAM_H |
3 | #define _ASMSPARC_PARAM_H | 2 | #define _ASMSPARC_PARAM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/pbm.h b/include/asm-sparc/pbm.h index fedd9c6e875c..458a4916d14d 100644 --- a/include/asm-sparc/pbm.h +++ b/include/asm-sparc/pbm.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pbm.h,v 1.3 1999/12/20 17:06:35 zaitcev Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * pbm.h: PCI bus module pseudo driver software state | 3 | * pbm.h: PCI bus module pseudo driver software state |
4 | * Adopted from sparc64 by V. Roganov and G. Raiko | 4 | * Adopted from sparc64 by V. Roganov and G. Raiko |
diff --git a/include/asm-sparc/pcic.h b/include/asm-sparc/pcic.h index dedea14d87c8..f20ef562b265 100644 --- a/include/asm-sparc/pcic.h +++ b/include/asm-sparc/pcic.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pcic.h,v 1.4 1999/11/17 07:34:20 zaitcev Exp $ | 1 | /* |
2 | * pcic.h: JavaEngine 1 specific PCI definitions. | 2 | * pcic.h: JavaEngine 1 specific PCI definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 1998 V. Roganov and G. Raiko | 4 | * Copyright (C) 1998 V. Roganov and G. Raiko |
diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h index 6292cd00e5af..681582d26969 100644 --- a/include/asm-sparc/pgalloc.h +++ b/include/asm-sparc/pgalloc.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pgalloc.h,v 1.16 2001/12/21 04:56:17 davem Exp $ */ | ||
2 | #ifndef _SPARC_PGALLOC_H | 1 | #ifndef _SPARC_PGALLOC_H |
3 | #define _SPARC_PGALLOC_H | 2 | #define _SPARC_PGALLOC_H |
4 | 3 | ||
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index d84af6d95f5c..60512296b2ca 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pgtable.h,v 1.110 2001/12/21 04:56:17 davem Exp $ */ | ||
2 | #ifndef _SPARC_PGTABLE_H | 1 | #ifndef _SPARC_PGTABLE_H |
3 | #define _SPARC_PGTABLE_H | 2 | #define _SPARC_PGTABLE_H |
4 | 3 | ||
diff --git a/include/asm-sparc/pgtsrmmu.h b/include/asm-sparc/pgtsrmmu.h index edeb9811e728..808555fc1d58 100644 --- a/include/asm-sparc/pgtsrmmu.h +++ b/include/asm-sparc/pgtsrmmu.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtsrmmu.h,v 1.31 2000/07/16 21:48:52 anton Exp $ | 1 | /* |
2 | * pgtsrmmu.h: SRMMU page table defines and code. | 2 | * pgtsrmmu.h: SRMMU page table defines and code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/pgtsun4.h b/include/asm-sparc/pgtsun4.h index 60bda107f206..5a0d661fb82e 100644 --- a/include/asm-sparc/pgtsun4.h +++ b/include/asm-sparc/pgtsun4.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtsun4.h,v 1.5 2000/06/05 06:08:46 anton Exp $ | 1 | /* |
2 | * pgtsun4.h: Sun4 specific pgtable.h defines and code. | 2 | * pgtsun4.h: Sun4 specific pgtable.h defines and code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/pgtsun4c.h b/include/asm-sparc/pgtsun4c.h index f53b6dbc5fe3..aeb25e912179 100644 --- a/include/asm-sparc/pgtsun4c.h +++ b/include/asm-sparc/pgtsun4c.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtsun4c.h,v 1.37 2000/06/05 06:08:46 anton Exp $ | 1 | /* |
2 | * pgtsun4c.h: Sun4c specific pgtable.h defines and code. | 2 | * pgtsun4c.h: Sun4c specific pgtable.h defines and code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/psr.h b/include/asm-sparc/psr.h index 19c978051118..b8c0e5f0a66b 100644 --- a/include/asm-sparc/psr.h +++ b/include/asm-sparc/psr.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: psr.h,v 1.15 1997/10/04 08:54:22 ecd Exp $ | 1 | /* |
2 | * psr.h: This file holds the macros for masking off various parts of | 2 | * psr.h: This file holds the macros for masking off various parts of |
3 | * the processor status register on the Sparc. This is valid | 3 | * the processor status register on the Sparc. This is valid |
4 | * for Version 8. On the V9 this is renamed to the PSTATE | 4 | * for Version 8. On the V9 this is renamed to the PSTATE |
@@ -25,6 +25,7 @@ | |||
25 | #define PSR_PIL 0x00000f00 /* processor interrupt level */ | 25 | #define PSR_PIL 0x00000f00 /* processor interrupt level */ |
26 | #define PSR_EF 0x00001000 /* enable floating point */ | 26 | #define PSR_EF 0x00001000 /* enable floating point */ |
27 | #define PSR_EC 0x00002000 /* enable co-processor */ | 27 | #define PSR_EC 0x00002000 /* enable co-processor */ |
28 | #define PSR_SYSCALL 0x00004000 /* inside of a syscall */ | ||
28 | #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ | 29 | #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ |
29 | #define PSR_ICC 0x00f00000 /* integer condition codes */ | 30 | #define PSR_ICC 0x00f00000 /* integer condition codes */ |
30 | #define PSR_C 0x00100000 /* carry bit */ | 31 | #define PSR_C 0x00100000 /* carry bit */ |
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h index 8201a7b29d49..11f3bc2bb3f5 100644 --- a/include/asm-sparc/ptrace.h +++ b/include/asm-sparc/ptrace.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ptrace.h,v 1.25 1997/03/04 16:27:25 jj Exp $ */ | ||
2 | #ifndef _SPARC_PTRACE_H | 1 | #ifndef _SPARC_PTRACE_H |
3 | #define _SPARC_PTRACE_H | 2 | #define _SPARC_PTRACE_H |
4 | 3 | ||
@@ -10,6 +9,8 @@ | |||
10 | 9 | ||
11 | #ifndef __ASSEMBLY__ | 10 | #ifndef __ASSEMBLY__ |
12 | 11 | ||
12 | #include <linux/types.h> | ||
13 | |||
13 | struct pt_regs { | 14 | struct pt_regs { |
14 | unsigned long psr; | 15 | unsigned long psr; |
15 | unsigned long pc; | 16 | unsigned long pc; |
@@ -39,6 +40,16 @@ struct pt_regs { | |||
39 | #define UREG_FP UREG_I6 | 40 | #define UREG_FP UREG_I6 |
40 | #define UREG_RETPC UREG_I7 | 41 | #define UREG_RETPC UREG_I7 |
41 | 42 | ||
43 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
44 | { | ||
45 | return (regs->psr & PSR_SYSCALL); | ||
46 | } | ||
47 | |||
48 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
49 | { | ||
50 | return (regs->psr &= ~PSR_SYSCALL); | ||
51 | } | ||
52 | |||
42 | /* A register window */ | 53 | /* A register window */ |
43 | struct reg_window { | 54 | struct reg_window { |
44 | unsigned long locals[8]; | 55 | unsigned long locals[8]; |
@@ -149,6 +160,7 @@ extern void show_regs(struct pt_regs *); | |||
149 | #define SF_XXARG 0x5c | 160 | #define SF_XXARG 0x5c |
150 | 161 | ||
151 | /* Stuff for the ptrace system call */ | 162 | /* Stuff for the ptrace system call */ |
163 | #define PTRACE_SPARC_DETACH 11 | ||
152 | #define PTRACE_GETREGS 12 | 164 | #define PTRACE_GETREGS 12 |
153 | #define PTRACE_SETREGS 13 | 165 | #define PTRACE_SETREGS 13 |
154 | #define PTRACE_GETFPREGS 14 | 166 | #define PTRACE_GETFPREGS 14 |
diff --git a/include/asm-sparc/resource.h b/include/asm-sparc/resource.h index 0514c304e130..985948a41299 100644 --- a/include/asm-sparc/resource.h +++ b/include/asm-sparc/resource.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: resource.h,v 1.12 2000/09/23 02:09:21 davem Exp $ | 1 | /* |
2 | * resource.h: Resource definitions. | 2 | * resource.h: Resource definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/ross.h b/include/asm-sparc/ross.h index f2c14b5080ed..ecb6e81786a6 100644 --- a/include/asm-sparc/ross.h +++ b/include/asm-sparc/ross.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ross.h,v 1.13 1998/01/07 06:49:11 baccala Exp $ | 1 | /* |
2 | * ross.h: Ross module specific definitions and defines. | 2 | * ross.h: Ross module specific definitions and defines. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/rtc.h b/include/asm-sparc/rtc.h index f4f261dde699..f9ecb1fe2ecd 100644 --- a/include/asm-sparc/rtc.h +++ b/include/asm-sparc/rtc.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: rtc.h,v 1.2 1996/08/21 23:17:39 ecd Exp $ | 1 | /* |
2 | * | ||
3 | * rtc.h: Definitions for access to the Mostek real time clock | 2 | * rtc.h: Definitions for access to the Mostek real time clock |
4 | * | 3 | * |
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) | 4 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) |
diff --git a/include/asm-sparc/sbi.h b/include/asm-sparc/sbi.h index 86a603ac7b20..5eb7f1965d33 100644 --- a/include/asm-sparc/sbi.h +++ b/include/asm-sparc/sbi.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sbi.h,v 1.2 1998/03/09 14:04:48 jj Exp $ | 1 | /* |
2 | * sbi.h: SBI (Sbus Interface on sun4d) definitions | 2 | * sbi.h: SBI (Sbus Interface on sun4d) definitions |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> | 4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> |
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h index 27d076c46964..f1d2fe1c9a30 100644 --- a/include/asm-sparc/sbus.h +++ b/include/asm-sparc/sbus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sbus.h,v 1.22 2000/02/18 13:50:50 davem Exp $ | 1 | /* |
2 | * sbus.h: Defines for the Sun SBus. | 2 | * sbus.h: Defines for the Sun SBus. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/scatterlist.h b/include/asm-sparc/scatterlist.h index e08d3d775b08..c82609ca1d0f 100644 --- a/include/asm-sparc/scatterlist.h +++ b/include/asm-sparc/scatterlist.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: scatterlist.h,v 1.8 2001/12/17 07:05:15 davem Exp $ */ | ||
2 | #ifndef _SPARC_SCATTERLIST_H | 1 | #ifndef _SPARC_SCATTERLIST_H |
3 | #define _SPARC_SCATTERLIST_H | 2 | #define _SPARC_SCATTERLIST_H |
4 | 3 | ||
diff --git a/include/asm-sparc/shmparam.h b/include/asm-sparc/shmparam.h index bb93a6f74a38..59a1243c12f3 100644 --- a/include/asm-sparc/shmparam.h +++ b/include/asm-sparc/shmparam.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: shmparam.h,v 1.6 1999/12/09 10:32:41 davem Exp $ */ | ||
2 | #ifndef _ASMSPARC_SHMPARAM_H | 1 | #ifndef _ASMSPARC_SHMPARAM_H |
3 | #define _ASMSPARC_SHMPARAM_H | 2 | #define _ASMSPARC_SHMPARAM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/sigcontext.h b/include/asm-sparc/sigcontext.h index 7fa2c7d01ab4..c5fb60dcbd75 100644 --- a/include/asm-sparc/sigcontext.h +++ b/include/asm-sparc/sigcontext.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: sigcontext.h,v 1.14 1999/09/06 08:22:05 jj Exp $ */ | ||
2 | #ifndef __SPARC_SIGCONTEXT_H | 1 | #ifndef __SPARC_SIGCONTEXT_H |
3 | #define __SPARC_SIGCONTEXT_H | 2 | #define __SPARC_SIGCONTEXT_H |
4 | 3 | ||
diff --git a/include/asm-sparc/siginfo.h b/include/asm-sparc/siginfo.h index 2c3ea8b22448..3c71af135c52 100644 --- a/include/asm-sparc/siginfo.h +++ b/include/asm-sparc/siginfo.h | |||
@@ -1,7 +1,3 @@ | |||
1 | /* $Id: siginfo.h,v 1.9 2002/02/08 03:57:18 davem Exp $ | ||
2 | * siginfo.c: | ||
3 | */ | ||
4 | |||
5 | #ifndef _SPARC_SIGINFO_H | 1 | #ifndef _SPARC_SIGINFO_H |
6 | #define _SPARC_SIGINFO_H | 2 | #define _SPARC_SIGINFO_H |
7 | 3 | ||
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h index d03a21c97abb..683657d6e685 100644 --- a/include/asm-sparc/signal.h +++ b/include/asm-sparc/signal.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: signal.h,v 1.35 1999/09/06 08:22:04 jj Exp $ */ | ||
2 | #ifndef _ASMSPARC_SIGNAL_H | 1 | #ifndef _ASMSPARC_SIGNAL_H |
3 | #define _ASMSPARC_SIGNAL_H | 2 | #define _ASMSPARC_SIGNAL_H |
4 | 3 | ||
@@ -199,13 +198,7 @@ typedef struct sigaltstack { | |||
199 | size_t ss_size; | 198 | size_t ss_size; |
200 | } stack_t; | 199 | } stack_t; |
201 | 200 | ||
202 | struct sparc_deliver_cookie { | 201 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
203 | int restart_syscall; | ||
204 | unsigned long orig_i0; | ||
205 | }; | ||
206 | |||
207 | struct pt_regs; | ||
208 | extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); | ||
209 | 202 | ||
210 | #endif /* !(__KERNEL__) */ | 203 | #endif /* !(__KERNEL__) */ |
211 | 204 | ||
diff --git a/include/asm-sparc/smpprim.h b/include/asm-sparc/smpprim.h index e7b6d346ae10..eb849d862c64 100644 --- a/include/asm-sparc/smpprim.h +++ b/include/asm-sparc/smpprim.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: smpprim.h,v 1.5 1996/08/29 09:48:49 davem Exp $ | 1 | /* |
2 | * smpprim.h: SMP locking primitives on the Sparc | 2 | * smpprim.h: SMP locking primitives on the Sparc |
3 | * | 3 | * |
4 | * God knows we won't be actually using this code for some time | 4 | * God knows we won't be actually using this code for some time |
diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h index a00e15df227c..bf50d0c2d583 100644 --- a/include/asm-sparc/socket.h +++ b/include/asm-sparc/socket.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: socket.h,v 1.17 2001/06/13 16:25:03 davem Exp $ */ | ||
2 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _ASM_SOCKET_H |
3 | #define _ASM_SOCKET_H | 2 | #define _ASM_SOCKET_H |
4 | 3 | ||
diff --git a/include/asm-sparc/stat.h b/include/asm-sparc/stat.h index a5b4272f2894..2299e1d5d94c 100644 --- a/include/asm-sparc/stat.h +++ b/include/asm-sparc/stat.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: stat.h,v 1.12 2000/08/04 05:35:55 davem Exp $ */ | ||
2 | #ifndef _SPARC_STAT_H | 1 | #ifndef _SPARC_STAT_H |
3 | #define _SPARC_STAT_H | 2 | #define _SPARC_STAT_H |
4 | 3 | ||
diff --git a/include/asm-sparc/statfs.h b/include/asm-sparc/statfs.h index d623f144247d..304520fa8863 100644 --- a/include/asm-sparc/statfs.h +++ b/include/asm-sparc/statfs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: statfs.h,v 1.4 1996/06/07 00:41:05 ecd Exp $ */ | ||
2 | #ifndef _SPARC_STATFS_H | 1 | #ifndef _SPARC_STATFS_H |
3 | #define _SPARC_STATFS_H | 2 | #define _SPARC_STATFS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/string.h b/include/asm-sparc/string.h index cb1e923356c6..8d7c0dd4f299 100644 --- a/include/asm-sparc/string.h +++ b/include/asm-sparc/string.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: string.h,v 1.36 2001/12/21 00:54:31 davem Exp $ | 1 | /* |
2 | * string.h: External definitions for optimized assembly string | 2 | * string.h: External definitions for optimized assembly string |
3 | * routines for the Linux Kernel. | 3 | * routines for the Linux Kernel. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/sun4paddr.h b/include/asm-sparc/sun4paddr.h index d863bfd5f09a..d52985f19f42 100644 --- a/include/asm-sparc/sun4paddr.h +++ b/include/asm-sparc/sun4paddr.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sun4paddr.h,v 1.3 1998/07/28 16:53:27 jj Exp $ | 1 | /* |
2 | * sun4paddr.h: Various physical addresses on sun4 machines | 2 | * sun4paddr.h: Various physical addresses on sun4 machines |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) | 4 | * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) |
diff --git a/include/asm-sparc/sunbpp.h b/include/asm-sparc/sunbpp.h index 568db79b730d..92ee1a8ff3a2 100644 --- a/include/asm-sparc/sunbpp.h +++ b/include/asm-sparc/sunbpp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sunbpp.h,v 1.1 1999/08/08 14:09:49 shadow Exp $ | 1 | /* |
2 | * include/asm-sparc/sunbpp.h | 2 | * include/asm-sparc/sunbpp.h |
3 | */ | 3 | */ |
4 | 4 | ||
diff --git a/include/asm-sparc/sysen.h b/include/asm-sparc/sysen.h index 692fa6f2296a..6af34abde6e7 100644 --- a/include/asm-sparc/sysen.h +++ b/include/asm-sparc/sysen.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sysen.h,v 1.3 1995/11/25 02:32:58 davem Exp $ | 1 | /* |
2 | * sysen.h: Bit fields within the "System Enable" register accessed via | 2 | * sysen.h: Bit fields within the "System Enable" register accessed via |
3 | * the ASI_CONTROL address space at address AC_SYSENABLE. | 3 | * the ASI_CONTROL address space at address AC_SYSENABLE. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index 733d40504e1e..f7b4409c35ff 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: termios.h,v 1.32 2001/06/01 08:12:11 davem Exp $ */ | ||
2 | #ifndef _SPARC_TERMIOS_H | 1 | #ifndef _SPARC_TERMIOS_H |
3 | #define _SPARC_TERMIOS_H | 2 | #define _SPARC_TERMIOS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/timer.h b/include/asm-sparc/timer.h index cb1fa1d1f184..d909565f9410 100644 --- a/include/asm-sparc/timer.h +++ b/include/asm-sparc/timer.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: timer.h,v 1.21 1999/04/20 13:22:51 anton Exp $ | 1 | /* |
2 | * timer.h: Definitions for the timer chips on the Sparc. | 2 | * timer.h: Definitions for the timer chips on the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/traps.h b/include/asm-sparc/traps.h index f62c7f878ee1..bebdbf8f43a8 100644 --- a/include/asm-sparc/traps.h +++ b/include/asm-sparc/traps.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: traps.h,v 1.9 1998/03/09 14:04:53 jj Exp $ | 1 | /* |
2 | * traps.h: Format of entries for the Sparc trap table. | 2 | * traps.h: Format of entries for the Sparc trap table. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/tsunami.h b/include/asm-sparc/tsunami.h index 887add5c466b..5bbd1d523baa 100644 --- a/include/asm-sparc/tsunami.h +++ b/include/asm-sparc/tsunami.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: tsunami.h,v 1.5 1996/08/29 09:49:03 davem Exp $ | 1 | /* |
2 | * tsunami.h: Module specific definitions for Tsunami V8 Sparcs | 2 | * tsunami.h: Module specific definitions for Tsunami V8 Sparcs |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/turbosparc.h b/include/asm-sparc/turbosparc.h index 31d2350a5818..17c73282db0a 100644 --- a/include/asm-sparc/turbosparc.h +++ b/include/asm-sparc/turbosparc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: turbosparc.h,v 1.4 1998/08/16 16:02:42 ecd Exp $ | 1 | /* |
2 | * turbosparc.h: Defines specific to the TurboSparc module. | 2 | * turbosparc.h: Defines specific to the TurboSparc module. |
3 | * This is SRMMU stuff. | 3 | * This is SRMMU stuff. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h index 42fc6ed98156..07734f942405 100644 --- a/include/asm-sparc/types.h +++ b/include/asm-sparc/types.h | |||
@@ -1,36 +1,19 @@ | |||
1 | /* $Id: types.h,v 1.13 2001/12/21 01:22:59 davem Exp $ */ | ||
2 | #ifndef _SPARC_TYPES_H | 1 | #ifndef _SPARC_TYPES_H |
3 | #define _SPARC_TYPES_H | 2 | #define _SPARC_TYPES_H |
4 | 3 | ||
5 | /* | 4 | /* |
6 | * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
7 | * header files exported to user space. | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * This file is never included by application software unless | 5 | * This file is never included by application software unless |
12 | * explicitly requested (e.g., via linux/types.h) in which case the | 6 | * explicitly requested (e.g., via linux/types.h) in which case the |
13 | * application is Linux specific so (user-) name space pollution is | 7 | * application is Linux specific so (user-) name space pollution is |
14 | * not a major issue. However, for interoperability, libraries still | 8 | * not a major issue. However, for interoperability, libraries still |
15 | * need to be careful to avoid a name clashes. | 9 | * need to be careful to avoid a name clashes. |
16 | */ | 10 | */ |
11 | #include <asm-generic/int-ll64.h> | ||
17 | 12 | ||
18 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
19 | 14 | ||
20 | typedef unsigned short umode_t; | 15 | typedef unsigned short umode_t; |
21 | 16 | ||
22 | typedef __signed__ char __s8; | ||
23 | typedef unsigned char __u8; | ||
24 | |||
25 | typedef __signed__ short __s16; | ||
26 | typedef unsigned short __u16; | ||
27 | |||
28 | typedef __signed__ int __s32; | ||
29 | typedef unsigned int __u32; | ||
30 | |||
31 | typedef __signed__ long long __s64; | ||
32 | typedef unsigned long long __u64; | ||
33 | |||
34 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLY__ */ |
35 | 18 | ||
36 | #ifdef __KERNEL__ | 19 | #ifdef __KERNEL__ |
@@ -39,18 +22,6 @@ typedef unsigned long long __u64; | |||
39 | 22 | ||
40 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
41 | 24 | ||
42 | typedef __signed__ char s8; | ||
43 | typedef unsigned char u8; | ||
44 | |||
45 | typedef __signed__ short s16; | ||
46 | typedef unsigned short u16; | ||
47 | |||
48 | typedef __signed__ int s32; | ||
49 | typedef unsigned int u32; | ||
50 | |||
51 | typedef __signed__ long long s64; | ||
52 | typedef unsigned long long u64; | ||
53 | |||
54 | typedef u32 dma_addr_t; | 25 | typedef u32 dma_addr_t; |
55 | typedef u32 dma64_addr_t; | 26 | typedef u32 dma64_addr_t; |
56 | 27 | ||
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h index 366b11696ee3..47d5619d43fa 100644 --- a/include/asm-sparc/uaccess.h +++ b/include/asm-sparc/uaccess.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: uaccess.h,v 1.24 2001/10/30 04:32:24 davem Exp $ | 1 | /* |
2 | * uaccess.h: User space memore access functions. | 2 | * uaccess.h: User space memore access functions. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/vac-ops.h b/include/asm-sparc/vac-ops.h index ab6f53b913ea..d10527611f11 100644 --- a/include/asm-sparc/vac-ops.h +++ b/include/asm-sparc/vac-ops.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: vac-ops.h,v 1.13 1998/01/30 10:59:59 jj Exp $ */ | ||
2 | #ifndef _SPARC_VAC_OPS_H | 1 | #ifndef _SPARC_VAC_OPS_H |
3 | #define _SPARC_VAC_OPS_H | 2 | #define _SPARC_VAC_OPS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/vaddrs.h b/include/asm-sparc/vaddrs.h index 91097392c8cc..f6ca4779056c 100644 --- a/include/asm-sparc/vaddrs.h +++ b/include/asm-sparc/vaddrs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: vaddrs.h,v 1.27 2001/07/04 00:18:18 davem Exp $ */ | ||
2 | #ifndef _SPARC_VADDRS_H | 1 | #ifndef _SPARC_VADDRS_H |
3 | #define _SPARC_VADDRS_H | 2 | #define _SPARC_VADDRS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/viking.h b/include/asm-sparc/viking.h index 7541da71b9d6..989930aeb093 100644 --- a/include/asm-sparc/viking.h +++ b/include/asm-sparc/viking.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: viking.h,v 1.19 1997/04/20 14:11:48 ecd Exp $ | 1 | /* |
2 | * viking.h: Defines specific to the GNU/Viking MBUS module. | 2 | * viking.h: Defines specific to the GNU/Viking MBUS module. |
3 | * This is SRMMU stuff. | 3 | * This is SRMMU stuff. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h index 096f3d3d90c3..5b0a06dc3bcb 100644 --- a/include/asm-sparc/winmacro.h +++ b/include/asm-sparc/winmacro.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: winmacro.h,v 1.22 2000/05/09 17:40:15 davem Exp $ | 1 | /* |
2 | * winmacro.h: Window loading-unloading macros. | 2 | * winmacro.h: Window loading-unloading macros. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/apb.h b/include/asm-sparc64/apb.h index 80f0df289a66..8f3b57db810f 100644 --- a/include/asm-sparc64/apb.h +++ b/include/asm-sparc64/apb.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: apb.h,v 1.2 1998/04/01 20:41:49 ecd Exp $ | 1 | /* |
2 | * apb.h: Advanced PCI Bridge Configuration Registers and Bits | 2 | * apb.h: Advanced PCI Bridge Configuration Registers and Bits |
3 | * | 3 | * |
4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
diff --git a/include/asm-sparc64/asi.h b/include/asm-sparc64/asi.h index 662a21107ae6..bc57c405e7d3 100644 --- a/include/asm-sparc64/asi.h +++ b/include/asm-sparc64/asi.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: asi.h,v 1.5 2001/03/29 11:47:47 davem Exp $ */ | ||
2 | #ifndef _SPARC64_ASI_H | 1 | #ifndef _SPARC64_ASI_H |
3 | #define _SPARC64_ASI_H | 2 | #define _SPARC64_ASI_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/auxio.h b/include/asm-sparc64/auxio.h index 81a590a50a1f..c4100494c7a5 100644 --- a/include/asm-sparc64/auxio.h +++ b/include/asm-sparc64/auxio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: auxio.h,v 1.3 2001/06/05 08:16:34 davem Exp $ | 1 | /* |
2 | * auxio.h: Definitions and code for the Auxiliary I/O registers. | 2 | * auxio.h: Definitions and code for the Auxiliary I/O registers. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/bbc.h b/include/asm-sparc64/bbc.h index 368fce4eedba..423a85800aae 100644 --- a/include/asm-sparc64/bbc.h +++ b/include/asm-sparc64/bbc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bbc.h,v 1.2 2001/03/26 23:47:18 davem Exp $ | 1 | /* |
2 | * bbc.h: Defines for BootBus Controller found on UltraSPARC-III | 2 | * bbc.h: Defines for BootBus Controller found on UltraSPARC-III |
3 | * systems. | 3 | * systems. |
4 | * | 4 | * |
diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h index 11f9d8146cdf..bb87b8080220 100644 --- a/include/asm-sparc64/bitops.h +++ b/include/asm-sparc64/bitops.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bitops.h,v 1.39 2002/01/30 01:40:00 davem Exp $ | 1 | /* |
2 | * bitops.h: Bit string operations on the V9. | 2 | * bitops.h: Bit string operations on the V9. |
3 | * | 3 | * |
4 | * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/chafsr.h b/include/asm-sparc64/chafsr.h index fd1688335ace..85c69b38220b 100644 --- a/include/asm-sparc64/chafsr.h +++ b/include/asm-sparc64/chafsr.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: chafsr.h,v 1.1 2001/03/28 10:56:34 davem Exp $ */ | ||
2 | #ifndef _SPARC64_CHAFSR_H | 1 | #ifndef _SPARC64_CHAFSR_H |
3 | #define _SPARC64_CHAFSR_H | 2 | #define _SPARC64_CHAFSR_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/checksum.h b/include/asm-sparc64/checksum.h index 70a006da7634..b290564c8ce0 100644 --- a/include/asm-sparc64/checksum.h +++ b/include/asm-sparc64/checksum.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: checksum.h,v 1.19 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef __SPARC64_CHECKSUM_H | 1 | #ifndef __SPARC64_CHECKSUM_H |
3 | #define __SPARC64_CHECKSUM_H | 2 | #define __SPARC64_CHECKSUM_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/chmctrl.h b/include/asm-sparc64/chmctrl.h index 53047f9f6423..859b4a4b0d30 100644 --- a/include/asm-sparc64/chmctrl.h +++ b/include/asm-sparc64/chmctrl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: chmctrl.h,v 1.1 2001/03/29 11:43:28 davem Exp $ */ | ||
2 | #ifndef _SPARC64_CHMCTRL_H | 1 | #ifndef _SPARC64_CHMCTRL_H |
3 | #define _SPARC64_CHMCTRL_H | 2 | #define _SPARC64_CHMCTRL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/dcr.h b/include/asm-sparc64/dcr.h index e9a3f305815d..620c9ba642e9 100644 --- a/include/asm-sparc64/dcr.h +++ b/include/asm-sparc64/dcr.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: dcr.h,v 1.4 2001/03/09 17:56:37 davem Exp $ */ | ||
2 | #ifndef _SPARC64_DCR_H | 1 | #ifndef _SPARC64_DCR_H |
3 | #define _SPARC64_DCR_H | 2 | #define _SPARC64_DCR_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/display7seg.h b/include/asm-sparc64/display7seg.h index 955a3502218e..c066a8964eab 100644 --- a/include/asm-sparc64/display7seg.h +++ b/include/asm-sparc64/display7seg.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: display7seg.h,v 1.2 2000/08/02 06:22:35 davem Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * display7seg - Driver interface for the 7-segment display | 3 | * display7seg - Driver interface for the 7-segment display |
4 | * present on Sun Microsystems CP1400 and CP1500 | 4 | * present on Sun Microsystems CP1400 and CP1500 |
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h index a9fd06183972..9d4c024bd3b3 100644 --- a/include/asm-sparc64/dma.h +++ b/include/asm-sparc64/dma.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: dma.h,v 1.21 2001/12/13 04:16:52 davem Exp $ | 1 | /* |
2 | * include/asm-sparc64/dma.h | 2 | * include/asm-sparc64/dma.h |
3 | * | 3 | * |
4 | * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index 9c1c6db2a790..fcc62b97ced5 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ebus.h,v 1.10 2001/03/14 05:00:55 davem Exp $ | 1 | /* |
2 | * ebus.h: PCI to Ebus pseudo driver software state. | 2 | * ebus.h: PCI to Ebus pseudo driver software state. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h index 11c8e68d712a..0818a1308f4e 100644 --- a/include/asm-sparc64/elf.h +++ b/include/asm-sparc64/elf.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: elf.h,v 1.32 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef __ASM_SPARC64_ELF_H | 1 | #ifndef __ASM_SPARC64_ELF_H |
3 | #define __ASM_SPARC64_ELF_H | 2 | #define __ASM_SPARC64_ELF_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/envctrl.h b/include/asm-sparc64/envctrl.h index 53a6653815eb..a5668a082b14 100644 --- a/include/asm-sparc64/envctrl.h +++ b/include/asm-sparc64/envctrl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: envctrl.h,v 1.3 2000/11/03 00:37:40 davem Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * envctrl.h: Definitions for access to the i2c environment | 3 | * envctrl.h: Definitions for access to the i2c environment |
4 | * monitoring on Ultrasparc systems. | 4 | * monitoring on Ultrasparc systems. |
diff --git a/include/asm-sparc64/estate.h b/include/asm-sparc64/estate.h index a719c3d2f6b1..520c08560d1b 100644 --- a/include/asm-sparc64/estate.h +++ b/include/asm-sparc64/estate.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: estate.h,v 1.1 2001/03/28 10:56:34 davem Exp $ */ | ||
2 | #ifndef _SPARC64_ESTATE_H | 1 | #ifndef _SPARC64_ESTATE_H |
3 | #define _SPARC64_ESTATE_H | 2 | #define _SPARC64_ESTATE_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h index 111f6b3b8925..8a09ca7aa2f2 100644 --- a/include/asm-sparc64/fcntl.h +++ b/include/asm-sparc64/fcntl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: fcntl.h,v 1.12 2001/09/20 00:35:34 davem Exp $ */ | ||
2 | #ifndef _SPARC64_FCNTL_H | 1 | #ifndef _SPARC64_FCNTL_H |
3 | #define _SPARC64_FCNTL_H | 2 | #define _SPARC64_FCNTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/fhc.h b/include/asm-sparc64/fhc.h index 9e7f1b0d78b9..ddffcdfbc984 100644 --- a/include/asm-sparc64/fhc.h +++ b/include/asm-sparc64/fhc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: fhc.h,v 1.5 1999/09/21 14:39:29 davem Exp $ | 1 | /* |
2 | * fhc.h: Structures for central/fhc pseudo driver on Sunfire/Starfire/Wildfire. | 2 | * fhc.h: Structures for central/fhc pseudo driver on Sunfire/Starfire/Wildfire. |
3 | * | 3 | * |
4 | * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com) |
diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h index 67960a751f4d..10e9dabc4c41 100644 --- a/include/asm-sparc64/head.h +++ b/include/asm-sparc64/head.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: head.h,v 1.30 1997/08/08 08:34:33 jj Exp $ */ | ||
2 | #ifndef _SPARC64_HEAD_H | 1 | #ifndef _SPARC64_HEAD_H |
3 | #define _SPARC64_HEAD_H | 2 | #define _SPARC64_HEAD_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index c5fdabe0b42d..1282676da1cd 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ide.h,v 1.21 2001/09/25 20:21:48 kanoj Exp $ | 1 | /* |
2 | * ide.h: Ultra/PCI specific IDE glue. | 2 | * ide.h: Ultra/PCI specific IDE glue. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/idprom.h b/include/asm-sparc64/idprom.h index 77fbf987385f..a363fa0a112a 100644 --- a/include/asm-sparc64/idprom.h +++ b/include/asm-sparc64/idprom.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: idprom.h,v 1.2 1997/04/04 00:50:16 davem Exp $ | 1 | /* |
2 | * idprom.h: Macros and defines for idprom routines | 2 | * idprom.h: Macros and defines for idprom routines |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index c299b853b5ba..3158960f3eb5 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -24,7 +24,8 @@ static inline u8 _inb(unsigned long addr) | |||
24 | 24 | ||
25 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */" | 25 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */" |
26 | : "=r" (ret) | 26 | : "=r" (ret) |
27 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 27 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
28 | : "memory"); | ||
28 | 29 | ||
29 | return ret; | 30 | return ret; |
30 | } | 31 | } |
@@ -35,7 +36,8 @@ static inline u16 _inw(unsigned long addr) | |||
35 | 36 | ||
36 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */" | 37 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */" |
37 | : "=r" (ret) | 38 | : "=r" (ret) |
38 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 39 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
40 | : "memory"); | ||
39 | 41 | ||
40 | return ret; | 42 | return ret; |
41 | } | 43 | } |
@@ -46,7 +48,8 @@ static inline u32 _inl(unsigned long addr) | |||
46 | 48 | ||
47 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */" | 49 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */" |
48 | : "=r" (ret) | 50 | : "=r" (ret) |
49 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 51 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
52 | : "memory"); | ||
50 | 53 | ||
51 | return ret; | 54 | return ret; |
52 | } | 55 | } |
@@ -55,21 +58,24 @@ static inline void _outb(u8 b, unsigned long addr) | |||
55 | { | 58 | { |
56 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" | 59 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" |
57 | : /* no outputs */ | 60 | : /* no outputs */ |
58 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 61 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
62 | : "memory"); | ||
59 | } | 63 | } |
60 | 64 | ||
61 | static inline void _outw(u16 w, unsigned long addr) | 65 | static inline void _outw(u16 w, unsigned long addr) |
62 | { | 66 | { |
63 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" | 67 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" |
64 | : /* no outputs */ | 68 | : /* no outputs */ |
65 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 69 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
70 | : "memory"); | ||
66 | } | 71 | } |
67 | 72 | ||
68 | static inline void _outl(u32 l, unsigned long addr) | 73 | static inline void _outl(u32 l, unsigned long addr) |
69 | { | 74 | { |
70 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" | 75 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" |
71 | : /* no outputs */ | 76 | : /* no outputs */ |
72 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 77 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
78 | : "memory"); | ||
73 | } | 79 | } |
74 | 80 | ||
75 | #define inb(__addr) (_inb((unsigned long)(__addr))) | 81 | #define inb(__addr) (_inb((unsigned long)(__addr))) |
@@ -128,7 +134,8 @@ static inline u8 _readb(const volatile void __iomem *addr) | |||
128 | 134 | ||
129 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" | 135 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" |
130 | : "=r" (ret) | 136 | : "=r" (ret) |
131 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 137 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
138 | : "memory"); | ||
132 | return ret; | 139 | return ret; |
133 | } | 140 | } |
134 | 141 | ||
@@ -137,7 +144,8 @@ static inline u16 _readw(const volatile void __iomem *addr) | |||
137 | 144 | ||
138 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" | 145 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" |
139 | : "=r" (ret) | 146 | : "=r" (ret) |
140 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 147 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
148 | : "memory"); | ||
141 | 149 | ||
142 | return ret; | 150 | return ret; |
143 | } | 151 | } |
@@ -147,7 +155,8 @@ static inline u32 _readl(const volatile void __iomem *addr) | |||
147 | 155 | ||
148 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" | 156 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" |
149 | : "=r" (ret) | 157 | : "=r" (ret) |
150 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 158 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
159 | : "memory"); | ||
151 | 160 | ||
152 | return ret; | 161 | return ret; |
153 | } | 162 | } |
@@ -157,7 +166,8 @@ static inline u64 _readq(const volatile void __iomem *addr) | |||
157 | 166 | ||
158 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" | 167 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" |
159 | : "=r" (ret) | 168 | : "=r" (ret) |
160 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 169 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
170 | : "memory"); | ||
161 | 171 | ||
162 | return ret; | 172 | return ret; |
163 | } | 173 | } |
@@ -166,28 +176,32 @@ static inline void _writeb(u8 b, volatile void __iomem *addr) | |||
166 | { | 176 | { |
167 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" | 177 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" |
168 | : /* no outputs */ | 178 | : /* no outputs */ |
169 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 179 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
180 | : "memory"); | ||
170 | } | 181 | } |
171 | 182 | ||
172 | static inline void _writew(u16 w, volatile void __iomem *addr) | 183 | static inline void _writew(u16 w, volatile void __iomem *addr) |
173 | { | 184 | { |
174 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" | 185 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" |
175 | : /* no outputs */ | 186 | : /* no outputs */ |
176 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 187 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
188 | : "memory"); | ||
177 | } | 189 | } |
178 | 190 | ||
179 | static inline void _writel(u32 l, volatile void __iomem *addr) | 191 | static inline void _writel(u32 l, volatile void __iomem *addr) |
180 | { | 192 | { |
181 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" | 193 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" |
182 | : /* no outputs */ | 194 | : /* no outputs */ |
183 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 195 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
196 | : "memory"); | ||
184 | } | 197 | } |
185 | 198 | ||
186 | static inline void _writeq(u64 q, volatile void __iomem *addr) | 199 | static inline void _writeq(u64 q, volatile void __iomem *addr) |
187 | { | 200 | { |
188 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" | 201 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" |
189 | : /* no outputs */ | 202 | : /* no outputs */ |
190 | : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 203 | : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
204 | : "memory"); | ||
191 | } | 205 | } |
192 | 206 | ||
193 | #define readb(__addr) _readb(__addr) | 207 | #define readb(__addr) _readb(__addr) |
@@ -299,7 +313,8 @@ static inline u8 _sbus_readb(const volatile void __iomem *addr) | |||
299 | 313 | ||
300 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */" | 314 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */" |
301 | : "=r" (ret) | 315 | : "=r" (ret) |
302 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 316 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
317 | : "memory"); | ||
303 | 318 | ||
304 | return ret; | 319 | return ret; |
305 | } | 320 | } |
@@ -310,7 +325,8 @@ static inline u16 _sbus_readw(const volatile void __iomem *addr) | |||
310 | 325 | ||
311 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */" | 326 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */" |
312 | : "=r" (ret) | 327 | : "=r" (ret) |
313 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 328 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
329 | : "memory"); | ||
314 | 330 | ||
315 | return ret; | 331 | return ret; |
316 | } | 332 | } |
@@ -321,7 +337,8 @@ static inline u32 _sbus_readl(const volatile void __iomem *addr) | |||
321 | 337 | ||
322 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */" | 338 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */" |
323 | : "=r" (ret) | 339 | : "=r" (ret) |
324 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 340 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
341 | : "memory"); | ||
325 | 342 | ||
326 | return ret; | 343 | return ret; |
327 | } | 344 | } |
@@ -332,7 +349,8 @@ static inline u64 _sbus_readq(const volatile void __iomem *addr) | |||
332 | 349 | ||
333 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */" | 350 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */" |
334 | : "=r" (ret) | 351 | : "=r" (ret) |
335 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 352 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
353 | : "memory"); | ||
336 | 354 | ||
337 | return ret; | 355 | return ret; |
338 | } | 356 | } |
@@ -341,28 +359,32 @@ static inline void _sbus_writeb(u8 b, volatile void __iomem *addr) | |||
341 | { | 359 | { |
342 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" | 360 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" |
343 | : /* no outputs */ | 361 | : /* no outputs */ |
344 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 362 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
363 | : "memory"); | ||
345 | } | 364 | } |
346 | 365 | ||
347 | static inline void _sbus_writew(u16 w, volatile void __iomem *addr) | 366 | static inline void _sbus_writew(u16 w, volatile void __iomem *addr) |
348 | { | 367 | { |
349 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" | 368 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" |
350 | : /* no outputs */ | 369 | : /* no outputs */ |
351 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 370 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
371 | : "memory"); | ||
352 | } | 372 | } |
353 | 373 | ||
354 | static inline void _sbus_writel(u32 l, volatile void __iomem *addr) | 374 | static inline void _sbus_writel(u32 l, volatile void __iomem *addr) |
355 | { | 375 | { |
356 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" | 376 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" |
357 | : /* no outputs */ | 377 | : /* no outputs */ |
358 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 378 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
379 | : "memory"); | ||
359 | } | 380 | } |
360 | 381 | ||
361 | static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) | 382 | static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) |
362 | { | 383 | { |
363 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" | 384 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" |
364 | : /* no outputs */ | 385 | : /* no outputs */ |
365 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 386 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
387 | : "memory"); | ||
366 | } | 388 | } |
367 | 389 | ||
368 | #define sbus_readb(__addr) _sbus_readb(__addr) | 390 | #define sbus_readb(__addr) _sbus_readb(__addr) |
diff --git a/include/asm-sparc64/ioctl.h b/include/asm-sparc64/ioctl.h index 253d0b57b316..d634c21b4724 100644 --- a/include/asm-sparc64/ioctl.h +++ b/include/asm-sparc64/ioctl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ioctl.h,v 1.2 1998/10/15 05:40:38 jj Exp $ */ | ||
2 | #ifndef _SPARC64_IOCTL_H | 1 | #ifndef _SPARC64_IOCTL_H |
3 | #define _SPARC64_IOCTL_H | 2 | #define _SPARC64_IOCTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/ioctls.h b/include/asm-sparc64/ioctls.h index c1be40647c99..94d1b75e512b 100644 --- a/include/asm-sparc64/ioctls.h +++ b/include/asm-sparc64/ioctls.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ioctls.h,v 1.7 1998/02/23 02:49:41 davem Exp $ */ | ||
2 | #ifndef _ASM_SPARC64_IOCTLS_H | 1 | #ifndef _ASM_SPARC64_IOCTLS_H |
3 | #define _ASM_SPARC64_IOCTLS_H | 2 | #define _ASM_SPARC64_IOCTLS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/lsu.h b/include/asm-sparc64/lsu.h index 79f109840c39..7190f8de90a0 100644 --- a/include/asm-sparc64/lsu.h +++ b/include/asm-sparc64/lsu.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: lsu.h,v 1.2 1997/04/04 00:50:22 davem Exp $ */ | ||
2 | #ifndef _SPARC64_LSU_H | 1 | #ifndef _SPARC64_LSU_H |
3 | #define _SPARC64_LSU_H | 2 | #define _SPARC64_LSU_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index e584563b56eb..d2ae67cd1bdc 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: mman.h,v 1.2 2000/03/15 02:44:26 davem Exp $ */ | ||
2 | #ifndef __SPARC64_MMAN_H__ | 1 | #ifndef __SPARC64_MMAN_H__ |
3 | #define __SPARC64_MMAN_H__ | 2 | #define __SPARC64_MMAN_H__ |
4 | 3 | ||
@@ -24,9 +23,8 @@ | |||
24 | 23 | ||
25 | #ifdef __KERNEL__ | 24 | #ifdef __KERNEL__ |
26 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
27 | #define arch_mmap_check sparc64_mmap_check | 26 | #define arch_mmap_check(addr,len,flags) sparc64_mmap_check(addr,len) |
28 | int sparc64_mmap_check(unsigned long addr, unsigned long len, | 27 | int sparc64_mmap_check(unsigned long addr, unsigned long len); |
29 | unsigned long flags); | ||
30 | #endif | 28 | #endif |
31 | #endif | 29 | #endif |
32 | 30 | ||
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 9fc225ed5500..5693ab482606 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: mmu_context.h,v 1.54 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef __SPARC64_MMU_CONTEXT_H | 1 | #ifndef __SPARC64_MMU_CONTEXT_H |
3 | #define __SPARC64_MMU_CONTEXT_H | 2 | #define __SPARC64_MMU_CONTEXT_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/namei.h b/include/asm-sparc64/namei.h index 275161f21213..cbc1b4c06891 100644 --- a/include/asm-sparc64/namei.h +++ b/include/asm-sparc64/namei.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: namei.h,v 1.17 2000/04/13 00:55:54 davem Exp $ | 1 | /* |
2 | * linux/include/asm-sparc64/namei.h | 2 | * linux/include/asm-sparc64/namei.h |
3 | * | 3 | * |
4 | * Routines to handle famous /usr/gnemul/s*. | 4 | * Routines to handle famous /usr/gnemul/s*. |
diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h index 26ec046715c8..b69e4a8c9170 100644 --- a/include/asm-sparc64/openprom.h +++ b/include/asm-sparc64/openprom.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: openprom.h,v 1.9 2001/03/16 10:22:02 davem Exp $ */ | ||
2 | #ifndef __SPARC64_OPENPROM_H | 1 | #ifndef __SPARC64_OPENPROM_H |
3 | #define __SPARC64_OPENPROM_H | 2 | #define __SPARC64_OPENPROM_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index 618117def0dc..93f0881b766e 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -1,5 +1,3 @@ | |||
1 | /* $Id: page.h,v 1.39 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | |||
3 | #ifndef _SPARC64_PAGE_H | 1 | #ifndef _SPARC64_PAGE_H |
4 | #define _SPARC64_PAGE_H | 2 | #define _SPARC64_PAGE_H |
5 | 3 | ||
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 3ee2d406373b..326de104d014 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pgalloc.h,v 1.30 2001/12/21 04:56:17 davem Exp $ */ | ||
2 | #ifndef _SPARC64_PGALLOC_H | 1 | #ifndef _SPARC64_PGALLOC_H |
3 | #define _SPARC64_PGALLOC_H | 2 | #define _SPARC64_PGALLOC_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 0e200e7acec7..b87017747b5d 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtable.h,v 1.156 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * pgtable.h: SpitFire page table operations. | 2 | * pgtable.h: SpitFire page table operations. |
3 | * | 3 | * |
4 | * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/pil.h b/include/asm-sparc64/pil.h index 2f5d126f7163..eaac842d88c3 100644 --- a/include/asm-sparc64/pil.h +++ b/include/asm-sparc64/pil.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pil.h,v 1.1 2002/01/23 11:27:36 davem Exp $ */ | ||
2 | #ifndef _SPARC64_PIL_H | 1 | #ifndef _SPARC64_PIL_H |
3 | #define _SPARC64_PIL_H | 2 | #define _SPARC64_PIL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index 885b6a1dcae4..26b4e5255761 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: processor.h,v 1.83 2002/02/10 06:04:33 davem Exp $ | 1 | /* |
2 | * include/asm-sparc64/processor.h | 2 | * include/asm-sparc64/processor.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/psrcompat.h b/include/asm-sparc64/psrcompat.h index 5590ce6bd076..44b6327dbbf5 100644 --- a/include/asm-sparc64/psrcompat.h +++ b/include/asm-sparc64/psrcompat.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: psrcompat.h,v 1.5 1998/10/06 09:28:39 jj Exp $ */ | ||
2 | #ifndef _SPARC64_PSRCOMPAT_H | 1 | #ifndef _SPARC64_PSRCOMPAT_H |
3 | #define _SPARC64_PSRCOMPAT_H | 2 | #define _SPARC64_PSRCOMPAT_H |
4 | 3 | ||
@@ -12,6 +11,7 @@ | |||
12 | #define PSR_PIL 0x00000f00 /* processor interrupt level */ | 11 | #define PSR_PIL 0x00000f00 /* processor interrupt level */ |
13 | #define PSR_EF 0x00001000 /* enable floating point */ | 12 | #define PSR_EF 0x00001000 /* enable floating point */ |
14 | #define PSR_EC 0x00002000 /* enable co-processor */ | 13 | #define PSR_EC 0x00002000 /* enable co-processor */ |
14 | #define PSR_SYSCALL 0x00004000 /* inside of a syscall */ | ||
15 | #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ | 15 | #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ |
16 | #define PSR_ICC 0x00f00000 /* integer condition codes */ | 16 | #define PSR_ICC 0x00f00000 /* integer condition codes */ |
17 | #define PSR_C 0x00100000 /* carry bit */ | 17 | #define PSR_C 0x00100000 /* carry bit */ |
@@ -30,6 +30,7 @@ static inline unsigned int tstate_to_psr(unsigned long tstate) | |||
30 | PSR_S | | 30 | PSR_S | |
31 | ((tstate & TSTATE_ICC) >> 12) | | 31 | ((tstate & TSTATE_ICC) >> 12) | |
32 | ((tstate & TSTATE_XCC) >> 20) | | 32 | ((tstate & TSTATE_XCC) >> 20) | |
33 | ((tstate & TSTATE_SYSCALL) ? PSR_SYSCALL : 0) | | ||
33 | PSR_V8PLUS); | 34 | PSR_V8PLUS); |
34 | } | 35 | } |
35 | 36 | ||
diff --git a/include/asm-sparc64/pstate.h b/include/asm-sparc64/pstate.h index f3c45484c636..a26a53777bb0 100644 --- a/include/asm-sparc64/pstate.h +++ b/include/asm-sparc64/pstate.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pstate.h,v 1.6 1997/06/25 07:39:45 jj Exp $ */ | ||
2 | #ifndef _SPARC64_PSTATE_H | 1 | #ifndef _SPARC64_PSTATE_H |
3 | #define _SPARC64_PSTATE_H | 2 | #define _SPARC64_PSTATE_H |
4 | 3 | ||
@@ -62,6 +61,7 @@ | |||
62 | #define TSTATE_PRIV _AC(0x0000000000000400,UL) /* Privilege. */ | 61 | #define TSTATE_PRIV _AC(0x0000000000000400,UL) /* Privilege. */ |
63 | #define TSTATE_IE _AC(0x0000000000000200,UL) /* Interrupt Enable. */ | 62 | #define TSTATE_IE _AC(0x0000000000000200,UL) /* Interrupt Enable. */ |
64 | #define TSTATE_AG _AC(0x0000000000000100,UL) /* Alternate Globals.*/ | 63 | #define TSTATE_AG _AC(0x0000000000000100,UL) /* Alternate Globals.*/ |
64 | #define TSTATE_SYSCALL _AC(0x0000000000000020,UL) /* in syscall trap */ | ||
65 | #define TSTATE_CWP _AC(0x000000000000001f,UL) /* Curr Win-Pointer. */ | 65 | #define TSTATE_CWP _AC(0x000000000000001f,UL) /* Curr Win-Pointer. */ |
66 | 66 | ||
67 | /* Floating-Point Registers State Register. | 67 | /* Floating-Point Registers State Register. |
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index 714b81956f32..b163da79bb6d 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h | |||
@@ -42,16 +42,14 @@ static inline int pt_regs_trap_type(struct pt_regs *regs) | |||
42 | return regs->magic & 0x1ff; | 42 | return regs->magic & 0x1ff; |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline int pt_regs_clear_trap_type(struct pt_regs *regs) | 45 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) |
46 | { | 46 | { |
47 | return regs->magic &= ~0x1ff; | 47 | return (regs->tstate & TSTATE_SYSCALL); |
48 | } | 48 | } |
49 | 49 | ||
50 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | 50 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) |
51 | { | 51 | { |
52 | int tt = pt_regs_trap_type(regs); | 52 | return (regs->tstate &= ~TSTATE_SYSCALL); |
53 | |||
54 | return (tt == 0x110 || tt == 0x111 || tt == 0x16d); | ||
55 | } | 53 | } |
56 | 54 | ||
57 | struct pt_regs32 { | 55 | struct pt_regs32 { |
@@ -130,6 +128,17 @@ struct sparc_trapf { | |||
130 | 128 | ||
131 | #ifdef __KERNEL__ | 129 | #ifdef __KERNEL__ |
132 | 130 | ||
131 | struct global_reg_snapshot { | ||
132 | unsigned long tstate; | ||
133 | unsigned long tpc; | ||
134 | unsigned long tnpc; | ||
135 | unsigned long o7; | ||
136 | unsigned long i7; | ||
137 | struct thread_info *thread; | ||
138 | unsigned long pad1; | ||
139 | unsigned long pad2; | ||
140 | }; | ||
141 | |||
133 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | 142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE |
134 | 143 | ||
135 | #define force_successful_syscall_return() \ | 144 | #define force_successful_syscall_return() \ |
@@ -297,7 +306,22 @@ extern void __show_regs(struct pt_regs *); | |||
297 | #define SF_XARG5 0x58 | 306 | #define SF_XARG5 0x58 |
298 | #define SF_XXARG 0x5c | 307 | #define SF_XXARG 0x5c |
299 | 308 | ||
309 | #ifdef __KERNEL__ | ||
310 | |||
311 | /* global_reg_snapshot offsets */ | ||
312 | #define GR_SNAP_TSTATE 0x00 | ||
313 | #define GR_SNAP_TPC 0x08 | ||
314 | #define GR_SNAP_TNPC 0x10 | ||
315 | #define GR_SNAP_O7 0x18 | ||
316 | #define GR_SNAP_I7 0x20 | ||
317 | #define GR_SNAP_THREAD 0x28 | ||
318 | #define GR_SNAP_PAD1 0x30 | ||
319 | #define GR_SNAP_PAD2 0x38 | ||
320 | |||
321 | #endif /* __KERNEL__ */ | ||
322 | |||
300 | /* Stuff for the ptrace system call */ | 323 | /* Stuff for the ptrace system call */ |
324 | #define PTRACE_SPARC_DETACH 11 | ||
301 | #define PTRACE_GETREGS 12 | 325 | #define PTRACE_GETREGS 12 |
302 | #define PTRACE_SETREGS 13 | 326 | #define PTRACE_SETREGS 13 |
303 | #define PTRACE_GETFPREGS 14 | 327 | #define PTRACE_GETFPREGS 14 |
diff --git a/include/asm-sparc64/reg.h b/include/asm-sparc64/reg.h index fc68f90181b3..77aa4804a60d 100644 --- a/include/asm-sparc64/reg.h +++ b/include/asm-sparc64/reg.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: reg.h,v 1.6 1999/09/06 08:22:10 jj Exp $ | 1 | /* |
2 | * linux/asm-sparc64/reg.h | 2 | * linux/asm-sparc64/reg.h |
3 | * Layout of the registers as expected by gdb on the Sparc | 3 | * Layout of the registers as expected by gdb on the Sparc |
4 | * we should replace the user.h definitions with those in | 4 | * we should replace the user.h definitions with those in |
diff --git a/include/asm-sparc64/resource.h b/include/asm-sparc64/resource.h index aa469795a6b0..4f08fb5e4ca4 100644 --- a/include/asm-sparc64/resource.h +++ b/include/asm-sparc64/resource.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: resource.h,v 1.8 2000/09/23 02:09:21 davem Exp $ | 1 | /* |
2 | * resource.h: Resource definitions. | 2 | * resource.h: Resource definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/rtc.h b/include/asm-sparc64/rtc.h index cb17334595c9..f9ecb1fe2ecd 100644 --- a/include/asm-sparc64/rtc.h +++ b/include/asm-sparc64/rtc.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: rtc.h,v 1.1 1996/12/26 14:22:35 davem Exp $ | 1 | /* |
2 | * | ||
3 | * rtc.h: Definitions for access to the Mostek real time clock | 2 | * rtc.h: Definitions for access to the Mostek real time clock |
4 | * | 3 | * |
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) | 4 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) |
diff --git a/include/asm-sparc64/rwsem.h b/include/asm-sparc64/rwsem.h index 1294b7ce5d06..1dc129ac2feb 100644 --- a/include/asm-sparc64/rwsem.h +++ b/include/asm-sparc64/rwsem.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: rwsem.h,v 1.5 2001/11/18 00:12:56 davem Exp $ | 1 | /* |
2 | * rwsem.h: R/W semaphores implemented using CAS | 2 | * rwsem.h: R/W semaphores implemented using CAS |
3 | * | 3 | * |
4 | * Written by David S. Miller (davem@redhat.com), 2001. | 4 | * Written by David S. Miller (davem@redhat.com), 2001. |
diff --git a/include/asm-sparc64/scatterlist.h b/include/asm-sparc64/scatterlist.h index 6df23f070b1a..81bd058f9382 100644 --- a/include/asm-sparc64/scatterlist.h +++ b/include/asm-sparc64/scatterlist.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: scatterlist.h,v 1.11 2001/12/17 07:05:15 davem Exp $ */ | ||
2 | #ifndef _SPARC64_SCATTERLIST_H | 1 | #ifndef _SPARC64_SCATTERLIST_H |
3 | #define _SPARC64_SCATTERLIST_H | 2 | #define _SPARC64_SCATTERLIST_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/shmparam.h b/include/asm-sparc64/shmparam.h index 8c66fded8a32..1ed0d6701a9b 100644 --- a/include/asm-sparc64/shmparam.h +++ b/include/asm-sparc64/shmparam.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: shmparam.h,v 1.5 2001/09/24 21:17:57 kanoj Exp $ */ | ||
2 | #ifndef _ASMSPARC64_SHMPARAM_H | 1 | #ifndef _ASMSPARC64_SHMPARAM_H |
3 | #define _ASMSPARC64_SHMPARAM_H | 2 | #define _ASMSPARC64_SHMPARAM_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/sigcontext.h b/include/asm-sparc64/sigcontext.h index d8073373db8c..1c868d680cfc 100644 --- a/include/asm-sparc64/sigcontext.h +++ b/include/asm-sparc64/sigcontext.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: sigcontext.h,v 1.12 1999/09/06 08:22:09 jj Exp $ */ | ||
2 | #ifndef __SPARC64_SIGCONTEXT_H | 1 | #ifndef __SPARC64_SIGCONTEXT_H |
3 | #define __SPARC64_SIGCONTEXT_H | 2 | #define __SPARC64_SIGCONTEXT_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index fa6f467389db..2a7c7934ac0a 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: signal.h,v 1.9 1999/09/06 08:22:11 jj Exp $ */ | ||
2 | #ifndef _ASMSPARC64_SIGNAL_H | 1 | #ifndef _ASMSPARC64_SIGNAL_H |
3 | #define _ASMSPARC64_SIGNAL_H | 2 | #define _ASMSPARC64_SIGNAL_H |
4 | 3 | ||
@@ -186,13 +185,7 @@ struct k_sigaction { | |||
186 | void __user *ka_restorer; | 185 | void __user *ka_restorer; |
187 | }; | 186 | }; |
188 | 187 | ||
189 | struct signal_deliver_cookie { | 188 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
190 | int restart_syscall; | ||
191 | unsigned long orig_i0; | ||
192 | }; | ||
193 | |||
194 | struct pt_regs; | ||
195 | extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); | ||
196 | 189 | ||
197 | #endif /* !(__KERNEL__) */ | 190 | #endif /* !(__KERNEL__) */ |
198 | 191 | ||
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h index 1c1c5ea5cea5..cd0311b2e19d 100644 --- a/include/asm-sparc64/smp.h +++ b/include/asm-sparc64/smp.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* smp.h: Sparc64 specific SMP stuff. | 1 | /* smp.h: Sparc64 specific SMP stuff. |
2 | * | 2 | * |
3 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _SPARC64_SMP_H | 6 | #ifndef _SPARC64_SMP_H |
@@ -44,6 +44,8 @@ extern int hard_smp_processor_id(void); | |||
44 | extern void smp_fill_in_sib_core_maps(void); | 44 | extern void smp_fill_in_sib_core_maps(void); |
45 | extern void cpu_play_dead(void); | 45 | extern void cpu_play_dead(void); |
46 | 46 | ||
47 | extern void smp_fetch_global_regs(void); | ||
48 | |||
47 | #ifdef CONFIG_HOTPLUG_CPU | 49 | #ifdef CONFIG_HOTPLUG_CPU |
48 | extern int __cpu_disable(void); | 50 | extern int __cpu_disable(void); |
49 | extern void __cpu_die(unsigned int cpu); | 51 | extern void __cpu_die(unsigned int cpu); |
@@ -55,6 +57,7 @@ extern void __cpu_die(unsigned int cpu); | |||
55 | 57 | ||
56 | #define hard_smp_processor_id() 0 | 58 | #define hard_smp_processor_id() 0 |
57 | #define smp_fill_in_sib_core_maps() do { } while (0) | 59 | #define smp_fill_in_sib_core_maps() do { } while (0) |
60 | #define smp_fetch_global_regs() do { } while (0) | ||
58 | 61 | ||
59 | #endif /* !(CONFIG_SMP) */ | 62 | #endif /* !(CONFIG_SMP) */ |
60 | 63 | ||
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h index 8cf071fae3eb..5af688f56716 100644 --- a/include/asm-sparc64/socket.h +++ b/include/asm-sparc64/socket.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: socket.h,v 1.10 2001/06/13 16:25:03 davem Exp $ */ | ||
2 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _ASM_SOCKET_H |
3 | #define _ASM_SOCKET_H | 2 | #define _ASM_SOCKET_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/starfire.h b/include/asm-sparc64/starfire.h index 48b50b5e35b0..07bafd31e33c 100644 --- a/include/asm-sparc64/starfire.h +++ b/include/asm-sparc64/starfire.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: starfire.h,v 1.2 2001/07/04 00:18:18 davem Exp $ | 1 | /* |
2 | * starfire.h: Group all starfire specific code together. | 2 | * starfire.h: Group all starfire specific code together. |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Anton Blanchard (anton@samba.org) | 4 | * Copyright (C) 2000 Anton Blanchard (anton@samba.org) |
diff --git a/include/asm-sparc64/stat.h b/include/asm-sparc64/stat.h index 128c27e57f0b..9650fdea847f 100644 --- a/include/asm-sparc64/stat.h +++ b/include/asm-sparc64/stat.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: stat.h,v 1.7 2000/08/04 05:35:55 davem Exp $ */ | ||
2 | #ifndef _SPARC64_STAT_H | 1 | #ifndef _SPARC64_STAT_H |
3 | #define _SPARC64_STAT_H | 2 | #define _SPARC64_STAT_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/statfs.h b/include/asm-sparc64/statfs.h index 185b6c481b24..79b3c890a5fa 100644 --- a/include/asm-sparc64/statfs.h +++ b/include/asm-sparc64/statfs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: statfs.h,v 1.2 1997/04/14 17:05:22 jj Exp $ */ | ||
2 | #ifndef _SPARC64_STATFS_H | 1 | #ifndef _SPARC64_STATFS_H |
3 | #define _SPARC64_STATFS_H | 2 | #define _SPARC64_STATFS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/string.h b/include/asm-sparc64/string.h index c7d88622cb27..43161f2d17eb 100644 --- a/include/asm-sparc64/string.h +++ b/include/asm-sparc64/string.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: string.h,v 1.20 2001/09/27 04:36:24 kanoj Exp $ | 1 | /* |
2 | * string.h: External definitions for optimized assembly string | 2 | * string.h: External definitions for optimized assembly string |
3 | * routines for the Linux Kernel. | 3 | * routines for the Linux Kernel. |
4 | * | 4 | * |
diff --git a/include/asm-sparc64/sunbpp.h b/include/asm-sparc64/sunbpp.h index b441cc9c426c..8e171b7a9f4f 100644 --- a/include/asm-sparc64/sunbpp.h +++ b/include/asm-sparc64/sunbpp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sunbpp.h,v 1.1 1999/08/13 06:21:44 shadow Exp $ | 1 | /* |
2 | * include/asm-sparc64/sunbpp.h | 2 | * include/asm-sparc64/sunbpp.h |
3 | */ | 3 | */ |
4 | 4 | ||
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index cacbea171ad7..1f5dab25dda5 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: termios.h,v 1.11 2001/06/01 08:12:11 davem Exp $ */ | ||
2 | #ifndef _SPARC64_TERMIOS_H | 1 | #ifndef _SPARC64_TERMIOS_H |
3 | #define _SPARC64_TERMIOS_H | 2 | #define _SPARC64_TERMIOS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h index 71e42d1a80d9..e5873e385306 100644 --- a/include/asm-sparc64/thread_info.h +++ b/include/asm-sparc64/thread_info.h | |||
@@ -38,7 +38,7 @@ struct thread_info { | |||
38 | struct task_struct *task; | 38 | struct task_struct *task; |
39 | unsigned long flags; | 39 | unsigned long flags; |
40 | __u8 fpsaved[7]; | 40 | __u8 fpsaved[7]; |
41 | __u8 pad; | 41 | __u8 status; |
42 | unsigned long ksp; | 42 | unsigned long ksp; |
43 | 43 | ||
44 | /* D$ line 2 */ | 44 | /* D$ line 2 */ |
@@ -217,7 +217,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
217 | * nop | 217 | * nop |
218 | */ | 218 | */ |
219 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 219 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
220 | #define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */ | 220 | /* flags bit 1 is available */ |
221 | #define TIF_SIGPENDING 2 /* signal pending */ | 221 | #define TIF_SIGPENDING 2 /* signal pending */ |
222 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 222 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
223 | #define TIF_PERFCTR 4 /* performance counters active */ | 223 | #define TIF_PERFCTR 4 /* performance counters active */ |
@@ -244,14 +244,34 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
244 | #define _TIF_32BIT (1<<TIF_32BIT) | 244 | #define _TIF_32BIT (1<<TIF_32BIT) |
245 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 245 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
246 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 246 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
247 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
248 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 247 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
249 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 248 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
250 | 249 | ||
251 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ | 250 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ |
252 | (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | \ | 251 | (_TIF_SIGPENDING | \ |
253 | _TIF_NEED_RESCHED | _TIF_PERFCTR)) | 252 | _TIF_NEED_RESCHED | _TIF_PERFCTR)) |
254 | 253 | ||
254 | /* | ||
255 | * Thread-synchronous status. | ||
256 | * | ||
257 | * This is different from the flags in that nobody else | ||
258 | * ever touches our thread-synchronous status, so we don't | ||
259 | * have to worry about atomic accesses. | ||
260 | * | ||
261 | * Note that there are only 8 bits available. | ||
262 | */ | ||
263 | #define TS_RESTORE_SIGMASK 0x0001 /* restore signal mask in do_signal() */ | ||
264 | |||
265 | #ifndef __ASSEMBLY__ | ||
266 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
267 | static inline void set_restore_sigmask(void) | ||
268 | { | ||
269 | struct thread_info *ti = current_thread_info(); | ||
270 | ti->status |= TS_RESTORE_SIGMASK; | ||
271 | set_bit(TIF_SIGPENDING, &ti->flags); | ||
272 | } | ||
273 | #endif /* !__ASSEMBLY__ */ | ||
274 | |||
255 | #endif /* __KERNEL__ */ | 275 | #endif /* __KERNEL__ */ |
256 | 276 | ||
257 | #endif /* _ASM_THREAD_INFO_H */ | 277 | #endif /* _ASM_THREAD_INFO_H */ |
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index 1b55538b944f..0ba199587e07 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ttable.h,v 1.18 2002/02/09 19:49:32 davem Exp $ */ | ||
2 | #ifndef _SPARC64_TTABLE_H | 1 | #ifndef _SPARC64_TTABLE_H |
3 | #define _SPARC64_TTABLE_H | 2 | #define _SPARC64_TTABLE_H |
4 | 3 | ||
@@ -91,13 +90,14 @@ | |||
91 | nop; | 90 | nop; |
92 | 91 | ||
93 | #define SYSCALL_TRAP(routine, systbl) \ | 92 | #define SYSCALL_TRAP(routine, systbl) \ |
93 | rdpr %pil, %g2; \ | ||
94 | mov TSTATE_SYSCALL, %g3; \ | ||
94 | sethi %hi(109f), %g7; \ | 95 | sethi %hi(109f), %g7; \ |
95 | ba,pt %xcc, etrap; \ | 96 | ba,pt %xcc, etrap_syscall; \ |
96 | 109: or %g7, %lo(109b), %g7; \ | 97 | 109: or %g7, %lo(109b), %g7; \ |
97 | sethi %hi(systbl), %l7; \ | 98 | sethi %hi(systbl), %l7; \ |
98 | ba,pt %xcc, routine; \ | 99 | ba,pt %xcc, routine; \ |
99 | or %l7, %lo(systbl), %l7; \ | 100 | or %l7, %lo(systbl), %l7; |
100 | nop; nop; | ||
101 | 101 | ||
102 | #define TRAP_UTRAP(handler,lvl) \ | 102 | #define TRAP_UTRAP(handler,lvl) \ |
103 | mov handler, %g3; \ | 103 | mov handler, %g3; \ |
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h index d0ee7f105838..b27ccc85202f 100644 --- a/include/asm-sparc64/types.h +++ b/include/asm-sparc64/types.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: types.h,v 1.4 2001/10/09 02:24:35 davem Exp $ */ | ||
2 | #ifndef _SPARC64_TYPES_H | 1 | #ifndef _SPARC64_TYPES_H |
3 | #define _SPARC64_TYPES_H | 2 | #define _SPARC64_TYPES_H |
4 | 3 | ||
@@ -9,28 +8,12 @@ | |||
9 | * not a major issue. However, for interoperability, libraries still | 8 | * not a major issue. However, for interoperability, libraries still |
10 | * need to be careful to avoid a name clashes. | 9 | * need to be careful to avoid a name clashes. |
11 | */ | 10 | */ |
11 | #include <asm-generic/int-l64.h> | ||
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
14 | 14 | ||
15 | typedef unsigned short umode_t; | 15 | typedef unsigned short umode_t; |
16 | 16 | ||
17 | /* | ||
18 | * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
19 | * header files exported to user space. | ||
20 | */ | ||
21 | |||
22 | typedef __signed__ char __s8; | ||
23 | typedef unsigned char __u8; | ||
24 | |||
25 | typedef __signed__ short __s16; | ||
26 | typedef unsigned short __u16; | ||
27 | |||
28 | typedef __signed__ int __s32; | ||
29 | typedef unsigned int __u32; | ||
30 | |||
31 | typedef __signed__ long __s64; | ||
32 | typedef unsigned long __u64; | ||
33 | |||
34 | #endif /* __ASSEMBLY__ */ | 17 | #endif /* __ASSEMBLY__ */ |
35 | 18 | ||
36 | #ifdef __KERNEL__ | 19 | #ifdef __KERNEL__ |
@@ -39,18 +22,6 @@ typedef unsigned long __u64; | |||
39 | 22 | ||
40 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
41 | 24 | ||
42 | typedef __signed__ char s8; | ||
43 | typedef unsigned char u8; | ||
44 | |||
45 | typedef __signed__ short s16; | ||
46 | typedef unsigned short u16; | ||
47 | |||
48 | typedef __signed__ int s32; | ||
49 | typedef unsigned int u32; | ||
50 | |||
51 | typedef __signed__ long s64; | ||
52 | typedef unsigned long u64; | ||
53 | |||
54 | /* Dma addresses come in generic and 64-bit flavours. */ | 25 | /* Dma addresses come in generic and 64-bit flavours. */ |
55 | 26 | ||
56 | typedef u32 dma_addr_t; | 27 | typedef u32 dma_addr_t; |
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index d8547b87e730..5fcbaf68c3f6 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: uaccess.h,v 1.35 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef _ASM_UACCESS_H | 1 | #ifndef _ASM_UACCESS_H |
3 | #define _ASM_UACCESS_H | 2 | #define _ASM_UACCESS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/uctx.h b/include/asm-sparc64/uctx.h index 6eaf16ef23f6..dc937c75ffdd 100644 --- a/include/asm-sparc64/uctx.h +++ b/include/asm-sparc64/uctx.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: uctx.h,v 1.1 1997/06/18 16:51:58 davem Exp $ | 1 | /* |
2 | * uctx.h: Sparc64 {set,get}context() register state layouts. | 2 | * uctx.h: Sparc64 {set,get}context() register state layouts. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/utrap.h b/include/asm-sparc64/utrap.h index 81b0ebf3736c..e49e5c46ad68 100644 --- a/include/asm-sparc64/utrap.h +++ b/include/asm-sparc64/utrap.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: utrap.h,v 1.1 1997/10/14 16:21:31 jj Exp $ | 1 | /* |
2 | * include/asm-sparc64/utrap.h | 2 | * include/asm-sparc64/utrap.h |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/include/asm-sparc64/watchdog.h b/include/asm-sparc64/watchdog.h index 4d5b03b60e4d..5baf2d3919cf 100644 --- a/include/asm-sparc64/watchdog.h +++ b/include/asm-sparc64/watchdog.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: watchdog.h,v 1.1 2001/01/18 04:47:44 davem Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * watchdog - Driver interface for the hardware watchdog timers | 3 | * watchdog - Driver interface for the hardware watchdog timers |
4 | * present on Sun Microsystems boardsets | 4 | * present on Sun Microsystems boardsets |
diff --git a/include/asm-um/irq.h b/include/asm-um/irq.h index de389a477cdd..4a2037f8204b 100644 --- a/include/asm-um/irq.h +++ b/include/asm-um/irq.h | |||
@@ -15,8 +15,9 @@ | |||
15 | #define SIGIO_WRITE_IRQ 11 | 15 | #define SIGIO_WRITE_IRQ 11 |
16 | #define TELNETD_IRQ 12 | 16 | #define TELNETD_IRQ 12 |
17 | #define XTERM_IRQ 13 | 17 | #define XTERM_IRQ 13 |
18 | #define RANDOM_IRQ 14 | ||
18 | 19 | ||
19 | #define LAST_IRQ XTERM_IRQ | 20 | #define LAST_IRQ RANDOM_IRQ |
20 | #define NR_IRQS (LAST_IRQ + 1) | 21 | #define NR_IRQS (LAST_IRQ + 1) |
21 | 22 | ||
22 | #endif | 23 | #endif |
diff --git a/include/asm-um/keyboard.h b/include/asm-um/keyboard.h deleted file mode 100644 index ee2e2303d0e4..000000000000 --- a/include/asm-um/keyboard.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __UM_KEYBOARD_H | ||
2 | #define __UM_KEYBOARD_H | ||
3 | |||
4 | #include "asm/arch/keyboard.h" | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 6686fc524ca1..54f42e8b0105 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -22,16 +22,10 @@ extern void force_flush_all(void); | |||
22 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | 22 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) |
23 | { | 23 | { |
24 | /* | 24 | /* |
25 | * This is called by fs/exec.c and fs/aio.c. In the first case, for an | 25 | * This is called by fs/exec.c and sys_unshare() |
26 | * exec, we don't need to do anything as we're called from userspace | 26 | * when the new ->mm is used for the first time. |
27 | * and thus going to use a new host PID. In the second, we're called | ||
28 | * from a kernel thread, and thus need to go doing the mmap's on the | ||
29 | * host. Since they're very expensive, we want to avoid that as far as | ||
30 | * possible. | ||
31 | */ | 27 | */ |
32 | if (old != new && (current->flags & PF_BORROWED_MM)) | 28 | __switch_mm(&new->context.id); |
33 | __switch_mm(&new->context.id); | ||
34 | |||
35 | arch_dup_mmap(old, new); | 29 | arch_dup_mmap(old, new); |
36 | } | 30 | } |
37 | 31 | ||
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 381f96b1c825..916e1a61999f 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -7,16 +7,20 @@ | |||
7 | #ifndef __UM_PAGE_H | 7 | #ifndef __UM_PAGE_H |
8 | #define __UM_PAGE_H | 8 | #define __UM_PAGE_H |
9 | 9 | ||
10 | struct page; | 10 | #include <linux/const.h> |
11 | |||
12 | #include <linux/types.h> | ||
13 | #include <asm/vm-flags.h> | ||
14 | 11 | ||
15 | /* PAGE_SHIFT determines the page size */ | 12 | /* PAGE_SHIFT determines the page size */ |
16 | #define PAGE_SHIFT 12 | 13 | #define PAGE_SHIFT 12 |
17 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 14 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) |
18 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 15 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
19 | 16 | ||
17 | #ifndef __ASSEMBLY__ | ||
18 | |||
19 | struct page; | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | #include <asm/vm-flags.h> | ||
23 | |||
20 | /* | 24 | /* |
21 | * These are used to make use of C type-checking.. | 25 | * These are used to make use of C type-checking.. |
22 | */ | 26 | */ |
@@ -120,4 +124,5 @@ extern struct page *arch_validate(struct page *page, gfp_t mask, int order); | |||
120 | #include <asm-generic/memory_model.h> | 124 | #include <asm-generic/memory_model.h> |
121 | #include <asm-generic/page.h> | 125 | #include <asm-generic/page.h> |
122 | 126 | ||
123 | #endif | 127 | #endif /* __ASSEMBLY__ */ |
128 | #endif /* __UM_PAGE_H */ | ||
diff --git a/include/asm-um/param.h b/include/asm-um/param.h index 4cd4a226f8c1..e44f4e60d16d 100644 --- a/include/asm-um/param.h +++ b/include/asm-um/param.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #define HZ CONFIG_HZ | 13 | #define HZ CONFIG_HZ |
14 | #define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | 14 | #define USER_HZ 100 /* .. some user interfaces are in "ticks" */ |
15 | #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ | 15 | #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ |
16 | #else | ||
17 | #define HZ 100 | ||
16 | #endif | 18 | #endif |
17 | 19 | ||
18 | #endif | 20 | #endif |
diff --git a/include/asm-v850/clinkage.h b/include/asm-v850/clinkage.h index 2b622adccae5..c389691d6f86 100644 --- a/include/asm-v850/clinkage.h +++ b/include/asm-v850/clinkage.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * Written by Miles Bader <miles@gnu.org> | 11 | * Written by Miles Bader <miles@gnu.org> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifndef __CLINKAGE_H__ | 14 | #ifndef __V850_CLINKAGE_H__ |
15 | #define __V850_CLINKAGE_H__ | 15 | #define __V850_CLINKAGE_H__ |
16 | 16 | ||
17 | #include <asm/macrology.h> | 17 | #include <asm/macrology.h> |
diff --git a/include/asm-v850/param.h b/include/asm-v850/param.h index 281832690290..4391f5fe0204 100644 --- a/include/asm-v850/param.h +++ b/include/asm-v850/param.h | |||
@@ -26,6 +26,8 @@ | |||
26 | # define HZ CONFIG_HZ | 26 | # define HZ CONFIG_HZ |
27 | # define USER_HZ 100 | 27 | # define USER_HZ 100 |
28 | # define CLOCKS_PER_SEC USER_HZ | 28 | # define CLOCKS_PER_SEC USER_HZ |
29 | #else | ||
30 | # define HZ 100 | ||
29 | #endif | 31 | #endif |
30 | 32 | ||
31 | #endif /* __V850_PARAM_H__ */ | 33 | #endif /* __V850_PARAM_H__ */ |
diff --git a/include/asm-v850/types.h b/include/asm-v850/types.h index 284bda882112..89f735ee41dd 100644 --- a/include/asm-v850/types.h +++ b/include/asm-v850/types.h | |||
@@ -10,28 +10,10 @@ | |||
10 | * not a major issue. However, for interoperability, libraries still | 10 | * not a major issue. However, for interoperability, libraries still |
11 | * need to be careful to avoid a name clashes. | 11 | * need to be careful to avoid a name clashes. |
12 | */ | 12 | */ |
13 | #include <asm-generic/int-ll64.h> | ||
13 | 14 | ||
14 | typedef unsigned short umode_t; | 15 | typedef unsigned short umode_t; |
15 | 16 | ||
16 | /* | ||
17 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
18 | * header files exported to user space | ||
19 | */ | ||
20 | |||
21 | typedef __signed__ char __s8; | ||
22 | typedef unsigned char __u8; | ||
23 | |||
24 | typedef __signed__ short __s16; | ||
25 | typedef unsigned short __u16; | ||
26 | |||
27 | typedef __signed__ int __s32; | ||
28 | typedef unsigned int __u32; | ||
29 | |||
30 | #if defined(__GNUC__) | ||
31 | __extension__ typedef __signed__ long long __s64; | ||
32 | __extension__ typedef unsigned long long __u64; | ||
33 | #endif | ||
34 | |||
35 | #endif /* !__ASSEMBLY__ */ | 17 | #endif /* !__ASSEMBLY__ */ |
36 | 18 | ||
37 | /* | 19 | /* |
@@ -43,18 +25,6 @@ __extension__ typedef unsigned long long __u64; | |||
43 | 25 | ||
44 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
45 | 27 | ||
46 | typedef signed char s8; | ||
47 | typedef unsigned char u8; | ||
48 | |||
49 | typedef signed short s16; | ||
50 | typedef unsigned short u16; | ||
51 | |||
52 | typedef signed int s32; | ||
53 | typedef unsigned int u32; | ||
54 | |||
55 | typedef signed long long s64; | ||
56 | typedef unsigned long long u64; | ||
57 | |||
58 | /* Dma addresses are 32-bits wide. */ | 28 | /* Dma addresses are 32-bits wide. */ |
59 | 29 | ||
60 | typedef u32 dma_addr_t; | 30 | typedef u32 dma_addr_t; |
diff --git a/include/asm-x86/bitops.h b/include/asm-x86/bitops.h index b81a4d4d3337..ee4b3ead6a43 100644 --- a/include/asm-x86/bitops.h +++ b/include/asm-x86/bitops.h | |||
@@ -23,13 +23,10 @@ | |||
23 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) | 23 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) |
24 | /* Technically wrong, but this avoids compilation errors on some gcc | 24 | /* Technically wrong, but this avoids compilation errors on some gcc |
25 | versions. */ | 25 | versions. */ |
26 | #define ADDR "=m" (*(volatile long *)addr) | 26 | #define ADDR "=m" (*(volatile long *) addr) |
27 | #define BIT_ADDR "=m" (((volatile int *)addr)[nr >> 5]) | ||
28 | #else | 27 | #else |
29 | #define ADDR "+m" (*(volatile long *) addr) | 28 | #define ADDR "+m" (*(volatile long *) addr) |
30 | #define BIT_ADDR "+m" (((volatile int *)addr)[nr >> 5]) | ||
31 | #endif | 29 | #endif |
32 | #define BASE_ADDR "m" (*(volatile int *)addr) | ||
33 | 30 | ||
34 | /** | 31 | /** |
35 | * set_bit - Atomically set a bit in memory | 32 | * set_bit - Atomically set a bit in memory |
@@ -77,7 +74,7 @@ static inline void __set_bit(int nr, volatile void *addr) | |||
77 | */ | 74 | */ |
78 | static inline void clear_bit(int nr, volatile void *addr) | 75 | static inline void clear_bit(int nr, volatile void *addr) |
79 | { | 76 | { |
80 | asm volatile(LOCK_PREFIX "btr %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); | 77 | asm volatile(LOCK_PREFIX "btr %1,%0" : ADDR : "Ir" (nr)); |
81 | } | 78 | } |
82 | 79 | ||
83 | /* | 80 | /* |
@@ -96,7 +93,7 @@ static inline void clear_bit_unlock(unsigned nr, volatile void *addr) | |||
96 | 93 | ||
97 | static inline void __clear_bit(int nr, volatile void *addr) | 94 | static inline void __clear_bit(int nr, volatile void *addr) |
98 | { | 95 | { |
99 | asm volatile("btr %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); | 96 | asm volatile("btr %1,%0" : ADDR : "Ir" (nr)); |
100 | } | 97 | } |
101 | 98 | ||
102 | /* | 99 | /* |
@@ -131,7 +128,7 @@ static inline void __clear_bit_unlock(unsigned nr, volatile void *addr) | |||
131 | */ | 128 | */ |
132 | static inline void __change_bit(int nr, volatile void *addr) | 129 | static inline void __change_bit(int nr, volatile void *addr) |
133 | { | 130 | { |
134 | asm volatile("btc %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); | 131 | asm volatile("btc %1,%0" : ADDR : "Ir" (nr)); |
135 | } | 132 | } |
136 | 133 | ||
137 | /** | 134 | /** |
@@ -145,7 +142,7 @@ static inline void __change_bit(int nr, volatile void *addr) | |||
145 | */ | 142 | */ |
146 | static inline void change_bit(int nr, volatile void *addr) | 143 | static inline void change_bit(int nr, volatile void *addr) |
147 | { | 144 | { |
148 | asm volatile(LOCK_PREFIX "btc %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); | 145 | asm volatile(LOCK_PREFIX "btc %1,%0" : ADDR : "Ir" (nr)); |
149 | } | 146 | } |
150 | 147 | ||
151 | /** | 148 | /** |
@@ -191,9 +188,10 @@ static inline int __test_and_set_bit(int nr, volatile void *addr) | |||
191 | { | 188 | { |
192 | int oldbit; | 189 | int oldbit; |
193 | 190 | ||
194 | asm volatile("bts %2,%3\n\t" | 191 | asm("bts %2,%1\n\t" |
195 | "sbb %0,%0" | 192 | "sbb %0,%0" |
196 | : "=r" (oldbit), BIT_ADDR : "Ir" (nr), BASE_ADDR); | 193 | : "=r" (oldbit), ADDR |
194 | : "Ir" (nr)); | ||
197 | return oldbit; | 195 | return oldbit; |
198 | } | 196 | } |
199 | 197 | ||
@@ -229,9 +227,10 @@ static inline int __test_and_clear_bit(int nr, volatile void *addr) | |||
229 | { | 227 | { |
230 | int oldbit; | 228 | int oldbit; |
231 | 229 | ||
232 | asm volatile("btr %2,%3\n\t" | 230 | asm volatile("btr %2,%1\n\t" |
233 | "sbb %0,%0" | 231 | "sbb %0,%0" |
234 | : "=r" (oldbit), BIT_ADDR : "Ir" (nr), BASE_ADDR); | 232 | : "=r" (oldbit), ADDR |
233 | : "Ir" (nr)); | ||
235 | return oldbit; | 234 | return oldbit; |
236 | } | 235 | } |
237 | 236 | ||
@@ -240,9 +239,10 @@ static inline int __test_and_change_bit(int nr, volatile void *addr) | |||
240 | { | 239 | { |
241 | int oldbit; | 240 | int oldbit; |
242 | 241 | ||
243 | asm volatile("btc %2,%3\n\t" | 242 | asm volatile("btc %2,%1\n\t" |
244 | "sbb %0,%0" | 243 | "sbb %0,%0" |
245 | : "=r" (oldbit), BIT_ADDR : "Ir" (nr), BASE_ADDR); | 244 | : "=r" (oldbit), ADDR |
245 | : "Ir" (nr) : "memory"); | ||
246 | 246 | ||
247 | return oldbit; | 247 | return oldbit; |
248 | } | 248 | } |
@@ -276,11 +276,10 @@ static inline int variable_test_bit(int nr, volatile const void *addr) | |||
276 | { | 276 | { |
277 | int oldbit; | 277 | int oldbit; |
278 | 278 | ||
279 | asm volatile("bt %2,%3\n\t" | 279 | asm volatile("bt %2,%1\n\t" |
280 | "sbb %0,%0" | 280 | "sbb %0,%0" |
281 | : "=r" (oldbit) | 281 | : "=r" (oldbit) |
282 | : "m" (((volatile const int *)addr)[nr >> 5]), | 282 | : "m" (*(unsigned long *)addr), "Ir" (nr)); |
283 | "Ir" (nr), BASE_ADDR); | ||
284 | 283 | ||
285 | return oldbit; | 284 | return oldbit; |
286 | } | 285 | } |
@@ -397,8 +396,6 @@ static inline int fls(int x) | |||
397 | } | 396 | } |
398 | #endif /* __KERNEL__ */ | 397 | #endif /* __KERNEL__ */ |
399 | 398 | ||
400 | #undef BASE_ADDR | ||
401 | #undef BIT_ADDR | ||
402 | #undef ADDR | 399 | #undef ADDR |
403 | 400 | ||
404 | static inline void set_bit_string(unsigned long *bitmap, | 401 | static inline void set_bit_string(unsigned long *bitmap, |
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index e8659909e5f6..f62f4733606b 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
@@ -14,10 +14,10 @@ | |||
14 | 14 | ||
15 | /* extensible setup data list node */ | 15 | /* extensible setup data list node */ |
16 | struct setup_data { | 16 | struct setup_data { |
17 | u64 next; | 17 | __u64 next; |
18 | u32 type; | 18 | __u32 type; |
19 | u32 len; | 19 | __u32 len; |
20 | u8 data[0]; | 20 | __u8 data[0]; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | struct setup_header { | 23 | struct setup_header { |
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h index 7154dc4de951..bb06027fc83e 100644 --- a/include/asm-x86/geode.h +++ b/include/asm-x86/geode.h | |||
@@ -112,8 +112,8 @@ extern int geode_get_dev_base(unsigned int dev); | |||
112 | #define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */ | 112 | #define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */ |
113 | #define VSA_VR_SIGNATURE 0x0003 | 113 | #define VSA_VR_SIGNATURE 0x0003 |
114 | #define VSA_VR_MEM_SIZE 0x0200 | 114 | #define VSA_VR_MEM_SIZE 0x0200 |
115 | #define VSA_SIG 0x4132 /* signature is ascii 'VSA2' */ | 115 | #define AMD_VSA_SIG 0x4132 /* signature is ascii 'VSA2' */ |
116 | 116 | #define GSW_VSA_SIG 0x534d /* General Software signature */ | |
117 | /* GPIO */ | 117 | /* GPIO */ |
118 | 118 | ||
119 | #define GPIO_OUTPUT_VAL 0x00 | 119 | #define GPIO_OUTPUT_VAL 0x00 |
@@ -185,16 +185,14 @@ static inline int is_geode(void) | |||
185 | return (is_geode_gx() || is_geode_lx()); | 185 | return (is_geode_gx() || is_geode_lx()); |
186 | } | 186 | } |
187 | 187 | ||
188 | /* | 188 | #ifdef CONFIG_MGEODE_LX |
189 | * The VSA has virtual registers that we can query for a signature. | 189 | extern int geode_has_vsa2(void); |
190 | */ | 190 | #else |
191 | static inline int geode_has_vsa2(void) | 191 | static inline int geode_has_vsa2(void) |
192 | { | 192 | { |
193 | outw(VSA_VR_UNLOCK, VSA_VRC_INDEX); | 193 | return 0; |
194 | outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX); | ||
195 | |||
196 | return (inw(VSA_VRC_DATA) == VSA_SIG); | ||
197 | } | 194 | } |
195 | #endif | ||
198 | 196 | ||
199 | /* MFGPTs */ | 197 | /* MFGPTs */ |
200 | 198 | ||
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index da2adb45f6e3..37672f79dcc8 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -175,7 +175,15 @@ static inline int save_i387(struct _fpstate __user *buf) | |||
175 | */ | 175 | */ |
176 | static inline int restore_i387(struct _fpstate __user *buf) | 176 | static inline int restore_i387(struct _fpstate __user *buf) |
177 | { | 177 | { |
178 | set_used_math(); | 178 | struct task_struct *tsk = current; |
179 | int err; | ||
180 | |||
181 | if (!used_math()) { | ||
182 | err = init_fpu(tsk); | ||
183 | if (err) | ||
184 | return err; | ||
185 | } | ||
186 | |||
179 | if (!(task_thread_info(current)->status & TS_USEDFPU)) { | 187 | if (!(task_thread_info(current)->status & TS_USEDFPU)) { |
180 | clts(); | 188 | clts(); |
181 | task_thread_info(current)->status |= TS_USEDFPU; | 189 | task_thread_info(current)->status |= TS_USEDFPU; |
@@ -185,6 +193,8 @@ static inline int restore_i387(struct _fpstate __user *buf) | |||
185 | 193 | ||
186 | #else /* CONFIG_X86_32 */ | 194 | #else /* CONFIG_X86_32 */ |
187 | 195 | ||
196 | extern void finit(void); | ||
197 | |||
188 | static inline void tolerant_fwait(void) | 198 | static inline void tolerant_fwait(void) |
189 | { | 199 | { |
190 | asm volatile("fnclex ; fwait"); | 200 | asm volatile("fnclex ; fwait"); |
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 9d963cd6533c..844f2a89afbc 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kvm_para.h> | 18 | #include <linux/kvm_para.h> |
19 | #include <linux/kvm_types.h> | 19 | #include <linux/kvm_types.h> |
20 | 20 | ||
21 | #include <asm/pvclock-abi.h> | ||
21 | #include <asm/desc.h> | 22 | #include <asm/desc.h> |
22 | 23 | ||
23 | #define KVM_MAX_VCPUS 16 | 24 | #define KVM_MAX_VCPUS 16 |
@@ -282,7 +283,8 @@ struct kvm_vcpu_arch { | |||
282 | struct x86_emulate_ctxt emulate_ctxt; | 283 | struct x86_emulate_ctxt emulate_ctxt; |
283 | 284 | ||
284 | gpa_t time; | 285 | gpa_t time; |
285 | struct kvm_vcpu_time_info hv_clock; | 286 | struct pvclock_vcpu_time_info hv_clock; |
287 | unsigned int hv_clock_tsc_khz; | ||
286 | unsigned int time_offset; | 288 | unsigned int time_offset; |
287 | struct page *time_page; | 289 | struct page *time_page; |
288 | }; | 290 | }; |
@@ -314,6 +316,9 @@ struct kvm_arch{ | |||
314 | struct page *apic_access_page; | 316 | struct page *apic_access_page; |
315 | 317 | ||
316 | gpa_t wall_clock; | 318 | gpa_t wall_clock; |
319 | |||
320 | struct page *ept_identity_pagetable; | ||
321 | bool ept_identity_pagetable_done; | ||
317 | }; | 322 | }; |
318 | 323 | ||
319 | struct kvm_vm_stat { | 324 | struct kvm_vm_stat { |
@@ -422,6 +427,7 @@ struct kvm_x86_ops { | |||
422 | struct kvm_run *run); | 427 | struct kvm_run *run); |
423 | 428 | ||
424 | int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); | 429 | int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); |
430 | int (*get_tdp_level)(void); | ||
425 | }; | 431 | }; |
426 | 432 | ||
427 | extern struct kvm_x86_ops *kvm_x86_ops; | 433 | extern struct kvm_x86_ops *kvm_x86_ops; |
@@ -433,6 +439,9 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu); | |||
433 | int kvm_mmu_create(struct kvm_vcpu *vcpu); | 439 | int kvm_mmu_create(struct kvm_vcpu *vcpu); |
434 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); | 440 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); |
435 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); | 441 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); |
442 | void kvm_mmu_set_base_ptes(u64 base_pte); | ||
443 | void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, | ||
444 | u64 dirty_mask, u64 nx_mask, u64 x_mask); | ||
436 | 445 | ||
437 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); | 446 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); |
438 | void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); | 447 | void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); |
@@ -620,7 +629,7 @@ static inline void fx_restore(struct i387_fxsave_struct *image) | |||
620 | asm("fxrstor (%0)":: "r" (image)); | 629 | asm("fxrstor (%0)":: "r" (image)); |
621 | } | 630 | } |
622 | 631 | ||
623 | static inline void fpu_init(void) | 632 | static inline void fx_finit(void) |
624 | { | 633 | { |
625 | asm("finit"); | 634 | asm("finit"); |
626 | } | 635 | } |
@@ -644,6 +653,7 @@ static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code) | |||
644 | #define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4" | 653 | #define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4" |
645 | #define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4" | 654 | #define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4" |
646 | #define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30" | 655 | #define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30" |
656 | #define ASM_VMX_INVEPT ".byte 0x66, 0x0f, 0x38, 0x80, 0x08" | ||
647 | #define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08" | 657 | #define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08" |
648 | 658 | ||
649 | #define MSR_IA32_TIME_STAMP_COUNTER 0x010 | 659 | #define MSR_IA32_TIME_STAMP_COUNTER 0x010 |
diff --git a/include/asm-x86/kvm_para.h b/include/asm-x86/kvm_para.h index 509845942070..76f392146daa 100644 --- a/include/asm-x86/kvm_para.h +++ b/include/asm-x86/kvm_para.h | |||
@@ -48,24 +48,6 @@ struct kvm_mmu_op_release_pt { | |||
48 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
49 | #include <asm/processor.h> | 49 | #include <asm/processor.h> |
50 | 50 | ||
51 | /* xen binary-compatible interface. See xen headers for details */ | ||
52 | struct kvm_vcpu_time_info { | ||
53 | uint32_t version; | ||
54 | uint32_t pad0; | ||
55 | uint64_t tsc_timestamp; | ||
56 | uint64_t system_time; | ||
57 | uint32_t tsc_to_system_mul; | ||
58 | int8_t tsc_shift; | ||
59 | int8_t pad[3]; | ||
60 | } __attribute__((__packed__)); /* 32 bytes */ | ||
61 | |||
62 | struct kvm_wall_clock { | ||
63 | uint32_t wc_version; | ||
64 | uint32_t wc_sec; | ||
65 | uint32_t wc_nsec; | ||
66 | } __attribute__((__packed__)); | ||
67 | |||
68 | |||
69 | extern void kvmclock_init(void); | 51 | extern void kvmclock_init(void); |
70 | 52 | ||
71 | 53 | ||
@@ -89,7 +71,8 @@ static inline long kvm_hypercall0(unsigned int nr) | |||
89 | long ret; | 71 | long ret; |
90 | asm volatile(KVM_HYPERCALL | 72 | asm volatile(KVM_HYPERCALL |
91 | : "=a"(ret) | 73 | : "=a"(ret) |
92 | : "a"(nr)); | 74 | : "a"(nr) |
75 | : "memory"); | ||
93 | return ret; | 76 | return ret; |
94 | } | 77 | } |
95 | 78 | ||
@@ -98,7 +81,8 @@ static inline long kvm_hypercall1(unsigned int nr, unsigned long p1) | |||
98 | long ret; | 81 | long ret; |
99 | asm volatile(KVM_HYPERCALL | 82 | asm volatile(KVM_HYPERCALL |
100 | : "=a"(ret) | 83 | : "=a"(ret) |
101 | : "a"(nr), "b"(p1)); | 84 | : "a"(nr), "b"(p1) |
85 | : "memory"); | ||
102 | return ret; | 86 | return ret; |
103 | } | 87 | } |
104 | 88 | ||
@@ -108,7 +92,8 @@ static inline long kvm_hypercall2(unsigned int nr, unsigned long p1, | |||
108 | long ret; | 92 | long ret; |
109 | asm volatile(KVM_HYPERCALL | 93 | asm volatile(KVM_HYPERCALL |
110 | : "=a"(ret) | 94 | : "=a"(ret) |
111 | : "a"(nr), "b"(p1), "c"(p2)); | 95 | : "a"(nr), "b"(p1), "c"(p2) |
96 | : "memory"); | ||
112 | return ret; | 97 | return ret; |
113 | } | 98 | } |
114 | 99 | ||
@@ -118,7 +103,8 @@ static inline long kvm_hypercall3(unsigned int nr, unsigned long p1, | |||
118 | long ret; | 103 | long ret; |
119 | asm volatile(KVM_HYPERCALL | 104 | asm volatile(KVM_HYPERCALL |
120 | : "=a"(ret) | 105 | : "=a"(ret) |
121 | : "a"(nr), "b"(p1), "c"(p2), "d"(p3)); | 106 | : "a"(nr), "b"(p1), "c"(p2), "d"(p3) |
107 | : "memory"); | ||
122 | return ret; | 108 | return ret; |
123 | } | 109 | } |
124 | 110 | ||
@@ -129,7 +115,8 @@ static inline long kvm_hypercall4(unsigned int nr, unsigned long p1, | |||
129 | long ret; | 115 | long ret; |
130 | asm volatile(KVM_HYPERCALL | 116 | asm volatile(KVM_HYPERCALL |
131 | : "=a"(ret) | 117 | : "=a"(ret) |
132 | : "a"(nr), "b"(p1), "c"(p2), "d"(p3), "S"(p4)); | 118 | : "a"(nr), "b"(p1), "c"(p2), "d"(p3), "S"(p4) |
119 | : "memory"); | ||
133 | return ret; | 120 | return ret; |
134 | } | 121 | } |
135 | 122 | ||
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h index d6337f941c98..b877bbd2d3a7 100644 --- a/include/asm-x86/kvm_x86_emulate.h +++ b/include/asm-x86/kvm_x86_emulate.h | |||
@@ -135,6 +135,7 @@ struct decode_cache { | |||
135 | u8 modrm_rm; | 135 | u8 modrm_rm; |
136 | u8 use_modrm_ea; | 136 | u8 use_modrm_ea; |
137 | unsigned long modrm_ea; | 137 | unsigned long modrm_ea; |
138 | void *modrm_ptr; | ||
138 | unsigned long modrm_val; | 139 | unsigned long modrm_val; |
139 | struct fetch_cache fetch; | 140 | struct fetch_cache fetch; |
140 | }; | 141 | }; |
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index 3707650a169b..2b5f2c91db25 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h | |||
@@ -18,7 +18,7 @@ static inline unsigned long long native_read_tscp(unsigned int *aux) | |||
18 | unsigned long low, high; | 18 | unsigned long low, high; |
19 | asm volatile(".byte 0x0f,0x01,0xf9" | 19 | asm volatile(".byte 0x0f,0x01,0xf9" |
20 | : "=a" (low), "=d" (high), "=c" (*aux)); | 20 | : "=a" (low), "=d" (high), "=c" (*aux)); |
21 | return low | ((u64)high >> 32); | 21 | return low | ((u64)high << 32); |
22 | } | 22 | } |
23 | 23 | ||
24 | /* | 24 | /* |
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index b381f4a5a0bd..dc936dddf161 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -10,8 +10,16 @@ | |||
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | 12 | ||
13 | #define PHYSICAL_PAGE_MASK (PAGE_MASK & __PHYSICAL_MASK) | 13 | #define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1) |
14 | #define PTE_MASK (_AT(long, PHYSICAL_PAGE_MASK)) | 14 | #define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1) |
15 | |||
16 | /* Cast PAGE_MASK to a signed type so that it is sign-extended if | ||
17 | virtual addresses are 32-bits but physical addresses are larger | ||
18 | (ie, 32-bit PAE). */ | ||
19 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) | ||
20 | |||
21 | /* PTE_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ | ||
22 | #define PTE_MASK ((pteval_t)PHYSICAL_PAGE_MASK) | ||
15 | 23 | ||
16 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) | 24 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) |
17 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) | 25 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) |
@@ -24,9 +32,6 @@ | |||
24 | /* to align the pointer to the (next) page boundary */ | 32 | /* to align the pointer to the (next) page boundary */ |
25 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 33 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
26 | 34 | ||
27 | #define __PHYSICAL_MASK _AT(phys_addr_t, (_AC(1,ULL) << __PHYSICAL_MASK_SHIFT) - 1) | ||
28 | #define __VIRTUAL_MASK ((_AC(1,UL) << __VIRTUAL_MASK_SHIFT) - 1) | ||
29 | |||
30 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
31 | #include <linux/types.h> | 36 | #include <linux/types.h> |
32 | #endif | 37 | #endif |
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index 424e82f8ae27..ccf0ba3c3aba 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -14,7 +14,8 @@ | |||
14 | #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) | 14 | #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) |
15 | 15 | ||
16 | #ifdef CONFIG_X86_PAE | 16 | #ifdef CONFIG_X86_PAE |
17 | #define __PHYSICAL_MASK_SHIFT 36 | 17 | /* 44=32+12, the limit we can fit into an unsigned long pfn */ |
18 | #define __PHYSICAL_MASK_SHIFT 44 | ||
18 | #define __VIRTUAL_MASK_SHIFT 32 | 19 | #define __VIRTUAL_MASK_SHIFT 32 |
19 | #define PAGETABLE_LEVELS 3 | 20 | #define PAGETABLE_LEVELS 3 |
20 | 21 | ||
diff --git a/include/asm-x86/pat.h b/include/asm-x86/pat.h index 8b822b5a1786..88f60cc6a227 100644 --- a/include/asm-x86/pat.h +++ b/include/asm-x86/pat.h | |||
@@ -4,7 +4,13 @@ | |||
4 | 4 | ||
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | 6 | ||
7 | #ifdef CONFIG_X86_PAT | ||
7 | extern int pat_wc_enabled; | 8 | extern int pat_wc_enabled; |
9 | extern void validate_pat_support(struct cpuinfo_x86 *c); | ||
10 | #else | ||
11 | static const int pat_wc_enabled = 0; | ||
12 | static inline void validate_pat_support(struct cpuinfo_x86 *c) { } | ||
13 | #endif | ||
8 | 14 | ||
9 | extern void pat_init(void); | 15 | extern void pat_init(void); |
10 | 16 | ||
@@ -12,5 +18,7 @@ extern int reserve_memtype(u64 start, u64 end, | |||
12 | unsigned long req_type, unsigned long *ret_type); | 18 | unsigned long req_type, unsigned long *ret_type); |
13 | extern int free_memtype(u64 start, u64 end); | 19 | extern int free_memtype(u64 start, u64 end); |
14 | 20 | ||
21 | extern void pat_disable(char *reason); | ||
22 | |||
15 | #endif | 23 | #endif |
16 | 24 | ||
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 8b4a9d44b7f4..c93dbb6c2624 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h | |||
@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp) | |||
120 | write_cr3(pgd); | 120 | write_cr3(pgd); |
121 | } | 121 | } |
122 | 122 | ||
123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PAGE_MASK)) | 123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK)) |
124 | 124 | ||
125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK)) | 125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK)) |
126 | 126 | ||
127 | 127 | ||
128 | /* Find an entry in the second-level page table.. */ | 128 | /* Find an entry in the second-level page table.. */ |
@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte) | |||
160 | 160 | ||
161 | static inline unsigned long pte_pfn(pte_t pte) | 161 | static inline unsigned long pte_pfn(pte_t pte) |
162 | { | 162 | { |
163 | return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT; | 163 | return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT; |
164 | } | 164 | } |
165 | 165 | ||
166 | /* | 166 | /* |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 801b31f71452..97c271b2910b 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -57,7 +57,9 @@ | |||
57 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ | 57 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ |
58 | _PAGE_DIRTY) | 58 | _PAGE_DIRTY) |
59 | 59 | ||
60 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) | 60 | /* Set of bits not changed in pte_modify */ |
61 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \ | ||
62 | _PAGE_ACCESSED | _PAGE_DIRTY) | ||
61 | 63 | ||
62 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) | 64 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) |
63 | #define _PAGE_CACHE_WB (0) | 65 | #define _PAGE_CACHE_WB (0) |
@@ -288,13 +290,22 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
288 | * Chop off the NX bit (if present), and add the NX portion of | 290 | * Chop off the NX bit (if present), and add the NX portion of |
289 | * the newprot (if present): | 291 | * the newprot (if present): |
290 | */ | 292 | */ |
291 | val &= _PAGE_CHG_MASK & ~_PAGE_NX; | 293 | val &= _PAGE_CHG_MASK; |
292 | val |= pgprot_val(newprot) & __supported_pte_mask; | 294 | val |= pgprot_val(newprot) & (~_PAGE_CHG_MASK) & __supported_pte_mask; |
293 | 295 | ||
294 | return __pte(val); | 296 | return __pte(val); |
295 | } | 297 | } |
296 | 298 | ||
297 | #define pte_pgprot(x) __pgprot(pte_val(x) & (0xfff | _PAGE_NX)) | 299 | /* mprotect needs to preserve PAT bits when updating vm_page_prot */ |
300 | #define pgprot_modify pgprot_modify | ||
301 | static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) | ||
302 | { | ||
303 | pgprotval_t preservebits = pgprot_val(oldprot) & _PAGE_CHG_MASK; | ||
304 | pgprotval_t addbits = pgprot_val(newprot); | ||
305 | return __pgprot(preservebits | addbits); | ||
306 | } | ||
307 | |||
308 | #define pte_pgprot(x) __pgprot(pte_val(x) & ~PTE_MASK) | ||
298 | 309 | ||
299 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) | 310 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) |
300 | 311 | ||
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 577ab79c4c27..32ca03109a4c 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -88,14 +88,7 @@ extern unsigned long pg0[]; | |||
88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) | 89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) |
90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | 90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) |
91 | 91 | #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | |
92 | extern int pmd_bad(pmd_t pmd); | ||
93 | |||
94 | #define pmd_bad_v1(x) \ | ||
95 | (_KERNPG_TABLE != (pmd_val((x)) & ~(PAGE_MASK | _PAGE_USER))) | ||
96 | #define pmd_bad_v2(x) \ | ||
97 | (_KERNPG_TABLE != (pmd_val((x)) & ~(PAGE_MASK | _PAGE_USER | \ | ||
98 | _PAGE_PSE | _PAGE_NX))) | ||
99 | 92 | ||
100 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
101 | 94 | ||
@@ -166,7 +159,7 @@ static inline int pud_large(pud_t pud) { return 0; } | |||
166 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | 159 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) |
167 | 160 | ||
168 | #define pmd_page_vaddr(pmd) \ | 161 | #define pmd_page_vaddr(pmd) \ |
169 | ((unsigned long)__va(pmd_val((pmd)) & PAGE_MASK)) | 162 | ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK)) |
170 | 163 | ||
171 | #if defined(CONFIG_HIGHPTE) | 164 | #if defined(CONFIG_HIGHPTE) |
172 | #define pte_offset_map(dir, address) \ | 165 | #define pte_offset_map(dir, address) \ |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index a3bbf8766c1d..1cc50d22d735 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -151,21 +151,19 @@ static inline void native_pgd_clear(pgd_t *pgd) | |||
151 | 151 | ||
152 | #ifndef __ASSEMBLY__ | 152 | #ifndef __ASSEMBLY__ |
153 | 153 | ||
154 | static inline unsigned long pgd_bad(pgd_t pgd) | 154 | static inline int pgd_bad(pgd_t pgd) |
155 | { | 155 | { |
156 | return pgd_val(pgd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); | 156 | return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
157 | } | 157 | } |
158 | 158 | ||
159 | static inline unsigned long pud_bad(pud_t pud) | 159 | static inline int pud_bad(pud_t pud) |
160 | { | 160 | { |
161 | return pud_val(pud) & | 161 | return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
162 | ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX); | ||
163 | } | 162 | } |
164 | 163 | ||
165 | static inline unsigned long pmd_bad(pmd_t pmd) | 164 | static inline int pmd_bad(pmd_t pmd) |
166 | { | 165 | { |
167 | return pmd_val(pmd) & | 166 | return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
168 | ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX); | ||
169 | } | 167 | } |
170 | 168 | ||
171 | #define pte_none(x) (!pte_val((x))) | 169 | #define pte_none(x) (!pte_val((x))) |
diff --git a/include/asm-x86/pvclock-abi.h b/include/asm-x86/pvclock-abi.h new file mode 100644 index 000000000000..6857f840b243 --- /dev/null +++ b/include/asm-x86/pvclock-abi.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef _ASM_X86_PVCLOCK_ABI_H_ | ||
2 | #define _ASM_X86_PVCLOCK_ABI_H_ | ||
3 | #ifndef __ASSEMBLY__ | ||
4 | |||
5 | /* | ||
6 | * These structs MUST NOT be changed. | ||
7 | * They are the ABI between hypervisor and guest OS. | ||
8 | * Both Xen and KVM are using this. | ||
9 | * | ||
10 | * pvclock_vcpu_time_info holds the system time and the tsc timestamp | ||
11 | * of the last update. So the guest can use the tsc delta to get a | ||
12 | * more precise system time. There is one per virtual cpu. | ||
13 | * | ||
14 | * pvclock_wall_clock references the point in time when the system | ||
15 | * time was zero (usually boot time), thus the guest calculates the | ||
16 | * current wall clock by adding the system time. | ||
17 | * | ||
18 | * Protocol for the "version" fields is: hypervisor raises it (making | ||
19 | * it uneven) before it starts updating the fields and raises it again | ||
20 | * (making it even) when it is done. Thus the guest can make sure the | ||
21 | * time values it got are consistent by checking the version before | ||
22 | * and after reading them. | ||
23 | */ | ||
24 | |||
25 | struct pvclock_vcpu_time_info { | ||
26 | u32 version; | ||
27 | u32 pad0; | ||
28 | u64 tsc_timestamp; | ||
29 | u64 system_time; | ||
30 | u32 tsc_to_system_mul; | ||
31 | s8 tsc_shift; | ||
32 | u8 pad[3]; | ||
33 | } __attribute__((__packed__)); /* 32 bytes */ | ||
34 | |||
35 | struct pvclock_wall_clock { | ||
36 | u32 version; | ||
37 | u32 sec; | ||
38 | u32 nsec; | ||
39 | } __attribute__((__packed__)); | ||
40 | |||
41 | #endif /* __ASSEMBLY__ */ | ||
42 | #endif /* _ASM_X86_PVCLOCK_ABI_H_ */ | ||
diff --git a/include/asm-x86/pvclock.h b/include/asm-x86/pvclock.h new file mode 100644 index 000000000000..85b1bba8e0a3 --- /dev/null +++ b/include/asm-x86/pvclock.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _ASM_X86_PVCLOCK_H_ | ||
2 | #define _ASM_X86_PVCLOCK_H_ | ||
3 | |||
4 | #include <linux/clocksource.h> | ||
5 | #include <asm/pvclock-abi.h> | ||
6 | |||
7 | /* some helper functions for xen and kvm pv clock sources */ | ||
8 | cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src); | ||
9 | void pvclock_read_wallclock(struct pvclock_wall_clock *wall, | ||
10 | struct pvclock_vcpu_time_info *vcpu, | ||
11 | struct timespec *ts); | ||
12 | |||
13 | #endif /* _ASM_X86_PVCLOCK_H_ */ | ||
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h index bc6376f1bc5a..21e89bf92f1c 100644 --- a/include/asm-x86/spinlock.h +++ b/include/asm-x86/spinlock.h | |||
@@ -20,18 +20,8 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifdef CONFIG_X86_32 | 22 | #ifdef CONFIG_X86_32 |
23 | typedef char _slock_t; | ||
24 | # define LOCK_INS_DEC "decb" | ||
25 | # define LOCK_INS_XCH "xchgb" | ||
26 | # define LOCK_INS_MOV "movb" | ||
27 | # define LOCK_INS_CMP "cmpb" | ||
28 | # define LOCK_PTR_REG "a" | 23 | # define LOCK_PTR_REG "a" |
29 | #else | 24 | #else |
30 | typedef int _slock_t; | ||
31 | # define LOCK_INS_DEC "decl" | ||
32 | # define LOCK_INS_XCH "xchgl" | ||
33 | # define LOCK_INS_MOV "movl" | ||
34 | # define LOCK_INS_CMP "cmpl" | ||
35 | # define LOCK_PTR_REG "D" | 25 | # define LOCK_PTR_REG "D" |
36 | #endif | 26 | #endif |
37 | 27 | ||
@@ -66,14 +56,14 @@ typedef int _slock_t; | |||
66 | #if (NR_CPUS < 256) | 56 | #if (NR_CPUS < 256) |
67 | static inline int __raw_spin_is_locked(raw_spinlock_t *lock) | 57 | static inline int __raw_spin_is_locked(raw_spinlock_t *lock) |
68 | { | 58 | { |
69 | int tmp = *(volatile signed int *)(&(lock)->slock); | 59 | int tmp = ACCESS_ONCE(lock->slock); |
70 | 60 | ||
71 | return (((tmp >> 8) & 0xff) != (tmp & 0xff)); | 61 | return (((tmp >> 8) & 0xff) != (tmp & 0xff)); |
72 | } | 62 | } |
73 | 63 | ||
74 | static inline int __raw_spin_is_contended(raw_spinlock_t *lock) | 64 | static inline int __raw_spin_is_contended(raw_spinlock_t *lock) |
75 | { | 65 | { |
76 | int tmp = *(volatile signed int *)(&(lock)->slock); | 66 | int tmp = ACCESS_ONCE(lock->slock); |
77 | 67 | ||
78 | return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1; | 68 | return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1; |
79 | } | 69 | } |
@@ -130,14 +120,14 @@ static __always_inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
130 | #else | 120 | #else |
131 | static inline int __raw_spin_is_locked(raw_spinlock_t *lock) | 121 | static inline int __raw_spin_is_locked(raw_spinlock_t *lock) |
132 | { | 122 | { |
133 | int tmp = *(volatile signed int *)(&(lock)->slock); | 123 | int tmp = ACCESS_ONCE(lock->slock); |
134 | 124 | ||
135 | return (((tmp >> 16) & 0xffff) != (tmp & 0xffff)); | 125 | return (((tmp >> 16) & 0xffff) != (tmp & 0xffff)); |
136 | } | 126 | } |
137 | 127 | ||
138 | static inline int __raw_spin_is_contended(raw_spinlock_t *lock) | 128 | static inline int __raw_spin_is_contended(raw_spinlock_t *lock) |
139 | { | 129 | { |
140 | int tmp = *(volatile signed int *)(&(lock)->slock); | 130 | int tmp = ACCESS_ONCE(lock->slock); |
141 | 131 | ||
142 | return (((tmp >> 16) & 0xffff) - (tmp & 0xffff)) > 1; | 132 | return (((tmp >> 16) & 0xffff) - (tmp & 0xffff)) > 1; |
143 | } | 133 | } |
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h index 0c0674d94255..35c76ceb9f40 100644 --- a/include/asm-x86/tlbflush.h +++ b/include/asm-x86/tlbflush.h | |||
@@ -22,12 +22,23 @@ static inline void __native_flush_tlb(void) | |||
22 | 22 | ||
23 | static inline void __native_flush_tlb_global(void) | 23 | static inline void __native_flush_tlb_global(void) |
24 | { | 24 | { |
25 | unsigned long cr4 = read_cr4(); | 25 | unsigned long flags; |
26 | unsigned long cr4; | ||
26 | 27 | ||
28 | /* | ||
29 | * Read-modify-write to CR4 - protect it from preemption and | ||
30 | * from interrupts. (Use the raw variant because this code can | ||
31 | * be called from deep inside debugging code.) | ||
32 | */ | ||
33 | raw_local_irq_save(flags); | ||
34 | |||
35 | cr4 = read_cr4(); | ||
27 | /* clear PGE */ | 36 | /* clear PGE */ |
28 | write_cr4(cr4 & ~X86_CR4_PGE); | 37 | write_cr4(cr4 & ~X86_CR4_PGE); |
29 | /* write old PGE again and flush TLBs */ | 38 | /* write old PGE again and flush TLBs */ |
30 | write_cr4(cr4); | 39 | write_cr4(cr4); |
40 | |||
41 | raw_local_irq_restore(flags); | ||
31 | } | 42 | } |
32 | 43 | ||
33 | static inline void __native_flush_tlb_single(unsigned long addr) | 44 | static inline void __native_flush_tlb_single(unsigned long addr) |
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index 4f35a0fb4f22..dcf3f8131d6b 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h | |||
@@ -25,6 +25,16 @@ | |||
25 | #ifndef _ASM_X86_TOPOLOGY_H | 25 | #ifndef _ASM_X86_TOPOLOGY_H |
26 | #define _ASM_X86_TOPOLOGY_H | 26 | #define _ASM_X86_TOPOLOGY_H |
27 | 27 | ||
28 | #ifdef CONFIG_X86_32 | ||
29 | # ifdef CONFIG_X86_HT | ||
30 | # define ENABLE_TOPO_DEFINES | ||
31 | # endif | ||
32 | #else | ||
33 | # ifdef CONFIG_SMP | ||
34 | # define ENABLE_TOPO_DEFINES | ||
35 | # endif | ||
36 | #endif | ||
37 | |||
28 | #ifdef CONFIG_NUMA | 38 | #ifdef CONFIG_NUMA |
29 | #include <linux/cpumask.h> | 39 | #include <linux/cpumask.h> |
30 | #include <asm/mpspec.h> | 40 | #include <asm/mpspec.h> |
@@ -130,10 +140,6 @@ extern unsigned long node_end_pfn[]; | |||
130 | extern unsigned long node_remap_size[]; | 140 | extern unsigned long node_remap_size[]; |
131 | #define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid]) | 141 | #define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid]) |
132 | 142 | ||
133 | # ifdef CONFIG_X86_HT | ||
134 | # define ENABLE_TOPO_DEFINES | ||
135 | # endif | ||
136 | |||
137 | # define SD_CACHE_NICE_TRIES 1 | 143 | # define SD_CACHE_NICE_TRIES 1 |
138 | # define SD_IDLE_IDX 1 | 144 | # define SD_IDLE_IDX 1 |
139 | # define SD_NEWIDLE_IDX 2 | 145 | # define SD_NEWIDLE_IDX 2 |
@@ -141,10 +147,6 @@ extern unsigned long node_remap_size[]; | |||
141 | 147 | ||
142 | #else | 148 | #else |
143 | 149 | ||
144 | # ifdef CONFIG_SMP | ||
145 | # define ENABLE_TOPO_DEFINES | ||
146 | # endif | ||
147 | |||
148 | # define SD_CACHE_NICE_TRIES 2 | 150 | # define SD_CACHE_NICE_TRIES 2 |
149 | # define SD_IDLE_IDX 2 | 151 | # define SD_IDLE_IDX 2 |
150 | # define SD_NEWIDLE_IDX 2 | 152 | # define SD_NEWIDLE_IDX 2 |
diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h index 63733f315688..1ac80cd9acf8 100644 --- a/include/asm-x86/types.h +++ b/include/asm-x86/types.h | |||
@@ -1,34 +1,12 @@ | |||
1 | #ifndef _ASM_X86_TYPES_H | 1 | #ifndef _ASM_X86_TYPES_H |
2 | #define _ASM_X86_TYPES_H | 2 | #define _ASM_X86_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
5 | 7 | ||
6 | typedef unsigned short umode_t; | 8 | typedef unsigned short umode_t; |
7 | 9 | ||
8 | /* | ||
9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
10 | * header files exported to user space | ||
11 | */ | ||
12 | |||
13 | typedef __signed__ char __s8; | ||
14 | typedef unsigned char __u8; | ||
15 | |||
16 | typedef __signed__ short __s16; | ||
17 | typedef unsigned short __u16; | ||
18 | |||
19 | typedef __signed__ int __s32; | ||
20 | typedef unsigned int __u32; | ||
21 | |||
22 | #ifdef __i386__ | ||
23 | # ifdef __GNUC__ | ||
24 | __extension__ typedef __signed__ long long __s64; | ||
25 | __extension__ typedef unsigned long long __u64; | ||
26 | # endif | ||
27 | #else | ||
28 | typedef __signed__ long long __s64; | ||
29 | typedef unsigned long long __u64; | ||
30 | #endif | ||
31 | |||
32 | #endif /* __ASSEMBLY__ */ | 10 | #endif /* __ASSEMBLY__ */ |
33 | 11 | ||
34 | /* | 12 | /* |
@@ -44,18 +22,6 @@ typedef unsigned long long __u64; | |||
44 | 22 | ||
45 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
46 | 24 | ||
47 | typedef signed char s8; | ||
48 | typedef unsigned char u8; | ||
49 | |||
50 | typedef signed short s16; | ||
51 | typedef unsigned short u16; | ||
52 | |||
53 | typedef signed int s32; | ||
54 | typedef unsigned int u32; | ||
55 | |||
56 | typedef signed long long s64; | ||
57 | typedef unsigned long long u64; | ||
58 | |||
59 | typedef u64 dma64_addr_t; | 25 | typedef u64 dma64_addr_t; |
60 | #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G) | 26 | #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G) |
61 | /* DMA addresses come in 32-bit and 64-bit flavours. */ | 27 | /* DMA addresses come in 32-bit and 64-bit flavours. */ |
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index 01799305f02a..e11f24038b1d 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h | |||
@@ -127,7 +127,7 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
127 | 127 | ||
128 | static inline unsigned long pte_mfn(pte_t pte) | 128 | static inline unsigned long pte_mfn(pte_t pte) |
129 | { | 129 | { |
130 | return (pte.pte & ~_PAGE_NX) >> PAGE_SHIFT; | 130 | return (pte.pte & PTE_MASK) >> PAGE_SHIFT; |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) | 133 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) |
@@ -150,13 +150,9 @@ static inline pte_t __pte_ma(pteval_t x) | |||
150 | return (pte_t) { .pte = x }; | 150 | return (pte_t) { .pte = x }; |
151 | } | 151 | } |
152 | 152 | ||
153 | #ifdef CONFIG_X86_PAE | ||
154 | #define pmd_val_ma(v) ((v).pmd) | 153 | #define pmd_val_ma(v) ((v).pmd) |
155 | #define pud_val_ma(v) ((v).pgd.pgd) | 154 | #define pud_val_ma(v) ((v).pgd.pgd) |
156 | #define __pmd_ma(x) ((pmd_t) { (x) } ) | 155 | #define __pmd_ma(x) ((pmd_t) { (x) } ) |
157 | #else /* !X86_PAE */ | ||
158 | #define pmd_val_ma(v) ((v).pud.pgd.pgd) | ||
159 | #endif /* CONFIG_X86_PAE */ | ||
160 | 156 | ||
161 | #define pgd_val_ma(x) ((x).pgd) | 157 | #define pgd_val_ma(x) ((x).pgd) |
162 | 158 | ||
diff --git a/include/asm-xtensa/param.h b/include/asm-xtensa/param.h index 82ad34d92d35..ba03d5aeab6b 100644 --- a/include/asm-xtensa/param.h +++ b/include/asm-xtensa/param.h | |||
@@ -15,6 +15,8 @@ | |||
15 | # define HZ CONFIG_HZ /* internal timer frequency */ | 15 | # define HZ CONFIG_HZ /* internal timer frequency */ |
16 | # define USER_HZ 100 /* for user interfaces in "ticks" */ | 16 | # define USER_HZ 100 /* for user interfaces in "ticks" */ |
17 | # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ | 17 | # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ |
18 | #else | ||
19 | # define HZ 100 | ||
18 | #endif | 20 | #endif |
19 | 21 | ||
20 | #define EXEC_PAGESIZE 4096 | 22 | #define EXEC_PAGESIZE 4096 |
diff --git a/include/asm-xtensa/types.h b/include/asm-xtensa/types.h index b27d841a8eb7..c89569a8da0c 100644 --- a/include/asm-xtensa/types.h +++ b/include/asm-xtensa/types.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef _XTENSA_TYPES_H | 11 | #ifndef _XTENSA_TYPES_H |
12 | #define _XTENSA_TYPES_H | 12 | #define _XTENSA_TYPES_H |
13 | 13 | ||
14 | #include <asm-generic/int-ll64.h> | ||
14 | 15 | ||
15 | #ifdef __ASSEMBLY__ | 16 | #ifdef __ASSEMBLY__ |
16 | # define __XTENSA_UL(x) (x) | 17 | # define __XTENSA_UL(x) (x) |
@@ -25,42 +26,10 @@ | |||
25 | typedef unsigned short umode_t; | 26 | typedef unsigned short umode_t; |
26 | 27 | ||
27 | /* | 28 | /* |
28 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
29 | * header files exported to user space | ||
30 | */ | ||
31 | |||
32 | typedef __signed__ char __s8; | ||
33 | typedef unsigned char __u8; | ||
34 | |||
35 | typedef __signed__ short __s16; | ||
36 | typedef unsigned short __u16; | ||
37 | |||
38 | typedef __signed__ int __s32; | ||
39 | typedef unsigned int __u32; | ||
40 | |||
41 | #if defined(__GNUC__) | ||
42 | __extension__ typedef __signed__ long long __s64; | ||
43 | __extension__ typedef unsigned long long __u64; | ||
44 | #endif | ||
45 | |||
46 | /* | ||
47 | * These aren't exported outside the kernel to avoid name space clashes | 29 | * These aren't exported outside the kernel to avoid name space clashes |
48 | */ | 30 | */ |
49 | #ifdef __KERNEL__ | 31 | #ifdef __KERNEL__ |
50 | 32 | ||
51 | typedef __signed__ char s8; | ||
52 | typedef unsigned char u8; | ||
53 | |||
54 | typedef __signed__ short s16; | ||
55 | typedef unsigned short u16; | ||
56 | |||
57 | typedef __signed__ int s32; | ||
58 | typedef unsigned int u32; | ||
59 | |||
60 | typedef __signed__ long long s64; | ||
61 | typedef unsigned long long u64; | ||
62 | |||
63 | |||
64 | #define BITS_PER_LONG 32 | 33 | #define BITS_PER_LONG 32 |
65 | 34 | ||
66 | /* Dma addresses are 32-bits wide. */ | 35 | /* Dma addresses are 32-bits wide. */ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 78fade0a1e35..71d70d1fbce2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -92,7 +92,6 @@ header-y += if_slip.h | |||
92 | header-y += if_strip.h | 92 | header-y += if_strip.h |
93 | header-y += if_tun.h | 93 | header-y += if_tun.h |
94 | header-y += if_tunnel.h | 94 | header-y += if_tunnel.h |
95 | header-y += in6.h | ||
96 | header-y += in_route.h | 95 | header-y += in_route.h |
97 | header-y += ioctl.h | 96 | header-y += ioctl.h |
98 | header-y += ip6_tunnel.h | 97 | header-y += ip6_tunnel.h |
@@ -105,7 +104,6 @@ header-y += ixjuser.h | |||
105 | header-y += jffs2.h | 104 | header-y += jffs2.h |
106 | header-y += keyctl.h | 105 | header-y += keyctl.h |
107 | header-y += limits.h | 106 | header-y += limits.h |
108 | header-y += dlm_plock.h | ||
109 | header-y += magic.h | 107 | header-y += magic.h |
110 | header-y += major.h | 108 | header-y += major.h |
111 | header-y += matroxfb.h | 109 | header-y += matroxfb.h |
@@ -168,6 +166,9 @@ unifdef-y += acct.h | |||
168 | unifdef-y += adb.h | 166 | unifdef-y += adb.h |
169 | unifdef-y += adfs_fs.h | 167 | unifdef-y += adfs_fs.h |
170 | unifdef-y += agpgart.h | 168 | unifdef-y += agpgart.h |
169 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | ||
170 | unifdef-y += a.out.h | ||
171 | endif | ||
171 | unifdef-y += apm_bios.h | 172 | unifdef-y += apm_bios.h |
172 | unifdef-y += atalk.h | 173 | unifdef-y += atalk.h |
173 | unifdef-y += atmdev.h | 174 | unifdef-y += atmdev.h |
@@ -190,6 +191,7 @@ unifdef-y += cyclades.h | |||
190 | unifdef-y += dccp.h | 191 | unifdef-y += dccp.h |
191 | unifdef-y += dirent.h | 192 | unifdef-y += dirent.h |
192 | unifdef-y += dlm.h | 193 | unifdef-y += dlm.h |
194 | unifdef-y += dlm_plock.h | ||
193 | unifdef-y += edd.h | 195 | unifdef-y += edd.h |
194 | unifdef-y += elf.h | 196 | unifdef-y += elf.h |
195 | unifdef-y += elfcore.h | 197 | unifdef-y += elfcore.h |
@@ -236,6 +238,7 @@ unifdef-y += if_vlan.h | |||
236 | unifdef-y += igmp.h | 238 | unifdef-y += igmp.h |
237 | unifdef-y += inet_diag.h | 239 | unifdef-y += inet_diag.h |
238 | unifdef-y += in.h | 240 | unifdef-y += in.h |
241 | unifdef-y += in6.h | ||
239 | unifdef-y += inotify.h | 242 | unifdef-y += inotify.h |
240 | unifdef-y += input.h | 243 | unifdef-y += input.h |
241 | unifdef-y += ip.h | 244 | unifdef-y += ip.h |
@@ -346,6 +349,11 @@ unifdef-y += videodev.h | |||
346 | unifdef-y += virtio_config.h | 349 | unifdef-y += virtio_config.h |
347 | unifdef-y += virtio_blk.h | 350 | unifdef-y += virtio_blk.h |
348 | unifdef-y += virtio_net.h | 351 | unifdef-y += virtio_net.h |
352 | unifdef-y += virtio_9p.h | ||
353 | unifdef-y += virtio_balloon.h | ||
354 | unifdef-y += virtio_console.h | ||
355 | unifdef-y += virtio_pci.h | ||
356 | unifdef-y += virtio_ring.h | ||
349 | unifdef-y += vt.h | 357 | unifdef-y += vt.h |
350 | unifdef-y += wait.h | 358 | unifdef-y += wait.h |
351 | unifdef-y += wanrouter.h | 359 | unifdef-y += wanrouter.h |
diff --git a/include/linux/a.out.h b/include/linux/a.out.h index 208f4e8ed304..e86dfca44589 100644 --- a/include/linux/a.out.h +++ b/include/linux/a.out.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef __A_OUT_GNU_H__ | 1 | #ifndef __A_OUT_GNU_H__ |
2 | #define __A_OUT_GNU_H__ | 2 | #define __A_OUT_GNU_H__ |
3 | 3 | ||
4 | #ifdef CONFIG_ARCH_SUPPORTS_AOUT | ||
5 | |||
6 | #define __GNU_EXEC_MACROS__ | 4 | #define __GNU_EXEC_MACROS__ |
7 | 5 | ||
8 | #ifndef __STRUCT_EXEC_OVERRIDE__ | 6 | #ifndef __STRUCT_EXEC_OVERRIDE__ |
@@ -277,10 +275,4 @@ struct relocation_info | |||
277 | #endif /* no N_RELOCATION_INFO_DECLARED. */ | 275 | #endif /* no N_RELOCATION_INFO_DECLARED. */ |
278 | 276 | ||
279 | #endif /*__ASSEMBLY__ */ | 277 | #endif /*__ASSEMBLY__ */ |
280 | #else /* CONFIG_ARCH_SUPPORTS_AOUT */ | ||
281 | #ifndef __ASSEMBLY__ | ||
282 | struct exec { | ||
283 | }; | ||
284 | #endif | ||
285 | #endif /* CONFIG_ARCH_SUPPORTS_AOUT */ | ||
286 | #endif /* __A_OUT_GNU_H__ */ | 278 | #endif /* __A_OUT_GNU_H__ */ |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 661d90d6cf7c..972b12bcfb36 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -30,14 +30,6 @@ | |||
30 | #ifndef _AGP_BACKEND_H | 30 | #ifndef _AGP_BACKEND_H |
31 | #define _AGP_BACKEND_H 1 | 31 | #define _AGP_BACKEND_H 1 |
32 | 32 | ||
33 | #ifndef TRUE | ||
34 | #define TRUE 1 | ||
35 | #endif | ||
36 | |||
37 | #ifndef FALSE | ||
38 | #define FALSE 0 | ||
39 | #endif | ||
40 | |||
41 | enum chipset_type { | 33 | enum chipset_type { |
42 | NOT_SUPPORTED, | 34 | NOT_SUPPORTED, |
43 | SUPPORTED, | 35 | SUPPORTED, |
@@ -57,7 +49,7 @@ struct agp_kern_info { | |||
57 | size_t aper_size; | 49 | size_t aper_size; |
58 | int max_memory; /* In pages */ | 50 | int max_memory; /* In pages */ |
59 | int current_memory; | 51 | int current_memory; |
60 | int cant_use_aperture; | 52 | bool cant_use_aperture; |
61 | unsigned long page_mask; | 53 | unsigned long page_mask; |
62 | struct vm_operations_struct *vm_ops; | 54 | struct vm_operations_struct *vm_ops; |
63 | }; | 55 | }; |
@@ -83,9 +75,9 @@ struct agp_memory { | |||
83 | off_t pg_start; | 75 | off_t pg_start; |
84 | u32 type; | 76 | u32 type; |
85 | u32 physical; | 77 | u32 physical; |
86 | u8 is_bound; | 78 | bool is_bound; |
87 | u8 is_flushed; | 79 | bool is_flushed; |
88 | u8 vmalloc_flag; | 80 | bool vmalloc_flag; |
89 | }; | 81 | }; |
90 | 82 | ||
91 | #define AGP_NORMAL_MEMORY 0 | 83 | #define AGP_NORMAL_MEMORY 0 |
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index 62aef589eb94..c8fdb6e658e1 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h | |||
@@ -206,8 +206,8 @@ struct agp_front_data { | |||
206 | struct agp_controller *current_controller; | 206 | struct agp_controller *current_controller; |
207 | struct agp_controller *controllers; | 207 | struct agp_controller *controllers; |
208 | struct agp_file_private *file_priv_list; | 208 | struct agp_file_private *file_priv_list; |
209 | u8 used_by_controller; | 209 | bool used_by_controller; |
210 | u8 backend_acquired; | 210 | bool backend_acquired; |
211 | }; | 211 | }; |
212 | 212 | ||
213 | #endif /* __KERNEL__ */ | 213 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h index b2e1ba325b9a..6129e58ca7c9 100644 --- a/include/linux/anon_inodes.h +++ b/include/linux/anon_inodes.h | |||
@@ -8,8 +8,7 @@ | |||
8 | #ifndef _LINUX_ANON_INODES_H | 8 | #ifndef _LINUX_ANON_INODES_H |
9 | #define _LINUX_ANON_INODES_H | 9 | #define _LINUX_ANON_INODES_H |
10 | 10 | ||
11 | int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile, | 11 | int anon_inode_getfd(const char *name, const struct file_operations *fops, |
12 | const char *name, const struct file_operations *fops, | ||
13 | void *priv); | 12 | void *priv); |
14 | 13 | ||
15 | #endif /* _LINUX_ANON_INODES_H */ | 14 | #endif /* _LINUX_ANON_INODES_H */ |
diff --git a/include/linux/atm.h b/include/linux/atm.h index 60136684e0af..c791ddd96939 100644 --- a/include/linux/atm.h +++ b/include/linux/atm.h | |||
@@ -16,14 +16,11 @@ | |||
16 | * documentation. Do not change them. | 16 | * documentation. Do not change them. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifdef __KERNEL__ | ||
20 | #include <linux/socket.h> | ||
21 | #include <linux/types.h> | ||
22 | #endif | ||
23 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
24 | #include <linux/atmapi.h> | 20 | #include <linux/atmapi.h> |
25 | #include <linux/atmsap.h> | 21 | #include <linux/atmsap.h> |
26 | #include <linux/atmioc.h> | 22 | #include <linux/atmioc.h> |
23 | #include <linux/types.h> | ||
27 | 24 | ||
28 | 25 | ||
29 | /* general ATM constants */ | 26 | /* general ATM constants */ |
@@ -212,7 +209,7 @@ struct sockaddr_atmsvc { | |||
212 | char pub[ATM_E164_LEN+1]; /* public address (E.164) */ | 209 | char pub[ATM_E164_LEN+1]; /* public address (E.164) */ |
213 | /* unused addresses must be bzero'ed */ | 210 | /* unused addresses must be bzero'ed */ |
214 | char lij_type; /* role in LIJ call; one of ATM_LIJ* */ | 211 | char lij_type; /* role in LIJ call; one of ATM_LIJ* */ |
215 | uint32_t lij_id; /* LIJ call identifier */ | 212 | __u32 lij_id; /* LIJ call identifier */ |
216 | } sas_addr __ATM_API_ALIGN; /* SVC address */ | 213 | } sas_addr __ATM_API_ALIGN; /* SVC address */ |
217 | }; | 214 | }; |
218 | 215 | ||
diff --git a/include/linux/atm_tcp.h b/include/linux/atm_tcp.h index 18787f9b2f19..375638f8554b 100644 --- a/include/linux/atm_tcp.h +++ b/include/linux/atm_tcp.h | |||
@@ -8,11 +8,9 @@ | |||
8 | #define LINUX_ATM_TCP_H | 8 | #define LINUX_ATM_TCP_H |
9 | 9 | ||
10 | #include <linux/atmapi.h> | 10 | #include <linux/atmapi.h> |
11 | 11 | #include <linux/atm.h> | |
12 | #ifdef __KERNEL__ | ||
13 | #include <linux/types.h> | ||
14 | #endif | ||
15 | #include <linux/atmioc.h> | 12 | #include <linux/atmioc.h> |
13 | #include <linux/types.h> | ||
16 | 14 | ||
17 | 15 | ||
18 | /* | 16 | /* |
@@ -20,9 +18,9 @@ | |||
20 | */ | 18 | */ |
21 | 19 | ||
22 | struct atmtcp_hdr { | 20 | struct atmtcp_hdr { |
23 | uint16_t vpi; | 21 | __u16 vpi; |
24 | uint16_t vci; | 22 | __u16 vci; |
25 | uint32_t length; /* ... of data part */ | 23 | __u32 length; /* ... of data part */ |
26 | }; | 24 | }; |
27 | 25 | ||
28 | /* | 26 | /* |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 63c3bb98558f..8b82974bdc12 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -571,7 +571,7 @@ extern void audit_log_lost(const char *message); | |||
571 | extern int audit_update_lsm_rules(void); | 571 | extern int audit_update_lsm_rules(void); |
572 | 572 | ||
573 | /* Private API (for audit.c only) */ | 573 | /* Private API (for audit.c only) */ |
574 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 574 | extern int audit_filter_user(struct netlink_skb_parms *cb); |
575 | extern int audit_filter_type(int type); | 575 | extern int audit_filter_type(int type); |
576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
577 | void *data, size_t datasz, uid_t loginuid, | 577 | void *data, size_t datasz, uid_t loginuid, |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index b512e48f6d8e..ee0ed48e8348 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -99,6 +99,7 @@ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | |||
99 | extern void compute_creds(struct linux_binprm *binprm); | 99 | extern void compute_creds(struct linux_binprm *binprm); |
100 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); | 100 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); |
101 | extern int set_binfmt(struct linux_binfmt *new); | 101 | extern int set_binfmt(struct linux_binfmt *new); |
102 | extern void free_bprm(struct linux_binprm *); | ||
102 | 103 | ||
103 | #endif /* __KERNEL__ */ | 104 | #endif /* __KERNEL__ */ |
104 | #endif /* _LINUX_BINFMTS_H */ | 105 | #endif /* _LINUX_BINFMTS_H */ |
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 43b406def35f..1abfe664c444 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -110,7 +110,6 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits); | |||
110 | 110 | ||
111 | extern int bitmap_scnprintf(char *buf, unsigned int len, | 111 | extern int bitmap_scnprintf(char *buf, unsigned int len, |
112 | const unsigned long *src, int nbits); | 112 | const unsigned long *src, int nbits); |
113 | extern int bitmap_scnprintf_len(unsigned int len); | ||
114 | extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, | 113 | extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, |
115 | unsigned long *dst, int nbits); | 114 | unsigned long *dst, int nbits); |
116 | extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, | 115 | extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, |
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h index 05e540d6963a..7ffe03f4693d 100644 --- a/include/linux/bitrev.h +++ b/include/linux/bitrev.h | |||
@@ -10,6 +10,7 @@ static inline u8 bitrev8(u8 byte) | |||
10 | return byte_rev_table[byte]; | 10 | return byte_rev_table[byte]; |
11 | } | 11 | } |
12 | 12 | ||
13 | extern u16 bitrev16(u16 in); | ||
13 | extern u32 bitrev32(u32 in); | 14 | extern u32 bitrev32(u32 in); |
14 | 15 | ||
15 | #endif /* _LINUX_BITREV_H */ | 16 | #endif /* _LINUX_BITREV_H */ |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index cfc3147e5cf9..e3ef903aae88 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -55,6 +55,7 @@ enum blktrace_act { | |||
55 | enum blktrace_notify { | 55 | enum blktrace_notify { |
56 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ | 56 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ |
57 | __BLK_TN_TIMESTAMP, /* include system clock */ | 57 | __BLK_TN_TIMESTAMP, /* include system clock */ |
58 | __BLK_TN_MESSAGE, /* Character string message */ | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | 61 | ||
@@ -79,6 +80,7 @@ enum blktrace_notify { | |||
79 | 80 | ||
80 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) | 81 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) |
81 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) | 82 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) |
83 | #define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY)) | ||
82 | 84 | ||
83 | #define BLK_IO_TRACE_MAGIC 0x65617400 | 85 | #define BLK_IO_TRACE_MAGIC 0x65617400 |
84 | #define BLK_IO_TRACE_VERSION 0x07 | 86 | #define BLK_IO_TRACE_VERSION 0x07 |
@@ -119,6 +121,7 @@ struct blk_trace { | |||
119 | int trace_state; | 121 | int trace_state; |
120 | struct rchan *rchan; | 122 | struct rchan *rchan; |
121 | unsigned long *sequence; | 123 | unsigned long *sequence; |
124 | unsigned char *msg_data; | ||
122 | u16 act_mask; | 125 | u16 act_mask; |
123 | u64 start_lba; | 126 | u64 start_lba; |
124 | u64 end_lba; | 127 | u64 end_lba; |
@@ -149,7 +152,28 @@ extern void blk_trace_shutdown(struct request_queue *); | |||
149 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); | 152 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); |
150 | extern int do_blk_trace_setup(struct request_queue *q, | 153 | extern int do_blk_trace_setup(struct request_queue *q, |
151 | char *name, dev_t dev, struct blk_user_trace_setup *buts); | 154 | char *name, dev_t dev, struct blk_user_trace_setup *buts); |
155 | extern void __trace_note_message(struct blk_trace *, const char *fmt, ...); | ||
152 | 156 | ||
157 | /** | ||
158 | * blk_add_trace_msg - Add a (simple) message to the blktrace stream | ||
159 | * @q: queue the io is for | ||
160 | * @fmt: format to print message in | ||
161 | * args... Variable argument list for format | ||
162 | * | ||
163 | * Description: | ||
164 | * Records a (simple) message onto the blktrace stream. | ||
165 | * | ||
166 | * NOTE: BLK_TN_MAX_MSG characters are output at most. | ||
167 | * NOTE: Can not use 'static inline' due to presence of var args... | ||
168 | * | ||
169 | **/ | ||
170 | #define blk_add_trace_msg(q, fmt, ...) \ | ||
171 | do { \ | ||
172 | struct blk_trace *bt = (q)->blk_trace; \ | ||
173 | if (unlikely(bt)) \ | ||
174 | __trace_note_message(bt, fmt, ##__VA_ARGS__); \ | ||
175 | } while (0) | ||
176 | #define BLK_TN_MAX_MSG 128 | ||
153 | 177 | ||
154 | /** | 178 | /** |
155 | * blk_add_trace_rq - Add a trace for a request oriented action | 179 | * blk_add_trace_rq - Add a trace for a request oriented action |
@@ -299,6 +323,8 @@ extern int blk_trace_remove(struct request_queue *q); | |||
299 | #define blk_trace_setup(q, name, dev, arg) (-ENOTTY) | 323 | #define blk_trace_setup(q, name, dev, arg) (-ENOTTY) |
300 | #define blk_trace_startstop(q, start) (-ENOTTY) | 324 | #define blk_trace_startstop(q, start) (-ENOTTY) |
301 | #define blk_trace_remove(q) (-ENOTTY) | 325 | #define blk_trace_remove(q) (-ENOTTY) |
326 | #define blk_add_trace_msg(q, fmt, ...) do { } while (0) | ||
327 | |||
302 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ | 328 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ |
303 | #endif /* __KERNEL__ */ | 329 | #endif /* __KERNEL__ */ |
304 | #endif | 330 | #endif |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 6a5dbdc8a7dc..686895bacd9d 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
94 | unsigned long freepfn, | 94 | unsigned long freepfn, |
95 | unsigned long startpfn, | 95 | unsigned long startpfn, |
96 | unsigned long endpfn); | 96 | unsigned long endpfn); |
97 | extern void reserve_bootmem_node(pg_data_t *pgdat, | 97 | extern int reserve_bootmem_node(pg_data_t *pgdat, |
98 | unsigned long physaddr, | 98 | unsigned long physaddr, |
99 | unsigned long size, | 99 | unsigned long size, |
100 | int flags); | 100 | int flags); |
diff --git a/include/linux/capability.h b/include/linux/capability.h index f4ea0dd9a618..02673846d205 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -31,11 +31,11 @@ struct task_struct; | |||
31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 | 31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 |
32 | #define _LINUX_CAPABILITY_U32S_1 1 | 32 | #define _LINUX_CAPABILITY_U32S_1 1 |
33 | 33 | ||
34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 | 34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 /* deprecated - use v3 */ |
35 | #define _LINUX_CAPABILITY_U32S_2 2 | 35 | #define _LINUX_CAPABILITY_U32S_2 2 |
36 | 36 | ||
37 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_2 | 37 | #define _LINUX_CAPABILITY_VERSION_3 0x20080522 |
38 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_2 | 38 | #define _LINUX_CAPABILITY_U32S_3 2 |
39 | 39 | ||
40 | typedef struct __user_cap_header_struct { | 40 | typedef struct __user_cap_header_struct { |
41 | __u32 version; | 41 | __u32 version; |
@@ -77,10 +77,23 @@ struct vfs_cap_data { | |||
77 | } data[VFS_CAP_U32]; | 77 | } data[VFS_CAP_U32]; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #ifdef __KERNEL__ | 80 | #ifndef __KERNEL__ |
81 | |||
82 | /* | ||
83 | * Backwardly compatible definition for source code - trapped in a | ||
84 | * 32-bit world. If you find you need this, please consider using | ||
85 | * libcap to untrap yourself... | ||
86 | */ | ||
87 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_1 | ||
88 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_1 | ||
89 | |||
90 | #else | ||
91 | |||
92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | ||
93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | ||
81 | 94 | ||
82 | typedef struct kernel_cap_struct { | 95 | typedef struct kernel_cap_struct { |
83 | __u32 cap[_LINUX_CAPABILITY_U32S]; | 96 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
84 | } kernel_cap_t; | 97 | } kernel_cap_t; |
85 | 98 | ||
86 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) | 99 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) |
@@ -351,7 +364,7 @@ typedef struct kernel_cap_struct { | |||
351 | */ | 364 | */ |
352 | 365 | ||
353 | #define CAP_FOR_EACH_U32(__capi) \ | 366 | #define CAP_FOR_EACH_U32(__capi) \ |
354 | for (__capi = 0; __capi < _LINUX_CAPABILITY_U32S; ++__capi) | 367 | for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) |
355 | 368 | ||
356 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ | 369 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ |
357 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ | 370 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ |
@@ -361,7 +374,7 @@ typedef struct kernel_cap_struct { | |||
361 | 374 | ||
362 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) | 375 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) |
363 | 376 | ||
364 | #if _LINUX_CAPABILITY_U32S != 2 | 377 | #if _KERNEL_CAPABILITY_U32S != 2 |
365 | # error Fix up hand-coded capability macro initializers | 378 | # error Fix up hand-coded capability macro initializers |
366 | #else /* HAND-CODED capability initializers */ | 379 | #else /* HAND-CODED capability initializers */ |
367 | 380 | ||
@@ -372,7 +385,7 @@ typedef struct kernel_cap_struct { | |||
372 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ | 385 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ |
373 | CAP_FS_MASK_B1 } }) | 386 | CAP_FS_MASK_B1 } }) |
374 | 387 | ||
375 | #endif /* _LINUX_CAPABILITY_U32S != 2 */ | 388 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
376 | 389 | ||
377 | #define CAP_INIT_INH_SET CAP_EMPTY_SET | 390 | #define CAP_INIT_INH_SET CAP_EMPTY_SET |
378 | 391 | ||
@@ -488,6 +501,8 @@ extern const kernel_cap_t __cap_empty_set; | |||
488 | extern const kernel_cap_t __cap_full_set; | 501 | extern const kernel_cap_t __cap_full_set; |
489 | extern const kernel_cap_t __cap_init_eff_set; | 502 | extern const kernel_cap_t __cap_init_eff_set; |
490 | 503 | ||
504 | kernel_cap_t cap_set_effective(const kernel_cap_t pE_new); | ||
505 | |||
491 | int capable(int cap); | 506 | int capable(int cap); |
492 | int __capable(struct task_struct *t, int cap); | 507 | int __capable(struct task_struct *t, int cap); |
493 | 508 | ||
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h index 1605dd8aa646..6f9f19d66591 100644 --- a/include/linux/cfag12864b.h +++ b/include/linux/cfag12864b.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Description: cfag12864b LCD driver header | 4 | * Description: cfag12864b LCD driver header |
5 | * License: GPLv2 | 5 | * License: GPLv2 |
6 | * | 6 | * |
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | 7 | * Author: Copyright (C) Miguel Ojeda Sandonis |
8 | * Date: 2006-10-12 | 8 | * Date: 2006-10-12 |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index dcae0c8d97e6..c8bd2daf95ec 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -182,4 +182,16 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
182 | # define __section(S) __attribute__ ((__section__(#S))) | 182 | # define __section(S) __attribute__ ((__section__(#S))) |
183 | #endif | 183 | #endif |
184 | 184 | ||
185 | /* | ||
186 | * Prevent the compiler from merging or refetching accesses. The compiler | ||
187 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), | ||
188 | * but only when the compiler is aware of some particular ordering. One way | ||
189 | * to make the compiler aware of ordering is to put the two invocations of | ||
190 | * ACCESS_ONCE() in different C statements. | ||
191 | * | ||
192 | * This macro does absolutely -nothing- to prevent the CPU from reordering, | ||
193 | * merging, or refetching absolutely anything at any time. | ||
194 | */ | ||
195 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | ||
196 | |||
185 | #endif /* __LINUX_COMPILER_H */ | 197 | #endif /* __LINUX_COMPILER_H */ |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 51e6b1e520e6..dcf77fa826b5 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -82,6 +82,7 @@ struct cpuidle_state_kobj { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct cpuidle_device { | 84 | struct cpuidle_device { |
85 | unsigned int registered:1; | ||
85 | unsigned int enabled:1; | 86 | unsigned int enabled:1; |
86 | unsigned int cpu; | 87 | unsigned int cpu; |
87 | 88 | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9650806fe2ea..c24875bd9c5b 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -289,13 +289,6 @@ static inline int __cpumask_scnprintf(char *buf, int len, | |||
289 | return bitmap_scnprintf(buf, len, srcp->bits, nbits); | 289 | return bitmap_scnprintf(buf, len, srcp->bits, nbits); |
290 | } | 290 | } |
291 | 291 | ||
292 | #define cpumask_scnprintf_len(len) \ | ||
293 | __cpumask_scnprintf_len((len)) | ||
294 | static inline int __cpumask_scnprintf_len(int len) | ||
295 | { | ||
296 | return bitmap_scnprintf_len(len); | ||
297 | } | ||
298 | |||
299 | #define cpumask_parse_user(ubuf, ulen, dst) \ | 292 | #define cpumask_parse_user(ubuf, ulen, dst) \ |
300 | __cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS) | 293 | __cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS) |
301 | static inline int __cpumask_parse_user(const char __user *buf, int len, | 294 | static inline int __cpumask_parse_user(const char __user *buf, int len, |
@@ -360,6 +353,10 @@ static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, | |||
360 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) | 353 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) |
361 | #endif /* NR_CPUS */ | 354 | #endif /* NR_CPUS */ |
362 | 355 | ||
356 | #define next_cpu_nr(n, src) next_cpu(n, src) | ||
357 | #define cpus_weight_nr(cpumask) cpus_weight(cpumask) | ||
358 | #define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask) | ||
359 | |||
363 | /* | 360 | /* |
364 | * The following particular system cpumasks and operations manage | 361 | * The following particular system cpumasks and operations manage |
365 | * possible, present and online cpus. Each of them is a fixed size | 362 | * possible, present and online cpus. Each of them is a fixed size |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 2a6639407c80..d982eb89c77d 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -300,7 +300,7 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
300 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 300 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
301 | 301 | ||
302 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | 302 | extern char *__d_path(const struct path *path, struct path *root, char *, int); |
303 | extern char *d_path(struct path *, char *, int); | 303 | extern char *d_path(const struct path *, char *, int); |
304 | extern char *dentry_path(struct dentry *, char *, int); | 304 | extern char *dentry_path(struct dentry *, char *, int); |
305 | 305 | ||
306 | /* Allocation counts.. */ | 306 | /* Allocation counts.. */ |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index f4a5871767f5..4aaa4afb1cb9 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_DEBUG_LOCKING_H | 1 | #ifndef __LINUX_DEBUG_LOCKING_H |
2 | #define __LINUX_DEBUG_LOCKING_H | 2 | #define __LINUX_DEBUG_LOCKING_H |
3 | 3 | ||
4 | #include <linux/kernel.h> | ||
5 | |||
4 | struct task_struct; | 6 | struct task_struct; |
5 | 7 | ||
6 | extern int debug_locks; | 8 | extern int debug_locks; |
@@ -11,14 +13,6 @@ extern int debug_locks_silent; | |||
11 | */ | 13 | */ |
12 | extern int debug_locks_off(void); | 14 | extern int debug_locks_off(void); |
13 | 15 | ||
14 | /* | ||
15 | * In the debug case we carry the caller's instruction pointer into | ||
16 | * other functions, but we dont want the function argument overhead | ||
17 | * in the nondebug case - hence these macros: | ||
18 | */ | ||
19 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) | ||
20 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
21 | |||
22 | #define DEBUG_LOCKS_WARN_ON(c) \ | 16 | #define DEBUG_LOCKS_WARN_ON(c) \ |
23 | ({ \ | 17 | ({ \ |
24 | int __ret = 0; \ | 18 | int __ret = 0; \ |
diff --git a/include/linux/device.h b/include/linux/device.h index 832fb0eb2933..6a2d04c011bc 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -183,7 +183,6 @@ struct class { | |||
183 | struct module *owner; | 183 | struct module *owner; |
184 | 184 | ||
185 | struct kset subsys; | 185 | struct kset subsys; |
186 | struct list_head children; | ||
187 | struct list_head devices; | 186 | struct list_head devices; |
188 | struct list_head interfaces; | 187 | struct list_head interfaces; |
189 | struct kset class_dirs; | 188 | struct kset class_dirs; |
@@ -380,6 +379,15 @@ struct device { | |||
380 | /* Get the wakeup routines, which depend on struct device */ | 379 | /* Get the wakeup routines, which depend on struct device */ |
381 | #include <linux/pm_wakeup.h> | 380 | #include <linux/pm_wakeup.h> |
382 | 381 | ||
382 | static inline const char *dev_name(struct device *dev) | ||
383 | { | ||
384 | /* will be changed into kobject_name(&dev->kobj) in the near future */ | ||
385 | return dev->bus_id; | ||
386 | } | ||
387 | |||
388 | extern int dev_set_name(struct device *dev, const char *name, ...) | ||
389 | __attribute__((format(printf, 2, 3))); | ||
390 | |||
383 | #ifdef CONFIG_NUMA | 391 | #ifdef CONFIG_NUMA |
384 | static inline int dev_to_node(struct device *dev) | 392 | static inline int dev_to_node(struct device *dev) |
385 | { | 393 | { |
@@ -444,9 +452,21 @@ extern int __must_check device_reprobe(struct device *dev); | |||
444 | /* | 452 | /* |
445 | * Easy functions for dynamically creating devices on the fly | 453 | * Easy functions for dynamically creating devices on the fly |
446 | */ | 454 | */ |
455 | extern struct device *device_create_vargs(struct class *cls, | ||
456 | struct device *parent, | ||
457 | dev_t devt, | ||
458 | void *drvdata, | ||
459 | const char *fmt, | ||
460 | va_list vargs); | ||
447 | extern struct device *device_create(struct class *cls, struct device *parent, | 461 | extern struct device *device_create(struct class *cls, struct device *parent, |
448 | dev_t devt, const char *fmt, ...) | 462 | dev_t devt, const char *fmt, ...) |
449 | __attribute__((format(printf, 4, 5))); | 463 | __attribute__((format(printf, 4, 5))); |
464 | extern struct device *device_create_drvdata(struct class *cls, | ||
465 | struct device *parent, | ||
466 | dev_t devt, | ||
467 | void *drvdata, | ||
468 | const char *fmt, ...) | ||
469 | __attribute__((format(printf, 5, 6))); | ||
450 | extern void device_destroy(struct class *cls, dev_t devt); | 470 | extern void device_destroy(struct class *cls, dev_t devt); |
451 | 471 | ||
452 | /* | 472 | /* |
@@ -478,7 +498,7 @@ extern void sysdev_shutdown(void); | |||
478 | extern const char *dev_driver_string(struct device *dev); | 498 | extern const char *dev_driver_string(struct device *dev); |
479 | #define dev_printk(level, dev, format, arg...) \ | 499 | #define dev_printk(level, dev, format, arg...) \ |
480 | printk(level "%s %s: " format , dev_driver_string(dev) , \ | 500 | printk(level "%s %s: " format , dev_driver_string(dev) , \ |
481 | (dev)->bus_id , ## arg) | 501 | dev_name(dev) , ## arg) |
482 | 502 | ||
483 | #define dev_emerg(dev, format, arg...) \ | 503 | #define dev_emerg(dev, format, arg...) \ |
484 | dev_printk(KERN_EMERG , dev , format , ## arg) | 504 | dev_printk(KERN_EMERG , dev , format , ## arg) |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index de8387b7ceb6..f5abd1306638 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -33,6 +33,19 @@ enum fid_type { | |||
33 | * 32 bit parent directory inode number. | 33 | * 32 bit parent directory inode number. |
34 | */ | 34 | */ |
35 | FILEID_INO32_GEN_PARENT = 2, | 35 | FILEID_INO32_GEN_PARENT = 2, |
36 | |||
37 | /* | ||
38 | * 32 bit block number, 16 bit partition reference, | ||
39 | * 16 bit unused, 32 bit generation number. | ||
40 | */ | ||
41 | FILEID_UDF_WITHOUT_PARENT = 0x51, | ||
42 | |||
43 | /* | ||
44 | * 32 bit block number, 16 bit partition reference, | ||
45 | * 16 bit unused, 32 bit generation number, | ||
46 | * 32 bit parent block number, 32 bit parent generation number | ||
47 | */ | ||
48 | FILEID_UDF_WITH_PARENT = 0x52, | ||
36 | }; | 49 | }; |
37 | 50 | ||
38 | struct fid { | 51 | struct fid { |
@@ -43,6 +56,14 @@ struct fid { | |||
43 | u32 parent_ino; | 56 | u32 parent_ino; |
44 | u32 parent_gen; | 57 | u32 parent_gen; |
45 | } i32; | 58 | } i32; |
59 | struct { | ||
60 | u32 block; | ||
61 | u16 partref; | ||
62 | u16 parent_partref; | ||
63 | u32 generation; | ||
64 | u32 parent_block; | ||
65 | u32 parent_generation; | ||
66 | } udf; | ||
46 | __u32 raw[0]; | 67 | __u32 raw[0]; |
47 | }; | 68 | }; |
48 | }; | 69 | }; |
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h new file mode 100644 index 000000000000..4aab6f12cfab --- /dev/null +++ b/include/linux/fdtable.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * descriptor table internals; you almost certainly want file.h instead. | ||
3 | */ | ||
4 | |||
5 | #ifndef __LINUX_FDTABLE_H | ||
6 | #define __LINUX_FDTABLE_H | ||
7 | |||
8 | #include <asm/atomic.h> | ||
9 | #include <linux/posix_types.h> | ||
10 | #include <linux/compiler.h> | ||
11 | #include <linux/spinlock.h> | ||
12 | #include <linux/rcupdate.h> | ||
13 | #include <linux/types.h> | ||
14 | |||
15 | /* | ||
16 | * The default fd array needs to be at least BITS_PER_LONG, | ||
17 | * as this is the granularity returned by copy_fdset(). | ||
18 | */ | ||
19 | #define NR_OPEN_DEFAULT BITS_PER_LONG | ||
20 | |||
21 | /* | ||
22 | * The embedded_fd_set is a small fd_set, | ||
23 | * suitable for most tasks (which open <= BITS_PER_LONG files) | ||
24 | */ | ||
25 | struct embedded_fd_set { | ||
26 | unsigned long fds_bits[1]; | ||
27 | }; | ||
28 | |||
29 | struct fdtable { | ||
30 | unsigned int max_fds; | ||
31 | struct file ** fd; /* current fd array */ | ||
32 | fd_set *close_on_exec; | ||
33 | fd_set *open_fds; | ||
34 | struct rcu_head rcu; | ||
35 | struct fdtable *next; | ||
36 | }; | ||
37 | |||
38 | /* | ||
39 | * Open file table structure | ||
40 | */ | ||
41 | struct files_struct { | ||
42 | /* | ||
43 | * read mostly part | ||
44 | */ | ||
45 | atomic_t count; | ||
46 | struct fdtable *fdt; | ||
47 | struct fdtable fdtab; | ||
48 | /* | ||
49 | * written part on a separate cache line in SMP | ||
50 | */ | ||
51 | spinlock_t file_lock ____cacheline_aligned_in_smp; | ||
52 | int next_fd; | ||
53 | struct embedded_fd_set close_on_exec_init; | ||
54 | struct embedded_fd_set open_fds_init; | ||
55 | struct file * fd_array[NR_OPEN_DEFAULT]; | ||
56 | }; | ||
57 | |||
58 | #define files_fdtable(files) (rcu_dereference((files)->fdt)) | ||
59 | |||
60 | extern struct kmem_cache *filp_cachep; | ||
61 | |||
62 | struct file_operations; | ||
63 | struct vfsmount; | ||
64 | struct dentry; | ||
65 | |||
66 | extern int expand_files(struct files_struct *, int nr); | ||
67 | extern void free_fdtable_rcu(struct rcu_head *rcu); | ||
68 | extern void __init files_defer_init(void); | ||
69 | |||
70 | static inline void free_fdtable(struct fdtable *fdt) | ||
71 | { | ||
72 | call_rcu(&fdt->rcu, free_fdtable_rcu); | ||
73 | } | ||
74 | |||
75 | static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd) | ||
76 | { | ||
77 | struct file * file = NULL; | ||
78 | struct fdtable *fdt = files_fdtable(files); | ||
79 | |||
80 | if (fd < fdt->max_fds) | ||
81 | file = rcu_dereference(fdt->fd[fd]); | ||
82 | return file; | ||
83 | } | ||
84 | |||
85 | /* | ||
86 | * Check whether the specified fd has an open file. | ||
87 | */ | ||
88 | #define fcheck(fd) fcheck_files(current->files, fd) | ||
89 | |||
90 | struct task_struct; | ||
91 | |||
92 | struct files_struct *get_files_struct(struct task_struct *); | ||
93 | void put_files_struct(struct files_struct *fs); | ||
94 | void reset_files_struct(struct files_struct *); | ||
95 | int unshare_files(struct files_struct **); | ||
96 | struct files_struct *dup_fd(struct files_struct *, int *); | ||
97 | |||
98 | extern struct kmem_cache *files_cachep; | ||
99 | |||
100 | #endif /* __LINUX_FDTABLE_H */ | ||
diff --git a/include/linux/file.h b/include/linux/file.h index 69baf5a4f0a5..27c64bdc68c9 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -5,59 +5,11 @@ | |||
5 | #ifndef __LINUX_FILE_H | 5 | #ifndef __LINUX_FILE_H |
6 | #define __LINUX_FILE_H | 6 | #define __LINUX_FILE_H |
7 | 7 | ||
8 | #include <asm/atomic.h> | ||
9 | #include <linux/posix_types.h> | ||
10 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
11 | #include <linux/spinlock.h> | ||
12 | #include <linux/rcupdate.h> | ||
13 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/posix_types.h> | ||
14 | 11 | ||
15 | /* | 12 | struct file; |
16 | * The default fd array needs to be at least BITS_PER_LONG, | ||
17 | * as this is the granularity returned by copy_fdset(). | ||
18 | */ | ||
19 | #define NR_OPEN_DEFAULT BITS_PER_LONG | ||
20 | |||
21 | /* | ||
22 | * The embedded_fd_set is a small fd_set, | ||
23 | * suitable for most tasks (which open <= BITS_PER_LONG files) | ||
24 | */ | ||
25 | struct embedded_fd_set { | ||
26 | unsigned long fds_bits[1]; | ||
27 | }; | ||
28 | |||
29 | struct fdtable { | ||
30 | unsigned int max_fds; | ||
31 | struct file ** fd; /* current fd array */ | ||
32 | fd_set *close_on_exec; | ||
33 | fd_set *open_fds; | ||
34 | struct rcu_head rcu; | ||
35 | struct fdtable *next; | ||
36 | }; | ||
37 | |||
38 | /* | ||
39 | * Open file table structure | ||
40 | */ | ||
41 | struct files_struct { | ||
42 | /* | ||
43 | * read mostly part | ||
44 | */ | ||
45 | atomic_t count; | ||
46 | struct fdtable *fdt; | ||
47 | struct fdtable fdtab; | ||
48 | /* | ||
49 | * written part on a separate cache line in SMP | ||
50 | */ | ||
51 | spinlock_t file_lock ____cacheline_aligned_in_smp; | ||
52 | int next_fd; | ||
53 | struct embedded_fd_set close_on_exec_init; | ||
54 | struct embedded_fd_set open_fds_init; | ||
55 | struct file * fd_array[NR_OPEN_DEFAULT]; | ||
56 | }; | ||
57 | |||
58 | #define files_fdtable(files) (rcu_dereference((files)->fdt)) | ||
59 | |||
60 | extern struct kmem_cache *filp_cachep; | ||
61 | 13 | ||
62 | extern void __fput(struct file *); | 14 | extern void __fput(struct file *); |
63 | extern void fput(struct file *); | 15 | extern void fput(struct file *); |
@@ -85,41 +37,7 @@ extern void put_filp(struct file *); | |||
85 | extern int get_unused_fd(void); | 37 | extern int get_unused_fd(void); |
86 | extern int get_unused_fd_flags(int flags); | 38 | extern int get_unused_fd_flags(int flags); |
87 | extern void put_unused_fd(unsigned int fd); | 39 | extern void put_unused_fd(unsigned int fd); |
88 | struct kmem_cache; | ||
89 | |||
90 | extern int expand_files(struct files_struct *, int nr); | ||
91 | extern void free_fdtable_rcu(struct rcu_head *rcu); | ||
92 | extern void __init files_defer_init(void); | ||
93 | |||
94 | static inline void free_fdtable(struct fdtable *fdt) | ||
95 | { | ||
96 | call_rcu(&fdt->rcu, free_fdtable_rcu); | ||
97 | } | ||
98 | |||
99 | static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd) | ||
100 | { | ||
101 | struct file * file = NULL; | ||
102 | struct fdtable *fdt = files_fdtable(files); | ||
103 | |||
104 | if (fd < fdt->max_fds) | ||
105 | file = rcu_dereference(fdt->fd[fd]); | ||
106 | return file; | ||
107 | } | ||
108 | |||
109 | /* | ||
110 | * Check whether the specified fd has an open file. | ||
111 | */ | ||
112 | #define fcheck(fd) fcheck_files(current->files, fd) | ||
113 | 40 | ||
114 | extern void fd_install(unsigned int fd, struct file *file); | 41 | extern void fd_install(unsigned int fd, struct file *file); |
115 | 42 | ||
116 | struct task_struct; | ||
117 | |||
118 | struct files_struct *get_files_struct(struct task_struct *); | ||
119 | void put_files_struct(struct files_struct *fs); | ||
120 | void reset_files_struct(struct files_struct *); | ||
121 | int unshare_files(struct files_struct **); | ||
122 | |||
123 | extern struct kmem_cache *files_cachep; | ||
124 | |||
125 | #endif /* __LINUX_FILE_H */ | 43 | #endif /* __LINUX_FILE_H */ |
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 4d10c7328d2d..6c7eff2ebada 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
@@ -13,7 +13,7 @@ struct firmware { | |||
13 | 13 | ||
14 | struct device; | 14 | struct device; |
15 | 15 | ||
16 | #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) | 16 | #if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) |
17 | int request_firmware(const struct firmware **fw, const char *name, | 17 | int request_firmware(const struct firmware **fw, const char *name, |
18 | struct device *device); | 18 | struct device *device); |
19 | int request_firmware_nowait( | 19 | int request_firmware_nowait( |
diff --git a/include/linux/fs.h b/include/linux/fs.h index a1ba005d08e7..d8e2762ed14d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -83,6 +83,7 @@ extern int dir_notify_enable; | |||
83 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) | 83 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) |
84 | #define READ_META (READ | (1 << BIO_RW_META)) | 84 | #define READ_META (READ | (1 << BIO_RW_META)) |
85 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) | 85 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) |
86 | #define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC)) | ||
86 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) | 87 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) |
87 | 88 | ||
88 | #define SEL_IN 1 | 89 | #define SEL_IN 1 |
@@ -894,8 +895,6 @@ static inline int file_check_writeable(struct file *filp) | |||
894 | typedef struct files_struct *fl_owner_t; | 895 | typedef struct files_struct *fl_owner_t; |
895 | 896 | ||
896 | struct file_lock_operations { | 897 | struct file_lock_operations { |
897 | void (*fl_insert)(struct file_lock *); /* lock insertion callback */ | ||
898 | void (*fl_remove)(struct file_lock *); /* lock removal callback */ | ||
899 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | 898 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); |
900 | void (*fl_release_private)(struct file_lock *); | 899 | void (*fl_release_private)(struct file_lock *); |
901 | }; | 900 | }; |
@@ -1289,17 +1288,12 @@ extern ssize_t vfs_readv(struct file *, const struct iovec __user *, | |||
1289 | extern ssize_t vfs_writev(struct file *, const struct iovec __user *, | 1288 | extern ssize_t vfs_writev(struct file *, const struct iovec __user *, |
1290 | unsigned long, loff_t *); | 1289 | unsigned long, loff_t *); |
1291 | 1290 | ||
1292 | /* | ||
1293 | * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called | ||
1294 | * without the big kernel lock held in all filesystems. | ||
1295 | */ | ||
1296 | struct super_operations { | 1291 | struct super_operations { |
1297 | struct inode *(*alloc_inode)(struct super_block *sb); | 1292 | struct inode *(*alloc_inode)(struct super_block *sb); |
1298 | void (*destroy_inode)(struct inode *); | 1293 | void (*destroy_inode)(struct inode *); |
1299 | 1294 | ||
1300 | void (*dirty_inode) (struct inode *); | 1295 | void (*dirty_inode) (struct inode *); |
1301 | int (*write_inode) (struct inode *, int); | 1296 | int (*write_inode) (struct inode *, int); |
1302 | void (*put_inode) (struct inode *); | ||
1303 | void (*drop_inode) (struct inode *); | 1297 | void (*drop_inode) (struct inode *); |
1304 | void (*delete_inode) (struct inode *); | 1298 | void (*delete_inode) (struct inode *); |
1305 | void (*put_super) (struct super_block *); | 1299 | void (*put_super) (struct super_block *); |
@@ -1821,7 +1815,6 @@ extern void iget_failed(struct inode *); | |||
1821 | extern void clear_inode(struct inode *); | 1815 | extern void clear_inode(struct inode *); |
1822 | extern void destroy_inode(struct inode *); | 1816 | extern void destroy_inode(struct inode *); |
1823 | extern struct inode *new_inode(struct super_block *); | 1817 | extern struct inode *new_inode(struct super_block *); |
1824 | extern int __remove_suid(struct dentry *, int); | ||
1825 | extern int should_remove_suid(struct dentry *); | 1818 | extern int should_remove_suid(struct dentry *); |
1826 | extern int remove_suid(struct dentry *); | 1819 | extern int remove_suid(struct dentry *); |
1827 | 1820 | ||
@@ -2006,7 +1999,10 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | |||
2006 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); | 1999 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); |
2007 | extern void simple_release_fs(struct vfsmount **mount, int *count); | 2000 | extern void simple_release_fs(struct vfsmount **mount, int *count); |
2008 | 2001 | ||
2009 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 2002 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
2003 | loff_t *ppos, const void *from, size_t available); | ||
2004 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | ||
2005 | const void *from, size_t available); | ||
2010 | 2006 | ||
2011 | #ifdef CONFIG_MIGRATION | 2007 | #ifdef CONFIG_MIGRATION |
2012 | extern int buffer_migrate_page(struct address_space *, | 2008 | extern int buffer_migrate_page(struct address_space *, |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 5c86f1196c3a..d48282197696 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -109,6 +109,7 @@ struct fuse_file_lock { | |||
109 | #define FUSE_POSIX_LOCKS (1 << 1) | 109 | #define FUSE_POSIX_LOCKS (1 << 1) |
110 | #define FUSE_FILE_OPS (1 << 2) | 110 | #define FUSE_FILE_OPS (1 << 2) |
111 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) | 111 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) |
112 | #define FUSE_BIG_WRITES (1 << 5) | ||
112 | 113 | ||
113 | /** | 114 | /** |
114 | * Release flags | 115 | * Release flags |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ecd2bf63fc84..ae7aec3cabee 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -178,17 +178,17 @@ static inline struct hd_struct *get_part(struct gendisk *gendiskp, | |||
178 | 178 | ||
179 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { | 179 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { |
180 | int i; | 180 | int i; |
181 | |||
181 | for_each_possible_cpu(i) | 182 | for_each_possible_cpu(i) |
182 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, | 183 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, |
183 | sizeof (struct disk_stats)); | 184 | sizeof(struct disk_stats)); |
184 | } | 185 | } |
185 | 186 | ||
186 | #define __part_stat_add(part, field, addnd) \ | 187 | #define __part_stat_add(part, field, addnd) \ |
187 | (per_cpu_ptr(part->dkstats, smp_processor_id())->field += addnd) | 188 | (per_cpu_ptr(part->dkstats, smp_processor_id())->field += addnd) |
188 | 189 | ||
189 | #define __all_stat_add(gendiskp, field, addnd, sector) \ | 190 | #define __all_stat_add(gendiskp, part, field, addnd, sector) \ |
190 | ({ \ | 191 | ({ \ |
191 | struct hd_struct *part = get_part(gendiskp, sector); \ | ||
192 | if (part) \ | 192 | if (part) \ |
193 | __part_stat_add(part, field, addnd); \ | 193 | __part_stat_add(part, field, addnd); \ |
194 | __disk_stat_add(gendiskp, field, addnd); \ | 194 | __disk_stat_add(gendiskp, field, addnd); \ |
@@ -203,11 +203,13 @@ static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { | |||
203 | res; \ | 203 | res; \ |
204 | }) | 204 | }) |
205 | 205 | ||
206 | static inline void part_stat_set_all(struct hd_struct *part, int value) { | 206 | static inline void part_stat_set_all(struct hd_struct *part, int value) |
207 | { | ||
207 | int i; | 208 | int i; |
209 | |||
208 | for_each_possible_cpu(i) | 210 | for_each_possible_cpu(i) |
209 | memset(per_cpu_ptr(part->dkstats, i), value, | 211 | memset(per_cpu_ptr(part->dkstats, i), value, |
210 | sizeof(struct disk_stats)); | 212 | sizeof(struct disk_stats)); |
211 | } | 213 | } |
212 | 214 | ||
213 | #else /* !CONFIG_SMP */ | 215 | #else /* !CONFIG_SMP */ |
@@ -223,9 +225,8 @@ static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) | |||
223 | #define __part_stat_add(part, field, addnd) \ | 225 | #define __part_stat_add(part, field, addnd) \ |
224 | (part->dkstats.field += addnd) | 226 | (part->dkstats.field += addnd) |
225 | 227 | ||
226 | #define __all_stat_add(gendiskp, field, addnd, sector) \ | 228 | #define __all_stat_add(gendiskp, part, field, addnd, sector) \ |
227 | ({ \ | 229 | ({ \ |
228 | struct hd_struct *part = get_part(gendiskp, sector); \ | ||
229 | if (part) \ | 230 | if (part) \ |
230 | part->dkstats.field += addnd; \ | 231 | part->dkstats.field += addnd; \ |
231 | __disk_stat_add(gendiskp, field, addnd); \ | 232 | __disk_stat_add(gendiskp, field, addnd); \ |
@@ -276,10 +277,10 @@ static inline void part_stat_set_all(struct hd_struct *part, int value) | |||
276 | #define part_stat_sub(gendiskp, field, subnd) \ | 277 | #define part_stat_sub(gendiskp, field, subnd) \ |
277 | part_stat_add(gendiskp, field, -subnd) | 278 | part_stat_add(gendiskp, field, -subnd) |
278 | 279 | ||
279 | #define all_stat_add(gendiskp, field, addnd, sector) \ | 280 | #define all_stat_add(gendiskp, part, field, addnd, sector) \ |
280 | do { \ | 281 | do { \ |
281 | preempt_disable(); \ | 282 | preempt_disable(); \ |
282 | __all_stat_add(gendiskp, field, addnd, sector); \ | 283 | __all_stat_add(gendiskp, part, field, addnd, sector); \ |
283 | preempt_enable(); \ | 284 | preempt_enable(); \ |
284 | } while (0) | 285 | } while (0) |
285 | 286 | ||
@@ -288,15 +289,15 @@ static inline void part_stat_set_all(struct hd_struct *part, int value) | |||
288 | #define all_stat_dec(gendiskp, field, sector) \ | 289 | #define all_stat_dec(gendiskp, field, sector) \ |
289 | all_stat_add(gendiskp, field, -1, sector) | 290 | all_stat_add(gendiskp, field, -1, sector) |
290 | 291 | ||
291 | #define __all_stat_inc(gendiskp, field, sector) \ | 292 | #define __all_stat_inc(gendiskp, part, field, sector) \ |
292 | __all_stat_add(gendiskp, field, 1, sector) | 293 | __all_stat_add(gendiskp, part, field, 1, sector) |
293 | #define all_stat_inc(gendiskp, field, sector) \ | 294 | #define all_stat_inc(gendiskp, part, field, sector) \ |
294 | all_stat_add(gendiskp, field, 1, sector) | 295 | all_stat_add(gendiskp, part, field, 1, sector) |
295 | 296 | ||
296 | #define __all_stat_sub(gendiskp, field, subnd, sector) \ | 297 | #define __all_stat_sub(gendiskp, part, field, subnd, sector) \ |
297 | __all_stat_add(gendiskp, field, -subnd, sector) | 298 | __all_stat_add(gendiskp, part, field, -subnd, sector) |
298 | #define all_stat_sub(gendiskp, field, subnd, sector) \ | 299 | #define all_stat_sub(gendiskp, part, field, subnd, sector) \ |
299 | all_stat_add(gendiskp, field, -subnd, sector) | 300 | all_stat_add(gendiskp, part, field, -subnd, sector) |
300 | 301 | ||
301 | /* Inlines to alloc and free disk stats in struct gendisk */ | 302 | /* Inlines to alloc and free disk stats in struct gendisk */ |
302 | #ifdef CONFIG_SMP | 303 | #ifdef CONFIG_SMP |
@@ -524,7 +525,7 @@ struct unixware_disklabel { | |||
524 | #define ADDPART_FLAG_RAID 1 | 525 | #define ADDPART_FLAG_RAID 1 |
525 | #define ADDPART_FLAG_WHOLEDISK 2 | 526 | #define ADDPART_FLAG_WHOLEDISK 2 |
526 | 527 | ||
527 | extern dev_t blk_lookup_devt(const char *name); | 528 | extern dev_t blk_lookup_devt(const char *name, int part); |
528 | extern char *disk_name (struct gendisk *hd, int part, char *buf); | 529 | extern char *disk_name (struct gendisk *hd, int part, char *buf); |
529 | 530 | ||
530 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 531 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
@@ -552,7 +553,7 @@ static inline struct block_device *bdget_disk(struct gendisk *disk, int index) | |||
552 | 553 | ||
553 | static inline void printk_all_partitions(void) { } | 554 | static inline void printk_all_partitions(void) { } |
554 | 555 | ||
555 | static inline dev_t blk_lookup_devt(const char *name) | 556 | static inline dev_t blk_lookup_devt(const char *name, int part) |
556 | { | 557 | { |
557 | dev_t devt = MKDEV(0, 0); | 558 | dev_t devt = MKDEV(0, 0); |
558 | return devt; | 559 | return devt; |
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 4987a84078ef..98be6c5762b9 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
@@ -8,6 +8,9 @@ | |||
8 | 8 | ||
9 | #else | 9 | #else |
10 | 10 | ||
11 | #include <linux/types.h> | ||
12 | #include <linux/errno.h> | ||
13 | |||
11 | /* | 14 | /* |
12 | * Some platforms don't support the GPIO programming interface. | 15 | * Some platforms don't support the GPIO programming interface. |
13 | * | 16 | * |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 897f723bd222..181006cc94a0 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -72,6 +72,14 @@ | |||
72 | #define in_softirq() (softirq_count()) | 72 | #define in_softirq() (softirq_count()) |
73 | #define in_interrupt() (irq_count()) | 73 | #define in_interrupt() (irq_count()) |
74 | 74 | ||
75 | #if defined(CONFIG_PREEMPT) | ||
76 | # define PREEMPT_INATOMIC_BASE kernel_locked() | ||
77 | # define PREEMPT_CHECK_OFFSET 1 | ||
78 | #else | ||
79 | # define PREEMPT_INATOMIC_BASE 0 | ||
80 | # define PREEMPT_CHECK_OFFSET 0 | ||
81 | #endif | ||
82 | |||
75 | /* | 83 | /* |
76 | * Are we running in atomic context? WARNING: this macro cannot | 84 | * Are we running in atomic context? WARNING: this macro cannot |
77 | * always detect atomic context; in particular, it cannot know about | 85 | * always detect atomic context; in particular, it cannot know about |
@@ -79,17 +87,11 @@ | |||
79 | * used in the general case to determine whether sleeping is possible. | 87 | * used in the general case to determine whether sleeping is possible. |
80 | * Do not use in_atomic() in driver code. | 88 | * Do not use in_atomic() in driver code. |
81 | */ | 89 | */ |
82 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) | 90 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_INATOMIC_BASE) |
83 | |||
84 | #ifdef CONFIG_PREEMPT | ||
85 | # define PREEMPT_CHECK_OFFSET 1 | ||
86 | #else | ||
87 | # define PREEMPT_CHECK_OFFSET 0 | ||
88 | #endif | ||
89 | 91 | ||
90 | /* | 92 | /* |
91 | * Check whether we were atomic before we did preempt_disable(): | 93 | * Check whether we were atomic before we did preempt_disable(): |
92 | * (used by the scheduler) | 94 | * (used by the scheduler, *after* releasing the kernel lock) |
93 | */ | 95 | */ |
94 | #define in_atomic_preempt_off() \ | 96 | #define in_atomic_preempt_off() \ |
95 | ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET) | 97 | ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET) |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 4ce3b7a979ba..fe56b86f2c67 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define __HID_H | 2 | #define __HID_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * $Id: hid.h,v 1.24 2001/12/27 10:37:41 vojtech Exp $ | ||
6 | * | ||
7 | * Copyright (c) 1999 Andreas Gal | 5 | * Copyright (c) 1999 Andreas Gal |
8 | * Copyright (c) 2000-2001 Vojtech Pavlik | 6 | * Copyright (c) 2000-2001 Vojtech Pavlik |
9 | * Copyright (c) 2006-2007 Jiri Kosina | 7 | * Copyright (c) 2006-2007 Jiri Kosina |
@@ -285,6 +283,7 @@ struct hid_item { | |||
285 | #define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000 | 283 | #define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000 |
286 | #define HID_QUIRK_MICROSOFT_KEYS 0x08000000 | 284 | #define HID_QUIRK_MICROSOFT_KEYS 0x08000000 |
287 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 | 285 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 |
286 | #define HID_QUIRK_APPLE_NUMLOCK_EMULATION 0x20000000 | ||
288 | 287 | ||
289 | /* | 288 | /* |
290 | * Separate quirks for runtime report descriptor fixup | 289 | * Separate quirks for runtime report descriptor fixup |
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index acbdae6d7ae1..a416b904ba90 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define _HIDDEV_H | 2 | #define _HIDDEV_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * $Id: hiddev.h,v 1.2 2001/04/26 11:26:09 vojtech Exp $ | ||
6 | * | ||
7 | * Copyright (c) 1999-2000 Vojtech Pavlik | 5 | * Copyright (c) 1999-2000 Vojtech Pavlik |
8 | * | 6 | * |
9 | * Sponsored by SuSE | 7 | * Sponsored by SuSE |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 31a4d653389f..6d93dce61cbb 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -316,6 +316,15 @@ static inline int hrtimer_is_queued(struct hrtimer *timer) | |||
316 | (HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING); | 316 | (HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING); |
317 | } | 317 | } |
318 | 318 | ||
319 | /* | ||
320 | * Helper function to check, whether the timer is running the callback | ||
321 | * function | ||
322 | */ | ||
323 | static inline int hrtimer_callback_running(struct hrtimer *timer) | ||
324 | { | ||
325 | return timer->state & HRTIMER_STATE_CALLBACK; | ||
326 | } | ||
327 | |||
319 | /* Forward a hrtimer so it expires after now: */ | 328 | /* Forward a hrtimer so it expires after now: */ |
320 | extern u64 | 329 | extern u64 |
321 | hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); | 330 | hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index cb63da5c2139..8dc730132192 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -155,8 +155,6 @@ struct i2c_driver { | |||
155 | * @driver: device's driver, hence pointer to access routines | 155 | * @driver: device's driver, hence pointer to access routines |
156 | * @dev: Driver model device node for the slave. | 156 | * @dev: Driver model device node for the slave. |
157 | * @irq: indicates the IRQ generated by this device (if any) | 157 | * @irq: indicates the IRQ generated by this device (if any) |
158 | * @driver_name: Identifies new-style driver used with this device; also | ||
159 | * used as the module name for hotplug/coldplug modprobe support. | ||
160 | * @list: list of active/busy clients (DEPRECATED) | 158 | * @list: list of active/busy clients (DEPRECATED) |
161 | * @released: used to synchronize client releases & detaches and references | 159 | * @released: used to synchronize client releases & detaches and references |
162 | * | 160 | * |
@@ -173,8 +171,7 @@ struct i2c_client { | |||
173 | struct i2c_adapter *adapter; /* the adapter we sit on */ | 171 | struct i2c_adapter *adapter; /* the adapter we sit on */ |
174 | struct i2c_driver *driver; /* and our access routines */ | 172 | struct i2c_driver *driver; /* and our access routines */ |
175 | struct device dev; /* the device structure */ | 173 | struct device dev; /* the device structure */ |
176 | int irq; /* irq issued by device (or -1) */ | 174 | int irq; /* irq issued by device */ |
177 | char driver_name[KOBJ_NAME_LEN]; | ||
178 | struct list_head list; /* DEPRECATED */ | 175 | struct list_head list; /* DEPRECATED */ |
179 | struct completion released; | 176 | struct completion released; |
180 | }; | 177 | }; |
@@ -200,8 +197,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
200 | 197 | ||
201 | /** | 198 | /** |
202 | * struct i2c_board_info - template for device creation | 199 | * struct i2c_board_info - template for device creation |
203 | * @driver_name: identifies the driver to be bound to the device | 200 | * @type: chip type, to initialize i2c_client.name |
204 | * @type: optional chip type information, to initialize i2c_client.name | ||
205 | * @flags: to initialize i2c_client.flags | 201 | * @flags: to initialize i2c_client.flags |
206 | * @addr: stored in i2c_client.addr | 202 | * @addr: stored in i2c_client.addr |
207 | * @platform_data: stored in i2c_client.dev.platform_data | 203 | * @platform_data: stored in i2c_client.dev.platform_data |
@@ -220,7 +216,6 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) | |||
220 | * with the adapter already known. | 216 | * with the adapter already known. |
221 | */ | 217 | */ |
222 | struct i2c_board_info { | 218 | struct i2c_board_info { |
223 | char driver_name[KOBJ_NAME_LEN]; | ||
224 | char type[I2C_NAME_SIZE]; | 219 | char type[I2C_NAME_SIZE]; |
225 | unsigned short flags; | 220 | unsigned short flags; |
226 | unsigned short addr; | 221 | unsigned short addr; |
@@ -262,7 +257,7 @@ i2c_new_probed_device(struct i2c_adapter *adap, | |||
262 | * client handles for the extra addresses. | 257 | * client handles for the extra addresses. |
263 | */ | 258 | */ |
264 | extern struct i2c_client * | 259 | extern struct i2c_client * |
265 | i2c_new_dummy(struct i2c_adapter *adap, u16 address, const char *type); | 260 | i2c_new_dummy(struct i2c_adapter *adap, u16 address); |
266 | 261 | ||
267 | extern void i2c_unregister_device(struct i2c_client *); | 262 | extern void i2c_unregister_device(struct i2c_client *); |
268 | 263 | ||
diff --git a/include/linux/i2c/pcf857x.h b/include/linux/i2c/pcf857x.h index ba8ea6e16476..0767a2a6b2f1 100644 --- a/include/linux/i2c/pcf857x.h +++ b/include/linux/i2c/pcf857x.h | |||
@@ -12,8 +12,7 @@ | |||
12 | * @context: optional parameter passed to setup() and teardown() | 12 | * @context: optional parameter passed to setup() and teardown() |
13 | * | 13 | * |
14 | * In addition to the I2C_BOARD_INFO() state appropriate to each chip, | 14 | * In addition to the I2C_BOARD_INFO() state appropriate to each chip, |
15 | * the i2c_board_info used with the pcf875x driver must provide the | 15 | * the i2c_board_info used with the pcf875x driver must provide its |
16 | * chip "type" ("pcf8574", "pcf8574a", "pcf8575", "pcf8575c") and its | ||
17 | * platform_data (pointer to one of these structures) with at least | 16 | * platform_data (pointer to one of these structures) with at least |
18 | * the gpio_base value initialized. | 17 | * the gpio_base value initialized. |
19 | * | 18 | * |
diff --git a/include/linux/ide.h b/include/linux/ide.h index b0135b0c3a04..eddb6daadf4a 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -153,7 +153,7 @@ enum { ide_unknown, ide_generic, ide_pci, | |||
153 | ide_qd65xx, ide_umc8672, ide_ht6560b, | 153 | ide_qd65xx, ide_umc8672, ide_ht6560b, |
154 | ide_rz1000, ide_trm290, | 154 | ide_rz1000, ide_trm290, |
155 | ide_cmd646, ide_cy82c693, ide_4drives, | 155 | ide_cmd646, ide_cy82c693, ide_4drives, |
156 | ide_pmac, ide_etrax100, ide_acorn, | 156 | ide_pmac, ide_acorn, |
157 | ide_au1xxx, ide_palm3710 | 157 | ide_au1xxx, ide_palm3710 |
158 | }; | 158 | }; |
159 | 159 | ||
@@ -189,6 +189,21 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
189 | hw->io_ports.ctl_addr = ctl_addr; | 189 | hw->io_ports.ctl_addr = ctl_addr; |
190 | } | 190 | } |
191 | 191 | ||
192 | /* for IDE PCI controllers in legacy mode, temporary */ | ||
193 | static inline int __ide_default_irq(unsigned long base) | ||
194 | { | ||
195 | switch (base) { | ||
196 | #ifdef CONFIG_IA64 | ||
197 | case 0x1f0: return isa_irq_to_vector(14); | ||
198 | case 0x170: return isa_irq_to_vector(15); | ||
199 | #else | ||
200 | case 0x1f0: return 14; | ||
201 | case 0x170: return 15; | ||
202 | #endif | ||
203 | } | ||
204 | return 0; | ||
205 | } | ||
206 | |||
192 | #include <asm/ide.h> | 207 | #include <asm/ide.h> |
193 | 208 | ||
194 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) | 209 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) |
@@ -965,7 +980,6 @@ typedef struct ide_task_s { | |||
965 | void ide_tf_dump(const char *, struct ide_taskfile *); | 980 | void ide_tf_dump(const char *, struct ide_taskfile *); |
966 | 981 | ||
967 | extern void SELECT_DRIVE(ide_drive_t *); | 982 | extern void SELECT_DRIVE(ide_drive_t *); |
968 | extern void SELECT_MASK(ide_drive_t *, int); | ||
969 | 983 | ||
970 | extern int drive_is_ready(ide_drive_t *); | 984 | extern int drive_is_ready(ide_drive_t *); |
971 | 985 | ||
@@ -1058,8 +1072,8 @@ enum { | |||
1058 | IDE_HFLAG_NO_SET_MODE = (1 << 9), | 1072 | IDE_HFLAG_NO_SET_MODE = (1 << 9), |
1059 | /* trust BIOS for programming chipset/device for DMA */ | 1073 | /* trust BIOS for programming chipset/device for DMA */ |
1060 | IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), | 1074 | IDE_HFLAG_TRUST_BIOS_FOR_DMA = (1 << 10), |
1061 | /* host uses VDMA (tied with IDE_HFLAG_CS5520 for now) */ | 1075 | /* host is CS5510/CS5520 */ |
1062 | IDE_HFLAG_VDMA = (1 << 11), | 1076 | IDE_HFLAG_CS5520 = (1 << 11), |
1063 | /* ATAPI DMA is unsupported */ | 1077 | /* ATAPI DMA is unsupported */ |
1064 | IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), | 1078 | IDE_HFLAG_NO_ATAPI_DMA = (1 << 12), |
1065 | /* set if host is a "non-bootable" controller */ | 1079 | /* set if host is a "non-bootable" controller */ |
@@ -1070,8 +1084,6 @@ enum { | |||
1070 | IDE_HFLAG_NO_AUTODMA = (1 << 15), | 1084 | IDE_HFLAG_NO_AUTODMA = (1 << 15), |
1071 | /* host uses MMIO */ | 1085 | /* host uses MMIO */ |
1072 | IDE_HFLAG_MMIO = (1 << 16), | 1086 | IDE_HFLAG_MMIO = (1 << 16), |
1073 | /* host is CS5510/CS5520 */ | ||
1074 | IDE_HFLAG_CS5520 = IDE_HFLAG_VDMA, | ||
1075 | /* no LBA48 */ | 1087 | /* no LBA48 */ |
1076 | IDE_HFLAG_NO_LBA48 = (1 << 17), | 1088 | IDE_HFLAG_NO_LBA48 = (1 << 17), |
1077 | /* no LBA48 DMA */ | 1089 | /* no LBA48 DMA */ |
@@ -1101,6 +1113,8 @@ enum { | |||
1101 | IDE_HFLAG_NO_IO_32BIT = (1 << 30), | 1113 | IDE_HFLAG_NO_IO_32BIT = (1 << 30), |
1102 | /* never unmask IRQs */ | 1114 | /* never unmask IRQs */ |
1103 | IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), | 1115 | IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), |
1116 | /* host uses VDMA (disabled for now) */ | ||
1117 | IDE_HFLAG_VDMA = 0, | ||
1104 | }; | 1118 | }; |
1105 | 1119 | ||
1106 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1120 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 529f301d9372..0b5e03eae6d2 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -113,7 +113,7 @@ struct ieee80211_hdr { | |||
113 | struct ieee80211s_hdr { | 113 | struct ieee80211s_hdr { |
114 | u8 flags; | 114 | u8 flags; |
115 | u8 ttl; | 115 | u8 ttl; |
116 | u8 seqnum[3]; | 116 | __le32 seqnum; |
117 | u8 eaddr1[6]; | 117 | u8 eaddr1[6]; |
118 | u8 eaddr2[6]; | 118 | u8 eaddr2[6]; |
119 | u8 eaddr3[6]; | 119 | u8 eaddr3[6]; |
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 58e43e566457..950e13d09e06 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
@@ -97,7 +97,9 @@ struct __fdb_entry | |||
97 | __u8 port_no; | 97 | __u8 port_no; |
98 | __u8 is_local; | 98 | __u8 is_local; |
99 | __u32 ageing_timer_value; | 99 | __u32 ageing_timer_value; |
100 | __u32 unused; | 100 | __u8 port_hi; |
101 | __u8 pad0; | ||
102 | __u16 unused; | ||
101 | }; | 103 | }; |
102 | 104 | ||
103 | #ifdef __KERNEL__ | 105 | #ifdef __KERNEL__ |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index f1fbe9c930d7..d4efe4014705 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -41,7 +41,7 @@ struct ip_tunnel_prl { | |||
41 | __u16 __reserved; | 41 | __u16 __reserved; |
42 | __u32 datalen; | 42 | __u32 datalen; |
43 | __u32 __reserved2; | 43 | __u32 __reserved2; |
44 | void __user *data; | 44 | /* data follows */ |
45 | }; | 45 | }; |
46 | 46 | ||
47 | /* PRL flags */ | 47 | /* PRL flags */ |
diff --git a/include/linux/in_route.h b/include/linux/in_route.h index 61f25c30a2a0..b261b8c915f0 100644 --- a/include/linux/in_route.h +++ b/include/linux/in_route.h | |||
@@ -10,19 +10,19 @@ | |||
10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC | 10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC |
11 | 11 | ||
12 | #define RTCF_NOTIFY 0x00010000 | 12 | #define RTCF_NOTIFY 0x00010000 |
13 | #define RTCF_DIRECTDST 0x00020000 | 13 | #define RTCF_DIRECTDST 0x00020000 /* unused */ |
14 | #define RTCF_REDIRECTED 0x00040000 | 14 | #define RTCF_REDIRECTED 0x00040000 |
15 | #define RTCF_TPROXY 0x00080000 | 15 | #define RTCF_TPROXY 0x00080000 /* unused */ |
16 | 16 | ||
17 | #define RTCF_FAST 0x00200000 | 17 | #define RTCF_FAST 0x00200000 /* unused */ |
18 | #define RTCF_MASQ 0x00400000 | 18 | #define RTCF_MASQ 0x00400000 /* unused */ |
19 | #define RTCF_SNAT 0x00800000 | 19 | #define RTCF_SNAT 0x00800000 /* unused */ |
20 | #define RTCF_DOREDIRECT 0x01000000 | 20 | #define RTCF_DOREDIRECT 0x01000000 |
21 | #define RTCF_DIRECTSRC 0x04000000 | 21 | #define RTCF_DIRECTSRC 0x04000000 |
22 | #define RTCF_DNAT 0x08000000 | 22 | #define RTCF_DNAT 0x08000000 |
23 | #define RTCF_BROADCAST 0x10000000 | 23 | #define RTCF_BROADCAST 0x10000000 |
24 | #define RTCF_MULTICAST 0x20000000 | 24 | #define RTCF_MULTICAST 0x20000000 |
25 | #define RTCF_REJECT 0x40000000 | 25 | #define RTCF_REJECT 0x40000000 /* unused */ |
26 | #define RTCF_LOCAL 0x80000000 | 26 | #define RTCF_LOCAL 0x80000000 |
27 | 27 | ||
28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) | 28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) |
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h index 80335b7d77c5..c4335faebb63 100644 --- a/include/linux/inet_lro.h +++ b/include/linux/inet_lro.h | |||
@@ -84,7 +84,11 @@ struct net_lro_mgr { | |||
84 | from received packets and eth protocol | 84 | from received packets and eth protocol |
85 | is still ETH_P_8021Q */ | 85 | is still ETH_P_8021Q */ |
86 | 86 | ||
87 | u32 ip_summed; /* Set in non generated SKBs in page mode */ | 87 | /* |
88 | * Set for generated SKBs that are not added to | ||
89 | * the frag list in fragmented mode | ||
90 | */ | ||
91 | u32 ip_summed; | ||
88 | u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY | 92 | u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY |
89 | * or CHECKSUM_NONE */ | 93 | * or CHECKSUM_NONE */ |
90 | 94 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 7009b0cdd06f..c6f51ad52d5b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -117,7 +117,6 @@ struct in_ifaddr | |||
117 | __be32 ifa_address; | 117 | __be32 ifa_address; |
118 | __be32 ifa_mask; | 118 | __be32 ifa_mask; |
119 | __be32 ifa_broadcast; | 119 | __be32 ifa_broadcast; |
120 | __be32 ifa_anycast; | ||
121 | unsigned char ifa_scope; | 120 | unsigned char ifa_scope; |
122 | unsigned char ifa_flags; | 121 | unsigned char ifa_flags; |
123 | unsigned char ifa_prefixlen; | 122 | unsigned char ifa_prefixlen; |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index bf6b8a61f8db..9927a88674a3 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX__INIT_TASK_H | 1 | #ifndef _LINUX__INIT_TASK_H |
2 | #define _LINUX__INIT_TASK_H | 2 | #define _LINUX__INIT_TASK_H |
3 | 3 | ||
4 | #include <linux/file.h> | ||
5 | #include <linux/rcupdate.h> | 4 | #include <linux/rcupdate.h> |
6 | #include <linux/irqflags.h> | 5 | #include <linux/irqflags.h> |
7 | #include <linux/utsname.h> | 6 | #include <linux/utsname.h> |
@@ -12,27 +11,7 @@ | |||
12 | #include <linux/securebits.h> | 11 | #include <linux/securebits.h> |
13 | #include <net/net_namespace.h> | 12 | #include <net/net_namespace.h> |
14 | 13 | ||
15 | #define INIT_FDTABLE \ | 14 | extern struct files_struct init_files; |
16 | { \ | ||
17 | .max_fds = NR_OPEN_DEFAULT, \ | ||
18 | .fd = &init_files.fd_array[0], \ | ||
19 | .close_on_exec = (fd_set *)&init_files.close_on_exec_init, \ | ||
20 | .open_fds = (fd_set *)&init_files.open_fds_init, \ | ||
21 | .rcu = RCU_HEAD_INIT, \ | ||
22 | .next = NULL, \ | ||
23 | } | ||
24 | |||
25 | #define INIT_FILES \ | ||
26 | { \ | ||
27 | .count = ATOMIC_INIT(1), \ | ||
28 | .fdt = &init_files.fdtab, \ | ||
29 | .fdtab = INIT_FDTABLE, \ | ||
30 | .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), \ | ||
31 | .next_fd = 0, \ | ||
32 | .close_on_exec_init = { { 0, } }, \ | ||
33 | .open_fds_init = { { 0, } }, \ | ||
34 | .fd_array = { NULL, } \ | ||
35 | } | ||
36 | 15 | ||
37 | #define INIT_KIOCTX(name, which_mm) \ | 16 | #define INIT_KIOCTX(name, which_mm) \ |
38 | { \ | 17 | { \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 28a094fcfe20..d150c57e5f0a 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -534,8 +534,8 @@ struct input_absinfo { | |||
534 | 534 | ||
535 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ | 535 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ |
536 | #define KEY_FRAMEFORWARD 0x1b5 | 536 | #define KEY_FRAMEFORWARD 0x1b5 |
537 | |||
538 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 537 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
538 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | ||
539 | 539 | ||
540 | #define KEY_DEL_EOL 0x1c0 | 540 | #define KEY_DEL_EOL 0x1c0 |
541 | #define KEY_DEL_EOS 0x1c1 | 541 | #define KEY_DEL_EOS 0x1c1 |
@@ -637,7 +637,9 @@ struct input_absinfo { | |||
637 | #define SW_LID 0x00 /* set = lid shut */ | 637 | #define SW_LID 0x00 /* set = lid shut */ |
638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ | 638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ | 639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
640 | #define SW_RADIO 0x03 /* set = radio enabled */ | 640 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
641 | set = radio enabled */ | ||
642 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | ||
641 | #define SW_MAX 0x0f | 643 | #define SW_MAX 0x0f |
642 | #define SW_CNT (SW_MAX+1) | 644 | #define SW_CNT (SW_MAX+1) |
643 | 645 | ||
diff --git a/include/linux/io.h b/include/linux/io.h index 3a03a3604cce..6c7f0ba0d5fa 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -65,5 +65,6 @@ void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, | |||
65 | void devm_iounmap(struct device *dev, void __iomem *addr); | 65 | void devm_iounmap(struct device *dev, void __iomem *addr); |
66 | int check_signature(const volatile void __iomem *io_addr, | 66 | int check_signature(const volatile void __iomem *io_addr, |
67 | const unsigned char *signature, int length); | 67 | const unsigned char *signature, int length); |
68 | void devm_ioremap_release(struct device *dev, void *res); | ||
68 | 69 | ||
69 | #endif /* _LINUX_IO_H */ | 70 | #endif /* _LINUX_IO_H */ |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d5d40a9f7929..c6801bffe76d 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -53,14 +53,14 @@ struct resource_list { | |||
53 | #define IORESOURCE_AUTO 0x40000000 | 53 | #define IORESOURCE_AUTO 0x40000000 |
54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ | 54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ |
55 | 55 | ||
56 | /* ISA PnP IRQ specific bits (IORESOURCE_BITS) */ | 56 | /* PnP IRQ specific bits (IORESOURCE_BITS) */ |
57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) | 57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) |
58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) | 58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) |
59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) | 59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) |
60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) | 60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) |
61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) | 61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) |
62 | 62 | ||
63 | /* ISA PnP DMA specific bits (IORESOURCE_BITS) */ | 63 | /* PnP DMA specific bits (IORESOURCE_BITS) */ |
64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) | 64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) |
65 | #define IORESOURCE_DMA_8BIT (0<<0) | 65 | #define IORESOURCE_DMA_8BIT (0<<0) |
66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) | 66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) |
@@ -76,7 +76,7 @@ struct resource_list { | |||
76 | #define IORESOURCE_DMA_TYPEB (2<<6) | 76 | #define IORESOURCE_DMA_TYPEB (2<<6) |
77 | #define IORESOURCE_DMA_TYPEF (3<<6) | 77 | #define IORESOURCE_DMA_TYPEF (3<<6) |
78 | 78 | ||
79 | /* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */ | 79 | /* PnP memory I/O specific bits (IORESOURCE_BITS) */ |
80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ | 80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ |
81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ | 81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ |
82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ | 82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ |
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 2a3bb1bb7433..f98a656b17e5 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h | |||
@@ -68,6 +68,20 @@ static inline int task_nice_ioprio(struct task_struct *task) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * This is for the case where the task hasn't asked for a specific IO class. | ||
72 | * Check for idle and rt task process, and return appropriate IO class. | ||
73 | */ | ||
74 | static inline int task_nice_ioclass(struct task_struct *task) | ||
75 | { | ||
76 | if (task->policy == SCHED_IDLE) | ||
77 | return IOPRIO_CLASS_IDLE; | ||
78 | else if (task->policy == SCHED_FIFO || task->policy == SCHED_RR) | ||
79 | return IOPRIO_CLASS_RT; | ||
80 | else | ||
81 | return IOPRIO_CLASS_BE; | ||
82 | } | ||
83 | |||
84 | /* | ||
71 | * For inheritance, return the highest of the two given priorities | 85 | * For inheritance, return the highest of the two given priorities |
72 | */ | 86 | */ |
73 | extern int ioprio_best(unsigned short aprio, unsigned short bprio); | 87 | extern int ioprio_best(unsigned short aprio, unsigned short bprio); |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 10b666b61add..cde056e08181 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op | |||
396 | { | 396 | { |
397 | struct request_sock *req = reqsk_alloc(ops); | 397 | struct request_sock *req = reqsk_alloc(ops); |
398 | 398 | ||
399 | if (req != NULL) | 399 | if (req != NULL) { |
400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); | 400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); |
401 | inet6_rsk(req)->pktopts = NULL; | ||
402 | } | ||
401 | 403 | ||
402 | return req; | 404 | return req; |
403 | } | 405 | } |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1883a85625dd..552e0ec269c9 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -61,6 +61,7 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
61 | #define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */ | 61 | #define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */ |
62 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ | 62 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ |
63 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ | 63 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ |
64 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ | ||
64 | 65 | ||
65 | #ifdef CONFIG_IRQ_PER_CPU | 66 | #ifdef CONFIG_IRQ_PER_CPU |
66 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 67 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 05e2b307161a..d147f0f90360 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -919,6 +919,9 @@ struct journal_s | |||
919 | struct proc_dir_entry *j_proc_entry; | 919 | struct proc_dir_entry *j_proc_entry; |
920 | struct transaction_stats_s j_stats; | 920 | struct transaction_stats_s j_stats; |
921 | 921 | ||
922 | /* Failed journal commit ID */ | ||
923 | unsigned int j_failed_commit; | ||
924 | |||
922 | /* | 925 | /* |
923 | * An opaque pointer to fs-private information. ext3 puts its | 926 | * An opaque pointer to fs-private information. ext3 puts its |
924 | * superblock pointer here | 927 | * superblock pointer here |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 82de2fb62cb7..00c1801099fa 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -83,16 +83,6 @@ __attribute__((format(printf,1,2))); | |||
83 | static inline void __check_printsym_format(const char *fmt, ...) | 83 | static inline void __check_printsym_format(const char *fmt, ...) |
84 | { | 84 | { |
85 | } | 85 | } |
86 | /* ia64 and ppc64 use function descriptors, which contain the real address */ | ||
87 | #if defined(CONFIG_IA64) || defined(CONFIG_PPC64) | ||
88 | #define print_fn_descriptor_symbol(fmt, addr) \ | ||
89 | do { \ | ||
90 | unsigned long *__faddr = (unsigned long*) addr; \ | ||
91 | print_symbol(fmt, __faddr[0]); \ | ||
92 | } while (0) | ||
93 | #else | ||
94 | #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr) | ||
95 | #endif | ||
96 | 86 | ||
97 | static inline void print_symbol(const char *fmt, unsigned long addr) | 87 | static inline void print_symbol(const char *fmt, unsigned long addr) |
98 | { | 88 | { |
@@ -101,6 +91,20 @@ static inline void print_symbol(const char *fmt, unsigned long addr) | |||
101 | __builtin_extract_return_addr((void *)addr)); | 91 | __builtin_extract_return_addr((void *)addr)); |
102 | } | 92 | } |
103 | 93 | ||
94 | /* | ||
95 | * Pretty-print a function pointer. | ||
96 | * | ||
97 | * ia64 and ppc64 function pointers are really function descriptors, | ||
98 | * which contain a pointer the real address. | ||
99 | */ | ||
100 | static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) | ||
101 | { | ||
102 | #if defined(CONFIG_IA64) || defined(CONFIG_PPC64) | ||
103 | addr = *(void **)addr; | ||
104 | #endif | ||
105 | print_symbol(fmt, (unsigned long)addr); | ||
106 | } | ||
107 | |||
104 | #ifndef CONFIG_64BIT | 108 | #ifndef CONFIG_64BIT |
105 | #define print_ip_sym(ip) \ | 109 | #define print_ip_sym(ip) \ |
106 | do { \ | 110 | do { \ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 4d46e299afb5..2e70006c7fa8 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -46,6 +46,9 @@ extern const char linux_proc_banner[]; | |||
46 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 46 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
47 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 47 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
48 | 48 | ||
49 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) | ||
50 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
51 | |||
49 | #ifdef CONFIG_LBD | 52 | #ifdef CONFIG_LBD |
50 | # include <asm/div64.h> | 53 | # include <asm/div64.h> |
51 | # define sector_div(a, b) do_div(a, b) | 54 | # define sector_div(a, b) do_div(a, b) |
@@ -276,7 +279,17 @@ extern void print_hex_dump(const char *level, const char *prefix_str, | |||
276 | const void *buf, size_t len, bool ascii); | 279 | const void *buf, size_t len, bool ascii); |
277 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | 280 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, |
278 | const void *buf, size_t len); | 281 | const void *buf, size_t len); |
279 | #define hex_asc(x) "0123456789abcdef"[x] | 282 | |
283 | extern const char hex_asc[]; | ||
284 | #define hex_asc_lo(x) hex_asc[((x) & 0x0f)] | ||
285 | #define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] | ||
286 | |||
287 | static inline char *pack_hex_byte(char *buf, u8 byte) | ||
288 | { | ||
289 | *buf++ = hex_asc_hi(byte); | ||
290 | *buf++ = hex_asc_lo(byte); | ||
291 | return buf; | ||
292 | } | ||
280 | 293 | ||
281 | #define pr_emerg(fmt, arg...) \ | 294 | #define pr_emerg(fmt, arg...) \ |
282 | printk(KERN_EMERG fmt, ##arg) | 295 | printk(KERN_EMERG fmt, ##arg) |
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 9757b1a6d9dc..6adcc297e354 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -261,10 +261,12 @@ struct kgdb_io { | |||
261 | 261 | ||
262 | extern struct kgdb_arch arch_kgdb_ops; | 262 | extern struct kgdb_arch arch_kgdb_ops; |
263 | 263 | ||
264 | extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); | ||
265 | |||
264 | extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); | 266 | extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); |
265 | extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); | 267 | extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); |
266 | 268 | ||
267 | extern int kgdb_hex2long(char **ptr, long *long_val); | 269 | extern int kgdb_hex2long(char **ptr, unsigned long *long_val); |
268 | extern int kgdb_mem2hex(char *mem, char *buf, int count); | 270 | extern int kgdb_mem2hex(char *mem, char *buf, int count); |
269 | extern int kgdb_hex2mem(char *buf, char *mem, int count); | 271 | extern int kgdb_hex2mem(char *buf, char *mem, int count); |
270 | 272 | ||
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h index a2c54acceb4e..cb311798e0bc 100644 --- a/include/linux/ks0108.h +++ b/include/linux/ks0108.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Description: ks0108 LCD Controller driver header | 4 | * Description: ks0108 LCD Controller driver header |
5 | * License: GPLv2 | 5 | * License: GPLv2 |
6 | * | 6 | * |
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | 7 | * Author: Copyright (C) Miguel Ojeda Sandonis |
8 | * Date: 2006-10-31 | 8 | * Date: 2006-10-31 |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 398978972b7a..de9d1df4bba2 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #define KVM_REQ_REPORT_TPR_ACCESS 2 | 33 | #define KVM_REQ_REPORT_TPR_ACCESS 2 |
34 | #define KVM_REQ_MMU_RELOAD 3 | 34 | #define KVM_REQ_MMU_RELOAD 3 |
35 | #define KVM_REQ_TRIPLE_FAULT 4 | 35 | #define KVM_REQ_TRIPLE_FAULT 4 |
36 | #define KVM_REQ_PENDING_TIMER 5 | ||
36 | 37 | ||
37 | struct kvm_vcpu; | 38 | struct kvm_vcpu; |
38 | extern struct kmem_cache *kvm_vcpu_cache; | 39 | extern struct kmem_cache *kvm_vcpu_cache; |
@@ -297,7 +298,7 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn) | |||
297 | return (gpa_t)gfn << PAGE_SHIFT; | 298 | return (gpa_t)gfn << PAGE_SHIFT; |
298 | } | 299 | } |
299 | 300 | ||
300 | static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) | 301 | static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) |
301 | { | 302 | { |
302 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); | 303 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); |
303 | } | 304 | } |
diff --git a/include/linux/libata.h b/include/linux/libata.h index d1dfe872ee30..e57e5d08312d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -111,13 +111,10 @@ enum { | |||
111 | /* various global constants */ | 111 | /* various global constants */ |
112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, | 112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, |
113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ | 113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ |
114 | ATA_MAX_PORTS = 8, | ||
115 | ATA_DEF_QUEUE = 1, | 114 | ATA_DEF_QUEUE = 1, |
116 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 115 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
117 | ATA_MAX_QUEUE = 32, | 116 | ATA_MAX_QUEUE = 32, |
118 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 117 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
119 | ATA_MAX_BUS = 2, | ||
120 | ATA_DEF_BUSY_WAIT = 10000, | ||
121 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 118 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
122 | 119 | ||
123 | ATAPI_MAX_DRAIN = 16 << 10, | 120 | ATAPI_MAX_DRAIN = 16 << 10, |
@@ -341,7 +338,7 @@ enum { | |||
341 | ATA_EH_PMP_TRIES = 5, | 338 | ATA_EH_PMP_TRIES = 5, |
342 | ATA_EH_PMP_LINK_TRIES = 3, | 339 | ATA_EH_PMP_LINK_TRIES = 3, |
343 | 340 | ||
344 | SATA_PMP_SCR_TIMEOUT = 250, | 341 | SATA_PMP_RW_TIMEOUT = 3000, /* PMP read/write timeout */ |
345 | 342 | ||
346 | /* Horkage types. May be set by libata or controller on drives | 343 | /* Horkage types. May be set by libata or controller on drives |
347 | (some horkage may be drive/controller pair dependant */ | 344 | (some horkage may be drive/controller pair dependant */ |
@@ -351,7 +348,7 @@ enum { | |||
351 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ | 348 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ |
352 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ | 349 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ |
353 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ | 350 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ |
354 | ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ | 351 | ATA_HORKAGE_DISABLE = (1 << 5), /* Disable it */ |
355 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ | 352 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ |
356 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | 353 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ |
357 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | 354 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ |
@@ -821,8 +818,6 @@ struct ata_timing { | |||
821 | unsigned short udma; /* t2CYCTYP/2 */ | 818 | unsigned short udma; /* t2CYCTYP/2 */ |
822 | }; | 819 | }; |
823 | 820 | ||
824 | #define FIT(v, vmin, vmax) max_t(short, min_t(short, v, vmax), vmin) | ||
825 | |||
826 | /* | 821 | /* |
827 | * Core layer - drivers/ata/libata-core.c | 822 | * Core layer - drivers/ata/libata-core.c |
828 | */ | 823 | */ |
@@ -1039,6 +1034,7 @@ extern void ata_eh_thaw_port(struct ata_port *ap); | |||
1039 | 1034 | ||
1040 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 1035 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
1041 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 1036 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
1037 | extern void ata_eh_analyze_ncq_error(struct ata_link *link); | ||
1042 | 1038 | ||
1043 | extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | 1039 | extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, |
1044 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 1040 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
@@ -1381,6 +1377,18 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | |||
1381 | return *(struct ata_port **)&host->hostdata[0]; | 1377 | return *(struct ata_port **)&host->hostdata[0]; |
1382 | } | 1378 | } |
1383 | 1379 | ||
1380 | static inline int ata_check_ready(u8 status) | ||
1381 | { | ||
1382 | if (!(status & ATA_BUSY)) | ||
1383 | return 1; | ||
1384 | |||
1385 | /* 0xff indicates either no device or device not ready */ | ||
1386 | if (status == 0xff) | ||
1387 | return -ENODEV; | ||
1388 | |||
1389 | return 0; | ||
1390 | } | ||
1391 | |||
1384 | 1392 | ||
1385 | /************************************************************************** | 1393 | /************************************************************************** |
1386 | * PMP - drivers/ata/libata-pmp.c | 1394 | * PMP - drivers/ata/libata-pmp.c |
@@ -1424,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); | |||
1424 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); | 1432 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); |
1425 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1433 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1426 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1434 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1427 | extern u8 ata_sff_altstatus(struct ata_port *ap); | 1435 | extern void ata_sff_pause(struct ata_port *ap); |
1436 | extern void ata_sff_dma_pause(struct ata_port *ap); | ||
1428 | extern int ata_sff_busy_sleep(struct ata_port *ap, | 1437 | extern int ata_sff_busy_sleep(struct ata_port *ap, |
1429 | unsigned long timeout_pat, unsigned long timeout); | 1438 | unsigned long timeout_pat, unsigned long timeout); |
1430 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); | 1439 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); |
@@ -1485,19 +1494,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1485 | #endif /* CONFIG_PCI */ | 1494 | #endif /* CONFIG_PCI */ |
1486 | 1495 | ||
1487 | /** | 1496 | /** |
1488 | * ata_sff_pause - Flush writes and pause 400 nanoseconds. | ||
1489 | * @ap: Port to wait for. | ||
1490 | * | ||
1491 | * LOCKING: | ||
1492 | * Inherited from caller. | ||
1493 | */ | ||
1494 | static inline void ata_sff_pause(struct ata_port *ap) | ||
1495 | { | ||
1496 | ata_sff_altstatus(ap); | ||
1497 | ndelay(400); | ||
1498 | } | ||
1499 | |||
1500 | /** | ||
1501 | * ata_sff_busy_wait - Wait for a port status register | 1497 | * ata_sff_busy_wait - Wait for a port status register |
1502 | * @ap: Port to wait for. | 1498 | * @ap: Port to wait for. |
1503 | * @bits: bits that must be clear | 1499 | * @bits: bits that must be clear |
diff --git a/include/linux/math64.h b/include/linux/math64.h index c1a5f81501ff..c87f1528703a 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
@@ -81,4 +81,25 @@ static inline s64 div_s64(s64 dividend, s32 divisor) | |||
81 | } | 81 | } |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder); | ||
85 | |||
86 | static __always_inline u32 | ||
87 | __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) | ||
88 | { | ||
89 | u32 ret = 0; | ||
90 | |||
91 | while (dividend >= divisor) { | ||
92 | /* The following asm() prevents the compiler from | ||
93 | optimising this loop into a modulo operation. */ | ||
94 | asm("" : "+rm"(dividend)); | ||
95 | |||
96 | dividend -= divisor; | ||
97 | ret++; | ||
98 | } | ||
99 | |||
100 | *remainder = dividend; | ||
101 | |||
102 | return ret; | ||
103 | } | ||
104 | |||
84 | #endif /* _LINUX_MATH64_H */ | 105 | #endif /* _LINUX_MATH64_H */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 73e358612eaf..ea9f5ad9ec8e 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -77,14 +77,6 @@ extern int __add_pages(struct zone *zone, unsigned long start_pfn, | |||
77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | 77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, |
78 | unsigned long nr_pages); | 78 | unsigned long nr_pages); |
79 | 79 | ||
80 | /* | ||
81 | * Walk through all memory which is registered as resource. | ||
82 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
83 | */ | ||
84 | extern int walk_memory_resource(unsigned long start_pfn, | ||
85 | unsigned long nr_pages, void *arg, | ||
86 | int (*func)(unsigned long, unsigned long, void *)); | ||
87 | |||
88 | #ifdef CONFIG_NUMA | 80 | #ifdef CONFIG_NUMA |
89 | extern int memory_add_physaddr_to_nid(u64 start); | 81 | extern int memory_add_physaddr_to_nid(u64 start); |
90 | #else | 82 | #else |
@@ -199,6 +191,14 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
199 | 191 | ||
200 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 192 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
201 | 193 | ||
194 | /* | ||
195 | * Walk through all memory which is registered as resource. | ||
196 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
197 | */ | ||
198 | extern int walk_memory_resource(unsigned long start_pfn, | ||
199 | unsigned long nr_pages, void *arg, | ||
200 | int (*func)(unsigned long, unsigned long, void *)); | ||
201 | |||
202 | extern int add_memory(int nid, u64 start, u64 size); | 202 | extern int add_memory(int nid, u64 start, u64 size); |
203 | extern int arch_add_memory(int nid, u64 start, u64 size); | 203 | extern int arch_add_memory(int nid, u64 start, u64 size); |
204 | extern int remove_memory(u64 start, u64 size); | 204 | extern int remove_memory(u64 start, u64 size); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index c31a9cd2a30e..586a943cab01 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb, | |||
760 | * (see walk_page_range for more details) | 760 | * (see walk_page_range for more details) |
761 | */ | 761 | */ |
762 | struct mm_walk { | 762 | struct mm_walk { |
763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); | 763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *); |
764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); | 764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *); |
765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); | 765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); | 766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
767 | int (*pte_hole)(unsigned long, unsigned long, void *); | 767 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
768 | struct mm_struct *mm; | ||
769 | void *private; | ||
768 | }; | 770 | }; |
769 | 771 | ||
770 | int walk_page_range(const struct mm_struct *, unsigned long addr, | 772 | int walk_page_range(unsigned long addr, unsigned long end, |
771 | unsigned long end, const struct mm_walk *walk, | 773 | struct mm_walk *walk); |
772 | void *private); | ||
773 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 774 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, |
774 | unsigned long end, unsigned long floor, unsigned long ceiling); | 775 | unsigned long end, unsigned long floor, unsigned long ceiling); |
775 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, | 776 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index eb7c16cc9559..02a27ae78539 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -226,8 +226,17 @@ struct mm_struct { | |||
226 | rwlock_t ioctx_list_lock; /* aio lock */ | 226 | rwlock_t ioctx_list_lock; /* aio lock */ |
227 | struct kioctx *ioctx_list; | 227 | struct kioctx *ioctx_list; |
228 | #ifdef CONFIG_MM_OWNER | 228 | #ifdef CONFIG_MM_OWNER |
229 | struct task_struct *owner; /* The thread group leader that */ | 229 | /* |
230 | /* owns the mm_struct. */ | 230 | * "owner" points to a task that is regarded as the canonical |
231 | * user/owner of this mm. All of the following must be true in | ||
232 | * order for it to be changed: | ||
233 | * | ||
234 | * current == mm->owner | ||
235 | * current->mm != mm | ||
236 | * new_owner->mm == mm | ||
237 | * new_owner->alloc_lock is held | ||
238 | */ | ||
239 | struct task_struct *owner; | ||
231 | #endif | 240 | #endif |
232 | 241 | ||
233 | #ifdef CONFIG_PROC_FS | 242 | #ifdef CONFIG_PROC_FS |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 87920a0852a3..dab8892e6ff1 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -17,14 +17,14 @@ | |||
17 | 17 | ||
18 | extern int sysctl_overcommit_memory; | 18 | extern int sysctl_overcommit_memory; |
19 | extern int sysctl_overcommit_ratio; | 19 | extern int sysctl_overcommit_ratio; |
20 | extern atomic_t vm_committed_space; | 20 | extern atomic_long_t vm_committed_space; |
21 | 21 | ||
22 | #ifdef CONFIG_SMP | 22 | #ifdef CONFIG_SMP |
23 | extern void vm_acct_memory(long pages); | 23 | extern void vm_acct_memory(long pages); |
24 | #else | 24 | #else |
25 | static inline void vm_acct_memory(long pages) | 25 | static inline void vm_acct_memory(long pages) |
26 | { | 26 | { |
27 | atomic_add(pages, &vm_committed_space); | 27 | atomic_long_add(pages, &vm_committed_space); |
28 | } | 28 | } |
29 | #endif | 29 | #endif |
30 | 30 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c463cd8a15a4..443bc7cd8c62 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -703,7 +703,7 @@ extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); | |||
703 | extern struct zone *next_zone(struct zone *zone); | 703 | extern struct zone *next_zone(struct zone *zone); |
704 | 704 | ||
705 | /** | 705 | /** |
706 | * for_each_pgdat - helper macro to iterate over all nodes | 706 | * for_each_online_pgdat - helper macro to iterate over all online nodes |
707 | * @pgdat - pointer to a pg_data_t variable | 707 | * @pgdat - pointer to a pg_data_t variable |
708 | */ | 708 | */ |
709 | #define for_each_online_pgdat(pgdat) \ | 709 | #define for_each_online_pgdat(pgdat) \ |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index d73eceaa7afb..69b2342d5ebb 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -375,7 +375,8 @@ struct virtio_device_id { | |||
375 | 375 | ||
376 | struct i2c_device_id { | 376 | struct i2c_device_id { |
377 | char name[I2C_NAME_SIZE]; | 377 | char name[I2C_NAME_SIZE]; |
378 | kernel_ulong_t driver_data; /* Data private to the driver */ | 378 | kernel_ulong_t driver_data /* Data private to the driver */ |
379 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
379 | }; | 380 | }; |
380 | 381 | ||
381 | 382 | ||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index b03b27457413..81cd36b735b0 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -57,12 +57,6 @@ | |||
57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ | 57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ |
58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ | 58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ |
59 | 59 | ||
60 | /* media of boot sector */ | ||
61 | static inline int fat_valid_media(u8 media) | ||
62 | { | ||
63 | return 0xf8 <= media || media == 0xf0; | ||
64 | } | ||
65 | |||
66 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ | 60 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ |
67 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) | 61 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) |
68 | 62 | ||
@@ -334,6 +328,12 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | |||
334 | #endif | 328 | #endif |
335 | } | 329 | } |
336 | 330 | ||
331 | /* media of boot sector */ | ||
332 | static inline int fat_valid_media(u8 media) | ||
333 | { | ||
334 | return 0xf8 <= media || media == 0xf0; | ||
335 | } | ||
336 | |||
337 | /* fat/cache.c */ | 337 | /* fat/cache.c */ |
338 | extern void fat_cache_inval_inode(struct inode *inode); | 338 | extern void fat_cache_inval_inode(struct inode *inode); |
339 | extern int fat_get_cluster(struct inode *inode, int cluster, | 339 | extern int fat_get_cluster(struct inode *inode, int cluster, |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 6f3b8e79a991..56abf1558fdd 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -64,11 +64,11 @@ struct msginfo { | |||
64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ | 64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ |
65 | 65 | ||
66 | /* unused */ | 66 | /* unused */ |
67 | #define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */ | 67 | #define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */ |
68 | #define MSGTQL MSGMNB /* number of system message headers */ | 68 | #define MSGTQL MSGMNB /* number of system message headers */ |
69 | #define MSGMAP MSGMNB /* number of entries in message map */ | 69 | #define MSGMAP MSGMNB /* number of entries in message map */ |
70 | #define MSGSSZ 16 /* message segment size */ | 70 | #define MSGSSZ 16 /* message segment size */ |
71 | #define __MSGSEG (MSGPOOL / MSGSSZ) /* max no. of segments */ | 71 | #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */ |
72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) | 72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) |
73 | 73 | ||
74 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1288be7b7740..863e22a0ddb5 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/mtd/nand.h | 2 | * linux/include/linux/mtd/nand.h |
3 | * | 3 | * |
4 | * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com> | 4 | * Copyright (c) 2000 David Woodhouse <dwmw2@infradead.org> |
5 | * Steven J. Hill <sjhill@realitydiluted.com> | 5 | * Steven J. Hill <sjhill@realitydiluted.com> |
6 | * Thomas Gleixner <tglx@linutronix.de> | 6 | * Thomas Gleixner <tglx@linutronix.de> |
7 | * | 7 | * |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 30e11aa3c1c9..a15cdd4a8e58 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
@@ -1,19 +1,31 @@ | |||
1 | /* | 1 | /* |
2 | * MV-643XX ethernet platform device data definition file. | 2 | * MV-643XX ethernet platform device data definition file. |
3 | */ | 3 | */ |
4 | |||
4 | #ifndef __LINUX_MV643XX_ETH_H | 5 | #ifndef __LINUX_MV643XX_ETH_H |
5 | #define __LINUX_MV643XX_ETH_H | 6 | #define __LINUX_MV643XX_ETH_H |
6 | 7 | ||
7 | #define MV643XX_ETH_SHARED_NAME "mv643xx_eth_shared" | 8 | #include <linux/mbus.h> |
8 | #define MV643XX_ETH_NAME "mv643xx_eth" | 9 | |
10 | #define MV643XX_ETH_SHARED_NAME "mv643xx_eth" | ||
11 | #define MV643XX_ETH_NAME "mv643xx_eth_port" | ||
9 | #define MV643XX_ETH_SHARED_REGS 0x2000 | 12 | #define MV643XX_ETH_SHARED_REGS 0x2000 |
10 | #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 | 13 | #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 |
11 | #define MV643XX_ETH_BAR_4 0x2220 | 14 | #define MV643XX_ETH_BAR_4 0x2220 |
12 | #define MV643XX_ETH_SIZE_REG_4 0x2224 | 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 |
13 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 | 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 |
14 | 17 | ||
18 | struct mv643xx_eth_shared_platform_data { | ||
19 | struct mbus_dram_target_info *dram; | ||
20 | unsigned int t_clk; | ||
21 | }; | ||
22 | |||
15 | struct mv643xx_eth_platform_data { | 23 | struct mv643xx_eth_platform_data { |
24 | struct platform_device *shared; | ||
16 | int port_number; | 25 | int port_number; |
26 | |||
27 | struct platform_device *shared_smi; | ||
28 | |||
17 | u16 force_phy_addr; /* force override if phy_addr == 0 */ | 29 | u16 force_phy_addr; /* force override if phy_addr == 0 */ |
18 | u16 phy_addr; | 30 | u16 phy_addr; |
19 | 31 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c1d4466583b..25f87102ab66 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -88,19 +88,23 @@ struct wireless_dev; | |||
88 | #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ | 88 | #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ |
89 | #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ | 89 | #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ |
90 | 90 | ||
91 | #ifdef __KERNEL__ | ||
92 | |||
91 | /* | 93 | /* |
92 | * Compute the worst case header length according to the protocols | 94 | * Compute the worst case header length according to the protocols |
93 | * used. | 95 | * used. |
94 | */ | 96 | */ |
95 | 97 | ||
96 | #if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR) | 98 | #if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
97 | #define LL_MAX_HEADER 32 | 99 | # if defined(CONFIG_MAC80211_MESH) |
98 | #else | 100 | # define LL_MAX_HEADER 128 |
99 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 101 | # else |
100 | #define LL_MAX_HEADER 96 | 102 | # define LL_MAX_HEADER 96 |
103 | # endif | ||
104 | #elif defined(CONFIG_TR) | ||
105 | # define LL_MAX_HEADER 48 | ||
101 | #else | 106 | #else |
102 | #define LL_MAX_HEADER 48 | 107 | # define LL_MAX_HEADER 32 |
103 | #endif | ||
104 | #endif | 108 | #endif |
105 | 109 | ||
106 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ | 110 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ |
@@ -112,6 +116,8 @@ struct wireless_dev; | |||
112 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 116 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
113 | #endif | 117 | #endif |
114 | 118 | ||
119 | #endif /* __KERNEL__ */ | ||
120 | |||
115 | struct net_device_subqueue | 121 | struct net_device_subqueue |
116 | { | 122 | { |
117 | /* Give a control state for each queue. This struct may contain | 123 | /* Give a control state for each queue. This struct may contain |
@@ -244,11 +250,16 @@ struct hh_cache | |||
244 | * | 250 | * |
245 | * We could use other alignment values, but we must maintain the | 251 | * We could use other alignment values, but we must maintain the |
246 | * relationship HH alignment <= LL alignment. | 252 | * relationship HH alignment <= LL alignment. |
253 | * | ||
254 | * LL_ALLOCATED_SPACE also takes into account the tailroom the device | ||
255 | * may need. | ||
247 | */ | 256 | */ |
248 | #define LL_RESERVED_SPACE(dev) \ | 257 | #define LL_RESERVED_SPACE(dev) \ |
249 | (((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) | 258 | ((((dev)->hard_header_len+(dev)->needed_headroom)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) |
250 | #define LL_RESERVED_SPACE_EXTRA(dev,extra) \ | 259 | #define LL_RESERVED_SPACE_EXTRA(dev,extra) \ |
251 | ((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) | 260 | ((((dev)->hard_header_len+(dev)->needed_headroom+(extra))&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) |
261 | #define LL_ALLOCATED_SPACE(dev) \ | ||
262 | ((((dev)->hard_header_len+(dev)->needed_headroom+(dev)->needed_tailroom)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) | ||
252 | 263 | ||
253 | struct header_ops { | 264 | struct header_ops { |
254 | int (*create) (struct sk_buff *skb, struct net_device *dev, | 265 | int (*create) (struct sk_buff *skb, struct net_device *dev, |
@@ -567,6 +578,13 @@ struct net_device | |||
567 | unsigned short type; /* interface hardware type */ | 578 | unsigned short type; /* interface hardware type */ |
568 | unsigned short hard_header_len; /* hardware hdr length */ | 579 | unsigned short hard_header_len; /* hardware hdr length */ |
569 | 580 | ||
581 | /* extra head- and tailroom the hardware may need, but not in all cases | ||
582 | * can this be guaranteed, especially tailroom. Some cases also use | ||
583 | * LL_MAX_HEADER instead to allocate the skb. | ||
584 | */ | ||
585 | unsigned short needed_headroom; | ||
586 | unsigned short needed_tailroom; | ||
587 | |||
570 | struct net_device *master; /* Pointer to master device of a group, | 588 | struct net_device *master; /* Pointer to master device of a group, |
571 | * which this device is member of. | 589 | * which this device is member of. |
572 | */ | 590 | */ |
@@ -715,6 +733,9 @@ struct net_device | |||
715 | struct net *nd_net; | 733 | struct net *nd_net; |
716 | #endif | 734 | #endif |
717 | 735 | ||
736 | /* mid-layer private */ | ||
737 | void *ml_priv; | ||
738 | |||
718 | /* bridge stuff */ | 739 | /* bridge stuff */ |
719 | struct net_bridge_port *br_port; | 740 | struct net_bridge_port *br_port; |
720 | /* macvlan */ | 741 | /* macvlan */ |
@@ -728,6 +749,9 @@ struct net_device | |||
728 | /* rtnetlink link ops */ | 749 | /* rtnetlink link ops */ |
729 | const struct rtnl_link_ops *rtnl_link_ops; | 750 | const struct rtnl_link_ops *rtnl_link_ops; |
730 | 751 | ||
752 | /* VLAN feature mask */ | ||
753 | unsigned long vlan_features; | ||
754 | |||
731 | /* for setting kernel sock attribute on TCP connection setup */ | 755 | /* for setting kernel sock attribute on TCP connection setup */ |
732 | #define GSO_MAX_SIZE 65536 | 756 | #define GSO_MAX_SIZE 65536 |
733 | unsigned int gso_max_size; | 757 | unsigned int gso_max_size; |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index e4c66593b5c6..0c5eb7ed8b3f 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/types.h> | ||
7 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
8 | #include <linux/net.h> | 7 | #include <linux/net.h> |
9 | #include <linux/netdevice.h> | 8 | #include <linux/netdevice.h> |
@@ -14,6 +13,7 @@ | |||
14 | #include <linux/list.h> | 13 | #include <linux/list.h> |
15 | #include <net/net_namespace.h> | 14 | #include <net/net_namespace.h> |
16 | #endif | 15 | #endif |
16 | #include <linux/types.h> | ||
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | 18 | ||
19 | /* Responses from hook functions. */ | 19 | /* Responses from hook functions. */ |
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index 5da04e586a3f..23aa2ec6b7b7 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | struct nf_ct_sip_master { | 8 | struct nf_ct_sip_master { |
9 | unsigned int register_cseq; | 9 | unsigned int register_cseq; |
10 | unsigned int invite_cseq; | ||
10 | }; | 11 | }; |
11 | 12 | ||
12 | enum sip_expectation_classes { | 13 | enum sip_expectation_classes { |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index dd9c97f2d436..590ac3d6d5d6 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -11,11 +11,11 @@ | |||
11 | 11 | ||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | #include <linux/if.h> | 13 | #include <linux/if.h> |
14 | #include <linux/types.h> | ||
15 | #include <linux/in.h> | 14 | #include <linux/in.h> |
16 | #include <linux/if_arp.h> | 15 | #include <linux/if_arp.h> |
17 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
18 | #endif | 17 | #endif |
18 | #include <linux/types.h> | ||
19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
20 | #include <linux/netfilter_arp.h> | 20 | #include <linux/netfilter_arp.h> |
21 | 21 | ||
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index bfc889f90276..092bd50581a9 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -17,11 +17,11 @@ | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/if.h> | 19 | #include <linux/if.h> |
20 | #include <linux/types.h> | ||
21 | #include <linux/in.h> | 20 | #include <linux/in.h> |
22 | #include <linux/ip.h> | 21 | #include <linux/ip.h> |
23 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
24 | #endif | 23 | #endif |
24 | #include <linux/types.h> | ||
25 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
26 | #include <linux/netfilter_ipv4.h> | 26 | #include <linux/netfilter_ipv4.h> |
27 | 27 | ||
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index f2507dcc5750..1089e33cf633 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -17,11 +17,11 @@ | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/if.h> | 19 | #include <linux/if.h> |
20 | #include <linux/types.h> | ||
21 | #include <linux/in6.h> | 20 | #include <linux/in6.h> |
22 | #include <linux/ipv6.h> | 21 | #include <linux/ipv6.h> |
23 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
24 | #endif | 23 | #endif |
24 | #include <linux/types.h> | ||
25 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
26 | #include <linux/netfilter_ipv6.h> | 26 | #include <linux/netfilter_ipv6.h> |
27 | 27 | ||
diff --git a/include/linux/of_i2c.h b/include/linux/of_i2c.h index 2e5a96732042..bd2a870ec296 100644 --- a/include/linux/of_i2c.h +++ b/include/linux/of_i2c.h | |||
@@ -14,11 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | 16 | ||
17 | #ifdef CONFIG_OF_I2C | ||
18 | |||
19 | void of_register_i2c_devices(struct i2c_adapter *adap, | 17 | void of_register_i2c_devices(struct i2c_adapter *adap, |
20 | struct device_node *adap_node); | 18 | struct device_node *adap_node); |
21 | 19 | ||
22 | #endif /* CONFIG_OF_I2C */ | ||
23 | |||
24 | #endif /* __LINUX_OF_I2C_H */ | 20 | #endif /* __LINUX_OF_I2C_H */ |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 590cff32415d..f31debfac926 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -306,5 +306,29 @@ static inline void __ClearPageTail(struct page *page) | |||
306 | } | 306 | } |
307 | 307 | ||
308 | #endif /* !PAGEFLAGS_EXTENDED */ | 308 | #endif /* !PAGEFLAGS_EXTENDED */ |
309 | |||
310 | #define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ | ||
311 | 1 << PG_buddy | 1 << PG_writeback | \ | ||
312 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active) | ||
313 | |||
314 | /* | ||
315 | * Flags checked in bad_page(). Pages on the free list should not have | ||
316 | * these flags set. It they are, there is a problem. | ||
317 | */ | ||
318 | #define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty) | ||
319 | |||
320 | /* | ||
321 | * Flags checked when a page is freed. Pages being freed should not have | ||
322 | * these flags set. It they are, there is a problem. | ||
323 | */ | ||
324 | #define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved) | ||
325 | |||
326 | /* | ||
327 | * Flags checked when a page is prepped for return by the page allocator. | ||
328 | * Pages being prepped should not have these flags set. It they are, there | ||
329 | * is a problem. | ||
330 | */ | ||
331 | #define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty) | ||
332 | |||
309 | #endif /* !__GENERATING_BOUNDS_H */ | 333 | #endif /* !__GENERATING_BOUNDS_H */ |
310 | #endif /* PAGE_FLAGS_H */ | 334 | #endif /* PAGE_FLAGS_H */ |
diff --git a/include/linux/parser.h b/include/linux/parser.h index 26b2bdfcaf06..7dcd05075756 100644 --- a/include/linux/parser.h +++ b/include/linux/parser.h | |||
@@ -29,5 +29,5 @@ int match_token(char *, match_table_t table, substring_t args[]); | |||
29 | int match_int(substring_t *, int *result); | 29 | int match_int(substring_t *, int *result); |
30 | int match_octal(substring_t *, int *result); | 30 | int match_octal(substring_t *, int *result); |
31 | int match_hex(substring_t *, int *result); | 31 | int match_hex(substring_t *, int *result); |
32 | void match_strcpy(char *, const substring_t *); | 32 | size_t match_strlcpy(char *, const substring_t *, size_t); |
33 | char *match_strdup(const substring_t *); | 33 | char *match_strdup(const substring_t *); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 96acd0dae241..d18b1dd49fab 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/mod_devicetable.h> | 44 | #include <linux/mod_devicetable.h> |
45 | 45 | ||
46 | #include <linux/types.h> | 46 | #include <linux/types.h> |
47 | #include <linux/init.h> | ||
47 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
48 | #include <linux/list.h> | 49 | #include <linux/list.h> |
49 | #include <linux/compiler.h> | 50 | #include <linux/compiler.h> |
@@ -205,6 +206,7 @@ struct pci_dev { | |||
205 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 206 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
206 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 207 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
207 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 208 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
209 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ | ||
208 | #ifdef CONFIG_PCI_MSI | 210 | #ifdef CONFIG_PCI_MSI |
209 | struct list_head msi_list; | 211 | struct list_head msi_list; |
210 | #endif | 212 | #endif |
@@ -474,7 +476,7 @@ extern struct pci_bus *pci_find_bus(int domain, int busnr); | |||
474 | void pci_bus_add_devices(struct pci_bus *bus); | 476 | void pci_bus_add_devices(struct pci_bus *bus); |
475 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, | 477 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, |
476 | struct pci_ops *ops, void *sysdata); | 478 | struct pci_ops *ops, void *sysdata); |
477 | static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, | 479 | static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, |
478 | void *sysdata) | 480 | void *sysdata) |
479 | { | 481 | { |
480 | struct pci_bus *root_bus; | 482 | struct pci_bus *root_bus; |
@@ -666,7 +668,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
666 | 668 | ||
667 | void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), | 669 | void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), |
668 | void *userdata); | 670 | void *userdata); |
669 | int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix); | 671 | int pci_cfg_space_size_ext(struct pci_dev *dev); |
670 | int pci_cfg_space_size(struct pci_dev *dev); | 672 | int pci_cfg_space_size(struct pci_dev *dev); |
671 | unsigned char pci_bus_max_busnr(struct pci_bus *bus); | 673 | unsigned char pci_bus_max_busnr(struct pci_bus *bus); |
672 | 674 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cf6dbd759395..65953822c9cb 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -716,6 +716,7 @@ | |||
716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 | 717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 |
718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 | 718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 |
719 | #define PCI_DEVICE_ID_HP_CISSE 0x323a | ||
719 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | 720 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 |
720 | 721 | ||
721 | #define PCI_VENDOR_ID_PCTECH 0x1042 | 722 | #define PCI_VENDOR_ID_PCTECH 0x1042 |
@@ -1519,6 +1520,7 @@ | |||
1519 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 | 1520 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 |
1520 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 | 1521 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 |
1521 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 | 1522 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 |
1523 | #define PCI_DEVICE_ID_MARVELL_CAFE_SD 0x4101 | ||
1522 | 1524 | ||
1523 | #define PCI_VENDOR_ID_V3 0x11b0 | 1525 | #define PCI_VENDOR_ID_V3 0x11b0 |
1524 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1526 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
@@ -1761,6 +1763,7 @@ | |||
1761 | 1763 | ||
1762 | #define PCI_VENDOR_ID_INTASHIELD 0x135a | 1764 | #define PCI_VENDOR_ID_INTASHIELD 0x135a |
1763 | #define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80 | 1765 | #define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80 |
1766 | #define PCI_DEVICE_ID_INTASHIELD_IS400 0x0dc0 | ||
1764 | 1767 | ||
1765 | #define PCI_VENDOR_ID_QUATECH 0x135C | 1768 | #define PCI_VENDOR_ID_QUATECH 0x135C |
1766 | #define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 | 1769 | #define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 |
@@ -2383,6 +2386,9 @@ | |||
2383 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 | 2386 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 |
2384 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 | 2387 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 |
2385 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f | 2388 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f |
2389 | #define PCI_DEVICE_ID_INTEL_5400_ERR 0x4030 | ||
2390 | #define PCI_DEVICE_ID_INTEL_5400_FBD0 0x4035 | ||
2391 | #define PCI_DEVICE_ID_INTEL_5400_FBD1 0x4036 | ||
2386 | #define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff | 2392 | #define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff |
2387 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 | 2393 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 |
2388 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 | 2394 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 |
diff --git a/include/linux/pda_power.h b/include/linux/pda_power.h index 225beb136807..cb7d10f30763 100644 --- a/include/linux/pda_power.h +++ b/include/linux/pda_power.h | |||
@@ -16,10 +16,14 @@ | |||
16 | #define PDA_POWER_CHARGE_AC (1 << 0) | 16 | #define PDA_POWER_CHARGE_AC (1 << 0) |
17 | #define PDA_POWER_CHARGE_USB (1 << 1) | 17 | #define PDA_POWER_CHARGE_USB (1 << 1) |
18 | 18 | ||
19 | struct device; | ||
20 | |||
19 | struct pda_power_pdata { | 21 | struct pda_power_pdata { |
22 | int (*init)(struct device *dev); | ||
20 | int (*is_ac_online)(void); | 23 | int (*is_ac_online)(void); |
21 | int (*is_usb_online)(void); | 24 | int (*is_usb_online)(void); |
22 | void (*set_charge)(int flags); | 25 | void (*set_charge)(int flags); |
26 | void (*exit)(struct device *dev); | ||
23 | 27 | ||
24 | char **supplied_to; | 28 | char **supplied_to; |
25 | size_t num_supplicants; | 29 | size_t num_supplicants; |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index d746a2abb322..4cdd393e71e1 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -13,8 +13,14 @@ | |||
13 | __attribute__((__section__(".data.percpu"))) \ | 13 | __attribute__((__section__(".data.percpu"))) \ |
14 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 14 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name |
15 | 15 | ||
16 | #ifdef MODULE | ||
17 | #define SHARED_ALIGNED_SECTION ".data.percpu" | ||
18 | #else | ||
19 | #define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned" | ||
20 | #endif | ||
21 | |||
16 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | 22 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ |
17 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | 23 | __attribute__((__section__(SHARED_ALIGNED_SECTION))) \ |
18 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ | 24 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ |
19 | ____cacheline_aligned_in_smp | 25 | ____cacheline_aligned_in_smp |
20 | #else | 26 | #else |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 02df20f085fe..7224c4099a28 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -412,6 +412,8 @@ int mdiobus_register(struct mii_bus *bus); | |||
412 | void mdiobus_unregister(struct mii_bus *bus); | 412 | void mdiobus_unregister(struct mii_bus *bus); |
413 | void phy_sanitize_settings(struct phy_device *phydev); | 413 | void phy_sanitize_settings(struct phy_device *phydev); |
414 | int phy_stop_interrupts(struct phy_device *phydev); | 414 | int phy_stop_interrupts(struct phy_device *phydev); |
415 | int phy_enable_interrupts(struct phy_device *phydev); | ||
416 | int phy_disable_interrupts(struct phy_device *phydev); | ||
415 | 417 | ||
416 | static inline int phy_read_status(struct phy_device *phydev) { | 418 | static inline int phy_read_status(struct phy_device *phydev) { |
417 | return phydev->drv->read_status(phydev); | 419 | return phydev->drv->read_status(phydev); |
@@ -447,5 +449,8 @@ int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, | |||
447 | int (*run)(struct phy_device *)); | 449 | int (*run)(struct phy_device *)); |
448 | int phy_scan_fixups(struct phy_device *phydev); | 450 | int phy_scan_fixups(struct phy_device *phydev); |
449 | 451 | ||
452 | int __init mdio_bus_init(void); | ||
453 | void mdio_bus_exit(void); | ||
454 | |||
450 | extern struct bus_type mdio_bus_type; | 455 | extern struct bus_type mdio_bus_type; |
451 | #endif /* __PHY_H */ | 456 | #endif /* __PHY_H */ |
diff --git a/include/linux/poll.h b/include/linux/poll.h index 16d813b364ef..ef453828877a 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -117,6 +117,8 @@ void zero_fd_set(unsigned long nr, unsigned long *fdset) | |||
117 | extern int do_select(int n, fd_set_bits *fds, s64 *timeout); | 117 | extern int do_select(int n, fd_set_bits *fds, s64 *timeout); |
118 | extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds, | 118 | extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds, |
119 | s64 *timeout); | 119 | s64 *timeout); |
120 | extern int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, | ||
121 | fd_set __user *exp, s64 *timeout); | ||
120 | 122 | ||
121 | #endif /* KERNEL */ | 123 | #endif /* KERNEL */ |
122 | 124 | ||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 9883bc942262..fff1d27ddb4c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | struct net; | 10 | struct net; |
11 | struct completion; | 11 | struct completion; |
12 | struct mm_struct; | ||
13 | |||
12 | /* | 14 | /* |
13 | * The proc filesystem constants/structures | 15 | * The proc filesystem constants/structures |
14 | */ | 16 | */ |
@@ -101,8 +103,6 @@ extern spinlock_t proc_subdir_lock; | |||
101 | extern void proc_root_init(void); | 103 | extern void proc_root_init(void); |
102 | extern void proc_misc_init(void); | 104 | extern void proc_misc_init(void); |
103 | 105 | ||
104 | struct mm_struct; | ||
105 | |||
106 | void proc_flush_task(struct task_struct *task); | 106 | void proc_flush_task(struct task_struct *task); |
107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); | 107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); |
108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); | 108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 47fbcba11850..78bfdea24a8e 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -262,7 +262,6 @@ int bitmap_create(mddev_t *mddev); | |||
262 | void bitmap_flush(mddev_t *mddev); | 262 | void bitmap_flush(mddev_t *mddev); |
263 | void bitmap_destroy(mddev_t *mddev); | 263 | void bitmap_destroy(mddev_t *mddev); |
264 | 264 | ||
265 | char *file_path(struct file *file, char *buf, int count); | ||
266 | void bitmap_print_sb(struct bitmap *bitmap); | 265 | void bitmap_print_sb(struct bitmap *bitmap); |
267 | void bitmap_update_sb(struct bitmap *bitmap); | 266 | void bitmap_update_sb(struct bitmap *bitmap); |
268 | 267 | ||
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index 81a1a02d4566..b7386ae9d288 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
@@ -72,6 +72,8 @@ | |||
72 | */ | 72 | */ |
73 | #define MD_PATCHLEVEL_VERSION 3 | 73 | #define MD_PATCHLEVEL_VERSION 3 |
74 | 74 | ||
75 | extern int mdp_major; | ||
76 | |||
75 | extern int register_md_personality (struct mdk_personality *p); | 77 | extern int register_md_personality (struct mdk_personality *p); |
76 | extern int unregister_md_personality (struct mdk_personality *p); | 78 | extern int unregister_md_personality (struct mdk_personality *p); |
77 | extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev), | 79 | extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev), |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 812ffa590cff..3dea9f545c8f 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -180,13 +180,15 @@ struct mddev_s | |||
180 | int sync_speed_min; | 180 | int sync_speed_min; |
181 | int sync_speed_max; | 181 | int sync_speed_max; |
182 | 182 | ||
183 | /* resync even though the same disks are shared among md-devices */ | ||
184 | int parallel_resync; | ||
185 | |||
183 | int ok_start_degraded; | 186 | int ok_start_degraded; |
184 | /* recovery/resync flags | 187 | /* recovery/resync flags |
185 | * NEEDED: we might need to start a resync/recover | 188 | * NEEDED: we might need to start a resync/recover |
186 | * RUNNING: a thread is running, or about to be started | 189 | * RUNNING: a thread is running, or about to be started |
187 | * SYNC: actually doing a resync, not a recovery | 190 | * SYNC: actually doing a resync, not a recovery |
188 | * ERR: and IO error was detected - abort the resync/recovery | 191 | * INTR: resync needs to be aborted for some reason |
189 | * INTR: someone requested a (clean) early abort. | ||
190 | * DONE: thread is done and is waiting to be reaped | 192 | * DONE: thread is done and is waiting to be reaped |
191 | * REQUEST: user-space has requested a sync (used with SYNC) | 193 | * REQUEST: user-space has requested a sync (used with SYNC) |
192 | * CHECK: user-space request for for check-only, no repair | 194 | * CHECK: user-space request for for check-only, no repair |
@@ -196,7 +198,6 @@ struct mddev_s | |||
196 | */ | 198 | */ |
197 | #define MD_RECOVERY_RUNNING 0 | 199 | #define MD_RECOVERY_RUNNING 0 |
198 | #define MD_RECOVERY_SYNC 1 | 200 | #define MD_RECOVERY_SYNC 1 |
199 | #define MD_RECOVERY_ERR 2 | ||
200 | #define MD_RECOVERY_INTR 3 | 201 | #define MD_RECOVERY_INTR 3 |
201 | #define MD_RECOVERY_DONE 4 | 202 | #define MD_RECOVERY_DONE 4 |
202 | #define MD_RECOVERY_NEEDED 5 | 203 | #define MD_RECOVERY_NEEDED 5 |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h new file mode 100644 index 000000000000..bde4586f4382 --- /dev/null +++ b/include/linux/rculist.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _LINUX_RCULIST_H | ||
2 | #define _LINUX_RCULIST_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | |||
6 | #endif /* _LINUX_RCULIST_H */ | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 8082d6587a0f..d42dbec06083 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -131,18 +131,6 @@ struct rcu_head { | |||
131 | */ | 131 | */ |
132 | #define rcu_read_unlock_bh() __rcu_read_unlock_bh() | 132 | #define rcu_read_unlock_bh() __rcu_read_unlock_bh() |
133 | 133 | ||
134 | /* | ||
135 | * Prevent the compiler from merging or refetching accesses. The compiler | ||
136 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), | ||
137 | * but only when the compiler is aware of some particular ordering. One way | ||
138 | * to make the compiler aware of ordering is to put the two invocations of | ||
139 | * ACCESS_ONCE() in different C statements. | ||
140 | * | ||
141 | * This macro does absolutely -nothing- to prevent the CPU from reordering, | ||
142 | * merging, or refetching absolutely anything at any time. | ||
143 | */ | ||
144 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | ||
145 | |||
146 | /** | 134 | /** |
147 | * rcu_dereference - fetch an RCU-protected pointer in an | 135 | * rcu_dereference - fetch an RCU-protected pointer in an |
148 | * RCU read-side critical section. This pointer may later | 136 | * RCU read-side critical section. This pointer may later |
diff --git a/include/linux/rio.h b/include/linux/rio.h index c1c99c9643d3..dc0c75556c63 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -161,6 +161,8 @@ enum rio_phy_type { | |||
161 | * @ops: configuration space functions | 161 | * @ops: configuration space functions |
162 | * @id: Port ID, unique among all ports | 162 | * @id: Port ID, unique among all ports |
163 | * @index: Port index, unique among all port interfaces of the same type | 163 | * @index: Port index, unique among all port interfaces of the same type |
164 | * @sys_size: RapidIO common transport system size | ||
165 | * @phy_type: RapidIO phy type | ||
164 | * @name: Port name string | 166 | * @name: Port name string |
165 | * @priv: Master port private data | 167 | * @priv: Master port private data |
166 | */ | 168 | */ |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 44c81c744538..b358c704d102 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -246,6 +246,7 @@ enum rt_class_t | |||
246 | { | 246 | { |
247 | RT_TABLE_UNSPEC=0, | 247 | RT_TABLE_UNSPEC=0, |
248 | /* User defined values */ | 248 | /* User defined values */ |
249 | RT_TABLE_COMPAT=252, | ||
249 | RT_TABLE_DEFAULT=253, | 250 | RT_TABLE_DEFAULT=253, |
250 | RT_TABLE_MAIN=254, | 251 | RT_TABLE_MAIN=254, |
251 | RT_TABLE_LOCAL=255, | 252 | RT_TABLE_LOCAL=255, |
@@ -267,10 +268,10 @@ enum rtattr_type_t | |||
267 | RTA_PREFSRC, | 268 | RTA_PREFSRC, |
268 | RTA_METRICS, | 269 | RTA_METRICS, |
269 | RTA_MULTIPATH, | 270 | RTA_MULTIPATH, |
270 | RTA_PROTOINFO, | 271 | RTA_PROTOINFO, /* no longer used */ |
271 | RTA_FLOW, | 272 | RTA_FLOW, |
272 | RTA_CACHEINFO, | 273 | RTA_CACHEINFO, |
273 | RTA_SESSION, | 274 | RTA_SESSION, /* no longer used */ |
274 | RTA_MP_ALGO, /* no longer used */ | 275 | RTA_MP_ALGO, /* no longer used */ |
275 | RTA_TABLE, | 276 | RTA_TABLE, |
276 | __RTA_MAX | 277 | __RTA_MAX |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 03c238088aee..c5d3f847ca8d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -158,6 +158,8 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
158 | } | 158 | } |
159 | #endif | 159 | #endif |
160 | 160 | ||
161 | extern unsigned long long time_sync_thresh; | ||
162 | |||
161 | /* | 163 | /* |
162 | * Task state bitmask. NOTE! These bits are also | 164 | * Task state bitmask. NOTE! These bits are also |
163 | * encoded in fs/proc/array.c: get_task_state(). | 165 | * encoded in fs/proc/array.c: get_task_state(). |
@@ -764,7 +766,6 @@ struct sched_domain { | |||
764 | struct sched_domain *child; /* bottom domain must be null terminated */ | 766 | struct sched_domain *child; /* bottom domain must be null terminated */ |
765 | struct sched_group *groups; /* the balancing groups of the domain */ | 767 | struct sched_group *groups; /* the balancing groups of the domain */ |
766 | cpumask_t span; /* span of all CPUs in this domain */ | 768 | cpumask_t span; /* span of all CPUs in this domain */ |
767 | int first_cpu; /* cache of the first cpu in this domain */ | ||
768 | unsigned long min_interval; /* Minimum balance interval ms */ | 769 | unsigned long min_interval; /* Minimum balance interval ms */ |
769 | unsigned long max_interval; /* Maximum balance interval ms */ | 770 | unsigned long max_interval; /* Maximum balance interval ms */ |
770 | unsigned int busy_factor; /* less balancing by factor if busy */ | 771 | unsigned int busy_factor; /* less balancing by factor if busy */ |
@@ -1551,6 +1552,35 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1551 | 1552 | ||
1552 | extern unsigned long long sched_clock(void); | 1553 | extern unsigned long long sched_clock(void); |
1553 | 1554 | ||
1555 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
1556 | static inline void sched_clock_init(void) | ||
1557 | { | ||
1558 | } | ||
1559 | |||
1560 | static inline u64 sched_clock_cpu(int cpu) | ||
1561 | { | ||
1562 | return sched_clock(); | ||
1563 | } | ||
1564 | |||
1565 | static inline void sched_clock_tick(void) | ||
1566 | { | ||
1567 | } | ||
1568 | |||
1569 | static inline void sched_clock_idle_sleep_event(void) | ||
1570 | { | ||
1571 | } | ||
1572 | |||
1573 | static inline void sched_clock_idle_wakeup_event(u64 delta_ns) | ||
1574 | { | ||
1575 | } | ||
1576 | #else | ||
1577 | extern void sched_clock_init(void); | ||
1578 | extern u64 sched_clock_cpu(int cpu); | ||
1579 | extern void sched_clock_tick(void); | ||
1580 | extern void sched_clock_idle_sleep_event(void); | ||
1581 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | ||
1582 | #endif | ||
1583 | |||
1554 | /* | 1584 | /* |
1555 | * For kernel-internal use: high-speed (but slightly incorrect) per-cpu | 1585 | * For kernel-internal use: high-speed (but slightly incorrect) per-cpu |
1556 | * clock constructed from sched_clock(): | 1586 | * clock constructed from sched_clock(): |
@@ -1817,7 +1847,9 @@ extern void exit_thread(void); | |||
1817 | extern void exit_files(struct task_struct *); | 1847 | extern void exit_files(struct task_struct *); |
1818 | extern void __cleanup_signal(struct signal_struct *); | 1848 | extern void __cleanup_signal(struct signal_struct *); |
1819 | extern void __cleanup_sighand(struct sighand_struct *); | 1849 | extern void __cleanup_sighand(struct sighand_struct *); |
1850 | |||
1820 | extern void exit_itimers(struct signal_struct *); | 1851 | extern void exit_itimers(struct signal_struct *); |
1852 | extern void flush_itimer_signals(void); | ||
1821 | 1853 | ||
1822 | extern NORET_TYPE void do_group_exit(int); | 1854 | extern NORET_TYPE void do_group_exit(int); |
1823 | 1855 | ||
@@ -1977,6 +2009,11 @@ static inline void clear_tsk_need_resched(struct task_struct *tsk) | |||
1977 | clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); | 2009 | clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); |
1978 | } | 2010 | } |
1979 | 2011 | ||
2012 | static inline int test_tsk_need_resched(struct task_struct *tsk) | ||
2013 | { | ||
2014 | return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); | ||
2015 | } | ||
2016 | |||
1980 | static inline int signal_pending(struct task_struct *p) | 2017 | static inline int signal_pending(struct task_struct *p) |
1981 | { | 2018 | { |
1982 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | 2019 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); |
@@ -1989,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p) | |||
1989 | return signal_pending(p) && __fatal_signal_pending(p); | 2026 | return signal_pending(p) && __fatal_signal_pending(p); |
1990 | } | 2027 | } |
1991 | 2028 | ||
2029 | static inline int signal_pending_state(long state, struct task_struct *p) | ||
2030 | { | ||
2031 | if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) | ||
2032 | return 0; | ||
2033 | if (!signal_pending(p)) | ||
2034 | return 0; | ||
2035 | |||
2036 | if (state & (__TASK_STOPPED | __TASK_TRACED)) | ||
2037 | return 0; | ||
2038 | |||
2039 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | ||
2040 | } | ||
2041 | |||
1992 | static inline int need_resched(void) | 2042 | static inline int need_resched(void) |
1993 | { | 2043 | { |
1994 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); | 2044 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); |
@@ -2001,13 +2051,13 @@ static inline int need_resched(void) | |||
2001 | * cond_resched_lock() will drop the spinlock before scheduling, | 2051 | * cond_resched_lock() will drop the spinlock before scheduling, |
2002 | * cond_resched_softirq() will enable bhs before scheduling. | 2052 | * cond_resched_softirq() will enable bhs before scheduling. |
2003 | */ | 2053 | */ |
2004 | #ifdef CONFIG_PREEMPT | 2054 | extern int _cond_resched(void); |
2055 | #ifdef CONFIG_PREEMPT_BKL | ||
2005 | static inline int cond_resched(void) | 2056 | static inline int cond_resched(void) |
2006 | { | 2057 | { |
2007 | return 0; | 2058 | return 0; |
2008 | } | 2059 | } |
2009 | #else | 2060 | #else |
2010 | extern int _cond_resched(void); | ||
2011 | static inline int cond_resched(void) | 2061 | static inline int cond_resched(void) |
2012 | { | 2062 | { |
2013 | return _cond_resched(); | 2063 | return _cond_resched(); |
@@ -2015,6 +2065,10 @@ static inline int cond_resched(void) | |||
2015 | #endif | 2065 | #endif |
2016 | extern int cond_resched_lock(spinlock_t * lock); | 2066 | extern int cond_resched_lock(spinlock_t * lock); |
2017 | extern int cond_resched_softirq(void); | 2067 | extern int cond_resched_softirq(void); |
2068 | static inline int cond_resched_bkl(void) | ||
2069 | { | ||
2070 | return _cond_resched(); | ||
2071 | } | ||
2018 | 2072 | ||
2019 | /* | 2073 | /* |
2020 | * Does a critical section need to be broken due to another | 2074 | * Does a critical section need to be broken due to another |
diff --git a/include/linux/securebits.h b/include/linux/securebits.h index c1f19dbceb05..92f09bdf1175 100644 --- a/include/linux/securebits.h +++ b/include/linux/securebits.h | |||
@@ -7,14 +7,15 @@ | |||
7 | inheritance of root-permissions and suid-root executable under | 7 | inheritance of root-permissions and suid-root executable under |
8 | compatibility mode. We raise the effective and inheritable bitmasks | 8 | compatibility mode. We raise the effective and inheritable bitmasks |
9 | *of the executable file* if the effective uid of the new process is | 9 | *of the executable file* if the effective uid of the new process is |
10 | 0. If the real uid is 0, we raise the inheritable bitmask of the | 10 | 0. If the real uid is 0, we raise the effective (legacy) bit of the |
11 | executable file. */ | 11 | executable file. */ |
12 | #define SECURE_NOROOT 0 | 12 | #define SECURE_NOROOT 0 |
13 | #define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ | 13 | #define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ |
14 | 14 | ||
15 | /* When set, setuid to/from uid 0 does not trigger capability-"fixes" | 15 | /* When set, setuid to/from uid 0 does not trigger capability-"fixup". |
16 | to be compatible with old programs relying on set*uid to loose | 16 | When unset, to provide compatiblility with old programs relying on |
17 | privileges. When unset, setuid doesn't change privileges. */ | 17 | set*uid to gain/lose privilege, transitions to/from uid 0 cause |
18 | capabilities to be gained/lost. */ | ||
18 | #define SECURE_NO_SETUID_FIXUP 2 | 19 | #define SECURE_NO_SETUID_FIXUP 2 |
19 | #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ | 20 | #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ |
20 | 21 | ||
@@ -26,10 +27,10 @@ | |||
26 | #define SECURE_KEEP_CAPS 4 | 27 | #define SECURE_KEEP_CAPS 4 |
27 | #define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ | 28 | #define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ |
28 | 29 | ||
29 | /* Each securesetting is implemented using two bits. One bit specify | 30 | /* Each securesetting is implemented using two bits. One bit specifies |
30 | whether the setting is on or off. The other bit specify whether the | 31 | whether the setting is on or off. The other bit specify whether the |
31 | setting is fixed or not. A setting which is fixed cannot be changed | 32 | setting is locked or not. A setting which is locked cannot be |
32 | from user-level. */ | 33 | changed from user-level. */ |
33 | #define issecure_mask(X) (1 << (X)) | 34 | #define issecure_mask(X) (1 << (X)) |
34 | #define issecure(X) (issecure_mask(X) & current->securebits) | 35 | #define issecure(X) (issecure_mask(X) & current->securebits) |
35 | 36 | ||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d32123ae08ad..d8f31de632c5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -192,6 +192,7 @@ struct uart_ops { | |||
192 | void (*shutdown)(struct uart_port *); | 192 | void (*shutdown)(struct uart_port *); |
193 | void (*set_termios)(struct uart_port *, struct ktermios *new, | 193 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
194 | struct ktermios *old); | 194 | struct ktermios *old); |
195 | void (*set_ldisc)(struct uart_port *); | ||
195 | void (*pm)(struct uart_port *, unsigned int state, | 196 | void (*pm)(struct uart_port *, unsigned int state, |
196 | unsigned int oldstate); | 197 | unsigned int oldstate); |
197 | int (*set_wake)(struct uart_port *, unsigned int state); | 198 | int (*set_wake)(struct uart_port *, unsigned int state); |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 805ed4b92f9a..9aa90a6f20e0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). | 2 | * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). |
3 | * | 3 | * |
4 | * (C) SGI 2006, Christoph Lameter <clameter@sgi.com> | 4 | * (C) SGI 2006, Christoph Lameter |
5 | * Cleaned up and restructured to ease the addition of alternative | 5 | * Cleaned up and restructured to ease the addition of alternative |
6 | * implementations of SLAB allocators. | 6 | * implementations of SLAB allocators. |
7 | */ | 7 | */ |
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
276 | return kmalloc(size, flags | __GFP_ZERO); | 276 | return kmalloc(size, flags | __GFP_ZERO); |
277 | } | 277 | } |
278 | 278 | ||
279 | /** | ||
280 | * kzalloc_node - allocate zeroed memory from a particular memory node. | ||
281 | * @size: how many bytes of memory are required. | ||
282 | * @flags: the type of memory to allocate (see kmalloc). | ||
283 | * @node: memory node from which to allocate | ||
284 | */ | ||
285 | static inline void *kzalloc_node(size_t size, gfp_t flags, int node) | ||
286 | { | ||
287 | return kmalloc_node(size, flags | __GFP_ZERO, node); | ||
288 | } | ||
289 | |||
279 | #ifdef CONFIG_SLABINFO | 290 | #ifdef CONFIG_SLABINFO |
280 | extern const struct seq_operations slabinfo_op; | 291 | extern const struct seq_operations slabinfo_op; |
281 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | 292 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 71e43a12ebbb..d117ea2825a9 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * SLUB : A Slab allocator without object queues. | 5 | * SLUB : A Slab allocator without object queues. |
6 | * | 6 | * |
7 | * (C) 2007 SGI, Christoph Lameter <clameter@sgi.com> | 7 | * (C) 2007 SGI, Christoph Lameter |
8 | */ | 8 | */ |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
@@ -137,10 +137,12 @@ static __always_inline int kmalloc_index(size_t size) | |||
137 | if (size <= KMALLOC_MIN_SIZE) | 137 | if (size <= KMALLOC_MIN_SIZE) |
138 | return KMALLOC_SHIFT_LOW; | 138 | return KMALLOC_SHIFT_LOW; |
139 | 139 | ||
140 | #if KMALLOC_MIN_SIZE <= 64 | ||
140 | if (size > 64 && size <= 96) | 141 | if (size > 64 && size <= 96) |
141 | return 1; | 142 | return 1; |
142 | if (size > 128 && size <= 192) | 143 | if (size > 128 && size <= 192) |
143 | return 2; | 144 | return 2; |
145 | #endif | ||
144 | if (size <= 8) return 3; | 146 | if (size <= 8) return 3; |
145 | if (size <= 16) return 4; | 147 | if (size <= 16) return 4; |
146 | if (size <= 32) return 5; | 148 | if (size <= 32) return 5; |
diff --git a/include/linux/sm501.h b/include/linux/sm501.h index bca134544700..95c1c39ba445 100644 --- a/include/linux/sm501.h +++ b/include/linux/sm501.h | |||
@@ -71,8 +71,8 @@ extern unsigned long sm501_gpio_get(struct device *dev, | |||
71 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) | 71 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) |
72 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) | 72 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) |
73 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) | 73 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) |
74 | #define SM501FB_FLAG_PANEL_USE_FPEN (1<<4) | 74 | #define SM501FB_FLAG_PANEL_NO_FPEN (1<<4) |
75 | #define SM501FB_FLAG_PANEL_USE_VBIASEN (1<<5) | 75 | #define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5) |
76 | 76 | ||
77 | struct sm501_platdata_fbsub { | 77 | struct sm501_platdata_fbsub { |
78 | struct fb_videomode *def_mode; | 78 | struct fb_videomode *def_mode; |
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h index e9bbe3ebd721..d5ca78b93a3b 100644 --- a/include/linux/spi/mmc_spi.h +++ b/include/linux/spi/mmc_spi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_SPI_MMC_SPI_H | 1 | #ifndef __LINUX_SPI_MMC_SPI_H |
2 | #define __LINUX_SPI_MMC_SPI_H | 2 | #define __LINUX_SPI_MMC_SPI_H |
3 | 3 | ||
4 | #include <linux/interrupt.h> | ||
5 | |||
4 | struct device; | 6 | struct device; |
5 | struct mmc_host; | 7 | struct mmc_host; |
6 | 8 | ||
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 01fbdf5fef22..942e38736901 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h | |||
@@ -100,7 +100,7 @@ extern char * nvram_get(const char *name); | |||
100 | /* Get the device MAC address */ | 100 | /* Get the device MAC address */ |
101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | 101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) |
102 | { | 102 | { |
103 | #ifdef CONFIG_BCM947XX | 103 | #ifdef CONFIG_BCM47XX |
104 | char *res = nvram_get("et0macaddr"); | 104 | char *res = nvram_get("et0macaddr"); |
105 | if (res) | 105 | if (res) |
106 | memcpy(macaddr, res, 6); | 106 | memcpy(macaddr, res, 6); |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index c11bbcc081f9..05eb4664d0dd 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
@@ -71,7 +71,8 @@ extern atomic_t rdma_stat_sq_prod; | |||
71 | * completes. | 71 | * completes. |
72 | */ | 72 | */ |
73 | struct svc_rdma_op_ctxt { | 73 | struct svc_rdma_op_ctxt { |
74 | struct svc_rdma_op_ctxt *next; | 74 | struct svc_rdma_op_ctxt *read_hdr; |
75 | struct list_head free_list; | ||
75 | struct xdr_buf arg; | 76 | struct xdr_buf arg; |
76 | struct list_head dto_q; | 77 | struct list_head dto_q; |
77 | enum ib_wr_opcode wr_op; | 78 | enum ib_wr_opcode wr_op; |
@@ -85,7 +86,6 @@ struct svc_rdma_op_ctxt { | |||
85 | struct page *pages[RPCSVC_MAXPAGES]; | 86 | struct page *pages[RPCSVC_MAXPAGES]; |
86 | }; | 87 | }; |
87 | 88 | ||
88 | #define RDMACTXT_F_READ_DONE 1 | ||
89 | #define RDMACTXT_F_LAST_CTXT 2 | 89 | #define RDMACTXT_F_LAST_CTXT 2 |
90 | 90 | ||
91 | struct svcxprt_rdma { | 91 | struct svcxprt_rdma { |
@@ -104,7 +104,8 @@ struct svcxprt_rdma { | |||
104 | 104 | ||
105 | struct ib_pd *sc_pd; | 105 | struct ib_pd *sc_pd; |
106 | 106 | ||
107 | struct svc_rdma_op_ctxt *sc_ctxt_head; | 107 | atomic_t sc_ctxt_used; |
108 | struct list_head sc_ctxt_free; | ||
108 | int sc_ctxt_cnt; | 109 | int sc_ctxt_cnt; |
109 | int sc_ctxt_bump; | 110 | int sc_ctxt_bump; |
110 | int sc_ctxt_max; | 111 | int sc_ctxt_max; |
@@ -123,6 +124,7 @@ struct svcxprt_rdma { | |||
123 | struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */ | 124 | struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */ |
124 | struct list_head sc_read_complete_q; | 125 | struct list_head sc_read_complete_q; |
125 | spinlock_t sc_read_complete_lock; | 126 | spinlock_t sc_read_complete_lock; |
127 | struct work_struct sc_work; | ||
126 | }; | 128 | }; |
127 | /* sc_flags */ | 129 | /* sc_flags */ |
128 | #define RDMAXPRT_RQ_PENDING 1 | 130 | #define RDMAXPRT_RQ_PENDING 1 |
@@ -164,8 +166,8 @@ extern int svc_rdma_sendto(struct svc_rqst *); | |||
164 | 166 | ||
165 | /* svc_rdma_transport.c */ | 167 | /* svc_rdma_transport.c */ |
166 | extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *); | 168 | extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *); |
167 | extern int svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *, | 169 | extern void svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *, |
168 | enum rpcrdma_errcode); | 170 | enum rpcrdma_errcode); |
169 | struct page *svc_rdma_get_page(void); | 171 | struct page *svc_rdma_get_page(void); |
170 | extern int svc_rdma_post_recv(struct svcxprt_rdma *); | 172 | extern int svc_rdma_post_recv(struct svcxprt_rdma *); |
171 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); | 173 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 27bad59dae79..7858eac40aa7 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -196,12 +196,6 @@ static inline int sysfs_update_group(struct kobject *kobj, | |||
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |
198 | 198 | ||
199 | static inline int sysfs_update_group(struct kobject *kobj, | ||
200 | const struct attribute_group *grp) | ||
201 | { | ||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | static inline void sysfs_remove_group(struct kobject *kobj, | 199 | static inline void sysfs_remove_group(struct kobject *kobj, |
206 | const struct attribute_group *grp) | 200 | const struct attribute_group *grp) |
207 | { | 201 | { |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index d96d9b122304..b31b6b74aa28 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | |||
239 | return (struct tcp_request_sock *)req; | 239 | return (struct tcp_request_sock *)req; |
240 | } | 240 | } |
241 | 241 | ||
242 | struct tcp_deferred_accept_info { | ||
243 | struct sock *listen_sk; | ||
244 | struct request_sock *request; | ||
245 | }; | ||
246 | |||
247 | struct tcp_sock { | 242 | struct tcp_sock { |
248 | /* inet_connection_sock has to be the first member of tcp_sock */ | 243 | /* inet_connection_sock has to be the first member of tcp_sock */ |
249 | struct inet_connection_sock inet_conn; | 244 | struct inet_connection_sock inet_conn; |
@@ -355,7 +350,7 @@ struct tcp_sock { | |||
355 | u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ | 350 | u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ |
356 | 351 | ||
357 | u16 advmss; /* Advertised MSS */ | 352 | u16 advmss; /* Advertised MSS */ |
358 | u16 prior_ssthresh; /* ssthresh saved at recovery start */ | 353 | u32 prior_ssthresh; /* ssthresh saved at recovery start */ |
359 | u32 lost_out; /* Lost packets */ | 354 | u32 lost_out; /* Lost packets */ |
360 | u32 sacked_out; /* SACK'd packets */ | 355 | u32 sacked_out; /* SACK'd packets */ |
361 | u32 fackets_out; /* FACK'd packets */ | 356 | u32 fackets_out; /* FACK'd packets */ |
@@ -379,8 +374,6 @@ struct tcp_sock { | |||
379 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 374 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
380 | int linger2; | 375 | int linger2; |
381 | 376 | ||
382 | struct tcp_deferred_accept_info defer_tcp_accept; | ||
383 | |||
384 | unsigned long last_synq_overflow; | 377 | unsigned long last_synq_overflow; |
385 | 378 | ||
386 | u32 tso_deferred; | 379 | u32 tso_deferred; |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 06d3e6eb9ca8..917707e6151d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -66,8 +66,7 @@ struct thermal_cooling_device { | |||
66 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | 66 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) |
67 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) | 67 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) |
68 | 68 | ||
69 | #if defined(CONFIG_HWMON) || \ | 69 | #if defined(CONFIG_THERMAL_HWMON) |
70 | (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE)) | ||
71 | /* thermal zone devices with the same type share one hwmon device */ | 70 | /* thermal zone devices with the same type share one hwmon device */ |
72 | struct thermal_hwmon_device { | 71 | struct thermal_hwmon_device { |
73 | char type[THERMAL_NAME_LENGTH]; | 72 | char type[THERMAL_NAME_LENGTH]; |
@@ -94,8 +93,7 @@ struct thermal_zone_device { | |||
94 | struct idr idr; | 93 | struct idr idr; |
95 | struct mutex lock; /* protect cooling devices list */ | 94 | struct mutex lock; /* protect cooling devices list */ |
96 | struct list_head node; | 95 | struct list_head node; |
97 | #if defined(CONFIG_HWMON) || \ | 96 | #if defined(CONFIG_THERMAL_HWMON) |
98 | (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE)) | ||
99 | struct list_head hwmon_node; | 97 | struct list_head hwmon_node; |
100 | struct thermal_hwmon_device *hwmon; | 98 | struct thermal_hwmon_device *hwmon; |
101 | struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ | 99 | struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ |
diff --git a/include/linux/time.h b/include/linux/time.h index d32ef0ad4c0a..e15206a7e82e 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | # include <linux/cache.h> | 7 | # include <linux/cache.h> |
8 | # include <linux/seqlock.h> | 8 | # include <linux/seqlock.h> |
9 | # include <linux/math64.h> | ||
9 | #endif | 10 | #endif |
10 | 11 | ||
11 | #ifndef _STRUCT_TIMESPEC | 12 | #ifndef _STRUCT_TIMESPEC |
@@ -169,18 +170,13 @@ extern struct timeval ns_to_timeval(const s64 nsec); | |||
169 | * timespec_add_ns - Adds nanoseconds to a timespec | 170 | * timespec_add_ns - Adds nanoseconds to a timespec |
170 | * @a: pointer to timespec to be incremented | 171 | * @a: pointer to timespec to be incremented |
171 | * @ns: unsigned nanoseconds value to be added | 172 | * @ns: unsigned nanoseconds value to be added |
173 | * | ||
174 | * This must always be inlined because its used from the x86-64 vdso, | ||
175 | * which cannot call other kernel functions. | ||
172 | */ | 176 | */ |
173 | static inline void timespec_add_ns(struct timespec *a, u64 ns) | 177 | static __always_inline void timespec_add_ns(struct timespec *a, u64 ns) |
174 | { | 178 | { |
175 | ns += a->tv_nsec; | 179 | a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); |
176 | while(unlikely(ns >= NSEC_PER_SEC)) { | ||
177 | /* The following asm() prevents the compiler from | ||
178 | * optimising this loop into a modulo operation. */ | ||
179 | asm("" : "+r"(ns)); | ||
180 | |||
181 | ns -= NSEC_PER_SEC; | ||
182 | a->tv_sec++; | ||
183 | } | ||
184 | a->tv_nsec = ns; | 180 | a->tv_nsec = ns; |
185 | } | 181 | } |
186 | #endif /* __KERNEL__ */ | 182 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 4bb7074a2c3a..24f3d2282e11 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -166,7 +166,9 @@ void arch_update_cpu_topology(void); | |||
166 | .busy_idx = 3, \ | 166 | .busy_idx = 3, \ |
167 | .idle_idx = 3, \ | 167 | .idle_idx = 3, \ |
168 | .flags = SD_LOAD_BALANCE \ | 168 | .flags = SD_LOAD_BALANCE \ |
169 | | SD_SERIALIZE, \ | 169 | | SD_BALANCE_NEWIDLE \ |
170 | | SD_WAKE_AFFINE \ | ||
171 | | SD_SERIALIZE, \ | ||
170 | .last_balance = jiffies, \ | 172 | .last_balance = jiffies, \ |
171 | .balance_interval = 64, \ | 173 | .balance_interval = 64, \ |
172 | } | 174 | } |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 7f7121f9c968..324a3b231d40 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define N_6PACK 7 | 36 | #define N_6PACK 7 |
37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | 37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ |
38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | 38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ |
39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | 39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus */ |
40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | 40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ |
41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | 41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ |
42 | /* cards about SMS messages */ | 42 | /* cards about SMS messages */ |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 59f1c0bd8f9c..d2a003586761 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -27,8 +27,7 @@ | |||
27 | * This routine is called by the kernel to write a series of | 27 | * This routine is called by the kernel to write a series of |
28 | * characters to the tty device. The characters may come from | 28 | * characters to the tty device. The characters may come from |
29 | * user space or kernel space. This routine will return the | 29 | * user space or kernel space. This routine will return the |
30 | * number of characters actually accepted for writing. This | 30 | * number of characters actually accepted for writing. |
31 | * routine is mandatory. | ||
32 | * | 31 | * |
33 | * Optional: Required for writable devices. | 32 | * Optional: Required for writable devices. |
34 | * | 33 | * |
@@ -134,7 +133,7 @@ | |||
134 | * This routine notifies the tty driver that it should hangup the | 133 | * This routine notifies the tty driver that it should hangup the |
135 | * tty device. | 134 | * tty device. |
136 | * | 135 | * |
137 | * Required: | 136 | * Optional: |
138 | * | 137 | * |
139 | * void (*break_ctl)(struct tty_stuct *tty, int state); | 138 | * void (*break_ctl)(struct tty_stuct *tty, int state); |
140 | * | 139 | * |
diff --git a/include/linux/types.h b/include/linux/types.h index 9dc2346627b4..d4a9ce6e2760 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -197,8 +197,6 @@ typedef u64 resource_size_t; | |||
197 | typedef u32 resource_size_t; | 197 | typedef u32 resource_size_t; |
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | #endif /* __KERNEL__ */ | ||
201 | |||
202 | struct ustat { | 200 | struct ustat { |
203 | __kernel_daddr_t f_tfree; | 201 | __kernel_daddr_t f_tfree; |
204 | __kernel_ino_t f_tinode; | 202 | __kernel_ino_t f_tinode; |
@@ -206,4 +204,6 @@ struct ustat { | |||
206 | char f_fpack[6]; | 204 | char f_fpack[6]; |
207 | }; | 205 | }; |
208 | 206 | ||
207 | #endif /* __KERNEL__ */ | ||
208 | |||
209 | #endif /* _LINUX_TYPES_H */ | 209 | #endif /* _LINUX_TYPES_H */ |
diff --git a/include/linux/usb/association.h b/include/linux/usb/association.h new file mode 100644 index 000000000000..07c5e3cf5898 --- /dev/null +++ b/include/linux/usb/association.h | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * Wireless USB - Cable Based Association | ||
3 | * | ||
4 | * Copyright (C) 2006 Intel Corporation | ||
5 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License version | ||
9 | * 2 as published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __LINUX_USB_ASSOCIATION_H | ||
13 | #define __LINUX_USB_ASSOCIATION_H | ||
14 | |||
15 | |||
16 | /* | ||
17 | * Association attributes | ||
18 | * | ||
19 | * Association Models Supplement to WUSB 1.0 T[3-1] | ||
20 | * | ||
21 | * Each field in the structures has it's ID, it's length and then the | ||
22 | * value. This is the actual definition of the field's ID and its | ||
23 | * length. | ||
24 | */ | ||
25 | struct wusb_am_attr { | ||
26 | __u8 id; | ||
27 | __u8 len; | ||
28 | }; | ||
29 | |||
30 | /* Different fields defined by the spec */ | ||
31 | #define WUSB_AR_AssociationTypeId { .id = 0x0000, .len = 2 } | ||
32 | #define WUSB_AR_AssociationSubTypeId { .id = 0x0001, .len = 2 } | ||
33 | #define WUSB_AR_Length { .id = 0x0002, .len = 4 } | ||
34 | #define WUSB_AR_AssociationStatus { .id = 0x0004, .len = 4 } | ||
35 | #define WUSB_AR_LangID { .id = 0x0008, .len = 2 } | ||
36 | #define WUSB_AR_DeviceFriendlyName { .id = 0x000b, .len = 64 } /* max */ | ||
37 | #define WUSB_AR_HostFriendlyName { .id = 0x000c, .len = 64 } /* max */ | ||
38 | #define WUSB_AR_CHID { .id = 0x1000, .len = 16 } | ||
39 | #define WUSB_AR_CDID { .id = 0x1001, .len = 16 } | ||
40 | #define WUSB_AR_ConnectionContext { .id = 0x1002, .len = 48 } | ||
41 | #define WUSB_AR_BandGroups { .id = 0x1004, .len = 2 } | ||
42 | |||
43 | /* CBAF Control Requests (AMS1.0[T4-1] */ | ||
44 | enum { | ||
45 | CBAF_REQ_GET_ASSOCIATION_INFORMATION = 0x01, | ||
46 | CBAF_REQ_GET_ASSOCIATION_REQUEST, | ||
47 | CBAF_REQ_SET_ASSOCIATION_RESPONSE | ||
48 | }; | ||
49 | |||
50 | /* | ||
51 | * CBAF USB-interface defitions | ||
52 | * | ||
53 | * No altsettings, one optional interrupt endpoint. | ||
54 | */ | ||
55 | enum { | ||
56 | CBAF_IFACECLASS = 0xef, | ||
57 | CBAF_IFACESUBCLASS = 0x03, | ||
58 | CBAF_IFACEPROTOCOL = 0x01, | ||
59 | }; | ||
60 | |||
61 | /* Association Information (AMS1.0[T4-3]) */ | ||
62 | struct wusb_cbaf_assoc_info { | ||
63 | __le16 Length; | ||
64 | __u8 NumAssociationRequests; | ||
65 | __le16 Flags; | ||
66 | __u8 AssociationRequestsArray[]; | ||
67 | } __attribute__((packed)); | ||
68 | |||
69 | /* Association Request (AMS1.0[T4-4]) */ | ||
70 | struct wusb_cbaf_assoc_request { | ||
71 | __u8 AssociationDataIndex; | ||
72 | __u8 Reserved; | ||
73 | __le16 AssociationTypeId; | ||
74 | __le16 AssociationSubTypeId; | ||
75 | __le32 AssociationTypeInfoSize; | ||
76 | } __attribute__((packed)); | ||
77 | |||
78 | enum { | ||
79 | AR_TYPE_WUSB = 0x0001, | ||
80 | AR_TYPE_WUSB_RETRIEVE_HOST_INFO = 0x0000, | ||
81 | AR_TYPE_WUSB_ASSOCIATE = 0x0001, | ||
82 | }; | ||
83 | |||
84 | /* Association Attribute header (AMS1.0[3.8]) */ | ||
85 | struct wusb_cbaf_attr_hdr { | ||
86 | __le16 id; | ||
87 | __le16 len; | ||
88 | } __attribute__((packed)); | ||
89 | |||
90 | /* Host Info (AMS1.0[T4-7]) (yeah, more headers and fields...) */ | ||
91 | struct wusb_cbaf_host_info { | ||
92 | struct wusb_cbaf_attr_hdr AssociationTypeId_hdr; | ||
93 | __le16 AssociationTypeId; | ||
94 | struct wusb_cbaf_attr_hdr AssociationSubTypeId_hdr; | ||
95 | __le16 AssociationSubTypeId; | ||
96 | struct wusb_cbaf_attr_hdr CHID_hdr; | ||
97 | struct wusb_ckhdid CHID; | ||
98 | struct wusb_cbaf_attr_hdr LangID_hdr; | ||
99 | __le16 LangID; | ||
100 | struct wusb_cbaf_attr_hdr HostFriendlyName_hdr; | ||
101 | __u8 HostFriendlyName[]; | ||
102 | } __attribute__((packed)); | ||
103 | |||
104 | /* Device Info (AMS1.0[T4-8]) | ||
105 | * | ||
106 | * I still don't get this tag'n'header stuff for each goddamn | ||
107 | * field... | ||
108 | */ | ||
109 | struct wusb_cbaf_device_info { | ||
110 | struct wusb_cbaf_attr_hdr Length_hdr; | ||
111 | __le32 Length; | ||
112 | struct wusb_cbaf_attr_hdr CDID_hdr; | ||
113 | struct wusb_ckhdid CDID; | ||
114 | struct wusb_cbaf_attr_hdr BandGroups_hdr; | ||
115 | __le16 BandGroups; | ||
116 | struct wusb_cbaf_attr_hdr LangID_hdr; | ||
117 | __le16 LangID; | ||
118 | struct wusb_cbaf_attr_hdr DeviceFriendlyName_hdr; | ||
119 | __u8 DeviceFriendlyName[]; | ||
120 | } __attribute__((packed)); | ||
121 | |||
122 | /* Connection Context; CC_DATA - Success case (AMS1.0[T4-9]) */ | ||
123 | struct wusb_cbaf_cc_data { | ||
124 | struct wusb_cbaf_attr_hdr AssociationTypeId_hdr; | ||
125 | __le16 AssociationTypeId; | ||
126 | struct wusb_cbaf_attr_hdr AssociationSubTypeId_hdr; | ||
127 | __le16 AssociationSubTypeId; | ||
128 | struct wusb_cbaf_attr_hdr Length_hdr; | ||
129 | __le32 Length; | ||
130 | struct wusb_cbaf_attr_hdr ConnectionContext_hdr; | ||
131 | struct wusb_ckhdid CHID; | ||
132 | struct wusb_ckhdid CDID; | ||
133 | struct wusb_ckhdid CK; | ||
134 | struct wusb_cbaf_attr_hdr BandGroups_hdr; | ||
135 | __le16 BandGroups; | ||
136 | } __attribute__((packed)); | ||
137 | |||
138 | /* CC_DATA - Failure case (AMS1.0[T4-10]) */ | ||
139 | struct wusb_cbaf_cc_data_fail { | ||
140 | struct wusb_cbaf_attr_hdr AssociationTypeId_hdr; | ||
141 | __le16 AssociationTypeId; | ||
142 | struct wusb_cbaf_attr_hdr AssociationSubTypeId_hdr; | ||
143 | __le16 AssociationSubTypeId; | ||
144 | struct wusb_cbaf_attr_hdr Length_hdr; | ||
145 | __le16 Length; | ||
146 | struct wusb_cbaf_attr_hdr AssociationStatus_hdr; | ||
147 | __u32 AssociationStatus; | ||
148 | } __attribute__((packed)); | ||
149 | |||
150 | #endif /* __LINUX_USB_ASSOCIATION_H */ | ||
diff --git a/include/linux/usb/c67x00.h b/include/linux/usb/c67x00.h new file mode 100644 index 000000000000..83c6b45470ca --- /dev/null +++ b/include/linux/usb/c67x00.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * usb_c67x00.h: platform definitions for the Cypress C67X00 USB chip | ||
3 | * | ||
4 | * Copyright (C) 2006-2008 Barco N.V. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301 USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef _LINUX_USB_C67X00_H | ||
23 | #define _LINUX_USB_C67X00_H | ||
24 | |||
25 | /* SIE configuration */ | ||
26 | #define C67X00_SIE_UNUSED 0 | ||
27 | #define C67X00_SIE_HOST 1 | ||
28 | #define C67X00_SIE_PERIPHERAL_A 2 /* peripheral on A port */ | ||
29 | #define C67X00_SIE_PERIPHERAL_B 3 /* peripheral on B port */ | ||
30 | |||
31 | #define c67x00_sie_config(config, n) (((config)>>(4*(n)))&0x3) | ||
32 | |||
33 | #define C67X00_SIE1_UNUSED (C67X00_SIE_UNUSED << 0) | ||
34 | #define C67X00_SIE1_HOST (C67X00_SIE_HOST << 0) | ||
35 | #define C67X00_SIE1_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 0) | ||
36 | #define C67X00_SIE1_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 0) | ||
37 | |||
38 | #define C67X00_SIE2_UNUSED (C67X00_SIE_UNUSED << 4) | ||
39 | #define C67X00_SIE2_HOST (C67X00_SIE_HOST << 4) | ||
40 | #define C67X00_SIE2_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 4) | ||
41 | #define C67X00_SIE2_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 4) | ||
42 | |||
43 | struct c67x00_platform_data { | ||
44 | int sie_config; /* SIEs config (C67X00_SIEx_*) */ | ||
45 | unsigned long hpi_regstep; /* Step between HPI registers */ | ||
46 | }; | ||
47 | |||
48 | #endif /* _LINUX_USB_C67X00_H */ | ||
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 71e52f2f6a38..ca228bb94218 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -130,6 +130,15 @@ struct usb_cdc_ether_desc { | |||
130 | __u8 bNumberPowerFilters; | 130 | __u8 bNumberPowerFilters; |
131 | } __attribute__ ((packed)); | 131 | } __attribute__ ((packed)); |
132 | 132 | ||
133 | /* "Telephone Control Model Functional Descriptor" from CDC WMC spec 6.3..3 */ | ||
134 | struct usb_cdc_dmm_desc { | ||
135 | __u8 bFunctionLength; | ||
136 | __u8 bDescriptorType; | ||
137 | __u8 bDescriptorSubtype; | ||
138 | __u16 bcdVersion; | ||
139 | __le16 wMaxCommand; | ||
140 | } __attribute__ ((packed)); | ||
141 | |||
133 | /* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */ | 142 | /* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */ |
134 | struct usb_cdc_mdlm_desc { | 143 | struct usb_cdc_mdlm_desc { |
135 | __u8 bLength; | 144 | __u8 bLength; |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 7e0d3084f76c..73a2f4eb1f7a 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -455,7 +455,7 @@ struct usb_encryption_descriptor { | |||
455 | 455 | ||
456 | /*-------------------------------------------------------------------------*/ | 456 | /*-------------------------------------------------------------------------*/ |
457 | 457 | ||
458 | /* USB_DT_BOS: group of wireless capabilities */ | 458 | /* USB_DT_BOS: group of device-level capabilities */ |
459 | struct usb_bos_descriptor { | 459 | struct usb_bos_descriptor { |
460 | __u8 bLength; | 460 | __u8 bLength; |
461 | __u8 bDescriptorType; | 461 | __u8 bDescriptorType; |
@@ -501,6 +501,16 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */ | |||
501 | __u8 bReserved; | 501 | __u8 bReserved; |
502 | } __attribute__((packed)); | 502 | } __attribute__((packed)); |
503 | 503 | ||
504 | #define USB_CAP_TYPE_EXT 2 | ||
505 | |||
506 | struct usb_ext_cap_descriptor { /* Link Power Management */ | ||
507 | __u8 bLength; | ||
508 | __u8 bDescriptorType; | ||
509 | __u8 bDevCapabilityType; | ||
510 | __u8 bmAttributes; | ||
511 | #define USB_LPM_SUPPORT (1 << 1) /* supports LPM */ | ||
512 | } __attribute__((packed)); | ||
513 | |||
504 | /*-------------------------------------------------------------------------*/ | 514 | /*-------------------------------------------------------------------------*/ |
505 | 515 | ||
506 | /* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with | 516 | /* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index d8128f7102c9..cf468fbdbf8e 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -114,6 +114,8 @@ struct usb_ep_ops { | |||
114 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); | 114 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); |
115 | 115 | ||
116 | int (*set_halt) (struct usb_ep *ep, int value); | 116 | int (*set_halt) (struct usb_ep *ep, int value); |
117 | int (*set_wedge) (struct usb_ep *ep); | ||
118 | |||
117 | int (*fifo_status) (struct usb_ep *ep); | 119 | int (*fifo_status) (struct usb_ep *ep); |
118 | void (*fifo_flush) (struct usb_ep *ep); | 120 | void (*fifo_flush) (struct usb_ep *ep); |
119 | }; | 121 | }; |
@@ -349,6 +351,25 @@ static inline int usb_ep_clear_halt(struct usb_ep *ep) | |||
349 | } | 351 | } |
350 | 352 | ||
351 | /** | 353 | /** |
354 | * usb_ep_set_wedge - sets the halt feature and ignores clear requests | ||
355 | * @ep: the endpoint being wedged | ||
356 | * | ||
357 | * Use this to stall an endpoint and ignore CLEAR_FEATURE(HALT_ENDPOINT) | ||
358 | * requests. If the gadget driver clears the halt status, it will | ||
359 | * automatically unwedge the endpoint. | ||
360 | * | ||
361 | * Returns zero on success, else negative errno. | ||
362 | */ | ||
363 | static inline int | ||
364 | usb_ep_set_wedge(struct usb_ep *ep) | ||
365 | { | ||
366 | if (ep->ops->set_wedge) | ||
367 | return ep->ops->set_wedge(ep); | ||
368 | else | ||
369 | return ep->ops->set_halt(ep, 1); | ||
370 | } | ||
371 | |||
372 | /** | ||
352 | * usb_ep_fifo_status - returns number of bytes in fifo, or error | 373 | * usb_ep_fifo_status - returns number of bytes in fifo, or error |
353 | * @ep: the endpoint whose fifo status is being checked. | 374 | * @ep: the endpoint whose fifo status is being checked. |
354 | * | 375 | * |
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index 4d0909e53595..79b9837d9ca0 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h | |||
@@ -17,6 +17,11 @@ | |||
17 | #else | 17 | #else |
18 | #define MODULE_VERMAGIC_MODULE_UNLOAD "" | 18 | #define MODULE_VERMAGIC_MODULE_UNLOAD "" |
19 | #endif | 19 | #endif |
20 | #ifdef CONFIG_MODVERSIONS | ||
21 | #define MODULE_VERMAGIC_MODVERSIONS "modversions " | ||
22 | #else | ||
23 | #define MODULE_VERMAGIC_MODVERSIONS "" | ||
24 | #endif | ||
20 | #ifndef MODULE_ARCH_VERMAGIC | 25 | #ifndef MODULE_ARCH_VERMAGIC |
21 | #define MODULE_ARCH_VERMAGIC "" | 26 | #define MODULE_ARCH_VERMAGIC "" |
22 | #endif | 27 | #endif |
@@ -24,5 +29,6 @@ | |||
24 | #define VERMAGIC_STRING \ | 29 | #define VERMAGIC_STRING \ |
25 | UTS_RELEASE " " \ | 30 | UTS_RELEASE " " \ |
26 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ | 31 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ |
27 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC | 32 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \ |
33 | MODULE_ARCH_VERMAGIC | ||
28 | 34 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index c1411189ba6c..4a535ea1e123 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -865,9 +865,9 @@ struct v4l2_querymenu | |||
865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) | 865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) |
866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) | 866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) |
867 | 867 | ||
868 | /* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ | 868 | /* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ |
869 | #define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) | 869 | #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) |
870 | #define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) | 870 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) |
871 | 871 | ||
872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | 872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) |
873 | enum v4l2_power_line_frequency { | 873 | enum v4l2_power_line_frequency { |
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index e7d10845b3c1..06005fa9e982 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -76,6 +76,7 @@ struct virtqueue_ops { | |||
76 | * @dev: underlying device. | 76 | * @dev: underlying device. |
77 | * @id: the device type identification (used to match it with a driver). | 77 | * @id: the device type identification (used to match it with a driver). |
78 | * @config: the configuration ops for this device. | 78 | * @config: the configuration ops for this device. |
79 | * @features: the features supported by both driver and device. | ||
79 | * @priv: private pointer for the driver's use. | 80 | * @priv: private pointer for the driver's use. |
80 | */ | 81 | */ |
81 | struct virtio_device | 82 | struct virtio_device |
@@ -84,6 +85,8 @@ struct virtio_device | |||
84 | struct device dev; | 85 | struct device dev; |
85 | struct virtio_device_id id; | 86 | struct virtio_device_id id; |
86 | struct virtio_config_ops *config; | 87 | struct virtio_config_ops *config; |
88 | /* Note that this is a Linux set_bit-style bitmap. */ | ||
89 | unsigned long features[1]; | ||
87 | void *priv; | 90 | void *priv; |
88 | }; | 91 | }; |
89 | 92 | ||
@@ -94,6 +97,8 @@ void unregister_virtio_device(struct virtio_device *dev); | |||
94 | * virtio_driver - operations for a virtio I/O driver | 97 | * virtio_driver - operations for a virtio I/O driver |
95 | * @driver: underlying device driver (populate name and owner). | 98 | * @driver: underlying device driver (populate name and owner). |
96 | * @id_table: the ids serviced by this driver. | 99 | * @id_table: the ids serviced by this driver. |
100 | * @feature_table: an array of feature numbers supported by this device. | ||
101 | * @feature_table_size: number of entries in the feature table array. | ||
97 | * @probe: the function to call when a device is found. Returns a token for | 102 | * @probe: the function to call when a device is found. Returns a token for |
98 | * remove, or PTR_ERR(). | 103 | * remove, or PTR_ERR(). |
99 | * @remove: the function when a device is removed. | 104 | * @remove: the function when a device is removed. |
@@ -103,6 +108,8 @@ void unregister_virtio_device(struct virtio_device *dev); | |||
103 | struct virtio_driver { | 108 | struct virtio_driver { |
104 | struct device_driver driver; | 109 | struct device_driver driver; |
105 | const struct virtio_device_id *id_table; | 110 | const struct virtio_device_id *id_table; |
111 | const unsigned int *feature_table; | ||
112 | unsigned int feature_table_size; | ||
106 | int (*probe)(struct virtio_device *dev); | 113 | int (*probe)(struct virtio_device *dev); |
107 | void (*remove)(struct virtio_device *dev); | 114 | void (*remove)(struct virtio_device *dev); |
108 | void (*config_changed)(struct virtio_device *dev); | 115 | void (*config_changed)(struct virtio_device *dev); |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index bca0b10d7947..5f79a5f9de79 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -9,15 +9,23 @@ | |||
9 | #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */ | 9 | #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */ |
10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ | 10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ |
11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ | 11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ |
12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ | ||
13 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ | ||
12 | 14 | ||
13 | struct virtio_blk_config | 15 | struct virtio_blk_config |
14 | { | 16 | { |
15 | /* The capacity (in 512-byte sectors). */ | 17 | /* The capacity (in 512-byte sectors). */ |
16 | __le64 capacity; | 18 | __u64 capacity; |
17 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ | 19 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ |
18 | __le32 size_max; | 20 | __u32 size_max; |
19 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ | 21 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ |
20 | __le32 seg_max; | 22 | __u32 seg_max; |
23 | /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ | ||
24 | struct virtio_blk_geometry { | ||
25 | __u16 cylinders; | ||
26 | __u8 heads; | ||
27 | __u8 sectors; | ||
28 | } geometry; | ||
21 | } __attribute__((packed)); | 29 | } __attribute__((packed)); |
22 | 30 | ||
23 | /* These two define direction. */ | 31 | /* These two define direction. */ |
@@ -41,13 +49,8 @@ struct virtio_blk_outhdr | |||
41 | __u64 sector; | 49 | __u64 sector; |
42 | }; | 50 | }; |
43 | 51 | ||
52 | /* And this is the final byte of the write scatter-gather list. */ | ||
44 | #define VIRTIO_BLK_S_OK 0 | 53 | #define VIRTIO_BLK_S_OK 0 |
45 | #define VIRTIO_BLK_S_IOERR 1 | 54 | #define VIRTIO_BLK_S_IOERR 1 |
46 | #define VIRTIO_BLK_S_UNSUPP 2 | 55 | #define VIRTIO_BLK_S_UNSUPP 2 |
47 | |||
48 | /* This is the first element of the write scatter-gather list */ | ||
49 | struct virtio_blk_inhdr | ||
50 | { | ||
51 | unsigned char status; | ||
52 | }; | ||
53 | #endif /* _LINUX_VIRTIO_BLK_H */ | 56 | #endif /* _LINUX_VIRTIO_BLK_H */ |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index d581b2914b34..f364bbf63c34 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -15,28 +15,25 @@ | |||
15 | /* We've given up on this device. */ | 15 | /* We've given up on this device. */ |
16 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 16 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
17 | 17 | ||
18 | /* Do we get callbacks when the ring is completely used, even if we've | ||
19 | * suppressed them? */ | ||
20 | #define VIRTIO_F_NOTIFY_ON_EMPTY 24 | ||
21 | |||
18 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
19 | struct virtio_device; | 23 | #include <linux/virtio.h> |
20 | 24 | ||
21 | /** | 25 | /** |
22 | * virtio_config_ops - operations for configuring a virtio device | 26 | * virtio_config_ops - operations for configuring a virtio device |
23 | * @feature: search for a feature in this config | ||
24 | * vdev: the virtio_device | ||
25 | * bit: the feature bit | ||
26 | * Returns true if the feature is supported. Acknowledges the feature | ||
27 | * so the host can see it. | ||
28 | * @get: read the value of a configuration field | 27 | * @get: read the value of a configuration field |
29 | * vdev: the virtio_device | 28 | * vdev: the virtio_device |
30 | * offset: the offset of the configuration field | 29 | * offset: the offset of the configuration field |
31 | * buf: the buffer to write the field value into. | 30 | * buf: the buffer to write the field value into. |
32 | * len: the length of the buffer | 31 | * len: the length of the buffer |
33 | * Note that contents are conventionally little-endian. | ||
34 | * @set: write the value of a configuration field | 32 | * @set: write the value of a configuration field |
35 | * vdev: the virtio_device | 33 | * vdev: the virtio_device |
36 | * offset: the offset of the configuration field | 34 | * offset: the offset of the configuration field |
37 | * buf: the buffer to read the field value from. | 35 | * buf: the buffer to read the field value from. |
38 | * len: the length of the buffer | 36 | * len: the length of the buffer |
39 | * Note that contents are conventionally little-endian. | ||
40 | * @get_status: read the status byte | 37 | * @get_status: read the status byte |
41 | * vdev: the virtio_device | 38 | * vdev: the virtio_device |
42 | * Returns the status byte | 39 | * Returns the status byte |
@@ -52,10 +49,15 @@ struct virtio_device; | |||
52 | * callback: the virqtueue callback | 49 | * callback: the virqtueue callback |
53 | * Returns the new virtqueue or ERR_PTR() (eg. -ENOENT). | 50 | * Returns the new virtqueue or ERR_PTR() (eg. -ENOENT). |
54 | * @del_vq: free a virtqueue found by find_vq(). | 51 | * @del_vq: free a virtqueue found by find_vq(). |
52 | * @get_features: get the array of feature bits for this device. | ||
53 | * vdev: the virtio_device | ||
54 | * Returns the first 32 feature bits (all we currently need). | ||
55 | * @set_features: confirm what device features we'll be using. | ||
56 | * vdev: the virtio_device | ||
57 | * feature: the first 32 feature bits | ||
55 | */ | 58 | */ |
56 | struct virtio_config_ops | 59 | struct virtio_config_ops |
57 | { | 60 | { |
58 | bool (*feature)(struct virtio_device *vdev, unsigned bit); | ||
59 | void (*get)(struct virtio_device *vdev, unsigned offset, | 61 | void (*get)(struct virtio_device *vdev, unsigned offset, |
60 | void *buf, unsigned len); | 62 | void *buf, unsigned len); |
61 | void (*set)(struct virtio_device *vdev, unsigned offset, | 63 | void (*set)(struct virtio_device *vdev, unsigned offset, |
@@ -67,43 +69,52 @@ struct virtio_config_ops | |||
67 | unsigned index, | 69 | unsigned index, |
68 | void (*callback)(struct virtqueue *)); | 70 | void (*callback)(struct virtqueue *)); |
69 | void (*del_vq)(struct virtqueue *vq); | 71 | void (*del_vq)(struct virtqueue *vq); |
72 | u32 (*get_features)(struct virtio_device *vdev); | ||
73 | void (*set_features)(struct virtio_device *vdev, u32 features); | ||
70 | }; | 74 | }; |
71 | 75 | ||
76 | /* If driver didn't advertise the feature, it will never appear. */ | ||
77 | void virtio_check_driver_offered_feature(const struct virtio_device *vdev, | ||
78 | unsigned int fbit); | ||
79 | |||
72 | /** | 80 | /** |
73 | * virtio_config_val - look for a feature and get a single virtio config. | 81 | * virtio_has_feature - helper to determine if this device has this feature. |
74 | * @vdev: the virtio device | 82 | * @vdev: the device |
75 | * @fbit: the feature bit | 83 | * @fbit: the feature bit |
76 | * @offset: the type to search for. | 84 | */ |
77 | * @val: a pointer to the value to fill in. | 85 | static inline bool virtio_has_feature(const struct virtio_device *vdev, |
78 | * | 86 | unsigned int fbit) |
79 | * The return value is -ENOENT if the feature doesn't exist. Otherwise | 87 | { |
80 | * the value is endian-corrected and returned in v. */ | 88 | /* Did you forget to fix assumptions on max features? */ |
81 | #define virtio_config_val(vdev, fbit, offset, v) ({ \ | 89 | if (__builtin_constant_p(fbit)) |
82 | int _err; \ | 90 | BUILD_BUG_ON(fbit >= 32); |
83 | if ((vdev)->config->feature((vdev), (fbit))) { \ | 91 | |
84 | __virtio_config_val((vdev), (offset), (v)); \ | 92 | virtio_check_driver_offered_feature(vdev, fbit); |
85 | _err = 0; \ | 93 | return test_bit(fbit, vdev->features); |
86 | } else \ | 94 | } |
87 | _err = -ENOENT; \ | ||
88 | _err; \ | ||
89 | }) | ||
90 | 95 | ||
91 | /** | 96 | /** |
92 | * __virtio_config_val - get a single virtio config without feature check. | 97 | * virtio_config_val - look for a feature and get a virtio config entry. |
93 | * @vdev: the virtio device | 98 | * @vdev: the virtio device |
99 | * @fbit: the feature bit | ||
94 | * @offset: the type to search for. | 100 | * @offset: the type to search for. |
95 | * @val: a pointer to the value to fill in. | 101 | * @val: a pointer to the value to fill in. |
96 | * | 102 | * |
97 | * The value is endian-corrected and returned in v. */ | 103 | * The return value is -ENOENT if the feature doesn't exist. Otherwise |
98 | #define __virtio_config_val(vdev, offset, v) do { \ | 104 | * the config value is copied into whatever is pointed to by v. */ |
99 | BUILD_BUG_ON(sizeof(*(v)) != 1 && sizeof(*(v)) != 2 \ | 105 | #define virtio_config_val(vdev, fbit, offset, v) \ |
100 | && sizeof(*(v)) != 4 && sizeof(*(v)) != 8); \ | 106 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v)) |
101 | (vdev)->config->get((vdev), (offset), (v), sizeof(*(v))); \ | 107 | |
102 | switch (sizeof(*(v))) { \ | 108 | static inline int virtio_config_buf(struct virtio_device *vdev, |
103 | case 2: le16_to_cpus((__u16 *) v); break; \ | 109 | unsigned int fbit, |
104 | case 4: le32_to_cpus((__u32 *) v); break; \ | 110 | unsigned int offset, |
105 | case 8: le64_to_cpus((__u64 *) v); break; \ | 111 | void *buf, unsigned len) |
106 | } \ | 112 | { |
107 | } while(0) | 113 | if (!virtio_has_feature(vdev, fbit)) |
114 | return -ENOENT; | ||
115 | |||
116 | vdev->config->get(vdev, offset, buf, len); | ||
117 | return 0; | ||
118 | } | ||
108 | #endif /* __KERNEL__ */ | 119 | #endif /* __KERNEL__ */ |
109 | #endif /* _LINUX_VIRTIO_CONFIG_H */ | 120 | #endif /* _LINUX_VIRTIO_CONFIG_H */ |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 1ea3351df609..38c0571820fb 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -6,9 +6,18 @@ | |||
6 | #define VIRTIO_ID_NET 1 | 6 | #define VIRTIO_ID_NET 1 |
7 | 7 | ||
8 | /* The feature bitmap for virtio net */ | 8 | /* The feature bitmap for virtio net */ |
9 | #define VIRTIO_NET_F_CSUM 0 /* Can handle pkts w/ partial csum */ | 9 | #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */ |
10 | #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */ | ||
10 | #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ | 11 | #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ |
11 | #define VIRTIO_NET_F_GSO 6 /* Can handle pkts w/ any GSO type */ | 12 | #define VIRTIO_NET_F_GSO 6 /* Host handles pkts w/ any GSO type */ |
13 | #define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */ | ||
14 | #define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */ | ||
15 | #define VIRTIO_NET_F_GUEST_ECN 9 /* Guest can handle TSO[6] w/ ECN in. */ | ||
16 | #define VIRTIO_NET_F_GUEST_UFO 10 /* Guest can handle UFO in. */ | ||
17 | #define VIRTIO_NET_F_HOST_TSO4 11 /* Host can handle TSOv4 in. */ | ||
18 | #define VIRTIO_NET_F_HOST_TSO6 12 /* Host can handle TSOv6 in. */ | ||
19 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ | ||
20 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ | ||
12 | 21 | ||
13 | struct virtio_net_config | 22 | struct virtio_net_config |
14 | { | 23 | { |
@@ -29,7 +38,7 @@ struct virtio_net_hdr | |||
29 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set | 38 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set |
30 | __u8 gso_type; | 39 | __u8 gso_type; |
31 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ | 40 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ |
32 | __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */ | 41 | __u16 gso_size; /* Bytes to append to hdr_len per frame */ |
33 | __u16 csum_start; /* Position to start checksumming from */ | 42 | __u16 csum_start; /* Position to start checksumming from */ |
34 | __u16 csum_offset; /* Offset after that to place checksum */ | 43 | __u16 csum_offset; /* Offset after that to place checksum */ |
35 | }; | 44 | }; |
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h new file mode 100644 index 000000000000..331afb6c9f62 --- /dev/null +++ b/include/linux/virtio_rng.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LINUX_VIRTIO_RNG_H | ||
2 | #define _LINUX_VIRTIO_RNG_H | ||
3 | #include <linux/virtio_config.h> | ||
4 | |||
5 | /* The ID for virtio_rng */ | ||
6 | #define VIRTIO_ID_RNG 4 | ||
7 | |||
8 | #endif /* _LINUX_VIRTIO_RNG_H */ | ||
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index 2864b1699ecc..0a9b5b41ed67 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -69,14 +69,9 @@ | |||
69 | 69 | ||
70 | /***************************** INCLUDES *****************************/ | 70 | /***************************** INCLUDES *****************************/ |
71 | 71 | ||
72 | /* This header is used in user-space, therefore need to be sanitised | 72 | #include <linux/types.h> /* for __u* and __s* typedefs */ |
73 | * for that purpose. Those includes are usually not compatible with glibc. | ||
74 | * To know which includes to use in user-space, check iwlib.h. */ | ||
75 | #ifdef __KERNEL__ | ||
76 | #include <linux/types.h> /* for "caddr_t" et al */ | ||
77 | #include <linux/socket.h> /* for "struct sockaddr" et al */ | 73 | #include <linux/socket.h> /* for "struct sockaddr" et al */ |
78 | #include <linux/if.h> /* for IFNAMSIZ and co... */ | 74 | #include <linux/if.h> /* for IFNAMSIZ and co... */ |
79 | #endif /* __KERNEL__ */ | ||
80 | 75 | ||
81 | /***************************** VERSION *****************************/ | 76 | /***************************** VERSION *****************************/ |
82 | /* | 77 | /* |
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h index 4d13732e9cf0..6f69968eab24 100644 --- a/include/linux/wm97xx.h +++ b/include/linux/wm97xx.h | |||
@@ -100,6 +100,7 @@ | |||
100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ | 100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ |
101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ | 101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ |
102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ | 102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ |
103 | #define WM9713_45W 0x1000 /* set for 5 wire panel */ | ||
103 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ | 104 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ |
104 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ | 105 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ |
105 | #define WM9713_WAIT 0x0200 /* coordinate wait */ | 106 | #define WM9713_WAIT 0x0200 /* coordinate wait */ |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 2ca6bae88721..fb0c215a3051 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -339,6 +339,7 @@ struct xfrm_usersa_info { | |||
339 | #define XFRM_STATE_NOPMTUDISC 4 | 339 | #define XFRM_STATE_NOPMTUDISC 4 |
340 | #define XFRM_STATE_WILDRECV 8 | 340 | #define XFRM_STATE_WILDRECV 8 |
341 | #define XFRM_STATE_ICMP 16 | 341 | #define XFRM_STATE_ICMP 16 |
342 | #define XFRM_STATE_AF_UNSPEC 32 | ||
342 | }; | 343 | }; |
343 | 344 | ||
344 | struct xfrm_usersa_id { | 345 | struct xfrm_usersa_id { |
diff --git a/include/media/cx25840.h b/include/media/cx25840.h index cd599ad29fb2..db431d513f2f 100644 --- a/include/media/cx25840.h +++ b/include/media/cx25840.h | |||
@@ -32,12 +32,16 @@ enum cx25840_video_input { | |||
32 | CX25840_COMPOSITE7, | 32 | CX25840_COMPOSITE7, |
33 | CX25840_COMPOSITE8, | 33 | CX25840_COMPOSITE8, |
34 | 34 | ||
35 | /* S-Video inputs consist of one luma input (In1-In4) ORed with one | 35 | /* S-Video inputs consist of one luma input (In1-In8) ORed with one |
36 | chroma input (In5-In8) */ | 36 | chroma input (In5-In8) */ |
37 | CX25840_SVIDEO_LUMA1 = 0x10, | 37 | CX25840_SVIDEO_LUMA1 = 0x10, |
38 | CX25840_SVIDEO_LUMA2 = 0x20, | 38 | CX25840_SVIDEO_LUMA2 = 0x20, |
39 | CX25840_SVIDEO_LUMA3 = 0x30, | 39 | CX25840_SVIDEO_LUMA3 = 0x30, |
40 | CX25840_SVIDEO_LUMA4 = 0x40, | 40 | CX25840_SVIDEO_LUMA4 = 0x40, |
41 | CX25840_SVIDEO_LUMA5 = 0x50, | ||
42 | CX25840_SVIDEO_LUMA6 = 0x60, | ||
43 | CX25840_SVIDEO_LUMA7 = 0x70, | ||
44 | CX25840_SVIDEO_LUMA8 = 0x80, | ||
41 | CX25840_SVIDEO_CHROMA4 = 0x400, | 45 | CX25840_SVIDEO_CHROMA4 = 0x400, |
42 | CX25840_SVIDEO_CHROMA5 = 0x500, | 46 | CX25840_SVIDEO_CHROMA5 = 0x500, |
43 | CX25840_SVIDEO_CHROMA6 = 0x600, | 47 | CX25840_SVIDEO_CHROMA6 = 0x600, |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index bfee8be5d63f..b8e8aa91905a 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -146,6 +146,7 @@ extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE]; | |||
146 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; | 146 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; |
147 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; | 147 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; |
148 | extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; | 148 | extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; |
149 | extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE]; | ||
149 | 150 | ||
150 | #endif | 151 | #endif |
151 | 152 | ||
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index a807d2f86ee8..859f7a6f6f67 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -40,10 +40,9 @@ | |||
40 | #define VFL_TYPE_VTX 3 | 40 | #define VFL_TYPE_VTX 3 |
41 | 41 | ||
42 | /* Video standard functions */ | 42 | /* Video standard functions */ |
43 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | 43 | extern const char *v4l2_norm_to_name(v4l2_std_id id); |
44 | extern char *v4l2_norm_to_name(v4l2_std_id id); | ||
45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 44 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, |
46 | int id, char *name); | 45 | int id, const char *name); |
47 | /* Prints the ioctl in a human-readable format */ | 46 | /* Prints the ioctl in a human-readable format */ |
48 | extern void v4l_printk_ioctl(unsigned int cmd); | 47 | extern void v4l_printk_ioctl(unsigned int cmd); |
49 | 48 | ||
diff --git a/include/media/v4l2-i2c-drv-legacy.h b/include/media/v4l2-i2c-drv-legacy.h index 347b6f8beb23..878562278b67 100644 --- a/include/media/v4l2-i2c-drv-legacy.h +++ b/include/media/v4l2-i2c-drv-legacy.h | |||
@@ -31,6 +31,7 @@ struct v4l2_i2c_driver_data { | |||
31 | int (*resume)(struct i2c_client *client); | 31 | int (*resume)(struct i2c_client *client); |
32 | int (*legacy_probe)(struct i2c_adapter *adapter); | 32 | int (*legacy_probe)(struct i2c_adapter *adapter); |
33 | int legacy_class; | 33 | int legacy_class; |
34 | const struct i2c_device_id *id_table; | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | static struct v4l2_i2c_driver_data v4l2_i2c_data; | 37 | static struct v4l2_i2c_driver_data v4l2_i2c_data; |
@@ -124,6 +125,7 @@ static int __init v4l2_i2c_drv_init(void) | |||
124 | v4l2_i2c_driver.command = v4l2_i2c_data.command; | 125 | v4l2_i2c_driver.command = v4l2_i2c_data.command; |
125 | v4l2_i2c_driver.probe = v4l2_i2c_data.probe; | 126 | v4l2_i2c_driver.probe = v4l2_i2c_data.probe; |
126 | v4l2_i2c_driver.remove = v4l2_i2c_data.remove; | 127 | v4l2_i2c_driver.remove = v4l2_i2c_data.remove; |
128 | v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table; | ||
127 | err = i2c_add_driver(&v4l2_i2c_driver); | 129 | err = i2c_add_driver(&v4l2_i2c_driver); |
128 | if (err) | 130 | if (err) |
129 | i2c_del_driver(&v4l2_i2c_driver_legacy); | 131 | i2c_del_driver(&v4l2_i2c_driver_legacy); |
diff --git a/include/media/v4l2-i2c-drv.h b/include/media/v4l2-i2c-drv.h index 7b6f06be7950..40ecef29801d 100644 --- a/include/media/v4l2-i2c-drv.h +++ b/include/media/v4l2-i2c-drv.h | |||
@@ -36,6 +36,7 @@ struct v4l2_i2c_driver_data { | |||
36 | int (*resume)(struct i2c_client *client); | 36 | int (*resume)(struct i2c_client *client); |
37 | int (*legacy_probe)(struct i2c_adapter *adapter); | 37 | int (*legacy_probe)(struct i2c_adapter *adapter); |
38 | int legacy_class; | 38 | int legacy_class; |
39 | const struct i2c_device_id *id_table; | ||
39 | }; | 40 | }; |
40 | 41 | ||
41 | static struct v4l2_i2c_driver_data v4l2_i2c_data; | 42 | static struct v4l2_i2c_driver_data v4l2_i2c_data; |
@@ -53,6 +54,7 @@ static int __init v4l2_i2c_drv_init(void) | |||
53 | v4l2_i2c_driver.remove = v4l2_i2c_data.remove; | 54 | v4l2_i2c_driver.remove = v4l2_i2c_data.remove; |
54 | v4l2_i2c_driver.suspend = v4l2_i2c_data.suspend; | 55 | v4l2_i2c_driver.suspend = v4l2_i2c_data.suspend; |
55 | v4l2_i2c_driver.resume = v4l2_i2c_data.resume; | 56 | v4l2_i2c_driver.resume = v4l2_i2c_data.resume; |
57 | v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table; | ||
56 | return i2c_add_driver(&v4l2_i2c_driver); | 58 | return i2c_add_driver(&v4l2_i2c_driver); |
57 | } | 59 | } |
58 | 60 | ||
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index 5b39a22533fe..874f1340d049 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h | |||
@@ -237,6 +237,9 @@ unsigned int videobuf_poll_stream(struct file *file, | |||
237 | int videobuf_mmap_setup(struct videobuf_queue *q, | 237 | int videobuf_mmap_setup(struct videobuf_queue *q, |
238 | unsigned int bcount, unsigned int bsize, | 238 | unsigned int bcount, unsigned int bsize, |
239 | enum v4l2_memory memory); | 239 | enum v4l2_memory memory); |
240 | int __videobuf_mmap_setup(struct videobuf_queue *q, | ||
241 | unsigned int bcount, unsigned int bsize, | ||
242 | enum v4l2_memory memory); | ||
240 | int videobuf_mmap_free(struct videobuf_queue *q); | 243 | int videobuf_mmap_free(struct videobuf_queue *q); |
241 | int videobuf_mmap_mapper(struct videobuf_queue *q, | 244 | int videobuf_mmap_mapper(struct videobuf_queue *q, |
242 | struct vm_area_struct *vma); | 245 | struct vm_area_struct *vma); |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 585eb4496990..b3d3e27c6299 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -29,14 +29,31 @@ | |||
29 | 29 | ||
30 | #ifdef CONFIG_NET_9P_DEBUG | 30 | #ifdef CONFIG_NET_9P_DEBUG |
31 | 31 | ||
32 | #define P9_DEBUG_ERROR (1<<0) | 32 | /** |
33 | #define P9_DEBUG_9P (1<<2) | 33 | * enum p9_debug_flags - bits for mount time debug parameter |
34 | #define P9_DEBUG_VFS (1<<3) | 34 | * @P9_DEBUG_ERROR: more verbose error messages including original error string |
35 | #define P9_DEBUG_CONV (1<<4) | 35 | * @P9_DEBUG_9P: 9P protocol tracing |
36 | #define P9_DEBUG_MUX (1<<5) | 36 | * @P9_DEBUG_VFS: VFS API tracing |
37 | #define P9_DEBUG_TRANS (1<<6) | 37 | * @P9_DEBUG_CONV: protocol conversion tracing |
38 | #define P9_DEBUG_SLABS (1<<7) | 38 | * @P9_DEBUG_MUX: trace management of concurrent transactions |
39 | #define P9_DEBUG_FCALL (1<<8) | 39 | * @P9_DEBUG_TRANS: transport tracing |
40 | * @P9_DEBUG_SLABS: memory management tracing | ||
41 | * @P9_DEBUG_FCALL: verbose dump of protocol messages | ||
42 | * | ||
43 | * These flags are passed at mount time to turn on various levels of | ||
44 | * verbosity and tracing which will be output to the system logs. | ||
45 | */ | ||
46 | |||
47 | enum p9_debug_flags { | ||
48 | P9_DEBUG_ERROR = (1<<0), | ||
49 | P9_DEBUG_9P = (1<<2), | ||
50 | P9_DEBUG_VFS = (1<<3), | ||
51 | P9_DEBUG_CONV = (1<<4), | ||
52 | P9_DEBUG_MUX = (1<<5), | ||
53 | P9_DEBUG_TRANS = (1<<6), | ||
54 | P9_DEBUG_SLABS = (1<<7), | ||
55 | P9_DEBUG_FCALL = (1<<8), | ||
56 | }; | ||
40 | 57 | ||
41 | extern unsigned int p9_debug_level; | 58 | extern unsigned int p9_debug_level; |
42 | 59 | ||
@@ -62,9 +79,47 @@ do { \ | |||
62 | format , __FUNCTION__, task_pid_nr(current), ## arg); \ | 79 | format , __FUNCTION__, task_pid_nr(current), ## arg); \ |
63 | } while (0) | 80 | } while (0) |
64 | 81 | ||
82 | /** | ||
83 | * enum p9_msg_t - 9P message types | ||
84 | * @P9_TVERSION: version handshake request | ||
85 | * @P9_RVERSION: version handshake response | ||
86 | * @P9_TAUTH: request to establish authentication channel | ||
87 | * @P9_RAUTH: response with authentication information | ||
88 | * @P9_TATTACH: establish user access to file service | ||
89 | * @P9_RATTACH: response with top level handle to file hierarchy | ||
90 | * @P9_TERROR: not used | ||
91 | * @P9_RERROR: response for any failed request | ||
92 | * @P9_TFLUSH: request to abort a previous request | ||
93 | * @P9_RFLUSH: response when previous request has been cancelled | ||
94 | * @P9_TWALK: descend a directory hierarchy | ||
95 | * @P9_RWALK: response with new handle for position within hierarchy | ||
96 | * @P9_TOPEN: prepare a handle for I/O on an existing file | ||
97 | * @P9_ROPEN: response with file access information | ||
98 | * @P9_TCREATE: prepare a handle for I/O on a new file | ||
99 | * @P9_RCREATE: response with file access information | ||
100 | * @P9_TREAD: request to transfer data from a file or directory | ||
101 | * @P9_RREAD: response with data requested | ||
102 | * @P9_TWRITE: reuqest to transfer data to a file | ||
103 | * @P9_RWRITE: response with out much data was transfered to file | ||
104 | * @P9_TCLUNK: forget about a handle to an entity within the file system | ||
105 | * @P9_RCLUNK: response when server has forgotten about the handle | ||
106 | * @P9_TREMOVE: request to remove an entity from the hierarchy | ||
107 | * @P9_RREMOVE: response when server has removed the entity | ||
108 | * @P9_TSTAT: request file entity attributes | ||
109 | * @P9_RSTAT: response with file entity attributes | ||
110 | * @P9_TWSTAT: request to update file entity attributes | ||
111 | * @P9_RWSTAT: response when file entity attributes are updated | ||
112 | * | ||
113 | * There are 14 basic operations in 9P2000, paired as | ||
114 | * requests and responses. The one special case is ERROR | ||
115 | * as there is no @P9_TERROR request for clients to transmit to | ||
116 | * the server, but the server may respond to any other request | ||
117 | * with an @P9_RERROR. | ||
118 | * | ||
119 | * See Also: http://plan9.bell-labs.com/sys/man/5/INDEX.html | ||
120 | */ | ||
65 | 121 | ||
66 | /* Message Types */ | 122 | enum p9_msg_t { |
67 | enum { | ||
68 | P9_TVERSION = 100, | 123 | P9_TVERSION = 100, |
69 | P9_RVERSION, | 124 | P9_RVERSION, |
70 | P9_TAUTH = 102, | 125 | P9_TAUTH = 102, |
@@ -95,30 +150,71 @@ enum { | |||
95 | P9_RWSTAT, | 150 | P9_RWSTAT, |
96 | }; | 151 | }; |
97 | 152 | ||
98 | /* open modes */ | 153 | /** |
99 | enum { | 154 | * enum p9_open_mode_t - 9P open modes |
155 | * @P9_OREAD: open file for reading only | ||
156 | * @P9_OWRITE: open file for writing only | ||
157 | * @P9_ORDWR: open file for reading or writing | ||
158 | * @P9_OEXEC: open file for execution | ||
159 | * @P9_OTRUNC: truncate file to zero-length before opening it | ||
160 | * @P9_OREXEC: close the file when an exec(2) system call is made | ||
161 | * @P9_ORCLOSE: remove the file when the file is closed | ||
162 | * @P9_OAPPEND: open the file and seek to the end | ||
163 | * @P9_OEXCL: only create a file, do not open it | ||
164 | * | ||
165 | * 9P open modes differ slightly from Posix standard modes. | ||
166 | * In particular, there are extra modes which specify different | ||
167 | * semantic behaviors than may be available on standard Posix | ||
168 | * systems. For example, @P9_OREXEC and @P9_ORCLOSE are modes that | ||
169 | * most likely will not be issued from the Linux VFS client, but may | ||
170 | * be supported by servers. | ||
171 | * | ||
172 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/open | ||
173 | */ | ||
174 | |||
175 | enum p9_open_mode_t { | ||
100 | P9_OREAD = 0x00, | 176 | P9_OREAD = 0x00, |
101 | P9_OWRITE = 0x01, | 177 | P9_OWRITE = 0x01, |
102 | P9_ORDWR = 0x02, | 178 | P9_ORDWR = 0x02, |
103 | P9_OEXEC = 0x03, | 179 | P9_OEXEC = 0x03, |
104 | P9_OEXCL = 0x04, | ||
105 | P9_OTRUNC = 0x10, | 180 | P9_OTRUNC = 0x10, |
106 | P9_OREXEC = 0x20, | 181 | P9_OREXEC = 0x20, |
107 | P9_ORCLOSE = 0x40, | 182 | P9_ORCLOSE = 0x40, |
108 | P9_OAPPEND = 0x80, | 183 | P9_OAPPEND = 0x80, |
109 | }; | 184 | P9_OEXCL = 0x1000, |
110 | 185 | }; | |
111 | /* permissions */ | 186 | |
112 | enum { | 187 | /** |
188 | * enum p9_perm_t - 9P permissions | ||
189 | * @P9_DMDIR: mode bite for directories | ||
190 | * @P9_DMAPPEND: mode bit for is append-only | ||
191 | * @P9_DMEXCL: mode bit for excluse use (only one open handle allowed) | ||
192 | * @P9_DMMOUNT: mode bite for mount points | ||
193 | * @P9_DMAUTH: mode bit for authentication file | ||
194 | * @P9_DMTMP: mode bit for non-backed-up files | ||
195 | * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u) | ||
196 | * @P9_DMLINK: mode bit for hard-link (9P2000.u) | ||
197 | * @P9_DMDEVICE: mode bit for device files (9P2000.u) | ||
198 | * @P9_DMNAMEDPIPE: mode bit for named pipe (9P2000.u) | ||
199 | * @P9_DMSOCKET: mode bit for socket (9P2000.u) | ||
200 | * @P9_DMSETUID: mode bit for setuid (9P2000.u) | ||
201 | * @P9_DMSETGID: mode bit for setgid (9P2000.u) | ||
202 | * @P9_DMSETVTX: mode bit for sticky bit (9P2000.u) | ||
203 | * | ||
204 | * 9P permissions differ slightly from Posix standard modes. | ||
205 | * | ||
206 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
207 | */ | ||
208 | enum p9_perm_t { | ||
113 | P9_DMDIR = 0x80000000, | 209 | P9_DMDIR = 0x80000000, |
114 | P9_DMAPPEND = 0x40000000, | 210 | P9_DMAPPEND = 0x40000000, |
115 | P9_DMEXCL = 0x20000000, | 211 | P9_DMEXCL = 0x20000000, |
116 | P9_DMMOUNT = 0x10000000, | 212 | P9_DMMOUNT = 0x10000000, |
117 | P9_DMAUTH = 0x08000000, | 213 | P9_DMAUTH = 0x08000000, |
118 | P9_DMTMP = 0x04000000, | 214 | P9_DMTMP = 0x04000000, |
215 | /* 9P2000.u extensions */ | ||
119 | P9_DMSYMLINK = 0x02000000, | 216 | P9_DMSYMLINK = 0x02000000, |
120 | P9_DMLINK = 0x01000000, | 217 | P9_DMLINK = 0x01000000, |
121 | /* 9P2000.u extensions */ | ||
122 | P9_DMDEVICE = 0x00800000, | 218 | P9_DMDEVICE = 0x00800000, |
123 | P9_DMNAMEDPIPE = 0x00200000, | 219 | P9_DMNAMEDPIPE = 0x00200000, |
124 | P9_DMSOCKET = 0x00100000, | 220 | P9_DMSOCKET = 0x00100000, |
@@ -127,8 +223,26 @@ enum { | |||
127 | P9_DMSETVTX = 0x00010000, | 223 | P9_DMSETVTX = 0x00010000, |
128 | }; | 224 | }; |
129 | 225 | ||
130 | /* qid.types */ | 226 | /** |
131 | enum { | 227 | * enum p9_qid_t - QID types |
228 | * @P9_QTDIR: directory | ||
229 | * @P9_QTAPPEND: append-only | ||
230 | * @P9_QTEXCL: excluse use (only one open handle allowed) | ||
231 | * @P9_QTMOUNT: mount points | ||
232 | * @P9_QTAUTH: authentication file | ||
233 | * @P9_QTTMP: non-backed-up files | ||
234 | * @P9_QTSYMLINK: symbolic links (9P2000.u) | ||
235 | * @P9_QTLINK: hard-link (9P2000.u) | ||
236 | * @P9_QTFILE: normal files | ||
237 | * | ||
238 | * QID types are a subset of permissions - they are primarily | ||
239 | * used to differentiate semantics for a file system entity via | ||
240 | * a jump-table. Their value is also the most signifigant 16 bits | ||
241 | * of the permission_t | ||
242 | * | ||
243 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
244 | */ | ||
245 | enum p9_qid_t { | ||
132 | P9_QTDIR = 0x80, | 246 | P9_QTDIR = 0x80, |
133 | P9_QTAPPEND = 0x40, | 247 | P9_QTAPPEND = 0x40, |
134 | P9_QTEXCL = 0x20, | 248 | P9_QTEXCL = 0x20, |
@@ -140,6 +254,7 @@ enum { | |||
140 | P9_QTFILE = 0x00, | 254 | P9_QTFILE = 0x00, |
141 | }; | 255 | }; |
142 | 256 | ||
257 | /* 9P Magic Numbers */ | ||
143 | #define P9_NOTAG (u16)(~0) | 258 | #define P9_NOTAG (u16)(~0) |
144 | #define P9_NOFID (u32)(~0) | 259 | #define P9_NOFID (u32)(~0) |
145 | #define P9_MAXWELEM 16 | 260 | #define P9_MAXWELEM 16 |
@@ -147,19 +262,69 @@ enum { | |||
147 | /* ample room for Twrite/Rread header */ | 262 | /* ample room for Twrite/Rread header */ |
148 | #define P9_IOHDRSZ 24 | 263 | #define P9_IOHDRSZ 24 |
149 | 264 | ||
265 | /** | ||
266 | * struct p9_str - length prefixed string type | ||
267 | * @len: length of the string | ||
268 | * @str: the string | ||
269 | * | ||
270 | * The protocol uses length prefixed strings for all | ||
271 | * string data, so we replicate that for our internal | ||
272 | * string members. | ||
273 | */ | ||
274 | |||
150 | struct p9_str { | 275 | struct p9_str { |
151 | u16 len; | 276 | u16 len; |
152 | char *str; | 277 | char *str; |
153 | }; | 278 | }; |
154 | 279 | ||
155 | /* qids are the unique ID for a file (like an inode */ | 280 | /** |
281 | * struct p9_qid - file system entity information | ||
282 | * @type: 8-bit type &p9_qid_t | ||
283 | * @version: 16-bit monotonically incrementing version number | ||
284 | * @path: 64-bit per-server-unique ID for a file system element | ||
285 | * | ||
286 | * qids are identifiers used by 9P servers to track file system | ||
287 | * entities. The type is used to differentiate semantics for operations | ||
288 | * on the entity (ie. read means something different on a directory than | ||
289 | * on a file). The path provides a server unique index for an entity | ||
290 | * (roughly analogous to an inode number), while the version is updated | ||
291 | * every time a file is modified and can be used to maintain cache | ||
292 | * coherency between clients and serves. | ||
293 | * Servers will often differentiate purely synthetic entities by setting | ||
294 | * their version to 0, signaling that they should never be cached and | ||
295 | * should be accessed synchronously. | ||
296 | * | ||
297 | * See Also://plan9.bell-labs.com/magic/man2html/2/stat | ||
298 | */ | ||
299 | |||
156 | struct p9_qid { | 300 | struct p9_qid { |
157 | u8 type; | 301 | u8 type; |
158 | u32 version; | 302 | u32 version; |
159 | u64 path; | 303 | u64 path; |
160 | }; | 304 | }; |
161 | 305 | ||
162 | /* Plan 9 file metadata (stat) structure */ | 306 | /** |
307 | * struct p9_stat - file system metadata information | ||
308 | * @size: length prefix for this stat structure instance | ||
309 | * @type: the type of the server (equivilent to a major number) | ||
310 | * @dev: the sub-type of the server (equivilent to a minor number) | ||
311 | * @qid: unique id from the server of type &p9_qid | ||
312 | * @mode: Plan 9 format permissions of type &p9_perm_t | ||
313 | * @atime: Last access/read time | ||
314 | * @mtime: Last modify/write time | ||
315 | * @length: file length | ||
316 | * @name: last element of path (aka filename) in type &p9_str | ||
317 | * @uid: owner name in type &p9_str | ||
318 | * @gid: group owner in type &p9_str | ||
319 | * @muid: last modifier in type &p9_str | ||
320 | * @extension: area used to encode extended UNIX support in type &p9_str | ||
321 | * @n_uid: numeric user id of owner (part of 9p2000.u extension) | ||
322 | * @n_gid: numeric group id (part of 9p2000.u extension) | ||
323 | * @n_muid: numeric user id of laster modifier (part of 9p2000.u extension) | ||
324 | * | ||
325 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
326 | */ | ||
327 | |||
163 | struct p9_stat { | 328 | struct p9_stat { |
164 | u16 size; | 329 | u16 size; |
165 | u16 type; | 330 | u16 type; |
@@ -179,10 +344,14 @@ struct p9_stat { | |||
179 | u32 n_muid; /* 9p2000.u extensions */ | 344 | u32 n_muid; /* 9p2000.u extensions */ |
180 | }; | 345 | }; |
181 | 346 | ||
182 | /* file metadata (stat) structure used to create Twstat message | 347 | /* |
183 | The is similar to p9_stat, but the strings don't point to | 348 | * file metadata (stat) structure used to create Twstat message |
184 | the same memory block and should be freed separately | 349 | * The is identical to &p9_stat, but the strings don't point to |
185 | */ | 350 | * the same memory block and should be freed separately |
351 | * | ||
352 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | ||
353 | */ | ||
354 | |||
186 | struct p9_wstat { | 355 | struct p9_wstat { |
187 | u16 size; | 356 | u16 size; |
188 | u16 type; | 357 | u16 type; |
@@ -335,10 +504,20 @@ struct p9_twstat { | |||
335 | struct p9_rwstat { | 504 | struct p9_rwstat { |
336 | }; | 505 | }; |
337 | 506 | ||
338 | /* | 507 | /** |
339 | * fcall is the primary packet structure | 508 | * struct p9_fcall - primary packet structure |
340 | * | 509 | * @size: prefixed length of the structure |
341 | */ | 510 | * @id: protocol operating identifier of type &p9_msg_t |
511 | * @tag: transaction id of the request | ||
512 | * @sdata: payload | ||
513 | * @params: per-operation parameters | ||
514 | * | ||
515 | * &p9_fcall represents the structure for all 9P RPC | ||
516 | * transactions. Requests are packaged into fcalls, and reponses | ||
517 | * must be extracted from them. | ||
518 | * | ||
519 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/fcall | ||
520 | */ | ||
342 | 521 | ||
343 | struct p9_fcall { | 522 | struct p9_fcall { |
344 | u32 size; | 523 | u32 size; |
@@ -416,4 +595,5 @@ int p9_idpool_check(int id, struct p9_idpool *p); | |||
416 | 595 | ||
417 | int p9_error_init(void); | 596 | int p9_error_init(void); |
418 | int p9_errstr2errno(char *, int); | 597 | int p9_errstr2errno(char *, int); |
598 | int p9_trans_fd_init(void); | ||
419 | #endif /* NET_9P_H */ | 599 | #endif /* NET_9P_H */ |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index e52f93d9ac5f..c936dd14de41 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -26,6 +26,23 @@ | |||
26 | #ifndef NET_9P_CLIENT_H | 26 | #ifndef NET_9P_CLIENT_H |
27 | #define NET_9P_CLIENT_H | 27 | #define NET_9P_CLIENT_H |
28 | 28 | ||
29 | /** | ||
30 | * struct p9_client - per client instance state | ||
31 | * @lock: protect @fidlist | ||
32 | * @msize: maximum data size negotiated by protocol | ||
33 | * @dotu: extension flags negotiated by protocol | ||
34 | * @trans_mod: module API instantiated with this client | ||
35 | * @trans: tranport instance state and API | ||
36 | * @conn: connection state information used by trans_fd | ||
37 | * @fidpool: fid handle accounting for session | ||
38 | * @fidlist: List of active fid handles | ||
39 | * | ||
40 | * The client structure is used to keep track of various per-client | ||
41 | * state that has been instantiated. | ||
42 | * | ||
43 | * Bugs: duplicated data and potentially unnecessary elements. | ||
44 | */ | ||
45 | |||
29 | struct p9_client { | 46 | struct p9_client { |
30 | spinlock_t lock; /* protect client structure */ | 47 | spinlock_t lock; /* protect client structure */ |
31 | int msize; | 48 | int msize; |
@@ -38,6 +55,24 @@ struct p9_client { | |||
38 | struct list_head fidlist; | 55 | struct list_head fidlist; |
39 | }; | 56 | }; |
40 | 57 | ||
58 | /** | ||
59 | * struct p9_fid - file system entity handle | ||
60 | * @clnt: back pointer to instantiating &p9_client | ||
61 | * @fid: numeric identifier for this handle | ||
62 | * @mode: current mode of this fid (enum?) | ||
63 | * @qid: the &p9_qid server identifier this handle points to | ||
64 | * @iounit: the server reported maximum transaction size for this file | ||
65 | * @uid: the numeric uid of the local user who owns this handle | ||
66 | * @aux: transport specific information (unused?) | ||
67 | * @rdir_fpos: tracks offset of file position when reading directory contents | ||
68 | * @rdir_pos: (unused?) | ||
69 | * @rdir_fcall: holds response of last directory read request | ||
70 | * @flist: per-client-instance fid tracking | ||
71 | * @dlist: per-dentry fid tracking | ||
72 | * | ||
73 | * TODO: This needs lots of explanation. | ||
74 | */ | ||
75 | |||
41 | struct p9_fid { | 76 | struct p9_fid { |
42 | struct p9_client *clnt; | 77 | struct p9_client *clnt; |
43 | u32 fid; | 78 | u32 fid; |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index d2209ae9d18b..0db3a4038dc0 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,12 +26,40 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | /** | ||
30 | * enum p9_trans_status - different states of underlying transports | ||
31 | * @Connected: transport is connected and healthy | ||
32 | * @Disconnected: transport has been disconnected | ||
33 | * @Hung: transport is connected by wedged | ||
34 | * | ||
35 | * This enumeration details the various states a transport | ||
36 | * instatiation can be in. | ||
37 | */ | ||
38 | |||
29 | enum p9_trans_status { | 39 | enum p9_trans_status { |
30 | Connected, | 40 | Connected, |
31 | Disconnected, | 41 | Disconnected, |
32 | Hung, | 42 | Hung, |
33 | }; | 43 | }; |
34 | 44 | ||
45 | /** | ||
46 | * struct p9_trans - per-transport state and API | ||
47 | * @status: transport &p9_trans_status | ||
48 | * @msize: negotiated maximum packet size (duplicate from client) | ||
49 | * @extended: negotiated protocol extensions (duplicate from client) | ||
50 | * @priv: transport private data | ||
51 | * @close: member function to disconnect and close the transport | ||
52 | * @rpc: member function to issue a request to the transport | ||
53 | * | ||
54 | * This is the basic API for a transport instance. It is used as | ||
55 | * a handle by the client to issue requests. This interface is currently | ||
56 | * in flux during reorganization. | ||
57 | * | ||
58 | * Bugs: there is lots of duplicated data here and its not clear that | ||
59 | * the member functions need to be per-instance versus per transport | ||
60 | * module. | ||
61 | */ | ||
62 | |||
35 | struct p9_trans { | 63 | struct p9_trans { |
36 | enum p9_trans_status status; | 64 | enum p9_trans_status status; |
37 | int msize; | 65 | int msize; |
@@ -42,6 +70,21 @@ struct p9_trans { | |||
42 | struct p9_fcall **rc); | 70 | struct p9_fcall **rc); |
43 | }; | 71 | }; |
44 | 72 | ||
73 | /** | ||
74 | * struct p9_trans_module - transport module interface | ||
75 | * @list: used to maintain a list of currently available transports | ||
76 | * @name: the human-readable name of the transport | ||
77 | * @maxsize: transport provided maximum packet size | ||
78 | * @def: set if this transport should be considered the default | ||
79 | * @create: member function to create a new connection on this transport | ||
80 | * | ||
81 | * This is the basic API for a transport module which is registered by the | ||
82 | * transport module with the 9P core network module and used by the client | ||
83 | * to instantiate a new connection on a transport. | ||
84 | * | ||
85 | * Bugs: the transport module list isn't protected. | ||
86 | */ | ||
87 | |||
45 | struct p9_trans_module { | 88 | struct p9_trans_module { |
46 | struct list_head list; | 89 | struct list_head list; |
47 | char *name; /* name of transport */ | 90 | char *name; /* name of transport */ |
@@ -53,5 +96,4 @@ struct p9_trans_module { | |||
53 | void v9fs_register_trans(struct p9_trans_module *m); | 96 | void v9fs_register_trans(struct p9_trans_module *m); |
54 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); | 97 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); |
55 | struct p9_trans_module *v9fs_default_trans(void); | 98 | struct p9_trans_module *v9fs_default_trans(void); |
56 | |||
57 | #endif /* NET_9P_TRANSPORT_H */ | 99 | #endif /* NET_9P_TRANSPORT_H */ |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 0a2f0372df31..bbd3d583c6e6 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -94,6 +94,28 @@ extern void addrconf_join_solict(struct net_device *dev, | |||
94 | extern void addrconf_leave_solict(struct inet6_dev *idev, | 94 | extern void addrconf_leave_solict(struct inet6_dev *idev, |
95 | struct in6_addr *addr); | 95 | struct in6_addr *addr); |
96 | 96 | ||
97 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, | ||
98 | unsigned unit) | ||
99 | { | ||
100 | if (timeout == 0xffffffff) | ||
101 | return ~0UL; | ||
102 | |||
103 | /* | ||
104 | * Avoid arithmetic overflow. | ||
105 | * Assuming unit is constant and non-zero, this "if" statement | ||
106 | * will go away on 64bit archs. | ||
107 | */ | ||
108 | if (0xfffffffe > LONG_MAX / unit && timeout > LONG_MAX / unit) | ||
109 | return LONG_MAX / unit; | ||
110 | |||
111 | return timeout; | ||
112 | } | ||
113 | |||
114 | static inline int addrconf_finite_timeout(unsigned long timeout) | ||
115 | { | ||
116 | return ~timeout; | ||
117 | } | ||
118 | |||
97 | /* | 119 | /* |
98 | * IPv6 Address Label subsystem (addrlabel.c) | 120 | * IPv6 Address Label subsystem (addrlabel.c) |
99 | */ | 121 | */ |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index decdda546829..747c255d1df0 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | |||
162 | * @skb: socket buffer the message is stored in | 162 | * @skb: socket buffer the message is stored in |
163 | * @hdr: generic netlink message header | 163 | * @hdr: generic netlink message header |
164 | */ | 164 | */ |
165 | static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr) | 165 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) |
166 | { | 166 | { |
167 | return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 167 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index a42cd63d241a..9fabe5b38912 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -197,4 +197,14 @@ static inline int inet_iif(const struct sk_buff *skb) | |||
197 | return skb->rtable->rt_iif; | 197 | return skb->rtable->rt_iif; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) | ||
201 | { | ||
202 | struct request_sock *req = reqsk_alloc(ops); | ||
203 | |||
204 | if (req != NULL) | ||
205 | inet_rsk(req)->opt = NULL; | ||
206 | |||
207 | return req; | ||
208 | } | ||
209 | |||
200 | #endif /* _INET_SOCK_H */ | 210 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/ip.h b/include/net/ip.h index 6d7bcd5e62d4..3b40bc2234be 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -210,7 +210,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) | |||
210 | { | 210 | { |
211 | return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || | 211 | return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || |
212 | (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && | 212 | (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && |
213 | !(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU)))); | 213 | !(dst_metric_locked(dst, RTAX_MTU)))); |
214 | } | 214 | } |
215 | 215 | ||
216 | extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); | 216 | extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e0a612bc9c4e..f422f7218e1c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -367,6 +367,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a) | |||
367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); | 367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); |
368 | } | 368 | } |
369 | 369 | ||
370 | static inline int ipv6_addr_loopback(const struct in6_addr *a) | ||
371 | { | ||
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | ||
373 | a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0); | ||
374 | } | ||
375 | |||
370 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) | 376 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) |
371 | { | 377 | { |
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | 378 | return ((a->s6_addr32[0] | a->s6_addr32[1] | |
diff --git a/include/net/irda/discovery.h b/include/net/irda/discovery.h index e4efad1f9eff..0ce93398720d 100644 --- a/include/net/irda/discovery.h +++ b/include/net/irda/discovery.h | |||
@@ -57,9 +57,6 @@ typedef union { | |||
57 | __u8 byte[2]; | 57 | __u8 byte[2]; |
58 | } __u16_host_order; | 58 | } __u16_host_order; |
59 | 59 | ||
60 | /* Same purpose, different application */ | ||
61 | #define u16ho(array) (* ((__u16 *) array)) | ||
62 | |||
63 | /* Types of discovery */ | 60 | /* Types of discovery */ |
64 | typedef enum { | 61 | typedef enum { |
65 | DISCOVERY_LOG, /* What's in our discovery log */ | 62 | DISCOVERY_LOG, /* What's in our discovery log */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 4a80d74975e8..bcd1623245cb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -595,6 +595,15 @@ enum ieee80211_key_alg { | |||
595 | ALG_CCMP, | 595 | ALG_CCMP, |
596 | }; | 596 | }; |
597 | 597 | ||
598 | /** | ||
599 | * enum ieee80211_key_len - key length | ||
600 | * @WEP40: WEP 5 byte long key | ||
601 | * @WEP104: WEP 13 byte long key | ||
602 | */ | ||
603 | enum ieee80211_key_len { | ||
604 | LEN_WEP40 = 5, | ||
605 | LEN_WEP104 = 13, | ||
606 | }; | ||
598 | 607 | ||
599 | /** | 608 | /** |
600 | * enum ieee80211_key_flags - key flags | 609 | * enum ieee80211_key_flags - key flags |
@@ -1594,13 +1603,16 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw); | |||
1594 | void ieee80211_scan_completed(struct ieee80211_hw *hw); | 1603 | void ieee80211_scan_completed(struct ieee80211_hw *hw); |
1595 | 1604 | ||
1596 | /** | 1605 | /** |
1597 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 1606 | * ieee80211_iterate_active_interfaces- iterate active interfaces |
1598 | * | 1607 | * |
1599 | * This function iterates over the interfaces associated with a given | 1608 | * This function iterates over the interfaces associated with a given |
1600 | * hardware that are currently active and calls the callback for them. | 1609 | * hardware that are currently active and calls the callback for them. |
1610 | * This function allows the iterator function to sleep, when the iterator | ||
1611 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can | ||
1612 | * be used. | ||
1601 | * | 1613 | * |
1602 | * @hw: the hardware struct of which the interfaces should be iterated over | 1614 | * @hw: the hardware struct of which the interfaces should be iterated over |
1603 | * @iterator: the iterator function to call, cannot sleep | 1615 | * @iterator: the iterator function to call |
1604 | * @data: first argument of the iterator function | 1616 | * @data: first argument of the iterator function |
1605 | */ | 1617 | */ |
1606 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | 1618 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, |
@@ -1609,6 +1621,24 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
1609 | void *data); | 1621 | void *data); |
1610 | 1622 | ||
1611 | /** | 1623 | /** |
1624 | * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces | ||
1625 | * | ||
1626 | * This function iterates over the interfaces associated with a given | ||
1627 | * hardware that are currently active and calls the callback for them. | ||
1628 | * This function requires the iterator callback function to be atomic, | ||
1629 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. | ||
1630 | * | ||
1631 | * @hw: the hardware struct of which the interfaces should be iterated over | ||
1632 | * @iterator: the iterator function to call, cannot sleep | ||
1633 | * @data: first argument of the iterator function | ||
1634 | */ | ||
1635 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | ||
1636 | void (*iterator)(void *data, | ||
1637 | u8 *mac, | ||
1638 | struct ieee80211_vif *vif), | ||
1639 | void *data); | ||
1640 | |||
1641 | /** | ||
1612 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 1642 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
1613 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1643 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1614 | * @ra: receiver address of the BA session recipient | 1644 | * @ra: receiver address of the BA session recipient |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 9c451ff2f4f4..a01b7c4dc763 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -129,6 +129,10 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | |||
129 | void __user *buffer, | 129 | void __user *buffer, |
130 | size_t *lenp, | 130 | size_t *lenp, |
131 | loff_t *ppos); | 131 | loff_t *ppos); |
132 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | ||
133 | int nlen, void __user *oldval, | ||
134 | size_t __user *oldlenp, | ||
135 | void __user *newval, size_t newlen); | ||
132 | #endif | 136 | #endif |
133 | 137 | ||
134 | extern void inet6_ifinfo_notify(int event, | 138 | extern void inet6_ifinfo_notify(int event, |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index aa540e6be502..d9dd0f707296 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -95,6 +95,11 @@ extern struct list_head net_namespace_list; | |||
95 | #ifdef CONFIG_NET_NS | 95 | #ifdef CONFIG_NET_NS |
96 | extern void __put_net(struct net *net); | 96 | extern void __put_net(struct net *net); |
97 | 97 | ||
98 | static inline int net_alive(struct net *net) | ||
99 | { | ||
100 | return net && atomic_read(&net->count); | ||
101 | } | ||
102 | |||
98 | static inline struct net *get_net(struct net *net) | 103 | static inline struct net *get_net(struct net *net) |
99 | { | 104 | { |
100 | atomic_inc(&net->count); | 105 | atomic_inc(&net->count); |
@@ -125,6 +130,12 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
125 | return net1 == net2; | 130 | return net1 == net2; |
126 | } | 131 | } |
127 | #else | 132 | #else |
133 | |||
134 | static inline int net_alive(struct net *net) | ||
135 | { | ||
136 | return 1; | ||
137 | } | ||
138 | |||
128 | static inline struct net *get_net(struct net *net) | 139 | static inline struct net *get_net(struct net *net) |
129 | { | 140 | { |
130 | return net; | 141 | return net; |
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index f736e842977f..f80c0ed6d870 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -15,6 +15,7 @@ enum nf_ct_ext_id | |||
15 | 15 | ||
16 | /* Extensions: optional stuff which isn't permanently in struct. */ | 16 | /* Extensions: optional stuff which isn't permanently in struct. */ |
17 | struct nf_ct_ext { | 17 | struct nf_ct_ext { |
18 | struct rcu_head rcu; | ||
18 | u8 offset[NF_CT_EXT_NUM]; | 19 | u8 offset[NF_CT_EXT_NUM]; |
19 | u8 len; | 20 | u8 len; |
20 | char data[0]; | 21 | char data[0]; |
diff --git a/include/net/netlink.h b/include/net/netlink.h index a5506c42f03c..dfc3701dfcc3 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -556,14 +556,12 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb) | |||
556 | * @skb: socket buffer the message is stored in | 556 | * @skb: socket buffer the message is stored in |
557 | * @mark: mark to trim to | 557 | * @mark: mark to trim to |
558 | * | 558 | * |
559 | * Trims the message to the provided mark. Returns -1. | 559 | * Trims the message to the provided mark. |
560 | */ | 560 | */ |
561 | static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | 561 | static inline void nlmsg_trim(struct sk_buff *skb, const void *mark) |
562 | { | 562 | { |
563 | if (mark) | 563 | if (mark) |
564 | skb_trim(skb, (unsigned char *) mark - skb->data); | 564 | skb_trim(skb, (unsigned char *) mark - skb->data); |
565 | |||
566 | return -1; | ||
567 | } | 565 | } |
568 | 566 | ||
569 | /** | 567 | /** |
@@ -572,11 +570,11 @@ static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | |||
572 | * @nlh: netlink message header | 570 | * @nlh: netlink message header |
573 | * | 571 | * |
574 | * Removes the complete netlink message including all | 572 | * Removes the complete netlink message including all |
575 | * attributes from the socket buffer again. Returns -1. | 573 | * attributes from the socket buffer again. |
576 | */ | 574 | */ |
577 | static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) | 575 | static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) |
578 | { | 576 | { |
579 | return nlmsg_trim(skb, nlh); | 577 | nlmsg_trim(skb, nlh); |
580 | } | 578 | } |
581 | 579 | ||
582 | /** | 580 | /** |
@@ -772,12 +770,13 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
772 | const struct nla_policy *policy, | 770 | const struct nla_policy *policy, |
773 | int len) | 771 | int len) |
774 | { | 772 | { |
775 | if (nla_len(nla) < len) | 773 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
776 | return -1; | 774 | |
777 | if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr)) | 775 | if (nested_len < 0) |
778 | return nla_parse_nested(tb, maxtype, | 776 | return -EINVAL; |
779 | nla_data(nla) + NLA_ALIGN(len), | 777 | if (nested_len >= nla_attr_size(0)) |
780 | policy); | 778 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
779 | nested_len, policy); | ||
781 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); | 780 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); |
782 | return 0; | 781 | return 0; |
783 | } | 782 | } |
@@ -1079,11 +1078,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start) | |||
1079 | * @start: container attribute | 1078 | * @start: container attribute |
1080 | * | 1079 | * |
1081 | * Removes the container attribute and including all nested | 1080 | * Removes the container attribute and including all nested |
1082 | * attributes. Returns -1. | 1081 | * attributes. Returns -EMSGSIZE |
1083 | */ | 1082 | */ |
1084 | static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) | 1083 | static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) |
1085 | { | 1084 | { |
1086 | return nlmsg_trim(skb, start); | 1085 | nlmsg_trim(skb, start); |
1087 | } | 1086 | } |
1088 | 1087 | ||
1089 | /** | 1088 | /** |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index b220b5f624de..0c96e7bed5db 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -115,8 +115,8 @@ struct request_sock_queue { | |||
115 | struct request_sock *rskq_accept_head; | 115 | struct request_sock *rskq_accept_head; |
116 | struct request_sock *rskq_accept_tail; | 116 | struct request_sock *rskq_accept_tail; |
117 | rwlock_t syn_wait_lock; | 117 | rwlock_t syn_wait_lock; |
118 | u16 rskq_defer_accept; | 118 | u8 rskq_defer_accept; |
119 | /* 2 bytes hole, try to pack */ | 119 | /* 3 bytes hole, try to pack */ |
120 | struct listen_sock *listen_opt; | 120 | struct listen_sock *listen_opt; |
121 | }; | 121 | }; |
122 | 122 | ||
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ab502ec1c61c..a87fc0312edc 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -178,7 +178,7 @@ extern struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops); | |||
178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, | 178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, |
179 | struct Qdisc_ops *ops, u32 parentid); | 179 | struct Qdisc_ops *ops, u32 parentid); |
180 | extern void tcf_destroy(struct tcf_proto *tp); | 180 | extern void tcf_destroy(struct tcf_proto *tp); |
181 | extern void tcf_destroy_chain(struct tcf_proto *fl); | 181 | extern void tcf_destroy_chain(struct tcf_proto **fl); |
182 | 182 | ||
183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
184 | struct sk_buff_head *list) | 184 | struct sk_buff_head *list) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 0ce0443c5b79..7f25195f9855 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -548,7 +548,8 @@ struct sctp_af { | |||
548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, | 548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, |
549 | union sctp_addr *daddr, | 549 | union sctp_addr *daddr, |
550 | union sctp_addr *saddr); | 550 | union sctp_addr *saddr); |
551 | void (*get_saddr) (struct sctp_association *asoc, | 551 | void (*get_saddr) (struct sctp_sock *sk, |
552 | struct sctp_association *asoc, | ||
552 | struct dst_entry *dst, | 553 | struct dst_entry *dst, |
553 | union sctp_addr *daddr, | 554 | union sctp_addr *daddr, |
554 | union sctp_addr *saddr); | 555 | union sctp_addr *saddr); |
@@ -587,6 +588,7 @@ struct sctp_af { | |||
587 | int (*is_ce) (const struct sk_buff *sk); | 588 | int (*is_ce) (const struct sk_buff *sk); |
588 | void (*seq_dump_addr)(struct seq_file *seq, | 589 | void (*seq_dump_addr)(struct seq_file *seq, |
589 | union sctp_addr *addr); | 590 | union sctp_addr *addr); |
591 | void (*ecn_capable)(struct sock *sk); | ||
590 | __u16 net_header_len; | 592 | __u16 net_header_len; |
591 | int sockaddr_len; | 593 | int sockaddr_len; |
592 | sa_family_t sa_family; | 594 | sa_family_t sa_family; |
@@ -901,7 +903,10 @@ struct sctp_transport { | |||
901 | * calculation completes (i.e. the DATA chunk | 903 | * calculation completes (i.e. the DATA chunk |
902 | * is SACK'd) clear this flag. | 904 | * is SACK'd) clear this flag. |
903 | */ | 905 | */ |
904 | int rto_pending; | 906 | __u8 rto_pending; |
907 | |||
908 | /* Flag to track the current fast recovery state */ | ||
909 | __u8 fast_recovery; | ||
905 | 910 | ||
906 | /* | 911 | /* |
907 | * These are the congestion stats. | 912 | * These are the congestion stats. |
@@ -920,6 +925,9 @@ struct sctp_transport { | |||
920 | /* Data that has been sent, but not acknowledged. */ | 925 | /* Data that has been sent, but not acknowledged. */ |
921 | __u32 flight_size; | 926 | __u32 flight_size; |
922 | 927 | ||
928 | /* TSN marking the fast recovery exit point */ | ||
929 | __u32 fast_recovery_exit; | ||
930 | |||
923 | /* Destination */ | 931 | /* Destination */ |
924 | struct dst_entry *dst; | 932 | struct dst_entry *dst; |
925 | /* Source address. */ | 933 | /* Source address. */ |
@@ -1044,7 +1052,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | |||
1044 | struct sctp_sock *); | 1052 | struct sctp_sock *); |
1045 | void sctp_transport_pmtu(struct sctp_transport *); | 1053 | void sctp_transport_pmtu(struct sctp_transport *); |
1046 | void sctp_transport_free(struct sctp_transport *); | 1054 | void sctp_transport_free(struct sctp_transport *); |
1047 | void sctp_transport_reset_timers(struct sctp_transport *); | 1055 | void sctp_transport_reset_timers(struct sctp_transport *, int); |
1048 | void sctp_transport_hold(struct sctp_transport *); | 1056 | void sctp_transport_hold(struct sctp_transport *); |
1049 | void sctp_transport_put(struct sctp_transport *); | 1057 | void sctp_transport_put(struct sctp_transport *); |
1050 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1058 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
@@ -1134,6 +1142,9 @@ struct sctp_outq { | |||
1134 | /* How many unackd bytes do we have in-flight? */ | 1142 | /* How many unackd bytes do we have in-flight? */ |
1135 | __u32 outstanding_bytes; | 1143 | __u32 outstanding_bytes; |
1136 | 1144 | ||
1145 | /* Are we doing fast-rtx on this queue */ | ||
1146 | char fast_rtx; | ||
1147 | |||
1137 | /* Corked? */ | 1148 | /* Corked? */ |
1138 | char cork; | 1149 | char cork; |
1139 | 1150 | ||
diff --git a/include/net/syncppp.h b/include/net/syncppp.h index 877efa434700..e43f4070d892 100644 --- a/include/net/syncppp.h +++ b/include/net/syncppp.h | |||
@@ -59,7 +59,7 @@ struct ppp_device | |||
59 | 59 | ||
60 | static inline struct sppp *sppp_of(struct net_device *dev) | 60 | static inline struct sppp *sppp_of(struct net_device *dev) |
61 | { | 61 | { |
62 | struct ppp_device **ppp = dev->priv; | 62 | struct ppp_device **ppp = dev->ml_priv; |
63 | BUG_ON((*ppp)->dev != dev); | 63 | BUG_ON((*ppp)->dev != dev); |
64 | return &(*ppp)->sppp; | 64 | return &(*ppp)->sppp; |
65 | } | 65 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 633147cb6bbc..cf54034019d9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
139 | #define MAX_TCP_KEEPINTVL 32767 | 139 | #define MAX_TCP_KEEPINTVL 32767 |
140 | #define MAX_TCP_KEEPCNT 127 | 140 | #define MAX_TCP_KEEPCNT 127 |
141 | #define MAX_TCP_SYNCNT 127 | 141 | #define MAX_TCP_SYNCNT 127 |
142 | #define MAX_TCP_ACCEPT_DEFERRED 65535 | ||
143 | 142 | ||
144 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ | 143 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ |
145 | 144 | ||
@@ -433,7 +432,6 @@ extern struct sk_buff * tcp_make_synack(struct sock *sk, | |||
433 | 432 | ||
434 | extern int tcp_disconnect(struct sock *sk, int flags); | 433 | extern int tcp_disconnect(struct sock *sk, int flags); |
435 | 434 | ||
436 | extern void tcp_unhash(struct sock *sk); | ||
437 | 435 | ||
438 | /* From syncookies.c */ | 436 | /* From syncookies.c */ |
439 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; | 437 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 27394e0447d8..112934a3288d 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -40,7 +40,8 @@ extern int datagram_recv_ctl(struct sock *sk, | |||
40 | struct msghdr *msg, | 40 | struct msghdr *msg, |
41 | struct sk_buff *skb); | 41 | struct sk_buff *skb); |
42 | 42 | ||
43 | extern int datagram_send_ctl(struct msghdr *msg, | 43 | extern int datagram_send_ctl(struct net *net, |
44 | struct msghdr *msg, | ||
44 | struct flowi *fl, | 45 | struct flowi *fl, |
45 | struct ipv6_txoptions *opt, | 46 | struct ipv6_txoptions *opt, |
46 | int *hlimit, int *tclass); | 47 | int *hlimit, int *tclass); |
diff --git a/include/net/udp.h b/include/net/udp.h index 3e55a99b0ba3..ccce83707046 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -135,6 +135,7 @@ extern void udp_err(struct sk_buff *, u32); | |||
135 | 135 | ||
136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | 136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
137 | struct msghdr *msg, size_t len); | 137 | struct msghdr *msg, size_t len); |
138 | extern void udp_flush_pending_frames(struct sock *sk); | ||
138 | 139 | ||
139 | extern int udp_rcv(struct sk_buff *skb); | 140 | extern int udp_rcv(struct sk_buff *skb); |
140 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 141 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d1350bcccb03..2933d7474a79 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -648,14 +648,46 @@ extern void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family, | |||
648 | extern void xfrm_audit_state_icvfail(struct xfrm_state *x, | 648 | extern void xfrm_audit_state_icvfail(struct xfrm_state *x, |
649 | struct sk_buff *skb, u8 proto); | 649 | struct sk_buff *skb, u8 proto); |
650 | #else | 650 | #else |
651 | #define xfrm_audit_policy_add(x, r, a, se, s) do { ; } while (0) | 651 | |
652 | #define xfrm_audit_policy_delete(x, r, a, se, s) do { ; } while (0) | 652 | static inline void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, |
653 | #define xfrm_audit_state_add(x, r, a, se, s) do { ; } while (0) | 653 | u32 auid, u32 ses, u32 secid) |
654 | #define xfrm_audit_state_delete(x, r, a, se, s) do { ; } while (0) | 654 | { |
655 | #define xfrm_audit_state_replay_overflow(x, s) do { ; } while (0) | 655 | } |
656 | #define xfrm_audit_state_notfound_simple(s, f) do { ; } while (0) | 656 | |
657 | #define xfrm_audit_state_notfound(s, f, sp, sq) do { ; } while (0) | 657 | static inline void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, |
658 | #define xfrm_audit_state_icvfail(x, s, p) do { ; } while (0) | 658 | u32 auid, u32 ses, u32 secid) |
659 | { | ||
660 | } | ||
661 | |||
662 | static inline void xfrm_audit_state_add(struct xfrm_state *x, int result, | ||
663 | u32 auid, u32 ses, u32 secid) | ||
664 | { | ||
665 | } | ||
666 | |||
667 | static inline void xfrm_audit_state_delete(struct xfrm_state *x, int result, | ||
668 | u32 auid, u32 ses, u32 secid) | ||
669 | { | ||
670 | } | ||
671 | |||
672 | static inline void xfrm_audit_state_replay_overflow(struct xfrm_state *x, | ||
673 | struct sk_buff *skb) | ||
674 | { | ||
675 | } | ||
676 | |||
677 | static inline void xfrm_audit_state_notfound_simple(struct sk_buff *skb, | ||
678 | u16 family) | ||
679 | { | ||
680 | } | ||
681 | |||
682 | static inline void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family, | ||
683 | __be32 net_spi, __be32 net_seq) | ||
684 | { | ||
685 | } | ||
686 | |||
687 | static inline void xfrm_audit_state_icvfail(struct xfrm_state *x, | ||
688 | struct sk_buff *skb, u8 proto) | ||
689 | { | ||
690 | } | ||
659 | #endif /* CONFIG_AUDITSYSCALL */ | 691 | #endif /* CONFIG_AUDITSYSCALL */ |
660 | 692 | ||
661 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) | 693 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 911a661b7278..31d30b1852e8 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -105,7 +105,6 @@ enum ib_device_cap_flags { | |||
105 | */ | 105 | */ |
106 | IB_DEVICE_UD_IP_CSUM = (1<<18), | 106 | IB_DEVICE_UD_IP_CSUM = (1<<18), |
107 | IB_DEVICE_UD_TSO = (1<<19), | 107 | IB_DEVICE_UD_TSO = (1<<19), |
108 | IB_DEVICE_SEND_W_INV = (1<<21), | ||
109 | }; | 108 | }; |
110 | 109 | ||
111 | enum ib_atomic_cap { | 110 | enum ib_atomic_cap { |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 1f74bcd603fe..32742c4563de 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -30,13 +30,6 @@ | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * SCSI command lengths | ||
34 | */ | ||
35 | |||
36 | extern const unsigned char scsi_command_size[8]; | ||
37 | #define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7] | ||
38 | |||
39 | /* | ||
40 | * Special value for scanning to specify scanning or rescanning of all | 33 | * Special value for scanning to specify scanning or rescanning of all |
41 | * possible channels, (target) ids, or luns on a given shost. | 34 | * possible channels, (target) ids, or luns on a given shost. |
42 | */ | 35 | */ |
@@ -109,6 +102,7 @@ extern const unsigned char scsi_command_size[8]; | |||
109 | #define MODE_SENSE_10 0x5a | 102 | #define MODE_SENSE_10 0x5a |
110 | #define PERSISTENT_RESERVE_IN 0x5e | 103 | #define PERSISTENT_RESERVE_IN 0x5e |
111 | #define PERSISTENT_RESERVE_OUT 0x5f | 104 | #define PERSISTENT_RESERVE_OUT 0x5f |
105 | #define VARIABLE_LENGTH_CMD 0x7f | ||
112 | #define REPORT_LUNS 0xa0 | 106 | #define REPORT_LUNS 0xa0 |
113 | #define MAINTENANCE_IN 0xa3 | 107 | #define MAINTENANCE_IN 0xa3 |
114 | #define MOVE_MEDIUM 0xa5 | 108 | #define MOVE_MEDIUM 0xa5 |
@@ -136,6 +130,38 @@ extern const unsigned char scsi_command_size[8]; | |||
136 | #define ATA_12 0xa1 /* 12-byte pass-thru */ | 130 | #define ATA_12 0xa1 /* 12-byte pass-thru */ |
137 | 131 | ||
138 | /* | 132 | /* |
133 | * SCSI command lengths | ||
134 | */ | ||
135 | |||
136 | #define SCSI_MAX_VARLEN_CDB_SIZE 260 | ||
137 | |||
138 | /* defined in T10 SCSI Primary Commands-2 (SPC2) */ | ||
139 | struct scsi_varlen_cdb_hdr { | ||
140 | u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ | ||
141 | u8 control; | ||
142 | u8 misc[5]; | ||
143 | u8 additional_cdb_length; /* total cdb length - 8 */ | ||
144 | __be16 service_action; | ||
145 | /* service specific data follows */ | ||
146 | }; | ||
147 | |||
148 | static inline unsigned | ||
149 | scsi_varlen_cdb_length(const void *hdr) | ||
150 | { | ||
151 | return ((struct scsi_varlen_cdb_hdr *)hdr)->additional_cdb_length + 8; | ||
152 | } | ||
153 | |||
154 | extern const unsigned char scsi_command_size_tbl[8]; | ||
155 | #define COMMAND_SIZE(opcode) scsi_command_size_tbl[((opcode) >> 5) & 7] | ||
156 | |||
157 | static inline unsigned | ||
158 | scsi_command_size(const unsigned char *cmnd) | ||
159 | { | ||
160 | return (cmnd[0] == VARIABLE_LENGTH_CMD) ? | ||
161 | scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); | ||
162 | } | ||
163 | |||
164 | /* | ||
139 | * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft | 165 | * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft |
140 | * T10/1561-D Revision 4 Draft dated 7th November 2002. | 166 | * T10/1561-D Revision 4 Draft dated 7th November 2002. |
141 | */ | 167 | */ |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 8d20e60a94b7..3e46dfae8194 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -7,10 +7,28 @@ | |||
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | #include <linux/blkdev.h> | ||
10 | 11 | ||
11 | struct Scsi_Host; | 12 | struct Scsi_Host; |
12 | struct scsi_device; | 13 | struct scsi_device; |
13 | 14 | ||
15 | /* | ||
16 | * MAX_COMMAND_SIZE is: | ||
17 | * The longest fixed-length SCSI CDB as per the SCSI standard. | ||
18 | * fixed-length means: commands that their size can be determined | ||
19 | * by their opcode and the CDB does not carry a length specifier, (unlike | ||
20 | * the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly | ||
21 | * true and the SCSI standard also defines extended commands and | ||
22 | * vendor specific commands that can be bigger than 16 bytes. The kernel | ||
23 | * will support these using the same infrastructure used for VARLEN CDB's. | ||
24 | * So in effect MAX_COMMAND_SIZE means the maximum size command scsi-ml | ||
25 | * supports without specifying a cmd_len by ULD's | ||
26 | */ | ||
27 | #define MAX_COMMAND_SIZE 16 | ||
28 | #if (MAX_COMMAND_SIZE > BLK_MAX_CDB) | ||
29 | # error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB | ||
30 | #endif | ||
31 | |||
14 | struct scsi_data_buffer { | 32 | struct scsi_data_buffer { |
15 | struct sg_table table; | 33 | struct sg_table table; |
16 | unsigned length; | 34 | unsigned length; |
@@ -60,12 +78,11 @@ struct scsi_cmnd { | |||
60 | int allowed; | 78 | int allowed; |
61 | int timeout_per_command; | 79 | int timeout_per_command; |
62 | 80 | ||
63 | unsigned char cmd_len; | 81 | unsigned short cmd_len; |
64 | enum dma_data_direction sc_data_direction; | 82 | enum dma_data_direction sc_data_direction; |
65 | 83 | ||
66 | /* These elements define the operation we are about to perform */ | 84 | /* These elements define the operation we are about to perform */ |
67 | #define MAX_COMMAND_SIZE 16 | 85 | unsigned char *cmnd; |
68 | unsigned char cmnd[MAX_COMMAND_SIZE]; | ||
69 | 86 | ||
70 | struct timer_list eh_timeout; /* Used to time out the command. */ | 87 | struct timer_list eh_timeout; /* Used to time out the command. */ |
71 | 88 | ||
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index d3a133b4a072..2a9add21267d 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h | |||
@@ -75,11 +75,11 @@ struct scsi_eh_save { | |||
75 | int result; | 75 | int result; |
76 | enum dma_data_direction data_direction; | 76 | enum dma_data_direction data_direction; |
77 | unsigned char cmd_len; | 77 | unsigned char cmd_len; |
78 | unsigned char cmnd[MAX_COMMAND_SIZE]; | 78 | unsigned char *cmnd; |
79 | struct scsi_data_buffer sdb; | 79 | struct scsi_data_buffer sdb; |
80 | struct request *next_rq; | 80 | struct request *next_rq; |
81 | |||
82 | /* new command support */ | 81 | /* new command support */ |
82 | unsigned char eh_cmnd[BLK_MAX_CDB]; | ||
83 | struct scatterlist sense_sgl; | 83 | struct scatterlist sense_sgl; |
84 | }; | 84 | }; |
85 | 85 | ||
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index d967d6dc7a28..1834fdfe82a7 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -573,13 +573,11 @@ struct Scsi_Host { | |||
573 | /* | 573 | /* |
574 | * The maximum length of SCSI commands that this host can accept. | 574 | * The maximum length of SCSI commands that this host can accept. |
575 | * Probably 12 for most host adapters, but could be 16 for others. | 575 | * Probably 12 for most host adapters, but could be 16 for others. |
576 | * or 260 if the driver supports variable length cdbs. | ||
576 | * For drivers that don't set this field, a value of 12 is | 577 | * For drivers that don't set this field, a value of 12 is |
577 | * assumed. I am leaving this as a number rather than a bit | 578 | * assumed. |
578 | * because you never know what subsequent SCSI standards might do | ||
579 | * (i.e. could there be a 20 byte or a 24-byte command a few years | ||
580 | * down the road?). | ||
581 | */ | 579 | */ |
582 | unsigned char max_cmd_len; | 580 | unsigned short max_cmd_len; |
583 | 581 | ||
584 | int this_id; | 582 | int this_id; |
585 | int can_queue; | 583 | int can_queue; |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 049edc5e6461..9c309daf492b 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -505,6 +505,7 @@ struct snd_ac97 { | |||
505 | unsigned short pcmreg[3]; // PCM registers | 505 | unsigned short pcmreg[3]; // PCM registers |
506 | unsigned short codec_cfg[3]; // CODEC_CFG bits | 506 | unsigned short codec_cfg[3]; // CODEC_CFG bits |
507 | unsigned char swap_mic_linein; // AD1986/AD1986A only | 507 | unsigned char swap_mic_linein; // AD1986/AD1986A only |
508 | unsigned char lo_as_master; /* LO as master */ | ||
508 | } ad18xx; | 509 | } ad18xx; |
509 | unsigned int dev_flags; /* device specific */ | 510 | unsigned int dev_flags; /* device specific */ |
510 | } spec; | 511 | } spec; |
diff --git a/include/sound/soc.h b/include/sound/soc.h index e6ea6f750941..d3c8c033dff8 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -238,7 +238,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, | |||
238 | struct snd_ctl_elem_info *uinfo); | 238 | struct snd_ctl_elem_info *uinfo); |
239 | int snd_soc_info_volsw_ext(struct snd_kcontrol *kcontrol, | 239 | int snd_soc_info_volsw_ext(struct snd_kcontrol *kcontrol, |
240 | struct snd_ctl_elem_info *uinfo); | 240 | struct snd_ctl_elem_info *uinfo); |
241 | #define snd_soc_info_bool_ext snd_ctl_boolean_mono | 241 | #define snd_soc_info_bool_ext snd_ctl_boolean_mono_info |
242 | int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, | 242 | int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, |
243 | struct snd_ctl_elem_value *ucontrol); | 243 | struct snd_ctl_elem_value *ucontrol); |
244 | int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, | 244 | int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, |
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index 9b018da48cf3..819a0331cda9 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define __XEN_PUBLIC_XEN_H__ | 10 | #define __XEN_PUBLIC_XEN_H__ |
11 | 11 | ||
12 | #include <asm/xen/interface.h> | 12 | #include <asm/xen/interface.h> |
13 | #include <asm/pvclock-abi.h> | ||
13 | 14 | ||
14 | /* | 15 | /* |
15 | * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS). | 16 | * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS). |
@@ -336,7 +337,7 @@ struct vcpu_info { | |||
336 | uint8_t evtchn_upcall_mask; | 337 | uint8_t evtchn_upcall_mask; |
337 | unsigned long evtchn_pending_sel; | 338 | unsigned long evtchn_pending_sel; |
338 | struct arch_vcpu_info arch; | 339 | struct arch_vcpu_info arch; |
339 | struct vcpu_time_info time; | 340 | struct pvclock_vcpu_time_info time; |
340 | }; /* 64 bytes (x86) */ | 341 | }; /* 64 bytes (x86) */ |
341 | 342 | ||
342 | /* | 343 | /* |
@@ -384,9 +385,7 @@ struct shared_info { | |||
384 | * Wallclock time: updated only by control software. Guests should base | 385 | * Wallclock time: updated only by control software. Guests should base |
385 | * their gettimeofday() syscall on this wallclock-base value. | 386 | * their gettimeofday() syscall on this wallclock-base value. |
386 | */ | 387 | */ |
387 | uint32_t wc_version; /* Version counter: see vcpu_time_info_t. */ | 388 | struct pvclock_wall_clock wc; |
388 | uint32_t wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */ | ||
389 | uint32_t wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */ | ||
390 | 389 | ||
391 | struct arch_shared_info arch; | 390 | struct arch_shared_info arch; |
392 | 391 | ||