aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-01-26 10:34:51 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:33:52 -0400
commit058b7a6f465bebd87c1f295afdd56cc6a33dffbd (patch)
treeb7060b4d4675d83cf086891d714a34e5e7af7472 /arch/arm/plat-mxc
parentedfcea80eb12b43680c4be0f2e31c8f5b1288edd (diff)
arm/imx2x: removes a bunch of sparse-warnings
Here are some of the warnings that get fixed by this: > 200 times: warning: cast adds address space to expression (<asn:2>) twelve times: warning: symbol 'xxx' was not declared. Should it be static two times: warning: symbol 'clock' shadows an earlier one five times: warning: incorrect type in initializer (different address spaces) Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/devices.c1
-rw-r--r--arch/arm/plat-mxc/include/mach/board-mx27ads.h3
-rw-r--r--arch/arm/plat-mxc/include/mach/mx27.h2
-rw-r--r--arch/arm/plat-mxc/time.c12
4 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c
index c66748267c45..56f2fb5cc456 100644
--- a/arch/arm/plat-mxc/devices.c
+++ b/arch/arm/plat-mxc/devices.c
@@ -19,6 +19,7 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <mach/common.h>
22 23
23int __init mxc_register_device(struct platform_device *pdev, void *data) 24int __init mxc_register_device(struct platform_device *pdev, void *data)
24{ 25{
diff --git a/arch/arm/plat-mxc/include/mach/board-mx27ads.h b/arch/arm/plat-mxc/include/mach/board-mx27ads.h
index 8f34a05afc87..1cac9d1135cd 100644
--- a/arch/arm/plat-mxc/include/mach/board-mx27ads.h
+++ b/arch/arm/plat-mxc/include/mach/board-mx27ads.h
@@ -48,7 +48,8 @@
48 * Base address of PBC controller, CS4 48 * Base address of PBC controller, CS4
49 */ 49 */
50#define PBC_BASE_ADDRESS 0xEB000000 50#define PBC_BASE_ADDRESS 0xEB000000
51#define PBC_REG_ADDR(offset) (PBC_BASE_ADDRESS + (offset)) 51#define PBC_REG_ADDR(offset) (void __force __iomem *) \
52 (PBC_BASE_ADDRESS + (offset))
52 53
53/* 54/*
54 * PBC Interupt name definitions 55 * PBC Interupt name definitions
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h
index 0313be720552..9c609d3ba23e 100644
--- a/arch/arm/plat-mxc/include/mach/mx27.h
+++ b/arch/arm/plat-mxc/include/mach/mx27.h
@@ -129,7 +129,7 @@
129 * it returns 0xDEADBEEF 129 * it returns 0xDEADBEEF
130 */ 130 */
131#define IO_ADDRESS(x) \ 131#define IO_ADDRESS(x) \
132 (void __iomem *) \ 132 (void __force __iomem *) \
133 (((x >= AIPI_BASE_ADDR) && (x < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \ 133 (((x >= AIPI_BASE_ADDR) && (x < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \
134 AIPI_IO_ADDRESS(x) : \ 134 AIPI_IO_ADDRESS(x) : \
135 ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \ 135 ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index eb93fd1789db..ef1b3cd85bd3 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -52,11 +52,9 @@ static struct clocksource clocksource_mxc = {
52 52
53static int __init mxc_clocksource_init(struct clk *timer_clk) 53static int __init mxc_clocksource_init(struct clk *timer_clk)
54{ 54{
55 unsigned int clock; 55 unsigned int c = clk_get_rate(timer_clk);
56 56
57 clock = clk_get_rate(timer_clk); 57 clocksource_mxc.mult = clocksource_hz2mult(c,
58
59 clocksource_mxc.mult = clocksource_hz2mult(clock,
60 clocksource_mxc.shift); 58 clocksource_mxc.shift);
61 clocksource_register(&clocksource_mxc); 59 clocksource_register(&clocksource_mxc);
62 60
@@ -176,11 +174,9 @@ static struct clock_event_device clockevent_mxc = {
176 174
177static int __init mxc_clockevent_init(struct clk *timer_clk) 175static int __init mxc_clockevent_init(struct clk *timer_clk)
178{ 176{
179 unsigned int clock; 177 unsigned int c = clk_get_rate(timer_clk);
180
181 clock = clk_get_rate(timer_clk);
182 178
183 clockevent_mxc.mult = div_sc(clock, NSEC_PER_SEC, 179 clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC,
184 clockevent_mxc.shift); 180 clockevent_mxc.shift);
185 clockevent_mxc.max_delta_ns = 181 clockevent_mxc.max_delta_ns =
186 clockevent_delta2ns(0xfffffffe, &clockevent_mxc); 182 clockevent_delta2ns(0xfffffffe, &clockevent_mxc);