aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/realview_eb.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2005-10-31 09:25:02 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-31 09:25:02 -0500
commit8ad68bbf7a06cdd77c170be792418488dbb65da4 (patch)
tree7caed40139d8e0a490cd7a9de0cf4c78f4285c05 /arch/arm/mach-realview/realview_eb.c
parente2f2e58e7968f8446b1078a20a18bf8ea12b4fbc (diff)
[ARM] Add support for ARM RealView board
Support for RealView EB. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview/realview_eb.c')
-rw-r--r--arch/arm/mach-realview/realview_eb.c142
1 files changed, 142 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
new file mode 100644
index 000000000000..1279feeecf7a
--- /dev/null
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -0,0 +1,142 @@
1/*
2 * linux/arch/arm/mach-realview/realview_eb.c
3 *
4 * Copyright (C) 2004 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
22#include <linux/config.h>
23#include <linux/init.h>
24#include <linux/device.h>
25#include <linux/sysdev.h>
26
27#include <asm/hardware.h>
28#include <asm/io.h>
29#include <asm/irq.h>
30#include <asm/leds.h>
31#include <asm/mach-types.h>
32#include <asm/hardware/gic.h>
33#include <asm/hardware/amba.h>
34#include <asm/hardware/icst307.h>
35
36#include <asm/mach/arch.h>
37#include <asm/mach/map.h>
38#include <asm/mach/mmc.h>
39
40#include <asm/arch/irqs.h>
41
42#include "core.h"
43#include "clock.h"
44
45static struct map_desc realview_eb_io_desc[] __initdata = {
46 { IO_ADDRESS(REALVIEW_SYS_BASE), REALVIEW_SYS_BASE, SZ_4K, MT_DEVICE },
47 { IO_ADDRESS(REALVIEW_GIC_CPU_BASE), REALVIEW_GIC_CPU_BASE, SZ_4K, MT_DEVICE },
48 { IO_ADDRESS(REALVIEW_GIC_DIST_BASE), REALVIEW_GIC_DIST_BASE, SZ_4K, MT_DEVICE },
49 { IO_ADDRESS(REALVIEW_SCTL_BASE), REALVIEW_SCTL_BASE, SZ_4K, MT_DEVICE },
50 { IO_ADDRESS(REALVIEW_TIMER0_1_BASE), REALVIEW_TIMER0_1_BASE, SZ_4K, MT_DEVICE },
51 { IO_ADDRESS(REALVIEW_TIMER2_3_BASE), REALVIEW_TIMER2_3_BASE, SZ_4K, MT_DEVICE },
52#ifdef CONFIG_DEBUG_LL
53 { IO_ADDRESS(REALVIEW_UART0_BASE), REALVIEW_UART0_BASE, SZ_4K, MT_DEVICE },
54#endif
55};
56
57static void __init realview_eb_map_io(void)
58{
59 iotable_init(realview_eb_io_desc, ARRAY_SIZE(realview_eb_io_desc));
60}
61
62/* FPGA Primecells */
63AMBA_DEVICE(aaci, "fpga:04", AACI, NULL);
64AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data);
65AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL);
66AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL);
67AMBA_DEVICE(uart3, "fpga:09", UART3, NULL);
68
69/* DevChip Primecells */
70AMBA_DEVICE(smc, "dev:00", SMC, NULL);
71AMBA_DEVICE(clcd, "dev:20", CLCD, &clcd_plat_data);
72AMBA_DEVICE(dmac, "dev:30", DMAC, NULL);
73AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL);
74AMBA_DEVICE(wdog, "dev:e1", WATCHDOG, NULL);
75AMBA_DEVICE(gpio0, "dev:e4", GPIO0, NULL);
76AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL);
77AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL);
78AMBA_DEVICE(rtc, "dev:e8", RTC, NULL);
79AMBA_DEVICE(sci0, "dev:f0", SCI, NULL);
80AMBA_DEVICE(uart0, "dev:f1", UART0, NULL);
81AMBA_DEVICE(uart1, "dev:f2", UART1, NULL);
82AMBA_DEVICE(uart2, "dev:f3", UART2, NULL);
83AMBA_DEVICE(ssp0, "dev:f4", SSP, NULL);
84
85static struct amba_device *amba_devs[] __initdata = {
86 &dmac_device,
87 &uart0_device,
88 &uart1_device,
89 &uart2_device,
90 &uart3_device,
91 &smc_device,
92 &clcd_device,
93 &sctl_device,
94 &wdog_device,
95 &gpio0_device,
96 &gpio1_device,
97 &gpio2_device,
98 &rtc_device,
99 &sci0_device,
100 &ssp0_device,
101 &aaci_device,
102 &mmc0_device,
103 &kmi0_device,
104 &kmi1_device,
105};
106
107static void __init gic_init_irq(void)
108{
109 gic_dist_init(__io_address(REALVIEW_GIC_DIST_BASE));
110 gic_cpu_init(__io_address(REALVIEW_GIC_CPU_BASE));
111}
112
113static void __init realview_eb_init(void)
114{
115 int i;
116
117 clk_register(&realview_clcd_clk);
118
119 platform_device_register(&realview_flash_device);
120 platform_device_register(&realview_smc91x_device);
121
122 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
123 struct amba_device *d = amba_devs[i];
124 amba_device_register(d, &iomem_resource);
125 }
126
127#ifdef CONFIG_LEDS
128 leds_event = realview_leds_event;
129#endif
130}
131
132MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
133 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
134 .phys_ram = 0x00000000,
135 .phys_io = REALVIEW_UART0_BASE,
136 .io_pg_offst = (IO_ADDRESS(REALVIEW_UART0_BASE) >> 18) & 0xfffc,
137 .boot_params = 0x00000100,
138 .map_io = realview_eb_map_io,
139 .init_irq = gic_init_irq,
140 .timer = &realview_timer,
141 .init_machine = realview_eb_init,
142MACHINE_END