Update of /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-ebsa110
In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-arm/arch-ebsa110
Modified Files:
hardware.h io.h irq.h memory.h time.h uncompress.h
Removed Files:
processor.h
Log Message:
Synch to 2.4.15 commit 1
Index: hardware.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-ebsa110/hardware.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- hardware.h 14 Jan 2001 16:58:27 -0000 1.1.1.1
+++ hardware.h 9 Apr 2002 12:33:08 -0000 1.2
@@ -12,41 +12,55 @@
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
-#ifndef __ASSEMBLY__
-
/*
- * IO definitions
+ * The EBSA110 has a weird "ISA IO" region:
+ *
+ * Region 0 (addr = 0xf0000000 + io << 2)
+ * --------------------------------------------------------
+ * Physical region IO region
+ * f0000fe0 - f0000ffc 3f8 - 3ff ttyS0
+ * f0000e60 - f0000e64 398 - 399
+ * f0000de0 - f0000dfc 378 - 37f lp0
+ * f0000be0 - f0000bfc 2f8 - 2ff ttyS1
+ *
+ * Region 1 (addr = 0xf0000000 + (io & ~1) << 1 + (io & 1))
+ * --------------------------------------------------------
+ * Physical region IO region
+ * f00014f1 a79 pnp write data
+ * f00007c0 - f00007c1 3e0 - 3e1 pcmcia
+ * f00004f1 279 pnp address
+ * f0000440 - f000046c 220 - 236 eth0
+ * f0000405 203 pnp read data
*/
-#define PIT_CTRL ((volatile unsigned char *)0xf200000d)
-#define PIT_T2 ((volatile unsigned char *)0xf2000009)
-#define PIT_T1 ((volatile unsigned char *)0xf2000005)
-#define PIT_T0 ((volatile unsigned char *)0xf2000001)
-/*
- * Mapping areas
- */
-#define IO_BASE 0xe0000000
+#define ISAMEM_PHYS 0xe0000000
+#define ISAMEM_SIZE 0x10000000
-/*
- * RAM definitions
- */
-#define FLUSH_BASE_PHYS 0x40000000
+#define ISAIO_PHYS 0xf0000000
+#define ISAIO_SIZE PGDIR_SIZE
-#else /* __ASSEMBLY__ */
+#define TRICK0_PHYS 0xf2000000
+#define TRICK1_PHYS 0xf2400000
+#define TRICK2_PHYS 0xf2800000
+#define TRICK3_PHYS 0xf2c00000
+#define TRICK4_PHYS 0xf3000000
+#define TRICK5_PHYS 0xf3400000
+#define TRICK6_PHYS 0xf3800000
+#define TRICK7_PHYS 0xf3c00000
-#define IO_BASE 0
+#define ISAMEM_BASE 0xe0000000
+#define ISAIO_BASE 0xf0000000
-#endif /* __ASSEMBLY__ */
-
-#define IO_SIZE 0x20000000
-#define IO_START 0xe0000000
+#define PIT_BASE 0xfc000000
+#define SOFT_BASE 0xfd000000
+/*
+ * RAM definitions
+ */
+#define FLUSH_BASE_PHYS 0x40000000
#define FLUSH_BASE 0xdf000000
-#define PCIO_BASE 0xf0000000
-
-#define UNCACHEABLE_ADDR 0xf3000000
-#define PARAMS_OFFSET 0x400
+#define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */
#endif
Index: io.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-ebsa110/io.h,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- io.h 25 Feb 2001 23:14:53 -0000 1.1.1.2
+++ io.h 9 Apr 2002 12:33:08 -0000 1.2
@@ -13,7 +13,7 @@
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
-#define IO_SPACE_LIMIT 0xffffffff
+#define IO_SPACE_LIMIT 0xffff
/*
* Generic virtual read/write
@@ -21,6 +21,39 @@
#define __arch_getw(a) (*(volatile unsigned short *)(a))
#define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v))
-#define __io(p) (ISAIO_BASE + ((p) << 2))
+u8 __inb(int port);
+u16 __inw(int port);
+u32 __inl(int port);
+
+#define inb(p) __inb(p)
+#define inw(p) __inw(p)
+#define inl(p) __inl(p)
+
+void __outb(u8 val, int port);
+void __outw(u16 val, int port);
+void __outl(u32 val, int port);
+
+#define outb(v,p) __outb(v,p)
+#define outw(v,p) __outw(v,p)
+#define outl(v,p) __outl(v,p)
+
+u8 __readb(void *addr);
+u16 __readw(void *addr);
+u32 __readl(void *addr);
+
+#define readb(b) __readb(b)
+#define readw(b) __readw(b)
+#define readl(b) __readl(b)
+
+void __writeb(u8 val, void *addr);
+void __writew(u16 val, void *addr);
+void __writel(u32 val, void *addr);
+
+#define writeb(v,b) __writeb(v,b)
+#define writew(v,b) __writew(v,b)
+#define writel(v,b) __writel(v,b)
+
+#define __arch_ioremap(off,sz,c) ((void *)(off))
+#define __arch_iounmap(virt) do { } while (0)
#endif
Index: irq.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-ebsa110/irq.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- irq.h 14 Jan 2001 16:58:28 -0000 1.1.1.1
+++ irq.h 9 Apr 2002 12:33:08 -0000 1.2
@@ -10,47 +10,4 @@
* Changelog:
* 22-08-1998 RMK Restructured IRQ routines
*/
-
-#define IRQ_MCLR ((volatile unsigned char *)0xf3000000)
-#define IRQ_MSET ((volatile unsigned char *)0xf2c00000)
-#define IRQ_MASK ((volatile unsigned char *)0xf2c00000)
-
-#define fixup_irq(x) (x)
-
-static void ebsa110_mask_and_ack_irq(unsigned int irq)
-{
- *IRQ_MCLR = 1 << irq;
-}
-
-static void ebsa110_mask_irq(unsigned int irq)
-{
- *IRQ_MCLR = 1 << irq;
-}
-
-static void ebsa110_unmask_irq(unsigned int irq)
-{
- *IRQ_MSET = 1 << irq;
-}
-
-static __inline__ void irq_init_irq(void)
-{
- unsigned long flags;
- int irq;
-
- save_flags_cli (flags);
- *IRQ_MCLR = 0xff;
- *IRQ_MSET = 0x55;
- *IRQ_MSET = 0x00;
- if (*IRQ_MASK != 0x55)
- while (1);
- *IRQ_MCLR = 0xff; /* clear all interrupt enables */
- restore_flags (flags);
-
- for (irq = 0; irq < NR_IRQS; irq++) {
- irq_desc[irq].valid = 1;
- irq_desc[irq].probe_ok = 1;
- irq_desc[irq].mask_ack = ebsa110_mask_and_ack_irq;
- irq_desc[irq].mask = ebsa110_mask_irq;
- irq_desc[irq].unmask = ebsa110_unmask_irq;
- }
-}
+#define fixup_irq(i) (i)
Index: memory.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-ebsa110/memory.h,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- memory.h 25 Feb 2001 23:14:53 -0000 1.1.1.2
+++ memory.h 9 Apr 2002 12:33:08 -0000 1.2
@@ -35,13 +35,19 @@
#define PHYS_OFFSET (0x00000000UL)
#define __virt_to_phys__is_a_macro
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
+#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt__is_a_macro
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
+#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
+/*
+ * We keep this 1:1 so that we don't interfere
+ * with the PCMCIA memory regions
+ */
#define __virt_to_bus__is_a_macro
-#define __virt_to_bus(x) __virt_to_phys(x)
+#define __virt_to_bus(x) (x)
#define __bus_to_virt__is_a_macro
-#define __bus_to_virt(x) __phys_to_virt(x)
+#define __bus_to_virt(x) (x)
+
+#define PHYS_TO_NID(addr) (0)
#endif
Index: time.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-ebsa110/time.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- time.h 14 Jan 2001 16:58:28 -0000 1.1.1.1
+++ time.h 9 Apr 2002 12:33:08 -0000 1.2
@@ -18,57 +18,24 @@
#include <asm/leds.h>
-#define MCLK_47_8
-
-#if defined(MCLK_42_3)
-#define PIT1_COUNT 0xecbe
-#elif defined(MCLK_47_8)
-/*
- * This should be 0x10B43, but that doesn't exactly fit.
- * We run the timer interrupt at 5ms, and then divide it by
- * two in software... This is so that the user processes
- * see exactly the same model whichever ARM processor they're
- * running on.
- */
-#define PIT1_COUNT 0x85A1
-#define DIVISOR 2
-#endif
+extern int ebsa110_reset_timer(void);
+extern void ebsa110_setup_timer(void);
static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- *PIT_T1 = (PIT1_COUNT) & 0xff;
- *PIT_T1 = (PIT1_COUNT) >> 8;
-
-#ifdef DIVISOR
- {
- static unsigned int divisor;
-
- if (divisor--)
- return;
- divisor = DIVISOR - 1;
+ if (ebsa110_reset_timer()) {
+ do_leds();
+ do_timer(regs);
+ do_profile(regs);
}
-#endif
- do_leds();
- do_timer(regs);
- do_profile(regs);
}
/*
* Set up timer interrupt.
*/
-extern __inline__ void setup_timer(void)
+static inline void setup_timer(void)
{
- /*
- * Timer 1, mode 0, 16-bit, autoreload
- */
- *PIT_CTRL = 0x70;
-
- /*
- * Refresh counter clocked at 47.8MHz/7 = 146.4ns
- * We want centi-second interrupts
- */
- *PIT_T1 = (PIT1_COUNT) & 0xff;
- *PIT_T1 = (PIT1_COUNT) >> 8;
+ ebsa110_setup_timer();
timer_irq.handler = timer_interrupt;
Index: uncompress.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-ebsa110/uncompress.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- uncompress.h 14 Jan 2001 16:58:29 -0000 1.1.1.1
+++ uncompress.h 9 Apr 2002 12:33:08 -0000 1.2
@@ -28,7 +28,11 @@
ldrb %0, [%2], #1
teq %0, #0
bne 1b
-3: " : : "r" (0), "r" (0), "r" (s), "r" (0xf0000be0) : "cc");
+3: ldrb %1, [%3, #0x14]
+ and %1, %1, #0x60
+ teq %1, #0x60
+ bne 3b
+ " : : "r" (0), "r" (0), "r" (s), "r" (0xf0000be0) : "cc");
}
/*
--- processor.h DELETED ---
|