diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-02-15 10:07:40 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-15 10:07:40 -0500 |
commit | 4ba9dcbeba042b7a1a1366f0dc683a2947ca5577 (patch) | |
tree | a99a7e26eb4c30a477d70b035b5a90f2dfd45566 /arch/arm/mach-realview | |
parent | 382266ad5ad4119ec12df889afa5062a0a0cd6ae (diff) | |
parent | 4b17244c133689ad0cbdca37ce3e15068f120428 (diff) |
Merge Realview GIC code
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r-- | arch/arm/mach-realview/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 27 |
3 files changed, 34 insertions, 5 deletions
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index 17f5f4439fe7..68bc6b226ec7 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -16,4 +16,14 @@ config REALVIEW_MPCORE | |||
16 | kernel built with this option enabled is not compatible with | 16 | kernel built with this option enabled is not compatible with |
17 | other tiles. | 17 | other tiles. |
18 | 18 | ||
19 | config REALVIEW_MPCORE_REVB | ||
20 | bool "Support MPcore RevB tile" | ||
21 | depends on REALVIEW_MPCORE | ||
22 | default n | ||
23 | help | ||
24 | Enable support for the MPCore RevB tile on the Realview platform. | ||
25 | Since there are device address differences, a | ||
26 | kernel built with this option enabled is not compatible with | ||
27 | other tiles. | ||
28 | |||
19 | endmenu | 29 | endmenu |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index b8484e15dacb..709a9b1ac634 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -52,7 +52,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
52 | * core (e.g. timer irq), then they will not have been enabled | 52 | * core (e.g. timer irq), then they will not have been enabled |
53 | * for us: do so | 53 | * for us: do so |
54 | */ | 54 | */ |
55 | gic_cpu_init(__io_address(REALVIEW_GIC_CPU_BASE)); | 55 | gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE)); |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * let the primary processor know we're out of the | 58 | * let the primary processor know we're out of the |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 9741b4d3c9cf..effe243454e0 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -57,7 +57,21 @@ static struct map_desc realview_eb_io_desc[] __initdata = { | |||
57 | .pfn = __phys_to_pfn(REALVIEW_GIC_DIST_BASE), | 57 | .pfn = __phys_to_pfn(REALVIEW_GIC_DIST_BASE), |
58 | .length = SZ_4K, | 58 | .length = SZ_4K, |
59 | .type = MT_DEVICE, | 59 | .type = MT_DEVICE, |
60 | }, | ||
61 | #ifdef CONFIG_REALVIEW_MPCORE | ||
62 | { | ||
63 | .virtual = IO_ADDRESS(REALVIEW_GIC1_CPU_BASE), | ||
64 | .pfn = __phys_to_pfn(REALVIEW_GIC1_CPU_BASE), | ||
65 | .length = SZ_4K, | ||
66 | .type = MT_DEVICE, | ||
60 | }, { | 67 | }, { |
68 | .virtual = IO_ADDRESS(REALVIEW_GIC1_DIST_BASE), | ||
69 | .pfn = __phys_to_pfn(REALVIEW_GIC1_DIST_BASE), | ||
70 | .length = SZ_4K, | ||
71 | .type = MT_DEVICE, | ||
72 | }, | ||
73 | #endif | ||
74 | { | ||
61 | .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE), | 75 | .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE), |
62 | .pfn = __phys_to_pfn(REALVIEW_SCTL_BASE), | 76 | .pfn = __phys_to_pfn(REALVIEW_SCTL_BASE), |
63 | .length = SZ_4K, | 77 | .length = SZ_4K, |
@@ -138,13 +152,18 @@ static void __init gic_init_irq(void) | |||
138 | #ifdef CONFIG_REALVIEW_MPCORE | 152 | #ifdef CONFIG_REALVIEW_MPCORE |
139 | unsigned int pldctrl; | 153 | unsigned int pldctrl; |
140 | writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK)); | 154 | writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK)); |
141 | pldctrl = readl(__io_address(REALVIEW_SYS_BASE) + 0xd8); | 155 | pldctrl = readl(__io_address(REALVIEW_SYS_BASE) + REALVIEW_MPCORE_SYS_PLD_CTRL1); |
142 | pldctrl |= 0x00800000; /* New irq mode */ | 156 | pldctrl |= 0x00800000; /* New irq mode */ |
143 | writel(pldctrl, __io_address(REALVIEW_SYS_BASE) + 0xd8); | 157 | writel(pldctrl, __io_address(REALVIEW_SYS_BASE) + REALVIEW_MPCORE_SYS_PLD_CTRL1); |
144 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); | 158 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); |
145 | #endif | 159 | #endif |
146 | gic_dist_init(__io_address(REALVIEW_GIC_DIST_BASE)); | 160 | gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29); |
147 | gic_cpu_init(__io_address(REALVIEW_GIC_CPU_BASE)); | 161 | gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE)); |
162 | #ifdef CONFIG_REALVIEW_MPCORE | ||
163 | gic_dist_init(1, __io_address(REALVIEW_GIC1_DIST_BASE), 64); | ||
164 | gic_cpu_init(1, __io_address(REALVIEW_GIC1_CPU_BASE)); | ||
165 | gic_cascade_irq(1, IRQ_EB_IRQ1); | ||
166 | #endif | ||
148 | } | 167 | } |
149 | 168 | ||
150 | static void __init realview_eb_init(void) | 169 | static void __init realview_eb_init(void) |