summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@penguin.transmeta.com>2002-02-26 01:01:21 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-02-26 01:01:21 -0800
commitb324327d29bc4b8808e9eb6b6c7b2ee86a7fa6f0 (patch)
treeea4ca714db77296fd5f23ad09ac37f3b16d92a2e /include
parentdde3d25b04f05c43d13ec2d8bc16aae5af2a9799 (diff)
parente51b59f61845f132d7d3fde1010296f9397c147d (diff)
Merge bk://bk.arm.linux.org.uk
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-adifcc/irq.h13
-rw-r--r--include/asm-arm/arch-adifcc/irqs.h8
-rw-r--r--include/asm-arm/arch-anakin/irq.h19
-rw-r--r--include/asm-arm/arch-anakin/time.h2
-rw-r--r--include/asm-arm/arch-arc/irq.h10
-rw-r--r--include/asm-arm/arch-arc/time.h2
-rw-r--r--include/asm-arm/arch-cl7500/time.h2
-rw-r--r--include/asm-arm/arch-clps711x/irq.h20
-rw-r--r--include/asm-arm/arch-clps711x/time.h2
-rw-r--r--include/asm-arm/arch-ebsa110/irq.h13
-rw-r--r--include/asm-arm/arch-ebsa110/time.h2
-rw-r--r--include/asm-arm/arch-ebsa285/irq.h33
-rw-r--r--include/asm-arm/arch-ebsa285/time.h2
-rw-r--r--include/asm-arm/arch-epxa10db/irq.h20
-rw-r--r--include/asm-arm/arch-epxa10db/time.h2
-rw-r--r--include/asm-arm/arch-epxa10db/uncompress.h12
-rw-r--r--include/asm-arm/arch-integrator/irq.h20
-rw-r--r--include/asm-arm/arch-integrator/time.h2
-rw-r--r--include/asm-arm/arch-iop310/irq.h13
-rw-r--r--include/asm-arm/arch-l7200/irq.h12
-rw-r--r--include/asm-arm/arch-l7200/time.h2
-rw-r--r--include/asm-arm/arch-nexuspci/irq.h14
-rw-r--r--include/asm-arm/arch-nexuspci/time.h2
-rw-r--r--include/asm-arm/arch-rpc/irq.h14
-rw-r--r--include/asm-arm/arch-rpc/time.h2
-rw-r--r--include/asm-arm/arch-sa1100/assabet.h2
-rw-r--r--include/asm-arm/arch-sa1100/badge4.h74
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h20
-rw-r--r--include/asm-arm/arch-sa1100/ide.h2
-rw-r--r--include/asm-arm/arch-sa1100/irq.h13
-rw-r--r--include/asm-arm/arch-sa1100/irqs.h1
-rw-r--r--include/asm-arm/arch-sa1100/stork.h164
-rw-r--r--include/asm-arm/arch-sa1100/time.h2
-rw-r--r--include/asm-arm/arch-shark/hardware.h3
-rw-r--r--include/asm-arm/arch-shark/irq.h10
-rw-r--r--include/asm-arm/arch-shark/keyboard.h2
-rw-r--r--include/asm-arm/arch-shark/param.h6
-rw-r--r--include/asm-arm/arch-shark/time.h68
-rw-r--r--include/asm-arm/arch-tbox/irq.h13
-rw-r--r--include/asm-arm/arch-tbox/time.h2
-rw-r--r--include/asm-arm/bitops.h17
-rw-r--r--include/asm-arm/cpu-multi32.h19
-rw-r--r--include/asm-arm/cpu-single.h7
-rw-r--r--include/asm-arm/glue.h78
-rw-r--r--include/asm-arm/io.h6
-rw-r--r--include/asm-arm/irq.h14
-rw-r--r--include/asm-arm/mach/irq.h110
-rw-r--r--include/asm-arm/mmu.h4
-rw-r--r--include/asm-arm/mmu_context.h23
-rw-r--r--include/asm-arm/page.h15
-rw-r--r--include/asm-arm/pci.h24
-rw-r--r--include/asm-arm/proc-armv/cache.h138
-rw-r--r--include/asm-arm/procinfo.h10
-rw-r--r--include/asm-arm/system.h4
54 files changed, 601 insertions, 493 deletions
diff --git a/include/asm-arm/arch-adifcc/irq.h b/include/asm-arm/arch-adifcc/irq.h
deleted file mode 100644
index 9477252c7971..000000000000
--- a/include/asm-arm/arch-adifcc/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * linux/include/asm-arm/arch-adifcc/irq.h
- *
- * Copyright (C) 2001 MontaVista Software, Inc.
- *
- * 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 fixup_irq(irq) (irq)
-
-
diff --git a/include/asm-arm/arch-adifcc/irqs.h b/include/asm-arm/arch-adifcc/irqs.h
index fc390753716a..b559ca79ef80 100644
--- a/include/asm-arm/arch-adifcc/irqs.h
+++ b/include/asm-arm/arch-adifcc/irqs.h
@@ -18,11 +18,3 @@
#define NR_IRQS NR_XS80200_IRQS
#define IRQ_XSCALE_PMU IRQ_XS80200_PMU
-
-#ifdef CONFIG_XSCALE_ADI_EVB
-
-/* Interrupts available on the ADI Eval Board */
-
-#endif
-
-
diff --git a/include/asm-arm/arch-anakin/irq.h b/include/asm-arm/arch-anakin/irq.h
deleted file mode 100644
index e31ec96b1cad..000000000000
--- a/include/asm-arm/arch-anakin/irq.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * linux/include/asm-arm/arch-anakin/irq.h
- *
- * Copyright (C) 2001 Aleph One Ltd. for Acunia N.V.
- *
- * 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-Apr-2001 TTC Created
- */
-
-#ifndef __ASM_ARCH_IRQ_H
-#define __ASM_ARCH_IRQ_H
-
-#define fixup_irq(i) i
-
-#endif
diff --git a/include/asm-arm/arch-anakin/time.h b/include/asm-arm/arch-anakin/time.h
index 88d1c6efee1e..68f92de7a87d 100644
--- a/include/asm-arm/arch-anakin/time.h
+++ b/include/asm-arm/arch-anakin/time.h
@@ -24,7 +24,7 @@ void __init time_init(void)
{
timer_irq.handler = anakin_timer_interrupt;
timer_irq.flags = SA_INTERRUPT;
- setup_arm_irq(IRQ_TICK, &timer_irq);
+ setup_irq(IRQ_TICK, &timer_irq);
}
#endif
diff --git a/include/asm-arm/arch-arc/irq.h b/include/asm-arm/arch-arc/irq.h
deleted file mode 100644
index 4951c6995168..000000000000
--- a/include/asm-arm/arch-arc/irq.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * linux/include/asm-arm/arch-arc/irq.h
- *
- * 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 fixup_irq(x) (x)
diff --git a/include/asm-arm/arch-arc/time.h b/include/asm-arm/arch-arc/time.h
index 394bb5388614..6d980227fc6c 100644
--- a/include/asm-arm/arch-arc/time.h
+++ b/include/asm-arm/arch-arc/time.h
@@ -30,5 +30,5 @@ void __init time_init(void)
timer_irq.handler = timer_interrupt;
- setup_arm_irq(IRQ_TIMER, &timer_irq);
+ setup_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/arch-cl7500/time.h b/include/asm-arm/arch-cl7500/time.h
index a63ea1e75dc4..adf3096e85da 100644
--- a/include/asm-arm/arch-cl7500/time.h
+++ b/include/asm-arm/arch-cl7500/time.h
@@ -37,5 +37,5 @@ void __init time_init(void)
timer_irq.handler = timer_interrupt;
- setup_arm_irq(IRQ_TIMER, &timer_irq);
+ setup_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/arch-clps711x/irq.h b/include/asm-arm/arch-clps711x/irq.h
deleted file mode 100644
index 7dde5e3f7096..000000000000
--- a/include/asm-arm/arch-clps711x/irq.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * linux/include/asm-arm/arch-clps711x/irq.h
- *
- * 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
- */
-#define fixup_irq(i) (i)
diff --git a/include/asm-arm/arch-clps711x/time.h b/include/asm-arm/arch-clps711x/time.h
index d6040c294439..635356dd62b0 100644
--- a/include/asm-arm/arch-clps711x/time.h
+++ b/include/asm-arm/arch-clps711x/time.h
@@ -39,5 +39,5 @@ void __init time_init(void)
{
clps711x_setup_timer();
timer_irq.handler = p720t_timer_interrupt;
- setup_arm_irq(IRQ_TC2OI, &timer_irq);
+ setup_irq(IRQ_TC2OI, &timer_irq);
}
diff --git a/include/asm-arm/arch-ebsa110/irq.h b/include/asm-arm/arch-ebsa110/irq.h
deleted file mode 100644
index 4d83d1aaf7aa..000000000000
--- a/include/asm-arm/arch-ebsa110/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * linux/include/asm-arm/arch-ebsa110/irq.h
- *
- * Copyright (C) 1996-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.
- *
- * Changelog:
- * 22-08-1998 RMK Restructured IRQ routines
- */
-#define fixup_irq(i) (i)
diff --git a/include/asm-arm/arch-ebsa110/time.h b/include/asm-arm/arch-ebsa110/time.h
index b1bab596e9dc..278c8e3632a1 100644
--- a/include/asm-arm/arch-ebsa110/time.h
+++ b/include/asm-arm/arch-ebsa110/time.h
@@ -39,7 +39,7 @@ void __init time_init(void)
timer_irq.handler = timer_interrupt;
- setup_arm_irq(IRQ_EBSA110_TIMER0, &timer_irq);
+ setup_irq(IRQ_EBSA110_TIMER0, &timer_irq);
}
diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h
deleted file mode 100644
index a843e992f28c..000000000000
--- a/include/asm-arm/arch-ebsa285/irq.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * linux/include/asm-arm/arch-ebsa285/irq.h
- *
- * Copyright (C) 1996-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.
- *
- * 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/hardware/dec21285.h>
-#include <asm/irq.h>
-#include <asm/mach-types.h>
-
-int isa_irq = -1;
-
-static inline int fixup_irq(unsigned int irq)
-{
-#ifdef PCIIACK_BASE
- if (irq == isa_irq)
- irq = *(unsigned char *)PCIIACK_BASE;
-#endif
-
- return irq;
-}
-
diff --git a/include/asm-arm/arch-ebsa285/time.h b/include/asm-arm/arch-ebsa285/time.h
index 111bf6e306d8..7b40c671daad 100644
--- a/include/asm-arm/arch-ebsa285/time.h
+++ b/include/asm-arm/arch-ebsa285/time.h
@@ -270,5 +270,5 @@ void __init time_init(void)
timer_irq.handler = isa_timer_interrupt;
irq = IRQ_ISA_TIMER;
}
- setup_arm_irq(irq, &timer_irq);
+ setup_irq(irq, &timer_irq);
}
diff --git a/include/asm-arm/arch-epxa10db/irq.h b/include/asm-arm/arch-epxa10db/irq.h
deleted file mode 100644
index a6c3f3adbb5b..000000000000
--- a/include/asm-arm/arch-epxa10db/irq.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * linux/include/asm-arm/arch-epxa10/irq.h
- *
- * Copyright (C) 1999 ARM Limited
- *
- * 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
- */
-#define fixup_irq(i) (i)
diff --git a/include/asm-arm/arch-epxa10db/time.h b/include/asm-arm/arch-epxa10db/time.h
index 7f0e6a7c0d00..a025bbe65626 100644
--- a/include/asm-arm/arch-epxa10db/time.h
+++ b/include/asm-arm/arch-epxa10db/time.h
@@ -48,7 +48,7 @@ void __init time_init(void)
/*
* Make irqs happen for the system timer
*/
- setup_arm_irq(IRQ_TIMER0, &timer_irq);
+ setup_irq(IRQ_TIMER0, &timer_irq);
/* Start the timer */
*TIMER0_LIMIT(IO_ADDRESS(EXC_TIMER00_BASE))=(unsigned int)(EXC_AHB2_CLK_FREQUENCY/200);
diff --git a/include/asm-arm/arch-epxa10db/uncompress.h b/include/asm-arm/arch-epxa10db/uncompress.h
index 0b037724249c..f30a31fa5270 100644
--- a/include/asm-arm/arch-epxa10db/uncompress.h
+++ b/include/asm-arm/arch-epxa10db/uncompress.h
@@ -29,14 +29,18 @@
static void puts(const char *s)
{
while (*s) {
- while ((*UART_TSR(IO_ADDRESS(EXC_UART00_BASE)) & UART_TSR_TX_LEVEL_MSK)==15);
+ while ((*UART_TSR(EXC_UART00_BASE) &
+ UART_TSR_TX_LEVEL_MSK)==15)
+ barrier();
- *UART_TD(IO_ADDRESS(EXC_UART00_BASE)) = *s;
+ *UART_TD(EXC_UART00_BASE) = *s;
if (*s == '\n') {
- while ((*UART_TSR(IO_ADDRESS(EXC_UART00_BASE)) & UART_TSR_TX_LEVEL_MSK)==15);
+ while ((*UART_TSR(EXC_UART00_BASE) &
+ UART_TSR_TX_LEVEL_MSK)==15)
+ barrier();
- *UART_TD(IO_ADDRESS(EXC_UART00_BASE)) = '\r';
+ *UART_TD(EXC_UART00_BASE) = '\r';
}
s++;
}
diff --git a/include/asm-arm/arch-integrator/irq.h b/include/asm-arm/arch-integrator/irq.h
deleted file mode 100644
index c07c83cf8e0f..000000000000
--- a/include/asm-arm/arch-integrator/irq.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * linux/include/asm-arm/arch-integrator/irq.h
- *
- * Copyright (C) 1999 ARM Limited
- *
- * 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
- */
-#define fixup_irq(i) (i)
diff --git a/include/asm-arm/arch-integrator/time.h b/include/asm-arm/arch-integrator/time.h
index 40b48370c692..6ed75675387e 100644
--- a/include/asm-arm/arch-integrator/time.h
+++ b/include/asm-arm/arch-integrator/time.h
@@ -135,6 +135,6 @@ void __init time_init(void)
/*
* Make irqs happen for the system timer
*/
- setup_arm_irq(IRQ_TIMERINT1, &timer_irq);
+ setup_irq(IRQ_TIMERINT1, &timer_irq);
gettimeoffset = integrator_gettimeoffset;
}
diff --git a/include/asm-arm/arch-iop310/irq.h b/include/asm-arm/arch-iop310/irq.h
deleted file mode 100644
index 33c0866c1275..000000000000
--- a/include/asm-arm/arch-iop310/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * linux/include/asm-arm/arch-iop80310/irq.h
- *
- * Copyright (C) 2001 MontaVista Software, Inc.
- *
- * 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 fixup_irq(irq) (irq)
-
-
diff --git a/include/asm-arm/arch-l7200/irq.h b/include/asm-arm/arch-l7200/irq.h
deleted file mode 100644
index c605a8c28698..000000000000
--- a/include/asm-arm/arch-l7200/irq.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * include/asm-arm/arch-l7200/irq.h
- *
- * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.ne
- * Steve Hill (sjhill@cotw.com)
- *
- * Changelog:
- * 01-02-2000 RS Created l7200 version, derived from ebsa110 code
- * 04-15-2000 RS Made dependent on hardware.h
- * 05-05-2000 SJH Complete rewrite
- */
-#define fixup_irq(x) (x)
diff --git a/include/asm-arm/arch-l7200/time.h b/include/asm-arm/arch-l7200/time.h
index 27a872c63f01..727c32a96a89 100644
--- a/include/asm-arm/arch-l7200/time.h
+++ b/include/asm-arm/arch-l7200/time.h
@@ -58,7 +58,7 @@ void __init time_init(void)
timer_irq.handler = timer_interrupt;
- setup_arm_irq(IRQ_RTC_TICK, &timer_irq);
+ setup_irq(IRQ_RTC_TICK, &timer_irq);
RTC_RTCCR = RTC_RATE_128 | RTC_EN_TIC; /* Set rate and enable timer */
}
diff --git a/include/asm-arm/arch-nexuspci/irq.h b/include/asm-arm/arch-nexuspci/irq.h
deleted file mode 100644
index 4690e88438bb..000000000000
--- a/include/asm-arm/arch-nexuspci/irq.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * include/asm-arm/arch-nexuspci/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.
- */
-#define fixup_irq(x) (x)
-
diff --git a/include/asm-arm/arch-nexuspci/time.h b/include/asm-arm/arch-nexuspci/time.h
index ba453c17637e..ba09e7bb3ee9 100644
--- a/include/asm-arm/arch-nexuspci/time.h
+++ b/include/asm-arm/arch-nexuspci/time.h
@@ -55,5 +55,5 @@ void __init time_init(void)
timer_irq.handler = timer_interrupt;
timer_irq.flags = SA_SHIRQ;
- setup_arm_irq(IRQ_TIMER, &timer_irq);
+ setup_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/arch-rpc/irq.h b/include/asm-arm/arch-rpc/irq.h
deleted file mode 100644
index 4446afbb29a4..000000000000
--- a/include/asm-arm/arch-rpc/irq.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * linux/include/asm-arm/arch-rpc/irq.h
- *
- * 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.
- *
- * Changelog:
- * 10-10-1996 RMK Brought up to date with arch-sa110eval
- * 22-08-1998 RMK Restructured IRQ routines
- */
-#define fixup_irq(x) (x)
diff --git a/include/asm-arm/arch-rpc/time.h b/include/asm-arm/arch-rpc/time.h
index 4fa255bc6fc7..189595c68fce 100644
--- a/include/asm-arm/arch-rpc/time.h
+++ b/include/asm-arm/arch-rpc/time.h
@@ -30,5 +30,5 @@ void __init time_init(void)
timer_irq.handler = timer_interrupt;
- setup_arm_irq(IRQ_TIMER, &timer_irq);
+ setup_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/arch-sa1100/assabet.h b/include/asm-arm/arch-sa1100/assabet.h
index f9df2064573d..35754657b1e3 100644
--- a/include/asm-arm/arch-sa1100/assabet.h
+++ b/include/asm-arm/arch-sa1100/assabet.h
@@ -62,7 +62,7 @@ extern unsigned long SCR_value;
#ifdef CONFIG_SA1100_ASSABET
extern void ASSABET_BCR_frob(unsigned int mask, unsigned int set);
#else
-#define ASSABET_BCR_frob(x) do { } while (0)
+#define ASSABET_BCR_frob(x,y) do { } while (0)
#endif
#define ASSABET_BCR_set(x) ASSABET_BCR_frob((x), (x))
diff --git a/include/asm-arm/arch-sa1100/badge4.h b/include/asm-arm/arch-sa1100/badge4.h
new file mode 100644
index 000000000000..5d9177fa7837
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/badge4.h
@@ -0,0 +1,74 @@
+/*
+ * linux/include/asm-arm/arch-sa1100/badge4.h
+ *
+ * Tim Connors <connors@hpl.hp.com>
+ * Christopher Hoover <ch@hpl.hp.com>
+ *
+ * Copyright (C) 2002 Hewlett-Packard Company
+ *
+ * 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_HARDWARE_H
+#error "include <asm/hardware.h> instead"
+#endif
+
+#define BADGE4_SA1111_BASE (0x48000000)
+
+/* GPIOs on the BadgePAD 4 */
+#define BADGE4_GPIO_INT_1111 GPIO_GPIO0 /* SA-1111 IRQ */
+
+#define BADGE4_GPIO_INT_VID GPIO_GPIO1 /* Video expansion */
+#define BADGE4_GPIO_LGP2 GPIO_GPIO2 /* GPIO_LDD8 */
+#define BADGE4_GPIO_LGP3 GPIO_GPIO3 /* GPIO_LDD9 */
+#define BADGE4_GPIO_LGP4 GPIO_GPIO4 /* GPIO_LDD10 */
+#define BADGE4_GPIO_LGP5 GPIO_GPIO5 /* GPIO_LDD11 */
+#define BADGE4_GPIO_LGP6 GPIO_GPIO6 /* GPIO_LDD12 */
+#define BADGE4_GPIO_LGP7 GPIO_GPIO7 /* GPIO_LDD13 */
+#define BADGE4_GPIO_LGP8 GPIO_GPIO8 /* GPIO_LDD14 */
+#define BADGE4_GPIO_LGP9 GPIO_GPIO9 /* GPIO_LDD15 */
+#define BADGE4_GPIO_GPA_VID GPIO_GPIO10 /* Video expansion */
+#define BADGE4_GPIO_GPB_VID GPIO_GPIO11 /* Video expansion */
+#define BADGE4_GPIO_GPC_VID GPIO_GPIO12 /* Video expansion */
+
+#define BADGE4_GPIO_UART_HS1 GPIO_GPIO13
+#define BADGE4_GPIO_UART_HS2 GPIO_GPIO14
+
+#define BADGE4_GPIO_MUXSEL0 GPIO_GPIO15
+#define BADGE4_GPIO_TESTPT_J7 GPIO_GPIO16
+
+#define BADGE4_GPIO_SDSDA GPIO_GPIO17 /* SDRAM SPD Data */
+#define BADGE4_GPIO_SDSCL GPIO_GPIO18 /* SDRAM SPD Clock */
+#define BADGE4_GPIO_SDTYP0 GPIO_GPIO19 /* SDRAM Type Control */
+#define BADGE4_GPIO_SDTYP1 GPIO_GPIO20 /* SDRAM Type Control */
+
+#define BADGE4_GPIO_BGNT_1111 GPIO_GPIO21 /* GPIO_MBGNT */
+#define BADGE4_GPIO_BREQ_1111 GPIO_GPIO22 /* GPIO_TREQA */
+
+#define BADGE4_GPIO_TESTPT_J6 GPIO_GPIO23
+
+#define BADGE4_GPIO_PCMEN5V GPIO_GPIO24 /* 5V power */
+
+#define BADGE4_GPIO_SA1111_NRST GPIO_GPIO25 /* SA-1111 nRESET */
+
+#define BADGE4_GPIO_TESTPT_J5 GPIO_GPIO26
+
+#define BADGE4_GPIO_CLK_1111 GPIO_GPIO27 /* GPIO_32_768kHz */
+
+/* Interrupts on the BadgePAD 4 */
+#define BADGE4_IRQ_GPIO_SA1111 IRQ_GPIO0 /* SA-1111 interrupt */
+
+
+/* PCM5ENV Usage tracking */
+
+#define BADGE4_5V_PCMCIA_SOCK0 (1<<0)
+#define BADGE4_5V_PCMCIA_SOCK1 (1<<1)
+#define BADGE4_5V_PCMCIA_SOCK(n) (1<<(n))
+#define BADGE4_5V_USB (1<<2)
+
+#ifndef __ASSEMBLY__
+extern void badge4_set_5V(unsigned subsystem, int on);
+#endif
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
index 8ed40e5eff31..af9ce59b8ab2 100644
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ b/include/asm-arm/arch-sa1100/hardware.h
@@ -87,22 +87,6 @@ typedef struct { volatile u32 offset[4096]; } __regbase;
#include "SA-1100.h"
-
-/*
- * SA1100 GPIO edge detection for IRQs:
- * IRQs are generated on Falling-Edge, Rising-Edge, or both.
- * This must be called *before* the corresponding IRQ is registered.
- * Use this instead of directly setting GRER/GFER.
- */
-#define GPIO_NO_EDGES 0
-#define GPIO_FALLING_EDGE 1
-#define GPIO_RISING_EDGE 2
-#define GPIO_BOTH_EDGES 3
-#ifndef __ASSEMBLY__
-extern void set_GPIO_IRQ_edge( int gpio_mask, int edge_mask );
-#endif
-
-
/*
* Implementation specifics.
*
@@ -112,6 +96,8 @@ extern void set_GPIO_IRQ_edge( int gpio_mask, int edge_mask );
* ifdefs, and lots of other preprocessor gunk elsewhere.
*/
+#include "badge4.h"
+
#ifdef CONFIG_SA1100_PANGOLIN
#include "pangolin.h"
#endif
@@ -179,6 +165,8 @@ extern void set_GPIO_IRQ_edge( int gpio_mask, int edge_mask );
#include "adsbitsy.h"
#endif
+#include "stork.h"
+
#include "system3.h"
#ifdef CONFIG_SA1101
diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h
index 99d3d4bf7576..4db58c3c9588 100644
--- a/include/asm-arm/arch-sa1100/ide.h
+++ b/include/asm-arm/arch-sa1100/ide.h
@@ -113,7 +113,7 @@ ide_init_default_hwifs(void)
/* Enable GPIO as interrupt line */
GPDR &= ~LART_GPIO_IDE;
- set_GPIO_IRQ_edge(LART_GPIO_IDE, GPIO_RISING_EDGE);
+ set_irq_type(LART_IRQ_IDE, IRQT_RISING);
/* set PCMCIA interface timing */
MECR = 0x00060006;
diff --git a/include/asm-arm/arch-sa1100/irq.h b/include/asm-arm/arch-sa1100/irq.h
deleted file mode 100644
index 56ae68a44e80..000000000000
--- a/include/asm-arm/arch-sa1100/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * linux/include/asm-arm/arch-sa1100/irq.h
- *
- * Author: Nicolas Pitre
- */
-
-#define fixup_irq(x) (x)
-
-/*
- * This prototype is required for cascading of multiplexed interrupts.
- * Since it doesn't exist elsewhere, we'll put it here for now.
- */
-extern void do_IRQ(int irq, struct pt_regs *regs);
diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h
index cab7e59b1cd9..3105834da48c 100644
--- a/include/asm-arm/arch-sa1100/irqs.h
+++ b/include/asm-arm/arch-sa1100/irqs.h
@@ -148,6 +148,7 @@
*/
#define IRQ_NEPONSET_SMC9196 (IRQ_BOARD_START + 0)
#define IRQ_NEPONSET_USAR (IRQ_BOARD_START + 1)
+#define IRQ_NEPONSET_SA1111 (IRQ_BOARD_START + 2)
/* PT Digital Board Interrupts (CONFIG_SA1100_PT_SYSTEM3) */
#define IRQ_SYSTEM3_SMC9196 (IRQ_BOARD_START + 0)
diff --git a/include/asm-arm/arch-sa1100/stork.h b/include/asm-arm/arch-sa1100/stork.h
new file mode 100644
index 000000000000..91b3dbc5a30e
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/stork.h
@@ -0,0 +1,164 @@
+/*
+ stork.h
+
+*/
+
+#ifndef STORK_SA1100_H
+#define STORK_SA1100_H
+
+/* ugly - this will make sure we build sa1100fb for the Nec display not the Kyocera */
+#define STORK_TFT 1
+
+
+#define GPIO_STORK_SWITCH_1 (1 << 0) /* Switch 1 - input */
+#define GPIO_STORK_SWITCH_2 (1 << 1) /* Switch 2 - input */
+#define GPIO_STORK_TOUCH_SCREEN_BUSY (1 << 10) /* TOUCH_SCREEN_BUSY - input */
+#define GPIO_STORK_TOUCH_SCREEN_DATA (1 << 11) /* TOUCH_SCREEN_DATA - input */
+#define GPIO_STORK_CODEC_AGCSTAT (1 << 12) /* CODEC_AGCSTAT -input */
+#define GPIO_STORK_RS232_ON (1 << 13) /* enable RS232 (UART1) */
+#define GPIO_STORK_TEST_POINT (1 << 14) /* to test point */
+#define GPIO_STORK_L3_I2C_SDA (1 << 15) /* L3_I2C_SDA - bidirectional */
+#define GPIO_STORK_PSU_SYNC_MODE (1 << 16) /* PSU_SYNC_MODE - output */
+#define GPIO_STORK_L3_MODE (1 << 17) /* L3 mode - output (??) */
+#define GPIO_STORK_L3_I2C_SCL (1 << 18) /* L3_I2C_SCL - bidirectional */
+#define GPIO_STORK_AUDIO_CLK (1 << 19) /* SSP external clock (Audio clock) - input */
+#define GPIO_STORK_PCMCIA_A_CARD_DETECT (1 << 20) /* PCMCIA_A_CARD_DETECT - input */
+#define GPIO_STORK_PCMCIA_B_CARD_DETECT (1 << 21) /* PCMCIA_B_CARD_DETECT - input */
+#define GPIO_STORK_PCMCIA_A_RDY (1 << 22) /* PCMCIA_A_RDY - input */
+#define GPIO_STORK_PCMCIA_B_RDY (1 << 23) /* PCMCIA_B_RDY - input */
+#define GPIO_STORK_SWITCH_EXTRA_IRQ (1 << 24) /* Extra IRQ from switch detect logic - input */
+#define GPIO_STORK_SWITCH_IRQ (1 << 25) /* Sitch irq - input */
+#define GPIO_STORK_BATTERY_LOW_IRQ (1 << 26) /* BATTERY_LOW_IRQ - input */
+#define GPIO_STORK_TOUCH_SCREEN_PEN_IRQ (1 << 27) /* TOUCH_SCREEN_PEN_IRQ -input */
+
+#define IRQ_GPIO_STORK_PCMCIA_A_CARD_DETECT IRQ_GPIO20 /* PCMCIA_A_CARD_DETECT - input */
+#define IRQ_GPIO_STORK_PCMCIA_B_CARD_DETECT IRQ_GPIO21 /* PCMCIA_B_CARD_DETECT - input */
+
+#define IRQ_GPIO_STORK_SWITCH_1 IRQ_GPIO0 /* Switch 1 - input - active low */
+#define IRQ_GPIO_STORK_SWITCH_2 IRQ_GPIO1 /* Switch 2 - input - active low */
+#define IRQ_GPIO_STORK_SWITCH_EXTRA_IRQ IRQ_GPIO24 /* Extra IRQ from switch detect logic - input - active low */
+#define IRQ_GPIO_STORK_SWITCH_IRQ IRQ_GPIO25 /* Switch irq - input- active low */
+#define IRQ_GPIO_STORK_BATTERY_LOW_IRQ IRQ_GPIO26 /* BATTERY_LOW_IRQ - input - active low */
+#define IRQ_GPIO_STORK_TOUCH_SCREEN_PEN_IRQ IRQ_GPIO27 /* TOUCH_SCREEN_PEN_IRQ -input - goes low when it happens */
+
+/* this may be bogus - no it's not the RDY line becomes the IRQ line when we're up as an IO device */
+#define IRQ_GPIO_STORK_PCMCIA_A_RDY IRQ_GPIO22 /* PCMCIA_A_RDY - input */
+#define IRQ_GPIO_STORK_PCMCIA_B_RDY IRQ_GPIO23 /* PCMCIA_B_RDY - input */
+
+/* the default outputs, others are optional - I'll set these in the bootldr for now */
+#define GPIO_STORK_OUTPUT_BITS (GPIO_STORK_RS232_ON | GPIO_STORK_PSU_SYNC_MODE | GPIO_STORK_L3_MODE)
+
+#define STORK_LATCH_A_ADDR 0x08000000 /* cs1 A5 = 0 */
+#define STORK_LATCH_B_ADDR 0x08000020 /* cs1 A5 = 1 */
+
+#define STORK_LCDCPLD_BASE_ADDR 0x10000000 /* cs2 A5 = 0 */
+
+/* bit defs for latch A - these are write only and will need to be mirrored! */
+
+#define STORK_TEMP_IC_POWER_ON (1 << 0)
+#define STORK_SED1386_POWER_ON (1 << 1)
+#define STORK_LCD_3V3_POWER_ON (1 << 2)
+#define STORK_LCD_5V_POWER_ON (1 << 3)
+#define STORK_LCD_BACKLIGHT_INVERTER_ON (1 << 4)
+#define STORK_PCMCIA_PULL_UPS_POWER_ON (1 << 5)
+#define STORK_PCMCIA_A_POWER_ON (1 << 6)
+#define STORK_PCMCIA_B_POWER_ON (1 << 7)
+#define STORK_AUDIO_POWER_ON (1 << 8)
+#define STORK_AUDIO_AMP_ON (1 << 9)
+#define STORK_BAR_CODE_POWER_ON (1 << 10)
+#define STORK_BATTERY_CHARGER_ON (1 << 11)
+#define STORK_SED1386_RESET (1 << 12)
+#define STORK_IRDA_FREQUENCY_SELECT (1 << 13)
+#define STORK_IRDA_MODE_0 (1 << 14)
+#define STORK_IRDA_MODE_1 (1 << 15)
+
+/* and for B */
+
+#define STORK_AUX_AD_SEL_0 (1 << 0)
+#define STORK_AUX_AD_SEL_1 (1 << 1)
+#define STORK_TOUCH_SCREEN_DCLK (1 << 2)
+#define STORK_TOUCH_SCREEN_DIN (1 << 3)
+#define STORK_TOUCH_SCREEN_CS (1 << 4)
+#define STORK_DA_CS (1 << 5)
+#define STORK_DA_LD (1 << 6)
+#define STORK_RED_LED (1 << 7) /* active LOW */
+#define STORK_GREEN_LED (1 << 8) /* active LOW */
+#define STORK_YELLOW_LED (1 << 9) /* active LOW */
+#define STORK_PCMCIA_B_RESET (1 << 10)
+#define STORK_PCMCIA_A_RESET (1 << 11)
+#define STORK_AUDIO_CODEC_RESET (1 << 12)
+#define STORK_CODEC_QMUTE (1 << 13)
+#define STORK_AUDIO_CLOCK_SEL0 (1 << 14)
+#define STORK_AUDIO_CLOCK_SEL1 (1 << 15)
+
+
+/*
+
+ There are 8 control bits in the touch screen controller (AD7873)
+
+ S A2 A1 A0 MODE SER/DFR# PD1 PD0
+
+ S Start bit, always one.
+ A2 - A0 Channel select bits
+ MODE 0 => 12 bit resolution, 1 => 8 bit
+ SER/DFR# Single ender/Differential Reference Select bit
+ PD1, PD0 Power management bits (usually 10)
+
+
+From Table 1.
+
+ A2-A0
+
+ 0 Temp0 (SER must be 1)
+ 1 X+ (is this a typo? - is this X- really?)
+ 2 VBAT,
+ 3 read X+ (Z1),
+ 4 read Y- (Z2), 5 => read Y+,
+
+*/
+
+#define AD7873_START 0x80 /* all commands need this to be set */
+#define AD7873_ADDR_BITS 4 /* ie shift by this */
+#define AD7873_8BITMODE 0x08 /* 0 => 12 bit convertions */
+#define AD7873_SER_DFR 0x04
+#define AD7873_PD1 0x02
+#define AD7873_PD0 0x01
+
+#define AD7873_TEMP0 AD7873_SER_DFR
+#define AD7873_X (1 << AD7873_ADDR_BITS)
+#define AD7873_VBAT ((2 << AD7873_ADDR_BITS) | AD7873_SER_DFR)
+#define AD7873_X_Z1 (3 << AD7873_ADDR_BITS)
+#define AD7873_Y_Z2 (4 << AD7873_ADDR_BITS)
+#define AD7873_Y (5 << AD7873_ADDR_BITS)
+#define AD7873_AUX ((6 << AD7873_ADDR_BITS) | AD7873_SER_DFR)
+#define AD7873_TEMP1 ((7 << AD7873_ADDR_BITS) | AD7873_SER_DFR)
+
+#ifndef __ASSEMBLY__
+
+extern int storkSetLatchA(int bits);
+extern int storkClearLatchA(int bits);
+
+extern int storkSetLatchB(int bits);
+extern int storkClearLatchB(int bits);
+
+extern int storkSetLCDCPLD(int which, int bits);
+extern int storkClearLCDCPLD(int which, int bits);
+
+extern void storkSetGPIO(int bits);
+extern void storkClearGPIO(int bits);
+
+extern int storkGetGPIO(void);
+
+extern void storkClockShortToDtoA(int word);
+extern int storkClockByteToTS(int byte);
+
+
+/* this will return the current state of the hardware ANDED with the given bits
+ so NE => at least one bit was set, but maybe not all of them! */
+
+extern int storkTestGPIO(int bits);
+
+
+#endif
+
+#endif
diff --git a/include/asm-arm/arch-sa1100/time.h b/include/asm-arm/arch-sa1100/time.h
index 1f7dd3a84eba..5e459a32e8f8 100644
--- a/include/asm-arm/arch-sa1100/time.h
+++ b/include/asm-arm/arch-sa1100/time.h
@@ -98,7 +98,7 @@ void __init time_init(void)
timer_irq.handler = sa1100_timer_interrupt;
OSMR0 = 0; /* set initial match at 0 */
OSSR = 0xf; /* clear status on all timers */
- setup_arm_irq(IRQ_OST0, &timer_irq);
+ setup_irq(IRQ_OST0, &timer_irq);
OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */
OSCR = 0; /* initialize free-running timer, force first match */
}
diff --git a/include/asm-arm/arch-shark/hardware.h b/include/asm-arm/arch-shark/hardware.h
index 5d75012c4660..f4f54113fd1c 100644
--- a/include/asm-arm/arch-shark/hardware.h
+++ b/include/asm-arm/arch-shark/hardware.h
@@ -38,7 +38,8 @@
/* defines for the Framebuffer */
-#define FB_START 0x06000000
+#define FB_START 0x06000000
+#define FB_SIZE 0x01000000
#define UNCACHEABLE_ADDR 0xdf010000
diff --git a/include/asm-arm/arch-shark/irq.h b/include/asm-arm/arch-shark/irq.h
deleted file mode 100644
index ec5c9108be4d..000000000000
--- a/include/asm-arm/arch-shark/irq.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * linux/include/asm-arm/arch-shark/irq.h
- *
- * by Alexander Schulz
- *
- * derived from linux/arch/ppc/kernel/i8259.c and:
- * include/asm-arm/arch-ebsa110/irq.h
- * Copyright (C) 1996-1998 Russell King
- */
-#define fixup_irq(x) (x)
diff --git a/include/asm-arm/arch-shark/keyboard.h b/include/asm-arm/arch-shark/keyboard.h
index 3d400663a304..52b5ed6e198a 100644
--- a/include/asm-arm/arch-shark/keyboard.h
+++ b/include/asm-arm/arch-shark/keyboard.h
@@ -29,7 +29,6 @@ extern unsigned char pckbd_sysrq_xlate[128];
static inline void kbd_init_hw(void)
{
- if (have_isa_bridge) {
k_setkeycode = pckbd_setkeycode;
k_getkeycode = pckbd_getkeycode;
k_translate = pckbd_translate;
@@ -40,7 +39,6 @@ static inline void kbd_init_hw(void)
k_sysrq_xlate = pckbd_sysrq_xlate;
#endif
pckbd_init_hw();
- }
}
/*
diff --git a/include/asm-arm/arch-shark/param.h b/include/asm-arm/arch-shark/param.h
index fd18c5142ebb..3bb89b094e5b 100644
--- a/include/asm-arm/arch-shark/param.h
+++ b/include/asm-arm/arch-shark/param.h
@@ -4,9 +4,5 @@
* by Alexander Schulz
*/
-/* This must be a power of 2 because the RTC
- * can't use anything else.
- */
-#define HZ 64
+#define HZ 100
-#define hz_to_std(a) ((a * HZ)/100)
diff --git a/include/asm-arm/arch-shark/time.h b/include/asm-arm/arch-shark/time.h
index 3d5bd8c0ca3f..69f0001088d2 100644
--- a/include/asm-arm/arch-shark/time.h
+++ b/include/asm-arm/arch-shark/time.h
@@ -3,44 +3,21 @@
*
* by Alexander Schulz
*
- * Uses the real time clock because you can't run
- * the timer with level triggered interrupts and
- * you can't run the shark with edge triggered
- * inetrrupts (loses ints and hangs).
- *
- * derived from linux/drivers/char/rtc.c and:
- * linux/include/asm-arm/arch-ebsa110/time.h
+ * derived from include/asm-arm/arch-ebsa110/time.h
* Copyright (c) 1996,1997,1998 Russell King.
*/
#include <asm/leds.h>
-#include <linux/mc146818rtc.h>
-
-#define IRQ_TIMER 8
+#include <asm/param.h>
-extern void get_rtc_time(struct rtc_time *rtc_tm);
-extern void set_rtc_irq_bit(unsigned char bit);
-extern unsigned long epoch;
+#define IRQ_TIMER 0
+#define HZ_TIME ((1193180 + HZ/2) / HZ)
static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
-
- CMOS_READ(RTC_INTR_FLAGS);
-
do_leds();
-
- {
-#ifdef DIVISOR
- static unsigned int divisor;
-
- if (divisor-- == 0) {
- divisor = DIVISOR - 1;
-#else
- {
-#endif
- do_timer(regs);
- }
- }
+ do_timer(regs);
+ do_profile(regs);
}
/*
@@ -48,38 +25,15 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
*/
void __init time_init(void)
{
- struct rtc_time r_time;
unsigned long flags;
- int tmp = 0;
- unsigned char val;
-
- /*
- * Set the clock to 128 Hz, we already have a valid
- * vector now:
- */
-
- while (HZ > (1<<tmp))
- tmp++;
-
- /*
- * Check that the input was really a power of 2.
- */
- if (HZ != (1<<tmp))
- panic("Please set HZ to a power of 2!");
- save_flags(flags);
- cli();
- val = CMOS_READ(RTC_FREQ_SELECT) & 0xf0;
- val |= (16 - tmp);
- CMOS_WRITE(val, RTC_FREQ_SELECT);
- restore_flags(flags);
- set_rtc_irq_bit(RTC_PIE);
+ outb(0x34, 0x43); /* binary, mode 0, LSB/MSB, Ch 0 */
+ outb(HZ_TIME & 0xff, 0x40); /* LSB of count */
+ outb(HZ_TIME >> 8, 0x40);
- get_rtc_time(&r_time);
- 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);
+ xtime.tv_sec = 0;
timer_irq.handler = timer_interrupt;
timer_irq.flags = SA_INTERRUPT; /* FIXME: really? */
- setup_arm_irq(IRQ_TIMER, &timer_irq);
+ setup_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/arch-tbox/irq.h b/include/asm-arm/arch-tbox/irq.h
deleted file mode 100644
index dd73ba7957d2..000000000000
--- a/include/asm-arm/arch-tbox/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * 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.
- */
-#define fixup_irq(x) (x)
diff --git a/include/asm-arm/arch-tbox/time.h b/include/asm-arm/arch-tbox/time.h
index fd0dab923422..e50e1bdb9af8 100644
--- a/include/asm-arm/arch-tbox/time.h
+++ b/include/asm-arm/arch-tbox/time.h
@@ -32,5 +32,5 @@ static void timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
void __init time_init(void)
{
timer_irq.handler = timer_interrupt;
- setup_arm_irq(IRQ_TIMER, &timer_irq);
+ setup_irq(IRQ_TIMER, &timer_irq);
}
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h
index ecdd955a8381..c5c8a24a4566 100644
--- a/include/asm-arm/bitops.h
+++ b/include/asm-arm/bitops.h
@@ -327,6 +327,23 @@ static inline unsigned long __ffs(unsigned long word)
#define ffs(x) generic_ffs(x)
/*
+ * Find first bit set in a 168-bit bitmap, where the first
+ * 128 bits are unlikely to be set.
+ */
+static inline int sched_find_first_bit(unsigned long *b)
+{
+ if (unlikely(b[0]))
+ return __ffs(b[0]);
+ if (unlikely(b[1]))
+ return __ffs(b[1]) + 32;
+ if (unlikely(b[2]))
+ return __ffs(b[2]) + 64;
+ if (b[3])
+ return __ffs(b[3]) + 96;
+ return __ffs(b[4]) + 128;
+}
+
+/*
* hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word
*/
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h
index c7ce093e2085..9db83322ea54 100644
--- a/include/asm-arm/cpu-multi32.h
+++ b/include/asm-arm/cpu-multi32.h
@@ -93,21 +93,6 @@ extern struct processor {
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
@@ -152,10 +137,6 @@ extern const struct processor sa110_processor_functions;
#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)
diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h
index 9742554641b7..6f794bb570fe 100644
--- a/include/asm-arm/cpu-single.h
+++ b/include/asm-arm/cpu-single.h
@@ -37,9 +37,6 @@
#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)
@@ -73,10 +70,6 @@ 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);
diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h
new file mode 100644
index 000000000000..a4f098d8aabb
--- /dev/null
+++ b/include/asm-arm/glue.h
@@ -0,0 +1,78 @@
+/*
+ * linux/include/asm-arm/glue.h
+ *
+ * Copyright (C) 1997-1999 Russell King
+ * Copyright (C) 2000-2002 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.
+ *
+ * This file provides the glue to stick the processor-specific bits
+ * into the kernel in an efficient manner. The idea is to use branches
+ * when we're only targetting one class of TLB, or indirect calls
+ * when we're targetting multiple classes of TLBs.
+ */
+#ifdef __KERNEL__
+
+#include <linux/config.h>
+
+#ifdef __STDC__
+#define ____glue(name,fn) name##fn
+#else
+#define ____glue(name,fn) name/**/fn
+#endif
+#define __glue(name,fn) ____glue(name,fn)
+
+/*
+ * Select MMU TLB handling.
+ */
+
+/*
+ * ARMv3 MMU
+ */
+#undef _TLB
+#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710)
+# ifdef _TLB
+# define MULTI_TLB 1
+# else
+# define _TLB v3
+# endif
+#endif
+
+/*
+ * ARMv4 MMU without write buffer
+ */
+#if defined(CONFIG_CPU_ARM720T)
+# ifdef _TLB
+# define MULTI_TLB 1
+# else
+# define _TLB v4
+# endif
+#endif
+
+/*
+ * ARMv4 MMU with write buffer, with invalidate I TLB entry instruction
+ */
+#if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \
+ defined(CONFIG_CPU_ARM926T) || defined(CONFIG_CPU_ARM1020) || \
+ defined(CONFIG_CPU_XSCALE)
+# ifdef _TLB
+# define MULTI_TLB 1
+# else
+# define _TLB v4wbi
+# endif
+#endif
+
+/*
+ * ARMv4 MMU with write buffer, without invalidate I TLB entry instruction
+ */
+#if defined(CONFIG_CPU_SA110) || defined(CONFIG_CPU_SA1100)
+# ifdef _TLB
+# define MULTI_TLB 1
+# else
+# define _TLB v4wb
+# endif
+#endif
+
+#endif
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 4782df468d45..3c63a8cf4cb9 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -31,9 +31,9 @@
* Generic IO read/write. These perform native-endian accesses. Note
* that some architectures will want to re-define __raw_{read,write}w.
*/
-extern void __raw_writesb(unsigned int addr, void *data, int bytelen);
-extern void __raw_writesw(unsigned int addr, void *data, int wordlen);
-extern void __raw_writesl(unsigned int addr, void *data, int longlen);
+extern void __raw_writesb(unsigned int addr, const void *data, int bytelen);
+extern void __raw_writesw(unsigned int addr, const void *data, int wordlen);
+extern void __raw_writesl(unsigned int addr, const void *data, int longlen);
extern void __raw_readsb(unsigned int addr, void *data, int bytelen);
extern void __raw_readsw(unsigned int addr, void *data, int wordlen);
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h
index ce59302433ce..057ec51b2394 100644
--- a/include/asm-arm/irq.h
+++ b/include/asm-arm/irq.h
@@ -24,5 +24,19 @@
extern void disable_irq(unsigned int);
extern void enable_irq(unsigned int);
+#define __IRQT_FALEDGE (1 << 0)
+#define __IRQT_RISEDGE (1 << 1)
+#define __IRQT_LOWLVL (1 << 2)
+#define __IRQT_HIGHLVL (1 << 3)
+
+#define IRQT_NOEDGE (0)
+#define IRQT_RISING (__IRQT_RISEDGE)
+#define IRQT_FALLING (__IRQT_FALEDGE)
+#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
+#define IRQT_LOW (__IRQT_LOWLVL)
+#define IRQT_HIGH (__IRQT_HIGHLVL)
+
+int set_irq_type(unsigned int irq, unsigned int type);
+
#endif
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h
index 4ec067c930e1..2c172b1330f2 100644
--- a/include/asm-arm/mach/irq.h
+++ b/include/asm-arm/mach/irq.h
@@ -10,32 +10,110 @@
#ifndef __ASM_ARM_MACH_IRQ_H
#define __ASM_ARM_MACH_IRQ_H
+struct irqdesc;
+struct pt_regs;
+struct seq_file;
+
+typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *);
+typedef void (*irq_control_t)(unsigned int);
+
+struct irqchip {
+ /*
+ * Acknowledge the IRQ.
+ * If this is a level-based IRQ, then it is expected to mask the IRQ
+ * as well.
+ */
+ void (*ack)(unsigned int);
+ /*
+ * Mask the IRQ in hardware.
+ */
+ void (*mask)(unsigned int);
+ /*
+ * Unmask the IRQ in hardware.
+ */
+ void (*unmask)(unsigned int);
+ /*
+ * Re-run the IRQ
+ */
+ void (*rerun)(unsigned int);
+ /*
+ * Set the type of the IRQ.
+ */
+ int (*type)(unsigned int, unsigned int);
+};
+
struct irqdesc {
- unsigned int nomask : 1; /* IRQ does not mask in IRQ */
- unsigned int enabled : 1; /* IRQ is currently enabled */
- unsigned int triggered: 1; /* IRQ has occurred */
- unsigned int probing : 1; /* IRQ in use for a probe */
- unsigned int probe_ok : 1; /* IRQ can be used for probe */
- unsigned int valid : 1; /* IRQ claimable */
- unsigned int noautoenable : 1; /* don't automatically enable IRQ */
- unsigned int unused :25;
- void (*mask_ack)(unsigned int irq); /* Mask and acknowledge IRQ */
- void (*mask)(unsigned int irq); /* Mask IRQ */
- void (*unmask)(unsigned int irq); /* Unmask IRQ */
+ irq_handler_t handle;
+ struct irqchip *chip;
struct irqaction *action;
+
+ unsigned int enabled : 1; /* IRQ is currently enabled */
+ unsigned int triggered: 1; /* IRQ has occurred */
+ unsigned int running : 1; /* IRQ is running */
+ unsigned int pending : 1; /* IRQ is pending */
+ unsigned int probing : 1; /* IRQ in use for a probe */
+ unsigned int probe_ok : 1; /* IRQ can be used for probe */
+ unsigned int valid : 1; /* IRQ claimable */
+ unsigned int noautoenable : 1; /* don't automatically enable IRQ */
+ unsigned int unused :23;
+ unsigned int depth; /* disable depth */
+
/*
* IRQ lock detection
*/
- unsigned int lck_cnt;
- unsigned int lck_pc;
- unsigned int lck_jif;
+ unsigned int lck_cnt;
+ unsigned int lck_pc;
+ unsigned int lck_jif;
};
extern struct irqdesc irq_desc[];
+/*
+ * This is internal. Do not use it.
+ */
extern void (*init_arch_irq)(void);
-extern int setup_arm_irq(int, struct irqaction *);
-extern int show_fiq_list(struct seq_file *, void *);
extern void init_FIQ(void);
+extern int show_fiq_list(struct seq_file *, void *);
+void __set_irq_handler(unsigned int irq, irq_handler_t, int);
+int setup_irq(unsigned int, struct irqaction *);
+
+/*
+ * External stuff.
+ */
+#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0)
+#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1)
+
+void set_irq_chip(unsigned int irq, struct irqchip *);
+void set_irq_flags(unsigned int irq, unsigned int flags);
+
+#ifdef not_yet
+/*
+ * This is to be used by the top-level machine IRQ decoder only.
+ */
+static inline void call_irq(struct pt_regs *regs, unsigned int irq)
+{
+ struct irqdesc *desc = irq_desc + irq;
+
+ spin_lock(&irq_controller_lock);
+ desc->handle(irq, desc, regs);
+ spin_unlock(&irq_controller_lock);
+
+ if (softirq_pending(smp_processor_id()))
+ do_softirq();
+}
+#endif
+
+#define IRQF_VALID (1 << 0)
+#define IRQF_PROBE (1 << 1)
+#define IRQF_NOAUTOEN (1 << 2)
+
+/*
+ * Built-in IRQ handlers.
+ */
+void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
+void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
+void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
+void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
+void dummy_mask_unmask_irq(unsigned int irq);
#endif
diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h
index 784ff2708dc5..9b8d3d781a1e 100644
--- a/include/asm-arm/mmu.h
+++ b/include/asm-arm/mmu.h
@@ -1,7 +1,9 @@
#ifndef __ARM_MMU_H
#define __ARM_MMU_H
-/* The ARM doesn't have a mmu context */
+/*
+ * The ARM doesn't have a mmu context
+ */
typedef struct { } mm_context_t;
#endif
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h
index 0acf4d89c965..99e10958bc4c 100644
--- a/include/asm-arm/mmu_context.h
+++ b/include/asm-arm/mmu_context.h
@@ -49,27 +49,4 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
#define activate_mm(prev, next) \
switch_mm((prev),(next),NULL,smp_processor_id())
-/*
- * Find first bit set in a 168-bit bitmap, where the first
- * 128 bits are unlikely to be set.
- */
-static inline int sched_find_first_bit(unsigned long *b)
-{
-#if MAX_RT_PRIO != 128 || MAX_PRIO != 168
-#error update this function
-#endif
-
- if (unlikely(b[0]))
- return __ffs(b[0]);
- if (unlikely(b[1]))
- return __ffs(b[1]) + 32;
- if (unlikely(b[2]))
- return __ffs(b[2]) + 64;
- if (unlikely(b[3]))
- return __ffs(b[3]) + 96;
- if (b[4])
- return __ffs(b[4]) + MAX_RT_PRIO;
- return __ffs(b[5]) + 32 + MAX_RT_PRIO;
-}
-
#endif
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index f08e9fcdd70d..f9d7f956f40a 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -14,8 +14,19 @@
#define clear_page(page) memzero((void *)(page), PAGE_SIZE)
extern void copy_page(void *to, void *from);
-#define clear_user_page(page, vaddr) cpu_clear_user_page(page,vaddr)
-#define copy_user_page(to, from, vaddr) cpu_copy_user_page(to,from,vaddr)
+#define clear_user_page(addr,vaddr) \
+ do { \
+ preempt_disable(); \
+ cpu_clear_user_page(addr, vaddr); \
+ preempt_enable(); \
+ } while (0)
+
+#define copy_user_page(to,from,vaddr) \
+ do { \
+ preempt_disable(); \
+ cpu_copy_user_page(to, from, vaddr); \
+ preempt_enable(); \
+ } while (0)
#ifdef STRICT_MM_TYPECHECKS
/*
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
index 935f73ad7e2c..041bbaddd971 100644
--- a/include/asm-arm/pci.h
+++ b/include/asm-arm/pci.h
@@ -2,7 +2,7 @@
#define ASMARM_PCI_H
#ifdef __KERNEL__
-
+#include <linux/config.h>
#include <linux/mm.h> /* bah! */
#include <asm/arch/hardware.h>
@@ -142,18 +142,9 @@ pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int directi
for (i = 0; i < nents; i++, sg++) {
char *virt;
- if (sg->address && sg->page)
- BUG();
- else if (!sg->address && !sg->page)
- BUG();
-
- if (sg->address) {
- sg->dma_address = virt_to_bus(sg->address);
- virt = sg->address;
- } else {
- sg->dma_address = page_to_bus(sg->page) + sg->offset;
- virt = page_address(sg->page) + sg->offset;
- }
+
+ sg->dma_address = page_to_bus(sg->page) + sg->offset;
+ virt = page_address(sg->page) + sg->offset;
consistent_sync(virt, sg->length, direction);
}
@@ -197,12 +188,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++) {
- char *virt;
-
- if (sg->address)
- virt = sg->address;
- else
- virt = page_address(sg->page) + sg->offset;
+ char *virt = page_address(sg->page) + sg->offset;
consistent_sync(virt, sg->length, direction);
}
}
diff --git a/include/asm-arm/proc-armv/cache.h b/include/asm-arm/proc-armv/cache.h
index 2f5f206fc43c..c73f03773594 100644
--- a/include/asm-arm/proc-armv/cache.h
+++ b/include/asm-arm/proc-armv/cache.h
@@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/
#include <asm/mman.h>
+#include <asm/glue.h>
/*
* This flag is used to indicate that the page pointed to by a pte
@@ -200,69 +201,93 @@ static inline void flush_icache_page(struct vm_area_struct *vma, struct page *pa
} while (0)
/*
- * 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)
-#define memc_update_addr(mm,pte,log) do { } while (0)
-#define memc_clear(mm,physaddr) do { } while (0)
-
-/*
- * TLB flushing.
+ * TLB Management
+ * ==============
+ *
+ * The arch/arm/mm/tlb-*.S files implement this methods.
+ *
+ * The TLB specific code is expected to perform whatever tests it
+ * needs to determine if it should invalidate the TLB for each
+ * call. Start addresses are inclusive and end addresses are
+ * exclusive; it is safe to round these addresses down.
+ *
+ * flush_tlb_all()
+ *
+ * Invalidate the entire TLB.
*
- * - 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(vma, start, end) flushes TLB for specified range of pages
+ * flush_tlb_mm(mm)
*
- * 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...
+ * Invalidate all TLB entries in a particular address
+ * space.
+ * - mm - mm_struct describing address space
+ *
+ * flush_tlb_range(mm,start,end)
+ *
+ * Invalidate a range of TLB entries in the specified
+ * address space.
+ * - mm - mm_struct describing address space
+ * - start - start address (may not be aligned)
+ * - end - end address (exclusive, may not be aligned)
+ *
+ * flush_tlb_page(vaddr,vma)
+ *
+ * Invalidate the specified page in the specified address range.
+ * - vaddr - virtual address (may not be aligned)
+ * - vma - vma_struct describing address range
+ *
+ * flush_kern_tlb_page(kaddr)
+ *
+ * Invalidate the TLB entry for the specified page. The address
+ * will be in the kernels virtual memory space. Current uses
+ * only require the D-TLB to be invalidated.
+ * - kaddr - Kernel virtual memory address
*/
-/*
- * 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)
+struct cpu_tlb_fns {
+ void (*flush_kern_all)(void);
+ void (*flush_user_mm)(struct mm_struct *);
+ void (*flush_user_range)(unsigned long, unsigned long, struct vm_area_struct *);
+ void (*flush_user_page)(unsigned long, struct vm_area_struct *);
+ void (*flush_kern_page)(unsigned long);
+};
/*
- * 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.
+ * Convert calls to our calling convention.
*/
-#define flush_tlb_mm(_mm) \
- do { \
- if ((_mm) == current->active_mm) \
- cpu_tlb_invalidate_all(); \
- } while (0)
+#define flush_tlb_all() __cpu_flush_kern_tlb_all()
+#define flush_tlb_mm(mm) __cpu_flush_user_tlb_mm(mm)
+#define flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
+#define flush_tlb_page(vma,vaddr) __cpu_flush_user_tlb_page(vaddr,vma)
+#define flush_kern_tlb_page(kaddr) __cpu_flush_kern_tlb_page(kaddr)
/*
- * Flush the specified range of user virtual address space translations.
- *
- * _mm may not be current->active_mm, but may not be NULL.
+ * Now select the calling method
*/
-#define flush_tlb_range(_vma,_start,_end) \
- do { \
- if ((_mm)->vm_mm == current->active_mm) \
- cpu_tlb_invalidate_range((_start), (_end)); \
- } while (0)
+#ifdef MULTI_TLB
-/*
- * 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)
+extern struct cpu_tlb_fns cpu_tlb;
+
+#define __cpu_flush_kern_tlb_all cpu_tlb.flush_kern_all
+#define __cpu_flush_user_tlb_mm cpu_tlb.flush_user_mm
+#define __cpu_flush_user_tlb_range cpu_tlb.flush_user_range
+#define __cpu_flush_user_tlb_page cpu_tlb.flush_user_page
+#define __cpu_flush_kern_tlb_page cpu_tlb.flush_kern_page
+
+#else
+
+#define __cpu_flush_kern_tlb_all __glue(_TLB,_flush_kern_tlb_all)
+#define __cpu_flush_user_tlb_mm __glue(_TLB,_flush_user_tlb_mm)
+#define __cpu_flush_user_tlb_range __glue(_TLB,_flush_user_tlb_range)
+#define __cpu_flush_user_tlb_page __glue(_TLB,_flush_user_tlb_page)
+#define __cpu_flush_kern_tlb_page __glue(_TLB,_flush_kern_tlb_page)
+
+extern void __cpu_flush_kern_tlb_all(void);
+extern void __cpu_flush_user_tlb_mm(struct mm_struct *);
+extern void __cpu_flush_user_tlb_range(unsigned long, unsigned long, struct vm_area_struct *);
+extern void __cpu_flush_user_tlb_page(unsigned long, struct vm_area_struct *);
+extern void __cpu_flush_kern_tlb_page(unsigned long);
+
+#endif
/*
* if PG_dcache_dirty is set for the page, we need to ensure that any
@@ -270,3 +295,12 @@ static inline void flush_icache_page(struct vm_area_struct *vma, struct page *pa
* back to the page.
*/
extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte);
+
+/*
+ * 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)
+#define memc_update_addr(mm,pte,log) do { } while (0)
+#define memc_clear(mm,physaddr) do { } while (0)
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h
index 4411a5d1f5a3..dda78d4e7156 100644
--- a/include/asm-arm/procinfo.h
+++ b/include/asm-arm/procinfo.h
@@ -14,6 +14,9 @@
#include <asm/proc-fns.h>
+struct cpu_tlb_fns;
+struct processor;
+
struct proc_info_item {
const char *manufacturer;
const char *cpu_name;
@@ -37,15 +40,14 @@ struct proc_info_list {
const char *elf_name;
unsigned int elf_hwcap;
struct proc_info_item *info;
-#ifdef MULTI_CPU
struct processor *proc;
-#else
- void *unused;
-#endif
+ struct cpu_tlb_fns *tlb;
};
#endif /* __ASSEMBLY__ */
+#define PROC_INFO_SZ 40
+
#define HWCAP_SWP 1
#define HWCAP_HALF 2
#define HWCAP_THUMB 4
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 0107b073abf5..b317ffcd1ec5 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -53,9 +53,9 @@ extern asmlinkage void __backtrace(void);
struct thread_info;
extern struct task_struct *__switch_to(struct thread_info *, struct thread_info *);
-#define switch_to(prev,next,last) \
+#define switch_to(prev,next) \
do { \
- last = __switch_to(prev->thread_info,next->thread_info); \
+ __switch_to(prev->thread_info,next->thread_info); \
mb(); \
} while (0)