summaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-arc/serial.h4
-rw-r--r--include/asm-arm/arch-arc/system.h3
-rw-r--r--include/asm-arm/arch-cl7500/system.h2
-rw-r--r--include/asm-arm/arch-ebsa110/system.h1
-rw-r--r--include/asm-arm/arch-ebsa285/io.h4
-rw-r--r--include/asm-arm/arch-ebsa285/irq.h13
-rw-r--r--include/asm-arm/arch-ebsa285/system.h1
-rw-r--r--include/asm-arm/arch-nexuspci/system.h1
-rw-r--r--include/asm-arm/arch-rpc/system.h3
-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
-rw-r--r--include/asm-arm/checksum.h36
-rw-r--r--include/asm-arm/div64.h33
-rw-r--r--include/asm-arm/io.h16
-rw-r--r--include/asm-arm/iomd.h18
-rw-r--r--include/asm-arm/ipcbuf.h29
-rw-r--r--include/asm-arm/msgbuf.h31
-rw-r--r--include/asm-arm/page.h6
-rw-r--r--include/asm-arm/posix_types.h7
-rw-r--r--include/asm-arm/proc-armv/uncompress.h2
-rw-r--r--include/asm-arm/proc-fns.h8
-rw-r--r--include/asm-arm/sembuf.h25
-rw-r--r--include/asm-arm/shmbuf.h42
-rw-r--r--include/asm-arm/sigcontext.h1
-rw-r--r--include/asm-arm/siginfo.h16
-rw-r--r--include/asm-arm/stat.h37
-rw-r--r--include/asm-arm/string.h3
-rw-r--r--include/asm-arm/system.h13
-rw-r--r--include/asm-arm/unistd.h30
34 files changed, 478 insertions, 90 deletions
diff --git a/include/asm-arm/arch-arc/serial.h b/include/asm-arm/arch-arc/serial.h
index c068ac62f..16d5bd73b 100644
--- a/include/asm-arm/arch-arc/serial.h
+++ b/include/asm-arm/arch-arc/serial.h
@@ -28,13 +28,13 @@
#if defined(CONFIG_ARCH_A5K)
/* UART CLK PORT IRQ FLAGS */
-#define STD_SERIAL_PORT_DEFNS
+#define STD_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */
#else
-#define STD_SERIAL_PORT_DEFNS
+#define STD_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */
diff --git a/include/asm-arm/arch-arc/system.h b/include/asm-arm/arch-arc/system.h
index e88114616..7f204b1f5 100644
--- a/include/asm-arm/arch-arc/system.h
+++ b/include/asm-arm/arch-arc/system.h
@@ -20,7 +20,8 @@
#endif
-#define arch_do_idle() do { } while (0)
+#define arch_do_idle() do { } while (0)
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
diff --git a/include/asm-arm/arch-cl7500/system.h b/include/asm-arm/arch-cl7500/system.h
index 767730a4c..201c5c305 100644
--- a/include/asm-arm/arch-cl7500/system.h
+++ b/include/asm-arm/arch-cl7500/system.h
@@ -24,4 +24,6 @@
#define arch_do_idle() \
outb(0, IOMD_SUSMODE)
+#define arch_power_off() do { } while (0)
+
#endif
diff --git a/include/asm-arm/arch-ebsa110/system.h b/include/asm-arm/arch-ebsa110/system.h
index 05e2be707..39f4c84a4 100644
--- a/include/asm-arm/arch-ebsa110/system.h
+++ b/include/asm-arm/arch-ebsa110/system.h
@@ -7,6 +7,7 @@
#define __ASM_ARCH_SYSTEM_H
#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
diff --git a/include/asm-arm/arch-ebsa285/io.h b/include/asm-arm/arch-ebsa285/io.h
index 7861f8470..877625fa8 100644
--- a/include/asm-arm/arch-ebsa285/io.h
+++ b/include/asm-arm/arch-ebsa285/io.h
@@ -16,7 +16,7 @@
* Translation of various region addresses to virtual addresses
*/
#define __io_pci(a) (PCIO_BASE + (a))
-#if 0
+#if 1
#define __mem_pci(a) ((unsigned long)(a))
#define __mem_isa(a) (PCIMEM_BASE + (unsigned long)(a))
#else
@@ -91,7 +91,7 @@ extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
#define __arch_ioremap(off,size,nocache) \
({ \
unsigned long _off = (off), _size = (size); \
- void *_ret = NULL; \
+ void *_ret = (void *)0; \
if (valid_ioaddr(_off, _size)) \
_ret = __ioremap(io_to_phys(_off), _size, 0); \
_ret; \
diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h
index 195aad743..3a4faaf24 100644
--- a/include/asm-arm/arch-ebsa285/irq.h
+++ b/include/asm-arm/arch-ebsa285/irq.h
@@ -44,8 +44,19 @@ static int isa_irq = -1;
static inline int fixup_irq(unsigned int irq)
{
#ifdef CONFIG_HOST_FOOTBRIDGE
- if (irq == isa_irq)
+ if (irq == isa_irq) {
irq = *(unsigned char *)PCIIACK_BASE;
+
+ /*
+ * The NetWinder appears to randomly give wrong interrupt
+ * numbers from time to time. When it does, map them to
+ * the unused IRQ 13
+ */
+ if (irq >= NR_IRQS) {
+ printk(KERN_ERR "Strange interrupt %d?\n", irq);
+ irq = _ISA_IRQ(13);
+ }
+ }
#endif
return irq;
diff --git a/include/asm-arm/arch-ebsa285/system.h b/include/asm-arm/arch-ebsa285/system.h
index ee7573804..ace6afbd6 100644
--- a/include/asm-arm/arch-ebsa285/system.h
+++ b/include/asm-arm/arch-ebsa285/system.h
@@ -9,6 +9,7 @@
#include <asm/leds.h>
#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
diff --git a/include/asm-arm/arch-nexuspci/system.h b/include/asm-arm/arch-nexuspci/system.h
index c1605d3fa..2f8fc9eac 100644
--- a/include/asm-arm/arch-nexuspci/system.h
+++ b/include/asm-arm/arch-nexuspci/system.h
@@ -8,5 +8,6 @@
#define arch_do_idle() do { } while (0)
#define arch_reset(mode) do { } while (0)
+#define arch_power_off() do { } while (0)
#endif
diff --git a/include/asm-arm/arch-rpc/system.h b/include/asm-arm/arch-rpc/system.h
index c40aadcad..c5100fd1a 100644
--- a/include/asm-arm/arch-rpc/system.h
+++ b/include/asm-arm/arch-rpc/system.h
@@ -7,7 +7,8 @@
#include <asm/iomd.h>
#include <asm/io.h>
-#define arch_do_idle() cpu_do_idle()
+#define arch_do_idle() cpu_do_idle()
+#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
{
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()
+
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h
index b827c490c..5e1fb8792 100644
--- a/include/asm-arm/checksum.h
+++ b/include/asm-arm/checksum.h
@@ -4,7 +4,7 @@
* IP checksum routines
*
* Copyright (C) Original authors of ../asm-i386/checksum.h
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1996-1999 Russell King
*/
#ifndef __ASM_ARM_CHECKSUM_H
#define __ASM_ARM_CHECKSUM_H
@@ -37,37 +37,25 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum);
unsigned int
csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr);
-#if 0
-/*
- * This combination is currently not used, but possible:
- */
-unsigned int
-csum_partial_copy_to_user(const char *src, char *dst, int len, int sum, int *err_ptr);
-#endif
-
/*
* These are the old (and unsafe) way of doing checksums, a warning message will be
* printed if they are used and an exception occurs.
*
* these functions should go away after some time.
*/
-#define csum_partial_copy_fromuser csum_partial_copy
-unsigned int
-csum_partial_copy(const char *src, char *dst, int len, int sum);
+#define csum_partial_copy(src,dst,len,sum) csum_partial_copy_nocheck(src,dst,len,sum)
/*
* This is a version of ip_compute_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
- *
- * Converted and optimised for ARM by R. M. King.
*/
static inline unsigned short
ip_fast_csum(unsigned char * iph, unsigned int ihl)
{
unsigned int sum, tmp1;
- __asm__ __volatile__(
- "sub %2, %2, #5 @ ip_fast_csum
+ __asm__ __volatile__(
+ "sub %2, %2, #5 @ ip_fast_csum
ldr %0, [%1], #4
ldr %3, [%1], #4
adds %0, %0, %3
@@ -86,10 +74,10 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl)
mvn %0, %0
mov %0, %0, lsr #16
"
- : "=&r" (sum), "=&r" (iph), "=&r" (ihl), "=&r" (tmp1)
+ : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1)
: "1" (iph), "2" (ihl)
: "cc");
- return(sum);
+ return sum;
}
/*
@@ -130,7 +118,17 @@ static inline unsigned short int
csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
unsigned int proto, unsigned int sum)
{
- return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
+ __asm__(
+ "adds %0, %1, %2 @ csum_tcpudp_magic
+ adcs %0, %0, %3
+ adcs %0, %0, %4
+ adcs %0, %0, %5
+ adds %0, %0, %0, lsl #16
+ addcs %0, %0, #0x10000"
+ : "=&r"(sum)
+ : "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len) << 16), "Ir" (proto << 8)
+ : "cc");
+ return (~sum) >> 16;
}
diff --git a/include/asm-arm/div64.h b/include/asm-arm/div64.h
index fc473b6f0..27fec4ee6 100644
--- a/include/asm-arm/div64.h
+++ b/include/asm-arm/div64.h
@@ -1,32 +1,13 @@
#ifndef __ASM_ARM_DIV64
#define __ASM_ARM_DIV64
-/*
- * unsigned long long division. Yuck Yuck! What is Linux coming to?
- * This is 100% disgusting
- */
-#define do_div(n,base) \
-({ \
- unsigned long __low, __low2, __high, __rem; \
- __low = (n) & 0xffffffff; \
- __high = (n) >> 32; \
- if (__high) { \
- __rem = __high % (unsigned long)base; \
- __high = __high / (unsigned long)base; \
- __low2 = __low >> 16; \
- __low2 += __rem << 16; \
- __rem = __low2 % (unsigned long)base; \
- __low2 = __low2 / (unsigned long)base; \
- __low = __low & 0xffff; \
- __low += __rem << 16; \
- __rem = __low % (unsigned long)base; \
- __low = __low / (unsigned long)base; \
- n = __low + (__low2 << 16) + (__high << 32); \
- } else { \
- __rem = __low % (unsigned long)base; \
- n = (__low / (unsigned long)base); \
- } \
- __rem; \
+/* We're not 64-bit, but... */
+#define do_div(n,base) \
+({ \
+ int __res; \
+ __res = ((unsigned long)n) % (unsigned int)base; \
+ n = ((unsigned long)n) / (unsigned int)base; \
+ __res; \
})
#endif
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 96dc9883d..7e2192902 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -42,10 +42,6 @@ extern void insl(unsigned int port, void *from, int len);
#ifdef __KERNEL__
-#ifndef NULL
-#define NULL ((void *) 0)
-#endif
-
#include <asm/arch/memory.h>
extern __inline__ unsigned long virt_to_phys(volatile void *x)
@@ -86,6 +82,14 @@ extern void _memcpy_fromio(void *, unsigned long, unsigned long);
extern void _memcpy_toio(unsigned long, const void *, unsigned long);
extern void _memset_io(unsigned long, int, unsigned long);
+#define __raw_writeb(val,addr) __arch_putb(val,addr)
+#define __raw_writew(val,addr) __arch_putw(val,addr)
+#define __raw_writel(val,addr) __arch_putl(val,addr)
+
+#define __raw_readb(addr) __arch_getb(addr)
+#define __raw_readw(addr) __arch_getw(addr)
+#define __raw_readl(addr) __arch_getl(addr)
+
/*
* If this architecture has PCI memory IO, then define the read/write
* macros.
@@ -151,11 +155,11 @@ out:
#define isa_writew(val,addr) __arch_putw(val,__mem_isa(addr))
#define isa_writel(val,addr) __arch_putl(val,__mem_isa(addr))
#define isa_memset_io(a,b,c) _memset_io(__mem_isa(a),(b),(c))
-#define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa((b)),(c))
+#define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa(b),(c))
#define isa_memcpy_toio(a,b,c) _memcpy_toio(__mem_isa((a)),(b),(c))
#define isa_eth_io_copy_and_sum(a,b,c,d) \
- eth_copy_and_sum((a),__mem_isa((b),(c),(d))
+ eth_copy_and_sum((a),__mem_isa(b),(c),(d))
static inline int
isa_check_signature(unsigned long io_addr, const unsigned char *signature,
diff --git a/include/asm-arm/iomd.h b/include/asm-arm/iomd.h
index 299b4c5a0..9726cd55d 100644
--- a/include/asm-arm/iomd.h
+++ b/include/asm-arm/iomd.h
@@ -11,7 +11,7 @@
#define IOMD_KARTRX __IOMD(0x004)
#define IOMD_KCTRL __IOMD(0x008)
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_IOLINES __IOMD(0x00C)
#endif
@@ -20,6 +20,10 @@
#define IOMD_IRQCLRA __IOMD(0x014)
#define IOMD_IRQMASKA __IOMD(0x018)
+#ifdef CONFIG_ARCH_CLPS7500
+#define IOMD_SUSMODE __IOMD(0x01C)
+#endif
+
#define IOMD_IRQSTATB __IOMD(0x020)
#define IOMD_IRQREQB __IOMD(0x024)
#define IOMD_IRQMASKB __IOMD(0x028)
@@ -28,6 +32,10 @@
#define IOMD_FIQREQ __IOMD(0x034)
#define IOMD_FIQMASK __IOMD(0x038)
+#ifdef CONFIG_ARCH_CLPS7500
+#define IOMD_CLKCTL __IOMD(0x03C)
+#endif
+
#define IOMD_T0CNTL __IOMD(0x040)
#define IOMD_T0LTCHL __IOMD(0x040)
#define IOMD_T0CNTH __IOMD(0x044)
@@ -42,7 +50,7 @@
#define IOMD_T1GO __IOMD(0x058)
#define IOMD_T1LATCH __IOMD(0x05c)
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_IRQSTATC __IOMD(0x060)
#define IOMD_IRQREQC __IOMD(0x064)
#define IOMD_IRQMASKC __IOMD(0x068)
@@ -59,7 +67,7 @@
#ifdef CONFIG_ARCH_RPC
#define IOMD_DRAMCR __IOMD(0x088)
#endif
-#define IOMD_VREFCR __IOMD(0x08C)
+#define IOMD_REFCR __IOMD(0x08C)
#define IOMD_FSIZE __IOMD(0x090)
#define IOMD_ID0 __IOMD(0x094)
@@ -71,7 +79,7 @@
#define IOMD_MOUSEY __IOMD(0x0A4)
#endif
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_MSEDAT __IOMD(0x0A8)
#define IOMD_MSECTL __IOMD(0x0Ac)
#endif
@@ -84,7 +92,7 @@
#ifdef CONFIG_ARCH_RPC
#define IOMD_DMAEXT __IOMD(0x0CC)
#endif
-#ifdef CONFIG_ARCH_CL7500
+#ifdef CONFIG_ARCH_CLPS7500
#define IOMD_ASTCR __IOMD(0x0CC)
#define IOMD_DRAMCR __IOMD(0x0D0)
#define IOMD_SELFREF __IOMD(0x0D4)
diff --git a/include/asm-arm/ipcbuf.h b/include/asm-arm/ipcbuf.h
new file mode 100644
index 000000000..97683975f
--- /dev/null
+++ b/include/asm-arm/ipcbuf.h
@@ -0,0 +1,29 @@
+#ifndef __ASMARM_IPCBUF_H
+#define __ASMARM_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit mode_t and seq
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned short __pad2;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* __ASMARM_IPCBUF_H */
diff --git a/include/asm-arm/msgbuf.h b/include/asm-arm/msgbuf.h
new file mode 100644
index 000000000..33b35b946
--- /dev/null
+++ b/include/asm-arm/msgbuf.h
@@ -0,0 +1,31 @@
+#ifndef _ASMARM_MSGBUF_H
+#define _ASMARM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned long __unused1;
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned long __unused2;
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long __unused3;
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#endif /* _ASMARM_MSGBUF_H */
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 7ea5157ec..f46fadbb8 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -69,9 +69,9 @@ extern void __bug(const char *file, int line, void *data);
#include <asm/arch/memory.h>
-#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
-#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT)
+#define __pa(x) __virt_to_phys((unsigned long)(x))
+#define __va(x) ((void *)__phys_to_virt((unsigned long)(x)))
+#define MAP_NR(addr) ((__pa(addr) - PHYS_OFFSET) >> PAGE_SHIFT)
#endif
diff --git a/include/asm-arm/posix_types.h b/include/asm-arm/posix_types.h
index 102be60df..8ad590dd4 100644
--- a/include/asm-arm/posix_types.h
+++ b/include/asm-arm/posix_types.h
@@ -32,6 +32,13 @@ typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
diff --git a/include/asm-arm/proc-armv/uncompress.h b/include/asm-arm/proc-armv/uncompress.h
index acce2de35..e67566d5d 100644
--- a/include/asm-arm/proc-armv/uncompress.h
+++ b/include/asm-arm/proc-armv/uncompress.h
@@ -11,7 +11,7 @@ static inline void proc_decomp_setup (void)
eor r0, r0, #0x44 << 24
eor r0, r0, #0x01 << 16
eor r0, r0, #0xA1 << 8
- movs r0, r0, lsr #4
+ movs r0, r0, lsr #5
mcreq p15, 0, r0, c7, c5, 0 @ flush I cache
mrceq p15, 0, r0, c1, c0
orreq r0, r0, #1 << 12
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
index 6bbe53e7c..703f653b8 100644
--- a/include/asm-arm/proc-fns.h
+++ b/include/asm-arm/proc-fns.h
@@ -47,6 +47,14 @@
# define CPU_NAME sa110
# endif
# endif
+# ifdef CONFIG_CPU_SA1100
+# ifdef CPU_NAME
+# undef MULTI_CPU
+# define MULTI_CPU
+# else
+# define CPU_NAME sa1100
+# endif
+# endif
#endif
#ifndef MULTI_CPU
diff --git a/include/asm-arm/sembuf.h b/include/asm-arm/sembuf.h
new file mode 100644
index 000000000..1c0283954
--- /dev/null
+++ b/include/asm-arm/sembuf.h
@@ -0,0 +1,25 @@
+#ifndef _ASMARM_SEMBUF_H
+#define _ASMARM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ unsigned long __unused1;
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long __unused2;
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ASMARM_SEMBUF_H */
diff --git a/include/asm-arm/shmbuf.h b/include/asm-arm/shmbuf.h
new file mode 100644
index 000000000..2e5c67ba1
--- /dev/null
+++ b/include/asm-arm/shmbuf.h
@@ -0,0 +1,42 @@
+#ifndef _ASMARM_SHMBUF_H
+#define _ASMARM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for arm architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ unsigned long __unused1;
+ __kernel_time_t shm_dtime; /* last detach time */
+ unsigned long __unused2;
+ __kernel_time_t shm_ctime; /* last change time */
+ unsigned long __unused3;
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ASMARM_SHMBUF_H */
diff --git a/include/asm-arm/sigcontext.h b/include/asm-arm/sigcontext.h
index 6ce49457f..fc0b80b6a 100644
--- a/include/asm-arm/sigcontext.h
+++ b/include/asm-arm/sigcontext.h
@@ -27,6 +27,7 @@ struct sigcontext {
unsigned long arm_lr;
unsigned long arm_pc;
unsigned long arm_cpsr;
+ unsigned long fault_address;
};
diff --git a/include/asm-arm/siginfo.h b/include/asm-arm/siginfo.h
index c08847d32..4ffd51452 100644
--- a/include/asm-arm/siginfo.h
+++ b/include/asm-arm/siginfo.h
@@ -24,7 +24,8 @@ typedef struct siginfo {
/* kill() */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
+ uid_t _uid32; /* sender's uid */
} _kill;
/* POSIX.1b timers */
@@ -36,17 +37,19 @@ typedef struct siginfo {
/* POSIX.1b signals */
struct {
pid_t _pid; /* sender's pid */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
sigval_t _sigval;
+ uid_t _uid32; /* sender's uid */
} _rt;
/* SIGCHLD */
struct {
pid_t _pid; /* which child */
- uid_t _uid; /* sender's uid */
+ old_uid_t _uid; /* backwards compatibility */
int _status; /* exit code */
clock_t _utime;
clock_t _stime;
+ uid_t _uid32; /* sender's uid */
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
@@ -62,11 +65,18 @@ typedef struct siginfo {
} _sifields;
} siginfo_t;
+#define UID16_SIGINFO_COMPAT_NEEDED
+
/*
* How these fields are to be accessed.
*/
#define si_pid _sifields._kill._pid
+#ifdef __KERNEL__
+#define si_uid _sifields._kill._uid32
+#define si_uid16 _sifields._kill._uid
+#else
#define si_uid _sifields._kill._uid
+#endif /* __KERNEL__ */
#define si_status _sifields._sigchld._status
#define si_utime _sifields._sigchld._utime
#define si_stime _sifields._sigchld._stime
diff --git a/include/asm-arm/stat.h b/include/asm-arm/stat.h
index 970e0eb62..5346b0223 100644
--- a/include/asm-arm/stat.h
+++ b/include/asm-arm/stat.h
@@ -38,5 +38,40 @@ struct stat {
unsigned long __unused5;
};
-/* Someone please add a glibc/arm compatible stat64 struct here. */
+/* This matches struct stat64 in glibc2.1, hence the absolutely
+ * insane amounts of padding around dev_t's.
+ */
+struct stat64 {
+ unsigned short st_dev;
+ unsigned char __pad0[10];
+
+ unsigned long st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned long st_uid;
+ unsigned long st_gid;
+
+ unsigned short st_rdev;
+ unsigned char __pad3[10];
+
+ long long st_size;
+ unsigned long st_blksize;
+
+ unsigned long st_blocks; /* Number 512-byte blocks allocated. */
+ unsigned long __pad4; /* future possible st_blocks high bits */
+
+ unsigned long st_atime;
+ unsigned long __pad5;
+
+ unsigned long st_mtime;
+ unsigned long __pad6;
+
+ unsigned long st_ctime;
+ unsigned long __pad7; /* will be high 32 bits of ctime someday */
+
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
#endif
diff --git a/include/asm-arm/string.h b/include/asm-arm/string.h
index 5d631341e..72b89fa70 100644
--- a/include/asm-arm/string.h
+++ b/include/asm-arm/string.h
@@ -19,7 +19,6 @@ extern char * strchr(const char * s, int c);
#define __HAVE_ARCH_MEMSET
extern void __memzero(void *ptr, __kernel_size_t n);
-extern void __memset(void *ptr, int v, __kernel_size_t n);
#define memset(p,v,n) \
({ \
@@ -27,7 +26,7 @@ extern void __memset(void *ptr, int v, __kernel_size_t n);
if (__builtin_constant_p((v)) && (v) == 0) \
__memzero((p),(n)); \
else \
- __memset((p),(v),(n)); \
+ memset((p),(v),(n)); \
} \
(p); \
})
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 8725ad806..9c9b95d8a 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -42,6 +42,7 @@ extern unsigned int __machine_arch_type;
#define MACH_TYPE_LACIE_NAS 13
#define MACH_TYPE_CLPS7500 14
#define MACH_TYPE_SHARK 15
+#define MACH_TYPE_SA1100 16
/*
* Sort out a definition for machine_arch_type
@@ -124,6 +125,18 @@ extern unsigned int __machine_arch_type;
# define machine_is_co285() (0)
#endif
+#ifdef CONFIG_ARCH_SA1100
+# ifdef machine_arch_type
+# undef machine_arch_type
+# define machine_arch_type __machine_arch_type
+# else
+# define machine_arch_type MACH_TYPE_SA1100
+# endif
+# define machine_is_sa1100() (machine_arch_type == MACH_TYPE_SA1100
+#else
+# define machine_is_sa1100() (0)
+#endif
+
#ifndef machine_arch_type
#define machine_arch_type __machine_arch_type
#endif
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index 7bfbf2349..ca6da3e13 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -7,7 +7,6 @@
* This file contains the system call numbers.
*/
-#define __NR_setup (__NR_SYSCALL_BASE+ 0) /* used only by init, to get system going */
#define __NR_exit (__NR_SYSCALL_BASE+ 1)
#define __NR_fork (__NR_SYSCALL_BASE+ 2)
#define __NR_read (__NR_SYSCALL_BASE+ 3)
@@ -25,7 +24,7 @@
#define __NR_chmod (__NR_SYSCALL_BASE+ 15)
#define __NR_lchown (__NR_SYSCALL_BASE+ 16)
#define __NR_break (__NR_SYSCALL_BASE+ 17)
-#define __NR_oldstat (__NR_SYSCALL_BASE+ 18)
+
#define __NR_lseek (__NR_SYSCALL_BASE+ 19)
#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
#define __NR_mount (__NR_SYSCALL_BASE+ 21)
@@ -35,7 +34,7 @@
#define __NR_stime (__NR_SYSCALL_BASE+ 25)
#define __NR_ptrace (__NR_SYSCALL_BASE+ 26)
#define __NR_alarm (__NR_SYSCALL_BASE+ 27)
-#define __NR_oldfstat (__NR_SYSCALL_BASE+ 28)
+
#define __NR_pause (__NR_SYSCALL_BASE+ 29)
#define __NR_utime (__NR_SYSCALL_BASE+ 30)
#define __NR_stty (__NR_SYSCALL_BASE+ 31)
@@ -83,7 +82,7 @@
#define __NR_sigpending (__NR_SYSCALL_BASE+ 73)
#define __NR_sethostname (__NR_SYSCALL_BASE+ 74)
#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75)
-#define __NR_old_getrlimit (__NR_SYSCALL_BASE+ 76)
+#define __NR_old_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */
#define __NR_getrusage (__NR_SYSCALL_BASE+ 77)
#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78)
#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79)
@@ -91,7 +90,7 @@
#define __NR_setgroups (__NR_SYSCALL_BASE+ 81)
#define __NR_select (__NR_SYSCALL_BASE+ 82)
#define __NR_symlink (__NR_SYSCALL_BASE+ 83)
-#define __NR_oldlstat (__NR_SYSCALL_BASE+ 84)
+
#define __NR_readlink (__NR_SYSCALL_BASE+ 85)
#define __NR_uselib (__NR_SYSCALL_BASE+ 86)
#define __NR_swapon (__NR_SYSCALL_BASE+ 87)
@@ -198,13 +197,32 @@
/* 188 reserved */
/* 189 reserved */
#define __NR_vfork (__NR_SYSCALL_BASE+190)
-#define __NR_getrlimit (__NR_SYSCALL_BASE+191)
+#define __NR_getrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */
#define __NR_mmap2 (__NR_SYSCALL_BASE+192)
#define __NR_truncate64 (__NR_SYSCALL_BASE+193)
#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194)
#define __NR_stat64 (__NR_SYSCALL_BASE+195)
#define __NR_lstat64 (__NR_SYSCALL_BASE+196)
#define __NR_fstat64 (__NR_SYSCALL_BASE+197)
+#define __NR_lchown32 (__NR_SYSCALL_BASE+198)
+#define __NR_getuid32 (__NR_SYSCALL_BASE+199)
+#define __NR_getgid32 (__NR_SYSCALL_BASE+200)
+#define __NR_geteuid32 (__NR_SYSCALL_BASE+201)
+#define __NR_getegid32 (__NR_SYSCALL_BASE+202)
+#define __NR_setreuid32 (__NR_SYSCALL_BASE+203)
+#define __NR_setregid32 (__NR_SYSCALL_BASE+204)
+#define __NR_getgroups32 (__NR_SYSCALL_BASE+205)
+#define __NR_setgroups32 (__NR_SYSCALL_BASE+206)
+#define __NR_fchown32 (__NR_SYSCALL_BASE+207)
+#define __NR_setresuid32 (__NR_SYSCALL_BASE+208)
+#define __NR_getresuid32 (__NR_SYSCALL_BASE+209)
+#define __NR_setresgid32 (__NR_SYSCALL_BASE+210)
+#define __NR_getresgid32 (__NR_SYSCALL_BASE+211)
+#define __NR_chown32 (__NR_SYSCALL_BASE+212)
+#define __NR_setuid32 (__NR_SYSCALL_BASE+213)
+#define __NR_setgid32 (__NR_SYSCALL_BASE+214)
+#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215)
+#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216)
#define __sys2(x) #x
#define __sys1(x) __sys2(x)