summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-sa1100
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
commit46e045034336a2cc90c1798cd7cc07af744ddfd6 (patch)
tree3b9b51fc482e729f663d25333e77fbed9aaa939a /include/asm-arm/arch-sa1100
parent31dc59d503a02e84c4de98826452acaeb56dc15a (diff)
Merge with Linux 2.3.99-pre4.
Diffstat (limited to 'include/asm-arm/arch-sa1100')
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h1
-rw-r--r--include/asm-arm/arch-sa1100/keyboard.h62
-rw-r--r--include/asm-arm/arch-sa1100/system.h62
-rw-r--r--include/asm-arm/arch-sa1100/vmalloc.h16
4 files changed, 91 insertions, 50 deletions
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
index 86358d96b..e93cbe7d9 100644
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ b/include/asm-arm/arch-sa1100/hardware.h
@@ -13,6 +13,7 @@
#define FLUSH_BASE_PHYS 0xe0000000 /* SA1100 zero bank */
#define FLUSH_BASE 0xdf000000
#define FLUSH_BASE_MINICACHE 0xdf800000
+#define UNCACHEABLE_ADDR 0xfa050000
/*
* PCMCIA IO is mapped to 0xe0000000. We are likely to use in*()/out*()
diff --git a/include/asm-arm/arch-sa1100/keyboard.h b/include/asm-arm/arch-sa1100/keyboard.h
index c03526bf5..da214d3ed 100644
--- a/include/asm-arm/arch-sa1100/keyboard.h
+++ b/include/asm-arm/arch-sa1100/keyboard.h
@@ -1,27 +1,51 @@
/*
- * linux/include/asm-arm/arch-sa1100/keyboard.h
- *
- * Keyboard driver definitions for SA1100 architecture
- *
- * This really has to be cleaned up somehow...
- *
+ * linux/include/asm-arm/arch-sa1100/keyboard.h
+ * Created 16 Dec 1999 by Nicolas Pitre <nico@cam.org>
+ * This file contains the SA1100 architecture specific keyboard definitions
*/
-#define KEYBOARD_IRQ
+#ifndef _SA1100_KEYBOARD_H
+#define _SA1100_KEYBOARD_H
-#define NR_SCANCODES 128
+#include <linux/config.h>
-#define kbd_setkeycode(sc,kc) (-EINVAL)
-#define kbd_getkeycode(sc) (-EINVAL)
-#define kbd_pretranslate(sc,kc) 1
-#define kbd_translate(sc, kcp, raw) kbd_drv_translate(sc, kcp, raw)
-#define kbd_init_hw() kbd_drv_init()
-#define kbd_unexpected_up
-#define kbd_leds(leds)
+#ifdef CONFIG_SA1100_BRUTUS
-#define kbd_sysrq_xlate
-#define kbd_disable_irq()
-#define kbd_enable_irq()
+extern int Brutus_kbd_translate(unsigned char scancode, unsigned char *keycode,
+ char raw_mode);
+extern void Brutus_kbd_leds(unsigned char leds);
+extern void Brutus_kbd_init_hw(void);
+extern void Brutus_kbd_enable_irq(void);
+extern void Brutus_kbd_disable_irq(void);
+extern unsigned char Brutus_kbd_sysrq_xlate[128];
+
+#define kbd_setkeycode(x...) (-ENOSYS)
+#define kbd_getkeycode(x...) (-ENOSYS)
+#define kbd_translate Brutus_kbd_translate
+#define kbd_unexpected_up(x...) (1)
+#define kbd_leds Brutus_kbd_leds
+#define kbd_init_hw Brutus_kbd_init_hw
+#define kbd_enable_irq Brutus_kbd_enable_irq
+#define kbd_disable_irq Brutus_kbd_disable_irq
+#define kbd_sysrq_xlate Brutus_kbd_sysrq_xlate
+
+#define SYSRQ_KEY 0x54
+
+#else
+
+/* dummy i.e. no real keyboard */
+#define kbd_setkeycode(x...) (-ENOSYS)
+#define kbd_getkeycode(x...) (-ENOSYS)
+#define kbd_translate(x...) (0)
+#define kbd_unexpected_up(x...) (1)
+#define kbd_leds(x...) (0)
+#define kbd_init_hw(x...) (0)
+#define kbd_enable_irq(x...) (0)
+#define kbd_disable_irq(x...) (0)
+
+#endif
+
+
+#endif /* _SA1100_KEYBOARD_H */
-#define SYSRQ_KEY 0x54
diff --git a/include/asm-arm/arch-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h
index 4e883ee6a..3b56a4220 100644
--- a/include/asm-arm/arch-sa1100/system.h
+++ b/include/asm-arm/arch-sa1100/system.h
@@ -5,43 +5,43 @@
*/
#include <linux/config.h>
-#ifdef CONFIG_SA1100_VICTOR
-
-#define arch_reset( x ) { \
- /* switch off power supply */ \
- mdelay(2000); \
- GPCR = GPIO_GPIO23; \
- while(1); \
+extern __inline__ void arch_idle(void)
+{
+ while (!current->need_resched && !hlt_counter) {
+ cpu_do_idle(IDLE_CLOCK_SLOW);
+ cpu_do_idle(IDLE_WAIT_FAST);
+ cpu_do_idle(IDLE_CLOCK_FAST);
}
+}
-#else
-
-#define arch_reset(x) cpu_reset(0)
+#ifdef CONFIG_SA1100_VICTOR
-#endif
+extern inline void arch_power_off(void)
+{
+ /* switch off power supply */
+ mdelay(2000);
+ GPCR = GPIO_GPIO23;
+ while(1);
+}
+/* power off unconditionally */
+#define arch_reset(x) arch_power_off()
-#if 0
-#define arch_do_idle() cpu_do_idle()
#else
-/* Enter SA1100 idle mode (see data sheet sec 9.5).
- * It seems that the wait-on-interrupt just hang the CPU forever if it's
- * on the end of a cache line. Workaround: we force an explicit alignment
- * before it.
- */
-#define arch_do_idle() \
- do { \
- __asm__ __volatile__( \
-" mcr p15, 0, %0, c15, c2, 2 @ Disable clock switching \n" \
-" ldr %0, [%0] @ Must perform a non-cached access \n" \
-" b 1f @ Seems we must align the next \n" \
-" .align 5 @ instruction on a cache line \n" \
-"1: mcr p15, 0, %0, c15, c8, 2 @ Wait for interrupts \n" \
-" mov r0, r0 @ insert NOP to ensure SA1100 re-awakes\n" \
-" mcr p15, 0, %0, c15, c1, 2 @ Reenable clock switching \n" \
- : : "r" (&ICIP) : "cc" ); \
- } while (0)
-#endif
+
+extern inline void arch_reset(char mode)
+{
+ if (mode == 's') {
+ /* Jump into ROM at address 0 */
+ cpu_reset(0);
+ } else {
+ /* Activate SA1100 watchdog and wait for the trigger... */
+ OSMR3 = OSCR + 3686400/2; /* in 1/2 sec */
+ OWER |= OWER_WME;
+ OIER |= OIER_E3;
+ }
+}
#define arch_power_off() do { } while (0)
+#endif
diff --git a/include/asm-arm/arch-sa1100/vmalloc.h b/include/asm-arm/arch-sa1100/vmalloc.h
new file mode 100644
index 000000000..42affe414
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/vmalloc.h
@@ -0,0 +1,16 @@
+/*
+ * linux/include/asm-arm/arch-sa1100/vmalloc.h
+ */
+
+/*
+ * Just any arbitrary offset to the start of the vmalloc VM area: the
+ * current 8MB value just means that there will be a 8MB "hole" after the
+ * physical memory until the kernel virtual memory starts. That means that
+ * any out-of-bounds memory accesses will hopefully be caught.
+ * The vmalloc() routines leaves a hole of 4kB between each vmalloced
+ * area for the same reason. ;)
+ */
+#define VMALLOC_OFFSET (8*1024*1024)
+#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#define VMALLOC_END (PAGE_OFFSET + 0x10000000)