summaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-17 13:25:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-17 13:25:08 +0000
commit59223edaa18759982db0a8aced0e77457d10c68e (patch)
tree89354903b01fa0a447bffeefe00df3044495db2e /include/asm-arm
parentdb7d4daea91e105e3859cf461d7e53b9b77454b2 (diff)
Merge with Linux 2.3.6. Sorry, this isn't tested on silicon, I don't
have a MIPS box at hand.
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-arc/ide.h15
-rw-r--r--include/asm-arm/arch-ebsa285/ide.h19
-rw-r--r--include/asm-arm/arch-rpc/ide.h15
-rw-r--r--include/asm-arm/arch-rpc/io.h51
-rw-r--r--include/asm-arm/ide.h2
-rw-r--r--include/asm-arm/io.h13
-rw-r--r--include/asm-arm/proc-fns.h2
-rw-r--r--include/asm-arm/processor.h6
-rw-r--r--include/asm-arm/semaphore.h3
9 files changed, 84 insertions, 42 deletions
diff --git a/include/asm-arm/arch-arc/ide.h b/include/asm-arm/arch-arc/ide.h
index 2fc6ce282..031225380 100644
--- a/include/asm-arm/arch-arc/ide.h
+++ b/include/asm-arm/arch-arc/ide.h
@@ -19,33 +19,32 @@
* 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)
+static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
{
ide_ioreg_t reg = (ide_ioreg_t) data_port;
int i;
- memset(hw, 0, sizeof(*hw));
-
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg;
reg += 1;
}
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port;
- hw->irq = irq;
+ hw->irq = *irq;
}
/*
* This registers the standard ports for this architecture with the IDE
* driver.
*/
-static __inline__ void
-ide_init_default_hwifs(void)
+static __inline__ void ide_init_default_hwifs(void)
{
#ifdef CONFIG_ARCH_A5K
hw_regs_t hw;
- ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_HARDDISK);
+ memset(hw, 0, sizeof(*hw));
+
+ ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
+ hw.irq = IRQ_HARDDISK;
ide_register_hw(&hw, NULL);
#endif
}
diff --git a/include/asm-arm/arch-ebsa285/ide.h b/include/asm-arm/arch-ebsa285/ide.h
index b0071a45b..d86a6f98a 100644
--- a/include/asm-arm/arch-ebsa285/ide.h
+++ b/include/asm-arm/arch-ebsa285/ide.h
@@ -12,27 +12,32 @@
* 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)
+static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
{
ide_ioreg_t reg = (ide_ioreg_t) data_port;
int i;
- memset(hw, 0, sizeof(*hw));
-
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg;
reg += 1;
}
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port;
- hw->irq = irq;
+ hw->irq = *irq;
}
/*
* This registers the standard ports for this architecture with the IDE
* driver.
*/
-static __inline__ void
-ide_init_default_hwifs(void)
+static __inline__ void ide_init_default_hwifs(void)
{
+#if 0
+ hw_regs_t hw;
+
+ memset(hw, 0, sizeof(*hw));
+
+ ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
+ hw.irq = IRQ_HARDDISK;
+ ide_register_hw(&hw, NULL);
+#endif
}
diff --git a/include/asm-arm/arch-rpc/ide.h b/include/asm-arm/arch-rpc/ide.h
index ccbc7cf76..9826f15f5 100644
--- a/include/asm-arm/arch-rpc/ide.h
+++ b/include/asm-arm/arch-rpc/ide.h
@@ -12,31 +12,30 @@
* 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)
+static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
{
ide_ioreg_t reg = (ide_ioreg_t) data_port;
int i;
- memset(hw, 0, sizeof(*hw));
-
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg;
reg += 1;
}
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port;
- hw->irq = irq;
+ hw->irq = *irq;
}
/*
* This registers the standard ports for this architecture with the IDE
* driver.
*/
-static __inline__ void
-ide_init_default_hwifs(void)
+static __inline__ void ide_init_default_hwifs(void)
{
hw_regs_t hw;
- ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_HARDDISK);
+ memset(hw, 0, sizeof(*hw));
+
+ ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
+ hw.irq = IRQ_HARDDISK;
ide_register_hw(&hw, NULL);
}
diff --git a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h
index ecf07c17c..740fa30c0 100644
--- a/include/asm-arm/arch-rpc/io.h
+++ b/include/asm-arm/arch-rpc/io.h
@@ -28,18 +28,43 @@
* Dynamic IO functions - let the compiler
* optimize the expressions
*/
-#define DECLARE_DYN_OUT(fnsuffix,instr) \
-extern __inline__ void __out##fnsuffix (unsigned int value, unsigned int port) \
-{ \
- unsigned long temp; \
- __asm__ __volatile__( \
- "tst %2, #0x80000000\n\t" \
- "mov %0, %4\n\t" \
- "addeq %0, %0, %3\n\t" \
- "str" ##instr## " %1, [%0, %2, lsl #2] @ out"###fnsuffix \
- : "=&r" (temp) \
- : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
- : "cc"); \
+extern __inline__ void __outb (unsigned int value, unsigned int port)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "tst %2, #0x80000000\n\t"
+ "mov %0, %4\n\t"
+ "addeq %0, %0, %3\n\t"
+ "strb %1, [%0, %2, lsl #2] @ outb"
+ : "=&r" (temp)
+ : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
+ : "cc");
+}
+
+extern __inline__ void __outw (unsigned int value, unsigned int port)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "tst %2, #0x80000000\n\t"
+ "mov %0, %4\n\t"
+ "addeq %0, %0, %3\n\t"
+ "str %1, [%0, %2, lsl #2] @ outw"
+ : "=&r" (temp)
+ : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
+ : "cc");
+}
+
+extern __inline__ void __outl (unsigned int value, unsigned int port)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "tst %2, #0x80000000\n\t"
+ "mov %0, %4\n\t"
+ "addeq %0, %0, %3\n\t"
+ "str %1, [%0, %2, lsl #2] @ outl"
+ : "=&r" (temp)
+ : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
+ : "cc");
}
#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
@@ -66,7 +91,6 @@ extern __inline__ unsigned int __ioaddr (unsigned int port) \
}
#define DECLARE_IO(sz,fnsuffix,instr) \
- DECLARE_DYN_OUT(fnsuffix,instr) \
DECLARE_DYN_IN(sz,fnsuffix,instr)
DECLARE_IO(char,b,"b")
@@ -74,7 +98,6 @@ DECLARE_IO(short,w,"")
DECLARE_IO(long,l,"")
#undef DECLARE_IO
-#undef DECLARE_DYN_OUT
#undef DECLARE_DYN_IN
/*
diff --git a/include/asm-arm/ide.h b/include/asm-arm/ide.h
index 76da8806b..6bd9d3c02 100644
--- a/include/asm-arm/ide.h
+++ b/include/asm-arm/ide.h
@@ -48,4 +48,4 @@ typedef union {
#endif /* __KERNEL__ */
-#endif /* __ASMi386_IDE_H */
+#endif /* __ASMARM_IDE_H */
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 35db8e667..cfa021bcd 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -189,10 +189,21 @@ __IO(l,"",long)
#define inl_p(port) __inl_p((port))
#endif
-#endif
+/* Nothing to do */
+#ifndef dma_cache_inv
+#define dma_cache_inv(_start,_size) do { } while (0)
+#endif
+#ifndef dma_cache_wback
+#define dma_cache_wback(_start,_size) do { } while (0)
#ifndef ARCH_READWRITE
+#ifndef dma_cache_wback_inv
+#define dma_cache_wback_inv(_start,_size) do { } while (0)
+#endif
+
+#endif /* __KERNEL__ */
+#endif /* __ASM_ARM_IO_H */
/* for panic */
#include <linux/kernel.h>
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
index 81873a58c..75e976244 100644
--- a/include/asm-arm/proc-fns.h
+++ b/include/asm-arm/proc-fns.h
@@ -10,7 +10,7 @@
#ifdef __KERNEL__
-/* forward-decare task_struct */
+/* forward-declare task_struct */
struct task_struct;
/*
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h
index a59e441a1..f308d67b1 100644
--- a/include/asm-arm/processor.h
+++ b/include/asm-arm/processor.h
@@ -7,6 +7,12 @@
#ifndef __ASM_ARM_PROCESSOR_H
#define __ASM_ARM_PROCESSOR_H
+/*
+ * Default implementation of macro that returns current
+ * instruction pointer ("program counter").
+ */
+#define current_text_addr() ({ __label__ _l; _l: &&_l;})
+
#define FP_SIZE 35
struct fp_hard_struct {
diff --git a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h
index a51b6f96e..05456d7de 100644
--- a/include/asm-arm/semaphore.h
+++ b/include/asm-arm/semaphore.h
@@ -5,13 +5,12 @@
#define __ASM_ARM_SEMAPHORE_H
#include <linux/linkage.h>
-#include <asm/system.h>
#include <asm/atomic.h>
struct semaphore {
atomic_t count;
int waking;
- struct wait_queue * wait;
+ wait_queue_head_t wait;
};
#define MUTEX ((struct semaphore) { ATOMIC_INIT(1), 0, NULL })