aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-09-11 08:27:25 -0400
committerJason Cooper <jason@lakedaemon.net>2012-09-21 14:04:39 -0400
commite96a0309f8545d539c1bf4acd5b58727a8f39818 (patch)
tree275af35c4378ce5b4fd0ed724319f027b13989b5
parent5a2f55019391218d8c08c6f9d32591d91200de77 (diff)
arm: plat-orion: use void __iomem pointers for time functions
The functions for time management now take void __iomem pointers, so we remove the temporary "unsigned long" casts from the mach-*/common.c files. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/mach-dove/common.c5
-rw-r--r--arch/arm/mach-kirkwood/common.c5
-rw-r--r--arch/arm/mach-mv78xx0/common.c5
-rw-r--r--arch/arm/mach-orion5x/common.c5
-rw-r--r--arch/arm/plat-orion/include/plat/time.h4
-rw-r--r--arch/arm/plat-orion/time.c8
6 files changed, 14 insertions, 18 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index ba55f631cccc..cb655998466d 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -185,7 +185,7 @@ void __init dove_i2c_init(void)
185 ****************************************************************************/ 185 ****************************************************************************/
186void __init dove_init_early(void) 186void __init dove_init_early(void)
187{ 187{
188 orion_time_set_base((unsigned long) TIMER_VIRT_BASE); 188 orion_time_set_base(TIMER_VIRT_BASE);
189} 189}
190 190
191static int get_tclk(void) 191static int get_tclk(void)
@@ -196,8 +196,7 @@ static int get_tclk(void)
196 196
197static void __init dove_timer_init(void) 197static void __init dove_timer_init(void)
198{ 198{
199 orion_time_init((unsigned long) BRIDGE_VIRT_BASE, 199 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
200 BRIDGE_INT_TIMER1_CLR,
201 IRQ_DOVE_BRIDGE, get_tclk()); 200 IRQ_DOVE_BRIDGE, get_tclk());
202} 201}
203 202
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index defceca51841..55bf9198caeb 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -514,7 +514,7 @@ void __init kirkwood_wdt_init(void)
514 ****************************************************************************/ 514 ****************************************************************************/
515void __init kirkwood_init_early(void) 515void __init kirkwood_init_early(void)
516{ 516{
517 orion_time_set_base((unsigned long) TIMER_VIRT_BASE); 517 orion_time_set_base(TIMER_VIRT_BASE);
518 518
519 /* 519 /*
520 * Some Kirkwood devices allocate their coherent buffers from atomic 520 * Some Kirkwood devices allocate their coherent buffers from atomic
@@ -543,8 +543,7 @@ static void __init kirkwood_timer_init(void)
543{ 543{
544 kirkwood_tclk = kirkwood_find_tclk(); 544 kirkwood_tclk = kirkwood_find_tclk();
545 545
546 orion_time_init((unsigned long) BRIDGE_VIRT_BASE, 546 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
547 BRIDGE_INT_TIMER1_CLR,
548 IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk); 547 IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
549} 548}
550 549
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index fcda4a4f830d..f123517a4bb8 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -338,13 +338,12 @@ void __init mv78xx0_uart3_init(void)
338 ****************************************************************************/ 338 ****************************************************************************/
339void __init mv78xx0_init_early(void) 339void __init mv78xx0_init_early(void)
340{ 340{
341 orion_time_set_base((unsigned long) TIMER_VIRT_BASE); 341 orion_time_set_base(TIMER_VIRT_BASE);
342} 342}
343 343
344static void mv78xx0_timer_init(void) 344static void mv78xx0_timer_init(void)
345{ 345{
346 orion_time_init((unsigned long) BRIDGE_VIRT_BASE, 346 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
347 BRIDGE_INT_TIMER1_CLR,
348 IRQ_MV78XX0_TIMER_1, get_tclk()); 347 IRQ_MV78XX0_TIMER_1, get_tclk());
349} 348}
350 349
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 79f9ffb9a142..58b754ff701c 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -203,7 +203,7 @@ void __init orion5x_wdt_init(void)
203 ****************************************************************************/ 203 ****************************************************************************/
204void __init orion5x_init_early(void) 204void __init orion5x_init_early(void)
205{ 205{
206 orion_time_set_base((unsigned long) TIMER_VIRT_BASE); 206 orion_time_set_base(TIMER_VIRT_BASE);
207} 207}
208 208
209int orion5x_tclk; 209int orion5x_tclk;
@@ -224,8 +224,7 @@ static void __init orion5x_timer_init(void)
224{ 224{
225 orion5x_tclk = orion5x_find_tclk(); 225 orion5x_tclk = orion5x_find_tclk();
226 226
227 orion_time_init((unsigned long) ORION5X_BRIDGE_VIRT_BASE, 227 orion_time_init(ORION5X_BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
228 BRIDGE_INT_TIMER1_CLR,
229 IRQ_ORION5X_BRIDGE, orion5x_tclk); 228 IRQ_ORION5X_BRIDGE, orion5x_tclk);
230} 229}
231 230
diff --git a/arch/arm/plat-orion/include/plat/time.h b/arch/arm/plat-orion/include/plat/time.h
index 4d5f1f6e18df..07527e417c62 100644
--- a/arch/arm/plat-orion/include/plat/time.h
+++ b/arch/arm/plat-orion/include/plat/time.h
@@ -11,9 +11,9 @@
11#ifndef __PLAT_TIME_H 11#ifndef __PLAT_TIME_H
12#define __PLAT_TIME_H 12#define __PLAT_TIME_H
13 13
14void orion_time_set_base(u32 timer_base); 14void orion_time_set_base(void __iomem *timer_base);
15 15
16void orion_time_init(u32 bridge_base, u32 bridge_timer1_clr_mask, 16void orion_time_init(void __iomem *bridge_base, u32 bridge_timer1_clr_mask,
17 unsigned int irq, unsigned int tclk); 17 unsigned int irq, unsigned int tclk);
18 18
19 19
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index 1ed8d1397fcf..0f4fa863dd55 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -180,13 +180,13 @@ static struct irqaction orion_timer_irq = {
180}; 180};
181 181
182void __init 182void __init
183orion_time_set_base(u32 _timer_base) 183orion_time_set_base(void __iomem *_timer_base)
184{ 184{
185 timer_base = (void __iomem *)_timer_base; 185 timer_base = _timer_base;
186} 186}
187 187
188void __init 188void __init
189orion_time_init(u32 _bridge_base, u32 _bridge_timer1_clr_mask, 189orion_time_init(void __iomem *_bridge_base, u32 _bridge_timer1_clr_mask,
190 unsigned int irq, unsigned int tclk) 190 unsigned int irq, unsigned int tclk)
191{ 191{
192 u32 u; 192 u32 u;
@@ -194,7 +194,7 @@ orion_time_init(u32 _bridge_base, u32 _bridge_timer1_clr_mask,
194 /* 194 /*
195 * Set SoC-specific data. 195 * Set SoC-specific data.
196 */ 196 */
197 bridge_base = (void __iomem *)_bridge_base; 197 bridge_base = _bridge_base;
198 bridge_timer1_clr_mask = _bridge_timer1_clr_mask; 198 bridge_timer1_clr_mask = _bridge_timer1_clr_mask;
199 199
200 ticks_per_jiffy = (tclk + HZ/2) / HZ; 200 ticks_per_jiffy = (tclk + HZ/2) / HZ;