summaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
commit03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch)
tree88db8dba75ae06ba3bad08e42c5e52efc162535c /include/asm-arm
parent257730f99381dd26e10b832fce4c94cae7ac1176 (diff)
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-arc/irq.h201
-rw-r--r--include/asm-arm/arch-arc/uncompress.h5
-rw-r--r--include/asm-arm/arch-ebsa110/irq.h34
-rw-r--r--include/asm-arm/arch-ebsa110/irqs.h21
-rw-r--r--include/asm-arm/arch-ebsa110/mm-init.h1
-rw-r--r--include/asm-arm/arch-ebsa110/mmu.h3
-rw-r--r--include/asm-arm/arch-ebsa110/param.h8
-rw-r--r--include/asm-arm/arch-ebsa110/system.h2
-rw-r--r--include/asm-arm/arch-ebsa110/time.h9
-rw-r--r--include/asm-arm/arch-ebsa110/timex.h2
-rw-r--r--include/asm-arm/arch-ebsa110/uncompress.h1
-rw-r--r--include/asm-arm/arch-ebsa285/dma.h30
-rw-r--r--include/asm-arm/arch-ebsa285/irq.h38
-rw-r--r--include/asm-arm/arch-ebsa285/param.h8
-rw-r--r--include/asm-arm/arch-ebsa285/serial.h1
-rw-r--r--include/asm-arm/arch-ebsa285/uncompress.h1
-rw-r--r--include/asm-arm/arch-nexuspci/irq.h22
-rw-r--r--include/asm-arm/arch-nexuspci/param.h8
-rw-r--r--include/asm-arm/arch-rpc/irq.h236
-rw-r--r--include/asm-arm/arch-rpc/irqs.h2
-rw-r--r--include/asm-arm/arch-rpc/param.h8
-rw-r--r--include/asm-arm/arch-rpc/uncompress.h4
-rw-r--r--include/asm-arm/arch-vnc/a.out.h1
-rw-r--r--include/asm-arm/arch-vnc/dma.h1
-rw-r--r--include/asm-arm/arch-vnc/hardware.h1
-rw-r--r--include/asm-arm/arch-vnc/irq.h89
-rw-r--r--include/asm-arm/arch-vnc/irqs.h1
-rw-r--r--include/asm-arm/arch-vnc/keyboard.h1
-rw-r--r--include/asm-arm/arch-vnc/param.h8
-rw-r--r--include/asm-arm/arch-vnc/uncompress.h1
-rw-r--r--include/asm-arm/atomic.h11
-rw-r--r--include/asm-arm/elf.h20
-rw-r--r--include/asm-arm/fcntl.h2
-rw-r--r--include/asm-arm/fiq.h38
-rw-r--r--include/asm-arm/io.h1
-rw-r--r--include/asm-arm/irq.h2
-rw-r--r--include/asm-arm/linux_logo.h29
-rw-r--r--include/asm-arm/pgtable.h3
-rw-r--r--include/asm-arm/proc-armo/io.h8
-rw-r--r--include/asm-arm/proc-armo/pgtable.h1
-rw-r--r--include/asm-arm/proc-armo/ptrace.h20
-rw-r--r--include/asm-arm/proc-armv/io.h38
-rw-r--r--include/asm-arm/proc-armv/param.h4
-rw-r--r--include/asm-arm/proc-armv/pgtable.h3
-rw-r--r--include/asm-arm/proc-armv/ptrace.h6
-rw-r--r--include/asm-arm/proc-fns.h8
-rw-r--r--include/asm-arm/processor.h4
-rw-r--r--include/asm-arm/siginfo.h1
-rw-r--r--include/asm-arm/signal.h5
-rw-r--r--include/asm-arm/spinlock.h9
-rw-r--r--include/asm-arm/system.h10
-rw-r--r--include/asm-arm/uaccess.h5
-rw-r--r--include/asm-arm/unistd.h1
-rw-r--r--include/asm-arm/vga.h11
54 files changed, 610 insertions, 378 deletions
diff --git a/include/asm-arm/arch-arc/irq.h b/include/asm-arm/arch-arc/irq.h
index 937a79c3c..0faabaf4d 100644
--- a/include/asm-arm/arch-arc/irq.h
+++ b/include/asm-arm/arch-arc/irq.h
@@ -8,123 +8,138 @@
* 10-10-1996 RMK Brought up to date with arch-sa110eval
* 22-10-1996 RMK Changed interrupt numbers & uses new inb/outb macros
* 11-01-1998 RMK Added mask_and_ack_irq
+ * 22-08-1998 RMK Restructured IRQ routines
*/
-#define BUILD_IRQ(s,n,m) \
- void IRQ##n##_interrupt(void); \
- void fast_IRQ##n##_interrupt(void); \
- void bad_IRQ##n##_interrupt(void); \
- void probe_IRQ##n##_interrupt(void);
+static void arc_mask_irq_ack_a(unsigned int irq)
+{
+ unsigned int temp;
-/*
- * The timer is a special interrupt
- */
-#define IRQ5_interrupt timer_IRQ_interrupt
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" bic %0, %0, %1\n"
+" strb %0, [%2]\n"
+" strb %1, [%3]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA)),
+ "r" (ioaddr(IOC_IRQCLRA)));
+}
+
+static void arc_mask_irq_a(unsigned int irq)
+{
+ unsigned int temp;
-#define IRQ_INTERRUPT(n) IRQ##n##_interrupt
-#define FAST_INTERRUPT(n) fast_IRQ##n##_interrupt
-#define BAD_INTERRUPT(n) bad_IRQ##n##_interrupt
-#define PROBE_INTERRUPT(n) probe_IRQ##n##_interrupt
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" bic %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA)));
+}
+
+static void arc_unmask_irq_a(unsigned int irq)
+{
+ unsigned int temp;
-#define X(x) (x)|0x01, (x)|0x02, (x)|0x04, (x)|0x08, (x)|0x10, (x)|0x20, (x)|0x40, (x)|0x80
-#define Z(x) (x), (x), (x), (x), (x), (x), (x), (x)
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" orr %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA)));
+}
-static __inline__ void mask_and_ack_irq(unsigned int irq)
+static void arc_mask_irq_b(unsigned int irq)
{
- static const int addrmasks[] = {
- X((IOC_IRQMASKA - IOC_BASE)<<18 | (1 << 15)),
- X((IOC_IRQMASKB - IOC_BASE)<<18),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- X((IOC_FIQMASK - IOC_BASE)<<18),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0)
- };
- unsigned int temp1, temp2;
+ unsigned int temp;
__asm__ __volatile__(
-" ldr %1, [%5, %3, lsl #2]\n"
-" teq %1, #0\n"
-" beq 2f\n"
-" ldrb %0, [%2, %1, lsr #16]\n"
+ "ldrb %0, [%2]\n"
" bic %0, %0, %1\n"
-" strb %0, [%2, %1, lsr #16]\n"
-" tst %1, #0x8000\n" /* do we need an IRQ clear? */
-" strneb %1, [%2, %4]\n"
-"2:"
- : "=&r" (temp1), "=&r" (temp2)
- : "r" (ioaddr(IOC_BASE)), "r" (irq),
- "I" ((IOC_IRQCLRA - IOC_BASE) << 2), "r" (addrmasks));
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB)));
}
-#undef X
-#undef Z
-
-static __inline__ void mask_irq(unsigned int irq)
+static void arc_unmask_irq_b(unsigned int irq)
{
- extern void ecard_disableirq (unsigned int);
- extern void ecard_disablefiq (unsigned int);
- unsigned char mask = 1 << (irq & 7);
-
- switch (irq >> 3) {
- case 0:
- outb(inb(IOC_IRQMASKA) & ~mask, IOC_IRQMASKA);
- break;
- case 1:
- outb(inb(IOC_IRQMASKB) & ~mask, IOC_IRQMASKB);
- break;
- case 4:
- ecard_disableirq (irq & 7);
- break;
- case 8:
- outb(inb(IOC_FIQMASK) & ~mask, IOC_FIQMASK);
- break;
- case 12:
- ecard_disablefiq (irq & 7);
- }
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" orr %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB)));
}
-static __inline__ void unmask_irq(unsigned int irq)
+static void arc_mask_irq_fiq(unsigned int irq)
{
- extern void ecard_enableirq (unsigned int);
- extern void ecard_enablefiq (unsigned int);
- unsigned char mask = 1 << (irq & 7);
-
- switch (irq >> 3) {
- case 0:
- outb(inb(IOC_IRQMASKA) | mask, IOC_IRQMASKA);
- break;
- case 1:
- outb(inb(IOC_IRQMASKB) | mask, IOC_IRQMASKB);
- break;
- case 4:
- ecard_enableirq (irq & 7);
- break;
- case 8:
- outb(inb(IOC_FIQMASK) | mask, IOC_FIQMASK);
- break;
- case 12:
- ecard_enablefiq (irq & 7);
- }
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" bic %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK)));
}
-static __inline__ unsigned long get_enabled_irqs(void)
+static void arc_unmask_irq_fiq(unsigned int irq)
{
- return inb(IOC_IRQMASKA) | inb(IOC_IRQMASKB) << 8;
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" orr %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK)));
}
static __inline__ void irq_init_irq(void)
{
+ extern void ecard_disableirq(unsigned int irq);
+ extern void ecard_enableirq(unsigned int irq);
+ int irq;
+
outb(0, IOC_IRQMASKA);
outb(0, IOC_IRQMASKB);
outb(0, IOC_FIQMASK);
+
+ for (irq = 0; irq < NR_IRQS; irq++) {
+ switch (irq & 0xf8) {
+ case 0 ... 6:
+ irq_desc[irq].probe_ok = 1;
+ case 7:
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].mask_ack = arc_mask_irq_ack_a;
+ irq_desc[irq].mask = arc_mask_irq_a;
+ irq_desc[irq].unmask = arc_unmask_irq_a;
+ break;
+
+ case 9 ... 15:
+ irq_desc[irq].probe_ok = 1;
+ case 8:
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].mask_ack = arc_mask_irq_b;
+ irq_desc[irq].mask = arc_mask_irq_b;
+ irq_desc[irq].unmask = arc_unmask_irq_b;
+ break;
+
+ case 32 ... 40:
+ 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:
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].mask_ack = arc_mask_irq_fiq;
+ irq_desc[irq].mask = arc_mask_irq_fiq;
+ irq_desc[irq].unmask = arc_unmask_irq_fiq;
+ break;
+ }
+ }
}
diff --git a/include/asm-arm/arch-arc/uncompress.h b/include/asm-arm/arch-arc/uncompress.h
index f378f1166..f8c274f86 100644
--- a/include/asm-arm/arch-arc/uncompress.h
+++ b/include/asm-arm/arch-arc/uncompress.h
@@ -102,3 +102,8 @@ static void arch_decomp_setup(void)
if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n");
}
+
+/*
+ * nothing to do
+ */
+#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-ebsa110/irq.h b/include/asm-arm/arch-ebsa110/irq.h
index 18ddf053b..2f8b804d5 100644
--- a/include/asm-arm/arch-ebsa110/irq.h
+++ b/include/asm-arm/arch-ebsa110/irq.h
@@ -1,39 +1,35 @@
/*
* include/asm-arm/arch-ebsa110/irq.h
*
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1996-1998 Russell King
+ *
+ * Changelog:
+ * 22-08-1998 RMK Restructured IRQ routines
*/
#define IRQ_MCLR ((volatile unsigned char *)0xf3000000)
#define IRQ_MSET ((volatile unsigned char *)0xf2c00000)
#define IRQ_MASK ((volatile unsigned char *)0xf2c00000)
-static __inline__ void mask_and_ack_irq(unsigned int irq)
+static void ebsa110_mask_and_ack_irq(unsigned int irq)
{
- if (irq < 8)
- *IRQ_MCLR = 1 << irq;
+ *IRQ_MCLR = 1 << irq;
}
-static __inline__ void mask_irq(unsigned int irq)
+static void ebsa110_mask_irq(unsigned int irq)
{
- if (irq < 8)
- *IRQ_MCLR = 1 << irq;
+ *IRQ_MCLR = 1 << irq;
}
-static __inline__ void unmask_irq(unsigned int irq)
+static void ebsa110_unmask_irq(unsigned int irq)
{
- if (irq < 8)
- *IRQ_MSET = 1 << irq;
+ *IRQ_MSET = 1 << irq;
}
-static __inline__ unsigned long get_enabled_irqs(void)
-{
- return 0;
-}
-
static __inline__ void irq_init_irq(void)
{
unsigned long flags;
+ int irq;
save_flags_cli (flags);
*IRQ_MCLR = 0xff;
@@ -43,4 +39,12 @@ static __inline__ void irq_init_irq(void)
while (1);
*IRQ_MCLR = 0xff; /* clear all interrupt enables */
restore_flags (flags);
+
+ for (irq = 0; irq < NR_IRQS; irq++) {
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].probe_ok = 1;
+ irq_desc[irq].mask_ack = ebsa110_mask_and_ack_irq;
+ irq_desc[irq].mask = ebsa110_mask_irq;
+ irq_desc[irq].unmask = ebsa110_unmask_irq;
+ }
}
diff --git a/include/asm-arm/arch-ebsa110/irqs.h b/include/asm-arm/arch-ebsa110/irqs.h
index 909a6f169..0add03e59 100644
--- a/include/asm-arm/arch-ebsa110/irqs.h
+++ b/include/asm-arm/arch-ebsa110/irqs.h
@@ -4,16 +4,13 @@
* Copyright (C) 1996 Russell King
*/
-#define IRQ_PRINTER 0
-#define IRQ_COM1 1
-#define IRQ_COM2 2
-#define IRQ_ETHERNET 3
-#define IRQ_TIMER0 4
-#define IRQ_TIMER1 5
-#define IRQ_PCMCIA 6
-#define IRQ_IMMEDIATE 7
-
-#define IRQ_TIMER IRQ_TIMER0
-
-#define irq_cannonicalize(i) (i)
+#define NR_IRQS 8
+#define IRQ_EBSA110_PRINTER 0
+#define IRQ_EBSA110_COM1 1
+#define IRQ_EBSA110_COM2 2
+#define IRQ_EBSA110_ETHERNET 3
+#define IRQ_EBSA110_TIMER0 4
+#define IRQ_EBSA110_TIMER1 5
+#define IRQ_EBSA110_PCMCIA 6
+#define IRQ_EBSA110_IMMEDIATE 7
diff --git a/include/asm-arm/arch-ebsa110/mm-init.h b/include/asm-arm/arch-ebsa110/mm-init.h
index 3e3794140..c6937abd0 100644
--- a/include/asm-arm/arch-ebsa110/mm-init.h
+++ b/include/asm-arm/arch-ebsa110/mm-init.h
@@ -3,4 +3,3 @@
*
* Copyright (C) 1996,1997,1998 Russell King
*/
-
diff --git a/include/asm-arm/arch-ebsa110/mmu.h b/include/asm-arm/arch-ebsa110/mmu.h
index 07006f82e..97776045d 100644
--- a/include/asm-arm/arch-ebsa110/mmu.h
+++ b/include/asm-arm/arch-ebsa110/mmu.h
@@ -10,9 +10,6 @@
#ifndef __ASM_ARCH_MMU_H
#define __ASM_ARCH_MMU_H
-/*
- * On ebsa, the dram is contiguous
- */
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt__is_a_macro
diff --git a/include/asm-arm/arch-ebsa110/param.h b/include/asm-arm/arch-ebsa110/param.h
new file mode 100644
index 000000000..865d8cc7a
--- /dev/null
+++ b/include/asm-arm/arch-ebsa110/param.h
@@ -0,0 +1,8 @@
+/*
+ * linux/include/asm-arm/arch-ebsa110/param.h
+ *
+ * Copyright (C) 1996 Russell King
+ * Copyright (C) 1998 Philip Blundell
+ */
+
+#define HZ 100
diff --git a/include/asm-arm/arch-ebsa110/system.h b/include/asm-arm/arch-ebsa110/system.h
index 7a2957cae..a28161cb2 100644
--- a/include/asm-arm/arch-ebsa110/system.h
+++ b/include/asm-arm/arch-ebsa110/system.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-ebsa110/system.h
*
- * Copyright (c) 1996,1997,1998 Russell King.
+ * Copyright (c) 1996-1998 Russell King.
*/
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
diff --git a/include/asm-arm/arch-ebsa110/time.h b/include/asm-arm/arch-ebsa110/time.h
index 84d04d90f..5b1447b7e 100644
--- a/include/asm-arm/arch-ebsa110/time.h
+++ b/include/asm-arm/arch-ebsa110/time.h
@@ -7,9 +7,14 @@
*
* Changelog:
* 10-Oct-1996 RMK Created
- * 04-Dec-1997 RMK Updated for new arch/arm/time.c
+ * 04-Dec-1997 RMK Updated for new arch/arm/kernel/time.c
+ * 07-Aug-1998 RMK Updated for arch/arm/kernel/leds.c
*/
+#include <asm/leds.h>
+
+#define IRQ_TIMER IRQ_EBSA110_TIMER0
+
#define MCLK_47_8
#if defined(MCLK_42_3)
@@ -49,7 +54,7 @@ extern __inline__ int reset_timer (void)
if (--count == 0) {
count = 50;
- *(volatile unsigned char *)0xf2400000 ^= 128;
+ leds_event(led_timer);
}
if (divisor == 0) {
diff --git a/include/asm-arm/arch-ebsa110/timex.h b/include/asm-arm/arch-ebsa110/timex.h
index 86bb588e7..06acb9dfc 100644
--- a/include/asm-arm/arch-ebsa110/timex.h
+++ b/include/asm-arm/arch-ebsa110/timex.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-ebsa110/timex.h
*
- * RiscPC architecture timex specifications
+ * EBSA110 architecture timex specifications
*
* Copyright (C) 1997, 1998 Russell King
*/
diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h
index d5260b027..d6097d43f 100644
--- a/include/asm-arm/arch-ebsa110/uncompress.h
+++ b/include/asm-arm/arch-ebsa110/uncompress.h
@@ -31,3 +31,4 @@ static void puts(const char *s)
* nothing to do
*/
#define arch_decomp_setup()
+#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-ebsa285/dma.h b/include/asm-arm/arch-ebsa285/dma.h
index 96a265927..d3a2aa0c9 100644
--- a/include/asm-arm/arch-ebsa285/dma.h
+++ b/include/asm-arm/arch-ebsa285/dma.h
@@ -1,29 +1,35 @@
/*
- * linux/include/asm-arm/arch-ebsa110/dma.h
+ * linux/include/asm-arm/arch-ebsa285/dma.h
*
- * Architecture DMA routes
+ * Architecture DMA routines
*
- * Copyright (C) 1997.1998 Russell King
+ * Copyright (C) 1998 Russell King
+ * Copyright (C) 1998 Philip Blundell
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
/*
* This is the maximum DMA address that can be DMAd to.
- * There should not be more than (0xd0000000 - 0xc0000000)
- * bytes of RAM.
*/
-#define MAX_DMA_ADDRESS 0xd0000000
+#define MAX_DMA_ADDRESS 0xffffffff
/*
* DMA modes - we have two, IN and OUT
*/
-typedef enum {
- DMA_MODE_READ,
- DMA_MODE_WRITE
-} dmamode_t;
-#define MAX_DMA_CHANNELS 8
+typedef int dmamode_t;
+#define DMA_MODE_READ 0x44
+#define DMA_MODE_WRITE 0x48
-#endif /* _ASM_ARCH_DMA_H */
+/*
+ * The 21285 has two internal DMA channels; we call these 0 and 1.
+ * On CATS hardware we have an additional eight ISA dma channels
+ * numbered 2..9.
+ */
+#define MAX_DMA_CHANNELS 10
+#define DMA_ISA_BASE 2
+#define DMA_FLOPPY (DMA_ISA_BASE + 2)
+
+#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h
index ece9464cd..029b1b1a6 100644
--- a/include/asm-arm/arch-ebsa285/irq.h
+++ b/include/asm-arm/arch-ebsa285/irq.h
@@ -1,34 +1,34 @@
/*
- * include/asm-arm/arch-ebsa110/irq.h
+ * include/asm-arm/arch-ebsa285/irq.h
*
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1996-1998 Russell King
+ *
+ * Changelog:
+ * 22-08-1998 RMK Restructured IRQ routines
*/
-static __inline__ void mask_and_ack_irq(unsigned int irq)
+static void ebsa285_mask_irq(unsigned int irq)
{
- if (irq < 32)
- *CSR_IRQ_DISABLE = 1 << irq;
+ *CSR_IRQ_DISABLE = 1 << irq;
}
-static __inline__ void mask_irq(unsigned int irq)
+static void ebsa285_unmask_irq(unsigned int irq)
{
- if (irq < 32)
- *CSR_IRQ_DISABLE = 1 << irq;
-}
-
-static __inline__ void unmask_irq(unsigned int irq)
-{
- if (irq < 32)
- *CSR_IRQ_ENABLE = 1 << irq;
+ *CSR_IRQ_ENABLE = 1 << irq;
}
-static __inline__ unsigned long get_enabled_irqs(void)
-{
- return 0;
-}
-
static __inline__ void irq_init_irq(void)
{
+ int irq;
+
*CSR_IRQ_DISABLE = -1;
*CSR_FIQ_DISABLE = -1;
+
+ for (irq = 0; irq < NR_IRQS; irq++) {
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].probe_ok = 1;
+ irq_desc[irq].mask_ack = ebsa285_mask_irq;
+ irq_desc[irq].mask = ebsa285_mask_irq;
+ irq_desc[irq].unmask = ebsa285_unmask_irq;
+ }
}
diff --git a/include/asm-arm/arch-ebsa285/param.h b/include/asm-arm/arch-ebsa285/param.h
new file mode 100644
index 000000000..021282dd7
--- /dev/null
+++ b/include/asm-arm/arch-ebsa285/param.h
@@ -0,0 +1,8 @@
+/*
+ * linux/include/asm-arm/arch-ebsa285/param.h
+ *
+ * Copyright (C) 1996 Russell King
+ * Copyright (C) 1998 Philip Blundell
+ */
+
+#define HZ 100
diff --git a/include/asm-arm/arch-ebsa285/serial.h b/include/asm-arm/arch-ebsa285/serial.h
index e824c8d31..0e8479ff8 100644
--- a/include/asm-arm/arch-ebsa285/serial.h
+++ b/include/asm-arm/arch-ebsa285/serial.h
@@ -38,4 +38,3 @@
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */
#endif
-
diff --git a/include/asm-arm/arch-ebsa285/uncompress.h b/include/asm-arm/arch-ebsa285/uncompress.h
index d5260b027..d6097d43f 100644
--- a/include/asm-arm/arch-ebsa285/uncompress.h
+++ b/include/asm-arm/arch-ebsa285/uncompress.h
@@ -31,3 +31,4 @@ static void puts(const char *s)
* nothing to do
*/
#define arch_decomp_setup()
+#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-nexuspci/irq.h b/include/asm-arm/arch-nexuspci/irq.h
index cf25a5dea..7b03006dd 100644
--- a/include/asm-arm/arch-nexuspci/irq.h
+++ b/include/asm-arm/arch-nexuspci/irq.h
@@ -2,6 +2,9 @@
* include/asm-arm/arch-nexuspci/irq.h
*
* Copyright (C) 1998 Philip Blundell
+ *
+ * Changelog:
+ * 22-08-1998 RMK Restructured IRQ routines
*/
#include <asm/io.h>
@@ -10,29 +13,28 @@
extern unsigned long soft_irq_mask;
-static __inline__ void mask_irq(unsigned int irq)
+static void nexuspci_mask_irq(unsigned int irq)
{
writel((irq << 1), INTCONT);
soft_irq_mask &= ~(1<<irq);
}
-#define mask_and_ack_irq(_x) mask_irq(_x)
-
-static __inline__ void unmask_irq(unsigned int irq)
+static void nexuspci_unmask_irq(unsigned int irq)
{
writel((irq << 1) + 1, INTCONT);
soft_irq_mask |= (1<<irq);
}
-static __inline__ unsigned long get_enabled_irqs(void)
-{
- return soft_irq_mask;
-}
-
static __inline__ void irq_init_irq(void)
{
unsigned int i;
/* Disable all interrupts initially. */
- for (i = 0; i < NR_IRQS; i++)
+ for (i = 0; i < NR_IRQS; i++) {
+ irq_desc[i].valid = 1;
+ irq_desc[i].probe_ok = 1;
+ irq_desc[i].mask_ack = nexuspci_mask_irq;
+ irq_desc[i].mask = nexuspci_mask_irq;
+ irq_desc[i].unmask = nexuspci_unmask_irq;
mask_irq(i);
+ }
}
diff --git a/include/asm-arm/arch-nexuspci/param.h b/include/asm-arm/arch-nexuspci/param.h
new file mode 100644
index 000000000..f663d01f2
--- /dev/null
+++ b/include/asm-arm/arch-nexuspci/param.h
@@ -0,0 +1,8 @@
+/*
+ * linux/include/asm-arm/arch-nexuspci/param.h
+ *
+ * Copyright (C) 1996 Russell King
+ * Copyright (C) 1998 Philip Blundell
+ */
+
+#define HZ 100
diff --git a/include/asm-arm/arch-rpc/irq.h b/include/asm-arm/arch-rpc/irq.h
index 9ef1bacc7..a65f487d4 100644
--- a/include/asm-arm/arch-rpc/irq.h
+++ b/include/asm-arm/arch-rpc/irq.h
@@ -5,130 +5,170 @@
*
* Changelog:
* 10-10-1996 RMK Brought up to date with arch-sa110eval
+ * 22-08-1998 RMK Restructured IRQ routines
*/
-#define BUILD_IRQ(s,n,m) \
- void IRQ##n##_interrupt(void); \
- void fast_IRQ##n##_interrupt(void); \
- void bad_IRQ##n##_interrupt(void); \
- void probe_IRQ##n##_interrupt(void);
+static void rpc_mask_irq_ack_a(unsigned int irq)
+{
+ unsigned int temp;
-/*
- * The timer is a special interrupt
- */
-#define IRQ5_interrupt timer_IRQ_interrupt
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" bic %0, %0, %1\n"
+" strb %0, [%2]\n"
+" strb %1, [%3]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA)),
+ "r" (ioaddr(IOMD_IRQCLRA)));
+}
-#define IRQ_INTERRUPT(n) IRQ##n##_interrupt
-#define FAST_INTERRUPT(n) fast_IRQ##n##_interrupt
-#define BAD_INTERRUPT(n) bad_IRQ##n##_interrupt
-#define PROBE_INTERRUPT(n) probe_IRQ##n##_interrupt
+static void rpc_mask_irq_a(unsigned int irq)
+{
+ unsigned int temp;
-#define X(x) (x)|0x01, (x)|0x02, (x)|0x04, (x)|0x08, (x)|0x10, (x)|0x20, (x)|0x40, (x)|0x80
-#define Z(x) (x), (x), (x), (x), (x), (x), (x), (x)
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" bic %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA)));
+}
-static __inline__ void mask_and_ack_irq(unsigned int irq)
+static void rpc_unmask_irq_a(unsigned int irq)
{
- static const int addrmasks[] = {
- X((IOMD_IRQMASKA - IOMD_BASE)<<18 | (1 << 15)),
- X((IOMD_IRQMASKB - IOMD_BASE)<<18),
- X((IOMD_DMAMASK - IOMD_BASE)<<18),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- X((IOMD_FIQMASK - IOMD_BASE)<<18),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0),
- Z(0)
- };
- unsigned int temp1, temp2;
+ unsigned int temp;
__asm__ __volatile__(
-" ldr %1, [%5, %3, lsl #2]\n"
-" teq %1, #0\n"
-" beq 2f\n"
-" ldrb %0, [%2, %1, lsr #16]\n"
+ "ldrb %0, [%2]\n"
+" orr %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA)));
+}
+
+static void rpc_mask_irq_b(unsigned int irq)
+{
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
" bic %0, %0, %1\n"
-" strb %0, [%2, %1, lsr #16]\n"
-" tst %1, #0x8000\n" /* do we need an IRQ clear? */
-" strneb %1, [%2, %4]\n"
-"2:"
- : "=&r" (temp1), "=&r" (temp2)
- : "r" (ioaddr(IOMD_BASE)), "r" (irq),
- "I" ((IOMD_IRQCLRA - IOMD_BASE) << 2), "r" (addrmasks));
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKB)));
}
-#undef X
-#undef Z
+static void rpc_unmask_irq_b(unsigned int irq)
+{
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" orr %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKB)));
+}
-static __inline__ void mask_irq(unsigned int irq)
+static void rpc_mask_irq_dma(unsigned int irq)
{
- extern void ecard_disableirq (unsigned int);
- extern void ecard_disablefiq (unsigned int);
- unsigned char mask = 1 << (irq & 7);
-
- switch (irq >> 3) {
- case 0:
- outb(inb(IOMD_IRQMASKA) & ~mask, IOMD_IRQMASKA);
- break;
- case 1:
- outb(inb(IOMD_IRQMASKB) & ~mask, IOMD_IRQMASKB);
- break;
- case 2:
- outb(inb(IOMD_DMAMASK) & ~mask, IOMD_DMAMASK);
- break;
- case 4:
- ecard_disableirq (irq & 7);
- break;
- case 8:
- outb(inb(IOMD_FIQMASK) & ~mask, IOMD_FIQMASK);
- break;
- case 12:
- ecard_disablefiq (irq & 7);
- }
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" bic %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_DMAMASK)));
}
-static __inline__ void unmask_irq(unsigned int irq)
+static void rpc_unmask_irq_dma(unsigned int irq)
{
- extern void ecard_enableirq (unsigned int);
- extern void ecard_enablefiq (unsigned int);
- unsigned char mask = 1 << (irq & 7);
-
- switch (irq >> 3) {
- case 0:
- outb(inb(IOMD_IRQMASKA) | mask, IOMD_IRQMASKA);
- break;
- case 1:
- outb(inb(IOMD_IRQMASKB) | mask, IOMD_IRQMASKB);
- break;
- case 2:
- outb(inb(IOMD_DMAMASK) | mask, IOMD_DMAMASK);
- break;
- case 4:
- ecard_enableirq (irq & 7);
- break;
- case 8:
- outb(inb(IOMD_FIQMASK) | mask, IOMD_FIQMASK);
- break;
- case 12:
- ecard_enablefiq (irq & 7);
- }
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" orr %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_DMAMASK)));
+}
+
+static void rpc_mask_irq_fiq(unsigned int irq)
+{
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" bic %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_FIQMASK)));
}
-static __inline__ unsigned long get_enabled_irqs(void)
+static void rpc_unmask_irq_fiq(unsigned int irq)
{
- return inb(IOMD_IRQMASKA) | inb(IOMD_IRQMASKB) << 8 | inb(IOMD_DMAMASK) << 16;
+ unsigned int temp;
+
+ __asm__ __volatile__(
+ "ldrb %0, [%2]\n"
+" orr %0, %0, %1\n"
+" strb %0, [%2]"
+ : "=&r" (temp)
+ : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_FIQMASK)));
}
static __inline__ void irq_init_irq(void)
{
+ extern void ecard_disableirq(unsigned int irq);
+ extern void ecard_enableirq(unsigned int irq);
+ int irq;
+
outb(0, IOMD_IRQMASKA);
outb(0, IOMD_IRQMASKB);
outb(0, IOMD_FIQMASK);
outb(0, IOMD_DMAMASK);
+
+ for (irq = 0; irq < NR_IRQS; irq++) {
+ switch (irq) {
+ case 0 ... 6:
+ irq_desc[irq].probe_ok = 1;
+ case 7:
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].mask_ack = rpc_mask_irq_ack_a;
+ irq_desc[irq].mask = rpc_mask_irq_a;
+ irq_desc[irq].unmask = rpc_unmask_irq_a;
+ break;
+
+ case 9 ... 15:
+ irq_desc[irq].probe_ok = 1;
+ case 8:
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].mask_ack = rpc_mask_irq_b;
+ irq_desc[irq].mask = rpc_mask_irq_b;
+ irq_desc[irq].unmask = rpc_unmask_irq_b;
+ break;
+
+ case 16 ... 22:
+ irq_desc[irq].valid = 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:
+ 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:
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].mask_ack = rpc_mask_irq_fiq;
+ irq_desc[irq].mask = rpc_mask_irq_fiq;
+ irq_desc[irq].unmask = rpc_unmask_irq_fiq;
+ break;
+ }
+ }
}
diff --git a/include/asm-arm/arch-rpc/irqs.h b/include/asm-arm/arch-rpc/irqs.h
index 1faaf758e..948ba961d 100644
--- a/include/asm-arm/arch-rpc/irqs.h
+++ b/include/asm-arm/arch-rpc/irqs.h
@@ -35,5 +35,3 @@
#define IRQ_TIMER IRQ_TIMER0
-#define irq_cannonicalize(i) (i)
-
diff --git a/include/asm-arm/arch-rpc/param.h b/include/asm-arm/arch-rpc/param.h
new file mode 100644
index 000000000..bd1279f60
--- /dev/null
+++ b/include/asm-arm/arch-rpc/param.h
@@ -0,0 +1,8 @@
+/*
+ * linux/include/asm-arm/arch-rpc/param.h
+ *
+ * Copyright (C) 1996 Russell King
+ * Copyright (C) 1998 Philip Blundell
+ */
+
+#define HZ 100
diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h
index 577d18d1e..7740f0c3f 100644
--- a/include/asm-arm/arch-rpc/uncompress.h
+++ b/include/asm-arm/arch-rpc/uncompress.h
@@ -141,3 +141,7 @@ static void arch_decomp_setup(void)
}
#endif
+/*
+ * nothing to do
+ */
+#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-vnc/a.out.h b/include/asm-arm/arch-vnc/a.out.h
index 0123eb29a..05f7c1d58 100644
--- a/include/asm-arm/arch-vnc/a.out.h
+++ b/include/asm-arm/arch-vnc/a.out.h
@@ -13,4 +13,3 @@
#endif
#endif
-
diff --git a/include/asm-arm/arch-vnc/dma.h b/include/asm-arm/arch-vnc/dma.h
index 96a265927..e6d042675 100644
--- a/include/asm-arm/arch-vnc/dma.h
+++ b/include/asm-arm/arch-vnc/dma.h
@@ -26,4 +26,3 @@ typedef enum {
#define MAX_DMA_CHANNELS 8
#endif /* _ASM_ARCH_DMA_H */
-
diff --git a/include/asm-arm/arch-vnc/hardware.h b/include/asm-arm/arch-vnc/hardware.h
index 947456659..b0021b724 100644
--- a/include/asm-arm/arch-vnc/hardware.h
+++ b/include/asm-arm/arch-vnc/hardware.h
@@ -118,4 +118,3 @@
#define PARAMS_BASE (PAGE_OFFSET + PARAMS_OFFSET)
#define SAFE_ADDR 0x50000000
-
diff --git a/include/asm-arm/arch-vnc/irq.h b/include/asm-arm/arch-vnc/irq.h
index 2273d433b..abf877dc9 100644
--- a/include/asm-arm/arch-vnc/irq.h
+++ b/include/asm-arm/arch-vnc/irq.h
@@ -2,6 +2,9 @@
* include/asm-arm/arch-vnc/irq.h
*
* Copyright (C) 1998 Russell King
+ *
+ * Changelog:
+ * 22-08-1998 RMK Restructured IRQ routines
*/
#include <asm/irq.h>
@@ -29,67 +32,48 @@ static int fb_irq_mask[16] = {
IRQ_MASK_PCI_ERR
};
-static __inline__ void mask_and_ack_irq(unsigned int irq)
+static void vnc_mask_csr_irq(unsigned int irq)
{
- if (irq < 16)
- *CSR_IRQ_DISABLE = fb_irq_mask[irq];
- else {
- unsigned int pic_mask, mask;
-
- if (irq < 24)
- pic_mask = PIC_MASK_LO;
- else
- pic_mask = PIC_MASK_HI;
-
- mask = 1 << (irq & 7);
-
- outb(inb(pic_mask) | mask, pic_mask);
- }
+ *CSR_IRQ_DISABLE = fb_irq_mask[irq];
}
-static __inline__ void mask_irq(unsigned int irq)
+static void vnc_unmask_csr_irq(unsigned int irq)
{
- if (irq < 16)
- *CSR_IRQ_DISABLE = fb_irq_mask[irq];
- else {
- unsigned int pic_mask, mask;
-
- if (irq < 24)
- pic_mask = PIC_MASK_LO;
- else
- pic_mask = PIC_MASK_HI;
+ *CSR_IRQ_DISABLE = fb_irq_mask[irq];
+}
- mask = 1 << (irq & 7);
+static void vnc_mask_pic_lo_irq(unsigned int irq)
+{
+ unsigned int mask = 1 << (irq & 7);
- outb(inb(pic_mask) | mask, pic_mask);
- }
+ outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO);
}
-static __inline__ void unmask_irq(unsigned int irq)
+static void vnc_unmask_pic_lo_irq(unsigned int irq)
{
- if (irq < 16)
- *CSR_IRQ_ENABLE = fb_irq_mask[irq];
- else {
- unsigned int pic_mask, mask;
+ unsigned int mask = 1 << (irq & 7);
- if (irq < 24)
- pic_mask = PIC_MASK_LO;
- else
- pic_mask = PIC_MASK_HI;
+ outb(inb(PIC_MASK_LO) & ~mask, PIC_MASK_LO);
+}
- mask = 1 << (irq & 7);
+static void vnc_mask_pic_hi_irq(unsigned int irq)
+{
+ unsigned int mask = 1 << (irq & 7);
- outb(inb(pic_mask) & ~mask, pic_mask);
- }
+ outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI);
}
-
-static __inline__ unsigned long get_enabled_irqs(void)
+
+static void vnc_unmask_pic_hi_irq(unsigned int irq)
{
- return 0;
+ unsigned int mask = 1 << (irq & 7);
+
+ outb(inb(PIC_MASK_HI) & ~mask, PIC_MASK_HI);
}
static __inline__ void irq_init_irq(void)
{
+ unsigned int irq;
+
outb(0x11, PIC_LO);
outb(0x10, PIC_MASK_LO);
outb(0x04, PIC_MASK_LO);
@@ -103,4 +87,23 @@ static __inline__ void irq_init_irq(void)
*CSR_IRQ_DISABLE = ~IRQ_MASK_EXTERN_IRQ;
*CSR_IRQ_ENABLE = IRQ_MASK_EXTERN_IRQ;
*CSR_FIQ_DISABLE = -1;
+
+ for (irq = 0; irq < NR_IRQS; irq++) {
+ irq_desc[irq].valid = 1;
+ irq_desc[irq].probe_ok = 1;
+
+ if (irq < 16) {
+ irq_desc[irq].mask_ack = vnc_mask_csr_irq;
+ irq_desc[irq].mask = vnc_mask_csr_irq;
+ irq_desc[irq].unmask = vnc_unmask_csr_irq;
+ } else if (irq < 24) {
+ irq_desc[irq].mask_ack = vnc_mask_pic_lo_irq;
+ irq_desc[irq].mask = vnc_mask_pic_lo_irq;
+ irq_desc[irq].unmask = vnc_unmask_pic_lo_irq;
+ } else {
+ irq_desc[irq].mask_ack = vnc_mask_pic_hi_irq;
+ irq_desc[irq].mask = vnc_mask_pic_hi_irq;
+ irq_desc[irq].unmask = vnc_unmask_pic_hi_irq;
+ }
+ }
}
diff --git a/include/asm-arm/arch-vnc/irqs.h b/include/asm-arm/arch-vnc/irqs.h
index 53e01a1d6..37b48c43d 100644
--- a/include/asm-arm/arch-vnc/irqs.h
+++ b/include/asm-arm/arch-vnc/irqs.h
@@ -60,4 +60,3 @@
#define IRQ_TIMER IRQ_TIMER0
#define irq_cannonicalize(i) (i)
-
diff --git a/include/asm-arm/arch-vnc/keyboard.h b/include/asm-arm/arch-vnc/keyboard.h
index 4620ff165..4498ecc9b 100644
--- a/include/asm-arm/arch-vnc/keyboard.h
+++ b/include/asm-arm/arch-vnc/keyboard.h
@@ -34,4 +34,3 @@ static unsigned char kbd_sysrq_xlate[NR_SCANCODES];
//#define kbd_sysrq_xlate ps2kbd_sysrq_xlate
#define kbd_disable_irq()
#define kbd_enable_irq()
-
diff --git a/include/asm-arm/arch-vnc/param.h b/include/asm-arm/arch-vnc/param.h
new file mode 100644
index 000000000..c86000125
--- /dev/null
+++ b/include/asm-arm/arch-vnc/param.h
@@ -0,0 +1,8 @@
+/*
+ * linux/include/asm-arm/arch-vnc/param.h
+ *
+ * Copyright (C) 1996 Russell King
+ * Copyright (C) 1998 Philip Blundell
+ */
+
+#define HZ 100
diff --git a/include/asm-arm/arch-vnc/uncompress.h b/include/asm-arm/arch-vnc/uncompress.h
index d5260b027..d6097d43f 100644
--- a/include/asm-arm/arch-vnc/uncompress.h
+++ b/include/asm-arm/arch-vnc/uncompress.h
@@ -31,3 +31,4 @@ static void puts(const char *s)
* nothing to do
*/
#define arch_decomp_setup()
+#define arch_decomp_wdog()
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
index df9e941db..48d688eb1 100644
--- a/include/asm-arm/atomic.h
+++ b/include/asm-arm/atomic.h
@@ -7,20 +7,22 @@
* 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
+typedef struct { int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+#ifdef __KERNEL__
#include <asm/system.h>
#ifdef __SMP__
#error SMP not supported
#endif
-typedef struct { int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) { (i) }
-
#define atomic_read(v) ((v)->counter)
#define atomic_set(v,i) (((v)->counter) = (i))
@@ -83,3 +85,4 @@ static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *addr
}
#endif
+#endif
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h
index 8dd37e026..c99a67292 100644
--- a/include/asm-arm/elf.h
+++ b/include/asm-arm/elf.h
@@ -30,7 +30,7 @@ typedef struct { void *null; } elf_fpregset_t;
#define ELF_ARCH EM_ARM
#define USE_ELF_CORE_DUMP
-#define ELF_EXEC_PAGESIZE 32768
+#define ELF_EXEC_PAGESIZE 4096
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
use of this is to invoke "./ld.so someprog" to test out a new version of
@@ -39,6 +39,11 @@ typedef struct { void *null; } elf_fpregset_t;
#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
+/* When the program starts, a1 contains a pointer to a function to be
+ registered with atexit, as per the SVR4 ABI. A value of 0 means we
+ have no such handler. */
+#define ELF_PLAT_INIT(_r) (_r)->ARM_r0 = 0
+
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. */
@@ -65,17 +70,4 @@ extern char elf_platform[];
current->personality = PER_LINUX_32BIT
#endif
-#define R_ARM_NONE (0)
-#define R_ARM_32 (1) /* => ld 32 */
-#define R_ARM_PC26 (2) /* => ld b/bl branches */
-#define R_ARM_PC32 (3)
-#define R_ARM_GOT32 (4) /* -> object relocation into GOT */
-#define R_ARM_PLT32 (5)
-#define R_ARM_COPY (6) /* => dlink copy object */
-#define R_ARM_GLOB_DAT (7) /* => dlink 32bit absolute address for .got */
-#define R_ARM_JUMP_SLOT (8) /* => dlink 32bit absolute address for .got.plt */
-#define R_ARM_RELATIVE (9) /* => ld resolved 32bit absolute address requiring load address adjustment */
-#define R_ARM_GOTOFF (10) /* => ld calculates offset of data from base of GOT */
-#define R_ARM_GOTPC (11) /* => ld 32-bit relative offset */
-
#endif
diff --git a/include/asm-arm/fcntl.h b/include/asm-arm/fcntl.h
index af29f7f46..a9e469a49 100644
--- a/include/asm-arm/fcntl.h
+++ b/include/asm-arm/fcntl.h
@@ -28,6 +28,8 @@
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
+#define F_SETSIG 10 /* for sockets. */
+#define F_GETSIG 11 /* for sockets. */
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
diff --git a/include/asm-arm/fiq.h b/include/asm-arm/fiq.h
index 2203fa2a5..0516d115a 100644
--- a/include/asm-arm/fiq.h
+++ b/include/asm-arm/fiq.h
@@ -1,32 +1,34 @@
-/* Support for FIQ on ARM architectures.
+/*
+ * linux/include/asm-arm/fiq.h
+ *
+ * Support for FIQ on ARM architectures.
* Written by Philip Blundell <philb@gnu.org>, 1998
+ * Re-written by Russell King
*/
#ifndef __ASM_FIQ_H
#define __ASM_FIQ_H
-struct fiq_handler {
- const char *name;
- int (*callback)(void);
-};
-
-extern int claim_fiq(struct fiq_handler *f);
-extern void release_fiq(struct fiq_handler *f);
-
-#endif
-/* Support for FIQ on ARM architectures.
- * Written by Philip Blundell <philb@gnu.org>, 1998
- */
-
-#ifndef __ASM_FIQ_H
-#define __ASM_FIQ_H
+#include <asm/ptrace.h>
struct fiq_handler {
- const char *name;
- int (*callback)(void);
+ struct fiq_handler *next;
+ /* Name
+ */
+ const char *name;
+ /* Called to ask driver to relinquish/
+ * reacquire FIQ
+ * return zero to accept, or -<errno>
+ */
+ int (*fiq_op)(void *, int relinquish);
+ /* data for the relinquish/reacquire functions
+ */
+ void *dev_id;
};
extern int claim_fiq(struct fiq_handler *f);
extern void release_fiq(struct fiq_handler *f);
+extern void set_fiq_handler(void *start, unsigned int length);
+extern void set_fiq_regs(struct pt_regs *regs);
#endif
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 09713cda9..10b20184a 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -15,6 +15,7 @@
#include <asm/hardware.h>
#include <asm/arch/mmu.h>
#include <asm/arch/io.h>
+#include <asm/proc/io.h>
/* unsigned long virt_to_phys(void *x) */
#define virt_to_phys(x) (__virt_to_phys((unsigned long)(x)))
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h
index 99b949ddb..59770101e 100644
--- a/include/asm-arm/irq.h
+++ b/include/asm-arm/irq.h
@@ -3,6 +3,8 @@
#include <asm/arch/irqs.h>
+#define irq_cannonicalize(i) (i)
+
#ifndef NR_IRQS
#define NR_IRQS 128
#endif
diff --git a/include/asm-arm/linux_logo.h b/include/asm-arm/linux_logo.h
index b10646254..9eeae3619 100644
--- a/include/asm-arm/linux_logo.h
+++ b/include/asm-arm/linux_logo.h
@@ -11,17 +11,26 @@
#define linux_logo_banner "ARM Linux version " UTS_RELEASE
-#define LINUX_LOGO_COLORS 0
+#define LINUX_LOGO_COLORS 221
-unsigned char linux_logo_red[] __initdata = { };
-unsigned char linux_logo_green[] __initdata = { };
-unsigned char linux_logo_blue[] __initdata = { };
+#ifdef INCLUDE_LINUX_LOGO_DATA
-unsigned char linux_logo16_red[] __initdata = { };
-unsigned char linux_logo16_green[] __initdata = { };
-unsigned char linux_logo16_blue[] __initdata = { };
+#define INCLUDE_LINUX_LOGO16
+#include <linux/linux_logo.h>
-unsigned char linux_logo[] __initdata = { };
-unsigned char linux_logo16[] __initdata = { };
-unsigned char linux_logo_bw[] __initdata = { };
+/* prototypes only */
+extern unsigned char linux_logo_red[];
+extern unsigned char linux_logo_green[];
+extern unsigned char linux_logo_blue[];
+extern unsigned char linux_logo[];
+extern unsigned char linux_logo_bw[];
+extern unsigned char linux_logo16_red[];
+extern unsigned char linux_logo16_green[];
+extern unsigned char linux_logo16_blue[];
+extern unsigned char linux_logo16[];
+extern unsigned char *linux_serial_image;
+
+extern int (*console_show_logo)(void);
+
+#endif
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index c447459a0..5512cdd4c 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -9,4 +9,7 @@
extern int do_check_pgt_cache(int, int);
+/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
+#define PageSkip(page) (0)
+
#endif /* _ASMARM_PGTABLE_H */
diff --git a/include/asm-arm/proc-armo/io.h b/include/asm-arm/proc-armo/io.h
new file mode 100644
index 000000000..84143003e
--- /dev/null
+++ b/include/asm-arm/proc-armo/io.h
@@ -0,0 +1,8 @@
+/*
+ * 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/pgtable.h b/include/asm-arm/proc-armo/pgtable.h
index ef732f784..10631f7b2 100644
--- a/include/asm-arm/proc-armo/pgtable.h
+++ b/include/asm-arm/proc-armo/pgtable.h
@@ -128,6 +128,7 @@ extern __inline__ void update_memc_addr(struct mm_struct *mm, unsigned long addr
*/
#define VMALLOC_START 0x01a00000
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#define VMALLOC_END 0x01c00000
#define _PAGE_PRESENT 0x01
#define _PAGE_READONLY 0x02
diff --git a/include/asm-arm/proc-armo/ptrace.h b/include/asm-arm/proc-armo/ptrace.h
index 6468fb549..30a05ecdc 100644
--- a/include/asm-arm/proc-armo/ptrace.h
+++ b/include/asm-arm/proc-armo/ptrace.h
@@ -44,12 +44,12 @@ struct pt_regs {
#define CC_Z_BIT (1 << 30)
#define CC_N_BIT (1 << 31)
-#define user_mode(regs) \
- (((regs)->ARM_pc & MODE_MASK) == USR26_MODE)
-
#define processor_mode(regs) \
((regs)->ARM_pc & MODE_MASK)
+#define user_mode(regs) \
+ (processor_mode(regs) == USR26_MODE)
+
#define interrupts_enabled(regs) \
(!((regs)->ARM_pc & I_BIT))
@@ -59,7 +59,17 @@ struct pt_regs {
#define condition_codes(regs) \
((regs)->ARM_pc & (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT))
-#define instruction_pointer(regs) ((regs)->ARM_pc & 0x03fffffc)
-#define pc_pointer(v) ((v) & 0x03fffffc)
+#define pc_pointer(v) \
+ ((v) & 0x03fffffc)
+
+#define instruction_pointer(regs) \
+ (pc_pointer((regs)->ARM_pc))
+
+/* Are the current registers suitable for user mode?
+ * (used to maintain security in signal handlers)
+ */
+#define valid_user_regs(regs) \
+ (user_mode(regs) && ((regs)->ARM_sp & 3) == 0)
+
#endif
diff --git a/include/asm-arm/proc-armv/io.h b/include/asm-arm/proc-armv/io.h
new file mode 100644
index 000000000..949d41010
--- /dev/null
+++ b/include/asm-arm/proc-armv/io.h
@@ -0,0 +1,38 @@
+/*
+ * 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 { \
+ processor.u.armv3v4._cache_purge_area(_start,(_start+_size)); \
+ } while (0)
+
+#define dma_cache_wback(_start,_size) \
+ do { \
+ processor.u.armv3v4._cache_wback_area(_start,(_start+_size)); \
+ } while (0)
+
+#define dma_cache_wback_inv(_start,_size) \
+ do { \
+ processor.u.armv3v4._flush_cache_area(_start,(_start+_size),0); \
+ } while (0)
diff --git a/include/asm-arm/proc-armv/param.h b/include/asm-arm/proc-armv/param.h
index fa22ce2d3..45bb5662d 100644
--- a/include/asm-arm/proc-armv/param.h
+++ b/include/asm-arm/proc-armv/param.h
@@ -7,9 +7,7 @@
#ifndef __ASM_PROC_PARAM_H
#define __ASM_PROC_PARAM_H
-#ifndef HZ
-#define HZ 100
-#endif
+#include <asm/arch/param.h> /* for HZ */
#define EXEC_PAGESIZE 4096
diff --git a/include/asm-arm/proc-armv/pgtable.h b/include/asm-arm/proc-armv/pgtable.h
index 60b670fc2..f3f740373 100644
--- a/include/asm-arm/proc-armv/pgtable.h
+++ b/include/asm-arm/proc-armv/pgtable.h
@@ -145,6 +145,7 @@
#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)
/* PMD types (actually level 1 descriptor) */
#define PMD_TYPE_MASK 0x0003
@@ -199,7 +200,7 @@
#define PAGE_SHARED __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_READ | _PTE_WRITE)
#define PAGE_COPY __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_READ)
#define PAGE_READONLY __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_READ)
-#define PAGE_KERNEL __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_DIRTY | _PTE_WRITE)
+#define PAGE_KERNEL __pgprot(PTE_TYPE_SMALL | _PTE_READ | _PTE_DIRTY | _PTE_WRITE)
#define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_USER))
#define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL))
diff --git a/include/asm-arm/proc-armv/ptrace.h b/include/asm-arm/proc-armv/ptrace.h
index 42a56433f..213c17ce7 100644
--- a/include/asm-arm/proc-armv/ptrace.h
+++ b/include/asm-arm/proc-armv/ptrace.h
@@ -71,5 +71,11 @@ struct pt_regs {
#define instruction_pointer(regs) ((regs)->ARM_pc)
#define pc_pointer(v) (v)
+/* Are the current registers suitable for user mode?
+ * (used to maintain security in signal handlers)
+ */
+#define valid_user_regs(regs) \
+ (user_mode(regs) && ((regs)->ARM_sp & 3) == 0)
+
#endif
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
index 4f8a48d06..e3b35c9f2 100644
--- a/include/asm-arm/proc-fns.h
+++ b/include/asm-arm/proc-fns.h
@@ -83,6 +83,14 @@ extern struct processor {
* flush an icached page
*/
void (*_flush_icache_area)(unsigned long start, unsigned long end);
+ /*
+ * 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);
} armv3v4;
struct {
/* MEMC
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h
index d12829171..edab09ace 100644
--- a/include/asm-arm/processor.h
+++ b/include/asm-arm/processor.h
@@ -22,12 +22,15 @@ union fp_state {
typedef unsigned long mm_segment_t; /* domain register */
+#define NR_DEBUGS 5
+
#define DECLARE_THREAD_STRUCT \
struct thread_struct { \
unsigned long address; /* Address of fault */ \
unsigned long trap_no; /* Trap number */ \
unsigned long error_code; /* Error code of trap */ \
union fp_state fpstate; /* FPE save state */ \
+ unsigned long debug[NR_DEBUGS]; /* Debug/ptrace */ \
EXTRA_THREAD_STRUCT \
}
@@ -39,6 +42,7 @@ struct thread_struct { \
0, \
0, \
{ { { 0, }, }, }, \
+ { 0, }, \
EXTRA_THREAD_STRUCT_INIT \
}
diff --git a/include/asm-arm/siginfo.h b/include/asm-arm/siginfo.h
index bcec2810f..2dec6e080 100644
--- a/include/asm-arm/siginfo.h
+++ b/include/asm-arm/siginfo.h
@@ -87,6 +87,7 @@ typedef struct siginfo {
#define SI_TIMER -2 /* sent by timer expiration */
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
+#define SI_SIGIO -5 /* sent by queued SIGIO */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h
index d171f77bf..08b5edb50 100644
--- a/include/asm-arm/signal.h
+++ b/include/asm-arm/signal.h
@@ -115,8 +115,9 @@ typedef unsigned long sigset_t;
* SA_INTERRUPT is also used by the irq handling routines.
* SA_SHIRQ is for shared interrupt support on PCI and EISA.
*/
-#define SA_PROBE SA_ONESHOT
-#define SA_SAMPLE_RANDOM SA_RESTART
+#define SA_PROBE 0x80000000
+#define SA_SAMPLE_RANDOM 0x10000000
+#define SA_IRQNOMASK 0x08000000
#define SA_SHIRQ 0x04000000
#endif
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index a952afe52..e72553f1a 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -6,8 +6,13 @@
/*
* Your basic spinlocks, allowing only a single CPU anywhere
*/
-typedef struct { } spinlock_t;
-#define SPIN_LOCK_UNLOCKED { }
+#if (__GNUC__ > 2) || (__GNUC_MINOR__ >= 8)
+ typedef struct { } spinlock_t;
+# define SPIN_LOCK_UNLOCKED { }
+#else
+ typedef unsigned char spinlock_t;
+# define SPIN_LOCK_UNLOCKED 0
+#endif
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) do { } while(0)
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 88148d4cd..1d7e28b0b 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -1,6 +1,16 @@
#ifndef __ASM_ARM_SYSTEM_H
#define __ASM_ARM_SYSTEM_H
+/* The type of machine we're running on */
+extern unsigned int machine_type;
+#define MACH_TYPE_EBSA110 0
+#define MACH_TYPE_RISCPC 1
+#define MACH_TYPE_NEXUSPCI 3
+#define MACH_TYPE_EBSA285 4
+#define MACH_TYPE_NETWINDER 5
+#define MACH_TYPE_CATS 6
+#define MACH_TYPE_TBOX 7
+
#include <linux/kernel.h>
#include <asm/proc-fns.h>
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h
index 30b4950fe..5e4c118a9 100644
--- a/include/asm-arm/uaccess.h
+++ b/include/asm-arm/uaccess.h
@@ -60,8 +60,11 @@ extern inline int verify_area(int type, const void * addr, unsigned long size)
static __inline__ unsigned long copy_from_user(void *to, const void *from, unsigned long n)
{
- if (access_ok(VERIFY_READ, from, n))
+ char *end = (char *)to + n;
+ if (access_ok(VERIFY_READ, from, n)) {
__do_copy_from_user(to, from, n);
+ if (n) memset(end - n, 0, n);
+ }
return n;
}
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index 5ec2e008d..780b7a13c 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -319,6 +319,7 @@ static inline _syscall0(int,sync);
static inline _syscall0(pid_t,setsid);
static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count);
static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
+static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count);
static inline _syscall1(int,dup,int,fd);
static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp);
static inline _syscall3(int,open,const char *,file,int,flag,int,mode);
diff --git a/include/asm-arm/vga.h b/include/asm-arm/vga.h
new file mode 100644
index 000000000..6a9278df9
--- /dev/null
+++ b/include/asm-arm/vga.h
@@ -0,0 +1,11 @@
+#ifndef ASMARM_VGA_H
+#define ASMARM_VGA_H
+
+#include <asm/io.h>
+
+#define VGA_MAP_MEM(x) (0xe0000000 + (x))
+
+#define vga_readb(x) (*(x))
+#define vga_writeb(x,y) (*(y) = (x))
+
+#endif