summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-06-23 19:27:35 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-23 19:27:35 -0700
commit6bac468e24b8e3659377d43e9d1db57b3f405e35 (patch)
tree1e9cbac8eb4beac9d7294a5984d7a6cfa6446b02 /include
parentcc8406d59517e2bd1c0176af6df268e6f5730e59 (diff)
[PATCH] sh: merge.
From: Paul Mundt <lethal@Linux-SH.ORG> This merges the remaining sh changes, random bug fixes, added syscalls, cache fixups, etc. Nothing really eventful. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sh/bus-sh.h65
-rw-r--r--include/asm-sh/cache.h3
-rw-r--r--include/asm-sh/cpu-sh3/dac.h7
-rw-r--r--include/asm-sh/processor.h3
-rw-r--r--include/asm-sh/serial.h3
-rw-r--r--include/asm-sh/sigcontext.h22
-rw-r--r--include/asm-sh/unistd.h12
7 files changed, 104 insertions, 11 deletions
diff --git a/include/asm-sh/bus-sh.h b/include/asm-sh/bus-sh.h
new file mode 100644
index 000000000000..f782a33a98fa
--- /dev/null
+++ b/include/asm-sh/bus-sh.h
@@ -0,0 +1,65 @@
+/*
+ * include/asm-sh/bus-sh.h
+ *
+ * Copyright (C) 2004 Paul Mundt
+ *
+ * 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.
+ */
+#ifndef __ASM_SH_BUS_SH_H
+#define __ASM_SH_BUS_SH_H
+
+extern struct bus_type sh_bus_types[];
+
+struct sh_dev {
+ struct device dev;
+ char *name;
+ unsigned int dev_id;
+ unsigned int bus_id;
+ struct resource res;
+ void *mapbase;
+ unsigned int irq[6];
+ u64 *dma_mask;
+};
+
+#define to_sh_dev(d) container_of((d), struct sh_dev, dev)
+
+#define sh_get_drvdata(d) dev_get_drvdata(&(d)->dev)
+#define sh_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p))
+
+struct sh_driver {
+ struct device_driver drv;
+ unsigned int dev_id;
+ unsigned int bus_id;
+ int (*probe)(struct sh_dev *);
+ int (*remove)(struct sh_dev *);
+ int (*suspend)(struct sh_dev *, u32);
+ int (*resume)(struct sh_dev *);
+};
+
+#define to_sh_driver(d) container_of((d), struct sh_driver, drv)
+#define sh_name(d) ((d)->dev.driver->name)
+
+/*
+ * Device ID numbers for bus types
+ */
+enum {
+ SH_DEV_ID_USB_OHCI,
+};
+
+#define SH_NR_BUSES 1
+#define SH_BUS_NAME_VIRT "shbus"
+
+enum {
+ SH_BUS_VIRT,
+};
+
+/* arch/sh/kernel/cpu/bus.c */
+extern int sh_device_register(struct sh_dev *dev);
+extern void sh_device_unregister(struct sh_dev *dev);
+extern int sh_driver_register(struct sh_driver *drv);
+extern void sh_driver_unregister(struct sh_driver *drv);
+
+#endif /* __ASM_SH_BUS_SH_H */
+
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h
index 9decb1ced217..62b2f50fb20b 100644
--- a/include/asm-sh/cache.h
+++ b/include/asm-sh/cache.h
@@ -28,7 +28,8 @@ struct cache_info {
unsigned int sets;
unsigned int linesz;
- unsigned int way_shift;
+ unsigned int way_incr;
+
unsigned int entry_shift;
unsigned int entry_mask;
diff --git a/include/asm-sh/cpu-sh3/dac.h b/include/asm-sh/cpu-sh3/dac.h
index 7f4129d25632..05fda8316ebc 100644
--- a/include/asm-sh/cpu-sh3/dac.h
+++ b/include/asm-sh/cpu-sh3/dac.h
@@ -1,5 +1,5 @@
-#ifndef __ASM_SH_DAC_H
-#define __ASM_SH_DAC_H
+#ifndef __ASM_CPU_SH3_DAC_H
+#define __ASM_CPU_SH3_DAC_H
/*
* Copyright (C) 2003 Andriy Skulysh
@@ -38,5 +38,4 @@ static __inline__ void sh_dac_output(u8 value, int channel)
else ctrl_outb(value,DADR0);
}
-#endif /* __ASM_SH_DAC_H */
-
+#endif /* __ASM_CPU_SH3_DAC_H */
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h
index 0eaf9d91b54d..922c927478c1 100644
--- a/include/asm-sh/processor.h
+++ b/include/asm-sh/processor.h
@@ -271,6 +271,7 @@ extern unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk) ((tsk)->thread.pc)
#define KSTK_ESP(tsk) ((tsk)->thread.sp)
-#define cpu_relax() __asm__ __volatile__ ("sleep" : : : "memory")
+#define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory")
+#define cpu_relax() do { } while (0)
#endif /* __ASM_SH_PROCESSOR_H */
diff --git a/include/asm-sh/serial.h b/include/asm-sh/serial.h
index 012649927fc5..5474dbdbaa86 100644
--- a/include/asm-sh/serial.h
+++ b/include/asm-sh/serial.h
@@ -44,8 +44,5 @@
#define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS
-/* XXX: This should be moved ino irq.h */
-#define irq_canonicalize(x) (x)
-
#endif
#endif /* _ASM_SERIAL_H */
diff --git a/include/asm-sh/sigcontext.h b/include/asm-sh/sigcontext.h
index 46fbc6feddd4..eb8effba2e80 100644
--- a/include/asm-sh/sigcontext.h
+++ b/include/asm-sh/sigcontext.h
@@ -1,6 +1,26 @@
#ifndef __ASM_SH_SIGCONTEXT_H
#define __ASM_SH_SIGCONTEXT_H
-#include <asm/cpu/sigcontext.h>
+struct sigcontext {
+ unsigned long oldmask;
+
+ /* CPU registers */
+ unsigned long sc_regs[16];
+ unsigned long sc_pc;
+ unsigned long sc_pr;
+ unsigned long sc_sr;
+ unsigned long sc_gbr;
+ unsigned long sc_mach;
+ unsigned long sc_macl;
+
+#if defined(__SH4__) || defined(CONFIG_CPU_SH4)
+ /* FPU registers */
+ unsigned long sc_fpregs[16];
+ unsigned long sc_xfpregs[16];
+ unsigned int sc_fpscr;
+ unsigned int sc_fpul;
+ unsigned int sc_ownedfp;
+#endif
+};
#endif /* __ASM_SH_SIGCONTEXT_H */
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index 26ad6dd928ec..a20677454ca9 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -281,8 +281,17 @@
#define __NR_utimes 271
#define __NR_fadvise64_64 272
#define __NR_vserver 273
+#define __NR_mbind 274
+#define __NR_get_mempolicy 275
+#define __NR_set_mempolicy 276
+#define __NR_mq_open 277
+#define __NR_mq_unlink (__NR_mq_open+1)
+#define __NR_mq_timedsend (__NR_mq_open+2)
+#define __NR_mq_timedreceive (__NR_mq_open+3)
+#define __NR_mq_notify (__NR_mq_open+4)
+#define __NR_mq_getsetattr (__NR_mq_open+5)
-#define NR_syscalls 274
+#define NR_syscalls 283
/* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */
@@ -429,6 +438,7 @@ __syscall_return(type,__sc0); \
#include <linux/compiler.h>
#include <linux/types.h>
+#include <linux/linkage.h>
#include <asm/ptrace.h>
/*