aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@tglx.tec.linutronix.de>2005-06-26 17:20:36 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-06-26 17:20:36 -0400
commit7ca6448dbfb398bba36eda3c01bc14b86c3675be (patch)
tree82d934ebf07f22a2c64c3b6d82ec24082878b43a /include/asm-mips
parentf1f67a9874f1a4bba1adff6d694aa52e5f52ff1a (diff)
parent7d681b23d6cc14a8c026ea6756242cb522cbbcae (diff)
Merge with rsync://fileserver/linux
Update to Linus latest
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/compat.h1
-rw-r--r--include/asm-mips/mmzone.h4
-rw-r--r--include/asm-mips/page.h2
-rw-r--r--include/asm-mips/pgtable.h2
-rw-r--r--include/asm-mips/smp.h2
-rw-r--r--include/asm-mips/system.h10
-rw-r--r--include/asm-mips/thread_info.h2
-rw-r--r--include/asm-mips/vr41xx/giu.h69
-rw-r--r--include/asm-mips/vr41xx/vr41xx.h35
9 files changed, 80 insertions, 47 deletions
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h
index dce92079e7fc..d78002afb1e1 100644
--- a/include/asm-mips/compat.h
+++ b/include/asm-mips/compat.h
@@ -29,6 +29,7 @@ typedef s32 compat_caddr_t;
29typedef struct { 29typedef struct {
30 s32 val[2]; 30 s32 val[2];
31} compat_fsid_t; 31} compat_fsid_t;
32typedef s32 compat_timer_t;
32 33
33typedef s32 compat_int_t; 34typedef s32 compat_int_t;
34typedef s32 compat_long_t; 35typedef s32 compat_long_t;
diff --git a/include/asm-mips/mmzone.h b/include/asm-mips/mmzone.h
index 29ee13be0b2a..d721143dbd47 100644
--- a/include/asm-mips/mmzone.h
+++ b/include/asm-mips/mmzone.h
@@ -8,6 +8,8 @@
8#include <asm/page.h> 8#include <asm/page.h>
9#include <mmzone.h> 9#include <mmzone.h>
10 10
11#ifdef CONFIG_DISCONTIGMEM
12
11#define kvaddr_to_nid(kvaddr) pa_to_nid(__pa(kvaddr)) 13#define kvaddr_to_nid(kvaddr) pa_to_nid(__pa(kvaddr))
12#define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT) 14#define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT)
13 15
@@ -36,4 +38,6 @@
36/* XXX: FIXME -- wli */ 38/* XXX: FIXME -- wli */
37#define kern_addr_valid(addr) (0) 39#define kern_addr_valid(addr) (0)
38 40
41#endif /* CONFIG_DISCONTIGMEM */
42
39#endif /* _ASM_MMZONE_H_ */ 43#endif /* _ASM_MMZONE_H_ */
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index d1bf8240e73b..5cae35cd9ba9 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -127,7 +127,7 @@ static __inline__ int get_order(unsigned long size)
127 127
128#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 128#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
129 129
130#ifndef CONFIG_DISCONTIGMEM 130#ifndef CONFIG_NEED_MULTIPLE_NODES
131#define pfn_to_page(pfn) (mem_map + (pfn)) 131#define pfn_to_page(pfn) (mem_map + (pfn))
132#define page_to_pfn(page) ((unsigned long)((page) - mem_map)) 132#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
133#define pfn_valid(pfn) ((pfn) < max_mapnr) 133#define pfn_valid(pfn) ((pfn) < max_mapnr)
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 878843203d67..e76ccd6e3a5d 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -350,7 +350,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
350 __update_cache(vma, address, pte); 350 __update_cache(vma, address, pte);
351} 351}
352 352
353#ifndef CONFIG_DISCONTIGMEM 353#ifndef CONFIG_NEED_MULTIPLE_NODES
354#define kern_addr_valid(addr) (1) 354#define kern_addr_valid(addr) (1)
355#endif 355#endif
356 356
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h
index 8ba370ecfd4c..5618f1e12f40 100644
--- a/include/asm-mips/smp.h
+++ b/include/asm-mips/smp.h
@@ -21,7 +21,7 @@
21#include <linux/cpumask.h> 21#include <linux/cpumask.h>
22#include <asm/atomic.h> 22#include <asm/atomic.h>
23 23
24#define smp_processor_id() (current_thread_info()->cpu) 24#define raw_smp_processor_id() (current_thread_info()->cpu)
25 25
26/* Map from cpu id to sequential logical cpu number. This will only 26/* Map from cpu id to sequential logical cpu number. This will only
27 not be idempotent when cpus failed to come on-line. */ 27 not be idempotent when cpus failed to come on-line. */
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index 888fd8908467..169f3d4265b1 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -422,16 +422,10 @@ extern void __die_if_kernel(const char *, struct pt_regs *, const char *file,
422extern int stop_a_enabled; 422extern int stop_a_enabled;
423 423
424/* 424/*
425 * Taken from include/asm-ia64/system.h; prevents deadlock on SMP 425 * See include/asm-ia64/system.h; prevents deadlock on SMP
426 * systems. 426 * systems.
427 */ 427 */
428#define prepare_arch_switch(rq, next) \ 428#define __ARCH_WANT_UNLOCKED_CTXSW
429do { \
430 spin_lock(&(next)->switch_lock); \
431 spin_unlock(&(rq)->lock); \
432} while (0)
433#define finish_arch_switch(rq, prev) spin_unlock_irq(&(prev)->switch_lock)
434#define task_running(rq, p) ((rq)->curr == (p) || spin_is_locked(&(p)->switch_lock))
435 429
436#define arch_align_stack(x) (x) 430#define arch_align_stack(x) (x)
437 431
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h
index 768900305e2f..42fcd6f2c206 100644
--- a/include/asm-mips/thread_info.h
+++ b/include/asm-mips/thread_info.h
@@ -27,7 +27,7 @@ struct thread_info {
27 struct exec_domain *exec_domain; /* execution domain */ 27 struct exec_domain *exec_domain; /* execution domain */
28 unsigned long flags; /* low level flags */ 28 unsigned long flags; /* low level flags */
29 __u32 cpu; /* current CPU */ 29 __u32 cpu; /* current CPU */
30 __s32 preempt_count; /* 0 => preemptable, <0 => BUG */ 30 int preempt_count; /* 0 => preemptable, <0 => BUG */
31 31
32 mm_segment_t addr_limit; /* thread address space: 32 mm_segment_t addr_limit; /* thread address space:
33 0-0xBFFFFFFF for user-thead 33 0-0xBFFFFFFF for user-thead
diff --git a/include/asm-mips/vr41xx/giu.h b/include/asm-mips/vr41xx/giu.h
new file mode 100644
index 000000000000..8590885a7638
--- /dev/null
+++ b/include/asm-mips/vr41xx/giu.h
@@ -0,0 +1,69 @@
1/*
2 * Include file for NEC VR4100 series General-purpose I/O Unit.
3 *
4 * Copyright (C) 2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __NEC_VR41XX_GIU_H
21#define __NEC_VR41XX_GIU_H
22
23typedef enum {
24 IRQ_TRIGGER_LEVEL,
25 IRQ_TRIGGER_EDGE,
26 IRQ_TRIGGER_EDGE_FALLING,
27 IRQ_TRIGGER_EDGE_RISING,
28} irq_trigger_t;
29
30typedef enum {
31 IRQ_SIGNAL_THROUGH,
32 IRQ_SIGNAL_HOLD,
33} irq_signal_t;
34
35extern void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_t signal);
36
37typedef enum {
38 IRQ_LEVEL_LOW,
39 IRQ_LEVEL_HIGH,
40} irq_level_t;
41
42extern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level);
43
44typedef enum {
45 GPIO_DATA_LOW,
46 GPIO_DATA_HIGH,
47 GPIO_DATA_INVAL,
48} gpio_data_t;
49
50extern gpio_data_t vr41xx_gpio_get_pin(unsigned int pin);
51extern int vr41xx_gpio_set_pin(unsigned int pin, gpio_data_t data);
52
53typedef enum {
54 GPIO_INPUT,
55 GPIO_OUTPUT,
56 GPIO_OUTPUT_DISABLE,
57} gpio_direction_t;
58
59extern int vr41xx_gpio_set_direction(unsigned int pin, gpio_direction_t dir);
60
61typedef enum {
62 GPIO_PULL_DOWN,
63 GPIO_PULL_UP,
64 GPIO_PULL_DISABLE,
65} gpio_pull_t;
66
67extern int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull);
68
69#endif /* __NEC_VR41XX_GIU_H */
diff --git a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h
index ad0d1ea144f0..7d41e44463f9 100644
--- a/include/asm-mips/vr41xx/vr41xx.h
+++ b/include/asm-mips/vr41xx/vr41xx.h
@@ -126,7 +126,6 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock);
126#define GIU_IRQ_BASE 40 126#define GIU_IRQ_BASE 40
127#define GIU_IRQ(x) (GIU_IRQ_BASE + (x)) /* IRQ 40-71 */ 127#define GIU_IRQ(x) (GIU_IRQ_BASE + (x)) /* IRQ 40-71 */
128#define GIU_IRQ_LAST GIU_IRQ(31) 128#define GIU_IRQ_LAST GIU_IRQ(31)
129#define GIU_IRQ_TO_PIN(x) ((x) - GIU_IRQ_BASE) /* Pin 0-31 */
130 129
131extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign); 130extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign);
132extern int vr41xx_cascade_irq(unsigned int irq, int (*get_irq_number)(int irq)); 131extern int vr41xx_cascade_irq(unsigned int irq, int (*get_irq_number)(int irq));
@@ -197,38 +196,4 @@ extern void vr41xx_disable_csiint(uint16_t mask);
197extern void vr41xx_enable_bcuint(void); 196extern void vr41xx_enable_bcuint(void);
198extern void vr41xx_disable_bcuint(void); 197extern void vr41xx_disable_bcuint(void);
199 198
200/*
201 * General-Purpose I/O Unit
202 */
203enum {
204 TRIGGER_LEVEL,
205 TRIGGER_EDGE,
206 TRIGGER_EDGE_FALLING,
207 TRIGGER_EDGE_RISING
208};
209
210enum {
211 SIGNAL_THROUGH,
212 SIGNAL_HOLD
213};
214
215extern void vr41xx_set_irq_trigger(int pin, int trigger, int hold);
216
217enum {
218 LEVEL_LOW,
219 LEVEL_HIGH
220};
221
222extern void vr41xx_set_irq_level(int pin, int level);
223
224enum {
225 PIO_INPUT,
226 PIO_OUTPUT
227};
228
229enum {
230 DATA_LOW,
231 DATA_HIGH
232};
233
234#endif /* __NEC_VR41XX_H */ 199#endif /* __NEC_VR41XX_H */