diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-aaec2000/Kconfig | 11 | ||||
-rw-r--r-- | arch/arm/mach-aaec2000/Makefile | 9 | ||||
-rw-r--r-- | arch/arm/mach-aaec2000/aaed2000.c | 48 | ||||
-rw-r--r-- | arch/arm/mach-aaec2000/core.c | 157 | ||||
-rw-r--r-- | arch/arm/mach-aaec2000/core.h | 16 | ||||
-rw-r--r-- | arch/arm/mm/Kconfig | 2 |
8 files changed, 250 insertions, 1 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1a1773f81393..efdb12d73566 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -198,6 +198,11 @@ config ARCH_H720X | |||
198 | help | 198 | help |
199 | This enables support for systems based on the Hynix HMS720x | 199 | This enables support for systems based on the Hynix HMS720x |
200 | 200 | ||
201 | config ARCH_AAEC2000 | ||
202 | bool "Agilent AAEC-2000 based" | ||
203 | help | ||
204 | This enables support for systems based on the Agilent AAEC-2000 | ||
205 | |||
201 | endchoice | 206 | endchoice |
202 | 207 | ||
203 | source "arch/arm/mach-clps711x/Kconfig" | 208 | source "arch/arm/mach-clps711x/Kconfig" |
@@ -230,6 +235,8 @@ source "arch/arm/mach-h720x/Kconfig" | |||
230 | 235 | ||
231 | source "arch/arm/mach-versatile/Kconfig" | 236 | source "arch/arm/mach-versatile/Kconfig" |
232 | 237 | ||
238 | source "arch/arm/mach-aaec2000/Kconfig" | ||
239 | |||
233 | # Definitions to make life easier | 240 | # Definitions to make life easier |
234 | config ARCH_ACORN | 241 | config ARCH_ACORN |
235 | bool | 242 | bool |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 2277e3d179cc..8330495e2448 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -97,6 +97,7 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000 | |||
97 | machine-$(CONFIG_ARCH_VERSATILE) := versatile | 97 | machine-$(CONFIG_ARCH_VERSATILE) := versatile |
98 | machine-$(CONFIG_ARCH_IMX) := imx | 98 | machine-$(CONFIG_ARCH_IMX) := imx |
99 | machine-$(CONFIG_ARCH_H720X) := h720x | 99 | machine-$(CONFIG_ARCH_H720X) := h720x |
100 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 | ||
100 | 101 | ||
101 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 102 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
102 | # This is what happens if you forget the IOCS16 line. | 103 | # This is what happens if you forget the IOCS16 line. |
diff --git a/arch/arm/mach-aaec2000/Kconfig b/arch/arm/mach-aaec2000/Kconfig new file mode 100644 index 000000000000..5e4bef93754c --- /dev/null +++ b/arch/arm/mach-aaec2000/Kconfig | |||
@@ -0,0 +1,11 @@ | |||
1 | if ARCH_AAEC2000 | ||
2 | |||
3 | menu "Agilent AAEC-2000 Implementations" | ||
4 | |||
5 | config MACH_AAED2000 | ||
6 | bool "Agilent AAED-2000 Development Platform" | ||
7 | select CPU_ARM920T | ||
8 | |||
9 | endmenu | ||
10 | |||
11 | endif | ||
diff --git a/arch/arm/mach-aaec2000/Makefile b/arch/arm/mach-aaec2000/Makefile new file mode 100644 index 000000000000..20ec83896c37 --- /dev/null +++ b/arch/arm/mach-aaec2000/Makefile | |||
@@ -0,0 +1,9 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Common support (must be linked before board specific support) | ||
6 | obj-y += core.o | ||
7 | |||
8 | # Specific board support | ||
9 | obj-$(CONFIG_MACH_AAED2000) += aaed2000.o | ||
diff --git a/arch/arm/mach-aaec2000/aaed2000.c b/arch/arm/mach-aaec2000/aaed2000.c new file mode 100644 index 000000000000..5417ca3f4621 --- /dev/null +++ b/arch/arm/mach-aaec2000/aaed2000.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/aaed2000.c | ||
3 | * | ||
4 | * Support for the Agilent AAED-2000 Development Platform. | ||
5 | * | ||
6 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
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 | #include <linux/module.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/major.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | |||
20 | #include <asm/setup.h> | ||
21 | #include <asm/memory.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/hardware.h> | ||
24 | #include <asm/irq.h> | ||
25 | |||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | #include <asm/mach/irq.h> | ||
29 | |||
30 | #include "core.h" | ||
31 | |||
32 | static void __init aaed2000_init_irq(void) | ||
33 | { | ||
34 | aaec2000_init_irq(); | ||
35 | } | ||
36 | |||
37 | static void __init aaed2000_map_io(void) | ||
38 | { | ||
39 | aaec2000_map_io(); | ||
40 | } | ||
41 | |||
42 | MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") | ||
43 | MAINTAINER("Nicolas Bellido Y Ortega") | ||
44 | BOOT_MEM(0xf0000000, PIO_BASE, VIO_BASE) | ||
45 | MAPIO(aaed2000_map_io) | ||
46 | INITIRQ(aaed2000_init_irq) | ||
47 | .timer = &aaec2000_timer, | ||
48 | MACHINE_END | ||
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c new file mode 100644 index 000000000000..fc145b3768fa --- /dev/null +++ b/arch/arm/mach-aaec2000/core.c | |||
@@ -0,0 +1,157 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/core.c | ||
3 | * | ||
4 | * Code common to all AAEC-2000 machines | ||
5 | * | ||
6 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
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 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/list.h> | ||
17 | #include <linux/errno.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/timex.h> | ||
20 | #include <linux/signal.h> | ||
21 | |||
22 | #include <asm/hardware.h> | ||
23 | #include <asm/irq.h> | ||
24 | |||
25 | #include <asm/mach/irq.h> | ||
26 | #include <asm/mach/time.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | /* | ||
30 | * Common I/O mapping: | ||
31 | * | ||
32 | * Static virtual address mappings are as follow: | ||
33 | * | ||
34 | * 0xf8000000-0xf8001ffff: Devices connected to APB bus | ||
35 | * 0xf8002000-0xf8003ffff: Devices connected to AHB bus | ||
36 | * | ||
37 | * Below 0xe8000000 is reserved for vm allocation. | ||
38 | * | ||
39 | * The machine specific code must provide the extra mapping beside the | ||
40 | * default mapping provided here. | ||
41 | */ | ||
42 | static struct map_desc standard_io_desc[] __initdata = { | ||
43 | /* virtual physical length type */ | ||
44 | { VIO_APB_BASE, PIO_APB_BASE, IO_APB_LENGTH, MT_DEVICE }, | ||
45 | { VIO_AHB_BASE, PIO_AHB_BASE, IO_AHB_LENGTH, MT_DEVICE } | ||
46 | }; | ||
47 | |||
48 | void __init aaec2000_map_io(void) | ||
49 | { | ||
50 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); | ||
51 | } | ||
52 | |||
53 | /* | ||
54 | * Interrupt handling routines | ||
55 | */ | ||
56 | static void aaec2000_int_ack(unsigned int irq) | ||
57 | { | ||
58 | IRQ_INTSR = 1 << irq; | ||
59 | } | ||
60 | |||
61 | static void aaec2000_int_mask(unsigned int irq) | ||
62 | { | ||
63 | IRQ_INTENC |= (1 << irq); | ||
64 | } | ||
65 | |||
66 | static void aaec2000_int_unmask(unsigned int irq) | ||
67 | { | ||
68 | IRQ_INTENS |= (1 << irq); | ||
69 | } | ||
70 | |||
71 | static struct irqchip aaec2000_irq_chip = { | ||
72 | .ack = aaec2000_int_ack, | ||
73 | .mask = aaec2000_int_mask, | ||
74 | .unmask = aaec2000_int_unmask, | ||
75 | }; | ||
76 | |||
77 | void __init aaec2000_init_irq(void) | ||
78 | { | ||
79 | unsigned int i; | ||
80 | |||
81 | for (i = 0; i < NR_IRQS; i++) { | ||
82 | set_irq_handler(i, do_level_IRQ); | ||
83 | set_irq_chip(i, &aaec2000_irq_chip); | ||
84 | set_irq_flags(i, IRQF_VALID); | ||
85 | } | ||
86 | |||
87 | /* Disable all interrupts */ | ||
88 | IRQ_INTENC = 0xffffffff; | ||
89 | |||
90 | /* Clear any pending interrupts */ | ||
91 | IRQ_INTSR = IRQ_INTSR; | ||
92 | } | ||
93 | |||
94 | /* | ||
95 | * Time keeping | ||
96 | */ | ||
97 | /* IRQs are disabled before entering here from do_gettimeofday() */ | ||
98 | static unsigned long aaec2000_gettimeoffset(void) | ||
99 | { | ||
100 | unsigned long ticks_to_match, elapsed, usec; | ||
101 | |||
102 | /* Get ticks before next timer match */ | ||
103 | ticks_to_match = TIMER1_LOAD - TIMER1_VAL; | ||
104 | |||
105 | /* We need elapsed ticks since last match */ | ||
106 | elapsed = LATCH - ticks_to_match; | ||
107 | |||
108 | /* Now, convert them to usec */ | ||
109 | usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH; | ||
110 | |||
111 | return usec; | ||
112 | } | ||
113 | |||
114 | /* We enter here with IRQs enabled */ | ||
115 | static irqreturn_t | ||
116 | aaec2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
117 | { | ||
118 | /* TODO: Check timer accuracy */ | ||
119 | write_seqlock(&xtime_lock); | ||
120 | |||
121 | timer_tick(regs); | ||
122 | TIMER1_CLEAR = 1; | ||
123 | |||
124 | write_sequnlock(&xtime_lock); | ||
125 | |||
126 | return IRQ_HANDLED; | ||
127 | } | ||
128 | |||
129 | static struct irqaction aaec2000_timer_irq = { | ||
130 | .name = "AAEC-2000 Timer Tick", | ||
131 | .flags = SA_INTERRUPT, | ||
132 | .handler = aaec2000_timer_interrupt | ||
133 | }; | ||
134 | |||
135 | static void __init aaec2000_timer_init(void) | ||
136 | { | ||
137 | /* Disable timer 1 */ | ||
138 | TIMER1_CTRL = 0; | ||
139 | |||
140 | /* We have somehow to generate a 100Hz clock. | ||
141 | * We then use the 508KHz timer in periodic mode. | ||
142 | */ | ||
143 | TIMER1_LOAD = LATCH; | ||
144 | TIMER1_CLEAR = 1; /* Clear interrupt */ | ||
145 | |||
146 | setup_irq(INT_TMR1_OFL, &aaec2000_timer_irq); | ||
147 | |||
148 | TIMER1_CTRL = TIMER_CTRL_ENABLE | | ||
149 | TIMER_CTRL_PERIODIC | | ||
150 | TIMER_CTRL_CLKSEL_508K; | ||
151 | } | ||
152 | |||
153 | struct sys_timer aaec2000_timer = { | ||
154 | .init = aaec2000_timer_init, | ||
155 | .offset = aaec2000_gettimeoffset, | ||
156 | }; | ||
157 | |||
diff --git a/arch/arm/mach-aaec2000/core.h b/arch/arm/mach-aaec2000/core.h new file mode 100644 index 000000000000..91893d848c16 --- /dev/null +++ b/arch/arm/mach-aaec2000/core.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/core.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
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 | |||
12 | struct sys_timer; | ||
13 | |||
14 | extern struct sys_timer aaec2000_timer; | ||
15 | extern void __init aaec2000_map_io(void); | ||
16 | extern void __init aaec2000_init_irq(void); | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 3fefb43c67f7..95606b4a3ba6 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -62,7 +62,7 @@ config CPU_ARM720T | |||
62 | # ARM920T | 62 | # ARM920T |
63 | config CPU_ARM920T | 63 | config CPU_ARM920T |
64 | bool "Support ARM920T processor" if !ARCH_S3C2410 | 64 | bool "Support ARM920T processor" if !ARCH_S3C2410 |
65 | depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX | 65 | depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 |
66 | default y if ARCH_S3C2410 | 66 | default y if ARCH_S3C2410 |
67 | select CPU_32v4 | 67 | select CPU_32v4 |
68 | select CPU_ABRT_EV4T | 68 | select CPU_ABRT_EV4T |