diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-11 16:44:53 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:38 -0400 |
commit | ceade897f31b8bb66f378cc35859fcfd0d46aaa2 (patch) | |
tree | 44f6fffb4f93ec6247b468e4009e414b4124f585 /arch/arm/mach-vexpress/include | |
parent | 9bf5b2ef673237e0e43161c56f70ac8bf24e43f9 (diff) |
ARM: Add Versatile Express support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-vexpress/include')
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/clkdev.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/debug-macro.S | 23 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/entry-macro.S | 67 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/hardware.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/io.h | 28 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/irqs.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/memory.h | 25 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/motherboard.h | 121 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/system.h | 37 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/timex.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/uncompress.h | 52 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/vmalloc.h | 21 |
12 files changed, 417 insertions, 0 deletions
diff --git a/arch/arm/mach-vexpress/include/mach/clkdev.h b/arch/arm/mach-vexpress/include/mach/clkdev.h new file mode 100644 index 000000000000..3f8307d73cad --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/clkdev.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #include <plat/clock.h> | ||
5 | |||
6 | struct clk { | ||
7 | const struct clk_ops *ops; | ||
8 | unsigned long rate; | ||
9 | const struct icst_params *params; | ||
10 | }; | ||
11 | |||
12 | #define __clk_get(clk) ({ 1; }) | ||
13 | #define __clk_put(clk) do { } while (0) | ||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/mach-vexpress/include/mach/debug-macro.S b/arch/arm/mach-vexpress/include/mach/debug-macro.S new file mode 100644 index 000000000000..5167e2aceeba --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/debug-macro.S | |||
@@ -0,0 +1,23 @@ | |||
1 | /* arch/arm/mach-realview/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 | #define DEBUG_LL_UART_OFFSET 0x00009000 | ||
14 | |||
15 | .macro addruart,rx,tmp | ||
16 | mrc p15, 0, \rx, c1, c0 | ||
17 | tst \rx, #1 @ MMU enabled? | ||
18 | moveq \rx, #0x10000000 | ||
19 | movne \rx, #0xf8000000 @ virtual base | ||
20 | orr \rx, \rx, #DEBUG_LL_UART_OFFSET | ||
21 | .endm | ||
22 | |||
23 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-vexpress/include/mach/entry-macro.S b/arch/arm/mach-vexpress/include/mach/entry-macro.S new file mode 100644 index 000000000000..20e9fb514f0a --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/entry-macro.S | |||
@@ -0,0 +1,67 @@ | |||
1 | #include <asm/hardware/gic.h> | ||
2 | |||
3 | .macro disable_fiq | ||
4 | .endm | ||
5 | |||
6 | .macro get_irqnr_preamble, base, tmp | ||
7 | ldr \base, =gic_cpu_base_addr | ||
8 | ldr \base, [\base] | ||
9 | .endm | ||
10 | |||
11 | .macro arch_ret_to_user, tmp1, tmp2 | ||
12 | .endm | ||
13 | |||
14 | /* | ||
15 | * The interrupt numbering scheme is defined in the | ||
16 | * interrupt controller spec. To wit: | ||
17 | * | ||
18 | * Interrupts 0-15 are IPI | ||
19 | * 16-28 are reserved | ||
20 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
21 | * 32-1020 are global | ||
22 | * 1021-1022 are reserved | ||
23 | * 1023 is "spurious" (no interrupt) | ||
24 | * | ||
25 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
26 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
27 | * | ||
28 | * A simple read from the controller will tell us the number of the highest | ||
29 | * priority enabled interrupt. We then just need to check whether it is in the | ||
30 | * valid range for an IRQ (30-1020 inclusive). | ||
31 | */ | ||
32 | |||
33 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
34 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
35 | ldr \tmp, =1021 | ||
36 | bic \irqnr, \irqstat, #0x1c00 | ||
37 | cmp \irqnr, #29 | ||
38 | cmpcc \irqnr, \irqnr | ||
39 | cmpne \irqnr, \tmp | ||
40 | cmpcs \irqnr, \irqnr | ||
41 | .endm | ||
42 | |||
43 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
44 | * register) is preserved from the macro above. | ||
45 | * If there is an IPI, we immediately signal end of interrupt on the | ||
46 | * controller, since this requires the original irqstat value which | ||
47 | * we won't easily be able to recreate later. | ||
48 | */ | ||
49 | |||
50 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
51 | bic \irqnr, \irqstat, #0x1c00 | ||
52 | cmp \irqnr, #16 | ||
53 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
54 | cmpcs \irqnr, \irqnr | ||
55 | .endm | ||
56 | |||
57 | /* As above, this assumes that irqstat and base are preserved.. */ | ||
58 | |||
59 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
60 | bic \irqnr, \irqstat, #0x1c00 | ||
61 | mov \tmp, #0 | ||
62 | cmp \irqnr, #29 | ||
63 | moveq \tmp, #1 | ||
64 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
65 | cmp \tmp, #0 | ||
66 | .endm | ||
67 | |||
diff --git a/arch/arm/mach-vexpress/include/mach/hardware.h b/arch/arm/mach-vexpress/include/mach/hardware.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/hardware.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/arch/arm/mach-vexpress/include/mach/io.h b/arch/arm/mach-vexpress/include/mach/io.h new file mode 100644 index 000000000000..748bb524ee71 --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/io.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARM_ARCH_IO_H | ||
21 | #define __ASM_ARM_ARCH_IO_H | ||
22 | |||
23 | #define IO_SPACE_LIMIT 0xffffffff | ||
24 | |||
25 | #define __io(a) __typesafe_io(a) | ||
26 | #define __mem_pci(a) (a) | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-vexpress/include/mach/irqs.h b/arch/arm/mach-vexpress/include/mach/irqs.h new file mode 100644 index 000000000000..7054cbfc9de5 --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/irqs.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #define IRQ_LOCALTIMER 29 | ||
2 | #define IRQ_LOCALWDOG 30 | ||
3 | |||
4 | #define NR_IRQS 128 | ||
diff --git a/arch/arm/mach-vexpress/include/mach/memory.h b/arch/arm/mach-vexpress/include/mach/memory.h new file mode 100644 index 000000000000..be28232ae639 --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/memory.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | #define PHYS_OFFSET UL(0x60000000) | ||
24 | |||
25 | #endif | ||
diff --git a/arch/arm/mach-vexpress/include/mach/motherboard.h b/arch/arm/mach-vexpress/include/mach/motherboard.h new file mode 100644 index 000000000000..98a8ded055bf --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/motherboard.h | |||
@@ -0,0 +1,121 @@ | |||
1 | #ifndef __MACH_MOTHERBOARD_H | ||
2 | #define __MACH_MOTHERBOARD_H | ||
3 | |||
4 | /* | ||
5 | * Physical addresses, offset from V2M_PA_CS0-3 | ||
6 | */ | ||
7 | #define V2M_NOR0 (V2M_PA_CS0) | ||
8 | #define V2M_NOR1 (V2M_PA_CS1) | ||
9 | #define V2M_SRAM (V2M_PA_CS2) | ||
10 | #define V2M_VIDEO_SRAM (V2M_PA_CS3 + 0x00000000) | ||
11 | #define V2M_LAN9118 (V2M_PA_CS3 + 0x02000000) | ||
12 | #define V2M_ISP1761 (V2M_PA_CS3 + 0x03000000) | ||
13 | |||
14 | /* | ||
15 | * Physical addresses, offset from V2M_PA_CS7 | ||
16 | */ | ||
17 | #define V2M_SYSREGS (V2M_PA_CS7 + 0x00000000) | ||
18 | #define V2M_SYSCTL (V2M_PA_CS7 + 0x00001000) | ||
19 | #define V2M_SERIAL_BUS_PCI (V2M_PA_CS7 + 0x00002000) | ||
20 | |||
21 | #define V2M_AACI (V2M_PA_CS7 + 0x00004000) | ||
22 | #define V2M_MMCI (V2M_PA_CS7 + 0x00005000) | ||
23 | #define V2M_KMI0 (V2M_PA_CS7 + 0x00006000) | ||
24 | #define V2M_KMI1 (V2M_PA_CS7 + 0x00007000) | ||
25 | |||
26 | #define V2M_UART0 (V2M_PA_CS7 + 0x00009000) | ||
27 | #define V2M_UART1 (V2M_PA_CS7 + 0x0000a000) | ||
28 | #define V2M_UART2 (V2M_PA_CS7 + 0x0000b000) | ||
29 | #define V2M_UART3 (V2M_PA_CS7 + 0x0000c000) | ||
30 | |||
31 | #define V2M_WDT (V2M_PA_CS7 + 0x0000f000) | ||
32 | |||
33 | #define V2M_TIMER01 (V2M_PA_CS7 + 0x00011000) | ||
34 | #define V2M_TIMER23 (V2M_PA_CS7 + 0x00012000) | ||
35 | |||
36 | #define V2M_SERIAL_BUS_DVI (V2M_PA_CS7 + 0x00016000) | ||
37 | #define V2M_RTC (V2M_PA_CS7 + 0x00017000) | ||
38 | |||
39 | #define V2M_CF (V2M_PA_CS7 + 0x0001a000) | ||
40 | #define V2M_CLCD (V2M_PA_CS7 + 0x0001f000) | ||
41 | |||
42 | #define V2M_SYS_ID (V2M_SYSREGS + 0x000) | ||
43 | #define V2M_SYS_SW (V2M_SYSREGS + 0x004) | ||
44 | #define V2M_SYS_LED (V2M_SYSREGS + 0x008) | ||
45 | #define V2M_SYS_100HZ (V2M_SYSREGS + 0x024) | ||
46 | #define V2M_SYS_FLAGS (V2M_SYSREGS + 0x030) | ||
47 | #define V2M_SYS_FLAGSSET (V2M_SYSREGS + 0x030) | ||
48 | #define V2M_SYS_FLAGSCLR (V2M_SYSREGS + 0x034) | ||
49 | #define V2M_SYS_NVFLAGS (V2M_SYSREGS + 0x038) | ||
50 | #define V2M_SYS_NVFLAGSSET (V2M_SYSREGS + 0x038) | ||
51 | #define V2M_SYS_NVFLAGSCLR (V2M_SYSREGS + 0x03c) | ||
52 | #define V2M_SYS_MCI (V2M_SYSREGS + 0x048) | ||
53 | #define V2M_SYS_FLASH (V2M_SYSREGS + 0x03c) | ||
54 | #define V2M_SYS_CFGSW (V2M_SYSREGS + 0x058) | ||
55 | #define V2M_SYS_24MHZ (V2M_SYSREGS + 0x05c) | ||
56 | #define V2M_SYS_MISC (V2M_SYSREGS + 0x060) | ||
57 | #define V2M_SYS_DMA (V2M_SYSREGS + 0x064) | ||
58 | #define V2M_SYS_PROCID0 (V2M_SYSREGS + 0x084) | ||
59 | #define V2M_SYS_PROCID1 (V2M_SYSREGS + 0x088) | ||
60 | #define V2M_SYS_CFGDATA (V2M_SYSREGS + 0x0a0) | ||
61 | #define V2M_SYS_CFGCTRL (V2M_SYSREGS + 0x0a4) | ||
62 | #define V2M_SYS_CFGSTAT (V2M_SYSREGS + 0x0a8) | ||
63 | |||
64 | #define V2M_TIMER0 (V2M_TIMER01 + 0x000) | ||
65 | #define V2M_TIMER1 (V2M_TIMER01 + 0x020) | ||
66 | |||
67 | #define V2M_TIMER2 (V2M_TIMER23 + 0x000) | ||
68 | #define V2M_TIMER3 (V2M_TIMER23 + 0x020) | ||
69 | |||
70 | |||
71 | /* | ||
72 | * Interrupts. Those in {} are for AMBA devices | ||
73 | */ | ||
74 | #define IRQ_V2M_WDT { (32 + 0) } | ||
75 | #define IRQ_V2M_TIMER0 (32 + 2) | ||
76 | #define IRQ_V2M_TIMER1 (32 + 2) | ||
77 | #define IRQ_V2M_TIMER2 (32 + 3) | ||
78 | #define IRQ_V2M_TIMER3 (32 + 3) | ||
79 | #define IRQ_V2M_RTC { (32 + 4) } | ||
80 | #define IRQ_V2M_UART0 { (32 + 5) } | ||
81 | #define IRQ_V2M_UART1 { (32 + 6) } | ||
82 | #define IRQ_V2M_UART2 { (32 + 7) } | ||
83 | #define IRQ_V2M_UART3 { (32 + 8) } | ||
84 | #define IRQ_V2M_MMCI { (32 + 9), (32 + 10) } | ||
85 | #define IRQ_V2M_AACI { (32 + 11) } | ||
86 | #define IRQ_V2M_KMI0 { (32 + 12) } | ||
87 | #define IRQ_V2M_KMI1 { (32 + 13) } | ||
88 | #define IRQ_V2M_CLCD { (32 + 14) } | ||
89 | #define IRQ_V2M_LAN9118 (32 + 15) | ||
90 | #define IRQ_V2M_ISP1761 (32 + 16) | ||
91 | #define IRQ_V2M_PCIE (32 + 17) | ||
92 | |||
93 | |||
94 | /* | ||
95 | * Configuration | ||
96 | */ | ||
97 | #define SYS_CFG_START (1 << 31) | ||
98 | #define SYS_CFG_WRITE (1 << 30) | ||
99 | #define SYS_CFG_OSC (1 << 20) | ||
100 | #define SYS_CFG_VOLT (2 << 20) | ||
101 | #define SYS_CFG_AMP (3 << 20) | ||
102 | #define SYS_CFG_TEMP (4 << 20) | ||
103 | #define SYS_CFG_RESET (5 << 20) | ||
104 | #define SYS_CFG_SCC (6 << 20) | ||
105 | #define SYS_CFG_MUXFPGA (7 << 20) | ||
106 | #define SYS_CFG_SHUTDOWN (8 << 20) | ||
107 | #define SYS_CFG_REBOOT (9 << 20) | ||
108 | #define SYS_CFG_DVIMODE (11 << 20) | ||
109 | #define SYS_CFG_POWER (12 << 20) | ||
110 | #define SYS_CFG_SITE_MB (0 << 16) | ||
111 | #define SYS_CFG_SITE_DB1 (1 << 16) | ||
112 | #define SYS_CFG_SITE_DB2 (2 << 16) | ||
113 | #define SYS_CFG_STACK(n) ((n) << 12) | ||
114 | |||
115 | #define SYS_CFG_ERR (1 << 1) | ||
116 | #define SYS_CFG_COMPLETE (1 << 0) | ||
117 | |||
118 | int v2m_cfg_write(u32 devfn, u32 data); | ||
119 | int v2m_cfg_read(u32 devfn, u32 *data); | ||
120 | |||
121 | #endif | ||
diff --git a/arch/arm/mach-vexpress/include/mach/system.h b/arch/arm/mach-vexpress/include/mach/system.h new file mode 100644 index 000000000000..899a4e628a4c --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/system.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef __ASM_ARCH_SYSTEM_H | ||
22 | #define __ASM_ARCH_SYSTEM_H | ||
23 | |||
24 | static inline void arch_idle(void) | ||
25 | { | ||
26 | /* | ||
27 | * This should do all the clock switching | ||
28 | * and wait for interrupt tricks | ||
29 | */ | ||
30 | cpu_do_idle(); | ||
31 | } | ||
32 | |||
33 | static inline void arch_reset(char mode, const char *cmd) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | #endif | ||
diff --git a/arch/arm/mach-vexpress/include/mach/timex.h b/arch/arm/mach-vexpress/include/mach/timex.h new file mode 100644 index 000000000000..00029bacd43c --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/timex.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/timex.h | ||
3 | * | ||
4 | * RealView architecture timex specifications | ||
5 | * | ||
6 | * Copyright (C) 2003 ARM Limited | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #define CLOCK_TICK_RATE (50000000 / 16) | ||
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h new file mode 100644 index 000000000000..7972c5748d0e --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/uncompress.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) | ||
21 | #define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) | ||
22 | #define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30)) | ||
23 | #define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18)) | ||
24 | |||
25 | #define get_uart_base() (0x10000000 + 0x00009000) | ||
26 | |||
27 | /* | ||
28 | * This does not append a newline | ||
29 | */ | ||
30 | static inline void putc(int c) | ||
31 | { | ||
32 | unsigned long base = get_uart_base(); | ||
33 | |||
34 | while (AMBA_UART_FR(base) & (1 << 5)) | ||
35 | barrier(); | ||
36 | |||
37 | AMBA_UART_DR(base) = c; | ||
38 | } | ||
39 | |||
40 | static inline void flush(void) | ||
41 | { | ||
42 | unsigned long base = get_uart_base(); | ||
43 | |||
44 | while (AMBA_UART_FR(base) & (1 << 3)) | ||
45 | barrier(); | ||
46 | } | ||
47 | |||
48 | /* | ||
49 | * nothing to do | ||
50 | */ | ||
51 | #define arch_decomp_setup() | ||
52 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-vexpress/include/mach/vmalloc.h b/arch/arm/mach-vexpress/include/mach/vmalloc.h new file mode 100644 index 000000000000..f43a36ef678b --- /dev/null +++ b/arch/arm/mach-vexpress/include/mach/vmalloc.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-vexpress/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Russell King. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #define VMALLOC_END 0xf8000000UL | ||