aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx2/devices.c15
-rw-r--r--arch/arm/mach-mx2/generic.c1
-rw-r--r--arch/arm/mach-mx2/mx27ads.c4
-rw-r--r--arch/arm/mach-mx2/pcm038.c2
-rw-r--r--arch/arm/mach-mx2/serial.c1
-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
9 files changed, 22 insertions, 19 deletions
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c
index 2f9240be1c76..9ddd6d061058 100644
--- a/arch/arm/mach-mx2/devices.c
+++ b/arch/arm/mach-mx2/devices.c
@@ -34,6 +34,9 @@
34 34
35#include <mach/irqs.h> 35#include <mach/irqs.h>
36#include <mach/hardware.h> 36#include <mach/hardware.h>
37#include <mach/common.h>
38
39#include "devices.h"
37 40
38/* 41/*
39 * Resource definition for the MXC IrDA 42 * Resource definition for the MXC IrDA
@@ -230,32 +233,32 @@ static struct mxc_gpio_port imx_gpio_ports[] = {
230 [0] = { 233 [0] = {
231 .chip.label = "gpio-0", 234 .chip.label = "gpio-0",
232 .irq = MXC_INT_GPIO, 235 .irq = MXC_INT_GPIO,
233 .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 0), 236 .base = IO_ADDRESS(GPIO_BASE_ADDR),
234 .virtual_irq_start = MXC_GPIO_IRQ_START, 237 .virtual_irq_start = MXC_GPIO_IRQ_START,
235 }, 238 },
236 [1] = { 239 [1] = {
237 .chip.label = "gpio-1", 240 .chip.label = "gpio-1",
238 .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 1), 241 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x100),
239 .virtual_irq_start = MXC_GPIO_IRQ_START + 32, 242 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
240 }, 243 },
241 [2] = { 244 [2] = {
242 .chip.label = "gpio-2", 245 .chip.label = "gpio-2",
243 .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 2), 246 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x200),
244 .virtual_irq_start = MXC_GPIO_IRQ_START + 64, 247 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
245 }, 248 },
246 [3] = { 249 [3] = {
247 .chip.label = "gpio-3", 250 .chip.label = "gpio-3",
248 .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 3), 251 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x300),
249 .virtual_irq_start = MXC_GPIO_IRQ_START + 96, 252 .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
250 }, 253 },
251 [4] = { 254 [4] = {
252 .chip.label = "gpio-4", 255 .chip.label = "gpio-4",
253 .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 4), 256 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x400),
254 .virtual_irq_start = MXC_GPIO_IRQ_START + 128, 257 .virtual_irq_start = MXC_GPIO_IRQ_START + 128,
255 }, 258 },
256 [5] = { 259 [5] = {
257 .chip.label = "gpio-5", 260 .chip.label = "gpio-5",
258 .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 5), 261 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x500),
259 .virtual_irq_start = MXC_GPIO_IRQ_START + 160, 262 .virtual_irq_start = MXC_GPIO_IRQ_START + 160,
260 } 263 }
261}; 264};
diff --git a/arch/arm/mach-mx2/generic.c b/arch/arm/mach-mx2/generic.c
index dea6521d4d5c..bd51dd04948e 100644
--- a/arch/arm/mach-mx2/generic.c
+++ b/arch/arm/mach-mx2/generic.c
@@ -21,6 +21,7 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/common.h>
24#include <asm/pgtable.h> 25#include <asm/pgtable.h>
25#include <asm/mach/map.h> 26#include <asm/mach/map.h>
26 27
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c
index 536bf64bc7c8..4548631eb3ae 100644
--- a/arch/arm/mach-mx2/mx27ads.c
+++ b/arch/arm/mach-mx2/mx27ads.c
@@ -266,7 +266,7 @@ static void __init mx27ads_timer_init(void)
266 mx27_clocks_init(fref); 266 mx27_clocks_init(fref);
267} 267}
268 268
269struct sys_timer mx27ads_timer = { 269static struct sys_timer mx27ads_timer = {
270 .init = mx27ads_timer_init, 270 .init = mx27ads_timer_init,
271}; 271};
272 272
@@ -279,7 +279,7 @@ static struct map_desc mx27ads_io_desc[] __initdata = {
279 }, 279 },
280}; 280};
281 281
282void __init mx27ads_map_io(void) 282static void __init mx27ads_map_io(void)
283{ 283{
284 mxc_map_io(); 284 mxc_map_io();
285 iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc)); 285 iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc));
diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c
index 63cdef8565db..2942d59b5709 100644
--- a/arch/arm/mach-mx2/pcm038.c
+++ b/arch/arm/mach-mx2/pcm038.c
@@ -233,7 +233,7 @@ static void __init pcm038_timer_init(void)
233 mx27_clocks_init(26000000); 233 mx27_clocks_init(26000000);
234} 234}
235 235
236struct sys_timer pcm038_timer = { 236static struct sys_timer pcm038_timer = {
237 .init = pcm038_timer_init, 237 .init = pcm038_timer_init,
238}; 238};
239 239
diff --git a/arch/arm/mach-mx2/serial.c b/arch/arm/mach-mx2/serial.c
index b9e66fb11860..40a485cdc10e 100644
--- a/arch/arm/mach-mx2/serial.c
+++ b/arch/arm/mach-mx2/serial.c
@@ -22,6 +22,7 @@
22#include <linux/serial.h> 22#include <linux/serial.h>
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/imx-uart.h> 24#include <mach/imx-uart.h>
25#include "devices.h"
25 26
26static struct resource uart0[] = { 27static struct resource uart0[] = {
27 { 28 {
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);