aboutsummaryrefslogtreecommitdiff
path: root/include/asm-frv
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-frv
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-frv')
-rw-r--r--include/asm-frv/a.out.h5
-rw-r--r--include/asm-frv/atomic.h417
-rw-r--r--include/asm-frv/ax88796.h22
-rw-r--r--include/asm-frv/bitops.h341
-rw-r--r--include/asm-frv/bug.h51
-rw-r--r--include/asm-frv/bugs.h14
-rw-r--r--include/asm-frv/busctl-regs.h41
-rw-r--r--include/asm-frv/byteorder.h13
-rw-r--r--include/asm-frv/cache.h24
-rw-r--r--include/asm-frv/cacheflush.h91
-rw-r--r--include/asm-frv/checksum.h183
-rw-r--r--include/asm-frv/cpu-irqs.h87
-rw-r--r--include/asm-frv/cpumask.h6
-rw-r--r--include/asm-frv/cputime.h6
-rw-r--r--include/asm-frv/current.h30
-rw-r--r--include/asm-frv/delay.h50
-rw-r--r--include/asm-frv/div64.h1
-rw-r--r--include/asm-frv/dm9000.h37
-rw-r--r--include/asm-frv/dma-mapping.h184
-rw-r--r--include/asm-frv/dma.h129
-rw-r--r--include/asm-frv/elf.h147
-rw-r--r--include/asm-frv/errno.h7
-rw-r--r--include/asm-frv/fcntl.h88
-rw-r--r--include/asm-frv/fpu.h12
-rw-r--r--include/asm-frv/gdb-stub.h118
-rw-r--r--include/asm-frv/gpio-regs.h116
-rw-r--r--include/asm-frv/hardirq.h30
-rw-r--r--include/asm-frv/highmem.h181
-rw-r--r--include/asm-frv/hw_irq.h16
-rw-r--r--include/asm-frv/ide.h43
-rw-r--r--include/asm-frv/init.h12
-rw-r--r--include/asm-frv/io.h290
-rw-r--r--include/asm-frv/ioctl.h80
-rw-r--r--include/asm-frv/ioctls.h82
-rw-r--r--include/asm-frv/ipc.h1
-rw-r--r--include/asm-frv/ipcbuf.h30
-rw-r--r--include/asm-frv/irc-regs.h53
-rw-r--r--include/asm-frv/irq-routing.h70
-rw-r--r--include/asm-frv/irq.h44
-rw-r--r--include/asm-frv/kmap_types.h29
-rw-r--r--include/asm-frv/linkage.h7
-rw-r--r--include/asm-frv/local.h6
-rw-r--r--include/asm-frv/math-emu.h301
-rw-r--r--include/asm-frv/mb-regs.h185
-rw-r--r--include/asm-frv/mb86943a.h39
-rw-r--r--include/asm-frv/mb93091-fpga-irqs.h44
-rw-r--r--include/asm-frv/mb93093-fpga-irqs.h31
-rw-r--r--include/asm-frv/mb93493-irqs.h52
-rw-r--r--include/asm-frv/mb93493-regs.h279
-rw-r--r--include/asm-frv/mem-layout.h78
-rw-r--r--include/asm-frv/mman.h44
-rw-r--r--include/asm-frv/mmu.h42
-rw-r--r--include/asm-frv/mmu_context.h50
-rw-r--r--include/asm-frv/module.h20
-rw-r--r--include/asm-frv/msgbuf.h32
-rw-r--r--include/asm-frv/namei.h18
-rw-r--r--include/asm-frv/page.h105
-rw-r--r--include/asm-frv/param.h23
-rw-r--r--include/asm-frv/pci.h108
-rw-r--r--include/asm-frv/percpu.h6
-rw-r--r--include/asm-frv/pgalloc.h64
-rw-r--r--include/asm-frv/pgtable.h555
-rw-r--r--include/asm-frv/poll.h23
-rw-r--r--include/asm-frv/posix_types.h66
-rw-r--r--include/asm-frv/processor.h153
-rw-r--r--include/asm-frv/ptrace.h86
-rw-r--r--include/asm-frv/registers.h255
-rw-r--r--include/asm-frv/resource.h7
-rw-r--r--include/asm-frv/scatterlist.h32
-rw-r--r--include/asm-frv/sections.h46
-rw-r--r--include/asm-frv/segment.h46
-rw-r--r--include/asm-frv/semaphore.h161
-rw-r--r--include/asm-frv/sembuf.h26
-rw-r--r--include/asm-frv/serial-regs.h44
-rw-r--r--include/asm-frv/serial.h19
-rw-r--r--include/asm-frv/setup.h25
-rw-r--r--include/asm-frv/shmbuf.h43
-rw-r--r--include/asm-frv/shmparam.h7
-rw-r--r--include/asm-frv/sigcontext.h26
-rw-r--r--include/asm-frv/siginfo.h12
-rw-r--r--include/asm-frv/signal.h187
-rw-r--r--include/asm-frv/smp.h10
-rw-r--r--include/asm-frv/socket.h51
-rw-r--r--include/asm-frv/sockios.h13
-rw-r--r--include/asm-frv/spinlock.h17
-rw-r--r--include/asm-frv/spr-regs.h401
-rw-r--r--include/asm-frv/stat.h100
-rw-r--r--include/asm-frv/statfs.h7
-rw-r--r--include/asm-frv/string.h51
-rw-r--r--include/asm-frv/suspend.h20
-rw-r--r--include/asm-frv/system.h128
-rw-r--r--include/asm-frv/termbits.h177
-rw-r--r--include/asm-frv/termios.h74
-rw-r--r--include/asm-frv/thread_info.h159
-rw-r--r--include/asm-frv/timer-regs.h106
-rw-r--r--include/asm-frv/timex.h25
-rw-r--r--include/asm-frv/tlb.h23
-rw-r--r--include/asm-frv/tlbflush.h77
-rw-r--r--include/asm-frv/topology.h14
-rw-r--r--include/asm-frv/types.h74
-rw-r--r--include/asm-frv/uaccess.h318
-rw-r--r--include/asm-frv/ucontext.h12
-rw-r--r--include/asm-frv/unaligned.h203
-rw-r--r--include/asm-frv/unistd.h501
-rw-r--r--include/asm-frv/user.h80
-rw-r--r--include/asm-frv/virtconvert.h42
106 files changed, 9217 insertions, 0 deletions
diff --git a/include/asm-frv/a.out.h b/include/asm-frv/a.out.h
new file mode 100644
index 00000000000..dd3b7e5754c
--- /dev/null
+++ b/include/asm-frv/a.out.h
@@ -0,0 +1,5 @@
+/*
+ * FRV doesn't do AOUT format. This header file should be removed as
+ * soon as fs/exec.c and fs/proc/kcore.c and the archs that require
+ * them to include linux/a.out.h are fixed.
+ */
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h
new file mode 100644
index 00000000000..e7596846342
--- /dev/null
+++ b/include/asm-frv/atomic.h
@@ -0,0 +1,417 @@
+/* atomic.h: atomic operation emulation for FR-V
+ *
+ * For an explanation of how atomic ops work in this arch, see:
+ * Documentation/fujitsu/frv/atomic-ops.txt
+ *
+ * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#ifndef _ASM_ATOMIC_H
+#define _ASM_ATOMIC_H
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <asm/spr-regs.h>
+
+#ifdef CONFIG_SMP
+#error not SMP safe
+#endif
+
+/*
+ * Atomic operations that C can't guarantee us. Useful for
+ * resource counting etc..
+ *
+ * We do not have SMP systems, so we don't have to deal with that.
+ */
+
+/* Atomic operations are already serializing */
+#define smp_mb__before_atomic_dec() barrier()
+#define smp_mb__after_atomic_dec() barrier()
+#define smp_mb__before_atomic_inc() barrier()
+#define smp_mb__after_atomic_inc() barrier()
+
+typedef struct {
+ int counter;
+} atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v, i) (((v)->counter) = (i))
+
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+static inline int atomic_add_return(int i, atomic_t *v)
+{
+ unsigned long val;
+
+ asm("0: \n"
+ " orcc gr0,gr0,gr0,icc3 \n" /* set ICC3.Z */
+ " ckeq icc3,cc7 \n"
+ " ld.p %M0,%1 \n" /* LD.P/ORCR must be atomic */
+ " orcr cc7,cc7,cc3 \n" /* set CC3 to true */
+ " add%I2 %1,%2,%1 \n"
+ " cst.p %1,%M0 ,cc3,#1 \n"
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" /* clear ICC3.Z if store happens */
+ " beq icc3,#0,0b \n"
+ : "+U"(v->counter), "=&r"(val)
+ : "NPr"(i)
+ : "memory", "cc7", "cc3", "icc3"
+ );
+
+ return val;
+}
+
+static inline int atomic_sub_return(int i, atomic_t *v)
+{
+ unsigned long val;
+
+ asm("0: \n"
+ " orcc gr0,gr0,gr0,icc3 \n" /* set ICC3.Z */
+ " ckeq icc3,cc7 \n"
+ " ld.p %M0,%1 \n" /* LD.P/ORCR must be atomic */
+ " orcr cc7,cc7,cc3 \n" /* set CC3 to true */
+ " sub%I2 %1,%2,%1 \n"
+ " cst.p %1,%M0 ,cc3,#1 \n"
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" /* clear ICC3.Z if store happens */
+ " beq icc3,#0,0b \n"
+ : "+U"(v->counter), "=&r"(val)
+ : "NPr"(i)
+ : "memory", "cc7", "cc3", "icc3"
+ );
+
+ return val;
+}
+
+#else
+
+extern int atomic_add_return(int i, atomic_t *v);
+extern int atomic_sub_return(int i, atomic_t *v);
+
+#endif
+
+static inline int atomic_add_negative(int i, atomic_t *v)
+{
+ return atomic_add_return(i, v) < 0;
+}
+
+static inline void atomic_add(int i, atomic_t *v)
+{
+ atomic_add_return(i, v);
+}
+
+static inline void atomic_sub(int i, atomic_t *v)
+{
+ atomic_sub_return(i, v);
+}
+
+static inline void atomic_inc(atomic_t *v)
+{
+ atomic_add_return(1, v);
+}
+
+static inline void atomic_dec(atomic_t *v)
+{
+ atomic_sub_return(1, v);
+}
+
+#define atomic_dec_return(v) atomic_sub_return(1, (v))
+#define atomic_inc_return(v) atomic_add_return(1, (v))
+
+#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
+#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
+#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)
+
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+static inline
+unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v)
+{
+ unsigned long old, tmp;
+
+ asm volatile(
+ "0: \n"
+ " orcc gr0,gr0,gr0,icc3 \n" /* set ICC3.Z */
+ " ckeq icc3,cc7 \n"
+ " ld.p %M0,%1 \n" /* LD.P/ORCR are atomic */
+ " orcr cc7,cc7,cc3 \n" /* set CC3 to true */
+ " and%I3 %1,%3,%2 \n"
+ " cst.p %2,%M0 ,cc3,#1 \n" /* if store happens... */
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" /* ... clear ICC3.Z */
+ " beq icc3,#0,0b \n"
+ : "+U"(*v), "=&r"(old), "=r"(tmp)
+ : "NPr"(~mask)
+ : "memory", "cc7", "cc3", "icc3"
+ );
+
+ return old;
+}
+
+static inline
+unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v)
+{
+ unsigned long old, tmp;
+
+ asm volatile(
+ "0: \n"
+ " orcc gr0,gr0,gr0,icc3 \n" /* set ICC3.Z */
+ " ckeq icc3,cc7 \n"
+ " ld.p %M0,%1 \n" /* LD.P/ORCR are atomic */
+ " orcr cc7,cc7,cc3 \n" /* set CC3 to true */
+ " or%I3 %1,%3,%2 \n"
+ " cst.p %2,%M0 ,cc3,#1 \n" /* if store happens... */
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" /* ... clear ICC3.Z */
+ " beq icc3,#0,0b \n"
+ : "+U"(*v), "=&r"(old), "=r"(tmp)
+ : "NPr"(mask)
+ : "memory", "cc7", "cc3", "icc3"
+ );
+
+ return old;
+}
+
+static inline
+unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v)
+{
+ unsigned long old, tmp;
+
+ asm volatile(
+ "0: \n"
+ " orcc gr0,gr0,gr0,icc3 \n" /* set ICC3.Z */
+ " ckeq icc3,cc7 \n"
+ " ld.p %M0,%1 \n" /* LD.P/ORCR are atomic */
+ " orcr cc7,cc7,cc3 \n" /* set CC3 to true */
+ " xor%I3 %1,%3,%2 \n"
+ " cst.p %2,%M0 ,cc3,#1 \n" /* if store happens... */
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" /* ... clear ICC3.Z */
+ " beq icc3,#0,0b \n"
+ : "+U"(*v), "=&r"(old), "=r"(tmp)
+ : "NPr"(mask)
+ : "memory", "cc7", "cc3", "icc3"
+ );
+
+ return old;
+}
+
+#else
+
+extern unsigned long atomic_test_and_ANDNOT_mask(unsigned long mask, volatile unsigned long *v);
+extern unsigned long atomic_test_and_OR_mask(unsigned long mask, volatile unsigned long *v);
+extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsigned long *v);
+
+#endif
+
+#define atomic_clear_mask(mask, v) atomic_test_and_ANDNOT_mask((mask), (v))
+#define atomic_set_mask(mask, v) atomic_test_and_OR_mask((mask), (v))
+
+/*****************************************************************************/
+/*
+ * exchange value with memory
+ */
+#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
+
+#define xchg(ptr, x) \
+({ \
+ __typeof__(ptr) __xg_ptr = (ptr); \
+ __typeof__(*(ptr)) __xg_orig; \
+ \
+ switch (sizeof(__xg_orig)) { \
+ case 1: \
+ asm volatile( \
+ "0: \n" \
+ " orcc gr0,gr0,gr0,icc3 \n" \
+ " ckeq icc3,cc7 \n" \
+ " ldub.p %M0,%1 \n" \
+ " orcr cc7,cc7,cc3 \n" \
+ " cstb.p %2,%M0 ,cc3,#1 \n" \
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" \
+ " beq icc3,#0,0b \n" \
+ : "+U"(*__xg_ptr), "=&r"(__xg_orig) \
+ : "r"(x) \
+ : "memory", "cc7", "cc3", "icc3" \
+ ); \
+ break; \
+ \
+ case 2: \
+ asm volatile( \
+ "0: \n" \
+ " orcc gr0,gr0,gr0,icc3 \n" \
+ " ckeq icc3,cc7 \n" \
+ " lduh.p %M0,%1 \n" \
+ " orcr cc7,cc7,cc3 \n" \
+ " csth.p %2,%M0 ,cc3,#1 \n" \
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" \
+ " beq icc3,#0,0b \n" \
+ : "+U"(*__xg_ptr), "=&r"(__xg_orig) \
+ : "r"(x) \
+ : "memory", "cc7", "cc3", "icc3" \
+ ); \
+ break; \
+ \
+ case 4: \
+ asm volatile( \
+ "0: \n" \
+ " orcc gr0,gr0,gr0,icc3 \n" \
+ " ckeq icc3,cc7 \n" \
+ " ld.p %M0,%1 \n" \
+ " orcr cc7,cc7,cc3 \n" \
+ " cst.p %2,%M0 ,cc3,#1 \n" \
+ " corcc gr29,gr29,gr0 ,cc3,#1 \n" \
+ " beq icc3,#0,0b \n" \
+ : "+U"(*__xg_ptr), "=&r"(__xg_orig) \
+ : "r"(x) \
+ : "memory", "cc7", "cc3", "icc3" \
+