aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/core.c4
-rw-r--r--arch/arm/mach-integrator/hardware.h (renamed from arch/arm/mach-integrator/include/mach/platform.h)110
-rw-r--r--arch/arm/mach-integrator/impd1.c4
-rw-r--r--arch/arm/mach-integrator/impd1.h (renamed from arch/arm/mach-integrator/include/mach/impd1.h)4
-rw-r--r--arch/arm/mach-integrator/include/mach/hardware.h45
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c6
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c17
-rw-r--r--arch/arm/mach-integrator/leds.c4
-rw-r--r--arch/arm/mach-integrator/lm.c2
-rw-r--r--arch/arm/mach-integrator/lm.h (renamed from arch/arm/mach-integrator/include/mach/lm.h)0
-rw-r--r--arch/arm/mach-integrator/pci_v3.c4
11 files changed, 57 insertions, 143 deletions
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 00ddf20ed91b..e3f3aca43efb 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -25,13 +25,11 @@
25#include <linux/of.h> 25#include <linux/of.h>
26#include <linux/of_address.h> 26#include <linux/of_address.h>
27 27
28#include <mach/hardware.h>
29#include <mach/platform.h>
30
31#include <asm/mach-types.h> 28#include <asm/mach-types.h>
32#include <asm/mach/time.h> 29#include <asm/mach/time.h>
33#include <asm/pgtable.h> 30#include <asm/pgtable.h>
34 31
32#include "hardware.h"
35#include "cm.h" 33#include "cm.h"
36#include "common.h" 34#include "common.h"
37 35
diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/hardware.h
index 306d025d9730..857ca5f8b9a6 100644
--- a/arch/arm/mach-integrator/include/mach/platform.h
+++ b/arch/arm/mach-integrator/hardware.h
@@ -1,4 +1,8 @@
1/* 1/*
2 * This file contains the hardware definitions of the Integrator.
3 *
4 * Copyright (C) 1998-1999 ARM Limited.
5 *
2 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or 8 * the Free Software Foundation; either version 2 of the License, or
@@ -13,26 +17,28 @@
13 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 */ 19 */
16/************************************************************************** 20#ifndef INTEGRATOR_HARDWARE_H
17 * * Copyright © ARM Limited 1998. All rights reserved. 21#define INTEGRATOR_HARDWARE_H
18 * ***********************************************************************/
19/* ************************************************************************
20 *
21 * Integrator address map
22 *
23 * ***********************************************************************/
24 22
25#ifndef __address_h 23/*
26#define __address_h 1 24 * Where in virtual memory the IO devices (timers, system controllers
25 * and so on)
26 */
27#define IO_BASE 0xF0000000 // VA of IO
28#define IO_SIZE 0x0B000000 // How much?
29#define IO_START INTEGRATOR_HDR_BASE // PA of IO
30
31/* macro to get at IO space when running virtually */
32#ifdef CONFIG_MMU
33#define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE)
34#else
35#define IO_ADDRESS(x) (x)
36#endif
27 37
28/* ======================================================================== 38#define __io_address(n) ((void __iomem *)IO_ADDRESS(n))
29 * Integrator definitions 39
30 * ======================================================================== 40/*
31 * ------------------------------------------------------------------------
32 * Memory definitions
33 * ------------------------------------------------------------------------
34 * Integrator memory map 41 * Integrator memory map
35 *
36 */ 42 */
37#define INTEGRATOR_BOOT_ROM_LO 0x00000000 43#define INTEGRATOR_BOOT_ROM_LO 0x00000000
38#define INTEGRATOR_BOOT_ROM_HI 0x20000000 44#define INTEGRATOR_BOOT_ROM_HI 0x20000000
@@ -40,13 +46,13 @@
40#define INTEGRATOR_BOOT_ROM_SIZE SZ_512K 46#define INTEGRATOR_BOOT_ROM_SIZE SZ_512K
41 47
42/* 48/*
43 * New Core Modules have different amounts of SSRAM, the amount of SSRAM 49 * New Core Modules have different amounts of SSRAM, the amount of SSRAM
44 * fitted can be found in HDR_STAT. 50 * fitted can be found in HDR_STAT.
45 * 51 *
46 * The symbol INTEGRATOR_SSRAM_SIZE is kept, however this now refers to 52 * The symbol INTEGRATOR_SSRAM_SIZE is kept, however this now refers to
47 * the minimum amount of SSRAM fitted on any core module. 53 * the minimum amount of SSRAM fitted on any core module.
48 * 54 *
49 * New Core Modules also alias the SSRAM. 55 * New Core Modules also alias the SSRAM.
50 * 56 *
51 */ 57 */
52#define INTEGRATOR_SSRAM_BASE 0x00000000 58#define INTEGRATOR_SSRAM_BASE 0x00000000
@@ -61,7 +67,6 @@
61 67
62/* 68/*
63 * SDRAM is a SIMM therefore the size is not known. 69 * SDRAM is a SIMM therefore the size is not known.
64 *
65 */ 70 */
66#define INTEGRATOR_SDRAM_BASE 0x00040000 71#define INTEGRATOR_SDRAM_BASE 0x00040000
67 72
@@ -81,10 +86,8 @@
81#define INTEGRATOR_LOGIC_MODULE2_BASE 0xE0000000 86#define INTEGRATOR_LOGIC_MODULE2_BASE 0xE0000000
82#define INTEGRATOR_LOGIC_MODULE3_BASE 0xF0000000 87#define INTEGRATOR_LOGIC_MODULE3_BASE 0xF0000000
83 88
84/* ------------------------------------------------------------------------ 89/*
85 * Integrator header card registers 90 * Integrator header card registers
86 * ------------------------------------------------------------------------
87 *
88 */ 91 */
89#define INTEGRATOR_HDR_ID_OFFSET 0x00 92#define INTEGRATOR_HDR_ID_OFFSET 0x00
90#define INTEGRATOR_HDR_PROC_OFFSET 0x04 93#define INTEGRATOR_HDR_PROC_OFFSET 0x04
@@ -173,16 +176,12 @@
173 176
174#define INTEGRATOR_HDR_SDRAM_SPD_OK (1 << 5) 177#define INTEGRATOR_HDR_SDRAM_SPD_OK (1 << 5)
175 178
176 179/*
177/* ------------------------------------------------------------------------ 180 * Integrator system registers
178 * Integrator system registers
179 * ------------------------------------------------------------------------
180 *
181 */ 181 */
182 182
183/* 183/*
184 * System Controller 184 * System Controller
185 *
186 */ 185 */
187#define INTEGRATOR_SC_ID_OFFSET 0x00 186#define INTEGRATOR_SC_ID_OFFSET 0x00
188#define INTEGRATOR_SC_OSC_OFFSET 0x04 187#define INTEGRATOR_SC_OSC_OFFSET 0x04
@@ -223,7 +222,6 @@
223 222
224/* 223/*
225 * External Bus Interface 224 * External Bus Interface
226 *
227 */ 225 */
228#define INTEGRATOR_EBI_BASE 0x12000000 226#define INTEGRATOR_EBI_BASE 0x12000000
229 227
@@ -272,7 +270,6 @@
272 270
273/* 271/*
274 * LED's & Switches 272 * LED's & Switches
275 *
276 */ 273 */
277#define INTEGRATOR_DBG_ALPHA_OFFSET 0x00 274#define INTEGRATOR_DBG_ALPHA_OFFSET 0x00
278#define INTEGRATOR_DBG_LEDS_OFFSET 0x04 275#define INTEGRATOR_DBG_LEDS_OFFSET 0x04
@@ -292,32 +289,25 @@
292#define INTEGRATOR_CP_SIC_BASE 0xCA000000 /* SIC */ 289#define INTEGRATOR_CP_SIC_BASE 0xCA000000 /* SIC */
293#define INTEGRATOR_CP_CTL_BASE 0xCB000000 /* CP system control */ 290#define INTEGRATOR_CP_CTL_BASE 0xCB000000 /* CP system control */
294 291
295/* ------------------------------------------------------------------------
296 * KMI keyboard/mouse definitions
297 * ------------------------------------------------------------------------
298 */
299/* PS2 Keyboard interface */ 292/* PS2 Keyboard interface */
300#define KMI0_BASE INTEGRATOR_KBD_BASE 293#define KMI0_BASE INTEGRATOR_KBD_BASE
301 294
302/* PS2 Mouse interface */ 295/* PS2 Mouse interface */
303#define KMI1_BASE INTEGRATOR_MOUSE_BASE 296#define KMI1_BASE INTEGRATOR_MOUSE_BASE
304 297
305/* KMI definitions are now in include/asm-arm/hardware/amba_kmi.h -- rmk */ 298/*
306 299 * Integrator Interrupt Controllers
307/* ------------------------------------------------------------------------
308 * Integrator Interrupt Controllers
309 * ------------------------------------------------------------------------
310 * 300 *
311 * Offsets from interrupt controller base
312 * 301 *
313 * System Controller interrupt controller base is 302 * Offsets from interrupt controller base
303 *
304 * System Controller interrupt controller base is
314 * 305 *
315 * INTEGRATOR_IC_BASE + (header_number << 6) 306 * INTEGRATOR_IC_BASE + (header_number << 6)
316 * 307 *
317 * Core Module interrupt controller base is 308 * Core Module interrupt controller base is
318 * 309 *
319 * INTEGRATOR_HDR_IC 310 * INTEGRATOR_HDR_IC
320 *
321 */ 311 */
322#define IRQ_STATUS 0 312#define IRQ_STATUS 0
323#define IRQ_RAW_STATUS 0x04 313#define IRQ_RAW_STATUS 0x04
@@ -335,25 +325,8 @@
335#define FIQ_ENABLE_CLEAR 0x2C 325#define FIQ_ENABLE_CLEAR 0x2C
336 326
337 327
338/* ------------------------------------------------------------------------ 328/*
339 * Interrupts 329 * LED's
340 * ------------------------------------------------------------------------
341 *
342 *
343 * Each Core Module has two interrupts controllers, one on the core module
344 * itself and one in the system controller on the motherboard. The
345 * READ_INT macro in target.s reads both interrupt controllers and returns
346 * a 32 bit bitmask, bits 0 to 23 are interrupts from the system controller
347 * and bits 24 to 31 are from the core module.
348 *
349 * The following definitions relate to the bitmask returned by READ_INT.
350 *
351 */
352
353/* ------------------------------------------------------------------------
354 * LED's
355 * ------------------------------------------------------------------------
356 *
357 */ 330 */
358#define GREEN_LED 0x01 331#define GREEN_LED 0x01
359#define YELLOW_LED 0x02 332#define YELLOW_LED 0x02
@@ -371,7 +344,6 @@
371 * 344 *
372 * Timer 0 runs at bus frequency 345 * Timer 0 runs at bus frequency
373 */ 346 */
374
375#define INTEGRATOR_TIMER0_BASE INTEGRATOR_CT_BASE 347#define INTEGRATOR_TIMER0_BASE INTEGRATOR_CT_BASE
376#define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100) 348#define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100)
377#define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200) 349#define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200)
@@ -379,4 +351,4 @@
379#define INTEGRATOR_CSR_BASE 0x10000000 351#define INTEGRATOR_CSR_BASE 0x10000000
380#define INTEGRATOR_CSR_SIZE 0x10000000 352#define INTEGRATOR_CSR_SIZE 0x10000000
381 353
382#endif 354#endif /* INTEGRATOR_HARDWARE_H */
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index d9b784824808..0e870ea818c4 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -25,9 +25,9 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/irqchip/arm-vic.h> 26#include <linux/irqchip/arm-vic.h>
27 27
28#include <mach/lm.h>
29#include <mach/impd1.h>
30#include <asm/sizes.h> 28#include <asm/sizes.h>
29#include "lm.h"
30#include "impd1.h"
31 31
32static int module_id; 32static int module_id;
33 33
diff --git a/arch/arm/mach-integrator/include/mach/impd1.h b/arch/arm/mach-integrator/impd1.h
index d75de4b14237..76de4dc9bee4 100644
--- a/arch/arm/mach-integrator/include/mach/impd1.h
+++ b/arch/arm/mach-integrator/impd1.h
@@ -1,6 +1,3 @@
1#define IMPD1_OSC1 0x00
2#define IMPD1_OSC2 0x04
3#define IMPD1_LOCK 0x08
4#define IMPD1_LEDS 0x0c 1#define IMPD1_LEDS 0x0c
5#define IMPD1_INT 0x10 2#define IMPD1_INT 0x10
6#define IMPD1_SW 0x14 3#define IMPD1_SW 0x14
@@ -15,4 +12,3 @@
15struct device; 12struct device;
16 13
17void impd1_tweak_control(struct device *dev, u32 mask, u32 val); 14void impd1_tweak_control(struct device *dev, u32 mask, u32 val);
18
diff --git a/arch/arm/mach-integrator/include/mach/hardware.h b/arch/arm/mach-integrator/include/mach/hardware.h
deleted file mode 100644
index 65fed7c0eb84..000000000000
--- a/arch/arm/mach-integrator/include/mach/hardware.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * arch/arm/mach-integrator/include/mach/hardware.h
3 *
4 * This file contains the hardware definitions of the Integrator.
5 *
6 * Copyright (C) 1999 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#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25#include <asm/sizes.h>
26
27/*
28 * Where in virtual memory the IO devices (timers, system controllers
29 * and so on)
30 */
31#define IO_BASE 0xF0000000 // VA of IO
32#define IO_SIZE 0x0B000000 // How much?
33#define IO_START INTEGRATOR_HDR_BASE // PA of IO
34
35/* macro to get at IO space when running virtually */
36#ifdef CONFIG_MMU
37#define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE)
38#else
39#define IO_ADDRESS(x) (x)
40#endif
41
42#define __io_address(n) ((void __iomem *)IO_ADDRESS(n))
43
44#endif
45
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index cc0857cab2e1..dd0cc677d596 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -44,23 +44,21 @@
44#include <linux/sched_clock.h> 44#include <linux/sched_clock.h>
45#include <linux/clk-provider.h> 45#include <linux/clk-provider.h>
46 46
47#include <mach/hardware.h>
48#include <mach/platform.h>
49#include <asm/hardware/arm_timer.h> 47#include <asm/hardware/arm_timer.h>
50#include <asm/setup.h> 48#include <asm/setup.h>
51#include <asm/param.h> /* HZ */ 49#include <asm/param.h> /* HZ */
52#include <asm/mach-types.h> 50#include <asm/mach-types.h>
53 51
54#include <mach/lm.h>
55
56#include <asm/mach/arch.h> 52#include <asm/mach/arch.h>
57#include <asm/mach/irq.h> 53#include <asm/mach/irq.h>
58#include <asm/mach/map.h> 54#include <asm/mach/map.h>
59#include <asm/mach/time.h> 55#include <asm/mach/time.h>
60 56
57#include "hardware.h"
61#include "cm.h" 58#include "cm.h"
62#include "common.h" 59#include "common.h"
63#include "pci_v3.h" 60#include "pci_v3.h"
61#include "lm.h"
64 62
65/* Base address to the AP system controller */ 63/* Base address to the AP system controller */
66void __iomem *ap_syscon_base; 64void __iomem *ap_syscon_base;
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 0ad5f60598c8..a938242b0c95 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -27,22 +27,18 @@
27#include <linux/of_address.h> 27#include <linux/of_address.h>
28#include <linux/of_platform.h> 28#include <linux/of_platform.h>
29#include <linux/sys_soc.h> 29#include <linux/sys_soc.h>
30#include <linux/sched_clock.h>
30 31
31#include <mach/hardware.h>
32#include <mach/platform.h>
33#include <asm/setup.h> 32#include <asm/setup.h>
34#include <asm/mach-types.h> 33#include <asm/mach-types.h>
35
36#include <mach/lm.h>
37
38#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
39#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
40#include <asm/mach/map.h> 36#include <asm/mach/map.h>
41#include <asm/mach/time.h> 37#include <asm/mach/time.h>
42 38
43#include <plat/clcd.h> 39#include <plat/clcd.h>
44#include <plat/sched_clock.h>
45 40
41#include "hardware.h"
46#include "cm.h" 42#include "cm.h"
47#include "common.h" 43#include "common.h"
48 44
@@ -229,11 +225,14 @@ static struct clcd_board clcd_data = {
229 225
230#define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) 226#define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28)
231 227
228static u64 notrace intcp_read_sched_clock(void)
229{
230 return readl(REFCOUNTER);
231}
232
232static void __init intcp_init_early(void) 233static void __init intcp_init_early(void)
233{ 234{
234#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK 235 sched_clock_register(intcp_read_sched_clock, 32, 24000000);
235 versatile_sched_clock_init(REFCOUNTER, 24000000);
236#endif
237} 236}
238 237
239static const struct of_device_id fpga_irq_of_match[] __initconst = { 238static const struct of_device_id fpga_irq_of_match[] __initconst = {
diff --git a/arch/arm/mach-integrator/leds.c b/arch/arm/mach-integrator/leds.c
index cb6ac58f5e07..f1dcb57a59e2 100644
--- a/arch/arm/mach-integrator/leds.c
+++ b/arch/arm/mach-integrator/leds.c
@@ -11,9 +11,7 @@
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/leds.h> 12#include <linux/leds.h>
13 13
14#include <mach/hardware.h> 14#include "hardware.h"
15#include <mach/platform.h>
16
17#include "cm.h" 15#include "cm.h"
18 16
19#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) 17#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-integrator/lm.c
index f52c7af31eaa..3f9e9f043168 100644
--- a/arch/arm/mach-integrator/lm.c
+++ b/arch/arm/mach-integrator/lm.c
@@ -12,7 +12,7 @@
12#include <linux/device.h> 12#include <linux/device.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14 14
15#include <mach/lm.h> 15#include "lm.h"
16 16
17#define to_lm_device(d) container_of(d, struct lm_device, dev) 17#define to_lm_device(d) container_of(d, struct lm_device, dev)
18#define to_lm_driver(d) container_of(d, struct lm_driver, drv) 18#define to_lm_driver(d) container_of(d, struct lm_driver, drv)
diff --git a/arch/arm/mach-integrator/include/mach/lm.h b/arch/arm/mach-integrator/lm.h
index 28186b6f2c09..28186b6f2c09 100644
--- a/arch/arm/mach-integrator/include/mach/lm.h
+++ b/arch/arm/mach-integrator/lm.h
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index c5e01b24d9fb..05e1f73a1e8d 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -34,15 +34,13 @@
34#include <linux/of_pci.h> 34#include <linux/of_pci.h>
35#include <video/vga.h> 35#include <video/vga.h>
36 36
37#include <mach/hardware.h>
38#include <mach/platform.h>
39
40#include <asm/mach/map.h> 37#include <asm/mach/map.h>
41#include <asm/signal.h> 38#include <asm/signal.h>
42#include <asm/mach/pci.h> 39#include <asm/mach/pci.h>
43#include <asm/irq_regs.h> 40#include <asm/irq_regs.h>
44 41
45#include "pci_v3.h" 42#include "pci_v3.h"
43#include "hardware.h"
46 44
47/* 45/*
48 * Where in the memory map does PCI live? 46 * Where in the memory map does PCI live?