aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-spear
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-04-11 13:30:11 -0400
committerArnd Bergmann <arnd@arndb.de>2012-04-22 16:44:04 -0400
commit5019f0b1345b8f6a8e8a0c7c2f89d4a31819a317 (patch)
tree0856f4be673561e8131ef9df7b6904e9bca7a135 /arch/arm/plat-spear
parentf3215b427bec2add8b5c776e8f50c3ba35b0e8f1 (diff)
ARM: spear: remove most mach/*.h header contents
The register and irq definitions in mach/*.h for spear3xx and spear6xx are now mostly obsolete, after the platforms have been converted to device tree based probing and the data is now part of the device tree files. The misc_regs.h contents are moved into clock.c because that is the only user, aside from the DMA_CHN_CFG that should eventually get handled differently. Some of the contents of mach/spear.h still remain, because they are used to set up the static map table, timer, uart and auxdata tables, but almost everything got removed. We might remove everything but the map table as the DT conversion completes, but that is not a priority. I've also made sure to make both copies of spear.h more or less identical so we can eventually combine them. The spear3?0.h files were only used by the spear3?0.c files, so I merged the contents in there and removed the bits that were unused. This is something that should still be looked at. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Viresh Kumar <viresh.kumar@st.com>
Diffstat (limited to 'arch/arm/plat-spear')
-rw-r--r--arch/arm/plat-spear/include/plat/debug-macro.S2
-rw-r--r--arch/arm/plat-spear/include/plat/hardware.h17
-rw-r--r--arch/arm/plat-spear/include/plat/uncompress.h2
-rw-r--r--arch/arm/plat-spear/pl080.c1
-rw-r--r--arch/arm/plat-spear/restart.c2
-rw-r--r--arch/arm/plat-spear/time.c17
6 files changed, 12 insertions, 29 deletions
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S
index 02b160a1ec9b..ab3de721c5db 100644
--- a/arch/arm/plat-spear/include/plat/debug-macro.S
+++ b/arch/arm/plat-spear/include/plat/debug-macro.S
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include <linux/amba/serial.h> 14#include <linux/amba/serial.h>
15#include <mach/hardware.h> 15#include <mach/spear.h>
16 16
17 .macro addruart, rp, rv, tmp 17 .macro addruart, rp, rv, tmp
18 mov \rp, #SPEAR_DBG_UART_BASE @ Physical base 18 mov \rp, #SPEAR_DBG_UART_BASE @ Physical base
diff --git a/arch/arm/plat-spear/include/plat/hardware.h b/arch/arm/plat-spear/include/plat/hardware.h
deleted file mode 100644
index 70187d763e26..000000000000
--- a/arch/arm/plat-spear/include/plat/hardware.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/plat-spear/include/plat/hardware.h
3 *
4 * Hardware definitions for SPEAr
5 *
6 * Copyright (C) 2010 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __PLAT_HARDWARE_H
15#define __PLAT_HARDWARE_H
16
17#endif /* __PLAT_HARDWARE_H */
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h
index 1bf84527aee4..6dd455bafdfd 100644
--- a/arch/arm/plat-spear/include/plat/uncompress.h
+++ b/arch/arm/plat-spear/include/plat/uncompress.h
@@ -13,7 +13,7 @@
13 13
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/amba/serial.h> 15#include <linux/amba/serial.h>
16#include <mach/hardware.h> 16#include <mach/spear.h>
17 17
18#ifndef __PLAT_UNCOMPRESS_H 18#ifndef __PLAT_UNCOMPRESS_H
19#define __PLAT_UNCOMPRESS_H 19#define __PLAT_UNCOMPRESS_H
diff --git a/arch/arm/plat-spear/pl080.c b/arch/arm/plat-spear/pl080.c
index d53d75e1af5e..a56a067717c1 100644
--- a/arch/arm/plat-spear/pl080.c
+++ b/arch/arm/plat-spear/pl080.c
@@ -17,6 +17,7 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/spinlock_types.h> 19#include <linux/spinlock_types.h>
20#include <mach/spear.h>
20#include <mach/misc_regs.h> 21#include <mach/misc_regs.h>
21 22
22static spinlock_t lock = __SPIN_LOCK_UNLOCKED(x); 23static spinlock_t lock = __SPIN_LOCK_UNLOCKED(x);
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c
index 16f203e78d89..4471a232713a 100644
--- a/arch/arm/plat-spear/restart.c
+++ b/arch/arm/plat-spear/restart.c
@@ -13,7 +13,7 @@
13#include <linux/io.h> 13#include <linux/io.h>
14#include <asm/system_misc.h> 14#include <asm/system_misc.h>
15#include <asm/hardware/sp810.h> 15#include <asm/hardware/sp810.h>
16#include <mach/hardware.h> 16#include <mach/spear.h>
17#include <mach/generic.h> 17#include <mach/generic.h>
18 18
19void spear_restart(char mode, const char *cmd) 19void spear_restart(char mode, const char *cmd)
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
index abb5bdecd509..a3164d1647fd 100644
--- a/arch/arm/plat-spear/time.c
+++ b/arch/arm/plat-spear/time.c
@@ -15,14 +15,13 @@
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/ioport.h>
18#include <linux/io.h> 19#include <linux/io.h>
19#include <linux/kernel.h> 20#include <linux/kernel.h>
20#include <linux/time.h> 21#include <linux/time.h>
21#include <linux/irq.h> 22#include <linux/irq.h>
22#include <asm/mach/time.h> 23#include <asm/mach/time.h>
23#include <mach/generic.h> 24#include <mach/generic.h>
24#include <mach/hardware.h>
25#include <mach/irqs.h>
26 25
27/* 26/*
28 * We would use TIMER0 and TIMER1 as clockevent and clocksource. 27 * We would use TIMER0 and TIMER1 as clockevent and clocksource.
@@ -175,7 +174,7 @@ static struct irqaction spear_timer_irq = {
175 .handler = spear_timer_interrupt 174 .handler = spear_timer_interrupt
176}; 175};
177 176
178static void __init spear_clockevent_init(void) 177static void __init spear_clockevent_init(int irq)
179{ 178{
180 u32 tick_rate; 179 u32 tick_rate;
181 180
@@ -195,19 +194,19 @@ static void __init spear_clockevent_init(void)
195 194
196 clockevents_register_device(&clkevt); 195 clockevents_register_device(&clkevt);
197 196
198 setup_irq(SPEAR_GPT0_CHAN0_IRQ, &spear_timer_irq); 197 setup_irq(irq, &spear_timer_irq);
199} 198}
200 199
201void __init spear_setup_timer(void) 200void __init spear_setup_timer(resource_size_t base, int irq)
202{ 201{
203 int ret; 202 int ret;
204 203
205 if (!request_mem_region(SPEAR_GPT0_BASE, SZ_1K, "gpt0")) { 204 if (!request_mem_region(base, SZ_1K, "gpt0")) {
206 pr_err("%s:cannot get IO addr\n", __func__); 205 pr_err("%s:cannot get IO addr\n", __func__);
207 return; 206 return;
208 } 207 }
209 208
210 gpt_base = (void __iomem *)ioremap(SPEAR_GPT0_BASE, SZ_1K); 209 gpt_base = ioremap(base, SZ_1K);
211 if (!gpt_base) { 210 if (!gpt_base) {
212 pr_err("%s:ioremap failed for gpt\n", __func__); 211 pr_err("%s:ioremap failed for gpt\n", __func__);
213 goto err_mem; 212 goto err_mem;
@@ -225,7 +224,7 @@ void __init spear_setup_timer(void)
225 goto err_clk; 224 goto err_clk;
226 } 225 }
227 226
228 spear_clockevent_init(); 227 spear_clockevent_init(irq);
229 spear_clocksource_init(); 228 spear_clocksource_init();
230 229
231 return; 230 return;
@@ -235,5 +234,5 @@ err_clk:
235err_iomap: 234err_iomap:
236 iounmap(gpt_base); 235 iounmap(gpt_base);
237err_mem: 236err_mem:
238 release_mem_region(SPEAR_GPT0_BASE, SZ_1K); 237 release_mem_region(base, SZ_1K);
239} 238}