aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-clps711x/Makefile2
-rw-r--r--arch/arm/mach-clps711x/common.c (renamed from arch/arm/mach-clps711x/irq.c)95
-rw-r--r--arch/arm/mach-clps711x/mm.c48
-rw-r--r--arch/arm/mach-clps711x/time.c84
-rw-r--r--arch/arm/mach-ep93xx/include/mach/system.h2
-rw-r--r--arch/arm/mach-iop32x/include/mach/system.h2
-rw-r--r--arch/arm/mach-ixp2000/include/mach/system.h2
-rw-r--r--arch/arm/mach-lpc32xx/include/mach/system.h3
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c2
-rw-r--r--arch/arm/mach-omap1/board-fsample.c2
-rw-r--r--arch/arm/mach-omap1/board-generic.c2
-rw-r--r--arch/arm/mach-omap1/board-h2.c2
-rw-r--r--arch/arm/mach-omap1/board-h3.c2
-rw-r--r--arch/arm/mach-omap1/board-htcherald.c2
-rw-r--r--arch/arm/mach-omap1/board-innovator.c2
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c2
-rw-r--r--arch/arm/mach-omap1/board-osk.c2
-rw-r--r--arch/arm/mach-omap1/board-palmte.c2
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c2
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c2
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c2
-rw-r--r--arch/arm/mach-omap1/board-sx1.c2
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c2
-rw-r--r--arch/arm/mach-omap1/common.h61
-rw-r--r--arch/arm/mach-omap1/devices.c2
-rw-r--r--arch/arm/mach-omap1/time.c2
-rw-r--r--arch/arm/mach-omap1/timer32k.c2
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c3
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c2
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c2
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c2
-rw-r--r--arch/arm/mach-omap2/board-generic.c3
-rw-r--r--arch/arm/mach-omap2/board-h4.c2
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c2
-rw-r--r--arch/arm/mach-omap2/board-ldp.c2
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c2
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c3
-rw-r--r--arch/arm/mach-omap2/board-overo.c2
-rw-r--r--arch/arm/mach-omap2/board-rm680.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom.c2
-rw-r--r--arch/arm/mach-omap2/cm2xxx_3xxx.c2
-rw-r--r--arch/arm/mach-omap2/cm44xx.c2
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c2
-rw-r--r--arch/arm/mach-omap2/common.c2
-rw-r--r--arch/arm/mach-omap2/common.h185
-rw-r--r--arch/arm/mach-omap2/control.c2
-rw-r--r--arch/arm/mach-omap2/i2c.c2
-rw-r--r--arch/arm/mach-omap2/id.c2
-rw-r--r--arch/arm/mach-omap2/include/mach/omap4-common.h43
-rw-r--r--arch/arm/mach-omap2/io.c4
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c3
-rw-r--r--arch/arm/mach-omap2/omap-smp.c3
-rw-r--r--arch/arm/mach-omap2/omap4-common.c3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c2
-rw-r--r--arch/arm/mach-omap2/pm.c2
-rw-r--r--arch/arm/mach-omap2/pm24xx.c1
-rw-r--r--arch/arm/mach-omap2/pm34xx.c1
-rw-r--r--arch/arm/mach-omap2/pm44xx.c2
-rw-r--r--arch/arm/mach-omap2/prcm.c2
-rw-r--r--arch/arm/mach-omap2/prcm_mpu44xx.c2
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.c2
-rw-r--r--arch/arm/mach-omap2/prm44xx.c2
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c2
-rw-r--r--arch/arm/mach-omap2/sdram-nokia.c2
-rw-r--r--arch/arm/mach-omap2/sdrc.c2
-rw-r--r--arch/arm/mach-omap2/sdrc2xxx.c2
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-omap2/smartreflex.c2
-rw-r--r--arch/arm/mach-omap2/timer.c2
-rw-r--r--arch/arm/mach-omap2/vc3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/vc44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/voltage.c2
-rw-r--r--arch/arm/mach-omap2/voltagedomains3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/voltagedomains44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/vp.c2
-rw-r--r--arch/arm/mach-omap2/vp3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/vp44xx_data.c2
-rw-r--r--arch/arm/mach-pxa/poodle.c6
-rw-r--r--arch/arm/mach-shark/core.c1
-rw-r--r--arch/arm/mach-u300/include/mach/system.h2
-rw-r--r--arch/arm/mach-w90x900/irq.c2
-rw-r--r--arch/arm/mach-w90x900/nuc910.h9
-rw-r--r--arch/arm/mach-w90x900/nuc950.h9
-rw-r--r--arch/arm/mach-w90x900/nuc960.h9
-rw-r--r--arch/arm/mach-w90x900/nuc9xx.h23
-rw-r--r--arch/arm/mach-w90x900/time.c2
-rw-r--r--arch/arm/plat-omap/include/plat/common.h82
-rw-r--r--arch/arm/plat-omap/include/plat/io.h68
-rw-r--r--arch/arm/plat-omap/include/plat/irqs.h10
105 files changed, 450 insertions, 470 deletions
diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile
index 4a197315f0cf..f2f0256232e3 100644
--- a/arch/arm/mach-clps711x/Makefile
+++ b/arch/arm/mach-clps711x/Makefile
@@ -4,7 +4,7 @@
4 4
5# Object file lists. 5# Object file lists.
6 6
7obj-y := irq.o mm.o time.o 7obj-y := common.o
8obj-m := 8obj-m :=
9obj-n := 9obj-n :=
10obj- := 10obj- :=
diff --git a/arch/arm/mach-clps711x/irq.c b/arch/arm/mach-clps711x/common.c
index c2eceee645e3..ced2a4e406f4 100644
--- a/arch/arm/mach-clps711x/irq.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -1,7 +1,9 @@
1/* 1/*
2 * linux/arch/arm/mach-clps711x/irq.c 2 * linux/arch/arm/mach-clps711x/core.c
3 * 3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd. 4 * Core support for the CLPS711x-based machines.
5 *
6 * Copyright (C) 2001,2011 Deep Blue Solutions Ltd
5 * 7 *
6 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -17,16 +19,42 @@
17 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 21 */
22#include <linux/kernel.h>
23#include <linux/mm.h>
20#include <linux/init.h> 24#include <linux/init.h>
21#include <linux/list.h> 25#include <linux/interrupt.h>
22#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/irq.h>
28#include <linux/sched.h>
29#include <linux/timex.h>
23 30
24#include <asm/mach/irq.h> 31#include <asm/sizes.h>
25#include <mach/hardware.h> 32#include <mach/hardware.h>
26#include <asm/irq.h> 33#include <asm/irq.h>
27 34#include <asm/leds.h>
35#include <asm/pgtable.h>
36#include <asm/page.h>
37#include <asm/mach/map.h>
38#include <asm/mach/time.h>
28#include <asm/hardware/clps7111.h> 39#include <asm/hardware/clps7111.h>
29 40
41/*
42 * This maps the generic CLPS711x registers
43 */
44static struct map_desc clps711x_io_desc[] __initdata = {
45 {
46 .virtual = CLPS7111_VIRT_BASE,
47 .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
48 .length = SZ_1M,
49 .type = MT_DEVICE
50 }
51};
52
53void __init clps711x_map_io(void)
54{
55 iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
56}
57
30static void int1_mask(struct irq_data *d) 58static void int1_mask(struct irq_data *d)
31{ 59{
32 u32 intmr1; 60 u32 intmr1;
@@ -112,15 +140,15 @@ void __init clps711x_init_irq(void)
112 140
113 for (i = 0; i < NR_IRQS; i++) { 141 for (i = 0; i < NR_IRQS; i++) {
114 if (INT1_IRQS & (1 << i)) { 142 if (INT1_IRQS & (1 << i)) {
115 irq_set_chip_and_handler(i, &int1_chip, 143 irq_set_chip_and_handler(i, &int1_chip,
116 handle_level_irq); 144 handle_level_irq);
117 set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 145 set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
118 } 146 }
119 if (INT2_IRQS & (1 << i)) { 147 if (INT2_IRQS & (1 << i)) {
120 irq_set_chip_and_handler(i, &int2_chip, 148 irq_set_chip_and_handler(i, &int2_chip,
121 handle_level_irq); 149 handle_level_irq);
122 set_irq_flags(i, IRQF_VALID | IRQF_PROBE); 150 set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
123 } 151 }
124 } 152 }
125 153
126 /* 154 /*
@@ -141,3 +169,54 @@ void __init clps711x_init_irq(void)
141 clps_writel(0, SYNCIO); 169 clps_writel(0, SYNCIO);
142 clps_writel(0, KBDEOI); 170 clps_writel(0, KBDEOI);
143} 171}
172
173/*
174 * gettimeoffset() returns time since last timer tick, in usecs.
175 *
176 * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
177 * 'tick' is usecs per jiffy.
178 */
179static unsigned long clps711x_gettimeoffset(void)
180{
181 unsigned long hwticks;
182 hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */
183 return (hwticks * (tick_nsec / 1000)) / LATCH;
184}
185
186/*
187 * IRQ handler for the timer
188 */
189static irqreturn_t p720t_timer_interrupt(int irq, void *dev_id)
190{
191 timer_tick();
192 return IRQ_HANDLED;
193}
194
195static struct irqaction clps711x_timer_irq = {
196 .name = "CLPS711x Timer Tick",
197 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
198 .handler = p720t_timer_interrupt,
199};
200
201static void __init clps711x_timer_init(void)
202{
203 struct timespec tv;
204 unsigned int syscon;
205
206 syscon = clps_readl(SYSCON1);
207 syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
208 clps_writel(syscon, SYSCON1);
209
210 clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
211
212 setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
213
214 tv.tv_nsec = 0;
215 tv.tv_sec = clps_readl(RTCDR);
216 do_settimeofday(&tv);
217}
218
219struct sys_timer clps711x_timer = {
220 .init = clps711x_timer_init,
221 .offset = clps711x_gettimeoffset,
222};
diff --git a/arch/arm/mach-clps711x/mm.c b/arch/arm/mach-clps711x/mm.c
deleted file mode 100644
index 986592176767..000000000000
--- a/arch/arm/mach-clps711x/mm.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * linux/arch/arm/mach-clps711x/mm.c
3 *
4 * Generic MM setup for the CLPS711x-based machines.
5 *
6 * Copyright (C) 2001 Deep Blue Solutions Ltd
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#include <linux/kernel.h>
23#include <linux/mm.h>
24#include <linux/init.h>
25
26#include <asm/sizes.h>
27#include <mach/hardware.h>
28#include <asm/pgtable.h>
29#include <asm/page.h>
30#include <asm/mach/map.h>
31#include <asm/hardware/clps7111.h>
32
33/*
34 * This maps the generic CLPS711x registers
35 */
36static struct map_desc clps711x_io_desc[] __initdata = {
37 {
38 .virtual = CLPS7111_VIRT_BASE,
39 .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
40 .length = SZ_1M,
41 .type = MT_DEVICE
42 }
43};
44
45void __init clps711x_map_io(void)
46{
47 iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
48}
diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c
deleted file mode 100644
index d581ef0bcd24..000000000000
--- a/arch/arm/mach-clps711x/time.c
+++ /dev/null
@@ -1,84 +0,0 @@
1/*
2 * linux/arch/arm/mach-clps711x/time.c
3 *
4 * Copyright (C) 2001 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#include <linux/timex.h>
20#include <linux/init.h>
21#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/sched.h>
24#include <linux/io.h>
25
26#include <mach/hardware.h>
27#include <asm/irq.h>
28#include <asm/leds.h>
29#include <asm/hardware/clps7111.h>
30
31#include <asm/mach/time.h>
32
33
34/*
35 * gettimeoffset() returns time since last timer tick, in usecs.
36 *
37 * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
38 * 'tick' is usecs per jiffy.
39 */
40static unsigned long clps711x_gettimeoffset(void)
41{
42 unsigned long hwticks;
43 hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */
44 return (hwticks * (tick_nsec / 1000)) / LATCH;
45}
46
47/*
48 * IRQ handler for the timer
49 */
50static irqreturn_t
51p720t_timer_interrupt(int irq, void *dev_id)
52{
53 timer_tick();
54 return IRQ_HANDLED;
55}
56
57static struct irqaction clps711x_timer_irq = {
58 .name = "CLPS711x Timer Tick",
59 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
60 .handler = p720t_timer_interrupt,
61};
62
63static void __init clps711x_timer_init(void)
64{
65 struct timespec tv;
66 unsigned int syscon;
67
68 syscon = clps_readl(SYSCON1);
69 syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
70 clps_writel(syscon, SYSCON1);
71
72 clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
73
74 setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
75
76 tv.tv_nsec = 0;
77 tv.tv_sec = clps_readl(RTCDR);
78 do_settimeofday(&tv);
79}
80
81struct sys_timer clps711x_timer = {
82 .init = clps711x_timer_init,
83 .offset = clps711x_gettimeoffset,
84};
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
index 6d661fe9d66c..bdf6c4f1feef 100644
--- a/arch/arm/mach-ep93xx/include/mach/system.h
+++ b/arch/arm/mach-ep93xx/include/mach/system.h
@@ -11,8 +11,6 @@ static inline void arch_idle(void)
11 11
12static inline void arch_reset(char mode, const char *cmd) 12static inline void arch_reset(char mode, const char *cmd)
13{ 13{
14 local_irq_disable();
15
16 /* 14 /*
17 * Set then clear the SWRST bit to initiate a software reset 15 * Set then clear the SWRST bit to initiate a software reset
18 */ 16 */
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
index 4865a9bff85e..b4f83e5973b2 100644
--- a/arch/arm/mach-iop32x/include/mach/system.h
+++ b/arch/arm/mach-iop32x/include/mach/system.h
@@ -18,8 +18,6 @@ static inline void arch_idle(void)
18 18
19static inline void arch_reset(char mode, const char *cmd) 19static inline void arch_reset(char mode, const char *cmd)
20{ 20{
21 local_irq_disable();
22
23 if (machine_is_n2100()) { 21 if (machine_is_n2100()) {
24 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW); 22 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
25 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT); 23 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
index de370992c848..810df7b93982 100644
--- a/arch/arm/mach-ixp2000/include/mach/system.h
+++ b/arch/arm/mach-ixp2000/include/mach/system.h
@@ -19,8 +19,6 @@ static inline void arch_idle(void)
19 19
20static inline void arch_reset(char mode, const char *cmd) 20static inline void arch_reset(char mode, const char *cmd)
21{ 21{
22 local_irq_disable();
23
24 /* 22 /*
25 * Reset flash banking register so that we are pointing at 23 * Reset flash banking register so that we are pointing at
26 * RedBoot bank. 24 * RedBoot bank.
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
index df3b0dea4d7b..d47f3b1c24b8 100644
--- a/arch/arm/mach-lpc32xx/include/mach/system.h
+++ b/arch/arm/mach-lpc32xx/include/mach/system.h
@@ -33,9 +33,6 @@ static inline void arch_reset(char mode, const char *cmd)
33 case 'h': 33 case 'h':
34 printk(KERN_CRIT "RESET: Rebooting system\n"); 34 printk(KERN_CRIT "RESET: Rebooting system\n");
35 35
36 /* Disable interrupts */
37 local_irq_disable();
38
39 lpc32xx_watchdog_reset(); 36 lpc32xx_watchdog_reset();
40 break; 37 break;
41 38
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 51bae31cf361..1b374009b1a3 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -35,7 +35,7 @@
35#include <plat/mux.h> 35#include <plat/mux.h>
36#include <plat/usb.h> 36#include <plat/usb.h>
37#include <plat/board.h> 37#include <plat/board.h>
38#include <plat/common.h> 38#include "common.h"
39#include <mach/camera.h> 39#include <mach/camera.h>
40 40
41#include <mach/ams-delta-fiq.h> 41#include <mach/ams-delta-fiq.h>
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 23178275f96b..b9c4c0f933ee 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -32,7 +32,7 @@
32#include <plat/flash.h> 32#include <plat/flash.h>
33#include <plat/fpga.h> 33#include <plat/fpga.h>
34#include <plat/keypad.h> 34#include <plat/keypad.h>
35#include <plat/common.h> 35#include "common.h"
36#include <plat/board.h> 36#include <plat/board.h>
37 37
38/* fsample is pretty close to p2-sample */ 38/* fsample is pretty close to p2-sample */
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index dc5b75de531c..7f41d7a504a5 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -25,7 +25,7 @@
25#include <plat/mux.h> 25#include <plat/mux.h>
26#include <plat/usb.h> 26#include <plat/usb.h>
27#include <plat/board.h> 27#include <plat/board.h>
28#include <plat/common.h> 28#include "common.h"
29 29
30/* assume no Mini-AB port */ 30/* assume no Mini-AB port */
31 31
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index b334b1481678..7933b97698f8 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -43,7 +43,7 @@
43#include <plat/irda.h> 43#include <plat/irda.h>
44#include <plat/usb.h> 44#include <plat/usb.h>
45#include <plat/keypad.h> 45#include <plat/keypad.h>
46#include <plat/common.h> 46#include "common.h"
47#include <plat/flash.h> 47#include <plat/flash.h>
48 48
49#include "board-h2.h" 49#include "board-h2.h"
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 74ebe72c9848..04be2f83ca09 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -45,7 +45,7 @@
45#include <plat/usb.h> 45#include <plat/usb.h>
46#include <plat/keypad.h> 46#include <plat/keypad.h>
47#include <plat/dma.h> 47#include <plat/dma.h>
48#include <plat/common.h> 48#include "common.h"
49#include <plat/flash.h> 49#include <plat/flash.h>
50 50
51#include "board-h3.h" 51#include "board-h3.h"
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index 3e91baab1a89..46fcfeb1f11e 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -41,7 +41,7 @@
41#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
42 42
43#include <plat/omap7xx.h> 43#include <plat/omap7xx.h>
44#include <plat/common.h> 44#include "common.h"
45#include <plat/board.h> 45#include <plat/board.h>
46#include <plat/keypad.h> 46#include <plat/keypad.h>
47#include <plat/usb.h> 47#include <plat/usb.h>
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 273153dba15b..f99d11de1531 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -37,7 +37,7 @@
37#include <plat/tc.h> 37#include <plat/tc.h>
38#include <plat/usb.h> 38#include <plat/usb.h>
39#include <plat/keypad.h> 39#include <plat/keypad.h>
40#include <plat/common.h> 40#include "common.h"
41#include <plat/mmc.h> 41#include <plat/mmc.h>
42 42
43/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ 43/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 6798b8488315..c64342388ec3 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -30,7 +30,7 @@
30#include <plat/usb.h> 30#include <plat/usb.h>
31#include <plat/board.h> 31#include <plat/board.h>
32#include <plat/keypad.h> 32#include <plat/keypad.h>
33#include <plat/common.h> 33#include "common.h"
34#include <plat/hwa742.h> 34#include <plat/hwa742.h>
35#include <plat/lcd_mipid.h> 35#include <plat/lcd_mipid.h>
36#include <plat/mmc.h> 36#include <plat/mmc.h>
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index c3859278d257..a409dfcc5b18 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -51,7 +51,7 @@
51#include <plat/usb.h> 51#include <plat/usb.h>
52#include <plat/mux.h> 52#include <plat/mux.h>
53#include <plat/tc.h> 53#include <plat/tc.h>
54#include <plat/common.h> 54#include "common.h"
55 55
56/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ 56/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
57#define OMAP_OSK_ETHR_START 0x04800300 57#define OMAP_OSK_ETHR_START 0x04800300
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index f9c44cb15b47..105292d39484 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -41,7 +41,7 @@
41#include <plat/board.h> 41#include <plat/board.h>
42#include <plat/irda.h> 42#include <plat/irda.h>
43#include <plat/keypad.h> 43#include <plat/keypad.h>
44#include <plat/common.h> 44#include "common.h"
45 45
46#define PALMTE_USBDETECT_GPIO 0 46#define PALMTE_USBDETECT_GPIO 0
47#define PALMTE_USB_OR_DC_GPIO 1 47#define PALMTE_USB_OR_DC_GPIO 1
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 11a98539f7bb..387a9006358d 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -39,7 +39,7 @@
39#include <plat/board.h> 39#include <plat/board.h>
40#include <plat/irda.h> 40#include <plat/irda.h>
41#include <plat/keypad.h> 41#include <plat/keypad.h>
42#include <plat/common.h> 42#include "common.h"
43 43
44#include <linux/spi/spi.h> 44#include <linux/spi/spi.h>
45#include <linux/spi/ads7846.h> 45#include <linux/spi/ads7846.h>
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 42061573e380..df6d15e68aad 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -41,7 +41,7 @@
41#include <plat/board.h> 41#include <plat/board.h>
42#include <plat/irda.h> 42#include <plat/irda.h>
43#include <plat/keypad.h> 43#include <plat/keypad.h>
44#include <plat/common.h> 44#include "common.h"
45 45
46#include <linux/spi/spi.h> 46#include <linux/spi/spi.h>
47#include <linux/spi/ads7846.h> 47#include <linux/spi/ads7846.h>
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 203ae07550db..57ecd7e09831 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -32,7 +32,7 @@
32#include <plat/fpga.h> 32#include <plat/fpga.h>
33#include <plat/flash.h> 33#include <plat/flash.h>
34#include <plat/keypad.h> 34#include <plat/keypad.h>
35#include <plat/common.h> 35#include "common.h"
36#include <plat/board.h> 36#include <plat/board.h>
37 37
38static const unsigned int p2_keymap[] = { 38static const unsigned int p2_keymap[] = {
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 092a4c046407..774ae39fd636 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -40,7 +40,7 @@
40#include <plat/usb.h> 40#include <plat/usb.h>
41#include <plat/tc.h> 41#include <plat/tc.h>
42#include <plat/board.h> 42#include <plat/board.h>
43#include <plat/common.h> 43#include "common.h"
44#include <plat/keypad.h> 44#include <plat/keypad.h>
45#include <plat/board-sx1.h> 45#include <plat/board-sx1.h>
46 46
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 61ed6cdab2bd..7721c146d8d6 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -34,7 +34,7 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35 35
36#include <plat/board-voiceblue.h> 36#include <plat/board-voiceblue.h>
37#include <plat/common.h> 37#include "common.h"
38#include <plat/flash.h> 38#include <plat/flash.h>
39#include <plat/mux.h> 39#include <plat/mux.h>
40#include <plat/tc.h> 40#include <plat/tc.h>
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
new file mode 100644
index 000000000000..52c4eda97fa8
--- /dev/null
+++ b/arch/arm/mach-omap1/common.h
@@ -0,0 +1,61 @@
1/*
2 *
3 * Header for code common to all OMAP1 machines.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
11 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
13 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
14 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
16 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
19 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26#ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H
27#define __ARCH_ARM_MACH_OMAP1_COMMON_H
28
29#include <plat/common.h>
30
31#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
32void omap7xx_map_io(void);
33#else
34static inline void omap7xx_map_io(void)
35{
36}
37#endif
38
39#ifdef CONFIG_ARCH_OMAP15XX
40void omap15xx_map_io(void);
41#else
42static inline void omap15xx_map_io(void)
43{
44}
45#endif
46
47#ifdef CONFIG_ARCH_OMAP16XX
48void omap16xx_map_io(void);
49#else
50static inline void omap16xx_map_io(void)
51{
52}
53#endif
54
55void omap1_init_early(void);
56void omap1_init_irq(void);
57
58extern struct sys_timer omap1_timer;
59extern bool omap_32k_timer_init(void);
60
61#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 48ef9888e820..9d47ca7f80fa 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -22,7 +22,7 @@
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <plat/common.h> 25#include "common.h"
26#include <plat/tc.h> 26#include <plat/tc.h>
27#include <plat/board.h> 27#include <plat/board.h>
28#include <plat/mux.h> 28#include <plat/mux.h>
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index a1837771e031..485a21d31004 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -54,7 +54,7 @@
54#include <asm/mach/irq.h> 54#include <asm/mach/irq.h>
55#include <asm/mach/time.h> 55#include <asm/mach/time.h>
56 56
57#include <plat/common.h> 57#include "common.h"
58 58
59#ifdef CONFIG_OMAP_MPU_TIMER 59#ifdef CONFIG_OMAP_MPU_TIMER
60 60
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index 96604a50c4fe..9a54ef4dcf5e 100644
--- a/arch/arm/mach-omap1/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -52,7 +52,7 @@
52#include <asm/irq.h> 52#include <asm/irq.h>
53#include <asm/mach/irq.h> 53#include <asm/mach/irq.h>
54#include <asm/mach/time.h> 54#include <asm/mach/time.h>
55#include <plat/common.h> 55#include "common.h"
56#include <plat/dmtimer.h> 56#include <plat/dmtimer.h>
57 57
58/* 58/*
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index d704f0ac328d..a17a6c49e18d 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -34,7 +34,7 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35 35
36#include <plat/board.h> 36#include <plat/board.h>
37#include <plat/common.h> 37#include "common.h"
38#include <plat/gpmc.h> 38#include <plat/gpmc.h>
39#include <plat/usb.h> 39#include <plat/usb.h>
40#include <plat/gpmc-smc91x.h> 40#include <plat/gpmc-smc91x.h>
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 77142c13fa13..670919c04851 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -33,7 +33,7 @@
33#include <plat/mcspi.h> 33#include <plat/mcspi.h>
34#include <plat/board.h> 34#include <plat/board.h>
35#include <plat/usb.h> 35#include <plat/usb.h>
36#include <plat/common.h> 36#include "common.h"
37#include <plat/dma.h> 37#include <plat/dma.h>
38#include <plat/gpmc.h> 38#include <plat/gpmc.h>
39#include <video/omapdss.h> 39#include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index f552305162fc..63f4b4fefb46 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -16,7 +16,7 @@
16#include <asm/mach-types.h> 16#include <asm/mach-types.h>
17#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
18 18
19#include <plat/common.h> 19#include "common.h"
20#include <plat/board.h> 20#include <plat/board.h>
21#include <plat/gpmc-smc91x.h> 21#include <plat/gpmc-smc91x.h>
22#include <plat/usb.h> 22#include <plat/usb.h>
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 515646886b59..cff2e3249fee 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -27,13 +27,12 @@
27#include <linux/leds_pwm.h> 27#include <linux/leds_pwm.h>
28 28
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <mach/omap4-common.h>
31#include <asm/mach-types.h> 30#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
33#include <asm/mach/map.h> 32#include <asm/mach/map.h>
34 33
35#include <plat/board.h> 34#include <plat/board.h>
36#include <plat/common.h> 35#include "common.h"
37#include <plat/usb.h> 36#include <plat/usb.h>
38#include <plat/mmc.h> 37#include <plat/mmc.h>
39#include <plat/omap4-keypad.h> 38#include <plat/omap4-keypad.h>
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 7834536ab416..25704759d241 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -27,7 +27,7 @@
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28 28
29#include <plat/board.h> 29#include <plat/board.h>
30#include <plat/common.h> 30#include "common.h"
31#include <plat/usb.h> 31#include <plat/usb.h>
32 32
33#include "mux.h" 33#include "mux.h"
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index d314f033c9df..56ea01184ec9 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -32,7 +32,7 @@
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <plat/board.h> 34#include <plat/board.h>
35#include <plat/common.h> 35#include "common.h"
36#include <plat/usb.h> 36#include <plat/usb.h>
37#include <video/omapdss.h> 37#include <video/omapdss.h>
38#include <video/omap-panel-generic-dpi.h> 38#include <video/omap-panel-generic-dpi.h>
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index de8134b7f580..9aea158ba514 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -37,7 +37,7 @@
37#include <plat/led.h> 37#include <plat/led.h>
38#include <plat/usb.h> 38#include <plat/usb.h>
39#include <plat/board.h> 39#include <plat/board.h>
40#include <plat/common.h> 40#include "common.h"
41#include <plat/gpmc.h> 41#include <plat/gpmc.h>
42 42
43#include <video/omapdss.h> 43#include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index bd1bcacb40f9..e1de33ebf95a 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -37,7 +37,7 @@
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38 38
39#include <plat/board.h> 39#include <plat/board.h>
40#include <plat/common.h> 40#include "common.h"
41#include <plat/nand.h> 41#include <plat/nand.h>
42#include <plat/gpmc.h> 42#include <plat/gpmc.h>
43#include <plat/usb.h> 43#include <plat/usb.h>
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 3f4dc6626845..952df9b6c020 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -39,7 +39,7 @@
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40 40
41#include <plat/board.h> 41#include <plat/board.h>
42#include <plat/common.h> 42#include "common.h"
43#include <plat/usb.h> 43#include <plat/usb.h>
44#include <plat/nand.h> 44#include <plat/nand.h>
45#include <plat/gpmc.h> 45#include <plat/gpmc.h>
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 90154e411da0..99e6e7a76d2e 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -41,7 +41,7 @@
41#include <asm/mach/flash.h> 41#include <asm/mach/flash.h>
42 42
43#include <plat/board.h> 43#include <plat/board.h>
44#include <plat/common.h> 44#include "common.h"
45#include <plat/gpmc.h> 45#include <plat/gpmc.h>
46#include <plat/nand.h> 46#include <plat/nand.h>
47#include <plat/usb.h> 47#include <plat/usb.h>
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index fb55fa3dad5a..a89d72309de2 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -20,8 +20,7 @@
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21 21
22#include <plat/board.h> 22#include <plat/board.h>
23#include <plat/common.h> 23#include "common.h"
24#include <mach/omap4-common.h>
25#include "common-board-devices.h" 24#include "common-board-devices.h"
26 25
27/* 26/*
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 8b351d92a1cc..199a174e1ba8 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -34,7 +34,7 @@
34 34
35#include <plat/usb.h> 35#include <plat/usb.h>
36#include <plat/board.h> 36#include <plat/board.h>
37#include <plat/common.h> 37#include "common.h"
38#include <plat/menelaus.h> 38#include <plat/menelaus.h>
39#include <plat/dma.h> 39#include <plat/dma.h>
40#include <plat/gpmc.h> 40#include <plat/gpmc.h>
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index d0a3f78a9b69..6434bdcd7ade 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -28,7 +28,7 @@
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29 29
30#include <plat/board.h> 30#include <plat/board.h>
31#include <plat/common.h> 31#include "common.h"
32#include <plat/gpmc.h> 32#include <plat/gpmc.h>
33#include <plat/usb.h> 33#include <plat/usb.h>
34#include <video/omapdss.h> 34#include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index e179da0c4da5..e75102a5eb0a 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -36,7 +36,7 @@
36 36
37#include <plat/mcspi.h> 37#include <plat/mcspi.h>
38#include <plat/board.h> 38#include <plat/board.h>
39#include <plat/common.h> 39#include "common.h"
40#include <plat/gpmc.h> 40#include <plat/gpmc.h>
41#include <mach/board-zoom.h> 41#include <mach/board-zoom.h>
42 42
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index e9d5f4a3d064..736861463b34 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -26,7 +26,7 @@
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28#include <plat/board.h> 28#include <plat/board.h>
29#include <plat/common.h> 29#include "common.h"
30#include <plat/menelaus.h> 30#include <plat/menelaus.h>
31#include <mach/irqs.h> 31#include <mach/irqs.h>
32#include <plat/mcspi.h> 32#include <plat/mcspi.h>
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 4a71cb7e42d4..1843e141f3a7 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -40,7 +40,7 @@
40#include <asm/mach/flash.h> 40#include <asm/mach/flash.h>
41 41
42#include <plat/board.h> 42#include <plat/board.h>
43#include <plat/common.h> 43#include "common.h"
44#include <video/omapdss.h> 44#include <video/omapdss.h>
45#include <video/omap-panel-dvi.h> 45#include <video/omap-panel-dvi.h>
46#include <plat/gpmc.h> 46#include <plat/gpmc.h>
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index ec00b2ec7022..1653d1813308 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -43,7 +43,7 @@
43 43
44#include <plat/board.h> 44#include <plat/board.h>
45#include <plat/usb.h> 45#include <plat/usb.h>
46#include <plat/common.h> 46#include "common.h"
47#include <plat/mcspi.h> 47#include <plat/mcspi.h>
48#include <video/omapdss.h> 48#include <video/omapdss.h>
49#include <video/omap-panel-dvi.h> 49#include <video/omap-panel-dvi.h>
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 7c0f193f246d..1b2a77621626 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -40,7 +40,7 @@
40 40
41#include <plat/mux.h> 41#include <plat/mux.h>
42#include <plat/board.h> 42#include <plat/board.h>
43#include <plat/common.h> 43#include "common.h"
44#include <plat/gpmc-smsc911x.h> 44#include <plat/gpmc-smsc911x.h>
45#include <plat/gpmc.h> 45#include <plat/gpmc.h>
46#include <plat/sdrc.h> 46#include <plat/sdrc.h>
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index f7811f4cfc3d..6297e814cddd 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -41,7 +41,7 @@
41#include <asm/mach/map.h> 41#include <asm/mach/map.h>
42 42
43#include <plat/board.h> 43#include <plat/board.h>
44#include <plat/common.h> 44#include "common.h"
45#include <mach/hardware.h> 45#include <mach/hardware.h>
46#include <plat/mcspi.h> 46#include <plat/mcspi.h>
47#include <plat/usb.h> 47#include <plat/usb.h>
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index ddb7d6663c6d..ab226473deeb 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -35,7 +35,7 @@
35#include <asm/mach/flash.h> 35#include <asm/mach/flash.h>
36 36
37#include <plat/board.h> 37#include <plat/board.h>
38#include <plat/common.h> 38#include "common.h"
39#include <plat/gpmc.h> 39#include <plat/gpmc.h>
40#include <plat/nand.h> 40#include <plat/nand.h>
41#include <plat/usb.h> 41#include <plat/usb.h>
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index a2d0d1971e27..2741a34630b1 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -44,7 +44,7 @@
44#include <asm/mach/flash.h> 44#include <asm/mach/flash.h>
45 45
46#include <plat/board.h> 46#include <plat/board.h>
47#include <plat/common.h> 47#include "common.h"
48#include <plat/gpmc.h> 48#include <plat/gpmc.h>
49#include <plat/nand.h> 49#include <plat/nand.h>
50#include <plat/usb.h> 50#include <plat/usb.h>
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index a8c2c4263e38..7722d4d97fb9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -30,14 +30,13 @@
30#include <linux/wl12xx.h> 30#include <linux/wl12xx.h>
31 31
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <mach/omap4-common.h>
34#include <asm/mach-types.h> 33#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 35#include <asm/mach/map.h>
37#include <video/omapdss.h> 36#include <video/omapdss.h>
38 37
39#include <plat/board.h> 38#include <plat/board.h>
40#include <plat/common.h> 39#include "common.h"
41#include <plat/usb.h> 40#include <plat/usb.h>
42#include <plat/mmc.h> 41#include <plat/mmc.h>
43#include <video/omap-panel-dvi.h> 42#include <video/omap-panel-dvi.h>
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 4cf7aeabab86..26c5cbb4f2bb 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -43,7 +43,7 @@
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44 44
45#include <plat/board.h> 45#include <plat/board.h>
46#include <plat/common.h> 46#include "common.h"
47#include <video/omapdss.h> 47#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 48#include <video/omap-panel-generic-dpi.h>
49#include <video/omap-panel-dvi.h> 49#include <video/omap-panel-dvi.h>
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 616fb39763b0..6ffb6405285e 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -25,7 +25,7 @@
25#include <plat/mmc.h> 25#include <plat/mmc.h>
26#include <plat/usb.h> 26#include <plat/usb.h>
27#include <plat/gpmc.h> 27#include <plat/gpmc.h>
28#include <plat/common.h> 28#include "common.h"
29#include <plat/onenand.h> 29#include <plat/onenand.h>
30 30
31#include "mux.h" 31#include "mux.h"
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index ba1aa07bdb29..bd18d691c6ad 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -27,7 +27,7 @@
27 27
28#include <plat/mcspi.h> 28#include <plat/mcspi.h>
29#include <plat/board.h> 29#include <plat/board.h>
30#include <plat/common.h> 30#include "common.h"
31#include <plat/dma.h> 31#include <plat/dma.h>
32#include <plat/gpmc.h> 32#include <plat/gpmc.h>
33#include <plat/onenand.h> 33#include <plat/onenand.h>
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 4af7c4b2881a..847731377af7 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -25,7 +25,7 @@
25 25
26#include <plat/mcspi.h> 26#include <plat/mcspi.h>
27#include <plat/board.h> 27#include <plat/board.h>
28#include <plat/common.h> 28#include "common.h"
29#include <plat/dma.h> 29#include <plat/dma.h>
30#include <plat/gpmc.h> 30#include <plat/gpmc.h>
31#include <plat/usb.h> 31#include <plat/usb.h>
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index e6ee8842285c..8402b39b2840 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -22,7 +22,7 @@
22 22
23#include <plat/irqs.h> 23#include <plat/irqs.h>
24#include <plat/board.h> 24#include <plat/board.h>
25#include <plat/common.h> 25#include "common.h"
26 26
27static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { 27static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
28}; 28};
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 6d0aa4fcb7c3..8d7ce11cfeaf 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -24,7 +24,7 @@
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26 26
27#include <plat/common.h> 27#include "common.h"
28#include <plat/usb.h> 28#include <plat/usb.h>
29 29
30#include <mach/board-zoom.h> 30#include <mach/board-zoom.h>
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index be6684dc4f55..bd58f9205175 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -21,7 +21,7 @@
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23 23
24#include <plat/common.h> 24#include "common.h"
25#include <plat/board.h> 25#include <plat/board.h>
26#include <plat/usb.h> 26#include <plat/usb.h>
27 27
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c
index 38830d8d4783..04d39cdd2112 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c
@@ -18,7 +18,7 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <plat/common.h> 21#include "common.h"
22 22
23#include "cm.h" 23#include "cm.h"
24#include "cm2xxx_3xxx.h" 24#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/cm44xx.c b/arch/arm/mach-omap2/cm44xx.c
index e96f53ea01a1..6a836303252c 100644
--- a/arch/arm/mach-omap2/cm44xx.c
+++ b/arch/arm/mach-omap2/cm44xx.c
@@ -18,7 +18,7 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <plat/common.h> 21#include "common.h"
22 22
23#include "cm.h" 23#include "cm.h"
24#include "cm1_44xx.h" 24#include "cm1_44xx.h"
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index eb2a472bbf46..6204deaf85b1 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -20,7 +20,7 @@
20#include <linux/err.h> 20#include <linux/err.h>
21#include <linux/io.h> 21#include <linux/io.h>
22 22
23#include <plat/common.h> 23#include "common.h"
24 24
25#include "cm.h" 25#include "cm.h"
26#include "cm1_44xx.h" 26#include "cm1_44xx.h"
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 110e5b9db145..684b8a7cd401 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -17,7 +17,7 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/common.h> 20#include "common.h"
21#include <plat/board.h> 21#include <plat/board.h>
22#include <plat/mux.h> 22#include <plat/mux.h>
23 23
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
new file mode 100644
index 000000000000..950b39d76e94
--- /dev/null
+++ b/arch/arm/mach-omap2/common.h
@@ -0,0 +1,185 @@
1/*
2 * Header for code common to all OMAP2+ machines.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
10 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
12 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
13 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
15 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
16 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
18 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#ifndef __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H
26#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H
27
28#include <linux/delay.h>
29#include <plat/common.h>
30
31#ifdef CONFIG_SOC_OMAP2420
32extern void omap242x_map_common_io(void);
33#else
34static inline void omap242x_map_common_io(void)
35{
36}
37#endif
38
39#ifdef CONFIG_SOC_OMAP2430
40extern void omap243x_map_common_io(void);
41#else
42static inline void omap243x_map_common_io(void)
43{
44}
45#endif
46
47#ifdef CONFIG_ARCH_OMAP3
48extern void omap34xx_map_common_io(void);
49#else
50static inline void omap34xx_map_common_io(void)
51{
52}
53#endif
54
55#ifdef CONFIG_SOC_OMAPTI816X
56extern void omapti816x_map_common_io(void);
57#else
58static inline void omapti816x_map_common_io(void)
59{
60}
61#endif
62
63#ifdef CONFIG_ARCH_OMAP4
64extern void omap44xx_map_common_io(void);
65#else
66static inline void omap44xx_map_common_io(void)
67{
68}
69#endif
70
71extern void omap2_init_common_infrastructure(void);
72
73extern struct sys_timer omap2_timer;
74extern struct sys_timer omap3_timer;
75extern struct sys_timer omap3_secure_timer;
76extern struct sys_timer omap4_timer;
77
78void omap2420_init_early(void);
79void omap2430_init_early(void);
80void omap3430_init_early(void);
81void omap35xx_init_early(void);
82void omap3630_init_early(void);
83void omap3_init_early(void); /* Do not use this one */
84void am35xx_init_early(void);
85void ti816x_init_early(void);
86void omap4430_init_early(void);
87
88/*
89 * IO bases for various OMAP processors
90 * Except the tap base, rest all the io bases
91 * listed are physical addresses.
92 */
93struct omap_globals {
94 u32 class; /* OMAP class to detect */
95 void __iomem *tap; /* Control module ID code */
96 void __iomem *sdrc; /* SDRAM Controller */
97 void __iomem *sms; /* SDRAM Memory Scheduler */
98 void __iomem *ctrl; /* System Control Module */
99 void __iomem *ctrl_pad; /* PAD Control Module */
100 void __iomem *prm; /* Power and Reset Management */
101 void __iomem *cm; /* Clock Management */
102 void __iomem *cm2;
103};
104
105void omap2_set_globals_242x(void);
106void omap2_set_globals_243x(void);
107void omap2_set_globals_3xxx(void);
108void omap2_set_globals_443x(void);
109void omap2_set_globals_ti816x(void);
110
111/* These get called from omap2_set_globals_xxxx(), do not call these */
112void omap2_set_globals_tap(struct omap_globals *);
113void omap2_set_globals_sdrc(struct omap_globals *);
114void omap2_set_globals_control(struct omap_globals *);
115void omap2_set_globals_prcm(struct omap_globals *);
116
117void omap242x_map_io(void);
118void omap243x_map_io(void);
119void omap3_map_io(void);
120void omap4_map_io(void);
121
122/**
123 * omap_test_timeout - busy-loop, testing a condition
124 * @cond: condition to test until it evaluates to true
125 * @timeout: maximum number of microseconds in the timeout
126 * @index: loop index (integer)
127 *
128 * Loop waiting for @cond to become true or until at least @timeout
129 * microseconds have passed. To use, define some integer @index in the
130 * calling code. After running, if @index == @timeout, then the loop has
131 * timed out.
132 */
133#define omap_test_timeout(cond, timeout, index) \
134({ \
135 for (index = 0; index < timeout; index++) { \
136 if (cond) \
137 break; \
138 udelay(1); \
139 } \
140})
141
142extern struct device *omap2_get_mpuss_device(void);
143extern struct device *omap2_get_iva_device(void);
144extern struct device *omap2_get_l3_device(void);
145extern struct device *omap4_get_dsp_device(void);
146
147void omap2_init_irq(void);
148void omap3_init_irq(void);
149void ti816x_init_irq(void);
150extern int omap_irq_pending(void);
151void omap_intc_save_context(void);
152void omap_intc_restore_context(void);
153void omap3_intc_suspend(void);
154void omap3_intc_prepare_idle(void);
155void omap3_intc_resume_idle(void);
156
157/*
158 * wfi used in low power code. Directly opcode is used instead
159 * of instruction to avoid mulit-omap build break
160 */
161#ifdef CONFIG_THUMB2_KERNEL
162#define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory")
163#else
164#define do_wfi() \
165 __asm__ __volatile__ (".word 0xe320f003" : : : "memory")
166#endif
167
168#ifdef CONFIG_CACHE_L2X0
169extern void __iomem *l2cache_base;
170#endif
171
172extern void __iomem *gic_dist_base_addr;
173
174extern void __init gic_init_irq(void);
175extern void omap_smc1(u32 fn, u32 arg);
176
177#ifdef CONFIG_SMP
178/* Needed for secondary core boot */
179extern void omap_secondary_startup(void);
180extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
181extern void omap_auxcoreboot_addr(u32 cpu_addr);
182extern u32 omap_read_auxcoreboot0(void);
183#endif
184
185#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index e34d27f8c49c..114c037e433c 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -15,7 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <plat/common.h> 18#include "common.h"
19#include <plat/sdrc.h> 19#include <plat/sdrc.h>
20 20
21#include "cm-regbits-34xx.h" 21#include "cm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index ace99944e96f..a12e224eb97d 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -21,7 +21,7 @@
21 21
22#include <plat/cpu.h> 22#include <plat/cpu.h>
23#include <plat/i2c.h> 23#include <plat/i2c.h>
24#include <plat/common.h> 24#include "common.h"
25#include <plat/omap_hwmod.h> 25#include <plat/omap_hwmod.h>
26 26
27#include "mux.h" 27#include "mux.h"
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 7f47092a193f..27ad722df637 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -21,7 +21,7 @@
21 21
22#include <asm/cputype.h> 22#include <asm/cputype.h>
23 23
24#include <plat/common.h> 24#include "common.h"
25#include <plat/cpu.h> 25#include <plat/cpu.h>
26 26
27#include <mach/id.h> 27#include <mach/id.h>
diff --git a/arch/arm/mach-omap2/include/mach/omap4-common.h b/arch/arm/mach-omap2/include/mach/omap4-common.h
deleted file mode 100644
index e4bd87619734..000000000000
--- a/arch/arm/mach-omap2/include/mach/omap4-common.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * omap4-common.h: OMAP4 specific common header file
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc.
5 *
6 * Author:
7 * Santosh Shilimkar <santosh.shilimkar@ti.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#ifndef OMAP_ARCH_OMAP4_COMMON_H
14#define OMAP_ARCH_OMAP4_COMMON_H
15
16/*
17 * wfi used in low power code. Directly opcode is used instead
18 * of instruction to avoid mulit-omap build break
19 */
20#ifdef CONFIG_THUMB2_KERNEL
21#define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory")
22#else
23#define do_wfi() \
24 __asm__ __volatile__ (".word 0xe320f003" : : : "memory")
25#endif
26
27#ifdef CONFIG_CACHE_L2X0
28extern void __iomem *l2cache_base;
29#endif
30
31extern void __iomem *gic_dist_base_addr;
32
33extern void __init gic_init_irq(void);
34extern void omap_smc1(u32 fn, u32 arg);
35
36#ifdef CONFIG_SMP
37/* Needed for secondary core boot */
38extern void omap_secondary_startup(void);
39extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
40extern void omap_auxcoreboot_addr(u32 cpu_addr);
41extern u32 omap_read_auxcoreboot0(void);
42#endif
43#endif
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 25d20ced03e1..33f090ce0226 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -35,7 +35,7 @@
35#include "clock3xxx.h" 35#include "clock3xxx.h"
36#include "clock44xx.h" 36#include "clock44xx.h"
37 37
38#include <plat/common.h> 38#include "common.h"
39#include <plat/omap-pm.h> 39#include <plat/omap-pm.h>
40#include "voltage.h" 40#include "voltage.h"
41#include "powerdomain.h" 41#include "powerdomain.h"
@@ -43,7 +43,7 @@
43#include "clockdomain.h" 43#include "clockdomain.h"
44#include <plat/omap_hwmod.h> 44#include <plat/omap_hwmod.h>
45#include <plat/multi.h> 45#include <plat/multi.h>
46#include <plat/common.h> 46#include "common.h"
47 47
48/* 48/*
49 * The machine specific code may provide the extra mapping besides the 49 * The machine specific code may provide the extra mapping besides the
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 4976b9393e49..e5a1c3f40a86 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -19,7 +19,8 @@
19#include <linux/smp.h> 19#include <linux/smp.h>
20 20
21#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
22#include <mach/omap4-common.h> 22
23#include "common.h"
23 24
24int platform_cpu_kill(unsigned int cpu) 25int platform_cpu_kill(unsigned int cpu)
25{ 26{
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 4412ddb7b3f6..e99bc6cd4714 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -24,7 +24,8 @@
24#include <asm/hardware/gic.h> 24#include <asm/hardware/gic.h>
25#include <asm/smp_scu.h> 25#include <asm/smp_scu.h>
26#include <mach/hardware.h> 26#include <mach/hardware.h>
27#include <mach/omap4-common.h> 27
28#include "common.h"
28 29
29/* SCU base address */ 30/* SCU base address */
30static void __iomem *scu_base; 31static void __iomem *scu_base;
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 35ac3e5f6e94..f327d7472ca7 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -22,7 +22,8 @@
22#include <plat/irqs.h> 22#include <plat/irqs.h>
23 23
24#include <mach/hardware.h> 24#include <mach/hardware.h>
25#include <mach/omap4-common.h> 25
26#include "common.h"
26 27
27#ifdef CONFIG_CACHE_L2X0 28#ifdef CONFIG_CACHE_L2X0
28void __iomem *l2cache_base; 29void __iomem *l2cache_base;
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 6b3088db83b7..00fcd2c311ea 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -137,7 +137,7 @@
137#include <linux/mutex.h> 137#include <linux/mutex.h>
138#include <linux/spinlock.h> 138#include <linux/spinlock.h>
139 139
140#include <plat/common.h> 140#include "common.h"
141#include <plat/cpu.h> 141#include <plat/cpu.h>
142#include "clockdomain.h" 142#include "clockdomain.h"
143#include "powerdomain.h" 143#include "powerdomain.h"
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 1e79bdf313e3..e7bee5ca407c 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -18,7 +18,7 @@
18 18
19#include <plat/omap-pm.h> 19#include <plat/omap-pm.h>
20#include <plat/omap_device.h> 20#include <plat/omap_device.h>
21#include <plat/common.h> 21#include "common.h"
22 22
23#include "voltage.h" 23#include "voltage.h"
24#include "powerdomain.h" 24#include "powerdomain.h"
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index cf0c216132ab..ef8595c80296 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -42,6 +42,7 @@
42#include <plat/dma.h> 42#include <plat/dma.h>
43#include <plat/board.h> 43#include <plat/board.h>
44 44
45#include "common.h"
45#include "prm2xxx_3xxx.h" 46#include "prm2xxx_3xxx.h"
46#include "prm-regbits-24xx.h" 47#include "prm-regbits-24xx.h"
47#include "cm2xxx_3xxx.h" 48#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index efa66494c1e3..fa637dfdda53 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -42,6 +42,7 @@
42#include <plat/gpmc.h> 42#include <plat/gpmc.h>
43#include <plat/dma.h> 43#include <plat/dma.h>
44 44
45#include "common.h"
45#include "cm2xxx_3xxx.h" 46#include "cm2xxx_3xxx.h"
46#include "cm-regbits-34xx.h" 47#include "cm-regbits-34xx.h"
47#include "prm-regbits-34xx.h" 48#include "prm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 59a870be8390..8edb015f5618 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -16,8 +16,8 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18 18
19#include "common.h"
19#include "powerdomain.h" 20#include "powerdomain.h"
20#include <mach/omap4-common.h>
21 21
22struct power_state { 22struct power_state {
23 struct powerdomain *pwrdm; 23 struct powerdomain *pwrdm;
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 597e2da831b3..c35e5cea9f8f 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -26,7 +26,7 @@
26#include <linux/export.h> 26#include <linux/export.h>
27 27
28#include <mach/system.h> 28#include <mach/system.h>
29#include <plat/common.h> 29#include "common.h"
30#include <plat/prcm.h> 30#include <plat/prcm.h>
31#include <plat/irqs.h> 31#include <plat/irqs.h>
32 32
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.c b/arch/arm/mach-omap2/prcm_mpu44xx.c
index 171fe171a749..ca669b50f390 100644
--- a/arch/arm/mach-omap2/prcm_mpu44xx.c
+++ b/arch/arm/mach-omap2/prcm_mpu44xx.c
@@ -15,7 +15,7 @@
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <plat/common.h> 18#include "common.h"
19 19
20#include "prcm_mpu44xx.h" 20#include "prcm_mpu44xx.h"
21#include "cm-regbits-44xx.h" 21#include "cm-regbits-44xx.h"
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index f02d87f68e54..9a08ba397327 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -16,7 +16,7 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/io.h> 17#include <linux/io.h>
18 18
19#include <plat/common.h> 19#include "common.h"
20#include <plat/cpu.h> 20#include <plat/cpu.h>
21#include <plat/prcm.h> 21#include <plat/prcm.h>
22 22
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 495a31a7e8a7..dd885eecf22a 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -17,7 +17,7 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/common.h> 20#include "common.h"
21#include <plat/cpu.h> 21#include <plat/cpu.h>
22#include <plat/prcm.h> 22#include <plat/prcm.h>
23 23
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index 3a7bab16edd5..f6de5bc6b12a 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -16,7 +16,7 @@
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/io.h> 17#include <linux/io.h>
18 18
19#include <plat/common.h> 19#include "common.h"
20 20
21#include "prm44xx.h" 21#include "prm44xx.h"
22#include "prminst44xx.h" 22#include "prminst44xx.h"
diff --git a/arch/arm/mach-omap2/sdram-nokia.c b/arch/arm/mach-omap2/sdram-nokia.c
index 14caa228bc0d..ee3a8ad304cb 100644
--- a/arch/arm/mach-omap2/sdram-nokia.c
+++ b/arch/arm/mach-omap2/sdram-nokia.c
@@ -18,7 +18,7 @@
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/io.h> 20#include <plat/io.h>
21#include <plat/common.h> 21#include "common.h"
22#include <plat/clock.h> 22#include <plat/clock.h>
23#include <plat/sdrc.h> 23#include <plat/sdrc.h>
24 24
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
index 8f2782874771..e3d345f46409 100644
--- a/arch/arm/mach-omap2/sdrc.c
+++ b/arch/arm/mach-omap2/sdrc.c
@@ -23,7 +23,7 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <plat/common.h> 26#include "common.h"
27#include <plat/clock.h> 27#include <plat/clock.h>
28#include <plat/sram.h> 28#include <plat/sram.h>
29 29
diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c
index ccdb010f169d..791a63cdceb2 100644
--- a/arch/arm/mach-omap2/sdrc2xxx.c
+++ b/arch/arm/mach-omap2/sdrc2xxx.c
@@ -24,7 +24,7 @@
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <plat/common.h> 27#include "common.h"
28#include <plat/clock.h> 28#include <plat/clock.h>
29#include <plat/sram.h> 29#include <plat/sram.h>
30 30
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 9992dbfdfdb3..42c326732a29 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -33,7 +33,7 @@
33#include <plat/omap-serial.h> 33#include <plat/omap-serial.h>
34#endif 34#endif
35 35
36#include <plat/common.h> 36#include "common.h"
37#include <plat/board.h> 37#include <plat/board.h>
38#include <plat/clock.h> 38#include <plat/clock.h>
39#include <plat/dma.h> 39#include <plat/dma.h>
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 6a4f6839a7d9..919d827ed707 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -26,7 +26,7 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/pm_runtime.h> 27#include <linux/pm_runtime.h>
28 28
29#include <plat/common.h> 29#include "common.h"
30 30
31#include "pm.h" 31#include "pm.h"
32#include "smartreflex.h" 32#include "smartreflex.h"
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 037b0d7d4e05..9edcd520510f 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -41,7 +41,7 @@
41#include <plat/dmtimer.h> 41#include <plat/dmtimer.h>
42#include <asm/localtimer.h> 42#include <asm/localtimer.h>
43#include <asm/sched_clock.h> 43#include <asm/sched_clock.h>
44#include <plat/common.h> 44#include "common.h"
45#include <plat/omap_hwmod.h> 45#include <plat/omap_hwmod.h>
46#include <plat/omap_device.h> 46#include <plat/omap_device.h>
47#include <plat/omap-pm.h> 47#include <plat/omap-pm.h>
diff --git a/arch/arm/mach-omap2/vc3xxx_data.c b/arch/arm/mach-omap2/vc3xxx_data.c
index cfe348e1af0e..a5ec7f8f2ea8 100644
--- a/arch/arm/mach-omap2/vc3xxx_data.c
+++ b/arch/arm/mach-omap2/vc3xxx_data.c
@@ -18,7 +18,7 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/init.h> 19#include <linux/init.h>
20 20
21#include <plat/common.h> 21#include "common.h"
22 22
23#include "prm-regbits-34xx.h" 23#include "prm-regbits-34xx.h"
24#include "voltage.h" 24#include "voltage.h"
diff --git a/arch/arm/mach-omap2/vc44xx_data.c b/arch/arm/mach-omap2/vc44xx_data.c
index 2740a968145e..d70b930f2739 100644
--- a/arch/arm/mach-omap2/vc44xx_data.c
+++ b/arch/arm/mach-omap2/vc44xx_data.c
@@ -18,7 +18,7 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/init.h> 19#include <linux/init.h>
20 20
21#include <plat/common.h> 21#include "common.h"
22 22
23#include "prm44xx.h" 23#include "prm44xx.h"
24#include "prm-regbits-44xx.h" 24#include "prm-regbits-44xx.h"
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 1f8fdf736e63..8a36342e60d2 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -27,7 +27,7 @@
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/clk.h> 28#include <linux/clk.h>
29 29
30#include <plat/common.h> 30#include "common.h"
31 31
32#include "prm-regbits-34xx.h" 32#include "prm-regbits-34xx.h"
33#include "prm-regbits-44xx.h" 33#include "prm-regbits-44xx.h"
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
index 071101debbbc..474559d5b072 100644
--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
@@ -18,7 +18,7 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/init.h> 19#include <linux/init.h>
20 20
21#include <plat/common.h> 21#include "common.h"
22#include <plat/cpu.h> 22#include <plat/cpu.h>
23 23
24#include "prm-regbits-34xx.h" 24#include "prm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c
index c4584e9ac717..4e11d022595d 100644
--- a/arch/arm/mach-omap2/voltagedomains44xx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c
@@ -21,7 +21,7 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/init.h> 22#include <linux/init.h>
23 23
24#include <plat/common.h> 24#include "common.h"
25 25
26#include "prm-regbits-44xx.h" 26#include "prm-regbits-44xx.h"
27#include "prm44xx.h" 27#include "prm44xx.h"
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 66bd700a2b98..807391d84a9d 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -1,7 +1,7 @@
1#include <linux/kernel.h> 1#include <linux/kernel.h>
2#include <linux/init.h> 2#include <linux/init.h>
3 3
4#include <plat/common.h> 4#include "common.h"
5 5
6#include "voltage.h" 6#include "voltage.h"
7#include "vp.h" 7#include "vp.h"
diff --git a/arch/arm/mach-omap2/vp3xxx_data.c b/arch/arm/mach-omap2/vp3xxx_data.c
index 260c554b1547..bd89f80089f5 100644
--- a/arch/arm/mach-omap2/vp3xxx_data.c
+++ b/arch/arm/mach-omap2/vp3xxx_data.c
@@ -19,7 +19,7 @@
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/init.h> 20#include <linux/init.h>
21 21
22#include <plat/common.h> 22#include "common.h"
23 23
24#include "prm-regbits-34xx.h" 24#include "prm-regbits-34xx.h"
25#include "voltage.h" 25#include "voltage.h"
diff --git a/arch/arm/mach-omap2/vp44xx_data.c b/arch/arm/mach-omap2/vp44xx_data.c
index b4e77044891e..8c031d16879e 100644
--- a/arch/arm/mach-omap2/vp44xx_data.c
+++ b/arch/arm/mach-omap2/vp44xx_data.c
@@ -19,7 +19,7 @@
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/init.h> 20#include <linux/init.h>
21 21
22#include <plat/common.h> 22#include "common.h"
23 23
24#include "prm44xx.h" 24#include "prm44xx.h"
25#include "prm-regbits-44xx.h" 25#include "prm-regbits-44xx.h"
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 50c833177866..afcb48a5792c 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -420,17 +420,11 @@ static void poodle_poweroff(void)
420 arm_machine_restart('h', NULL); 420 arm_machine_restart('h', NULL);
421} 421}
422 422
423static void poodle_restart(char mode, const char *cmd)
424{
425 arm_machine_restart('h', cmd);
426}
427
428static void __init poodle_init(void) 423static void __init poodle_init(void)
429{ 424{
430 int ret = 0; 425 int ret = 0;
431 426
432 pm_power_off = poodle_poweroff; 427 pm_power_off = poodle_poweroff;
433 arm_pm_restart = poodle_restart;
434 428
435 PCFR |= PCFR_OPDE; 429 PCFR |= PCFR_OPDE;
436 430
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index feda3ca7fc95..f4b25d875f3d 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -29,7 +29,6 @@
29void arch_reset(char mode, const char *cmd) 29void arch_reset(char mode, const char *cmd)
30{ 30{
31 short temp; 31 short temp;
32 local_irq_disable();
33 /* Reset the Machine via pc[3] of the sequoia chipset */ 32 /* Reset the Machine via pc[3] of the sequoia chipset */
34 outw(0x09,0x24); 33 outw(0x09,0x24);
35 temp=inw(0x26); 34 temp=inw(0x26);
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
index 8daf13634ce0..6b6fef7a438c 100644
--- a/arch/arm/mach-u300/include/mach/system.h
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -27,8 +27,6 @@ static void arch_reset(char mode, const char *cmd)
27 case 's': 27 case 's':
28 case 'h': 28 case 'h':
29 printk(KERN_CRIT "RESET: shutting down/rebooting system\n"); 29 printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
30 /* Disable interrupts */
31 local_irq_disable();
32#ifdef CONFIG_COH901327_WATCHDOG 30#ifdef CONFIG_COH901327_WATCHDOG
33 coh901327_watchdog_reset(); 31 coh901327_watchdog_reset();
34#endif 32#endif
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c
index 7bf143c443f1..b466e2450ba3 100644
--- a/arch/arm/mach-w90x900/irq.c
+++ b/arch/arm/mach-w90x900/irq.c
@@ -28,6 +28,8 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <mach/regs-irq.h> 29#include <mach/regs-irq.h>
30 30
31#include "nuc9xx.h"
32
31struct group_irq { 33struct group_irq {
32 unsigned long gpen; 34 unsigned long gpen;
33 unsigned int enabled; 35 unsigned int enabled;
diff --git a/arch/arm/mach-w90x900/nuc910.h b/arch/arm/mach-w90x900/nuc910.h
index 83e9ba5fc26c..b14c71a9e683 100644
--- a/arch/arm/mach-w90x900/nuc910.h
+++ b/arch/arm/mach-w90x900/nuc910.h
@@ -12,14 +12,7 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 * 13 *
14 */ 14 */
15 15#include "nuc9xx.h"
16struct map_desc;
17struct sys_timer;
18
19/* core initialisation functions */
20
21extern void nuc900_init_irq(void);
22extern struct sys_timer nuc900_timer;
23 16
24/* extern file from nuc910.c */ 17/* extern file from nuc910.c */
25 18
diff --git a/arch/arm/mach-w90x900/nuc950.h b/arch/arm/mach-w90x900/nuc950.h
index 98a1148bc5ae..6e9de3051cd4 100644
--- a/arch/arm/mach-w90x900/nuc950.h
+++ b/arch/arm/mach-w90x900/nuc950.h
@@ -12,14 +12,7 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 * 13 *
14 */ 14 */
15 15#include "nuc9xx.h"
16struct map_desc;
17struct sys_timer;
18
19/* core initialisation functions */
20
21extern void nuc900_init_irq(void);
22extern struct sys_timer nuc900_timer;
23 16
24/* extern file from nuc950.c */ 17/* extern file from nuc950.c */
25 18
diff --git a/arch/arm/mach-w90x900/nuc960.h b/arch/arm/mach-w90x900/nuc960.h
index f0c07cbe3a82..9f6df9a00286 100644
--- a/arch/arm/mach-w90x900/nuc960.h
+++ b/arch/arm/mach-w90x900/nuc960.h
@@ -12,14 +12,7 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 * 13 *
14 */ 14 */
15 15#include "nuc9xx.h"
16struct map_desc;
17struct sys_timer;
18
19/* core initialisation functions */
20
21extern void nuc900_init_irq(void);
22extern struct sys_timer nuc900_timer;
23 16
24/* extern file from nuc960.c */ 17/* extern file from nuc960.c */
25 18
diff --git a/arch/arm/mach-w90x900/nuc9xx.h b/arch/arm/mach-w90x900/nuc9xx.h
new file mode 100644
index 000000000000..847c4f3e0440
--- /dev/null
+++ b/arch/arm/mach-w90x900/nuc9xx.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-w90x900/nuc9xx.h
3 *
4 * Copied from nuc910.h, which had:
5 *
6 * Copyright (c) 2008 Nuvoton corporation
7 *
8 * Header file for NUC900 CPU support
9 *
10 * Wan ZongShun <mcuos.com@gmail.com>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 *
16 */
17struct map_desc;
18struct sys_timer;
19
20/* core initialisation functions */
21
22extern void nuc900_init_irq(void);
23extern struct sys_timer nuc900_timer;
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c
index a2c4e2d0a0d4..fa27c498ac09 100644
--- a/arch/arm/mach-w90x900/time.c
+++ b/arch/arm/mach-w90x900/time.c
@@ -33,6 +33,8 @@
33#include <mach/map.h> 33#include <mach/map.h>
34#include <mach/regs-timer.h> 34#include <mach/regs-timer.h>
35 35
36#include "nuc9xx.h"
37
36#define RESETINT 0x1f 38#define RESETINT 0x1f
37#define PERIOD (0x01 << 27) 39#define PERIOD (0x01 << 27)
38#define ONESHOT (0x00 << 27) 40#define ONESHOT (0x00 << 27)
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index c50df4814f6f..346098fb9219 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -27,94 +27,12 @@
27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H 27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
28#define __ARCH_ARM_MACH_OMAP_COMMON_H 28#define __ARCH_ARM_MACH_OMAP_COMMON_H
29 29
30#include <linux/delay.h>
31
32#include <plat/i2c.h> 30#include <plat/i2c.h>
33 31
34struct sys_timer;
35
36extern void omap_map_common_io(void);
37extern struct sys_timer omap1_timer;
38extern struct sys_timer omap2_timer;
39extern struct sys_timer omap3_timer;
40extern struct sys_timer omap3_secure_timer;
41extern struct sys_timer omap4_timer;
42extern bool omap_32k_timer_init(void);
43extern int __init omap_init_clocksource_32k(void); 32extern int __init omap_init_clocksource_32k(void);
44extern unsigned long long notrace omap_32k_sched_clock(void); 33extern unsigned long long notrace omap_32k_sched_clock(void);
45 34
46extern void omap_reserve(void); 35extern void omap_reserve(void);
47
48void omap2420_init_early(void);
49void omap2430_init_early(void);
50void omap3430_init_early(void);
51void omap35xx_init_early(void);
52void omap3630_init_early(void);
53void omap3_init_early(void); /* Do not use this one */
54void am35xx_init_early(void);
55void ti816x_init_early(void);
56void omap4430_init_early(void);
57
58void omap_sram_init(void); 36void omap_sram_init(void);
59 37
60/*
61 * IO bases for various OMAP processors
62 * Except the tap base, rest all the io bases
63 * listed are physical addresses.
64 */
65struct omap_globals {
66 u32 class; /* OMAP class to detect */
67 void __iomem *tap; /* Control module ID code */
68 void __iomem *sdrc; /* SDRAM Controller */
69 void __iomem *sms; /* SDRAM Memory Scheduler */
70 void __iomem *ctrl; /* System Control Module */
71 void __iomem *ctrl_pad; /* PAD Control Module */
72 void __iomem *prm; /* Power and Reset Management */
73 void __iomem *cm; /* Clock Management */
74 void __iomem *cm2;
75};
76
77void omap2_set_globals_242x(void);
78void omap2_set_globals_243x(void);
79void omap2_set_globals_3xxx(void);
80void omap2_set_globals_443x(void);
81void omap2_set_globals_ti816x(void);
82
83/* These get called from omap2_set_globals_xxxx(), do not call these */
84void omap2_set_globals_tap(struct omap_globals *);
85void omap2_set_globals_sdrc(struct omap_globals *);
86void omap2_set_globals_control(struct omap_globals *);
87void omap2_set_globals_prcm(struct omap_globals *);
88
89void omap242x_map_io(void);
90void omap243x_map_io(void);
91void omap3_map_io(void);
92void omap4_map_io(void);
93
94
95/**
96 * omap_test_timeout - busy-loop, testing a condition
97 * @cond: condition to test until it evaluates to true
98 * @timeout: maximum number of microseconds in the timeout
99 * @index: loop index (integer)
100 *
101 * Loop waiting for @cond to become true or until at least @timeout
102 * microseconds have passed. To use, define some integer @index in the
103 * calling code. After running, if @index == @timeout, then the loop has
104 * timed out.
105 */
106#define omap_test_timeout(cond, timeout, index) \
107({ \
108 for (index = 0; index < timeout; index++) { \
109 if (cond) \
110 break; \
111 udelay(1); \
112 } \
113})
114
115extern struct device *omap2_get_mpuss_device(void);
116extern struct device *omap2_get_iva_device(void);
117extern struct device *omap2_get_l3_device(void);
118extern struct device *omap4_get_dsp_device(void);
119
120#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ 38#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index 7f2969eadb85..62f4477666cb 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -257,74 +257,6 @@ extern void omap_writew(u16 v, u32 pa);
257extern void omap_writel(u32 v, u32 pa); 257extern void omap_writel(u32 v, u32 pa);
258 258
259struct omap_sdrc_params; 259struct omap_sdrc_params;
260
261#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
262void omap7xx_map_io(void);
263#else
264static inline void omap_map_io(void)
265{
266}
267#endif
268
269#ifdef CONFIG_ARCH_OMAP15XX
270void omap15xx_map_io(void);
271#else
272static inline void omap15xx_map_io(void)
273{
274}
275#endif
276
277#ifdef CONFIG_ARCH_OMAP16XX
278void omap16xx_map_io(void);
279#else
280static inline void omap16xx_map_io(void)
281{
282}
283#endif
284
285void omap1_init_early(void);
286
287#ifdef CONFIG_SOC_OMAP2420
288extern void omap242x_map_common_io(void);
289#else
290static inline void omap242x_map_common_io(void)
291{
292}
293#endif
294
295#ifdef CONFIG_SOC_OMAP2430
296extern void omap243x_map_common_io(void);
297#else
298static inline void omap243x_map_common_io(void)
299{
300}
301#endif
302
303#ifdef CONFIG_ARCH_OMAP3
304extern void omap34xx_map_common_io(void);
305#else
306static inline void omap34xx_map_common_io(void)
307{
308}
309#endif
310
311#ifdef CONFIG_SOC_OMAPTI816X
312extern void omapti816x_map_common_io(void);
313#else
314static inline void omapti816x_map_common_io(void)
315{
316}
317#endif
318
319#ifdef CONFIG_ARCH_OMAP4
320extern void omap44xx_map_common_io(void);
321#else
322static inline void omap44xx_map_common_io(void)
323{
324}
325#endif
326
327extern void omap2_init_common_infrastructure(void);
328extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, 260extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
329 struct omap_sdrc_params *sdrc_cs1); 261 struct omap_sdrc_params *sdrc_cs1);
330 262
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index 30e10719b774..d3a9fcd53c45 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -438,16 +438,6 @@
438 438
439#ifndef __ASSEMBLY__ 439#ifndef __ASSEMBLY__
440extern void __iomem *omap_irq_base; 440extern void __iomem *omap_irq_base;
441void omap1_init_irq(void);
442void omap2_init_irq(void);
443void omap3_init_irq(void);
444void ti816x_init_irq(void);
445extern int omap_irq_pending(void);
446void omap_intc_save_context(void);
447void omap_intc_restore_context(void);
448void omap3_intc_suspend(void);
449void omap3_intc_prepare_idle(void);
450void omap3_intc_resume_idle(void);
451#endif 441#endif
452 442
453#include <mach/hardware.h> 443#include <mach/hardware.h>