summaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /include/asm-arm
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-arc/dma.h16
-rw-r--r--include/asm-arm/arch-arc/hardware.h18
-rw-r--r--include/asm-arm/arch-arc/ide.h20
-rw-r--r--include/asm-arm/arch-arc/io.h12
-rw-r--r--include/asm-arm/arch-arc/irq.h14
-rw-r--r--include/asm-arm/arch-arc/irqs.h12
-rw-r--r--include/asm-arm/arch-arc/keyboard.h12
-rw-r--r--include/asm-arm/arch-arc/memory.h8
-rw-r--r--include/asm-arm/arch-arc/oldlatches.h12
-rw-r--r--include/asm-arm/arch-arc/processor.h14
-rw-r--r--include/asm-arm/arch-arc/serial.h14
-rw-r--r--include/asm-arm/arch-arc/system.h8
-rw-r--r--include/asm-arm/arch-arc/time.h16
-rw-r--r--include/asm-arm/arch-arc/timex.h10
-rw-r--r--include/asm-arm/arch-arc/uncompress.h8
-rw-r--r--include/asm-arm/arch-cl7500/hardware.h2
-rw-r--r--include/asm-arm/arch-cl7500/irq.h2
-rw-r--r--include/asm-arm/arch-cl7500/system.h2
-rw-r--r--include/asm-arm/arch-ebsa110/dma.h10
-rw-r--r--include/asm-arm/arch-ebsa110/hardware.h8
-rw-r--r--include/asm-arm/arch-ebsa110/io.h8
-rw-r--r--include/asm-arm/arch-ebsa110/irq.h10
-rw-r--r--include/asm-arm/arch-ebsa110/irqs.h8
-rw-r--r--include/asm-arm/arch-ebsa110/memory.h18
-rw-r--r--include/asm-arm/arch-ebsa110/processor.h12
-rw-r--r--include/asm-arm/arch-ebsa110/serial.h12
-rw-r--r--include/asm-arm/arch-ebsa110/system.h21
-rw-r--r--include/asm-arm/arch-ebsa110/time.h9
-rw-r--r--include/asm-arm/arch-ebsa110/timex.h10
-rw-r--r--include/asm-arm/arch-ebsa110/uncompress.h8
-rw-r--r--include/asm-arm/arch-ebsa110/vmalloc.h8
-rw-r--r--include/asm-arm/arch-ebsa285/dma.h8
-rw-r--r--include/asm-arm/arch-ebsa285/hardware.h25
-rw-r--r--include/asm-arm/arch-ebsa285/ide.h12
-rw-r--r--include/asm-arm/arch-ebsa285/io.h16
-rw-r--r--include/asm-arm/arch-ebsa285/irq.h22
-rw-r--r--include/asm-arm/arch-ebsa285/memory.h20
-rw-r--r--include/asm-arm/arch-ebsa285/processor.h12
-rw-r--r--include/asm-arm/arch-ebsa285/serial.h14
-rw-r--r--include/asm-arm/arch-ebsa285/system.h12
-rw-r--r--include/asm-arm/arch-ebsa285/time.h8
-rw-r--r--include/asm-arm/arch-ebsa285/timex.h10
-rw-r--r--include/asm-arm/arch-ebsa285/uncompress.h9
-rw-r--r--include/asm-arm/arch-ebsa285/vmalloc.h6
-rw-r--r--include/asm-arm/arch-nexuspci/dma.h7
-rw-r--r--include/asm-arm/arch-nexuspci/hardware.h10
-rw-r--r--include/asm-arm/arch-nexuspci/irq.h7
-rw-r--r--include/asm-arm/arch-nexuspci/irqs.h15
-rw-r--r--include/asm-arm/arch-nexuspci/system.h8
-rw-r--r--include/asm-arm/arch-nexuspci/time.h8
-rw-r--r--include/asm-arm/arch-nexuspci/uncompress.h12
-rw-r--r--include/asm-arm/arch-rpc/acornfb.h10
-rw-r--r--include/asm-arm/arch-rpc/dma.h8
-rw-r--r--include/asm-arm/arch-rpc/hardware.h10
-rw-r--r--include/asm-arm/arch-rpc/ide.h12
-rw-r--r--include/asm-arm/arch-rpc/io.h8
-rw-r--r--include/asm-arm/arch-rpc/irq.h21
-rw-r--r--include/asm-arm/arch-rpc/irqs.h8
-rw-r--r--include/asm-arm/arch-rpc/keyboard.h11
-rw-r--r--include/asm-arm/arch-rpc/memory.h22
-rw-r--r--include/asm-arm/arch-rpc/processor.h14
-rw-r--r--include/asm-arm/arch-rpc/serial.h12
-rw-r--r--include/asm-arm/arch-rpc/system.h12
-rw-r--r--include/asm-arm/arch-rpc/time.h16
-rw-r--r--include/asm-arm/arch-rpc/timex.h10
-rw-r--r--include/asm-arm/arch-rpc/uncompress.h8
-rw-r--r--include/asm-arm/arch-rpc/vmalloc.h8
-rw-r--r--include/asm-arm/arch-sa1100/SA-1100.h4
-rw-r--r--include/asm-arm/arch-sa1100/assabet.h6
-rw-r--r--include/asm-arm/arch-sa1100/bitsy.h1
-rw-r--r--include/asm-arm/arch-sa1100/cerf.h3
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h37
-rw-r--r--include/asm-arm/arch-sa1100/ide.h57
-rw-r--r--include/asm-arm/arch-sa1100/memory.h18
-rw-r--r--include/asm-arm/arch-sa1100/mmzone.h55
-rw-r--r--include/asm-arm/arch-sa1100/system.h9
-rw-r--r--include/asm-arm/arch-sa1100/thinclient.h4
-rw-r--r--include/asm-arm/arch-sa1100/vmalloc.h2
-rw-r--r--include/asm-arm/arch-shark/hardware.h18
-rw-r--r--include/asm-arm/arch-shark/io.h2
-rw-r--r--include/asm-arm/arch-shark/keyboard.h51
-rw-r--r--include/asm-arm/arch-shark/system.h13
-rw-r--r--include/asm-arm/arch-shark/time.h13
-rw-r--r--include/asm-arm/arch-shark/vmalloc.h17
-rw-r--r--include/asm-arm/arch-tbox/dma.h37
-rw-r--r--include/asm-arm/arch-tbox/hardware.h60
-rw-r--r--include/asm-arm/arch-tbox/ide.h3
-rw-r--r--include/asm-arm/arch-tbox/io.h55
-rw-r--r--include/asm-arm/arch-tbox/irq.h50
-rw-r--r--include/asm-arm/arch-tbox/irqs.h29
-rw-r--r--include/asm-arm/arch-tbox/keyboard.h29
-rw-r--r--include/asm-arm/arch-tbox/memory.h38
-rw-r--r--include/asm-arm/arch-tbox/param.h1
-rw-r--r--include/asm-arm/arch-tbox/processor.h24
-rw-r--r--include/asm-arm/arch-tbox/serial.h34
-rw-r--r--include/asm-arm/arch-tbox/system.h33
-rw-r--r--include/asm-arm/arch-tbox/time.h36
-rw-r--r--include/asm-arm/arch-tbox/timex.h8
-rw-r--r--include/asm-arm/arch-tbox/uncompress.h42
-rw-r--r--include/asm-arm/arch-tbox/vmalloc.h17
-rw-r--r--include/asm-arm/atomic.h18
-rw-r--r--include/asm-arm/bugs.h6
-rw-r--r--include/asm-arm/cache.h2
-rw-r--r--include/asm-arm/checksum.h2
-rw-r--r--include/asm-arm/cpu-multi26.h9
-rw-r--r--include/asm-arm/cpu-multi32.h185
-rw-r--r--include/asm-arm/cpu-single.h72
-rw-r--r--include/asm-arm/current.h18
-rw-r--r--include/asm-arm/dma.h8
-rw-r--r--include/asm-arm/fcntl.h9
-rw-r--r--include/asm-arm/floppy.h10
-rw-r--r--include/asm-arm/hardware.h10
-rw-r--r--include/asm-arm/hardware/dec21285.h (renamed from include/asm-arm/dec21285.h)10
-rw-r--r--include/asm-arm/hardware/ioc.h (renamed from include/asm-arm/ioc.h)12
-rw-r--r--include/asm-arm/hardware/iomd.h (renamed from include/asm-arm/iomd.h)12
-rw-r--r--include/asm-arm/hardware/memc.h (renamed from include/asm-arm/memc.h)9
-rw-r--r--include/asm-arm/hardware/pci_v3.h148
-rw-r--r--include/asm-arm/hardware/serial_amba.h91
-rw-r--r--include/asm-arm/io.h9
-rw-r--r--include/asm-arm/keyboard.h10
-rw-r--r--include/asm-arm/leds.h11
-rw-r--r--include/asm-arm/linux_logo.h10
-rw-r--r--include/asm-arm/mach/arch.h88
-rw-r--r--include/asm-arm/mach/dma.h55
-rw-r--r--include/asm-arm/mach/map.h32
-rw-r--r--include/asm-arm/mach/pci.h42
-rw-r--r--include/asm-arm/memory.h12
-rw-r--r--include/asm-arm/mmu_context.h22
-rw-r--r--include/asm-arm/mmzone.h9
-rw-r--r--include/asm-arm/param.h8
-rw-r--r--include/asm-arm/parport.h4
-rw-r--r--include/asm-arm/pci.h15
-rw-r--r--include/asm-arm/pgalloc.h21
-rw-r--r--include/asm-arm/pgtable.h14
-rw-r--r--include/asm-arm/posix_types.h12
-rw-r--r--include/asm-arm/proc-armo/assembler.h34
-rw-r--r--include/asm-arm/proc-armo/cache.h22
-rw-r--r--include/asm-arm/proc-armo/io.h8
-rw-r--r--include/asm-arm/proc-armo/locks.h99
-rw-r--r--include/asm-arm/proc-armo/page.h8
-rw-r--r--include/asm-arm/proc-armo/pgtable.h10
-rw-r--r--include/asm-arm/proc-armo/processor.h24
-rw-r--r--include/asm-arm/proc-armo/ptrace.h10
-rw-r--r--include/asm-arm/proc-armo/shmparam.h11
-rw-r--r--include/asm-arm/proc-armo/system.h9
-rw-r--r--include/asm-arm/proc-armo/uaccess.h8
-rw-r--r--include/asm-arm/proc-armo/uncompress.h8
-rw-r--r--include/asm-arm/proc-armv/assembler.h33
-rw-r--r--include/asm-arm/proc-armv/cache.h162
-rw-r--r--include/asm-arm/proc-armv/domain.h8
-rw-r--r--include/asm-arm/proc-armv/io.h35
-rw-r--r--include/asm-arm/proc-armv/locks.h10
-rw-r--r--include/asm-arm/proc-armv/page.h8
-rw-r--r--include/asm-arm/proc-armv/pgtable.h12
-rw-r--r--include/asm-arm/proc-armv/processor.h22
-rw-r--r--include/asm-arm/proc-armv/ptrace.h12
-rw-r--r--include/asm-arm/proc-armv/shmparam.h13
-rw-r--r--include/asm-arm/proc-armv/system.h9
-rw-r--r--include/asm-arm/proc-armv/uaccess.h7
-rw-r--r--include/asm-arm/proc-armv/uncompress.h8
-rw-r--r--include/asm-arm/proc-fns.h29
-rw-r--r--include/asm-arm/processor.h8
-rw-r--r--include/asm-arm/procinfo.h8
-rw-r--r--include/asm-arm/ptrace.h10
-rw-r--r--include/asm-arm/resource.h4
-rw-r--r--include/asm-arm/scatterlist.h20
-rw-r--r--include/asm-arm/serial.h12
-rw-r--r--include/asm-arm/setup.h14
-rw-r--r--include/asm-arm/shmparam.h5
-rw-r--r--include/asm-arm/timex.h10
-rw-r--r--include/asm-arm/uaccess.h13
171 files changed, 2423 insertions, 884 deletions
diff --git a/include/asm-arm/arch-arc/dma.h b/include/asm-arm/arch-arc/dma.h
index 77d1dfddf..0e72b5336 100644
--- a/include/asm-arm/arch-arc/dma.h
+++ b/include/asm-arm/arch-arc/dma.h
@@ -1,13 +1,17 @@
/*
- * linux/include/asm-arm/arch-arc/dma.h
+ * linux/include/asm-arm/arch-arc/dma.h
*
- * Copyright (C) 1996-1998 Russell King
+ * Copyright (C) 1996-1998 Russell King
*
- * Acorn Archimedes/A5000 architecture virtual DMA
- * implementation
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
- * Modifications:
- * 04-04-1998 RMK Merged arc and a5k versions
+ * Acorn Archimedes/A5000 architecture virtual DMA
+ * implementation
+ *
+ * Modifications:
+ * 04-04-1998 RMK Merged arc and a5k versions
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
diff --git a/include/asm-arm/arch-arc/hardware.h b/include/asm-arm/arch-arc/hardware.h
index 789f4cf6f..a3d942abe 100644
--- a/include/asm-arm/arch-arc/hardware.h
+++ b/include/asm-arm/arch-arc/hardware.h
@@ -1,13 +1,17 @@
/*
- * linux/include/asm-arm/arch-arc/hardware.h
+ * linux/include/asm-arm/arch-arc/hardware.h
*
- * Copyright (C) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
*
- * This file contains the hardware definitions of the
- * Acorn Archimedes/A5000 machines.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
- * Modifications:
- * 04-04-1998 PJB/RMK Merged arc and a5k versions
+ * This file contains the hardware definitions of the
+ * Acorn Archimedes/A5000 machines.
+ *
+ * Modifications:
+ * 04-04-1998 PJB/RMK Merged arc and a5k versions
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
@@ -22,7 +26,7 @@
*/
#define HAS_IOC
#define HAS_MEMC
-#include <asm/memc.h>
+#include <asm/hardware/memc.h>
#define HAS_VIDC
/* Hardware addresses of major areas.
diff --git a/include/asm-arm/arch-arc/ide.h b/include/asm-arm/arch-arc/ide.h
index 3a7c9a968..593de5849 100644
--- a/include/asm-arm/arch-arc/ide.h
+++ b/include/asm-arm/arch-arc/ide.h
@@ -1,15 +1,19 @@
/*
- * linux/include/asm-arm/arch-arc/ide.h
+ * linux/include/asm-arm/arch-arc/ide.h
*
- * Copyright (c) 1997,1998 Russell King
+ * Copyright (C) 1997,1998 Russell King
*
- * IDE definitions for the Acorn Archimedes/A5000
- * architecture
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
- * Modifications:
- * 04-04-1998 PJB Merged `arc' and `a5k' versions
- * 01-07-1998 RMK Added new ide_ioregspec_t
- * 29-07-1998 RMK Major re-work of IDE architecture specific code
+ * IDE definitions for the Acorn Archimedes/A5000
+ * architecture
+ *
+ * Modifications:
+ * 04-04-1998 PJB Merged `arc' and `a5k' versions
+ * 01-07-1998 RMK Added new ide_ioregspec_t
+ * 29-07-1998 RMK Major re-work of IDE architecture specific code
*/
#include <asm/irq.h>
#include <asm/mach-types.h>
diff --git a/include/asm-arm/arch-arc/io.h b/include/asm-arm/arch-arc/io.h
index e42c80b02..22a30f583 100644
--- a/include/asm-arm/arch-arc/io.h
+++ b/include/asm-arm/arch-arc/io.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-arc/io.h
+ * linux/include/asm-arm/arch-arc/io.h
*
- * Copyright (C) 1997 Russell King
+ * Copyright (C) 1997 Russell King
*
- * Modifications:
- * 06-Dec-1997 RMK Created.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ * 06-Dec-1997 RMK Created.
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
diff --git a/include/asm-arm/arch-arc/irq.h b/include/asm-arm/arch-arc/irq.h
index 61997a1b2..5e4d417e2 100644
--- a/include/asm-arm/arch-arc/irq.h
+++ b/include/asm-arm/arch-arc/irq.h
@@ -1,9 +1,13 @@
/*
- * include/asm-arm/arch-arc/irq.h
+ * linux/include/asm-arm/arch-arc/irq.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * Changelog:
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
* 24-09-1996 RMK Created
* 10-10-1996 RMK Brought up to date with arch-sa110eval
* 22-10-1996 RMK Changed interrupt numbers & uses new inb/outb macros
@@ -11,7 +15,7 @@
* 22-08-1998 RMK Restructured IRQ routines
*/
#include <linux/config.h>
-#include <asm/ioc.h>
+#include <asm/hardware/ioc.h>
#ifdef CONFIG_ARCH_ARC
#define a_clf() clf()
@@ -168,5 +172,7 @@ static __inline__ void irq_init_irq(void)
}
}
+ irq_desc[IRQ_KEYBOARDTX].noautoenable = 1;
+
init_FIQ();
}
diff --git a/include/asm-arm/arch-arc/irqs.h b/include/asm-arm/arch-arc/irqs.h
index e4abc83f7..2cb34d39f 100644
--- a/include/asm-arm/arch-arc/irqs.h
+++ b/include/asm-arm/arch-arc/irqs.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-arc/irqs.h
+ * linux/include/asm-arm/arch-arc/irqs.h
*
- * Copyright (C) 1996 Russell King, Dave Gilbert
+ * Copyright (C) 1996 Russell King, Dave Gilbert
*
- * Modifications:
- * 04-04-1998 PJB Merged arc and a5k versions
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ * 04-04-1998 PJB Merged arc and a5k versions
*/
#include <linux/config.h>
diff --git a/include/asm-arm/arch-arc/keyboard.h b/include/asm-arm/arch-arc/keyboard.h
index 1f57b9757..250c2f549 100644
--- a/include/asm-arm/arch-arc/keyboard.h
+++ b/include/asm-arm/arch-arc/keyboard.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-arc/keyboard.h
+ * linux/include/asm-arm/arch-arc/keyboard.h
*
- * Keyboard driver definitions for Acorn Archimedes/A5000
- * architecture
+ * Copyright (C) 1998 Russell King
*
- * Copyright (C) 1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Keyboard driver definitions for Acorn Archimedes/A5000
+ * architecture
*/
#include <asm/irq.h>
diff --git a/include/asm-arm/arch-arc/memory.h b/include/asm-arm/arch-arc/memory.h
index 903e48d72..fb4d819f4 100644
--- a/include/asm-arm/arch-arc/memory.h
+++ b/include/asm-arm/arch-arc/memory.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-arc/memory.h
+ * linux/include/asm-arm/arch-arc/memory.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
* Changelog:
* 22-Nov-1996 RMK Created
diff --git a/include/asm-arm/arch-arc/oldlatches.h b/include/asm-arm/arch-arc/oldlatches.h
index 847d3a0ba..bc87089b2 100644
--- a/include/asm-arm/arch-arc/oldlatches.h
+++ b/include/asm-arm/arch-arc/oldlatches.h
@@ -1,12 +1,14 @@
/*
- * linux/include/asm-arm/arch-arc/oldlatches.h
+ * linux/include/asm-arm/arch-arc/oldlatches.h
*
- * Copyright (C) 1996 Russell King, Dave Gilbert
+ * Copyright (C) 1996 Russell King, Dave Gilbert
*
- * Dummy oldlatches.h
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
- * Modifications:
- * 04-04-1998 PJB/RMK Merged arc and a5k versions
+ * Modifications:
+ * 04-04-1998 PJB/RMK Merged arc and a5k versions
*/
#ifndef _ASM_ARCH_OLDLATCH_H
#define _ASM_ARCH_OLDLATCH_H
diff --git a/include/asm-arm/arch-arc/processor.h b/include/asm-arm/arch-arc/processor.h
index 564565c46..7eea170e3 100644
--- a/include/asm-arm/arch-arc/processor.h
+++ b/include/asm-arm/arch-arc/processor.h
@@ -1,11 +1,15 @@
/*
- * linux/include/asm-arm/arch-arc/processor.h
+ * linux/include/asm-arm/arch-arc/processor.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (c) 1996-1999 Russell King.
*
- * Changelog:
- * 10-Sep-1996 RMK Created
- * 21-Mar-1999 RMK Added asm/arch/memory.h
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 10-Sep-1996 RMK Created
+ * 21-Mar-1999 RMK Added asm/arch/memory.h
*/
#ifndef __ASM_ARCH_PROCESSOR_H
diff --git a/include/asm-arm/arch-arc/serial.h b/include/asm-arm/arch-arc/serial.h
index 16d5bd73b..46f6f3828 100644
--- a/include/asm-arm/arch-arc/serial.h
+++ b/include/asm-arm/arch-arc/serial.h
@@ -1,11 +1,15 @@
/*
- * linux/include/asm-arm/arch-arc/serial.h
+ * linux/include/asm-arm/arch-arc/serial.h
*
- * Copyright (c) 1996 Russell King.
+ * Copyright (C) 1996 Russell King.
*
- * Changelog:
- * 15-10-1996 RMK Created
- * 04-04-1998 PJB Merged `arc' and `a5k' architectures
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 15-10-1996 RMK Created
+ * 04-04-1998 PJB Merged `arc' and `a5k' architectures
*/
#ifndef __ASM_ARCH_SERIAL_H
#define __ASM_ARCH_SERIAL_H
diff --git a/include/asm-arm/arch-arc/system.h b/include/asm-arm/arch-arc/system.h
index 0caf739d6..162889621 100644
--- a/include/asm-arm/arch-arc/system.h
+++ b/include/asm-arm/arch-arc/system.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-arc/system.h
+ * linux/include/asm-arm/arch-arc/system.h
*
- * Copyright (c) 1996-1999 Russell King and Dave Gilbert
+ * Copyright (C) 1996-1999 Russell King and Dave Gilbert
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static void arch_idle(void)
diff --git a/include/asm-arm/arch-arc/time.h b/include/asm-arm/arch-arc/time.h
index 95c8ae14f..52add5ae3 100644
--- a/include/asm-arm/arch-arc/time.h
+++ b/include/asm-arm/arch-arc/time.h
@@ -1,12 +1,16 @@
/*
- * linux/include/asm-arm/arch-arc/time.h
+ * linux/include/asm-arm/arch-arc/time.h
*
- * Copyright (c) 1996-2000 Russell King.
+ * Copyright (C) 1996-2000 Russell King.
*
- * Changelog:
- * 24-Sep-1996 RMK Created
- * 10-Oct-1996 RMK Brought up to date with arch-sa110eval
- * 04-Dec-1997 RMK Updated for new arch/arm/time.c
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 24-Sep-1996 RMK Created
+ * 10-Oct-1996 RMK Brought up to date with arch-sa110eval
+ * 04-Dec-1997 RMK Updated for new arch/arm/time.c
*/
extern void ioctime_init(void);
diff --git a/include/asm-arm/arch-arc/timex.h b/include/asm-arm/arch-arc/timex.h
index 569e01bb2..58a76ffef 100644
--- a/include/asm-arm/arch-arc/timex.h
+++ b/include/asm-arm/arch-arc/timex.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-arc/timex.h
+ * linux/include/asm-arm/arch-arc/timex.h
*
- * Acorn Archimedes/A5000 architecture timex specifications
+ * Copyright (C) 1997, 1998 Russell King
*
- * Copyright (C) 1997, 1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Acorn Archimedes/A5000 architecture timex specifications
*/
/*
diff --git a/include/asm-arm/arch-arc/uncompress.h b/include/asm-arm/arch-arc/uncompress.h
index d9b46f1af..df2cba816 100644
--- a/include/asm-arm/arch-arc/uncompress.h
+++ b/include/asm-arm/arch-arc/uncompress.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-arc/uncompress.h
+ * linux/include/asm-arm/arch-arc/uncompress.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#define VIDMEM ((char *)0x02000000)
diff --git a/include/asm-arm/arch-cl7500/hardware.h b/include/asm-arm/arch-cl7500/hardware.h
index 938389b20..b0a61c939 100644
--- a/include/asm-arm/arch-cl7500/hardware.h
+++ b/include/asm-arm/arch-cl7500/hardware.h
@@ -11,7 +11,7 @@
#define __ASM_ARCH_HARDWARE_H
#include <asm/arch/memory.h>
-#include <asm/iomd.h>
+#include <asm/hardware/iomd.h>
/*
* What hardware must be present
diff --git a/include/asm-arm/arch-cl7500/irq.h b/include/asm-arm/arch-cl7500/irq.h
index 3621c08f7..89cac299a 100644
--- a/include/asm-arm/arch-cl7500/irq.h
+++ b/include/asm-arm/arch-cl7500/irq.h
@@ -9,7 +9,7 @@
* 22-08-1998 RMK Restructured IRQ routines
* 11-08-1999 PJB Created ARM7500 version, derived from RiscPC code
*/
-#include <asm/iomd.h>
+#include <asm/hardware/iomd.h>
static inline int fixup_irq(unsigned int irq)
{
diff --git a/include/asm-arm/arch-cl7500/system.h b/include/asm-arm/arch-cl7500/system.h
index 1962f75e0..f84adffc5 100644
--- a/include/asm-arm/arch-cl7500/system.h
+++ b/include/asm-arm/arch-cl7500/system.h
@@ -6,7 +6,7 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
-#include <asm/iomd.h>
+#include <asm/hardware/iomd.h>
static void arch_idle(void)
{
diff --git a/include/asm-arm/arch-ebsa110/dma.h b/include/asm-arm/arch-ebsa110/dma.h
index ae841827a..d491776ac 100644
--- a/include/asm-arm/arch-ebsa110/dma.h
+++ b/include/asm-arm/arch-ebsa110/dma.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-ebsa110/dma.h
+ * linux/include/asm-arm/arch-ebsa110/dma.h
*
- * Architecture DMA routes
+ * Copyright (C) 1997,1998 Russell King
*
- * Copyright (C) 1997,1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * EBSA110 DMA definitions
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
diff --git a/include/asm-arm/arch-ebsa110/hardware.h b/include/asm-arm/arch-ebsa110/hardware.h
index 18ee0f968..3dcd8c6f4 100644
--- a/include/asm-arm/arch-ebsa110/hardware.h
+++ b/include/asm-arm/arch-ebsa110/hardware.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-ebsa110/hardware.h
+ * linux/include/asm-arm/arch-ebsa110/hardware.h
*
- * Copyright (C) 1996-2000 Russell King.
+ * Copyright (C) 1996-2000 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
* This file contains the hardware definitions of the EBSA-110.
*/
diff --git a/include/asm-arm/arch-ebsa110/io.h b/include/asm-arm/arch-ebsa110/io.h
index bca7df287..73172dcd7 100644
--- a/include/asm-arm/arch-ebsa110/io.h
+++ b/include/asm-arm/arch-ebsa110/io.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-ebsa110/io.h
+ * linux/include/asm-arm/arch-ebsa110/io.h
*
- * Copyright (C) 1997,1998 Russell King
+ * Copyright (C) 1997,1998 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
* Modifications:
* 06-Dec-1997 RMK Created.
diff --git a/include/asm-arm/arch-ebsa110/irq.h b/include/asm-arm/arch-ebsa110/irq.h
index d26e93c76..a24754e0b 100644
--- a/include/asm-arm/arch-ebsa110/irq.h
+++ b/include/asm-arm/arch-ebsa110/irq.h
@@ -1,9 +1,13 @@
/*
- * include/asm-arm/arch-ebsa110/irq.h
+ * linux/include/asm-arm/arch-ebsa110/irq.h
*
- * Copyright (C) 1996-1998 Russell King
+ * Copyright (C) 1996-1998 Russell King
*
- * Changelog:
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
* 22-08-1998 RMK Restructured IRQ routines
*/
diff --git a/include/asm-arm/arch-ebsa110/irqs.h b/include/asm-arm/arch-ebsa110/irqs.h
index 0add03e59..ded9bd9d7 100644
--- a/include/asm-arm/arch-ebsa110/irqs.h
+++ b/include/asm-arm/arch-ebsa110/irqs.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-ebsa110/irqs.h
+ * linux/include/asm-arm/arch-ebsa110/irqs.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#define NR_IRQS 8
diff --git a/include/asm-arm/arch-ebsa110/memory.h b/include/asm-arm/arch-ebsa110/memory.h
index 36f899faa..96d7e3354 100644
--- a/include/asm-arm/arch-ebsa110/memory.h
+++ b/include/asm-arm/arch-ebsa110/memory.h
@@ -1,13 +1,17 @@
/*
- * linux/include/asm-arm/arch-ebsa110/memory.h
+ * linux/include/asm-arm/arch-ebsa110/memory.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
*
- * Changelog:
- * 20-Oct-1996 RMK Created
- * 31-Dec-1997 RMK Fixed definitions to reduce warnings
- * 21-Mar-1999 RMK Renamed to memory.h
- * RMK Moved TASK_SIZE and PAGE_OFFSET here
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 20-Oct-1996 RMK Created
+ * 31-Dec-1997 RMK Fixed definitions to reduce warnings
+ * 21-Mar-1999 RMK Renamed to memory.h
+ * RMK Moved TASK_SIZE and PAGE_OFFSET here
*/
#ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H
diff --git a/include/asm-arm/arch-ebsa110/processor.h b/include/asm-arm/arch-ebsa110/processor.h
index d94e9b808..1c0561018 100644
--- a/include/asm-arm/arch-ebsa110/processor.h
+++ b/include/asm-arm/arch-ebsa110/processor.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-ebsa110/processor.h
+ * linux/include/asm-arm/arch-ebsa110/processor.h
*
- * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1996-1999 Russell King
*
- * Changelog:
- * 21-Mar-1999 RMK Added asm/arch/memory.h
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 21-Mar-1999 RMK Added asm/arch/memory.h
*/
#ifndef __ASM_ARCH_PROCESSOR_H
diff --git a/include/asm-arm/arch-ebsa110/serial.h b/include/asm-arm/arch-ebsa110/serial.h
index d2133c6d1..a861317e5 100644
--- a/include/asm-arm/arch-ebsa110/serial.h
+++ b/include/asm-arm/arch-ebsa110/serial.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-ebsa110/serial.h
+ * linux/include/asm-arm/arch-ebsa110/serial.h
*
- * Copyright (c) 1996,1997,1998 Russell King.
+ * Copyright (C) 1996,1997,1998 Russell King.
*
- * Changelog:
- * 15-10-1996 RMK Created
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 15-10-1996 RMK Created
*/
#ifndef __ASM_ARCH_SERIAL_H
#define __ASM_ARCH_SERIAL_H
diff --git a/include/asm-arm/arch-ebsa110/system.h b/include/asm-arm/arch-ebsa110/system.h
index 76bd8c2e3..c4af29bef 100644
--- a/include/asm-arm/arch-ebsa110/system.h
+++ b/include/asm-arm/arch-ebsa110/system.h
@@ -1,14 +1,25 @@
/*
- * linux/include/asm-arm/arch-ebsa110/system.h
+ * linux/include/asm-arm/arch-ebsa110/system.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-2000 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
/*
- * This machine must never stop it MCLK. However, if we are
- * idle for a long time, slow the processor clock to MCLK.
+ * EBSA110 idling methodology:
+ *
+ * We can not execute the "wait for interrupt" instruction since that
+ * will stop our MCLK signal (which provides the clock for the glue
+ * logic, and therefore the timer interrupt).
+ *
+ * Instead, we spin, waiting for either hlt_counter or need_resched
+ * to be set. If we have been spinning for 2cs, then we drop the
+ * core clock down to the memory clock.
*/
static void arch_idle(void)
{
@@ -19,7 +30,7 @@ static void arch_idle(void)
do {
if (current->need_resched || hlt_counter)
goto slow_out;
- } while (time_before(start_idle, jiffies + HZ/3));
+ } while (time_before(jiffies, start_idle + HZ/50));
cpu_do_idle(IDLE_CLOCK_SLOW);
diff --git a/include/asm-arm/arch-ebsa110/time.h b/include/asm-arm/arch-ebsa110/time.h
index dbddeb1b9..fb3d9cbbe 100644
--- a/include/asm-arm/arch-ebsa110/time.h
+++ b/include/asm-arm/arch-ebsa110/time.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-ebsa110/time.h
+ * linux/include/asm-arm/arch-ebsa110/time.h
*
- * Copyright (c) 1996,1997,1998 Russell King.
+ * Copyright (C) 1996,1997,1998 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
* No real time clock on the evalulation board!
*
@@ -46,6 +50,7 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#endif
do_leds();
do_timer(regs);
+ do_profile(regs);
}
/*
diff --git a/include/asm-arm/arch-ebsa110/timex.h b/include/asm-arm/arch-ebsa110/timex.h
index 06acb9dfc..6cdd6b5de 100644
--- a/include/asm-arm/arch-ebsa110/timex.h
+++ b/include/asm-arm/arch-ebsa110/timex.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-ebsa110/timex.h
+ * linux/include/asm-arm/arch-ebsa110/timex.h
*
- * EBSA110 architecture timex specifications
+ * Copyright (C) 1997, 1998 Russell King
*
- * Copyright (C) 1997, 1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * EBSA110 architecture timex specifications
*/
/*
diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h
index d6097d43f..47633b626 100644
--- a/include/asm-arm/arch-ebsa110/uncompress.h
+++ b/include/asm-arm/arch-ebsa110/uncompress.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-ebsa110/uncompress.h
+ * linux/include/asm-arm/arch-ebsa110/uncompress.h
*
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1996,1997,1998 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
/*
diff --git a/include/asm-arm/arch-ebsa110/vmalloc.h b/include/asm-arm/arch-ebsa110/vmalloc.h
index d9d09f03c..78c71c2db 100644
--- a/include/asm-arm/arch-ebsa110/vmalloc.h
+++ b/include/asm-arm/arch-ebsa110/vmalloc.h
@@ -1,5 +1,11 @@
/*
- * linux/include/asm-arm/arch-ebsa110/vmalloc.h
+ * linux/include/asm-arm/arch-ebsa110/vmalloc.h
+ *
+ * Copyright (C) 1998 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
/*
diff --git a/include/asm-arm/arch-ebsa285/dma.h b/include/asm-arm/arch-ebsa285/dma.h
index 8b74a7f84..c43046eb8 100644
--- a/include/asm-arm/arch-ebsa285/dma.h
+++ b/include/asm-arm/arch-ebsa285/dma.h
@@ -1,10 +1,10 @@
/*
- * linux/include/asm-arm/arch-ebsa285/dma.h
+ * linux/include/asm-arm/arch-ebsa285/dma.h
*
- * Architecture DMA routines
+ * Architecture DMA routines
*
- * Copyright (C) 1998,1999 Russell King
- * Copyright (C) 1998,1999 Philip Blundell
+ * Copyright (C) 1998,1999 Russell King
+ * Copyright (C) 1998,1999 Philip Blundell
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
diff --git a/include/asm-arm/arch-ebsa285/hardware.h b/include/asm-arm/arch-ebsa285/hardware.h
index ae5817d9e..44747379c 100644
--- a/include/asm-arm/arch-ebsa285/hardware.h
+++ b/include/asm-arm/arch-ebsa285/hardware.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-ebsa285/hardware.h
+ * linux/include/asm-arm/arch-ebsa285/hardware.h
*
- * Copyright (C) 1998-1999 Russell King.
+ * Copyright (C) 1998-1999 Russell King.
*
- * This file contains the hardware definitions of the EBSA-285.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This file contains the hardware definitions of the EBSA-285.
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
@@ -15,20 +19,13 @@
/* Virtual Physical Size
* 0xff800000 0x40000000 1MB X-Bus
* 0xff000000 0x7c000000 1MB PCI I/O space
- *
* 0xfe000000 0x42000000 1MB CSR
* 0xfd000000 0x78000000 1MB Outbound write flush (not supported)
* 0xfc000000 0x79000000 1MB PCI IACK/special space
- *
* 0xfb000000 0x7a000000 16MB PCI Config type 1
* 0xfa000000 0x7b000000 16MB PCI Config type 0
- *
* 0xf9000000 0x50000000 1MB Cache flush
- * 0xf8000000 0x41000000 16MB Flash memory
- *
- * 0xe1000000 unmapped (to catch bad ISA/PCI)
- *
- * 0xe0000000 0x80000000 16MB ISA memory
+ * 0xf0000000 0x80000000 16MB ISA memory
*/
#define XBUS_SIZE 0x00100000
#define XBUS_BASE 0xff800000
@@ -54,9 +51,6 @@
#define FLUSH_SIZE 0x00100000
#define FLUSH_BASE 0xf9000000
-#define FLASH_SIZE 0x01000000
-#define FLASH_BASE 0xf8000000
-
#define PCIMEM_SIZE 0x01000000
#define PCIMEM_BASE 0xf0000000
@@ -67,9 +61,6 @@
#define PCIMEM_SIZE 0x80000000
#define PCIMEM_BASE 0x80000000
-#define FLASH_SIZE 0x01000000
-#define FLASH_BASE 0x7f000000
-
#define FLUSH_SIZE 0x00100000
#define FLUSH_BASE 0x7e000000
diff --git a/include/asm-arm/arch-ebsa285/ide.h b/include/asm-arm/arch-ebsa285/ide.h
index dbdeb1fab..ddc2bcbde 100644
--- a/include/asm-arm/arch-ebsa285/ide.h
+++ b/include/asm-arm/arch-ebsa285/ide.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-ebsa285/ide.h
+ * linux/include/asm-arm/arch-ebsa285/ide.h
*
- * Copyright (c) 1998 Russell King
+ * Copyright (C) 1998 Russell King
*
- * Modifications:
- * 29-07-1998 RMK Major re-work of IDE architecture specific code
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ * 29-07-1998 RMK Major re-work of IDE architecture specific code
*/
#include <asm/irq.h>
diff --git a/include/asm-arm/arch-ebsa285/io.h b/include/asm-arm/arch-ebsa285/io.h
index 8f24298b2..e06ed893a 100644
--- a/include/asm-arm/arch-ebsa285/io.h
+++ b/include/asm-arm/arch-ebsa285/io.h
@@ -1,11 +1,15 @@
/*
- * linux/include/asm-arm/arch-ebsa285/io.h
+ * linux/include/asm-arm/arch-ebsa285/io.h
*
- * Copyright (C) 1997-1999 Russell King
+ * Copyright (C) 1997-1999 Russell King
*
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ * 06-12-1997 RMK Created.
+ * 07-04-1999 RMK Major cleanup
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
@@ -74,7 +78,7 @@ extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
#define outw(v,p) __arch_putw(v,__io_pci(p))
#define outl(v,p) __arch_putl(v,__io_pci(p))
-#include <asm/dec21285.h>
+#include <asm/hardware/dec21285.h>
/*
* ioremap support - validate a PCI memory address,
diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h
index 791c00fae..34b8287f8 100644
--- a/include/asm-arm/arch-ebsa285/irq.h
+++ b/include/asm-arm/arch-ebsa285/irq.h
@@ -1,17 +1,21 @@
/*
- * include/asm-arm/arch-ebsa285/irq.h
+ * linux/include/asm-arm/arch-ebsa285/irq.h
*
- * Copyright (C) 1996-1998 Russell King
+ * Copyright (C) 1996-1998 Russell King
*
- * Changelog:
- * 22-Aug-1998 RMK Restructured IRQ routines
- * 03-Sep-1998 PJB Merged CATS support
- * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder
- * 26-Jan-1999 PJB Don't use IACK on CATS
- * 16-Mar-1999 RMK Added autodetect of ISA PICs
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 22-Aug-1998 RMK Restructured IRQ routines
+ * 03-Sep-1998 PJB Merged CATS support
+ * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder
+ * 26-Jan-1999 PJB Don't use IACK on CATS
+ * 16-Mar-1999 RMK Added autodetect of ISA PICs
*/
#include <asm/hardware.h>
-#include <asm/dec21285.h>
+#include <asm/hardware/dec21285.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h
index d9859cb76..98172671f 100644
--- a/include/asm-arm/arch-ebsa285/memory.h
+++ b/include/asm-arm/arch-ebsa285/memory.h
@@ -1,14 +1,18 @@
/*
- * linux/include/asm-arm/arch-ebsa285/memory.h
+ * linux/include/asm-arm/arch-ebsa285/memory.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
*
- * Changelog:
- * 20-Oct-1996 RMK Created
- * 31-Dec-1997 RMK Fixed definitions to reduce warnings.
- * 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.
- * 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.
- * 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 20-Oct-1996 RMK Created
+ * 31-Dec-1997 RMK Fixed definitions to reduce warnings.
+ * 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.
+ * 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.
+ * 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.
* Renamed to memory.h
* Moved PAGE_OFFSET and TASK_SIZE here
*/
diff --git a/include/asm-arm/arch-ebsa285/processor.h b/include/asm-arm/arch-ebsa285/processor.h
index d94e9b808..1c0561018 100644
--- a/include/asm-arm/arch-ebsa285/processor.h
+++ b/include/asm-arm/arch-ebsa285/processor.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-ebsa110/processor.h
+ * linux/include/asm-arm/arch-ebsa110/processor.h
*
- * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1996-1999 Russell King
*
- * Changelog:
- * 21-Mar-1999 RMK Added asm/arch/memory.h
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 21-Mar-1999 RMK Added asm/arch/memory.h
*/
#ifndef __ASM_ARCH_PROCESSOR_H
diff --git a/include/asm-arm/arch-ebsa285/serial.h b/include/asm-arm/arch-ebsa285/serial.h
index 0efc4c849..3bba8f9cc 100644
--- a/include/asm-arm/arch-ebsa285/serial.h
+++ b/include/asm-arm/arch-ebsa285/serial.h
@@ -1,11 +1,15 @@
/*
- * linux/include/asm-arm/arch-ebsa285/serial.h
+ * linux/include/asm-arm/arch-ebsa285/serial.h
*
- * Copyright (c) 1996,1997,1998 Russell King.
+ * Copyright (C) 1996,1997,1998 Russell King.
*
- * Changelog:
- * 15-10-1996 RMK Created
- * 25-05-1998 PJB CATS support
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 15-10-1996 RMK Created
+ * 25-05-1998 PJB CATS support
*/
#ifndef __ASM_ARCH_SERIAL_H
#define __ASM_ARCH_SERIAL_H
diff --git a/include/asm-arm/arch-ebsa285/system.h b/include/asm-arm/arch-ebsa285/system.h
index dbbaf9444..a0644771c 100644
--- a/include/asm-arm/arch-ebsa285/system.h
+++ b/include/asm-arm/arch-ebsa285/system.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-ebsa285/system.h
+ * linux/include/asm-arm/arch-ebsa285/system.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-#include <asm/dec21285.h>
+#include <asm/hardware/dec21285.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/leds.h>
@@ -19,7 +23,7 @@ static void arch_idle(void)
if (current->need_resched || hlt_counter)
goto slow_out;
cpu_do_idle(IDLE_WAIT_FAST);
- } while (time_before(start_idle, jiffies + HZ/3));
+ } while (time_before(jiffies, start_idle + HZ/50));
cpu_do_idle(IDLE_CLOCK_SLOW);
diff --git a/include/asm-arm/arch-ebsa285/time.h b/include/asm-arm/arch-ebsa285/time.h
index 2ae77bcb1..d42f472c1 100644
--- a/include/asm-arm/arch-ebsa285/time.h
+++ b/include/asm-arm/arch-ebsa285/time.h
@@ -1,8 +1,8 @@
/*
- * linux/include/asm-arm/arch-ebsa285/time.h
+ * linux/include/asm-arm/arch-ebsa285/time.h
*
- * Copyright (c) 1998 Russell King.
- * Copyright (c) 1998 Phil Blundell
+ * Copyright (C) 1998 Russell King.
+ * Copyright (C) 1998 Phil Blundell
*
* CATS has a real-time clock, though the evaluation board doesn't.
*
@@ -19,7 +19,7 @@
#include <linux/mc146818rtc.h>
-#include <asm/dec21285.h>
+#include <asm/hardware/dec21285.h>
#include <asm/leds.h>
#include <asm/mach-types.h>
diff --git a/include/asm-arm/arch-ebsa285/timex.h b/include/asm-arm/arch-ebsa285/timex.h
index f269d439b..39a73cdf9 100644
--- a/include/asm-arm/arch-ebsa285/timex.h
+++ b/include/asm-arm/arch-ebsa285/timex.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-ebsa285/timex.h
+ * linux/include/asm-arm/arch-ebsa285/timex.h
*
- * EBSA285 architecture timex specifications
+ * Copyright (C) 1998 Russell King
*
- * Copyright (C) 1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * EBSA285 architecture timex specifications
*/
/*
diff --git a/include/asm-arm/arch-ebsa285/uncompress.h b/include/asm-arm/arch-ebsa285/uncompress.h
index ab103585c..351cc7b2c 100644
--- a/include/asm-arm/arch-ebsa285/uncompress.h
+++ b/include/asm-arm/arch-ebsa285/uncompress.h
@@ -1,8 +1,13 @@
/*
- * linux/include/asm-arm/arch-ebsa285/uncompress.h
+ * linux/include/asm-arm/arch-ebsa285/uncompress.h
*
- * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1996-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
+#include <asm/mach-types.h>
/*
* Note! This could cause problems on the NetWinder
diff --git a/include/asm-arm/arch-ebsa285/vmalloc.h b/include/asm-arm/arch-ebsa285/vmalloc.h
index 63dbeb9af..823c6d794 100644
--- a/include/asm-arm/arch-ebsa285/vmalloc.h
+++ b/include/asm-arm/arch-ebsa285/vmalloc.h
@@ -1,5 +1,9 @@
/*
- * linux/include/asm-arm/arch-ebsa285/vmalloc.h
+ * linux/include/asm-arm/arch-ebsa285/vmalloc.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
/*
diff --git a/include/asm-arm/arch-nexuspci/dma.h b/include/asm-arm/arch-nexuspci/dma.h
index 585fbe53b..dee1ea217 100644
--- a/include/asm-arm/arch-nexuspci/dma.h
+++ b/include/asm-arm/arch-nexuspci/dma.h
@@ -7,6 +7,13 @@
*/
/*
+ * 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.
+ */
+
+/*
* This is the maximum DMA address that can be DMAd to.
*/
#define MAX_DMA_ADDRESS 0xffffffff
diff --git a/include/asm-arm/arch-nexuspci/hardware.h b/include/asm-arm/arch-nexuspci/hardware.h
index 364edd010..303dc2c97 100644
--- a/include/asm-arm/arch-nexuspci/hardware.h
+++ b/include/asm-arm/arch-nexuspci/hardware.h
@@ -5,6 +5,14 @@
*
* This file contains the hardware definitions of the FTV PCI card.
*/
+
+/*
+ * 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_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
@@ -63,4 +71,6 @@
#define INTCONT_LED 0x1a
#define INTCONT_PCI_RESET 0x1c
+#define UNCACHEABLE_ADDR STATUS_BASE
+
#endif
diff --git a/include/asm-arm/arch-nexuspci/irq.h b/include/asm-arm/arch-nexuspci/irq.h
index 501a97c87..292ed47b8 100644
--- a/include/asm-arm/arch-nexuspci/irq.h
+++ b/include/asm-arm/arch-nexuspci/irq.h
@@ -4,6 +4,13 @@
* Copyright (C) 1998, 1999, 2000 Philip Blundell
*/
+/*
+ * 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.
+ */
+
#include <asm/io.h>
#define fixup_irq(x) (x)
diff --git a/include/asm-arm/arch-nexuspci/irqs.h b/include/asm-arm/arch-nexuspci/irqs.h
index fdc88f1d5..954149a7c 100644
--- a/include/asm-arm/arch-nexuspci/irqs.h
+++ b/include/asm-arm/arch-nexuspci/irqs.h
@@ -4,9 +4,18 @@
* Copyright (C) 1997, 1998, 2000 Philip Blundell
*/
-/* The hardware is capable of routing any interrupt source (except the
- DUART) to either IRQ or FIQ. We ignore FIQ and use IRQ exclusively
- for simplicity. */
+/*
+ * 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.
+ */
+
+/*
+ * The hardware is capable of routing any interrupt source (except the
+ * DUART) to either IRQ or FIQ. We ignore FIQ and use IRQ exclusively
+ * for simplicity.
+ */
#define IRQ_DUART 0
#define IRQ_PLX 1
diff --git a/include/asm-arm/arch-nexuspci/system.h b/include/asm-arm/arch-nexuspci/system.h
index cf083f496..028788bdc 100644
--- a/include/asm-arm/arch-nexuspci/system.h
+++ b/include/asm-arm/arch-nexuspci/system.h
@@ -3,6 +3,14 @@
*
* Copyright (c) 1996, 97, 98, 99, 2000 FutureTV Labs Ltd.
*/
+
+/*
+ * 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_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
diff --git a/include/asm-arm/arch-nexuspci/time.h b/include/asm-arm/arch-nexuspci/time.h
index b1ff948a1..7bb4322f6 100644
--- a/include/asm-arm/arch-nexuspci/time.h
+++ b/include/asm-arm/arch-nexuspci/time.h
@@ -7,6 +7,13 @@
* SCC chip.
*/
+/*
+ * 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.
+ */
+
static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
static int count = 25;
@@ -46,6 +53,7 @@ extern __inline__ void setup_timer(void)
__raw_writeb(0x10, DUART_BASE + 0x14);
timer_irq.handler = timer_interrupt;
+ timer_irq.flags = SA_SHIRQ;
setup_arm_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/arch-nexuspci/uncompress.h b/include/asm-arm/arch-nexuspci/uncompress.h
index e03ea93b3..dd697a924 100644
--- a/include/asm-arm/arch-nexuspci/uncompress.h
+++ b/include/asm-arm/arch-nexuspci/uncompress.h
@@ -4,6 +4,13 @@
* Copyright (C) 1998, 1999, 2000 Philip Blundell
*/
+/*
+ * 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.
+ */
+
#include <asm/hardware.h>
#include <asm/io.h>
@@ -22,8 +29,11 @@ void _ll_write_char(char c)
*/
static void puts(const char *s)
{
- while (*s)
+ while (*s) {
+ if (*s == '\n')
+ _ll_write_char('\r');
_ll_write_char(*(s++));
+ }
}
/*
diff --git a/include/asm-arm/arch-rpc/acornfb.h b/include/asm-arm/arch-rpc/acornfb.h
index 531481215..6c7696e67 100644
--- a/include/asm-arm/arch-rpc/acornfb.h
+++ b/include/asm-arm/arch-rpc/acornfb.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-rpc/acornfb.h
+ * linux/include/asm-arm/arch-rpc/acornfb.h
*
- * (C) 1999 Russell King
+ * Copyright (C) 1999 Russell King
*
- * AcornFB architecture specific code
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * AcornFB architecture specific code
*/
#define acornfb_valid_pixrate(rate) (1)
diff --git a/include/asm-arm/arch-rpc/dma.h b/include/asm-arm/arch-rpc/dma.h
index b52f5b110..d24a27e30 100644
--- a/include/asm-arm/arch-rpc/dma.h
+++ b/include/asm-arm/arch-rpc/dma.h
@@ -1,5 +1,11 @@
/*
- * linux/include/asm-arm/arch-rpc/dma.h
+ * linux/include/asm-arm/arch-rpc/dma.h
+ *
+ * Copyright (C) 1997 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
diff --git a/include/asm-arm/arch-rpc/hardware.h b/include/asm-arm/arch-rpc/hardware.h
index ce1a27b13..b13b4efbe 100644
--- a/include/asm-arm/arch-rpc/hardware.h
+++ b/include/asm-arm/arch-rpc/hardware.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-rpc/hardware.h
+ * linux/include/asm-arm/arch-rpc/hardware.h
*
- * Copyright (C) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
*
- * This file contains the hardware definitions of the RiscPC series machines.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This file contains the hardware definitions of the RiscPC series machines.
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
diff --git a/include/asm-arm/arch-rpc/ide.h b/include/asm-arm/arch-rpc/ide.h
index 827d81c2b..15fecab1f 100644
--- a/include/asm-arm/arch-rpc/ide.h
+++ b/include/asm-arm/arch-rpc/ide.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-rpc/ide.h
+ * linux/include/asm-arm/arch-rpc/ide.h
*
- * Copyright (c) 1997 Russell King
+ * Copyright (C) 1997 Russell King
*
- * Modifications:
- * 29-07-1998 RMK Major re-work of IDE architecture specific code
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ * 29-07-1998 RMK Major re-work of IDE architecture specific code
*/
#include <asm/irq.h>
diff --git a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h
index 508560bda..81f201aae 100644
--- a/include/asm-arm/arch-rpc/io.h
+++ b/include/asm-arm/arch-rpc/io.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-rpc/io.h
+ * linux/include/asm-arm/arch-rpc/io.h
*
- * Copyright (C) 1997 Russell King
+ * Copyright (C) 1997 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
* Modifications:
* 06-Dec-1997 RMK Created.
diff --git a/include/asm-arm/arch-rpc/irq.h b/include/asm-arm/arch-rpc/irq.h
index c7d98b0c0..48aece366 100644
--- a/include/asm-arm/arch-rpc/irq.h
+++ b/include/asm-arm/arch-rpc/irq.h
@@ -1,13 +1,17 @@
/*
- * include/asm-arm/arch-rpc/irq.h
+ * linux/include/asm-arm/arch-rpc/irq.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * Changelog:
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
* 10-10-1996 RMK Brought up to date with arch-sa110eval
* 22-08-1998 RMK Restructured IRQ routines
*/
-#include <asm/iomd.h>
+#include <asm/hardware/iomd.h>
#define fixup_irq(x) (x)
@@ -152,21 +156,22 @@ static __inline__ void irq_init_irq(void)
irq_desc[irq].unmask = rpc_unmask_irq_b;
break;
- case 16 ... 22:
+ case 16 ... 21:
irq_desc[irq].valid = 1;
+ irq_desc[irq].noautoenable = 1;
irq_desc[irq].mask_ack = rpc_mask_irq_dma;
irq_desc[irq].mask = rpc_mask_irq_dma;
irq_desc[irq].unmask = rpc_unmask_irq_dma;
break;
- case 32 ... 40:
+ case 32 ... 39:
irq_desc[irq].valid = 1;
irq_desc[irq].mask_ack = ecard_disableirq;
irq_desc[irq].mask = ecard_disableirq;
irq_desc[irq].unmask = ecard_enableirq;
break;
- case 64 ... 72:
+ case 64 ... 71:
irq_desc[irq].valid = 1;
irq_desc[irq].mask_ack = rpc_mask_irq_fiq;
irq_desc[irq].mask = rpc_mask_irq_fiq;
@@ -175,5 +180,7 @@ static __inline__ void irq_init_irq(void)
}
}
+ irq_desc[IRQ_KEYBOARDTX].noautoenable = 1;
+
init_FIQ();
}
diff --git a/include/asm-arm/arch-rpc/irqs.h b/include/asm-arm/arch-rpc/irqs.h
index 948ba961d..72ee47185 100644
--- a/include/asm-arm/arch-rpc/irqs.h
+++ b/include/asm-arm/arch-rpc/irqs.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-rpc/irqs.h
+ * linux/include/asm-arm/arch-rpc/irqs.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#define IRQ_PRINTER 0
diff --git a/include/asm-arm/arch-rpc/keyboard.h b/include/asm-arm/arch-rpc/keyboard.h
index c083b08bb..0e9566812 100644
--- a/include/asm-arm/arch-rpc/keyboard.h
+++ b/include/asm-arm/arch-rpc/keyboard.h
@@ -1,11 +1,14 @@
/*
- * linux/include/asm-arm/arch-rpc/keyboard.h
+ * linux/include/asm-arm/arch-rpc/keyboard.h
*
- * Keyboard driver definitions for RiscPC architecture
+ * Copyright (C) 1998 Russell King
*
- * (C) 1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Keyboard driver definitions for RiscPC architecture
*/
-
#include <asm/irq.h>
#define NR_SCANCODES 128
diff --git a/include/asm-arm/arch-rpc/memory.h b/include/asm-arm/arch-rpc/memory.h
index e5f59abdb..2b3899173 100644
--- a/include/asm-arm/arch-rpc/memory.h
+++ b/include/asm-arm/arch-rpc/memory.h
@@ -1,15 +1,19 @@
/*
- * linux/include/asm-arm/arch-rpc/memory.h
+ * linux/include/asm-arm/arch-rpc/memory.h
*
- * Copyright (c) 1996,1997,1998 Russell King.
+ * Copyright (C) 1996,1997,1998 Russell King.
*
- * Changelog:
- * 20-Oct-1996 RMK Created
- * 31-Dec-1997 RMK Fixed definitions to reduce warnings
- * 11-Jan-1998 RMK Uninlined to reduce hits on cache
- * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
- * 21-Mar-1999 RMK Renamed to memory.h
- * RMK Added TASK_SIZE and PAGE_OFFSET
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 20-Oct-1996 RMK Created
+ * 31-Dec-1997 RMK Fixed definitions to reduce warnings
+ * 11-Jan-1998 RMK Uninlined to reduce hits on cache
+ * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
+ * 21-Mar-1999 RMK Renamed to memory.h
+ * RMK Added TASK_SIZE and PAGE_OFFSET
*/
#ifndef __ASM_ARCH_MMU_H
#define __ASM_ARCH_MMU_H
diff --git a/include/asm-arm/arch-rpc/processor.h b/include/asm-arm/arch-rpc/processor.h
index fd9aa088d..b64eaebfc 100644
--- a/include/asm-arm/arch-rpc/processor.h
+++ b/include/asm-arm/arch-rpc/processor.h
@@ -1,11 +1,15 @@
/*
- * linux/include/asm-arm/arch-rpc/processor.h
+ * linux/include/asm-arm/arch-rpc/processor.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
*
- * Changelog:
- * 10-Sep-1996 RMK Created
- * 21-Mar-1999 RMK Added asm/arch/memory.h
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 10-Sep-1996 RMK Created
+ * 21-Mar-1999 RMK Added asm/arch/memory.h
*/
#ifndef __ASM_ARCH_PROCESSOR_H
diff --git a/include/asm-arm/arch-rpc/serial.h b/include/asm-arm/arch-rpc/serial.h
index 87e81c609..1497fc6fe 100644
--- a/include/asm-arm/arch-rpc/serial.h
+++ b/include/asm-arm/arch-rpc/serial.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-rpc/serial.h
+ * linux/include/asm-arm/arch-rpc/serial.h
*
- * Copyright (c) 1996 Russell King.
+ * Copyright (C) 1996 Russell King.
*
- * Changelog:
- * 15-10-1996 RMK Created
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 15-10-1996 RMK Created
*/
#ifndef __ASM_ARCH_SERIAL_H
#define __ASM_ARCH_SERIAL_H
diff --git a/include/asm-arm/arch-rpc/system.h b/include/asm-arm/arch-rpc/system.h
index 885e43de3..2e8711ec5 100644
--- a/include/asm-arm/arch-rpc/system.h
+++ b/include/asm-arm/arch-rpc/system.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/arch-rpc/system.h
+ * linux/include/asm-arm/arch-rpc/system.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <asm/arch/hardware.h>
-#include <asm/iomd.h>
+#include <asm/hardware/iomd.h>
#include <asm/io.h>
static void arch_idle(void)
@@ -17,7 +21,7 @@ static void arch_idle(void)
if (current->need_resched || hlt_counter)
goto slow_out;
cpu_do_idle(IDLE_WAIT_FAST);
- } while (time_before(start_idle, jiffies + HZ/3));
+ } while (time_before(jiffies, start_idle + HZ/50));
cpu_do_idle(IDLE_CLOCK_SLOW);
diff --git a/include/asm-arm/arch-rpc/time.h b/include/asm-arm/arch-rpc/time.h
index 94974241f..334de6235 100644
--- a/include/asm-arm/arch-rpc/time.h
+++ b/include/asm-arm/arch-rpc/time.h
@@ -1,12 +1,16 @@
/*
- * linux/include/asm-arm/arch-rpc/time.h
+ * linux/include/asm-arm/arch-rpc/time.h
*
- * Copyright (c) 1996-2000 Russell King.
+ * Copyright (C) 1996-2000 Russell King.
*
- * Changelog:
- * 24-Sep-1996 RMK Created
- * 10-Oct-1996 RMK Brought up to date with arch-sa110eval
- * 04-Dec-1997 RMK Updated for new arch/arm/time.c
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 24-Sep-1996 RMK Created
+ * 10-Oct-1996 RMK Brought up to date with arch-sa110eval
+ * 04-Dec-1997 RMK Updated for new arch/arm/time.c
*/
extern void ioctime_init(void);
diff --git a/include/asm-arm/arch-rpc/timex.h b/include/asm-arm/arch-rpc/timex.h
index cb3c72abe..ed7df64d9 100644
--- a/include/asm-arm/arch-rpc/timex.h
+++ b/include/asm-arm/arch-rpc/timex.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/arch-rpc/timex.h
+ * linux/include/asm-arm/arch-rpc/timex.h
*
- * RiscPC architecture timex specifications
+ * Copyright (C) 1997, 1998 Russell King
*
- * Copyright (C) 1997, 1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * RiscPC architecture timex specifications
*/
/*
diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h
index 21701094a..0834d287e 100644
--- a/include/asm-arm/arch-rpc/uncompress.h
+++ b/include/asm-arm/arch-rpc/uncompress.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/arch-a5k/uncompress.h
+ * linux/include/asm-arm/arch-rpc/uncompress.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#define VIDMEM ((char *)SCREEN_START)
diff --git a/include/asm-arm/arch-rpc/vmalloc.h b/include/asm-arm/arch-rpc/vmalloc.h
index 60f72ec84..579bd1190 100644
--- a/include/asm-arm/arch-rpc/vmalloc.h
+++ b/include/asm-arm/arch-rpc/vmalloc.h
@@ -1,5 +1,11 @@
/*
- * linux/include/asm-arm/arch-rpc/vmalloc.h
+ * linux/include/asm-arm/arch-rpc/vmalloc.h
+ *
+ * Copyright (C) 1997 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
/*
diff --git a/include/asm-arm/arch-sa1100/SA-1100.h b/include/asm-arm/arch-sa1100/SA-1100.h
index d528c3d2e..236e880c9 100644
--- a/include/asm-arm/arch-sa1100/SA-1100.h
+++ b/include/asm-arm/arch-sa1100/SA-1100.h
@@ -2417,8 +2417,8 @@ typedef PCMCIAPrtType PCMCIAType [PCMCIASp/PCMCIAPrtSp] ;
(0xF << FShft (DDAR_DS))
#define DDAR_DA Fld (24, 8) /* Device Address */
#define DDAR_DevAdd(Add) /* Device Address */ \
- ((Add) & 0xF0000000 | \
- ((Add) & 0X003FFFFC) << (FShft (DDAR_DA) - 2))
+ (((Add) & 0xF0000000) | \
+ (((Add) & 0X003FFFFC) << (FShft (DDAR_DA) - 2)))
#define DDAR_Ser0UDCWr /* Ser. port 0 UDC Write */ \
(DDAR_DevWr + DDAR_Brst8 + DDAR_8BitDev + \
DDAR_Ser0UDCTr + DDAR_DevAdd (_Ser0UDCDR))
diff --git a/include/asm-arm/arch-sa1100/assabet.h b/include/asm-arm/arch-sa1100/assabet.h
index 75bd395a5..b40b2cf1e 100644
--- a/include/asm-arm/arch-sa1100/assabet.h
+++ b/include/asm-arm/arch-sa1100/assabet.h
@@ -28,7 +28,7 @@
/* Board Control Register */
-#define BCR_BASE 0xdc000000
+#define BCR_BASE 0xf1000000
#define BCR (*(volatile unsigned int *)(BCR_BASE))
#define BCR_DB1110 (0x00A07410)
@@ -105,8 +105,8 @@ extern unsigned long BCR_value;
#define NEPONSET_USAR_IRQ MISC_IRQ1
#define NEPONSET_CPLD_BASE (0x10000000)
-#define Nep_p2v( x ) ((x) - NEPONSET_CPLD_BASE + 0xd4000000)
-#define Nep_v2p( x ) ((x) - 0xd4000000 + NEPONSET_CPLD_BASE)
+#define Nep_p2v( x ) ((x) - NEPONSET_CPLD_BASE + 0xf0000000)
+#define Nep_v2p( x ) ((x) - 0xf0000000 + NEPONSET_CPLD_BASE)
#define _IRR 0x10000024 /* Interrupt Reason Register */
#define _AUD_CTL 0x100000c0 /* Audio controls (RW) */
diff --git a/include/asm-arm/arch-sa1100/bitsy.h b/include/asm-arm/arch-sa1100/bitsy.h
index 42c178f58..69f467132 100644
--- a/include/asm-arm/arch-sa1100/bitsy.h
+++ b/include/asm-arm/arch-sa1100/bitsy.h
@@ -38,6 +38,7 @@
#define EGPIO_BITSY_LVDD_ON (1 << 15) /* enable 9V and -6.5V to LCD. */
#ifndef __ASSEMBLY__
+#define BITSY_EGPIO (*(volatile int *)0xf0000000)
extern void clr_bitsy_egpio(unsigned long x);
extern void set_bitsy_egpio(unsigned long x);
#endif
diff --git a/include/asm-arm/arch-sa1100/cerf.h b/include/asm-arm/arch-sa1100/cerf.h
index 95d58a17b..5aad7afea 100644
--- a/include/asm-arm/arch-sa1100/cerf.h
+++ b/include/asm-arm/arch-sa1100/cerf.h
@@ -12,5 +12,8 @@
#define IRQ_GPIO_CF_BVD2 IRQ_GPIO19
#define IRQ_GPIO_CF_BVD1 IRQ_GPIO20
+#define GPIO_UCB1200_IRQ GPIO_GPIO (18)
+#define IRQ_GPIO_UCB1200_IRQ IRQ_GPIO18
+
#endif
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
index a4a1b5884..e60c4ec68 100644
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ b/include/asm-arm/arch-sa1100/hardware.h
@@ -13,17 +13,28 @@
#define __ASM_ARCH_HARDWARE_H
#include <linux/config.h>
+#include <asm/mach-types.h>
+
/* Flushing areas */
#define FLUSH_BASE_PHYS 0xe0000000 /* SA1100 zero bank */
-#define FLUSH_BASE 0xdf000000
-#define FLUSH_BASE_MINICACHE 0xdf800000
+#define FLUSH_BASE 0xf5000000
+#define FLUSH_BASE_MINICACHE 0xf5800000
#define UNCACHEABLE_ADDR 0xfa050000
/*
- * We requires absolute addresses i.e. (0xe00000 + 0x3f8) for in*()/out*()
- * macros to be useful for all cases.
+ * Those are statically mapped PCMCIA IO space for designs using it as a
+ * generic IO bus, typically with ISA parts, hardwired IDE interfaces, etc.
+ * The actual PCMCIA code is mapping required IO region at run time.
+ */
+#define PCMCIA_IO_0_BASE 0xf6000000
+#define PCMCIA_IO_1_BASE 0xf7000000
+
+
+/*
+ * We requires absolute addresses i.e. (PCMCIA_IO_0_BASE + 0x3f8) for
+ * in*()/out*() macros to be usable for all cases.
*/
#define PCIO_BASE 0
@@ -37,8 +48,6 @@
* 90000000 fa000000
* a0000000 fc000000
* b0000000 fe000000
- *
- * Nb: PCMCIA is mapped from 0xe0000000 to f7ffffff in mm-sa1100.c
*/
#define VIO_BASE 0xf8000000 /* virtual start of IO space */
@@ -89,20 +98,24 @@ extern void set_GPIO_IRQ_edge( int gpio_mask, int edge_mask );
#include "bitsy.h"
#endif
-#if defined(CONFIG_SA1100_GRAPHICSCLIENT) || defined(CONFIG_SA1100_THINCLIENT)
+#if defined(CONFIG_SA1100_THINCLIENT)
#include "thinclient.h"
#endif
+#if defined(CONFIG_SA1100_GRAPHICSCLIENT)
+#include "graphicsclient.h"
+#endif
+
#ifdef CONFIG_SA1101
/*
* We have mapped the sa1101 depending on the value of SA1101_BASE.
- * It then appears from 0xdc000000.
+ * It then appears from 0xf4000000.
*/
-#define SA1101_p2v( x ) ((x) - SA1101_BASE + 0xdc000000)
-#define SA1101_v2p( x ) ((x) - 0xdc000000 + SA1101_BASE)
+#define SA1101_p2v( x ) ((x) - SA1101_BASE + 0xf4000000)
+#define SA1101_v2p( x ) ((x) - 0xf4000000 + SA1101_BASE)
#include "SA-1101.h"
@@ -111,8 +124,8 @@ extern void set_GPIO_IRQ_edge( int gpio_mask, int edge_mask );
#ifdef CONFIG_SA1111
-#define SA1111_p2v( x ) ((x) - SA1111_BASE + 0xd8000000)
-#define SA1111_v2p( x ) ((x) - 0xd8000000 + SA1111_BASE)
+#define SA1111_p2v( x ) ((x) - SA1111_BASE + 0xf4000000)
+#define SA1111_v2p( x ) ((x) - 0xf4000000 + SA1111_BASE)
#include "SA-1111.h"
diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h
index ac2190140..22aae0157 100644
--- a/include/asm-arm/arch-sa1100/ide.h
+++ b/include/asm-arm/arch-sa1100/ide.h
@@ -3,14 +3,22 @@
*
* Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre
*
+ * 18-aug-2000: Cleanup by Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
+ * Get rid of the special ide_init_hwif_ports() functions
+ * and make a generalised function that can be used by all
+ * architectures.
*/
#include <linux/config.h>
-
#include <asm/irq.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
+
+#define PCMCIA_IO_0_BASE 0xe0000000
+#define PCMCIA_IO_1_BASE 0xe4000000
+
+
/*
* Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses.
@@ -20,47 +28,33 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
{
ide_ioreg_t reg;
int i;
- int ioshift = 0;
-
+ int regincr = 1;
+
/* The Empeg board has the first two address lines unused */
if (machine_is_empeg())
- ioshift = 2;
-
+ regincr = 1 << 2;
+
+ /* The LART doesn't use A0 for IDE */
+ if (machine_is_lart())
+ regincr = 1 << 1;
+
memset(hw, 0, sizeof(*hw));
- reg = (ide_ioreg_t) (data_port << ioshift);
+ reg = (ide_ioreg_t)data_port;
+
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg;
- reg += (1 << ioshift);
+ reg += regincr;
}
- hw->io_ports[IDE_CONTROL_OFFSET] =
- (ide_ioreg_t) (ctrl_port << ioshift);
+ hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port;
if (irq)
*irq = 0;
}
-/*
- * Special case for the empeg board which has the first two
- * address lines unused
- */
-static __inline__ void
-empeg_ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port)
-{
- ide_ioreg_t reg;
- int i;
- memset(hw, 0, sizeof(*hw));
- reg = (ide_ioreg_t) (0xe0000000 + (data_port << 2));
- for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
- hw->io_ports[i] = reg;
- reg += (1 << 2);
- }
- hw->io_ports[IDE_CONTROL_OFFSET] =
- (ide_ioreg_t) (0xe0000000 + (ctrl_port << 2));
-}
/*
* This registers the standard ports for this architecture with the IDE
@@ -92,10 +86,10 @@ ide_init_default_hwifs(void)
/* MAC 23/4/1999, swap these round so that the left hand
hard disk is hda when viewed from the front. This
doesn't match the silkscreen however. */
- empeg_ide_init_hwif_ports(&hw,0x10,0x1e);
+ ide_init_hwif_ports(&hw, PCMCIA_IO_0_BASE + 0x40, PCMCIA_IO_0_BASE + 0x78, NULL);
hw.irq = EMPEG_IRQ_IDE2;
ide_register_hw(&hw, NULL);
- empeg_ide_init_hwif_ports(&hw,0x00,0x0e);
+ ide_init_hwif_ports(&hw, PCMCIA_IO_0_BASE + 0x00, PCMCIA_IO_0_BASE + 0x38, NULL);
hw.irq = ,EMPEG_IRQ_IDE1;
ide_register_hw(&hw, NULL);
#endif
@@ -112,7 +106,7 @@ ide_init_default_hwifs(void)
/* set the pcmcia interface timing */
MECR = 0x00060006;
- ide_init_hwif_ports(&hw, 0xe00001f0, 0xe00003f6, NULL);
+ ide_init_hwif_ports(&hw, PCMCIA_IO_0_BASE + 0x1f0, PCMCIA_IO_0_BASE + 0x3f6, NULL);
hw.irq = IRQ_GPIO7;
ide_register_hw(&hw, NULL);
#endif
@@ -129,8 +123,7 @@ ide_init_default_hwifs(void)
MECR = 0x00060006;
/* init the interface */
-/* ide_init_hwif_ports(&hw, 0xe00000000, 0xe00001000, NULL); */
- ide_init_hwif_ports(&hw, 0xe00001000, 0xe00000000, NULL);
+ ide_init_hwif_ports(&hw, PCMCIA_IO_0_BASE + 0x0000, PCMCIA_IO_0_BASE + 0x1000, NULL);
hw.irq = IRQ_GPIO1;
ide_register_hw(&hw, NULL);
#endif
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h
index 4c2126208..28c4015c5 100644
--- a/include/asm-arm/arch-sa1100/memory.h
+++ b/include/asm-arm/arch-sa1100/memory.h
@@ -24,22 +24,22 @@
*/
#define PHYS_OFFSET (0xc0000000UL)
-
-#define __virt_to_phys__is_a_macro
-#define __phys_to_virt__is_a_macro
-
/*
- * The following gives a maximum memory size of 128MB (32MB in each bank).
+ * We take advantage of the fact that physical and virtual address can be the
+ * same. The NUMA code is handling the large holes that might exist between
+ * all memory banks.
*/
-#define __virt_to_phys(x) (((x) & 0xf9ffffff) | ((x) & 0x06000000) << 2)
-#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x18000000) >> 2)
+#define __virt_to_phys__is_a_macro
+#define __phys_to_virt__is_a_macro
+#define __virt_to_phys(x) (x)
+#define __phys_to_virt(x) (x)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
- * address suitable to be passed to set_dma_addr
+ * address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
- * to an address that the kernel can use.
+ * to an address that the kernel can use.
*
* On the SA1100, bus addresses are equivalent to physical addresses.
*/
diff --git a/include/asm-arm/arch-sa1100/mmzone.h b/include/asm-arm/arch-sa1100/mmzone.h
index c721a1d55..09e90be62 100644
--- a/include/asm-arm/arch-sa1100/mmzone.h
+++ b/include/asm-arm/arch-sa1100/mmzone.h
@@ -11,6 +11,14 @@
*
* Of course, all this isn't mandatory for SA1100 implementations with only
* one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM.
+ *
+ * The nodes are matched with the physical memory bank addresses which are
+ * incidentally the same as virtual addresses.
+ *
+ * node 0: 0xc0000000 - 0xc7ffffff
+ * node 1: 0xc8000000 - 0xcfffffff
+ * node 2: 0xd0000000 - 0xd7ffffff
+ * node 3: 0xd8000000 - 0xdfffffff
*/
@@ -20,18 +28,6 @@
extern pg_data_t sa1100_node_data[];
/*
- * 32MB max in each bank, must fit with __virt_to_phys() & __phys_to_virt()
- */
-#define NODE_MAX_MEM_SHIFT 25
-#define NODE_MAX_MEM_SIZE (1<<NODE_MAX_MEM_SHIFT)
-
-/*
- * Given a kernel address, find the home node of the underlying memory.
- */
-#define KVADDR_TO_NID(addr) \
- (((unsigned long)(addr) - PAGE_OFFSET) >> NODE_MAX_MEM_SHIFT)
-
-/*
* Return a pointer to the node data for node n.
*/
#define NODE_DATA(nid) (&sa1100_node_data[nid])
@@ -42,11 +38,10 @@ extern pg_data_t sa1100_node_data[];
#define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map)
/*
- * Given a mem_map_t, LOCAL_MAP_BASE finds the owning node for the
- * physical page and returns the kaddr for the mem_map of that node.
+ * Given a kernel address, find the home node of the underlying memory.
*/
-#define LOCAL_MAP_BASE(page) \
- NODE_MEM_MAP(KVADDR_TO_NID((unsigned long)(page)))
+#define KVADDR_TO_NID(addr) \
+ (((unsigned long)(addr) & 0x18000000) >> 27)
/*
* Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
@@ -56,28 +51,22 @@ extern pg_data_t sa1100_node_data[];
NODE_MEM_MAP(KVADDR_TO_NID((unsigned long)(kaddr)))
/*
- * Given a kaddr, LOCAL_BASE_ADDR finds the owning node of the memory
- * and returns the kaddr corresponding to first physical page in the
- * node's mem_map.
- */
-#define LOCAL_BASE_ADDR(kaddr) ((unsigned long)(kaddr) & ~(NODE_MAX_MEM_SIZE-1))
-
-/*
* Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory
* and returns the index corresponding to the appropriate page in the
* node's mem_map.
*/
#define LOCAL_MAP_NR(kvaddr) \
- (((unsigned long)(kvaddr)-LOCAL_BASE_ADDR((kvaddr))) >> PAGE_SHIFT)
+ (((unsigned long)(kvaddr) & 0x07ffffff) >> PAGE_SHIFT)
-/*
- * With discontigmem, the conceptual mem_map array starts from PAGE_OFFSET.
- * Given a kaddr, MAP_NR returns the appropriate global mem_map index so
- * it matches the corresponding node's local mem_map.
+/*
+ * Given a kaddr, virt_to_page returns a pointer to the corresponding
+ * mem_map entry.
+ */
+#define virt_to_page(kaddr) \
+ (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr))
+
+/*
+ * Didn't find the best way to validate a page pointer yet...
*/
-#define MAP_NR(kaddr) (LOCAL_MAP_NR((kaddr)) + \
- (((unsigned long)ADDR_TO_MAPBASE((kaddr)) - PAGE_OFFSET) / \
- sizeof(mem_map_t)))
-#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr))
-#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
+#define VALID_PAGE(page) (1)
diff --git a/include/asm-arm/arch-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h
index 5f0febaaa..ca8e6330a 100644
--- a/include/asm-arm/arch-sa1100/system.h
+++ b/include/asm-arm/arch-sa1100/system.h
@@ -5,13 +5,10 @@
*/
#include <linux/config.h>
-static void arch_idle(void)
+static inline void arch_idle(void)
{
- while (!current->need_resched && !hlt_counter) {
- cpu_do_idle(IDLE_CLOCK_SLOW);
- cpu_do_idle(IDLE_WAIT_FAST);
- cpu_do_idle(IDLE_CLOCK_FAST);
- }
+ while (!current->need_resched && !hlt_counter)
+ cpu_do_idle(0);
}
#ifdef CONFIG_SA1100_VICTOR
diff --git a/include/asm-arm/arch-sa1100/thinclient.h b/include/asm-arm/arch-sa1100/thinclient.h
index 4c1846779..830152117 100644
--- a/include/asm-arm/arch-sa1100/thinclient.h
+++ b/include/asm-arm/arch-sa1100/thinclient.h
@@ -13,8 +13,8 @@
#define ADS_CPLD_BASE (0x10000000)
-#define ADS_p2v( x ) ((x) - ADS_CPLD_BASE + 0xdc000000)
-#define ADS_v2p( x ) ((x) - 0xdc000000 + ADS_CPLD_BASE)
+#define ADS_p2v( x ) ((x) - ADS_CPLD_BASE + 0xf0000000)
+#define ADS_v2p( x ) ((x) - 0xf0000000 + ADS_CPLD_BASE)
/* Parallel Port */
diff --git a/include/asm-arm/arch-sa1100/vmalloc.h b/include/asm-arm/arch-sa1100/vmalloc.h
index 42affe414..82c5ce9b6 100644
--- a/include/asm-arm/arch-sa1100/vmalloc.h
+++ b/include/asm-arm/arch-sa1100/vmalloc.h
@@ -13,4 +13,4 @@
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
-#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
+#define VMALLOC_END (0xe8000000)
diff --git a/include/asm-arm/arch-shark/hardware.h b/include/asm-arm/arch-shark/hardware.h
index fc38d57aa..3e000fd50 100644
--- a/include/asm-arm/arch-shark/hardware.h
+++ b/include/asm-arm/arch-shark/hardware.h
@@ -20,7 +20,7 @@
/*
* RAM definitions
*/
-#define FLUSH_BASE_PHYS 0x60000000
+#define FLUSH_BASE_PHYS 0x80000000
#else
@@ -28,22 +28,26 @@
#endif
-#define IO_SIZE 0x10000000
+#define IO_SIZE 0x08000000
#define IO_START 0x40000000
+#define ROMCARD_SIZE 0x08000000
+#define ROMCARD_START 0x10000000
#define FLUSH_BASE 0xdf000000
#define PCIO_BASE 0xe0000000
/* defines for the Framebuffer */
-#define FB_BASE 0xd0000000
#define FB_START 0x06000000
-#define FB_SIZE 0x00200000
/* Registers for Framebuffer */
-#define FBREG_BASE (FB_BASE + FB_SIZE)
-#define FBREG_START 0x06800000
-#define FBREG_SIZE 0x000c0000
+/*#define FBREG_START 0x06800000*/
+
+#define UNCACHEABLE_ADDR 0xdf010000
+
+#define SEQUOIA_LED_GREEN (1<<6)
+#define SEQUOIA_LED_AMBER (1<<5)
+#define SEQUOIA_LED_BACK (1<<7)
#endif
diff --git a/include/asm-arm/arch-shark/io.h b/include/asm-arm/arch-shark/io.h
index ff0def03a..ef14f7169 100644
--- a/include/asm-arm/arch-shark/io.h
+++ b/include/asm-arm/arch-shark/io.h
@@ -11,6 +11,8 @@
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
+#define __arch_ioremap(off,size,nocache) __ioremap(off,size,0)
+
#define IO_SPACE_LIMIT 0xffffffff
/*
diff --git a/include/asm-arm/arch-shark/keyboard.h b/include/asm-arm/arch-shark/keyboard.h
index dcb47641e..821be3e47 100644
--- a/include/asm-arm/arch-shark/keyboard.h
+++ b/include/asm-arm/arch-shark/keyboard.h
@@ -1,8 +1,8 @@
/*
- * linux/include/asm-arm/arch-ebsa285/keyboard.h
- *
- * Keyboard driver definitions for EBSA285 architecture
- *
+ * linux/include/asm-arm/arch-shark/keyboard.h
+ * by Alexander.Schulz@stud.uni-karlsruhe.de
+ *
+ * Derived from linux/include/asm-arm/arch-ebsa285/keyboard.h
* (C) 1998 Russell King
* (C) 1998 Phil Blundell
*/
@@ -24,45 +24,12 @@ extern unsigned char pckbd_sysrq_xlate[128];
#define NR_SCANCODES 128
-#define kbd_setkeycode(sc,kc) \
- ({ \
- int __ret; \
- if (have_isa_bridge) \
- __ret = pckbd_setkeycode(sc,kc);\
- else \
- __ret = -EINVAL; \
- __ret; \
- })
-
-#define kbd_getkeycode(sc) \
- ({ \
- int __ret; \
- if (have_isa_bridge) \
- __ret = pckbd_getkeycode(sc); \
- else \
- __ret = -EINVAL; \
- __ret; \
- })
-
-#define kbd_translate(sc, kcp, rm) \
- ({ \
- pckbd_translate(sc, kcp, rm); \
- })
-
+#define kbd_setkeycode(sc,kc) pckbd_setkeycode(sc,kc)
+#define kbd_getkeycode(sc) pckbd_getkeycode(sc)
+#define kbd_translate(sc, kcp, rm) pckbd_translate(sc, kcp, rm)
#define kbd_unexpected_up pckbd_unexpected_up
-
-#define kbd_leds(leds) \
- do { \
- if (have_isa_bridge) \
- pckbd_leds(leds); \
- } while (0)
-
-#define kbd_init_hw() \
- do { \
- if (have_isa_bridge) \
- pckbd_init_hw(); \
- } while (0)
-
+#define kbd_leds(leds) pckbd_leds(leds)
+#define kbd_init_hw() pckbd_init_hw()
#define kbd_sysrq_xlate pckbd_sysrq_xlate
#define kbd_disable_irq()
diff --git a/include/asm-arm/arch-shark/system.h b/include/asm-arm/arch-shark/system.h
index cefb21609..97989e50e 100644
--- a/include/asm-arm/arch-shark/system.h
+++ b/include/asm-arm/arch-shark/system.h
@@ -6,12 +6,19 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
+#include <asm/io.h>
+
static void arch_reset(char mode)
{
- /*
- * loop endlessly
- */
+ short temp;
cli();
+ /* Reset the Machine via pc[3] of the sequoia chipset */
+ outw(0x09,0x24);
+ temp=inw(0x26);
+ temp = temp | (1<<3) | (1<<10);
+ outw(0x09,0x24);
+ outw(temp,0x26);
+
}
static void arch_idle(void)
diff --git a/include/asm-arm/arch-shark/time.h b/include/asm-arm/arch-shark/time.h
index 5bfc2cf06..c81a535ed 100644
--- a/include/asm-arm/arch-shark/time.h
+++ b/include/asm-arm/arch-shark/time.h
@@ -43,15 +43,6 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
}
-static struct irqaction timerirq = {
- timer_interrupt,
- SA_INTERRUPT,
- 0,
- "timer",
- NULL,
- NULL
-};
-
/*
* Set up timer interrupt, and return the current time in seconds.
*/
@@ -88,5 +79,7 @@ extern __inline__ void setup_timer(void)
xtime.tv_sec = mktime(r_time.tm_year+epoch, r_time.tm_mon+1, r_time.tm_mday,
r_time.tm_hour, r_time.tm_min, r_time.tm_sec);
- setup_arm_irq(IRQ_TIMER, &timerirq);
+ timer_irq.handler = timer_interrupt;
+ timer_irq.flags = SA_INTERRUPT; /* FIXME: really? */
+ setup_arm_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/arch-shark/vmalloc.h b/include/asm-arm/arch-shark/vmalloc.h
new file mode 100644
index 000000000..31fe3e777
--- /dev/null
+++ b/include/asm-arm/arch-shark/vmalloc.h
@@ -0,0 +1,17 @@
+/*
+ * linux/include/asm-arm/arch-rpc/vmalloc.h
+ */
+
+/*
+ * Just any arbitrary offset to the start of the vmalloc VM area: the
+ * current 8MB value just means that there will be a 8MB "hole" after the
+ * physical memory until the kernel virtual memory starts. That means that
+ * any out-of-bounds memory accesses will hopefully be caught.
+ * The vmalloc() routines leaves a hole of 4kB between each vmalloced
+ * area for the same reason. ;)
+ */
+#define VMALLOC_OFFSET (8*1024*1024)
+#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
+
diff --git a/include/asm-arm/arch-tbox/dma.h b/include/asm-arm/arch-tbox/dma.h
new file mode 100644
index 000000000..1d5d39175
--- /dev/null
+++ b/include/asm-arm/arch-tbox/dma.h
@@ -0,0 +1,37 @@
+/*
+ * linux/include/asm-arm/arch-tbox/dma.h
+ *
+ * Architecture DMA routines. We have to contend with the bizarre DMA
+ * machine built into the Tbox hardware.
+ *
+ * Copyright (C) 1998 Philip Blundell
+ */
+
+/*
+ * 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.
+ */
+
+/*
+ * DMA channel definitions. Some of these are physically strange but
+ * we sort it out inside dma.c so the user never has to care. The
+ * exception is the double-buffering which we can't really abstract
+ * away sensibly.
+ */
+#define DMA_VIDEO 0
+#define DMA_MPEG_B 1
+#define DMA_AUDIO_B 2
+#define DMA_ASHRX_B 3
+#define DMA_ASHTX 4
+#define DMA_MPEG 5
+#define DMA_AUDIO 6
+#define DMA_ASHRX 7
+
+#define MAX_DMA_CHANNELS 0 /* XXX */
+
+/*
+ * This is the maximum DMA address that can be DMAd to.
+ */
+#define MAX_DMA_ADDRESS 0xffffffff
diff --git a/include/asm-arm/arch-tbox/hardware.h b/include/asm-arm/arch-tbox/hardware.h
new file mode 100644
index 000000000..9aa3f4508
--- /dev/null
+++ b/include/asm-arm/arch-tbox/hardware.h
@@ -0,0 +1,60 @@
+/*
+ * linux/include/asm-arm/arch-tbox/hardware.h
+ *
+ * Copyright (C) 1998, 1999, 2000 Philip Blundell
+ * Copyright (C) 2000 FutureTV Labs Ltd
+ *
+ * This file contains the hardware definitions of the Tbox
+ */
+
+/*
+ * 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_ARCH_HARDWARE_H
+#define __ASM_ARCH_HARDWARE_H
+
+/* Logical Physical
+ * 0xfff00000 0x00100000 I/O
+ * 0xfff00000 0x00100000 Expansion CS0
+ * 0xfff10000 0x00110000 DMA
+ * 0xfff20000 0x00120000 C-Cube
+ * 0xfff30000 0x00130000 FPGA 1
+ * 0xfff40000 0x00140000 UART 2
+ * 0xfff50000 0x00150000 UART 1
+ * 0xfff60000 0x00160000 CS8900
+ * 0xfff70000 0x00170000 INTCONT
+ * 0xfff80000 0x00180000 RAMDAC
+ * 0xfff90000 0x00190000 Control 0
+ * 0xfffa0000 0x001a0000 Control 1
+ * 0xfffb0000 0x001b0000 Control 2
+ * 0xfffc0000 0x001c0000 FPGA 2
+ * 0xfffd0000 0x001d0000 INTRESET
+ * 0xfffe0000 0x001e0000 C-Cube DMA throttle
+ * 0xffff0000 0x001f0000 Expansion CS1
+ * 0xffe00000 0x82000000 cache flush
+ */
+
+/*
+ * Mapping areas
+ */
+#define IO_BASE 0xfff00000
+#define IO_START 0x00100000
+#define FLUSH_BASE 0xffe00000
+
+#define INTCONT 0xfff70000
+
+#define FPGA1CONT 0xffff3000
+
+/*
+ * RAM definitions
+ */
+#define RAM_BASE 0x80000000
+#define FLUSH_BASE_PHYS 0x82000000
+
+#define UNCACHEABLE_ADDR INTCONT
+
+#endif
diff --git a/include/asm-arm/arch-tbox/ide.h b/include/asm-arm/arch-tbox/ide.h
new file mode 100644
index 000000000..d66e67c94
--- /dev/null
+++ b/include/asm-arm/arch-tbox/ide.h
@@ -0,0 +1,3 @@
+/*
+ * linux/include/asm-arm/arch-tbox/ide.h
+ */
diff --git a/include/asm-arm/arch-tbox/io.h b/include/asm-arm/arch-tbox/io.h
new file mode 100644
index 000000000..322941657
--- /dev/null
+++ b/include/asm-arm/arch-tbox/io.h
@@ -0,0 +1,55 @@
+/*
+ * linux/include/asm-arm/arch-tbox/io.h
+ *
+ * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1998, 1999 Philip Blundell
+ *
+ */
+#ifndef __ASM_ARM_ARCH_IO_H
+#define __ASM_ARM_ARCH_IO_H
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+#define __io_pc(_x) ((_x) << 2)
+
+/*
+ * Generic virtual read/write
+ */
+#define __arch_getb(a) (*(volatile unsigned char *)(a))
+#define __arch_getl(a) (*(volatile unsigned long *)(a))
+
+extern __inline__ unsigned int __arch_getw(unsigned long a)
+{
+ unsigned int value;
+ __asm__ __volatile__("ldr%?h %0, [%1, #0] @ getw"
+ : "=&r" (value)
+ : "r" (a));
+ return value;
+}
+
+
+#define __arch_putb(v,a) (*(volatile unsigned char *)(a) = (v))
+#define __arch_putl(v,a) (*(volatile unsigned long *)(a) = (v))
+
+extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
+{
+ __asm__ __volatile__("str%?h %0, [%1, #0] @ putw"
+ : : "r" (value), "r" (a));
+}
+
+#define inb(p) __arch_getb(__io_pc(p))
+#define inw(p) __arch_getw(__io_pc(p))
+#define inl(p) __arch_getl(__io_pc(p))
+
+#define outb(v,p) __arch_putb(v,__io_pc(p))
+#define outw(v,p) __arch_putw(v,__io_pc(p))
+#define outl(v,p) __arch_putl(v,__io_pc(p))
+
+/* Idem, for devices on the upper byte lanes */
+#define inb_u(p) __arch_getb(__io_pc(p) + 2)
+#define inw_u(p) __arch_getw(__io_pc(p) + 2)
+
+#define outb_u(v,p) __arch_putb(v,__io_pc(p) + 2)
+#define outw_u(v,p) __arch_putw(v,__io_pc(p) + 2)
+
+#endif
diff --git a/include/asm-arm/arch-tbox/irq.h b/include/asm-arm/arch-tbox/irq.h
new file mode 100644
index 000000000..3e41df159
--- /dev/null
+++ b/include/asm-arm/arch-tbox/irq.h
@@ -0,0 +1,50 @@
+/*
+ * include/asm-arm/arch-tbox/irq.h
+ *
+ * Copyright (C) 1998, 1999, 2000 Philip Blundell
+ */
+
+/*
+ * 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.
+ */
+
+#include <asm/io.h>
+
+#define fixup_irq(x) (x)
+
+extern unsigned long soft_irq_mask;
+
+static void tbox_mask_irq(unsigned int irq)
+{
+ __raw_writel(0, INTCONT + (irq << 2));
+ soft_irq_mask &= ~(1<<irq);
+}
+
+static void tbox_unmask_irq(unsigned int irq)
+{
+ soft_irq_mask |= (1<<irq);
+ __raw_writel(1, INTCONT + (irq << 2));
+}
+
+static __inline__ void irq_init_irq(void)
+{
+ unsigned int i;
+
+ /* Disable all interrupts initially. */
+ for (i = 0; i < NR_IRQS; i++) {
+ if (i <= 10 || (i >= 12 && i <= 13)) {
+ irq_desc[i].valid = 1;
+ irq_desc[i].probe_ok = 0;
+ irq_desc[i].mask_ack = tbox_mask_irq;
+ irq_desc[i].mask = tbox_mask_irq;
+ irq_desc[i].unmask = tbox_unmask_irq;
+ tbox_mask_irq(i);
+ } else {
+ irq_desc[i].valid = 0;
+ irq_desc[i].probe_ok = 0;
+ }
+ }
+}
diff --git a/include/asm-arm/arch-tbox/irqs.h b/include/asm-arm/arch-tbox/irqs.h
new file mode 100644
index 000000000..0c02ae5f5
--- /dev/null
+++ b/include/asm-arm/arch-tbox/irqs.h
@@ -0,0 +1,29 @@
+/*
+ * linux/include/asm-arm/arch-tbox/irqs.h
+ *
+ * Copyright (C) 1998, 2000 Philip Blundell
+ */
+
+/*
+ * 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.
+ */
+
+#define IRQ_MPEGDMA 0
+#define IRQ_ASHTX 1
+#define IRQ_ASHRX 2
+#define IRQ_VSYNC 3
+#define IRQ_HSYNC 4
+#define IRQ_MPEG 5
+#define IRQ_UART2 6
+#define IRQ_UART1 7
+#define IRQ_ETHERNET 8
+#define IRQ_TIMER 9
+#define IRQ_AUDIODMA 10
+/* bit 11 used for video field ident */
+#define IRQ_EXPMODCS0 12
+#define IRQ_EXPMODCS1 13
+
+#define irq_cannonicalize(i) (i)
diff --git a/include/asm-arm/arch-tbox/keyboard.h b/include/asm-arm/arch-tbox/keyboard.h
new file mode 100644
index 000000000..8fb341c2a
--- /dev/null
+++ b/include/asm-arm/arch-tbox/keyboard.h
@@ -0,0 +1,29 @@
+/*
+ * linux/include/asm-arm/arch-tbox/keyboard.h
+ *
+ * Driver definitions for Tbox dummy keyboard.
+ *
+ * Copyright (C) 1998 Russell King
+ * Copyright (C) 1998 Philip Blundell
+ */
+
+#define NR_SCANCODES 128
+
+#define kbd_setkeycode(sc,kc) (-EINVAL)
+#define kbd_getkeycode(sc) (-EINVAL)
+
+/* Prototype: int kbd_pretranslate(scancode, raw_mode)
+ * Returns : 0 to ignore scancode
+ */
+#define kbd_pretranslate(sc,rm) (1)
+
+/* Prototype: int kbd_translate(scancode, *keycode, *up_flag, raw_mode)
+ * Returns : 0 to ignore scancode, *keycode set to keycode, *up_flag
+ * set to 0200 if scancode indicates release
+ */
+#define kbd_translate(sc, kcp, rm) 0
+#define kbd_unexpected_up(kc) (0200)
+#define kbd_leds(leds) do { } while (0)
+#define kbd_init_hw() do { } while (0)
+#define kbd_disable_irq() do { } while (0)
+#define kbd_enable_irq() do { } while (0)
diff --git a/include/asm-arm/arch-tbox/memory.h b/include/asm-arm/arch-tbox/memory.h
new file mode 100644
index 000000000..e066821f2
--- /dev/null
+++ b/include/asm-arm/arch-tbox/memory.h
@@ -0,0 +1,38 @@
+/*
+ * linux/include/asm-arm/arch-tbox/memory.h
+ *
+ * Copyright (c) 1996-1999 Russell King.
+ * Copyright (c) 1998-1999 Phil Blundell
+ */
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
+
+/*
+ * Task size: 3GB
+ */
+#define TASK_SIZE (0xc0000000UL)
+#define TASK_SIZE_26 (0x04000000UL)
+
+/*
+ * Page offset: 3GB
+ */
+#define PAGE_OFFSET (0xc0000000UL)
+#define PHYS_OFFSET (0x80000000UL)
+
+/*
+ * DRAM is contiguous
+ */
+#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
+#define __virt_to_phys__is_a_macro
+#define __phys_to_virt__is_a_macro
+
+/*
+ * Bus view is the same as physical view
+ */
+#define __virt_to_bus__is_a_macro
+#define __virt_to_bus(x) __virt_to_phys(x)
+#define __bus_to_virt__is_a_macro
+#define __bus_to_virt(x) __phys_to_virt(x)
+
+#endif
diff --git a/include/asm-arm/arch-tbox/param.h b/include/asm-arm/arch-tbox/param.h
new file mode 100644
index 000000000..5e9139c0e
--- /dev/null
+++ b/include/asm-arm/arch-tbox/param.h
@@ -0,0 +1 @@
+#define HZ 1000
diff --git a/include/asm-arm/arch-tbox/processor.h b/include/asm-arm/arch-tbox/processor.h
new file mode 100644
index 000000000..0f8e7129b
--- /dev/null
+++ b/include/asm-arm/arch-tbox/processor.h
@@ -0,0 +1,24 @@
+/*
+ * linux/include/asm-arm/arch-tbox/processor.h
+ * from linux/include/asm-arm/arch-ebsa110/processor.h
+ *
+ * Copyright (C) 1996,1997,1998 Russell King
+ */
+
+#ifndef __ASM_ARCH_PROCESSOR_H
+#define __ASM_ARCH_PROCESSOR_H
+
+/*
+ * Bus types
+ */
+#define EISA_bus 0
+#define EISA_bus__is_a_macro /* for versions in ksyms.c */
+#define MCA_bus 0
+#define MCA_bus__is_a_macro /* for versions in ksyms.c */
+
+/* This decides where the kernel will search for a free chunk of vm
+ * space during mmap's.
+ */
+#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+
+#endif
diff --git a/include/asm-arm/arch-tbox/serial.h b/include/asm-arm/arch-tbox/serial.h
new file mode 100644
index 000000000..abb7ecbeb
--- /dev/null
+++ b/include/asm-arm/arch-tbox/serial.h
@@ -0,0 +1,34 @@
+/*
+ * linux/include/asm-arm/arch-tbox/serial.h
+ *
+ * Copyright (c) 1996 Russell King.
+ * Copyright (c) 1998 Phil Blundell
+ *
+ * Changelog:
+ * 15-10-1996 RMK Created
+ * 09-06-1998 PJB tbox version
+ */
+#ifndef __ASM_ARCH_SERIAL_H
+#define __ASM_ARCH_SERIAL_H
+
+/*
+ * This assumes you have a 1.8432 MHz clock for your UART.
+ *
+ * It'd be nice if someone built a serial card with a 24.576 MHz
+ * clock, since the 16550A is capable of handling a top speed of 1.5
+ * megabits/second; but this requires the faster clock.
+ */
+#define BASE_BAUD (1843200 / 16)
+
+#define RS_TABLE_SIZE 2
+
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+
+ /* UART CLK PORT IRQ FLAGS */
+#define STD_SERIAL_PORT_DEFNS \
+ { 0, BASE_BAUD, 0xffff4000 >> 2, 6, STD_COM_FLAGS }, /* ttyS0 */ \
+ { 0, BASE_BAUD, 0xffff5000 >> 2, 7, STD_COM_FLAGS }, /* ttyS1 */
+
+#define EXTRA_SERIAL_PORT_DEFNS
+
+#endif
diff --git a/include/asm-arm/arch-tbox/system.h b/include/asm-arm/arch-tbox/system.h
new file mode 100644
index 000000000..e52bb50fd
--- /dev/null
+++ b/include/asm-arm/arch-tbox/system.h
@@ -0,0 +1,33 @@
+/*
+ * linux/include/asm-arm/arch-tbox/system.h
+ *
+ * Copyright (c) 1996-1999 Russell King.
+ */
+#ifndef __ASM_ARCH_SYSTEM_H
+#define __ASM_ARCH_SYSTEM_H
+
+static void arch_idle(void)
+{
+ unsigned long start_idle;
+
+ start_idle = jiffies;
+
+ do {
+ if (current->need_resched || hlt_counter)
+ goto slow_out;
+ cpu_do_idle(IDLE_WAIT_FAST);
+ } while (time_before(jiffies, start_idle + HZ/50));
+
+ cpu_do_idle(IDLE_CLOCK_SLOW);
+
+ while (!current->need_resched && !hlt_counter) {
+ cpu_do_idle(IDLE_WAIT_SLOW);
+ }
+
+ cpu_do_idle(IDLE_CLOCK_FAST);
+slow_out:
+}
+
+#define arch_reset(mode) do { } while (0)
+
+#endif
diff --git a/include/asm-arm/arch-tbox/time.h b/include/asm-arm/arch-tbox/time.h
new file mode 100644
index 000000000..87e92abb6
--- /dev/null
+++ b/include/asm-arm/arch-tbox/time.h
@@ -0,0 +1,36 @@
+/*
+ * linux/include/asm-arm/arch-tbox/time.h
+ *
+ * Copyright (c) 1997, 1999 Phil Blundell.
+ * Copyright (c) 2000 FutureTV Labs Ltd
+ *
+ * Tbox has no real-time clock -- we get millisecond ticks to update
+ * our soft copy.
+ */
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+
+#define update_rtc()
+
+static void timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
+{
+ /* Clear irq */
+ __raw_writel(1, FPGA1CONT + 0xc);
+ __raw_writel(0, FPGA1CONT + 0xc);
+
+ do_timer(regs);
+}
+
+extern __inline__ void setup_timer (void)
+{
+ /*
+ * Default the date to 1 Jan 1970 0:0:0
+ * You will have to run a time daemon to set the
+ * clock correctly at bootup
+ */
+ xtime.tv_sec = mktime(1970, 1, 1, 0, 0, 0);
+
+ timer_irq.handler = timer_interrupt;
+ setup_arm_irq(IRQ_TIMER, &timer_irq);
+}
diff --git a/include/asm-arm/arch-tbox/timex.h b/include/asm-arm/arch-tbox/timex.h
new file mode 100644
index 000000000..c5489cd66
--- /dev/null
+++ b/include/asm-arm/arch-tbox/timex.h
@@ -0,0 +1,8 @@
+/*
+ * linux/include/asm-arm/arch-tbox/timex.h
+ *
+ * Tbox timex specifications
+ *
+ * Copyright (C) 1999 Philip Blundell
+ */
+
diff --git a/include/asm-arm/arch-tbox/uncompress.h b/include/asm-arm/arch-tbox/uncompress.h
new file mode 100644
index 000000000..17a5034e7
--- /dev/null
+++ b/include/asm-arm/arch-tbox/uncompress.h
@@ -0,0 +1,42 @@
+/*
+ * linux/include/asm-arm/arch-nexuspci/uncompress.h
+ * from linux/include/asm-arm/arch-ebsa110/uncompress.h
+ *
+ * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1998, 1999 Phil Blundell
+ */
+
+#include <asm/io.h>
+
+#define UARTBASE 0x00400000
+
+/*
+ * This does not append a newline
+ */
+static void puts(const char *s)
+{
+ while (*s)
+ {
+ char c = *(s++);
+ while (!(__raw_readb(UARTBASE + 0x14) & 0x20));
+ __raw_writeb(c, UARTBASE);
+ if (c == 10) {
+ while (!(__raw_readb(UARTBASE + 0x14) & 0x20));
+ __raw_writeb(13, UARTBASE);
+ }
+ }
+}
+
+/*
+ * nothing to do
+ */
+#define arch_decomp_setup()
+
+/*
+ * Stroke the watchdog so we don't get reset during decompression.
+ */
+#define arch_decomp_wdog() \
+ do { \
+ __raw_writel(1, 0xa00000); \
+ __raw_writel(0, 0xa00000); \
+ } while (0)
diff --git a/include/asm-arm/arch-tbox/vmalloc.h b/include/asm-arm/arch-tbox/vmalloc.h
new file mode 100644
index 000000000..31fe3e777
--- /dev/null
+++ b/include/asm-arm/arch-tbox/vmalloc.h
@@ -0,0 +1,17 @@
+/*
+ * linux/include/asm-arm/arch-rpc/vmalloc.h
+ */
+
+/*
+ * Just any arbitrary offset to the start of the vmalloc VM area: the
+ * current 8MB value just means that there will be a 8MB "hole" after the
+ * physical memory until the kernel virtual memory starts. That means that
+ * any out-of-bounds memory accesses will hopefully be caught.
+ * The vmalloc() routines leaves a hole of 4kB between each vmalloced
+ * area for the same reason. ;)
+ */
+#define VMALLOC_OFFSET (8*1024*1024)
+#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
+
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
index 94fd17170..0907316dd 100644
--- a/include/asm-arm/atomic.h
+++ b/include/asm-arm/atomic.h
@@ -1,13 +1,17 @@
/*
- * linux/include/asm-arm/atomic.h
+ * linux/include/asm-arm/atomic.h
*
- * Copyright (c) 1996 Russell King.
+ * Copyright (c) 1996 Russell King.
*
- * Changelog:
- * 27-06-1996 RMK Created
- * 13-04-1997 RMK Made functions atomic!
- * 07-12-1997 RMK Upgraded for v2.1.
- * 26-08-1998 PJB Added #ifdef __KERNEL__
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 27-06-1996 RMK Created
+ * 13-04-1997 RMK Made functions atomic!
+ * 07-12-1997 RMK Upgraded for v2.1.
+ * 26-08-1998 PJB Added #ifdef __KERNEL__
*/
#ifndef __ASM_ARM_ATOMIC_H
#define __ASM_ARM_ATOMIC_H
diff --git a/include/asm-arm/bugs.h b/include/asm-arm/bugs.h
index 637d89c1b..2f7b33b10 100644
--- a/include/asm-arm/bugs.h
+++ b/include/asm-arm/bugs.h
@@ -1,7 +1,11 @@
/*
- * include/asm-arm/bugs.h
+ * linux/include/asm-arm/bugs.h
*
* Copyright (C) 1995 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_BUGS_H
#define __ASM_BUGS_H
diff --git a/include/asm-arm/cache.h b/include/asm-arm/cache.h
index d5bb17841..a56ffb7c2 100644
--- a/include/asm-arm/cache.h
+++ b/include/asm-arm/cache.h
@@ -1,5 +1,5 @@
/*
- * linux/include/asm-arm/cache.h
+ * linux/include/asm-arm/cache.h
*/
#ifndef __ASMARM_CACHE_H
#define __ASMARM_CACHE_H
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h
index b91f5e7f4..0090141fa 100644
--- a/include/asm-arm/checksum.h
+++ b/include/asm-arm/checksum.h
@@ -1,5 +1,5 @@
/*
- * linux/include/asm-arm/checksum.h
+ * linux/include/asm-arm/checksum.h
*
* IP checksum routines
*
diff --git a/include/asm-arm/cpu-multi26.h b/include/asm-arm/cpu-multi26.h
index 50639037d..62b8c77ed 100644
--- a/include/asm-arm/cpu-multi26.h
+++ b/include/asm-arm/cpu-multi26.h
@@ -1,3 +1,12 @@
+/*
+ * linux/include/asm-arm/cpu-multi26.h
+ *
+ * Copyright (C) 2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
#ifndef __ASSEMBLY__
#include <asm/page.h>
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h
index b8a5b58f8..7f07bc8e5 100644
--- a/include/asm-arm/cpu-multi32.h
+++ b/include/asm-arm/cpu-multi32.h
@@ -1,3 +1,12 @@
+/*
+ * linux/include/asm-arm/cpu-multi32.h
+ *
+ * Copyright (C) 2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
#ifndef __ASSEMBLY__
#include <asm/page.h>
@@ -27,79 +36,91 @@ extern struct processor {
*/
void (*_proc_fin)(void);
/*
- * Processor architecture specific
- */
- /* CACHE
- *
- * flush all caches
- */
- void (*_flush_cache_all)(void);
- /*
- * flush a specific page or pages
- */
- void (*_flush_cache_area)(unsigned long address, unsigned long end, int flags);
- /*
- * flush cache entry for an address
- */
- void (*_flush_cache_entry)(unsigned long address);
- /*
- * clean a virtual address range from the
- * D-cache without flushing the cache.
- */
- void (*_clean_cache_area)(unsigned long start, unsigned long size);
- /*
- * flush a page to RAM
- */
- void (*_flush_ram_page)(unsigned long page);
- /* TLB
- *
- * flush all TLBs
- */
- void (*_flush_tlb_all)(void);
- /*
- * flush a specific TLB
- */
- void (*_flush_tlb_area)(unsigned long address, unsigned long end, int flags);
- /*
- * Set the page table
- */
- void (*_set_pgd)(unsigned long pgd_phys);
- /*
- * Set a PMD (handling IMP bit 4)
- */
- void (*_set_pmd)(pmd_t *pmdp, pmd_t pmd);
- /*
- * Set a PTE
- */
- void (*_set_pte)(pte_t *ptep, pte_t pte);
- /*
* Special stuff for a reset
*/
volatile void (*reset)(unsigned long addr);
/*
- * flush an icached page
- */
- void (*_flush_icache_area)(unsigned long start, unsigned long size);
- /*
- * write back dirty cached data
- */
- void (*_cache_wback_area)(unsigned long start, unsigned long end);
- /*
- * purge cached data without (necessarily) writing it back
- */
- void (*_cache_purge_area)(unsigned long start, unsigned long end);
- /*
- * flush a specific TLB
- */
- void (*_flush_tlb_page)(unsigned long address, int flags);
- /*
* Idle the processor
*/
int (*_do_idle)(int mode);
/*
- * flush I cache for a page
+ * Processor architecture specific
*/
- void (*_flush_icache_page)(unsigned long address);
+ struct { /* CACHE */
+ /*
+ * flush all caches
+ */
+ void (*clean_invalidate_all)(void);
+ /*
+ * flush a specific page or pages
+ */
+ void (*clean_invalidate_range)(unsigned long address, unsigned long end, int flags);
+ /*
+ * flush a page to RAM
+ */
+ void (*_flush_ram_page)(void *virt_page);
+ } cache;
+
+ struct { /* D-cache */
+ /*
+ * invalidate the specified data range
+ */
+ void (*invalidate_range)(unsigned long start, unsigned long end);
+ /*
+ * clean specified data range
+ */
+ void (*clean_range)(unsigned long start, unsigned long end);
+ /*
+ * obsolete flush cache entry
+ */
+ void (*clean_page)(void *virt_page);
+ /*
+ * clean a virtual address range from the
+ * D-cache without flushing the cache.
+ */
+ void (*clean_entry)(unsigned long start);
+ } dcache;
+
+ struct { /* I-cache */
+ /*
+ * invalidate the I-cache for the specified range
+ */
+ void (*invalidate_range)(unsigned long start, unsigned long end);
+ /*
+ * invalidate the I-cache for the specified virtual page
+ */
+ void (*invalidate_page)(void *virt_page);
+ } icache;
+
+ struct { /* TLB */
+ /*
+ * flush all TLBs
+ */
+ void (*invalidate_all)(void);
+ /*
+ * flush a specific TLB
+ */
+ void (*invalidate_range)(unsigned long address, unsigned long end);
+ /*
+ * flush a specific TLB
+ */
+ void (*invalidate_page)(unsigned long address, int flags);
+ } tlb;
+
+ struct { /* PageTable */
+ /*
+ * Set the page table
+ */
+ void (*set_pgd)(unsigned long pgd_phys);
+ /*
+ * Set a PMD (handling IMP bit 4)
+ */
+ void (*set_pmd)(pmd_t *pmdp, pmd_t pmd);
+ /*
+ * Set a PTE
+ */
+ void (*set_pte)(pte_t *ptep, pte_t pte);
+ } pgtable;
} processor;
extern const struct processor arm6_processor_functions;
@@ -110,24 +131,28 @@ extern const struct processor sa110_processor_functions;
#define cpu_check_bugs() processor._check_bugs()
#define cpu_proc_init() processor._proc_init()
#define cpu_proc_fin() processor._proc_fin()
+#define cpu_reset(addr) processor.reset(addr)
#define cpu_do_idle(mode) processor._do_idle(mode)
-#define cpu_flush_cache_all() processor._flush_cache_all()
-#define cpu_flush_cache_area(start,end,flags) processor._flush_cache_area(start,end,flags)
-#define cpu_flush_cache_entry(addr) processor._flush_cache_entry(addr)
-#define cpu_clean_cache_area(start,size) processor._clean_cache_area(start,size)
-#define cpu_flush_ram_page(page) processor._flush_ram_page(page)
-#define cpu_flush_tlb_all() processor._flush_tlb_all()
-#define cpu_flush_tlb_area(start,end,flags) processor._flush_tlb_area(start,end,flags)
-#define cpu_flush_tlb_page(addr,flags) processor._flush_tlb_page(addr,flags)
-#define cpu_set_pgd(pgd) processor._set_pgd(pgd)
-#define cpu_set_pmd(pmdp, pmd) processor._set_pmd(pmdp, pmd)
-#define cpu_set_pte(ptep, pte) processor._set_pte(ptep, pte)
-#define cpu_reset(addr) processor.reset(addr)
-#define cpu_flush_icache_area(start,end) processor._flush_icache_area(start,end)
-#define cpu_cache_wback_area(start,end) processor._cache_wback_area(start,end)
-#define cpu_cache_purge_area(start,end) processor._cache_purge_area(start,end)
-#define cpu_flush_icache_page(virt) processor._flush_icache_page(virt)
+#define cpu_cache_clean_invalidate_all() processor.cache.clean_invalidate_all()
+#define cpu_cache_clean_invalidate_range(s,e,f) processor.cache.clean_invalidate_range(s,e,f)
+#define cpu_flush_ram_page(vp) processor.cache._flush_ram_page(vp)
+
+#define cpu_dcache_clean_page(vp) processor.dcache.clean_page(vp)
+#define cpu_dcache_clean_entry(addr) processor.dcache.clean_entry(addr)
+#define cpu_dcache_clean_range(s,e) processor.dcache.clean_range(s,e)
+#define cpu_dcache_invalidate_range(s,e) processor.dcache.invalidate_range(s,e)
+
+#define cpu_icache_invalidate_range(s,e) processor.icache.invalidate_range(s,e)
+#define cpu_icache_invalidate_page(vp) processor.icache.invalidate_page(vp)
+
+#define cpu_tlb_invalidate_all() processor.tlb.invalidate_all()
+#define cpu_tlb_invalidate_range(s,e) processor.tlb.invalidate_range(s,e)
+#define cpu_tlb_invalidate_page(vp,f) processor.tlb.invalidate_page(vp,f)
+
+#define cpu_set_pgd(pgd) processor.pgtable.set_pgd(pgd)
+#define cpu_set_pmd(pmdp, pmd) processor.pgtable.set_pmd(pmdp, pmd)
+#define cpu_set_pte(ptep, pte) processor.pgtable.set_pte(ptep, pte)
#define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))
diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h
index 6a4c256f2..476115883 100644
--- a/include/asm-arm/cpu-single.h
+++ b/include/asm-arm/cpu-single.h
@@ -1,4 +1,13 @@
/*
+ * linux/include/asm-arm/cpu-single.h
+ *
+ * Copyright (C) 2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/*
* Single CPU
*/
#ifdef __STDC__
@@ -9,33 +18,36 @@
#define cpu_fn(name,x) __cpu_fn(name,x)
/*
- * If we are supporting multiple CPUs, then
- * we must use a table of function pointers
- * for this lot. Otherwise, we can optimise
- * the table away.
+ * If we are supporting multiple CPUs, then we must use a table of
+ * function pointers for this lot. Otherwise, we can optimise the
+ * table away.
*/
#define cpu_data_abort cpu_fn(CPU_NAME,_data_abort)
#define cpu_check_bugs cpu_fn(CPU_NAME,_check_bugs)
#define cpu_proc_init cpu_fn(CPU_NAME,_proc_init)
#define cpu_proc_fin cpu_fn(CPU_NAME,_proc_fin)
+#define cpu_reset cpu_fn(CPU_NAME,_reset)
#define cpu_do_idle cpu_fn(CPU_NAME,_do_idle)
-#define cpu_flush_cache_all cpu_fn(CPU_NAME,_flush_cache_all)
-#define cpu_flush_cache_area cpu_fn(CPU_NAME,_flush_cache_area)
-#define cpu_flush_cache_entry cpu_fn(CPU_NAME,_flush_cache_entry)
-#define cpu_clean_cache_area cpu_fn(CPU_NAME,_clean_cache_area)
+#define cpu_cache_clean_invalidate_all cpu_fn(CPU_NAME,_cache_clean_invalidate_all)
+#define cpu_cache_clean_invalidate_range cpu_fn(CPU_NAME,_cache_clean_invalidate_range)
#define cpu_flush_ram_page cpu_fn(CPU_NAME,_flush_ram_page)
-#define cpu_flush_tlb_all cpu_fn(CPU_NAME,_flush_tlb_all)
-#define cpu_flush_tlb_area cpu_fn(CPU_NAME,_flush_tlb_area)
-#define cpu_flush_tlb_page cpu_fn(CPU_NAME,_flush_tlb_page)
+
+#define cpu_dcache_invalidate_range cpu_fn(CPU_NAME,_dcache_invalidate_range)
+#define cpu_dcache_clean_range cpu_fn(CPU_NAME,_dcache_clean_range)
+#define cpu_dcache_clean_page cpu_fn(CPU_NAME,_dcache_clean_page)
+#define cpu_dcache_clean_entry cpu_fn(CPU_NAME,_dcache_clean_entry)
+
+#define cpu_icache_invalidate_range cpu_fn(CPU_NAME,_icache_invalidate_range)
+#define cpu_icache_invalidate_page cpu_fn(CPU_NAME,_icache_invalidate_page)
+
+#define cpu_tlb_invalidate_all cpu_fn(CPU_NAME,_tlb_invalidate_all)
+#define cpu_tlb_invalidate_range cpu_fn(CPU_NAME,_tlb_invalidate_range)
+#define cpu_tlb_invalidate_page cpu_fn(CPU_NAME,_tlb_invalidate_page)
+
#define cpu_set_pgd cpu_fn(CPU_NAME,_set_pgd)
#define cpu_set_pmd cpu_fn(CPU_NAME,_set_pmd)
#define cpu_set_pte cpu_fn(CPU_NAME,_set_pte)
-#define cpu_reset cpu_fn(CPU_NAME,_reset)
-#define cpu_flush_icache_area cpu_fn(CPU_NAME,_flush_icache_area)
-#define cpu_cache_wback_area cpu_fn(CPU_NAME,_cache_wback_area)
-#define cpu_cache_purge_area cpu_fn(CPU_NAME,_cache_purge_area)
-#define cpu_flush_icache_page cpu_fn(CPU_NAME,_flush_icache_page)
#ifndef __ASSEMBLY__
@@ -51,22 +63,26 @@ extern void cpu_proc_init(void);
extern void cpu_proc_fin(void);
extern int cpu_do_idle(int mode);
-extern void cpu_flush_cache_all(void);
-extern void cpu_flush_cache_area(unsigned long address, unsigned long end, int flags);
-extern void cpu_flush_cache_entry(unsigned long address);
-extern void cpu_clean_cache_area(unsigned long start, unsigned long size);
-extern void cpu_flush_ram_page(unsigned long page);
-extern void cpu_flush_tlb_all(void);
-extern void cpu_flush_tlb_area(unsigned long address, unsigned long end, int flags);
-extern void cpu_flush_tlb_page(unsigned long address, int flags);
+extern void cpu_cache_clean_invalidate_all(void);
+extern void cpu_cache_clean_invalidate_range(unsigned long address, unsigned long end, int flags);
+extern void cpu_flush_ram_page(void *virt_page);
+
+extern void cpu_dcache_invalidate_range(unsigned long start, unsigned long end);
+extern void cpu_dcache_clean_range(unsigned long start, unsigned long end);
+extern void cpu_dcache_clean_page(void *virt_page);
+extern void cpu_dcache_clean_entry(unsigned long address);
+
+extern void cpu_icache_invalidate_range(unsigned long start, unsigned long end);
+extern void cpu_icache_invalidate_page(void *virt_page);
+
+extern void cpu_tlb_invalidate_all(void);
+extern void cpu_tlb_invalidate_range(unsigned long address, unsigned long end);
+extern void cpu_tlb_invalidate_page(unsigned long address, int flags);
+
extern void cpu_set_pgd(unsigned long pgd_phys);
extern void cpu_set_pmd(pmd_t *pmdp, pmd_t pmd);
extern void cpu_set_pte(pte_t *ptep, pte_t pte);
extern volatile void cpu_reset(unsigned long addr);
-extern void cpu_flush_icache_area(unsigned long start, unsigned long size);
-extern void cpu_cache_wback_area(unsigned long start, unsigned long end);
-extern void cpu_cache_purge_area(unsigned long start, unsigned long end);
-extern void cpu_flush_icache_page(unsigned long virt);
#define cpu_switch_mm(pgd,tsk) cpu_set_pgd(__virt_to_phys((unsigned long)(pgd)))
diff --git a/include/asm-arm/current.h b/include/asm-arm/current.h
index b2b83ebb7..3a06c2a8a 100644
--- a/include/asm-arm/current.h
+++ b/include/asm-arm/current.h
@@ -1,30 +1,16 @@
#ifndef _ASMARM_CURRENT_H
#define _ASMARM_CURRENT_H
-static inline unsigned long get_sp(void)
-{
- unsigned long sp;
- __asm__ ("mov %0,sp" : "=r" (sp));
- return sp;
-}
-
/* Old compilers seem to generate bad code if we allow `current' to be
non volatile. */
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 90)
static inline struct task_struct *get_current(void) __attribute__ (( __const__ ));
-#define __VOLATILE_CURRENT
-#else
-#define __VOLATILE_CURRENT volatile
#endif
static inline struct task_struct *get_current(void)
{
- struct task_struct *ts;
- __asm__ __VOLATILE_CURRENT (
- "bic %0, sp, #0x1f00 @ get_current
- bic %0, %0, #0x00ff"
- : "=r" (ts));
- return ts;
+ register unsigned long sp asm ("sp");
+ return (struct task_struct *)(sp & ~0x1fff);
}
#define current (get_current())
diff --git a/include/asm-arm/dma.h b/include/asm-arm/dma.h
index 78c65b599..dc23c66dd 100644
--- a/include/asm-arm/dma.h
+++ b/include/asm-arm/dma.h
@@ -7,6 +7,7 @@ typedef unsigned int dmach_t;
#include <linux/spinlock.h>
#include <asm/system.h>
#include <asm/memory.h>
+#include <asm/scatterlist.h>
#include <asm/arch/dma.h>
/*
@@ -21,11 +22,6 @@ typedef unsigned int dmamode_t;
#define DMA_MODE_CASCADE 2
#define DMA_AUTOINIT 4
-typedef struct {
- unsigned long address;
- unsigned long length;
-} dmasg_t;
-
extern spinlock_t dma_spin_lock;
extern __inline__ unsigned long claim_dma_lock(void)
@@ -84,7 +80,7 @@ extern void disable_dma(dmach_t channel);
* especially since some DMA architectures don't update the
* DMA address immediately, but defer it to the enable_dma().
*/
-extern void set_dma_sg(dmach_t channel, dmasg_t *sg, int nr_sg);
+extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg);
/* Set the DMA address for this channel
*
diff --git a/include/asm-arm/fcntl.h b/include/asm-arm/fcntl.h
index b05970217..da2861ca3 100644
--- a/include/asm-arm/fcntl.h
+++ b/include/asm-arm/fcntl.h
@@ -51,6 +51,9 @@
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
+/* for leases */
+#define F_INPROGRESS 16
+
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
@@ -58,6 +61,11 @@
blocking */
#define LOCK_UN 8 /* remove lock */
+#define LOCK_MAND 32 /* This is a mandatory flock */
+#define LOCK_READ 64 /* ... Which allows concurrent read operations */
+#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */
+#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */
+
struct flock {
short l_type;
short l_whence;
@@ -74,4 +82,5 @@ struct flock64 {
pid_t l_pid;
};
+#define F_LINUX_SPECIFIC_BASE 1024
#endif
diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h
index 05a94a2e6..1083b95a2 100644
--- a/include/asm-arm/floppy.h
+++ b/include/asm-arm/floppy.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/floppy.h
+ * linux/include/asm-arm/floppy.h
*
- * (C) 1996-2000 Russell King
+ * Copyright (C) 1996-2000 Russell King
*
- * Note that we don't touch FLOPPY_DMA nor FLOPPY_IRQ here
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Note that we don't touch FLOPPY_DMA nor FLOPPY_IRQ here
*/
#ifndef __ASM_ARM_FLOPPY_H
#define __ASM_ARM_FLOPPY_H
diff --git a/include/asm-arm/hardware.h b/include/asm-arm/hardware.h
index 594552e84..4ded5b8f0 100644
--- a/include/asm-arm/hardware.h
+++ b/include/asm-arm/hardware.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/hardware.h
+ * linux/include/asm-arm/hardware.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * Common hardware definitions
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Common hardware definitions
*/
#ifndef __ASM_HARDWARE_H
diff --git a/include/asm-arm/dec21285.h b/include/asm-arm/hardware/dec21285.h
index dd49f6416..9049f0dda 100644
--- a/include/asm-arm/dec21285.h
+++ b/include/asm-arm/hardware/dec21285.h
@@ -1,9 +1,13 @@
/*
- * include/asm-arm/dec21285.h
+ * linux/include/asm-arm/hardware/dec21285.h
*
- * Copyright (C) 1998 Russell King
+ * Copyright (C) 1998 Russell King
*
- * DC21285 registers
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * DC21285 registers
*/
#define DC21285_PCI_IACK 0x79000000
#define DC21285_ARMCSR_BASE 0x42000000
diff --git a/include/asm-arm/ioc.h b/include/asm-arm/hardware/ioc.h
index 68286872b..fe65d7742 100644
--- a/include/asm-arm/ioc.h
+++ b/include/asm-arm/hardware/ioc.h
@@ -1,6 +1,14 @@
/*
- * Use these macros to read/write the IOC. All it does is perform the actual
- * read/write.
+ * linux/include/asm-arm/hardware/ioc.h
+ *
+ * Copyright (C) Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Use these macros to read/write the IOC. All it does is perform the actual
+ * read/write.
*/
#ifndef IOC_CONTROL
diff --git a/include/asm-arm/iomd.h b/include/asm-arm/hardware/iomd.h
index 3a1e09dfe..7145b89fd 100644
--- a/include/asm-arm/iomd.h
+++ b/include/asm-arm/hardware/iomd.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/iomd.h
+ * linux/include/asm-arm/iomd.h
*
- * Copyright (C) 1999 Russell King
+ * Copyright (C) 1999 Russell King
*
- * This file contains information out the IOMD ASIC used in the
- * Acorn RiscPC and subsequently integrated into the CLPS7500 chips.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This file contains information out the IOMD ASIC used in the
+ * Acorn RiscPC and subsequently integrated into the CLPS7500 chips.
*/
#include <linux/config.h>
diff --git a/include/asm-arm/memc.h b/include/asm-arm/hardware/memc.h
index 66873dc9e..8aef5aa0e 100644
--- a/include/asm-arm/memc.h
+++ b/include/asm-arm/hardware/memc.h
@@ -1,3 +1,12 @@
+/*
+ * linux/include/asm-arm/hardware/memc.h
+ *
+ * Copyright (C) Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
#define VDMA_ALIGNMENT PAGE_SIZE
#define VDMA_XFERSIZE 16
#define VDMA_INIT 0
diff --git a/include/asm-arm/hardware/pci_v3.h b/include/asm-arm/hardware/pci_v3.h
new file mode 100644
index 000000000..e64cebdd9
--- /dev/null
+++ b/include/asm-arm/hardware/pci_v3.h
@@ -0,0 +1,148 @@
+/*
+ * linux/include/asm-arm/hardware/pci_v3.h
+ *
+ * Internal header file PCI V3 chip
+ *
+ * Copyright (C) ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef ASM_ARM_HARDWARE_PCI_V3_H
+#define ASM_ARM_HARDWARE_PCI_V3_H
+
+/* -------------------------------------------------------------------------------
+ * V3 Local Bus to PCI Bridge definitions
+ * -------------------------------------------------------------------------------
+ * Registers (these are taken from page 129 of the EPC User's Manual Rev 1.04
+ * All V3 register names are prefaced by V3_ to avoid clashing with any other
+ * PCI definitions. Their names match the user's manual.
+ *
+ * I'm assuming that I20 is disabled.
+ *
+ */
+#define V3_PCI_VENDOR 0x00000000
+#define V3_PCI_DEVICE 0x00000002
+#define V3_PCI_CMD 0x00000004
+#define V3_PCI_STAT 0x00000006
+#define V3_PCI_CC_REV 0x00000008
+#define V3_PCI_HDR_CFG 0x0000000C
+#define V3_PCI_IO_BASE 0x00000010
+#define V3_PCI_BASE0 0x00000014
+#define V3_PCI_BASE1 0x00000018
+#define V3_PCI_SUB_VENDOR 0x0000002C
+#define V3_PCI_SUB_ID 0x0000002E
+#define V3_PCI_ROM 0x00000030
+#define V3_PCI_BPARAM 0x0000003C
+#define V3_PCI_MAP0 0x00000040
+#define V3_PCI_MAP1 0x00000044
+#define V3_PCI_INT_STAT 0x00000048
+#define V3_PCI_INT_CFG 0x0000004C
+#define V3_LB_BASE0 0x00000054
+#define V3_LB_BASE1 0x00000058
+#define V3_LB_MAP0 0x0000005E
+#define V3_LB_MAP1 0x00000062
+#define V3_LB_BASE2 0x00000064
+#define V3_LB_MAP2 0x00000066
+#define V3_LB_SIZE 0x00000068
+#define V3_LB_IO_BASE 0x0000006E
+#define V3_FIFO_CFG 0x00000070
+#define V3_FIFO_PRIORITY 0x00000072
+#define V3_FIFO_STAT 0x00000074
+#define V3_LB_ISTAT 0x00000076
+#define V3_LB_IMASK 0x00000077
+#define V3_SYSTEM 0x00000078
+#define V3_LB_CFG 0x0000007A
+#define V3_PCI_CFG 0x0000007C
+#define V3_DMA_PCI_ADR0 0x00000080
+#define V3_DMA_PCI_ADR1 0x00000090
+#define V3_DMA_LOCAL_ADR0 0x00000084
+#define V3_DMA_LOCAL_ADR1 0x00000094
+#define V3_DMA_LENGTH0 0x00000088
+#define V3_DMA_LENGTH1 0x00000098
+#define V3_DMA_CSR0 0x0000008B
+#define V3_DMA_CSR1 0x0000009B
+#define V3_DMA_CTLB_ADR0 0x0000008C
+#define V3_DMA_CTLB_ADR1 0x0000009C
+#define V3_DMA_DELAY 0x000000E0
+#define V3_MAIL_DATA 0x000000C0
+#define V3_PCI_MAIL_IEWR 0x000000D0
+#define V3_PCI_MAIL_IERD 0x000000D2
+#define V3_LB_MAIL_IEWR 0x000000D4
+#define V3_LB_MAIL_IERD 0x000000D6
+#define V3_MAIL_WR_STAT 0x000000D8
+#define V3_MAIL_RD_STAT 0x000000DA
+#define V3_QBA_MAP 0x000000DC
+
+/* PCI COMMAND REGISTER bits
+ */
+#define V3_COMMAND_M_FBB_EN BIT9
+#define V3_COMMAND_M_SERR_EN BIT8
+#define V3_COMMAND_M_PAR_EN BIT6
+#define V3_COMMAND_M_MASTER_EN BIT2
+#define V3_COMMAND_M_MEM_EN BIT1
+#define V3_COMMAND_M_IO_EN BIT0
+
+/* SYSTEM REGISTER bits
+ */
+#define V3_SYSTEM_M_RST_OUT BIT15
+#define V3_SYSTEM_M_LOCK BIT14
+
+/* PCI_CFG bits
+ */
+#define V3_PCI_CFG_M_RETRY_EN BIT10
+#define V3_PCI_CFG_M_AD_LOW1 BIT9
+#define V3_PCI_CFG_M_AD_LOW0 BIT8
+
+/* PCI_BASE register bits (PCI -> Local Bus)
+ */
+#define V3_PCI_BASE_M_ADR_BASE 0xFFF00000
+#define V3_PCI_BASE_M_ADR_BASEL 0x000FFF00
+#define V3_PCI_BASE_M_PREFETCH BIT3
+#define V3_PCI_BASE_M_TYPE BIT2+BIT1
+#define V3_PCI_BASE_M_IO BIT0
+
+/* PCI MAP register bits (PCI -> Local bus)
+ */
+#define V3_PCI_MAP_M_MAP_ADR 0xFFF00000
+#define V3_PCI_MAP_M_RD_POST_INH BIT15
+#define V3_PCI_MAP_M_ROM_SIZE BIT11+BIT10
+#define V3_PCI_MAP_M_SWAP BIT9+BIT8
+#define V3_PCI_MAP_M_ADR_SIZE 0x000000F0
+#define V3_PCI_MAP_M_REG_EN BIT1
+#define V3_PCI_MAP_M_ENABLE BIT0
+
+/* 9 => 512M window size
+ */
+#define V3_PCI_MAP_M_ADR_SIZE_512M 0x00000090
+/* A => 1024M window size
+ */
+#define V3_PCI_MAP_M_ADR_SIZE_1024M 0x000000A0
+
+/* LB_BASE register bits (Local bus -> PCI)
+ */
+#define V3_LB_BASE_M_MAP_ADR 0xFFF00000
+#define V3_LB_BASE_M_SWAP BIT9+BIT8
+#define V3_LB_BASE_M_ADR_SIZE 0x000000F0
+#define V3_LB_BASE_M_PREFETCH BIT3
+#define V3_LB_BASE_M_ENABLE BIT0
+
+/* LB_MAP register bits (Local bus -> PCI)
+ */
+#define V3_LB_MAP_M_MAP_ADR 0xFFF0
+#define V3_LB_MAP_M_TYPE 0x000E
+#define V3_LB_MAP_M_AD_LOW_EN BIT0
+
+#endif
diff --git a/include/asm-arm/hardware/serial_amba.h b/include/asm-arm/hardware/serial_amba.h
new file mode 100644
index 000000000..15bfbb98d
--- /dev/null
+++ b/include/asm-arm/hardware/serial_amba.h
@@ -0,0 +1,91 @@
+/*
+ * linux/include/asm-arm/hardware/serial_amba.h
+ *
+ * Internal header file for AMBA serial ports
+ *
+ * Copyright (C) ARM Limited
+ * Copyright (C) 2000 Deep Blue Solutions Ltd.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef ASM_ARM_HARDWARE_SERIAL_AMBA_H
+#define ASM_ARM_HARDWARE_SERIAL_AMBA_H
+
+/* -------------------------------------------------------------------------------
+ * From AMBA UART (PL010) Block Specification (ARM-0001-CUST-DSPC-A03)
+ * -------------------------------------------------------------------------------
+ * UART Register Offsets.
+ */
+#define AMBA_UARTDR 0x00 /* Data read or written from the interface. */
+#define AMBA_UARTRSR 0x04 /* Receive status register (Read). */
+#define AMBA_UARTECR 0x04 /* Error clear register (Write). */
+#define AMBA_UARTLCR_H 0x08 /* Line control register, high byte. */
+#define AMBA_UARTLCR_M 0x0C /* Line control register, middle byte. */
+#define AMBA_UARTLCR_L 0x10 /* Line control register, low byte. */
+#define AMBA_UARTCR 0x14 /* Control register. */
+#define AMBA_UARTFR 0x18 /* Flag register (Read only). */
+#define AMBA_UARTIIR 0x1C /* Interrupt indentification register (Read). */
+#define AMBA_UARTICR 0x1C /* Interrupt clear register (Write). */
+#define AMBA_UARTILPR 0x20 /* IrDA low power counter register. */
+
+#define AMBA_UARTRSR_OE 0x08
+#define AMBA_UARTRSR_BE 0x04
+#define AMBA_UARTRSR_PE 0x02
+#define AMBA_UARTRSR_FE 0x01
+
+#define AMBA_UARTFR_TXFF 0x20
+#define AMBA_UARTFR_RXFE 0x10
+#define AMBA_UARTFR_BUSY 0x08
+#define AMBA_UARTFR_DCD 0x04
+#define AMBA_UARTFR_DSR 0x02
+#define AMBA_UARTFR_CTS 0x01
+#define AMBA_UARTFR_TMSK (AMBA_UARTFR_TXFF + AMBA_UARTFR_BUSY)
+
+#define AMBA_UARTCR_RTIE 0x40
+#define AMBA_UARTCR_TIE 0x20
+#define AMBA_UARTCR_RIE 0x10
+#define AMBA_UARTCR_MSIE 0x08
+#define AMBA_UARTCR_IIRLP 0x04
+#define AMBA_UARTCR_SIREN 0x02
+#define AMBA_UARTCR_UARTEN 0x01
+
+#define AMBA_UARTLCR_H_WLEN_8 0x60
+#define AMBA_UARTLCR_H_WLEN_7 0x40
+#define AMBA_UARTLCR_H_WLEN_6 0x20
+#define AMBA_UARTLCR_H_WLEN_5 0x00
+#define AMBA_UARTLCR_H_FEN 0x10
+#define AMBA_UARTLCR_H_STP2 0x08
+#define AMBA_UARTLCR_H_EPS 0x04
+#define AMBA_UARTLCR_H_PEN 0x02
+#define AMBA_UARTLCR_H_BRK 0x01
+
+#define AMBA_UARTIIR_RTIS 0x08
+#define AMBA_UARTIIR_TIS 0x04
+#define AMBA_UARTIIR_RIS 0x02
+#define AMBA_UARTIIR_MIS 0x01
+
+#define ARM_BAUD_460800 1
+#define ARM_BAUD_230400 3
+#define ARM_BAUD_115200 7
+#define ARM_BAUD_57600 15
+#define ARM_BAUD_38400 23
+#define ARM_BAUD_19200 47
+#define ARM_BAUD_14400 63
+#define ARM_BAUD_9600 95
+#define ARM_BAUD_4800 191
+#define ARM_BAUD_2400 383
+#define ARM_BAUD_1200 767
+
+#endif
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index fad9e7412..707aa9788 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/io.h
+ * linux/include/asm-arm/io.h
*
- * Copyright (C) 1996-2000 Russell King
+ * Copyright (C) 1996-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
* Modifications:
* 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both
@@ -19,7 +23,6 @@
#include <linux/types.h>
#include <asm/arch/hardware.h>
#include <asm/arch/io.h>
-#include <asm/proc/io.h>
#define outb_p(val,port) outb((val),(port))
#define outw_p(val,port) outw((val),(port))
diff --git a/include/asm-arm/keyboard.h b/include/asm-arm/keyboard.h
index 9514b470a..7d256af70 100644
--- a/include/asm-arm/keyboard.h
+++ b/include/asm-arm/keyboard.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/keyboard.h
+ * linux/include/asm-arm/keyboard.h
*
- * Keyboard driver definitions for ARM
+ * Copyright (C) 1998 Russell King
*
- * (C) 1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Keyboard driver definitions for ARM
*/
#ifndef __ASM_ARM_KEYBOARD_H
#define __ASM_ARM_KEYBOARD_H
diff --git a/include/asm-arm/leds.h b/include/asm-arm/leds.h
index 7eebdb1c2..598b5086c 100644
--- a/include/asm-arm/leds.h
+++ b/include/asm-arm/leds.h
@@ -1,11 +1,14 @@
/*
- * include/asm-arm/leds.h
+ * linux/include/asm-arm/leds.h
*
- * Copyright (C) 1998 Russell King
+ * Copyright (C) 1998 Russell King
*
- * Event-driven interface for LEDs on machines
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
- * Added led_start and led_stop- Alex Holden, 28th Dec 1998.
+ * Event-driven interface for LEDs on machines
+ * Added led_start and led_stop- Alex Holden, 28th Dec 1998.
*/
#ifndef ASM_ARM_LEDS_H
#define ASM_ARM_LEDS_H
diff --git a/include/asm-arm/linux_logo.h b/include/asm-arm/linux_logo.h
index 35ee86403..ba0bc304d 100644
--- a/include/asm-arm/linux_logo.h
+++ b/include/asm-arm/linux_logo.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/linux_logo.h
+ * linux/include/asm-arm/linux_logo.h
*
- * Copyright (C) 1998 Russell King
+ * Copyright (C) 1998 Russell King
*
- * Linux console driver logo definitions for ARM
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Linux console driver logo definitions for ARM
*/
#include <linux/init.h>
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h
new file mode 100644
index 000000000..f5297ecf1
--- /dev/null
+++ b/include/asm-arm/mach/arch.h
@@ -0,0 +1,88 @@
+/*
+ * linux/include/asm-arm/mach/arch.h
+ *
+ * Copyright (C) 2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * The size of struct machine_desc
+ * (for assembler code)
+ */
+#define SIZEOF_MACHINE_DESC 44
+
+#ifndef __ASSEMBLY__
+
+struct machine_desc {
+ /*
+ * Note! The first four elements are used
+ * by assembler code in head-armv.S
+ */
+ unsigned int nr; /* architecture number */
+ unsigned int phys_ram; /* start of physical ram */
+ unsigned int phys_io; /* start of physical io */
+ unsigned int virt_io; /* start of virtual io */
+
+ const char *name; /* architecture name */
+ unsigned int param_offset; /* parameter page */
+
+ unsigned int video_start; /* start of video RAM */
+ unsigned int video_end; /* end of video RAM */
+
+ unsigned int reserve_lp0 :1; /* never has lp0 */
+ unsigned int reserve_lp1 :1; /* never has lp1 */
+ unsigned int reserve_lp2 :1; /* never has lp2 */
+ unsigned int broken_hlt :1; /* hlt is broken */
+ unsigned int soft_reboot :1; /* soft reboot */
+ void (*fixup)(struct machine_desc *,
+ struct param_struct *, char **,
+ struct meminfo *);
+ void (*map_io)(void);/* IO mapping function */
+};
+
+/*
+ * Set of macros to define architecture features. This is built into
+ * a table by the linker.
+ */
+#define MACHINE_START(_type,_name) \
+const struct machine_desc __mach_desc_##_type \
+ __attribute__((__section__(".arch.info"))) = { \
+ nr: MACH_TYPE_##_type##, \
+ name: _name,
+
+#define MAINTAINER(n)
+
+#define BOOT_MEM(_pram,_pio,_vio) \
+ phys_ram: _pram, \
+ phys_io: _pio, \
+ virt_io: _vio,
+
+#define BOOT_PARAMS(_params) \
+ param_offset: _params,
+
+#define VIDEO(_start,_end) \
+ video_start: _start, \
+ video_end: _end,
+
+#define DISABLE_PARPORT(_n) \
+ reserve_lp##_n##: 1,
+
+#define BROKEN_HLT \
+ broken_hlt: 1,
+
+#define SOFT_REBOOT \
+ soft_reboot: 1,
+
+#define FIXUP(_func) \
+ fixup: _func,
+
+#define MAPIO(_func) \
+ map_io: _func,
+
+#define MACHINE_END \
+};
+
+#endif
diff --git a/include/asm-arm/mach/dma.h b/include/asm-arm/mach/dma.h
new file mode 100644
index 000000000..d48d94a1d
--- /dev/null
+++ b/include/asm-arm/mach/dma.h
@@ -0,0 +1,55 @@
+/*
+ * linux/include/asm-arm/mach/dma.h
+ *
+ * Copyright (C) 1998-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This header file describes the interface between the generic DMA handler
+ * (dma.c) and the architecture-specific DMA backends (dma-*.c)
+ */
+
+struct dma_struct;
+typedef struct dma_struct dma_t;
+
+struct dma_ops {
+ int (*request)(dmach_t, dma_t *); /* optional */
+ void (*free)(dmach_t, dma_t *); /* optional */
+ void (*enable)(dmach_t, dma_t *); /* mandatory */
+ void (*disable)(dmach_t, dma_t *); /* mandatory */
+ int (*residue)(dmach_t, dma_t *); /* optional */
+ int (*setspeed)(dmach_t, dma_t *, int); /* optional */
+ char *type;
+};
+
+struct dma_struct {
+ struct scatterlist buf; /* single DMA */
+ int sgcount; /* number of DMA SG */
+ struct scatterlist *sg; /* DMA Scatter-Gather List */
+
+ unsigned int active:1; /* Transfer active */
+ unsigned int invalid:1; /* Address/Count changed */
+ unsigned int using_sg:1; /* using scatter list? */
+ dmamode_t dma_mode; /* DMA mode */
+ int speed; /* DMA speed */
+
+ unsigned int lock; /* Device is allocated */
+ const char *device_id; /* Device name */
+
+ unsigned int dma_base; /* Controller base address */
+ int dma_irq; /* Controller IRQ */
+ int state; /* Controller state */
+ struct scatterlist cur_sg; /* Current controller buffer */
+
+ struct dma_ops *d_ops;
+};
+
+/* Prototype: void arch_dma_init(dma)
+ * Purpose : Initialise architecture specific DMA
+ * Params : dma - pointer to array of DMA structures
+ */
+extern void arch_dma_init(dma_t *dma);
+
+extern void isa_init_dma(dma_t *dma);
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h
new file mode 100644
index 000000000..51fef86d2
--- /dev/null
+++ b/include/asm-arm/mach/map.h
@@ -0,0 +1,32 @@
+/*
+ * linux/include/asm-arm/map.h
+ *
+ * Copyright (C) 1999-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Page table mapping constructs and function prototypes
+ */
+struct map_desc {
+ unsigned long virtual;
+ unsigned long physical;
+ unsigned long length;
+ int domain:4,
+ prot_read:1,
+ prot_write:1,
+ cacheable:1,
+ bufferable:1,
+ last:1;
+};
+
+#define LAST_DESC \
+ { last: 1 }
+
+struct meminfo;
+
+extern void create_memmap_holes(struct meminfo *);
+extern void memtable_init(struct meminfo *);
+extern void iotable_init(struct map_desc *);
+extern void setup_io_desc(void);
diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h
new file mode 100644
index 000000000..7f118bc75
--- /dev/null
+++ b/include/asm-arm/mach/pci.h
@@ -0,0 +1,42 @@
+/*
+ * linux/include/asm-arm/mach/pci.h
+ *
+ * Copyright (C) 2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#define MAX_NR_BUS 2
+
+struct arm_bus_sysdata {
+ /*
+ * bitmask of features we can turn.
+ * See PCI command register for more info.
+ */
+ u16 features;
+ /*
+ * Maximum devsel for this bus.
+ */
+ u16 maxdevsel;
+ /*
+ * The maximum latency that devices on this
+ * bus can withstand.
+ */
+ u8 max_lat;
+};
+
+struct arm_pci_sysdata {
+ struct arm_bus_sysdata bus[MAX_NR_BUS];
+};
+
+struct hw_pci {
+ void (*init)(struct arm_pci_sysdata *);
+ u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
+ int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin);
+};
+
+extern u8 no_swizzle(struct pci_dev *dev, u8 *pin);
+
+void __init dc21285_init(struct arm_pci_sysdata *);
+void __init plx90x0_init(struct arm_pci_sysdata *);
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index 837ea199a..f2e0d2be9 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -1,11 +1,15 @@
/*
- * linux/include/asm-arm/memory.h
+ * linux/include/asm-arm/memory.h
*
- * Copyright (C) 2000 Russell King
+ * Copyright (C) 2000 Russell King
*
- * Note: this file should not be included by non-asm/.h files
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
- * Modifications:
+ * Note: this file should not be included by non-asm/.h files
+ *
+ * Modifications:
*/
#ifndef __ASM_ARM_MEMORY_H
#define __ASM_ARM_MEMORY_H
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h
index f358628a9..6aad02f46 100644
--- a/include/asm-arm/mmu_context.h
+++ b/include/asm-arm/mmu_context.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/mmu_context.h
+ * linux/include/asm-arm/mmu_context.h
*
- * Copyright (c) 1996 Russell King.
+ * Copyright (C) 1996 Russell King.
*
- * Changelog:
- * 27-06-1996 RMK Created
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 27-06-1996 RMK Created
*/
#ifndef __ASM_ARM_MMU_CONTEXT_H
#define __ASM_ARM_MMU_CONTEXT_H
@@ -17,9 +21,19 @@
#define destroy_context(mm) do { } while(0)
#define init_new_context(tsk,mm) 0
+/*
+ * This is called when "tsk" is about to enter lazy TLB mode.
+ *
+ * mm: describes the currently active mm context
+ * tsk: task which is entering lazy tlb
+ * cpu: cpu number which is entering lazy tlb
+ *
+ * tsk->mm will be NULL
+ */
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
{
}
+
/*
* This is the actual mm switch as far as the scheduler
* is concerned. No registers are touched.
diff --git a/include/asm-arm/mmzone.h b/include/asm-arm/mmzone.h
index 97ddd9718..a8b0977c3 100644
--- a/include/asm-arm/mmzone.h
+++ b/include/asm-arm/mmzone.h
@@ -1,9 +1,12 @@
/*
- * linux/include/asm-arm/mmzone.h
+ * linux/include/asm-arm/mmzone.h
*
- * 1999-12-29 Nicolas Pitre Created
+ * 1999-12-29 Nicolas Pitre Created
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#ifndef __ASM_MMZONE_H
#define __ASM_MMZONE_H
diff --git a/include/asm-arm/param.h b/include/asm-arm/param.h
index 0e944f375..992a9d6a5 100644
--- a/include/asm-arm/param.h
+++ b/include/asm-arm/param.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/param.h
+ * linux/include/asm-arm/param.h
*
- * Copyright (C) 1995-1999 Russell King
+ * Copyright (C) 1995-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PARAM_H
#define __ASM_PARAM_H
diff --git a/include/asm-arm/parport.h b/include/asm-arm/parport.h
index bab49ad3a..f2f90c76d 100644
--- a/include/asm-arm/parport.h
+++ b/include/asm-arm/parport.h
@@ -1,7 +1,7 @@
/*
- * parport.h: ARM-specific parport initialisation
+ * linux/include/asm-arm/parport.h: ARM-specific parport initialisation
*
- * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
*
* This file should only be included by drivers/parport/parport_pc.c.
*/
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
index 2a2fcc947..63c1ee9cf 100644
--- a/include/asm-arm/pci.h
+++ b/include/asm-arm/pci.h
@@ -93,8 +93,10 @@ pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int directi
{
int i;
- for (i = 0; i < nents; i++, sg++)
+ for (i = 0; i < nents; i++, sg++) {
consistent_sync(sg->address, sg->length, direction);
+ sg->dma_address = virt_to_bus(sg->address);
+ }
return nents;
}
@@ -136,7 +138,7 @@ pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int d
int i;
for (i = 0; i < nelems; i++, sg++)
- consistent_sync(sg->address, sg->length, 3);
+ consistent_sync(sg->address, sg->length, direction);
}
/* Return whether the given PCI device DMA address mask can
@@ -149,15 +151,6 @@ extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
return 1;
}
-/* These macros should be used after a pci_map_sg call has been done
- * to get bus addresses of each of the SG entries and their lengths.
- * You should only work with the number of sg entries pci_map_sg
- * returns, or alternatively stop on the first sg_dma_len(sg) which
- * is 0.
- */
-#define sg_dma_address(sg) (virt_to_bus((sg)->address))
-#define sg_dma_len(sg) ((sg)->length)
-
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h
index a16a0d54c..280009ecf 100644
--- a/include/asm-arm/pgalloc.h
+++ b/include/asm-arm/pgalloc.h
@@ -1,5 +1,11 @@
/*
- * linux/include/asm-arm/pgalloc.h
+ * linux/include/asm-arm/pgalloc.h
+ *
+ * Copyright (C) 2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef _ASMARM_PGALLOC_H
#define _ASMARM_PGALLOC_H
@@ -13,11 +19,10 @@
*/
#include <asm/proc/cache.h>
-extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm,
- unsigned long start,
- unsigned long end)
-{
-}
+/*
+ * ARM processors do not cache TLB tables in RAM.
+ */
+#define flush_tlb_pgtables(mm,start,end) do { } while (0)
/*
* Page table cache stuff
@@ -50,7 +55,7 @@ extern __inline__ pgd_t *get_pgd_fast(void)
if ((ret = pgd_quicklist) != NULL) {
pgd_quicklist = (unsigned long *)__pgd_next(ret);
ret[1] = ret[2];
- clean_cache_area(ret + 1, 4);
+ clean_dcache_entry(ret + 1);
pgtable_cache_size--;
}
return (pgd_t *)ret;
@@ -77,7 +82,7 @@ extern __inline__ pte_t *get_pte_fast(void)
if((ret = pte_quicklist) != NULL) {
pte_quicklist = (unsigned long *)__pte_next(ret);
ret[0] = ret[1];
- clean_cache_area(ret, 4);
+ clean_dcache_entry(ret);
pgtable_cache_size--;
}
return (pte_t *)ret;
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index 65b39ad72..a18b26035 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -1,5 +1,11 @@
/*
- * linux/include/asm-arm/pgtable.h
+ * linux/include/asm-arm/pgtable.h
+ *
+ * Copyright (C) 2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef _ASMARM_PGTABLE_H
#define _ASMARM_PGTABLE_H
@@ -88,7 +94,7 @@ extern void __handle_bad_pmd_kernel(pmd_t *pmd);
* which, if __va and __pa are expensive causes twice the expense for
* zero gain. --rmk
*/
-#define pte_page(x) (mem_map + MAP_NR(__va(pte_val((x)))))
+#define pte_page(x) (virt_to_page(__va(pte_val((x)))))
#endif
#define pmd_none(pmd) (!pmd_val(pmd))
@@ -173,6 +179,10 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
#define module_map vmalloc
#define module_unmap vfree
+/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
+/* FIXME: this is not correct */
+#define kern_addr_valid(addr) (1)
+
#define io_remap_page_range remap_page_range
#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-arm/posix_types.h b/include/asm-arm/posix_types.h
index 8ad590dd4..c412486db 100644
--- a/include/asm-arm/posix_types.h
+++ b/include/asm-arm/posix_types.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/posix_types.h
+ * linux/include/asm-arm/posix_types.h
*
- * Copyright (c) 1996-1998 Russell King.
+ * Copyright (C) 1996-1998 Russell King.
*
- * Changelog:
- * 27-06-1996 RMK Created
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 27-06-1996 RMK Created
*/
#ifndef __ARCH_ARM_POSIX_TYPES_H
#define __ARCH_ARM_POSIX_TYPES_H
diff --git a/include/asm-arm/proc-armo/assembler.h b/include/asm-arm/proc-armo/assembler.h
index 42b23aa89..7f6bd57cb 100644
--- a/include/asm-arm/proc-armo/assembler.h
+++ b/include/asm-arm/proc-armo/assembler.h
@@ -1,10 +1,14 @@
/*
- * linux/asm-arm/proc-armo/assembler.h
+ * linux/asm-arm/proc-armo/assembler.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * This file contains arm architecture specific defines
- * for the different processors
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This file contains arm architecture specific defines
+ * for the different processors
*/
#define MODE_USR USR26_MODE
#define MODE_FIQ FIQ26_MODE
@@ -78,3 +82,25 @@
.macro restore_irqs, oldcpsr
@ This be restore_irqs
.endm
+
+/*
+ * These two are used to save LR/restore PC over a user-based access.
+ * The old 26-bit architecture requires that we do. On 32-bit
+ * architecture, we can safely ignore this requirement.
+ */
+ .macro save_lr
+ str lr, [sp, #-4]!
+ .endm
+
+ .macro restore_pc
+ ldmfd sp!, {pc}^
+ .endm
+
+#define USER(x...) \
+9999: x; \
+ .section __ex_table,"a"; \
+ .align 3; \
+ .long 9999b,9001f; \
+ .previous
+
+
diff --git a/include/asm-arm/proc-armo/cache.h b/include/asm-arm/proc-armo/cache.h
index ca99bcf82..5331a13ce 100644
--- a/include/asm-arm/proc-armo/cache.h
+++ b/include/asm-arm/proc-armo/cache.h
@@ -1,14 +1,29 @@
/*
- * Cache flushing...
+ * linux/include/asm-arm/proc-armo/cache.h
+ *
+ * Copyright (C) 1999-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Cache handling for 26-bit ARM processors.
*/
#define flush_cache_all() do { } while (0)
#define flush_cache_mm(mm) do { } while (0)
#define flush_cache_range(mm,start,end) do { } while (0)
#define flush_cache_page(vma,vmaddr) do { } while (0)
#define flush_page_to_ram(page) do { } while (0)
+
+#define invalidate_dcache_range(start,end) do { } while (0)
+#define clean_dcache_range(start,end) do { } while (0)
+#define flush_dcache_range(start,end) do { } while (0)
#define flush_dcache_page(page) do { } while (0)
-#define flush_icache_page(vma,page) do { } while (0)
+#define clean_dcache_entry(_s) do { } while (0)
+#define clean_cache_entry(_start) do { } while (0)
+
#define flush_icache_range(start,end) do { } while (0)
+#define flush_icache_page(vma,page) do { } while (0)
/* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */
#define clean_cache_area(_start,_size) do { } while (0)
@@ -67,6 +82,3 @@ memc_clear(struct mm_struct *mm, struct page *page)
if (mm == current->active_mm)
processor._set_pgd(mm->pgd);
}
-
-#define __flush_entry_to_ram(entry)
-
diff --git a/include/asm-arm/proc-armo/io.h b/include/asm-arm/proc-armo/io.h
deleted file mode 100644
index 84143003e..000000000
--- a/include/asm-arm/proc-armo/io.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * linux/include/asm-arm/proc-armo/io.h
- */
-
-/* Nothing to do */
-#define dma_cache_inv(_start,_size) do { } while (0)
-#define dma_cache_wback(_start,_size) do { } while (0)
-#define dma_cache_wback_inv(_start,_size) do { } while (0)
diff --git a/include/asm-arm/proc-armo/locks.h b/include/asm-arm/proc-armo/locks.h
index fcf0cab01..cbbb5f54e 100644
--- a/include/asm-arm/proc-armo/locks.h
+++ b/include/asm-arm/proc-armo/locks.h
@@ -1,11 +1,14 @@
/*
- * linux/include/asm-arm/proc-armo/locks.h
+ * linux/include/asm-arm/proc-armo/locks.h
*
- * Copyright (C) 2000 Russell King
- * Fixes for 26 bit machines, (C) 2000 Dave Gilbert
+ * Copyright (C) 2000 Russell King
+ * Fixes for 26 bit machines, (C) 2000 Dave Gilbert
*
- * Interrupt safe locking assembler.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*
+ * Interrupt safe locking assembler.
*/
#ifndef __ASM_PROC_LOCKS_H
#define __ASM_PROC_LOCKS_H
@@ -15,20 +18,20 @@
({ \
__asm__ __volatile__ ( \
"@ atomic down operation\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" subs lr, lr, #1\n" \
" str lr, [%0]\n" \
-" orrmi r0, r0, #0x80000000 @ set N\n" \
-" teqp r0, #0\n" \
-" movmi r0, %0\n" \
+" orrmi ip, ip, #0x80000000 @ set N\n" \
+" teqp ip, #0\n" \
+" movmi ip, %0\n" \
" blmi " SYMBOL_NAME_STR(fail) \
: \
: "r" (ptr) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#define __down_op_ret(ptr,fail) \
@@ -36,22 +39,22 @@
unsigned int result; \
__asm__ __volatile__ ( \
" @ down_op_ret\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
" ldr lr, [%1]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" subs lr, lr, #1\n" \
" str lr, [%1]\n" \
-" orrmi r0, r0, #0x80000000 @ set N\n" \
-" teqp r0, #0\n" \
-" movmi r0, %1\n" \
-" movpl r0, #0\n" \
+" orrmi ip, ip, #0x80000000 @ set N\n" \
+" teqp ip, #0\n" \
+" movmi ip, %1\n" \
+" movpl ip, #0\n" \
" blmi " SYMBOL_NAME_STR(fail) "\n" \
-" mov %0, r0" \
+" mov %0, ip" \
: "=&r" (result) \
: "r" (ptr) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
result; \
})
@@ -59,20 +62,20 @@
({ \
__asm__ __volatile__ ( \
"@ up_op\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" adds lr, lr, #1\n" \
" str lr, [%0]\n" \
-" orrle r0, r0, #0x80000000 @ set N - should this be mi ??? DAG ! \n" \
-" teqp r0, #0\n" \
-" movmi r0, %0\n" \
+" orrle ip, ip, #0x80000000 @ set N - should this be mi ??? DAG ! \n" \
+" teqp ip, #0\n" \
+" movmi ip, %0\n" \
" blmi " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
/*
@@ -89,22 +92,22 @@
({ \
__asm__ __volatile__( \
"@ down_op_write\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
\
" ldr lr, [%0]\n" \
" subs lr, lr, %1\n" \
" str lr, [%0]\n" \
\
-" orreq r0, r0, #0x40000000 @ set Z \n"\
-" teqp r0, #0\n" \
-" movne r0, %0\n" \
+" orreq ip, ip, #0x40000000 @ set Z \n"\
+" teqp ip, #0\n" \
+" movne ip, %0\n" \
" blne " SYMBOL_NAME_STR(fail) \
: \
: "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
/* Increments by RW_LOCK_BIAS, wakes if value >= 0 */
@@ -112,22 +115,22 @@
({ \
__asm__ __volatile__( \
"@ up_op_read\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
\
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" adds lr, lr, %1\n" \
" str lr, [%0]\n" \
\
-" orrcs r0, r0, #0x20000000 @ set C\n" \
-" teqp r0, #0\n" \
-" movcs r0, %0\n" \
+" orrcs ip, ip, #0x20000000 @ set C\n" \
+" teqp ip, #0\n" \
+" movcs ip, %0\n" \
" blcs " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#define __down_op_read(ptr,fail) \
@@ -137,22 +140,22 @@
({ \
__asm__ __volatile__( \
"@ up_op_read\n" \
-" mov r0, pc\n" \
-" orr lr, r0, #0x08000000\n" \
+" mov ip, pc\n" \
+" orr lr, ip, #0x08000000\n" \
" teqp lr, #0\n" \
\
" ldr lr, [%0]\n" \
-" and r0, r0, #0x0c000003\n" \
+" and ip, ip, #0x0c000003\n" \
" adds lr, lr, %1\n" \
" str lr, [%0]\n" \
\
-" orreq r0, r0, #0x40000000 @ Set Z \n" \
-" teqp r0, #0\n" \
-" moveq r0, %0\n" \
+" orreq ip, ip, #0x40000000 @ Set Z \n" \
+" teqp ip, #0\n" \
+" moveq ip, %0\n" \
" bleq " SYMBOL_NAME_STR(wake) \
: \
: "r" (ptr), "I" (1) \
- : "r0", "lr", "cc"); \
+ : "ip", "lr", "cc"); \
})
#endif
diff --git a/include/asm-arm/proc-armo/page.h b/include/asm-arm/proc-armo/page.h
index dd3331994..b1abf388e 100644
--- a/include/asm-arm/proc-armo/page.h
+++ b/include/asm-arm/proc-armo/page.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/page.h
+ * linux/include/asm-arm/proc-armo/page.h
*
- * Copyright (C) 1995, 1996 Russell King
+ * Copyright (C) 1995, 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROC_PAGE_H
#define __ASM_PROC_PAGE_H
diff --git a/include/asm-arm/proc-armo/pgtable.h b/include/asm-arm/proc-armo/pgtable.h
index 56456e0e1..12dc2cee0 100644
--- a/include/asm-arm/proc-armo/pgtable.h
+++ b/include/asm-arm/proc-armo/pgtable.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/proc-armo/pgtable.h
+ * linux/include/asm-arm/proc-armo/pgtable.h
*
- * Copyright (C) 1995-1999 Russell King
+ * Copyright (C) 1995-1999 Russell King
*
- * 18-Oct-1997 RMK Now two-level (32x32)
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 18-Oct-1997 RMK Now two-level (32x32)
*/
#ifndef __ASM_PROC_PGTABLE_H
#define __ASM_PROC_PGTABLE_H
diff --git a/include/asm-arm/proc-armo/processor.h b/include/asm-arm/proc-armo/processor.h
index 6562ee712..581236378 100644
--- a/include/asm-arm/proc-armo/processor.h
+++ b/include/asm-arm/proc-armo/processor.h
@@ -1,16 +1,20 @@
/*
- * linux/include/asm-arm/proc-armo/processor.h
+ * linux/include/asm-arm/proc-armo/processor.h
*
- * Copyright (c) 1996 Russell King.
+ * Copyright (C) 1996 Russell King.
*
- * Changelog:
- * 27-06-1996 RMK Created
- * 10-10-1996 RMK Brought up to date with SA110
- * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*'
- * 28-09-1996 RMK Moved start_thread into the processor dependencies
- * 11-01-1998 RMK Added new uaccess_t
- * 09-09-1998 PJB Delete redundant `wp_works_ok'
- * 30-05-1999 PJB Save sl across context switches
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 27-06-1996 RMK Created
+ * 10-10-1996 RMK Brought up to date with SA110
+ * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*'
+ * 28-09-1996 RMK Moved start_thread into the processor dependencies
+ * 11-01-1998 RMK Added new uaccess_t
+ * 09-09-1998 PJB Delete redundant `wp_works_ok'
+ * 30-05-1999 PJB Save sl across context switches
*/
#ifndef __ASM_PROC_PROCESSOR_H
#define __ASM_PROC_PROCESSOR_H
diff --git a/include/asm-arm/proc-armo/ptrace.h b/include/asm-arm/proc-armo/ptrace.h
index 9bf506501..287f258c1 100644
--- a/include/asm-arm/proc-armo/ptrace.h
+++ b/include/asm-arm/proc-armo/ptrace.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/ptrace.h
+ * linux/include/asm-arm/proc-armo/ptrace.h
*
- * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1996-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROC_PTRACE_H
#define __ASM_PROC_PTRACE_H
@@ -54,6 +58,8 @@ struct pt_regs {
#define user_mode(regs) \
(processor_mode(regs) == USR26_MODE)
+#define thumb_mode(regs) (0)
+
#define interrupts_enabled(regs) \
(!((regs)->ARM_pc & I_BIT))
diff --git a/include/asm-arm/proc-armo/shmparam.h b/include/asm-arm/proc-armo/shmparam.h
index e85eadb3f..6b106f141 100644
--- a/include/asm-arm/proc-armo/shmparam.h
+++ b/include/asm-arm/proc-armo/shmparam.h
@@ -1,11 +1,14 @@
/*
- * linux/include/asm-arm/proc-armo/shmparam.h
+ * linux/include/asm-arm/proc-armo/shmparam.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * definitions for the shared process memory on the ARM3
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * definitions for the shared process memory on the ARM3
*/
-
#ifndef __ASM_PROC_SHMPARAM_H
#define __ASM_PROC_SHMPARAM_H
diff --git a/include/asm-arm/proc-armo/system.h b/include/asm-arm/proc-armo/system.h
index 42a6bc70a..1ba35108c 100644
--- a/include/asm-arm/proc-armo/system.h
+++ b/include/asm-arm/proc-armo/system.h
@@ -1,9 +1,12 @@
/*
- * linux/include/asm-arm/proc-armo/system.h
+ * linux/include/asm-arm/proc-armo/system.h
*
- * Copyright (C) 1995, 1996 Russell King
+ * Copyright (C) 1995, 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#ifndef __ASM_PROC_SYSTEM_H
#define __ASM_PROC_SYSTEM_H
diff --git a/include/asm-arm/proc-armo/uaccess.h b/include/asm-arm/proc-armo/uaccess.h
index 7e1a62c5e..d3e733d87 100644
--- a/include/asm-arm/proc-armo/uaccess.h
+++ b/include/asm-arm/proc-armo/uaccess.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/segment.h
+ * linux/include/asm-arm/proc-armo/segment.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
/*
diff --git a/include/asm-arm/proc-armo/uncompress.h b/include/asm-arm/proc-armo/uncompress.h
index b4edb06f7..26a8747d2 100644
--- a/include/asm-arm/proc-armo/uncompress.h
+++ b/include/asm-arm/proc-armo/uncompress.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armo/uncompress.h
+ * linux/include/asm-arm/proc-armo/uncompress.h
*
- * (c) 1997 Russell King
+ * Copyright (C) 1997 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#define proc_decomp_setup()
diff --git a/include/asm-arm/proc-armv/assembler.h b/include/asm-arm/proc-armv/assembler.h
index aaec7f9c7..6881898f5 100644
--- a/include/asm-arm/proc-armv/assembler.h
+++ b/include/asm-arm/proc-armv/assembler.h
@@ -1,10 +1,14 @@
/*
- * linux/asm-arm/proc-armv/assembler.h
+ * linux/asm-arm/proc-armv/assembler.h
*
- * Copyright (C) 1996-2000 Russell King
+ * Copyright (C) 1996-2000 Russell King
*
- * This file contains ARM processor specifics for
- * the ARM6 and better processors.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This file contains ARM processor specifics for
+ * the ARM6 and better processors.
*/
#define MODE_USR USR_MODE
#define MODE_FIQ FIQ_MODE
@@ -47,3 +51,24 @@
.macro restore_irqs, oldcpsr
msr cpsr_c, \oldcpsr
.endm
+
+/*
+ * These two are used to save LR/restore PC over a user-based access.
+ * The old 26-bit architecture requires that we do. On 32-bit
+ * architecture, we can safely ignore this requirement.
+ */
+ .macro save_lr
+ .endm
+
+ .macro restore_pc
+ mov pc, lr
+ .endm
+
+#define USER(x...) \
+9999: x; \
+ .section __ex_table,"a"; \
+ .align 3; \
+ .long 9999b,9001f; \
+ .previous
+
+
diff --git a/include/asm-arm/proc-armv/cache.h b/include/asm-arm/proc-armv/cache.h
index dbdc10f6b..806856347 100644
--- a/include/asm-arm/proc-armv/cache.h
+++ b/include/asm-arm/proc-armv/cache.h
@@ -1,57 +1,98 @@
+/*
+ * linux/include/asm-arm/proc-armv/cache.h
+ *
+ * Copyright (C) 1999-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
#include <asm/mman.h>
/*
- * Cache flushing...
+ * Cache handling for 32-bit ARM processors.
+ *
+ * Note that on ARM, we have a more accurate specification than that
+ * Linux's "flush". We therefore do not use "flush" here, but instead
+ * use:
+ *
+ * clean: the act of pushing dirty cache entries out to memory.
+ * invalidate: the act of discarding data held within the cache,
+ * whether it is dirty or not.
+ */
+
+/*
+ * Generic I + D cache
*/
#define flush_cache_all() \
- cpu_flush_cache_all()
+ do { \
+ cpu_cache_clean_invalidate_all(); \
+ } while (0)
+/* This is always called for current->mm */
#define flush_cache_mm(_mm) \
do { \
- if ((_mm) == current->mm) \
- cpu_flush_cache_all(); \
+ if ((_mm) == current->active_mm) \
+ cpu_cache_clean_invalidate_all(); \
} while (0)
#define flush_cache_range(_mm,_start,_end) \
do { \
if ((_mm) == current->mm) \
- cpu_flush_cache_area((_start), (_end), 1); \
+ cpu_cache_clean_invalidate_range((_start), (_end), 1); \
} while (0)
#define flush_cache_page(_vma,_vmaddr) \
do { \
- if ((_vma)->vm_mm == current->mm) \
- cpu_flush_cache_area((_vmaddr), \
+ if ((_vma)->vm_mm == current->mm) { \
+ cpu_cache_clean_invalidate_range((_vmaddr), \
(_vmaddr) + PAGE_SIZE, \
((_vma)->vm_flags & VM_EXEC)); \
+ } \
} while (0)
-#define clean_cache_range(_start,_end) \
- do { \
- unsigned long _s, _sz; \
- _s = (unsigned long)_start; \
- _sz = (unsigned long)_end - _s; \
- cpu_clean_cache_area(_s, _sz); \
- } while (0)
+/*
+ * This flushes back any buffered write data. We have to clean the entries
+ * in the cache for this page. This does not invalidate either I or D caches.
+ */
+static __inline__ void flush_page_to_ram(struct page *page)
+{
+ cpu_flush_ram_page(page_address(page));
+}
+
+/*
+ * D cache only
+ */
+
+#define invalidate_dcache_range(_s,_e) cpu_dcache_invalidate_range((_s),(_e))
+#define clean_dcache_range(_s,_e) cpu_dcache_clean_range((_s),(_e))
+#define flush_dcache_range(_s,_e) cpu_cache_clean_invalidate_range((_s),(_e),0)
+
+/*
+ * FIXME: We currently clean the dcache for this page. Should we
+ * also invalidate the Dcache? And what about the Icache? -- rmk
+ */
+#define flush_dcache_page(page) cpu_dcache_clean_page(page_address(page))
+
+#define clean_dcache_entry(_s) cpu_dcache_clean_entry((unsigned long)(_s))
-#define clean_cache_area(_start,_size) \
+/*
+ * I cache only
+ */
+#define flush_icache_range(_s,_e) \
do { \
- unsigned long _s; \
- _s = (unsigned long)_start; \
- cpu_clean_cache_area(_s, _size); \
+ cpu_icache_invalidate_range((_s), (_e)); \
} while (0)
-#define flush_icache_range(_start,_end) \
- cpu_flush_icache_area((_start), (_end) - (_start))
-
#define flush_icache_page(vma,pg) \
do { \
if ((vma)->vm_flags & PROT_EXEC) \
- cpu_flush_icache_page((unsigned long) page_address(pg)); \
+ cpu_icache_invalidate_page(page_address(pg)); \
} while (0)
/*
- * We don't have a MEMC chip...
+ * Old ARM MEMC stuff. This supports the reversed mapping handling that
+ * we have on the older 26-bit machines. We don't have a MEMC chip, so...
*/
#define memc_update_all() do { } while (0)
#define memc_update_mm(mm) do { } while (0)
@@ -59,48 +100,57 @@
#define memc_clear(mm,physaddr) do { } while (0)
/*
- * This flushes back any buffered write data. We have to clean the entries
- * in the cache for this page. This does not invalidate either I or D caches.
- */
-static __inline__ void flush_page_to_ram(struct page *page)
-{
- cpu_flush_ram_page((unsigned long) page_address(page));
-}
-
-/* You guys might need to do something here. -DaveM */
-#define flush_dcache_page(page) do { } while (0)
-
-/*
- * TLB flushing:
+ * TLB flushing.
*
- * - flush_tlb_all() flushes all processes TLBs
- * - flush_tlb_mm(mm) flushes the specified mm context TLB's
- * - flush_tlb_page(vma, vmaddr) flushes one page
- * - flush_tlb_range(mm, start, end) flushes a range of pages
+ * - flush_tlb_all() flushes all processes TLBs
+ * - flush_tlb_mm(mm) flushes the specified mm context TLB's
+ * - flush_tlb_page(vma, vmaddr) flushes TLB for specified page
+ * - flush_tlb_range(mm, start, end) flushes TLB for specified range of pages
*
* We drain the write buffer in here to ensure that the page tables in ram
* are really up to date. It is more efficient to do this here...
*/
-#define flush_tlb_all() \
- cpu_flush_tlb_all()
-#define flush_tlb_mm(_mm) \
- do { \
- if ((_mm) == current->mm) \
- cpu_flush_tlb_all(); \
+/*
+ * Notes:
+ * current->active_mm is the currently active memory description.
+ * current->mm == NULL iff we are lazy.
+ */
+#define flush_tlb_all() \
+ do { \
+ cpu_tlb_invalidate_all(); \
} while (0)
-#define flush_tlb_range(_mm,_start,_end) \
- do { \
- if ((_mm) == current->mm) \
- cpu_flush_tlb_area((_start), (_end), 1); \
+/*
+ * Flush all user virtual address space translations described by `_mm'.
+ *
+ * Currently, this is always called for current->mm, which should be
+ * the same as current->active_mm. This is currently not be called for
+ * the lazy TLB case.
+ */
+#define flush_tlb_mm(_mm) \
+ do { \
+ if ((_mm) == current->active_mm) \
+ cpu_tlb_invalidate_all(); \
} while (0)
-#define flush_tlb_page(_vma,_vmaddr) \
- do { \
- if ((_vma)->vm_mm == current->mm) \
- cpu_flush_tlb_page((_vmaddr), \
- ((_vma)->vm_flags & VM_EXEC)); \
+/*
+ * Flush the specified range of user virtual address space translations.
+ *
+ * _mm may not be current->active_mm, but may not be NULL.
+ */
+#define flush_tlb_range(_mm,_start,_end) \
+ do { \
+ if ((_mm) == current->active_mm) \
+ cpu_tlb_invalidate_range((_start), (_end)); \
} while (0)
-
+/*
+ * Flush the specified user virtual address space translation.
+ */
+#define flush_tlb_page(_vma,_page) \
+ do { \
+ if ((_vma)->vm_mm == current->active_mm) \
+ cpu_tlb_invalidate_page((_page), \
+ ((_vma)->vm_flags & VM_EXEC)); \
+ } while (0)
diff --git a/include/asm-arm/proc-armv/domain.h b/include/asm-arm/proc-armv/domain.h
index 398fdce5c..aadc83187 100644
--- a/include/asm-arm/proc-armv/domain.h
+++ b/include/asm-arm/proc-armv/domain.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armv/domain.h
+ * linux/include/asm-arm/proc-armv/domain.h
*
- * Copyright (C) 1999 Russell King.
+ * Copyright (C) 1999 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROC_DOMAIN_H
#define __ASM_PROC_DOMAIN_H
diff --git a/include/asm-arm/proc-armv/io.h b/include/asm-arm/proc-armv/io.h
deleted file mode 100644
index 72f0593ef..000000000
--- a/include/asm-arm/proc-armv/io.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * linux/include/asm-arm/proc-armv/io.h
- */
-
-/*
- * The caches on some architectures aren't dma-coherent and have need to
- * handle this in software. There are two types of operations that
- * can be applied to dma buffers.
- *
- * - dma_cache_wback_inv(start, size) makes caches and RAM coherent by
- * writing the content of the caches back to memory, if necessary.
- * The function also invalidates the affected part of the caches as
- * necessary before DMA transfers from outside to memory.
- * - dma_cache_inv(start, size) invalidates the affected parts of the
- * caches. Dirty lines of the caches may be written back or simply
- * be discarded. This operation is necessary before dma operations
- * to the memory.
- * - dma_cache_wback(start, size) writes back any dirty lines but does
- * not invalidate the cache. This can be used before DMA reads from
- * memory,
- */
-
-#include <asm/proc-fns.h>
-
-#define dma_cache_inv(start, size) \
- do { cpu_cache_purge_area((unsigned long)(start), \
- ((unsigned long)(start)+(size))); } while (0)
-
-#define dma_cache_wback(start, size) \
- do { cpu_cache_wback_area((unsigned long)(start), \
- ((unsigned long)(start)+(size))); } while (0)
-
-#define dma_cache_wback_inv(start, size) \
- do { cpu_flush_cache_area((unsigned long)(start), \
- ((unsigned long)(start)+(size)), 0); } while (0)
diff --git a/include/asm-arm/proc-armv/locks.h b/include/asm-arm/proc-armv/locks.h
index 047f0ce16..865663322 100644
--- a/include/asm-arm/proc-armv/locks.h
+++ b/include/asm-arm/proc-armv/locks.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/proc-armv/locks.h
+ * linux/include/asm-arm/proc-armv/locks.h
*
- * Copyright (C) 2000 Russell King
+ * Copyright (C) 2000 Russell King
*
- * Interrupt safe locking assembler.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Interrupt safe locking assembler.
*/
#ifndef __ASM_PROC_LOCKS_H
#define __ASM_PROC_LOCKS_H
diff --git a/include/asm-arm/proc-armv/page.h b/include/asm-arm/proc-armv/page.h
index cd80dec3a..2317fce51 100644
--- a/include/asm-arm/proc-armv/page.h
+++ b/include/asm-arm/proc-armv/page.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armv/page.h
+ * linux/include/asm-arm/proc-armv/page.h
*
- * Copyright (C) 1995, 1996 Russell King
+ * Copyright (C) 1995, 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROC_PAGE_H
#define __ASM_PROC_PAGE_H
diff --git a/include/asm-arm/proc-armv/pgtable.h b/include/asm-arm/proc-armv/pgtable.h
index b5d53a59e..2de66aabe 100644
--- a/include/asm-arm/proc-armv/pgtable.h
+++ b/include/asm-arm/proc-armv/pgtable.h
@@ -1,11 +1,15 @@
/*
- * linux/include/asm-arm/proc-armv/pgtable.h
+ * linux/include/asm-arm/proc-armv/pgtable.h
*
- * Copyright (C) 1995-1999 Russell King
+ * Copyright (C) 1995-1999 Russell King
*
- * 12-Jan-1997 RMK Altered flushing routines to use function pointers
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 12-Jan-1997 RMK Altered flushing routines to use function pointers
* now possible to combine ARM6, ARM7 and StrongARM versions.
- * 17-Apr-1999 RMK Now pass an area size to clean_cache_area and
+ * 17-Apr-1999 RMK Now pass an area size to clean_cache_area and
* flush_icache_area.
*/
#ifndef __ASM_PROC_PGTABLE_H
diff --git a/include/asm-arm/proc-armv/processor.h b/include/asm-arm/proc-armv/processor.h
index 9ddfd0028..ab7f31d65 100644
--- a/include/asm-arm/proc-armv/processor.h
+++ b/include/asm-arm/proc-armv/processor.h
@@ -1,15 +1,19 @@
/*
- * linux/include/asm-arm/proc-armv/processor.h
+ * linux/include/asm-arm/proc-armv/processor.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (C) 1996-1999 Russell King.
*
- * Changelog:
- * 20-09-1996 RMK Created
- * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*'
- * 28-09-1996 RMK Moved start_thread into the processor dependencies
- * 09-09-1998 PJB Delete redundant `wp_works_ok'
- * 30-05-1999 PJB Save sl across context switches
- * 31-07-1999 RMK Added 'domain' stuff
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 20-09-1996 RMK Created
+ * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*'
+ * 28-09-1996 RMK Moved start_thread into the processor dependencies
+ * 09-09-1998 PJB Delete redundant `wp_works_ok'
+ * 30-05-1999 PJB Save sl across context switches
+ * 31-07-1999 RMK Added 'domain' stuff
*/
#ifndef __ASM_PROC_PROCESSOR_H
#define __ASM_PROC_PROCESSOR_H
diff --git a/include/asm-arm/proc-armv/ptrace.h b/include/asm-arm/proc-armv/ptrace.h
index 362eac178..d15d5a6ec 100644
--- a/include/asm-arm/proc-armv/ptrace.h
+++ b/include/asm-arm/proc-armv/ptrace.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armv/ptrace.h
+ * linux/include/asm-arm/proc-armv/ptrace.h
*
- * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1996-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROC_PTRACE_H
#define __ASM_PROC_PTRACE_H
@@ -18,6 +22,7 @@
#define UND_MODE 0x1b
#define SYSTEM_MODE 0x1f
#define MODE_MASK 0x1f
+#define T_BIT 0x20
#define F_BIT 0x40
#define I_BIT 0x80
#define CC_V_BIT (1 << 28)
@@ -59,6 +64,9 @@ struct pt_regs {
#define user_mode(regs) \
(((regs)->ARM_cpsr & 0xf) == 0)
+#define thumb_mode(regs) \
+ (((regs)->ARM_cpsr & T_BIT))
+
#define processor_mode(regs) \
((regs)->ARM_cpsr & MODE_MASK)
diff --git a/include/asm-arm/proc-armv/shmparam.h b/include/asm-arm/proc-armv/shmparam.h
index 664b8deaf..5b692cc5b 100644
--- a/include/asm-arm/proc-armv/shmparam.h
+++ b/include/asm-arm/proc-armv/shmparam.h
@@ -1,12 +1,15 @@
/*
- * linux/include/asm-arm/proc-armv/shmparam.h
+ * linux/include/asm-arm/proc-armv/shmparam.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
*
- * definitions for the shared process memory on ARM v3 or v4
- * processors
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * definitions for the shared process memory on ARM v3 or v4
+ * processors
*/
-
#ifndef __ASM_PROC_SHMPARAM_H
#define __ASM_PROC_SHMPARAM_H
diff --git a/include/asm-arm/proc-armv/system.h b/include/asm-arm/proc-armv/system.h
index e05e6356f..247ed3e2b 100644
--- a/include/asm-arm/proc-armv/system.h
+++ b/include/asm-arm/proc-armv/system.h
@@ -1,9 +1,12 @@
/*
- * linux/include/asm-arm/proc-armv/system.h
+ * linux/include/asm-arm/proc-armv/system.h
*
- * Copyright (C) 1996 Russell King
+ * Copyright (C) 1996 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#ifndef __ASM_PROC_SYSTEM_H
#define __ASM_PROC_SYSTEM_H
diff --git a/include/asm-arm/proc-armv/uaccess.h b/include/asm-arm/proc-armv/uaccess.h
index af146abf9..4baee9ce7 100644
--- a/include/asm-arm/proc-armv/uaccess.h
+++ b/include/asm-arm/proc-armv/uaccess.h
@@ -1,7 +1,10 @@
/*
- * linux/include/asm-arm/proc-armv/uaccess.h
+ * linux/include/asm-arm/proc-armv/uaccess.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
-
#include <asm/arch/memory.h>
#include <asm/proc/domain.h>
diff --git a/include/asm-arm/proc-armv/uncompress.h b/include/asm-arm/proc-armv/uncompress.h
index e67566d5d..bc41b2811 100644
--- a/include/asm-arm/proc-armv/uncompress.h
+++ b/include/asm-arm/proc-armv/uncompress.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/proc-armv/uncompress.h
+ * linux/include/asm-arm/proc-armv/uncompress.h
*
- * (c) 1997 Russell King
+ * Copyright (C) 1997 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
static inline void proc_decomp_setup (void)
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
index 5e5f1e623..18008c510 100644
--- a/include/asm-arm/proc-fns.h
+++ b/include/asm-arm/proc-fns.h
@@ -1,7 +1,12 @@
/*
- * linux/include/asm-arm/proc-fns.h
+ * linux/include/asm-arm/proc-fns.h
*
- * Copyright (C) 1997-1999 Russell King
+ * Copyright (C) 1997-1999 Russell King
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROCFNS_H
#define __ASM_PROCFNS_H
@@ -39,28 +44,36 @@
# define CPU_NAME arm7
# endif
# endif
-# ifdef CONFIG_CPU_SA110
+# ifdef CONFIG_CPU_ARM720
# ifdef CPU_NAME
# undef MULTI_CPU
# define MULTI_CPU
# else
-# define CPU_NAME sa110
+# define CPU_NAME arm720
# endif
# endif
-# ifdef CONFIG_CPU_SA1100
+# ifdef CONFIG_CPU_ARM920
# ifdef CPU_NAME
# undef MULTI_CPU
# define MULTI_CPU
# else
-# define CPU_NAME sa1100
+# define CPU_NAME arm920
# endif
# endif
-# ifdef CONFIG_CPU_ARM720
+# ifdef CONFIG_CPU_SA110
# ifdef CPU_NAME
# undef MULTI_CPU
# define MULTI_CPU
# else
-# define CPU_NAME arm720
+# define CPU_NAME sa110
+# endif
+# endif
+# ifdef CONFIG_CPU_SA1100
+# ifdef CPU_NAME
+# undef MULTI_CPU
+# define MULTI_CPU
+# else
+# define CPU_NAME sa1100
# endif
# endif
#endif
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h
index 462c9a8c0..cf21f2c1b 100644
--- a/include/asm-arm/processor.h
+++ b/include/asm-arm/processor.h
@@ -1,7 +1,11 @@
/*
- * include/asm-arm/processor.h
+ * linux/include/asm-arm/processor.h
*
- * Copyright (C) 1995 Russell King
+ * Copyright (C) 1995 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_ARM_PROCESSOR_H
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h
index 0e6fcd87f..5a07ca9d3 100644
--- a/include/asm-arm/procinfo.h
+++ b/include/asm-arm/procinfo.h
@@ -1,7 +1,11 @@
/*
- * linux/include/asm-arm/procinfo.h
+ * linux/include/asm-arm/procinfo.h
*
- * Copyright (C) 1996-1999 Russell King
+ * Copyright (C) 1996-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#ifndef __ASM_PROCINFO_H
#define __ASM_PROCINFO_H
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h
index 3126767a4..ae4927937 100644
--- a/include/asm-arm/ptrace.h
+++ b/include/asm-arm/ptrace.h
@@ -3,11 +3,6 @@
#include <asm/proc/ptrace.h>
-#define PTRACE_GETREGS 12
-#define PTRACE_SETREGS 13
-#define PTRACE_GETFPREGS 14
-#define PTRACE_SETFPREGS 15
-
#ifndef __ASSEMBLY__
#define pc_pointer(v) \
((v) & ~PCMASK)
@@ -16,6 +11,11 @@
(pc_pointer((regs)->ARM_pc))
#ifdef __KERNEL__
+#define PTRACE_GETREGS 12
+#define PTRACE_SETREGS 13
+#define PTRACE_GETFPREGS 14
+#define PTRACE_SETFPREGS 15
+
extern void show_regs(struct pt_regs *);
#define predicate(x) (x & 0xf0000000)
diff --git a/include/asm-arm/resource.h b/include/asm-arm/resource.h
index 8a26bc85d..9da87b622 100644
--- a/include/asm-arm/resource.h
+++ b/include/asm-arm/resource.h
@@ -15,8 +15,9 @@
#define RLIMIT_NOFILE 7 /* max number of open files */
#define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */
#define RLIMIT_AS 9 /* address space limit */
+#define RLIMIT_LOCKS 10 /* maximum file locks held */
-#define RLIM_NLIMITS 10
+#define RLIM_NLIMITS 11
#ifdef __KERNEL__
@@ -38,6 +39,7 @@
{ INR_OPEN, INR_OPEN }, \
{ RLIM_INFINITY, RLIM_INFINITY }, \
{ RLIM_INFINITY, RLIM_INFINITY }, \
+ { RLIM_INFINITY, RLIM_INFINITY }, \
}
#endif /* __KERNEL__ */
diff --git a/include/asm-arm/scatterlist.h b/include/asm-arm/scatterlist.h
index 7d0175507..73260c410 100644
--- a/include/asm-arm/scatterlist.h
+++ b/include/asm-arm/scatterlist.h
@@ -1,13 +1,25 @@
#ifndef _ASMARM_SCATTERLIST_H
#define _ASMARM_SCATTERLIST_H
+#include <asm/types.h>
+
struct scatterlist {
- char * address; /* Location data is to be transferred to */
- char * alt_address; /* Location of actual if address is a
- * dma indirect buffer. NULL otherwise */
- unsigned int length;
+ char *address; /* virtual address */
+ char *alt_address; /* indirect dma address, or NULL */
+ dma_addr_t dma_address; /* dma address */
+ unsigned int length; /* length */
};
+/*
+ * These macros should be used after a pci_map_sg call has been done
+ * to get bus addresses of each of the SG entries and their lengths.
+ * You should only work with the number of sg entries pci_map_sg
+ * returns, or alternatively stop on the first sg_dma_len(sg) which
+ * is 0.
+ */
+#define sg_dma_address(sg) ((sg)->dma_address)
+#define sg_dma_len(sg) ((sg)->length)
+
#define ISA_DMA_THRESHOLD (0xffffffff)
#endif /* _ASMARM_SCATTERLIST_H */
diff --git a/include/asm-arm/serial.h b/include/asm-arm/serial.h
index 88d57fe07..1cce84a8c 100644
--- a/include/asm-arm/serial.h
+++ b/include/asm-arm/serial.h
@@ -1,10 +1,14 @@
/*
- * linux/include/asm-arm/serial.h
+ * linux/include/asm-arm/serial.h
*
- * Copyright (c) 1996 Russell King.
+ * Copyright (C) 1996 Russell King.
*
- * Changelog:
- * 15-10-1996 RMK Created
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 15-10-1996 RMK Created
*/
#ifndef __ASM_SERIAL_H
diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h
index f50c2f4e7..c067c9618 100644
--- a/include/asm-arm/setup.h
+++ b/include/asm-arm/setup.h
@@ -1,11 +1,15 @@
/*
- * include/asm/setup.h
+ * linux/include/asm/setup.h
*
- * Structure passed to kernel to tell it about the
- * hardware it's running on. See linux/Documentation/arm/Setup
- * for more info.
+ * Copyright (C) 1997-1999 Russell King
*
- * Copyright (C) 1997-1999 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Structure passed to kernel to tell it about the
+ * hardware it's running on. See linux/Documentation/arm/Setup
+ * for more info.
*/
#ifndef __ASMARM_SETUP_H
#define __ASMARM_SETUP_H
diff --git a/include/asm-arm/shmparam.h b/include/asm-arm/shmparam.h
index 0b94f747d..4359852cc 100644
--- a/include/asm-arm/shmparam.h
+++ b/include/asm-arm/shmparam.h
@@ -3,6 +3,11 @@
#include <asm/proc/shmparam.h>
+/*
+ * This should be the size of the virtually indexed cache/ways,
+ * or page size, whichever is greater since the cache aliases
+ * every size/ways bytes.
+ */
#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#endif /* _ASMARM_SHMPARAM_H */
diff --git a/include/asm-arm/timex.h b/include/asm-arm/timex.h
index d9a3303be..0713f0de6 100644
--- a/include/asm-arm/timex.h
+++ b/include/asm-arm/timex.h
@@ -1,9 +1,13 @@
/*
- * linux/include/asm-arm/timex.h
+ * linux/include/asm-arm/timex.h
*
- * Architecture Specific TIME specifications
+ * Copyright (C) 1997,1998 Russell King
*
- * Copyright (C) 1997,1998 Russell King
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Architecture Specific TIME specifications
*/
#ifndef _ASMARM_TIMEX_H
#define _ASMARM_TIMEX_H
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h
index add086e55..7e8040d73 100644
--- a/include/asm-arm/uaccess.h
+++ b/include/asm-arm/uaccess.h
@@ -59,9 +59,6 @@ extern __inline__ int verify_area(int type, const void * addr, unsigned long siz
* address space - it must have been done previously with a separate
* "access_ok()" call.
*
- * The "xxx_ret" versions return constant specified in the third
- * argument if something bad happens.
- *
* The "xxx_error" versions set the third argument to EFAULT if an
* error occurs, and leave it unchanged on success. Note that these
* versions are void (ie, don't return a value as such).
@@ -69,14 +66,10 @@ extern __inline__ int verify_area(int type, const void * addr, unsigned long siz
#define get_user(x,p) __get_user_check((x),(p),sizeof(*(p)))
#define __get_user(x,p) __get_user_nocheck((x),(p),sizeof(*(p)))
#define __get_user_error(x,p,e) __get_user_nocheck_error((x),(p),sizeof(*(p)),(e))
-#define get_user_ret(x,p,r) ({ if (get_user(x,p)) return r; })
-#define __get_user_ret(x,p,r) ({ if (__get_user(x,p)) return r; })
#define put_user(x,p) __put_user_check((__typeof(*(p)))(x),(p),sizeof(*(p)))
#define __put_user(x,p) __put_user_nocheck((__typeof(*(p)))(x),(p),sizeof(*(p)))
#define __put_user_error(x,p,e) __put_user_nocheck_error((x),(p),sizeof(*(p)),(e))
-#define put_user_ret(x,p,r) ({ if (put_user(x,p)) return r; })
-#define __put_user_ret(x,p,r) ({ if (__put_user(x,p)) return r; })
static __inline__ unsigned long copy_from_user(void *to, const void *from, unsigned long n)
{
@@ -91,9 +84,6 @@ static __inline__ unsigned long __copy_from_user(void *to, const void *from, uns
return n;
}
-#define copy_from_user_ret(t,f,n,r) \
- ({ if (copy_from_user(t,f,n)) return r; })
-
static __inline__ unsigned long copy_to_user(void *to, const void *from, unsigned long n)
{
if (access_ok(VERIFY_WRITE, to, n))
@@ -107,9 +97,6 @@ static __inline__ unsigned long __copy_to_user(void *to, const void *from, unsig
return n;
}
-#define copy_to_user_ret(t,f,n,r) \
- ({ if (copy_to_user(t,f,n)) return r; })
-
static __inline__ unsigned long clear_user (void *to, unsigned long n)
{
if (access_ok(VERIFY_WRITE, to, n))