summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-sa1100
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/arch-sa1100')
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h4
-rw-r--r--include/asm-arm/arch-sa1100/ide.h98
-rw-r--r--include/asm-arm/arch-sa1100/memory.h16
-rw-r--r--include/asm-arm/arch-sa1100/param.h2
-rw-r--r--include/asm-arm/arch-sa1100/serial.h2
-rw-r--r--include/asm-arm/arch-sa1100/system.h9
-rw-r--r--include/asm-arm/arch-sa1100/uncompress.h52
7 files changed, 172 insertions, 11 deletions
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
index 407641aa9..86358d96b 100644
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ b/include/asm-arm/arch-sa1100/hardware.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-brutus/hardware.h
*
- * Copyright (C) 1998 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (C) 1998 Nicolas Pitre <nico@cam.org>
*
* This file contains the hardware definitions for SA1100 architecture
*/
@@ -12,7 +12,7 @@
/* Flushing areas */
#define FLUSH_BASE_PHYS 0xe0000000 /* SA1100 zero bank */
#define FLUSH_BASE 0xdf000000
-#define FLUSH_BASE_MINICACHE 0xde000000
+#define FLUSH_BASE_MINICACHE 0xdf800000
/*
* PCMCIA IO is mapped to 0xe0000000. We are likely to use in*()/out*()
diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h
new file mode 100644
index 000000000..3a1f00e3d
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/ide.h
@@ -0,0 +1,98 @@
+/*
+ * linux/include/asm-arm/arch-sa1100/ide.h
+ *
+ * Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre
+ *
+ */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_BLK_DEV_IDE
+
+#include <asm/irq.h>
+#include <asm/arch/hardware.h>
+
+/*
+ * Set up a hw structure for a specified data port, control port and IRQ.
+ * This should follow whatever the default interface uses.
+ */
+static __inline__ void
+ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq)
+{
+ ide_ioreg_t reg;
+ int i;
+
+ memset(hw, 0, sizeof(*hw));
+
+#ifdef CONFIG_SA1100_EMPEG
+/* The Empeg board has the first two address lines unused */
+#define IO_SHIFT 2
+#else
+#define IO_SHIFT 0
+#endif
+
+ reg = (ide_ioreg_t) (data_port << IO_SHIFT);
+ for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
+ hw->io_ports[i] = reg;
+ reg += (1 << IO_SHIFT);
+ }
+ hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) (ctrl_port << IO_SHIFT);
+ hw->irq = irq;
+}
+
+/*
+ * This registers the standard ports for this architecture with the IDE
+ * driver.
+ */
+static __inline__ void
+ide_init_default_hwifs(void)
+{
+ hw_regs_t hw;
+
+#if defined( CONFIG_SA1100_EMPEG )
+ /* First, do the SA1100 setup */
+
+ /* PCMCIA IO space */
+ MECR=0x21062106;
+
+ /* Issue 3 is much neater than issue 2 */
+ GPDR&=~(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+
+ /* Interrupts on rising edge: lines are inverted before they get to
+ the SA */
+ GRER&=~(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+ GFER|=(EMPEG_IDE1IRQ|EMPEG_IDE2IRQ);
+
+ /* Take hard drives out of reset */
+ GPSR=(EMPEG_IDERESET);
+
+ /* Clear GEDR */
+ GEDR=0xffffffff;
+
+ /* Sonja and her successors have two IDE ports. */
+ /* MAC 23/4/1999, swap these round so that the left hand
+ hard disk is hda when viewed from the front. This
+ doesn't match the silkscreen however. */
+ ide_init_hwif_ports(&hw,0x10,0x1e,EMPEG_IRQ_IDE2);
+ ide_register_hw(&hw, NULL);
+ ide_init_hwif_ports(&hw,0x00,0x0e,EMPEG_IRQ_IDE1);
+ ide_register_hw(&hw, NULL);
+
+#elif defined( CONFIG_SA1100_VICTOR )
+ /* Enable appropriate GPIOs as interrupt lines */
+ GPDR &= ~GPIO_GPIO7;
+ GRER |= GPIO_GPIO7;
+ GFER &= ~GPIO_GPIO7;
+ GEDR = GPIO_GPIO7;
+ /* set the pcmcia interface timing */
+ MECR = 0x00060006;
+
+ ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_GPIO7);
+ ide_register_hw(&hw, NULL);
+#else
+#error Missing IDE interface definition in include/asm/arch/ide.h
+#endif
+}
+
+#endif
+
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h
index 884157c86..4c2126208 100644
--- a/include/asm-arm/arch-sa1100/memory.h
+++ b/include/asm-arm/arch-sa1100/memory.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-sa1100/memory.h
*
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
*/
#ifndef __ASM_ARCH_MEMORY_H
@@ -12,23 +12,27 @@
* Task size: 3GB
*/
#define TASK_SIZE (0xc0000000UL)
+#define TASK_SIZE_26 (0x04000000UL)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
-#define PHYS_OFFSET (0x00000000UL)
+
+/*
+ * Physical DRAM offset is 0xc0000000 on the SA1100
+ */
+#define PHYS_OFFSET (0xc0000000UL)
+
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
/*
* The following gives a maximum memory size of 128MB (32MB in each bank).
- *
- * Does this still need to be optimised for one bank machines?
*/
-#define __virt_to_phys(x) (((x) & 0xe0ffffff) | ((x) & 0x06000000) << 2)
-#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x30000000) >> 2)
+#define __virt_to_phys(x) (((x) & 0xf9ffffff) | ((x) & 0x06000000) << 2)
+#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x18000000) >> 2)
/*
* Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-sa1100/param.h b/include/asm-arm/arch-sa1100/param.h
index 3444dc74c..f0ea52b17 100644
--- a/include/asm-arm/arch-sa1100/param.h
+++ b/include/asm-arm/arch-sa1100/param.h
@@ -1,3 +1,3 @@
/*
- * linux/include/asm-arm/arch-ebsa110/param.h
+ * linux/include/asm-arm/arch-sa1100/param.h
*/
diff --git a/include/asm-arm/arch-sa1100/serial.h b/include/asm-arm/arch-sa1100/serial.h
index f57de7f4a..83db935a5 100644
--- a/include/asm-arm/arch-sa1100/serial.h
+++ b/include/asm-arm/arch-sa1100/serial.h
@@ -1,6 +1,6 @@
/*
* include/asm-arm/arch-sa1100/serial.h
- * (C) 1999 Nicolas Pitre <nico@visuaide.com>
+ * (C) 1999 Nicolas Pitre <nico@cam.org>
*
* All this is intended to be used with a 16550-like UART on the SA1100's
* PCMCIA bus. It has nothing to do with the SA1100's internal serial ports.
diff --git a/include/asm-arm/arch-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h
index 24072c298..49b4bdca2 100644
--- a/include/asm-arm/arch-sa1100/system.h
+++ b/include/asm-arm/arch-sa1100/system.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-sa1100/system.h
*
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
+ * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
*/
#include <linux/config.h>
@@ -25,6 +25,9 @@
#endif
+#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
@@ -41,3 +44,7 @@
" mcr p15, 0, %0, c15, c1, 2 @ Reenable clock switching \n" \
: : "r" (&ICIP) : "cc" ); \
} while (0)
+#endif
+
+#define arch_power_off() do { } while (0)
+
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h
new file mode 100644
index 000000000..ffdad2180
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/uncompress.h
@@ -0,0 +1,52 @@
+/*
+ * linux/include/asm-arm/arch-brutus/uncompress.h
+ *
+ * (C) 1999 Nicolas Pitre <nico@cam.org>
+ */
+
+#include <linux/config.h>
+
+#if defined(CONFIG_SA1100_EMPEG) || \
+ defined(CONFIG_SA1100_VICTOR) || \
+ defined(CONFIG_SA1100_LART)
+
+#include "hardware.h"
+#include "serial_reg.h"
+
+static volatile unsigned long* serial_port = (unsigned long*)_Ser3UTCR0;
+
+/*
+ * The following code assumes the serial port has already been
+ * initialized by the bootloader or such...
+ */
+
+static void puts( const char *s )
+{
+ int i;
+
+ for (i = 0; *s; i++, s++) {
+ /* wait for space in the UART's transmiter */
+ while( !(serial_port[UTSR1] & UTSR1_TNF) );
+
+ /* send the character out. */
+ serial_port[UART_TX] = *s;
+
+ /* if a LF, also do CR... */
+ if (*s == 10) {
+ while( !(serial_port[UTSR1] & UTSR1_TNF) );
+ serial_port[UART_TX] = 13;
+ }
+ }
+}
+
+#else
+
+#define puts( x )
+
+#endif
+
+
+/* Nothing to do for these */
+#define arch_decomp_setup()
+#define arch_decomp_wdog()
+