aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ebsa110
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ebsa110')
-rw-r--r--arch/arm/mach-ebsa110/core.c2
-rw-r--r--arch/arm/mach-ebsa110/include/mach/debug-macro.S21
-rw-r--r--arch/arm/mach-ebsa110/include/mach/dma.h11
-rw-r--r--arch/arm/mach-ebsa110/include/mach/entry-macro.S39
-rw-r--r--arch/arm/mach-ebsa110/include/mach/hardware.h63
-rw-r--r--arch/arm/mach-ebsa110/include/mach/io.h92
-rw-r--r--arch/arm/mach-ebsa110/include/mach/irqs.h20
-rw-r--r--arch/arm/mach-ebsa110/include/mach/memory.h37
-rw-r--r--arch/arm/mach-ebsa110/include/mach/system.h39
-rw-r--r--arch/arm/mach-ebsa110/include/mach/timex.h19
-rw-r--r--arch/arm/mach-ebsa110/include/mach/uncompress.h45
-rw-r--r--arch/arm/mach-ebsa110/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-ebsa110/io.c2
-rw-r--r--arch/arm/mach-ebsa110/leds.c2
14 files changed, 399 insertions, 3 deletions
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 31f4f213cce3..65cc7c271917 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -15,7 +15,7 @@
15#include <linux/serial_8250.h> 15#include <linux/serial_8250.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/arch/hardware.h> 18#include <mach/hardware.h>
19#include <asm/irq.h> 19#include <asm/irq.h>
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/setup.h> 21#include <asm/setup.h>
diff --git a/arch/arm/mach-ebsa110/include/mach/debug-macro.S b/arch/arm/mach-ebsa110/include/mach/debug-macro.S
new file mode 100644
index 000000000000..1dde8227f3a2
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/debug-macro.S
@@ -0,0 +1,21 @@
1/* arch/arm/mach-ebsa110/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12**/
13
14 .macro addruart,rx
15 mov \rx, #0xf0000000
16 orr \rx, \rx, #0x00000be0
17 .endm
18
19#define UART_SHIFT 2
20#define FLOW_CONTROL
21#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ebsa110/include/mach/dma.h b/arch/arm/mach-ebsa110/include/mach/dma.h
new file mode 100644
index 000000000000..780a04c8bbe9
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/dma.h
@@ -0,0 +1,11 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/dma.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA110 DMA definitions
11 */
diff --git a/arch/arm/mach-ebsa110/include/mach/entry-macro.S b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
new file mode 100644
index 000000000000..cc3e5992f6b3
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for ebsa110 platform.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11
12
13#define IRQ_STAT 0xff000000 /* read */
14
15 .macro disable_fiq
16 .endm
17
18 .macro get_irqnr_preamble, base, tmp
19 mov \base, #IRQ_STAT
20 .endm
21
22 .macro arch_ret_to_user, tmp1, tmp2
23 .endm
24
25 .macro get_irqnr_and_base, irqnr, stat, base, tmp
26 ldrb \stat, [\base] @ get interrupts
27 mov \irqnr, #0
28 tst \stat, #15
29 addeq \irqnr, \irqnr, #4
30 moveq \stat, \stat, lsr #4
31 tst \stat, #3
32 addeq \irqnr, \irqnr, #2
33 moveq \stat, \stat, lsr #2
34 tst \stat, #1
35 addeq \irqnr, \irqnr, #1
36 moveq \stat, \stat, lsr #1
37 tst \stat, #1 @ bit 0 should be set
38 .endm
39
diff --git a/arch/arm/mach-ebsa110/include/mach/hardware.h b/arch/arm/mach-ebsa110/include/mach/hardware.h
new file mode 100644
index 000000000000..4b2fb7743909
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/hardware.h
@@ -0,0 +1,63 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/hardware.h
3 *
4 * Copyright (C) 1996-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the EBSA-110.
11 */
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15/*
16 * The EBSA110 has a weird "ISA IO" region:
17 *
18 * Region 0 (addr = 0xf0000000 + io << 2)
19 * --------------------------------------------------------
20 * Physical region IO region
21 * f0000fe0 - f0000ffc 3f8 - 3ff ttyS0
22 * f0000e60 - f0000e64 398 - 399
23 * f0000de0 - f0000dfc 378 - 37f lp0
24 * f0000be0 - f0000bfc 2f8 - 2ff ttyS1
25 *
26 * Region 1 (addr = 0xf0000000 + (io & ~1) << 1 + (io & 1))
27 * --------------------------------------------------------
28 * Physical region IO region
29 * f00014f1 a79 pnp write data
30 * f00007c0 - f00007c1 3e0 - 3e1 pcmcia
31 * f00004f1 279 pnp address
32 * f0000440 - f000046c 220 - 236 eth0
33 * f0000405 203 pnp read data
34 */
35
36#define ISAMEM_PHYS 0xe0000000
37#define ISAMEM_SIZE 0x10000000
38
39#define ISAIO_PHYS 0xf0000000
40#define ISAIO_SIZE PGDIR_SIZE
41
42#define TRICK0_PHYS 0xf2000000
43#define TRICK1_PHYS 0xf2400000
44#define TRICK2_PHYS 0xf2800000
45#define TRICK3_PHYS 0xf2c00000
46#define TRICK4_PHYS 0xf3000000
47#define TRICK5_PHYS 0xf3400000
48#define TRICK6_PHYS 0xf3800000
49#define TRICK7_PHYS 0xf3c00000
50
51#define ISAMEM_BASE 0xe0000000
52#define ISAIO_BASE 0xf0000000
53
54#define PIT_BASE 0xfc000000
55#define SOFT_BASE 0xfd000000
56
57/*
58 * RAM definitions
59 */
60#define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */
61
62#endif
63
diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h
new file mode 100644
index 000000000000..f68daa632af0
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/io.h
@@ -0,0 +1,92 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/io.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 06-Dec-1997 RMK Created.
12 */
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#define IO_SPACE_LIMIT 0xffff
17
18u8 __inb8(unsigned int port);
19void __outb8(u8 val, unsigned int port);
20
21u8 __inb16(unsigned int port);
22void __outb16(u8 val, unsigned int port);
23
24u16 __inw(unsigned int port);
25void __outw(u16 val, unsigned int port);
26
27u32 __inl(unsigned int port);
28void __outl(u32 val, unsigned int port);
29
30u8 __readb(const volatile void __iomem *addr);
31u16 __readw(const volatile void __iomem *addr);
32u32 __readl(const volatile void __iomem *addr);
33
34void __writeb(u8 val, void __iomem *addr);
35void __writew(u16 val, void __iomem *addr);
36void __writel(u32 val, void __iomem *addr);
37
38/*
39 * Argh, someone forgot the IOCS16 line. We therefore have to handle
40 * the byte stearing by selecting the correct byte IO functions here.
41 */
42#ifdef ISA_SIXTEEN_BIT_PERIPHERAL
43#define inb(p) __inb16(p)
44#define outb(v,p) __outb16(v,p)
45#else
46#define inb(p) __inb8(p)
47#define outb(v,p) __outb8(v,p)
48#endif
49
50#define inw(p) __inw(p)
51#define outw(v,p) __outw(v,p)
52
53#define inl(p) __inl(p)
54#define outl(v,p) __outl(v,p)
55
56#define readb(b) __readb(b)
57#define readw(b) __readw(b)
58#define readl(b) __readl(b)
59#define readb_relaxed(addr) readb(addr)
60#define readw_relaxed(addr) readw(addr)
61#define readl_relaxed(addr) readl(addr)
62
63#define writeb(v,b) __writeb(v,b)
64#define writew(v,b) __writew(v,b)
65#define writel(v,b) __writel(v,b)
66
67static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
68 unsigned int flags)
69{
70 return (void __iomem *)cookie;
71}
72
73#define __arch_ioremap __arch_ioremap
74#define __arch_iounmap(cookie) do { } while (0)
75
76extern void insb(unsigned int port, void *buf, int sz);
77extern void insw(unsigned int port, void *buf, int sz);
78extern void insl(unsigned int port, void *buf, int sz);
79
80extern void outsb(unsigned int port, const void *buf, int sz);
81extern void outsw(unsigned int port, const void *buf, int sz);
82extern void outsl(unsigned int port, const void *buf, int sz);
83
84/* can't support writesb atm */
85extern void writesw(void __iomem *addr, const void *data, int wordlen);
86extern void writesl(void __iomem *addr, const void *data, int longlen);
87
88/* can't support readsb atm */
89extern void readsw(const void __iomem *addr, void *data, int wordlen);
90extern void readsl(const void __iomem *addr, void *data, int longlen);
91
92#endif
diff --git a/arch/arm/mach-ebsa110/include/mach/irqs.h b/arch/arm/mach-ebsa110/include/mach/irqs.h
new file mode 100644
index 000000000000..a8f3771bc060
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/irqs.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/irqs.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#define NR_IRQS 8
12
13#define IRQ_EBSA110_PRINTER 0
14#define IRQ_EBSA110_COM1 1
15#define IRQ_EBSA110_COM2 2
16#define IRQ_EBSA110_ETHERNET 3
17#define IRQ_EBSA110_TIMER0 4
18#define IRQ_EBSA110_TIMER1 5
19#define IRQ_EBSA110_PCMCIA 6
20#define IRQ_EBSA110_IMMEDIATE 7
diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h
new file mode 100644
index 000000000000..eea4b75b657b
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/memory.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/memory.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
13 * 21-Mar-1999 RMK Renamed to memory.h
14 * RMK Moved TASK_SIZE and PAGE_OFFSET here
15 */
16#ifndef __ASM_ARCH_MEMORY_H
17#define __ASM_ARCH_MEMORY_H
18
19/*
20 * Physical DRAM offset.
21 */
22#define PHYS_OFFSET UL(0x00000000)
23
24/*
25 * We keep this 1:1 so that we don't interfere
26 * with the PCMCIA memory regions
27 */
28#define __virt_to_bus(x) (x)
29#define __bus_to_virt(x) (x)
30
31/*
32 * Cache flushing area - SRAM
33 */
34#define FLUSH_BASE_PHYS 0x40000000
35#define FLUSH_BASE 0xdf000000
36
37#endif
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
new file mode 100644
index 000000000000..350a028997ef
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/system.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/system.h
3 *
4 * Copyright (C) 1996-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_SYSTEM_H
11#define __ASM_ARCH_SYSTEM_H
12
13/*
14 * EBSA110 idling methodology:
15 *
16 * We can not execute the "wait for interrupt" instruction since that
17 * will stop our MCLK signal (which provides the clock for the glue
18 * logic, and therefore the timer interrupt).
19 *
20 * Instead, we spin, polling the IRQ_STAT register for the occurrence
21 * of any interrupt with core clock down to the memory clock.
22 */
23static inline void arch_idle(void)
24{
25 const char *irq_stat = (char *)0xff000000;
26
27 /* disable clock switching */
28 asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
29
30 /* wait for an interrupt to occur */
31 while (!*irq_stat);
32
33 /* enable clock switching */
34 asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
35}
36
37#define arch_reset(mode) cpu_reset(0x80000000)
38
39#endif
diff --git a/arch/arm/mach-ebsa110/include/mach/timex.h b/arch/arm/mach-ebsa110/include/mach/timex.h
new file mode 100644
index 000000000000..4fb43b22a102
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/timex.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/timex.h
3 *
4 * Copyright (C) 1997, 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA110 architecture timex specifications
11 */
12
13/*
14 * On the EBSA, the clock ticks at weird rates.
15 * This is therefore not used to calculate the
16 * divisor.
17 */
18#define CLOCK_TICK_RATE 47894000
19
diff --git a/arch/arm/mach-ebsa110/include/mach/uncompress.h b/arch/arm/mach-ebsa110/include/mach/uncompress.h
new file mode 100644
index 000000000000..32041509fbf8
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/uncompress.h
@@ -0,0 +1,45 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/uncompress.h
3 *
4 * Copyright (C) 1996,1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/serial_reg.h>
12
13#define SERIAL_BASE ((unsigned char *)0xf0000be0)
14
15/*
16 * This does not append a newline
17 */
18static inline void putc(int c)
19{
20 unsigned char v, *base = SERIAL_BASE;
21
22 do {
23 v = base[UART_LSR << 2];
24 barrier();
25 } while (!(v & UART_LSR_THRE));
26
27 base[UART_TX << 2] = c;
28}
29
30static inline void flush(void)
31{
32 unsigned char v, *base = SERIAL_BASE;
33
34 do {
35 v = base[UART_LSR << 2];
36 barrier();
37 } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) !=
38 (UART_LSR_TEMT|UART_LSR_THRE));
39}
40
41/*
42 * nothing to do
43 */
44#define arch_decomp_setup()
45#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ebsa110/include/mach/vmalloc.h b/arch/arm/mach-ebsa110/include/mach/vmalloc.h
new file mode 100644
index 000000000000..9b44c19e95ec
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/vmalloc.h
@@ -0,0 +1,10 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/vmalloc.h
3 *
4 * Copyright (C) 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VMALLOC_END (PAGE_OFFSET + 0x1f000000)
diff --git a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c
index a2027adeefcb..53748f5462e9 100644
--- a/arch/arm/mach-ebsa110/io.c
+++ b/arch/arm/mach-ebsa110/io.c
@@ -24,7 +24,7 @@
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/types.h> 25#include <linux/types.h>
26 26
27#include <asm/arch/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/page.h> 29#include <asm/page.h>
30 30
diff --git a/arch/arm/mach-ebsa110/leds.c b/arch/arm/mach-ebsa110/leds.c
index b16d01679772..6a6ea57c2a4e 100644
--- a/arch/arm/mach-ebsa110/leds.c
+++ b/arch/arm/mach-ebsa110/leds.c
@@ -15,7 +15,7 @@
15#include <linux/spinlock.h> 15#include <linux/spinlock.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/arch/hardware.h> 18#include <mach/hardware.h>
19#include <asm/leds.h> 19#include <asm/leds.h>
20#include <asm/system.h> 20#include <asm/system.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>