summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-09 23:52:56 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-09 23:52:56 -0700
commit4b35ee7fea60f42b5b205c23372b3f90e90064a4 (patch)
treecf1011d0238ff28226c402e35a79ad5817bd7f7a /include
parent844ef7b98b5108fda7d7c7af7935237ae397999f (diff)
[PATCH] MIPS update
From: Ralf Baechle <ralf@linux-mips.org> - Kconfig cleanups: - enable DMA_NONCOHERENT, DMA_COHERENT or DMA_IP27 via reverse dependencies - untangle VRC4171 / VRC4173 selection - R10000 support enables PREFETCH - SEAD needs IRQ_CPU - Update defconfig against latest Kconfig files. - Fix computation of return address if syscall number was out of range - Add power managment hooks in signal code. - Don't try to handle signals when previous context was not in user mode. - Fix serial interface setup for VR41xx systems. - Build fixes after CLEAR_BITMAP changed name. - Removes bogus comment from <asm/checksum.h> - <asm/hdreg.h> is dead. - Start collecting common definitions for PMON firmware in <asm/pmon.h> - Define ARCH_MIN_TASKALIGN to 8; we have 64-bit members even on 32-bit kernels if we're running on MIPS II or better.
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/checksum.h4
-rw-r--r--include/asm-mips/hdreg.h2
-rw-r--r--include/asm-mips/mach-au1x00/au1000.h19
-rw-r--r--include/asm-mips/mach-db1x00/db1x00.h31
-rw-r--r--include/asm-mips/pmon.h22
-rw-r--r--include/asm-mips/processor.h2
-rw-r--r--include/asm-mips/ptrace.h2
-rw-r--r--include/asm-mips/thread_info.h6
-rw-r--r--include/asm-mips/unistd.h39
-rw-r--r--include/asm-mips/vr41xx/vr41xx.h20
10 files changed, 116 insertions, 31 deletions
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h
index 0db85f430619..e31681afb1af 100644
--- a/include/asm-mips/checksum.h
+++ b/include/asm-mips/checksum.h
@@ -120,10 +120,6 @@ static inline unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl)
return csum_fold(csum);
}
-/*
- * computes the checksum of the TCP/UDP pseudo-header
- * returns a 16-bit checksum, already complemented
- */
static inline unsigned int csum_tcpudp_nofold(unsigned long saddr,
unsigned long daddr, unsigned short len, unsigned short proto,
unsigned int sum)
diff --git a/include/asm-mips/hdreg.h b/include/asm-mips/hdreg.h
index 7f7fd1af0af3..5989bbc97cbf 100644
--- a/include/asm-mips/hdreg.h
+++ b/include/asm-mips/hdreg.h
@@ -1 +1 @@
-#include <asm-generic/hdreg.h>
+#warning this file is obsolete, please do not use it
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h
index 91b1b07a5d78..326f266968ab 100644
--- a/include/asm-mips/mach-au1x00/au1000.h
+++ b/include/asm-mips/mach-au1x00/au1000.h
@@ -1141,14 +1141,14 @@ extern au1xxx_irq_map_t au1xxx_irq_map[];
#define Au1500_PCI_MEM_START 0x440000000
#define Au1500_PCI_MEM_END 0x44FFFFFFF
-#define PCI_IO_START (Au1500_PCI_IO_START + 0x300)
+#define PCI_IO_START (Au1500_PCI_IO_START + 0x1000)
#define PCI_IO_END (Au1500_PCI_IO_END)
#define PCI_MEM_START (Au1500_PCI_MEM_START)
#define PCI_MEM_END (Au1500_PCI_MEM_END)
#define PCI_FIRST_DEVFN (0<<3)
#define PCI_LAST_DEVFN (19<<3)
-#define IOPORT_RESOURCE_START 0x00000000
+#define IOPORT_RESOURCE_START 0x00001000 /* skip the legacy ide probing */
#define IOPORT_RESOURCE_END 0xffffffff
#define IOMEM_RESOURCE_START 0x10000000
#define IOMEM_RESOURCE_END 0xffffffff
@@ -1199,5 +1199,20 @@ extern au1xxx_irq_map_t au1xxx_irq_map[];
#elif defined(CONFIG_SOC_AU1100)
#define NUM_ETH_INTERFACES 1
#endif
+/* Processor information base on prid.
+ * Copied from PowerPC.
+ */
+struct cpu_spec {
+ /* CPU is matched via (PRID & prid_mask) == prid_value */
+ unsigned int prid_mask;
+ unsigned int prid_value;
+
+ char *cpu_name;
+ unsigned int cpu_od; /* Set Config[OD] */
+ unsigned int cpu_bclk; /* Enable BCLK switching */
+};
+
+extern struct cpu_spec cpu_specs[];
+extern struct cpu_spec *cur_cpu_spec[];
#endif
diff --git a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h
index 65990e18a4ec..3b03b0b0a7e9 100644
--- a/include/asm-mips/mach-db1x00/db1x00.h
+++ b/include/asm-mips/mach-db1x00/db1x00.h
@@ -27,21 +27,34 @@
#ifndef __ASM_DB1X00_H
#define __ASM_DB1X00_H
+#ifdef CONFIG_MIPS_DB1550
+#define BCSR_KSEG1_ADDR 0xAF000000
+#else
+#define BCSR_KSEG1_ADDR 0xAE000000
+#endif
/*
* Overlay data structure of the Db1x00 board registers.
- * Registers located at physical 1E0000xx, KSEG1 0xAE0000xx
+ * Registers located at physical 0E0000xx, KSEG1 0xAE0000xx
*/
typedef volatile struct
{
- /*00*/ unsigned long whoami;
- /*04*/ unsigned long status;
- /*08*/ unsigned long switches;
- /*0C*/ unsigned long resets;
- /*10*/ unsigned long pcmcia;
- /*14*/ unsigned long specific;
- /*18*/ unsigned long leds;
- /*1C*/ unsigned long swreset;
+ /*00*/ unsigned short whoami;
+ unsigned short reserved0;
+ /*04*/ unsigned short status;
+ unsigned short reserved1;
+ /*08*/ unsigned short switches;
+ unsigned short reserved2;
+ /*0C*/ unsigned short resets;
+ unsigned short reserved3;
+ /*10*/ unsigned short pcmcia;
+ unsigned short reserved4;
+ /*14*/ unsigned short specific;
+ unsigned short reserved5;
+ /*18*/ unsigned short leds;
+ unsigned short reserved6;
+ /*1C*/ unsigned short swreset;
+ unsigned short reserved7;
} BCSR;
diff --git a/include/asm-mips/pmon.h b/include/asm-mips/pmon.h
new file mode 100644
index 000000000000..0162517854d4
--- /dev/null
+++ b/include/asm-mips/pmon.h
@@ -0,0 +1,22 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2004 by Ralf Baechle
+ */
+#ifndef _ASM_PMON_H
+#define _ASM_PMON_H
+
+struct callvectors {
+ int (*open) (char*, int, int); /* 0 */
+ int (*close) (int); /* 4 */
+ int (*read) (int, void*, int); /* 8 */
+ int (*write) (int, void*, int); /* 12 */
+ off_t (*lseek) (int, off_t, int); /* 16 */
+ int (*printf) (const char*, ...); /* 20 */
+ void (*cacheflush) (void); /* 24 */
+ char* (*gets) (char*); /* 28 */
+};
+
+#endif /* _ASM_PMON_H */
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h
index f13b15ac0b10..70534af2a59c 100644
--- a/include/asm-mips/processor.h
+++ b/include/asm-mips/processor.h
@@ -175,6 +175,8 @@ typedef struct {
unsigned long seg;
} mm_segment_t;
+#define ARCH_MIN_TASKALIGN 8
+
/*
* If you change thread_struct remember to change the #defines below too!
*/
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h
index 36df5fc7b37b..19cadb6579fd 100644
--- a/include/asm-mips/ptrace.h
+++ b/include/asm-mips/ptrace.h
@@ -69,6 +69,8 @@ struct pt_regs {
extern void show_regs(struct pt_regs *);
+extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit);
+
#endif
#endif /* _ASM_PTRACE_H */
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h
index 82889016dc5b..11782520310b 100644
--- a/include/asm-mips/thread_info.h
+++ b/include/asm-mips/thread_info.h
@@ -110,6 +110,7 @@ register struct thread_info *__current_thread_info __asm__("$28");
#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
+#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */
#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_SYSCALL_TRACE 31 /* syscall trace active */
@@ -118,12 +119,13 @@ register struct thread_info *__current_thread_info __asm__("$28");
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
+#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
-#define _TIF_WORK_MASK 0x0000fffe /* work to do on
+#define _TIF_WORK_MASK 0x0000ffef /* work to do on
interrupt/exception return */
-#define _TIF_ALLWORK_MASK 0x8000fffe /* work to do on any return to
+#define _TIF_ALLWORK_MASK 0x8000ffff /* work to do on any return to
u-space */
#endif /* __KERNEL__ */
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 8fe42c70e98a..5b0643dd48e4 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -288,16 +288,25 @@
#define __NR_clock_nanosleep (__NR_Linux + 265)
#define __NR_tgkill (__NR_Linux + 266)
#define __NR_utimes (__NR_Linux + 267)
+#define __NR_mbind (__NR_Linux + 268)
+#define __NR_get_mempolicy (__NR_Linux + 269)
+#define __NR_set_mempolicy (__NR_Linux + 270)
+#define __NR_mq_open (__NR_Linux + 271)
+#define __NR_mq_unlink (__NR_Linux + 272)
+#define __NR_mq_timedsend (__NR_Linux + 273)
+#define __NR_mq_timedreceive (__NR_Linux + 274)
+#define __NR_mq_notify (__NR_Linux + 275)
+#define __NR_mq_getsetattr (__NR_Linux + 276)
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux_syscalls 267
+#define __NR_Linux_syscalls 276
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
#define __NR_O32_Linux 4000
-#define __NR_O32_Linux_syscalls 267
+#define __NR_O32_Linux_syscalls 276
#if _MIPS_SIM == _MIPS_SIM_ABI64
@@ -532,16 +541,25 @@
#define __NR_clock_nanosleep (__NR_Linux + 224)
#define __NR_tgkill (__NR_Linux + 225)
#define __NR_utimes (__NR_Linux + 226)
+#define __NR_mbind (__NR_Linux + 227)
+#define __NR_get_mempolicy (__NR_Linux + 228)
+#define __NR_set_mempolicy (__NR_Linux + 229)
+#define __NR_mq_open (__NR_Linux + 230)
+#define __NR_mq_unlink (__NR_Linux + 231)
+#define __NR_mq_timedsend (__NR_Linux + 232)
+#define __NR_mq_timedreceive (__NR_Linux + 233)
+#define __NR_mq_notify (__NR_Linux + 234)
+#define __NR_mq_getsetattr (__NR_Linux + 235)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 226
+#define __NR_Linux_syscalls 235
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
#define __NR_64_Linux 5000
-#define __NR_64_Linux_syscalls 226
+#define __NR_64_Linux_syscalls 235
#if _MIPS_SIM == _MIPS_SIM_NABI32
@@ -780,16 +798,25 @@
#define __NR_clock_nanosleep (__NR_Linux + 228)
#define __NR_tgkill (__NR_Linux + 229)
#define __NR_utimes (__NR_Linux + 230)
+#define __NR_mbind (__NR_Linux + 231)
+#define __NR_get_mempolicy (__NR_Linux + 232)
+#define __NR_set_mempolicy (__NR_Linux + 233)
+#define __NR_mq_open (__NR_Linux + 234)
+#define __NR_mq_unlink (__NR_Linux + 235)
+#define __NR_mq_timedsend (__NR_Linux + 236)
+#define __NR_mq_timedreceive (__NR_Linux + 237)
+#define __NR_mq_notify (__NR_Linux + 238)
+#define __NR_mq_getsetattr (__NR_Linux + 239)
/*
* Offset of the last N32 flavoured syscall
*/
-#define __NR_Linux_syscalls 230
+#define __NR_Linux_syscalls 239
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
#define __NR_N32_Linux 6000
-#define __NR_N32_Linux_syscalls 230
+#define __NR_N32_Linux_syscalls 239
#ifndef __ASSEMBLY__
diff --git a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h
index 8d2e1b6dfe56..53fe1162af7e 100644
--- a/include/asm-mips/vr41xx/vr41xx.h
+++ b/include/asm-mips/vr41xx/vr41xx.h
@@ -136,6 +136,9 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock);
extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign);
extern int vr41xx_cascade_irq(unsigned int irq, int (*get_irq_number)(int irq));
+extern void vr41xx_enable_dsiuint(void);
+extern void vr41xx_disable_dsiuint(void);
+
/*
* Power Management Unit
*/
@@ -189,22 +192,25 @@ enum {
/*
* Serial Interface Unit
*/
-extern void vr41xx_siu_init(int interface, int module);
-extern void vr41xx_siu_ifselect(int interface, int module);
+extern void vr41xx_siu_init(void);
extern int vr41xx_serial_ports;
/* SIU interfaces */
-enum {
+typedef enum {
SIU_RS232C,
SIU_IRDA
-};
+} siu_interface_t;
/* IrDA interfaces */
-enum {
- IRDA_SHARP = 1,
+typedef enum {
+ IRDA_NONE,
+ IRDA_SHARP,
IRDA_TEMIC,
IRDA_HP
-};
+} irda_module_t;
+
+extern void vr41xx_select_siu_interface(siu_interface_t interface,
+ irda_module_t module);
/*
* Debug Serial Interface Unit