aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Kconfig8
-rw-r--r--arch/arm/mach-omap2/Makefile167
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c1
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c1
-rw-r--r--arch/arm/mach-omap2/board-apollon.c1
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c1
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c1
-rw-r--r--arch/arm/mach-omap2/board-generic.c1
-rw-r--r--arch/arm/mach-omap2/board-h4.c1
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c2
-rw-r--r--arch/arm/mach-omap2/board-ldp.c1
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c3
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c1
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c1
-rw-r--r--arch/arm/mach-omap2/board-overo.c1
-rw-r--r--arch/arm/mach-omap2/board-rm680.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51.c1
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom.c2
-rw-r--r--arch/arm/mach-omap2/common.h51
-rw-r--r--arch/arm/mach-omap2/devices.c19
-rw-r--r--arch/arm/mach-omap2/dma.c11
-rw-r--r--arch/arm/mach-omap2/dsp.c27
-rw-r--r--arch/arm/mach-omap2/gpmc.c30
-rw-r--r--arch/arm/mach-omap2/hsmmc.c8
-rw-r--r--arch/arm/mach-omap2/id.c7
-rw-r--r--arch/arm/mach-omap2/include/mach/omap-wakeupgen.h8
-rw-r--r--arch/arm/mach-omap2/io.c101
-rw-r--r--arch/arm/mach-omap2/iomap.h28
-rw-r--r--arch/arm/mach-omap2/irq.c2
-rw-r--r--arch/arm/mach-omap2/mux.c3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/pm.c3
-rw-r--r--arch/arm/mach-omap2/pm24xx.c17
-rw-r--r--arch/arm/mach-omap2/pm34xx.c7
-rw-r--r--arch/arm/mach-omap2/pm44xx.c6
-rw-r--r--arch/arm/mach-omap2/powerdomains3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/timer.c118
-rw-r--r--arch/arm/mach-omap2/usb-musb.c2
-rw-r--r--arch/arm/mach-omap2/voltagedomains3xxx_data.c2
50 files changed, 420 insertions, 244 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 964ee67a3b77..4cf5142f22cc 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -78,12 +78,12 @@ config SOC_OMAP3430
78 default y 78 default y
79 select ARCH_OMAP_OTG 79 select ARCH_OMAP_OTG
80 80
81config SOC_OMAPTI81XX 81config SOC_TI81XX
82 bool "TI81XX support" 82 bool "TI81XX support"
83 depends on ARCH_OMAP3 83 depends on ARCH_OMAP3
84 default y 84 default y
85 85
86config SOC_OMAPAM33XX 86config SOC_AM33XX
87 bool "AM33XX support" 87 bool "AM33XX support"
88 depends on ARCH_OMAP3 88 depends on ARCH_OMAP3
89 default y 89 default y
@@ -320,12 +320,12 @@ config MACH_OMAP_3630SDP
320 320
321config MACH_TI8168EVM 321config MACH_TI8168EVM
322 bool "TI8168 Evaluation Module" 322 bool "TI8168 Evaluation Module"
323 depends on SOC_OMAPTI81XX 323 depends on SOC_TI81XX
324 default y 324 default y
325 325
326config MACH_TI8148EVM 326config MACH_TI8148EVM
327 bool "TI8148 Evaluation Module" 327 bool "TI8148 Evaluation Module"
328 depends on SOC_OMAPTI81XX 328 depends on SOC_TI81XX
329 default y 329 default y
330 330
331config MACH_OMAP_4430SDP 331config MACH_OMAP_4430SDP
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 385c083d24b2..fa742f3c2629 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -24,10 +24,11 @@ endif
24obj-$(CONFIG_TWL4030_CORE) += omap_twl.o 24obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
25 25
26# SMP support ONLY available for OMAP4 26# SMP support ONLY available for OMAP4
27
27obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 28obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
28obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o 29obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
29obj-$(CONFIG_ARCH_OMAP4) += omap4-common.o omap-wakeupgen.o \ 30obj-$(CONFIG_ARCH_OMAP4) += omap4-common.o omap-wakeupgen.o
30 sleep44xx.o 31obj-$(CONFIG_ARCH_OMAP4) += sleep44xx.o
31 32
32plus_sec := $(call as-instr,.arch_extension sec,+sec) 33plus_sec := $(call as-instr,.arch_extension sec,+sec)
33AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) 34AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
@@ -64,10 +65,10 @@ endif
64ifeq ($(CONFIG_PM),y) 65ifeq ($(CONFIG_PM),y)
65obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o 66obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
66obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o 67obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o
67obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o \ 68obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
68 cpuidle34xx.o 69obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o
69obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o \ 70obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o
70 cpuidle44xx.o 71obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o
71obj-$(CONFIG_PM_DEBUG) += pm-debug.o 72obj-$(CONFIG_PM_DEBUG) += pm-debug.o
72obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o 73obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o
73obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o 74obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o
@@ -84,90 +85,86 @@ endif
84# PRCM 85# PRCM
85obj-y += prm_common.o 86obj-y += prm_common.o
86obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o 87obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
87obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o \ 88obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
88 vc3xxx_data.o vp3xxx_data.o 89obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
89# XXX The presence of cm2xxx_3xxx.o on the line below is temporary and 90obj-$(CONFIG_ARCH_OMAP4) += prcm.o cminst44xx.o cm44xx.o
90# will be removed once the OMAP4 part of the codebase is converted to 91obj-$(CONFIG_ARCH_OMAP4) += prcm_mpu44xx.o prminst44xx.o
91# use OMAP4-specific PRCM functions. 92obj-$(CONFIG_ARCH_OMAP4) += vc44xx_data.o vp44xx_data.o prm44xx.o
92obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \
93 cm44xx.o prcm_mpu44xx.o \
94 prminst44xx.o vc44xx_data.o \
95 vp44xx_data.o prm44xx.o
96 93
97# OMAP voltage domains 94# OMAP voltage domains
98voltagedomain-common := voltage.o vc.o vp.o 95voltagedomain-common := voltage.o vc.o vp.o
99obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) \ 96obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common)
100 voltagedomains2xxx_data.o 97obj-$(CONFIG_ARCH_OMAP2) += voltagedomains2xxx_data.o
101obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ 98obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common)
102 voltagedomains3xxx_data.o 99obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o
103obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ 100obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common)
104 voltagedomains44xx_data.o 101obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o
105 102
106# OMAP powerdomain framework 103# OMAP powerdomain framework
107powerdomain-common += powerdomain.o powerdomain-common.o 104powerdomain-common += powerdomain.o powerdomain-common.o
108obj-$(CONFIG_ARCH_OMAP2) += $(powerdomain-common) \ 105obj-$(CONFIG_ARCH_OMAP2) += $(powerdomain-common)
109 powerdomain2xxx_3xxx.o \ 106obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_data.o
110 powerdomains2xxx_data.o \ 107obj-$(CONFIG_ARCH_OMAP2) += powerdomain2xxx_3xxx.o
111 powerdomains2xxx_3xxx_data.o 108obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_3xxx_data.o
112obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common) \ 109obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common)
113 powerdomain2xxx_3xxx.o \ 110obj-$(CONFIG_ARCH_OMAP3) += powerdomain2xxx_3xxx.o
114 powerdomains3xxx_data.o \ 111obj-$(CONFIG_ARCH_OMAP3) += powerdomains3xxx_data.o
115 powerdomains2xxx_3xxx_data.o 112obj-$(CONFIG_ARCH_OMAP3) += powerdomains2xxx_3xxx_data.o
116obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \ 113obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common)
117 powerdomain44xx.o \ 114obj-$(CONFIG_ARCH_OMAP4) += powerdomain44xx.o
118 powerdomains44xx_data.o 115obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o
119 116
120# PRCM clockdomain control 117# PRCM clockdomain control
121clockdomain-common += clockdomain.o \ 118clockdomain-common += clockdomain.o
122 clockdomains_common_data.o 119clockdomain-common += clockdomains_common_data.o
123obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common) \ 120obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common)
124 clockdomain2xxx_3xxx.o \ 121obj-$(CONFIG_ARCH_OMAP2) += clockdomain2xxx_3xxx.o
125 clockdomains2xxx_3xxx_data.o 122obj-$(CONFIG_ARCH_OMAP2) += clockdomains2xxx_3xxx_data.o
126obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o 123obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o
127obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o 124obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o
128obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common) \ 125obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common)
129 clockdomain2xxx_3xxx.o \ 126obj-$(CONFIG_ARCH_OMAP3) += clockdomain2xxx_3xxx.o
130 clockdomains2xxx_3xxx_data.o \ 127obj-$(CONFIG_ARCH_OMAP3) += clockdomains2xxx_3xxx_data.o
131 clockdomains3xxx_data.o 128obj-$(CONFIG_ARCH_OMAP3) += clockdomains3xxx_data.o
132obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common) \ 129obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common)
133 clockdomain44xx.o \ 130obj-$(CONFIG_ARCH_OMAP4) += clockdomain44xx.o
134 clockdomains44xx_data.o 131obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o
135 132
136# Clock framework 133# Clock framework
137obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \ 134obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o
138 clkt2xxx_sys.o \ 135obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_sys.o
139 clkt2xxx_dpllcore.o \ 136obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpllcore.o
140 clkt2xxx_virt_prcm_set.o \ 137obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_virt_prcm_set.o
141 clkt2xxx_apll.o clkt2xxx_osc.o \ 138obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o clkt2xxx_osc.o
142 clkt2xxx_dpll.o clkt_iclk.o 139obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpll.o clkt_iclk.o
143obj-$(CONFIG_SOC_OMAP2420) += clock2420_data.o 140obj-$(CONFIG_SOC_OMAP2420) += clock2420_data.o
144obj-$(CONFIG_SOC_OMAP2430) += clock2430.o clock2430_data.o 141obj-$(CONFIG_SOC_OMAP2430) += clock2430.o clock2430_data.o
145obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ 142obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o
146 clock34xx.o clkt34xx_dpll3m2.o \ 143obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clkt34xx_dpll3m2.o
147 clock3517.o clock36xx.o \ 144obj-$(CONFIG_ARCH_OMAP3) += clock3517.o clock36xx.o
148 dpll3xxx.o clock3xxx_data.o \ 145obj-$(CONFIG_ARCH_OMAP3) += dpll3xxx.o clock3xxx_data.o
149 clkt_iclk.o 146obj-$(CONFIG_ARCH_OMAP3) += clkt_iclk.o
150obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ 147obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o
151 dpll3xxx.o dpll44xx.o 148obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o
152 149
153# OMAP2 clock rate set data (old "OPP" data) 150# OMAP2 clock rate set data (old "OPP" data)
154obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o 151obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
155obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o 152obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o
156 153
157# hwmod data 154# hwmod data
158obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o \ 155obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o
159 omap_hwmod_2xxx_3xxx_ipblock_data.o \ 156obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o
160 omap_hwmod_2xxx_interconnect_data.o \ 157obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o
161 omap_hwmod_2xxx_3xxx_interconnect_data.o \ 158obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_interconnect_data.o
162 omap_hwmod_2420_data.o 159obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2420_data.o
163obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_ipblock_data.o \ 160obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_ipblock_data.o
164 omap_hwmod_2xxx_3xxx_ipblock_data.o \ 161obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_3xxx_ipblock_data.o
165 omap_hwmod_2xxx_interconnect_data.o \ 162obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_interconnect_data.o
166 omap_hwmod_2xxx_3xxx_interconnect_data.o \ 163obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_3xxx_interconnect_data.o
167 omap_hwmod_2430_data.o 164obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o
168obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o \ 165obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o
169 omap_hwmod_2xxx_3xxx_interconnect_data.o \ 166obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_interconnect_data.o
170 omap_hwmod_3xxx_data.o 167obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o
171obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o 168obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o
172 169
173# EMU peripherals 170# EMU peripherals
@@ -208,23 +205,19 @@ obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o
208obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o 205obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o
209obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o 206obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o
210obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o 207obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
211obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o \ 208obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o sdram-nokia.o
212 sdram-nokia.o 209obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o sdram-nokia.o
213obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ 210obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o
214 sdram-nokia.o \ 211obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-video.o
215 board-rx51-peripherals.o \ 212obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom.o board-zoom-peripherals.o
216 board-rx51-video.o 213obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom-display.o
217obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom.o \ 214obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom-debugboard.o
218 board-zoom-peripherals.o \ 215obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom.o board-zoom-peripherals.o
219 board-zoom-display.o \ 216obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom-display.o
220 board-zoom-debugboard.o 217obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom-debugboard.o
221obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom.o \ 218obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o
222 board-zoom-peripherals.o \ 219obj-$(CONFIG_MACH_OMAP_3630SDP) += board-zoom-peripherals.o
223 board-zoom-display.o \ 220obj-$(CONFIG_MACH_OMAP_3630SDP) += board-zoom-display.o
224 board-zoom-debugboard.o
225obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \
226 board-zoom-peripherals.o \
227 board-zoom-display.o
228obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o 221obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o
229obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o 222obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o
230obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o 223obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index e658f835d0de..99ca6bad5c30 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -303,6 +303,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
303 .init_irq = omap2_init_irq, 303 .init_irq = omap2_init_irq,
304 .handle_irq = omap2_intc_handle_irq, 304 .handle_irq = omap2_intc_handle_irq,
305 .init_machine = omap_2430sdp_init, 305 .init_machine = omap_2430sdp_init,
306 .init_late = omap2430_init_late,
306 .timer = &omap2_timer, 307 .timer = &omap2_timer,
307 .restart = omap_prcm_restart, 308 .restart = omap_prcm_restart,
308MACHINE_END 309MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 37abb0d49b51..a98c688058a9 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -605,6 +605,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
605 .init_irq = omap3_init_irq, 605 .init_irq = omap3_init_irq,
606 .handle_irq = omap3_intc_handle_irq, 606 .handle_irq = omap3_intc_handle_irq,
607 .init_machine = omap_3430sdp_init, 607 .init_machine = omap_3430sdp_init,
608 .init_late = omap3430_init_late,
608 .timer = &omap3_timer, 609 .timer = &omap3_timer,
609 .restart = omap_prcm_restart, 610 .restart = omap_prcm_restart,
610MACHINE_END 611MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 6ef350d1ae4f..2dc9ba523c7a 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -217,6 +217,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
217 .init_irq = omap3_init_irq, 217 .init_irq = omap3_init_irq,
218 .handle_irq = omap3_intc_handle_irq, 218 .handle_irq = omap3_intc_handle_irq,
219 .init_machine = omap_sdp_init, 219 .init_machine = omap_sdp_init,
220 .init_late = omap3630_init_late,
220 .timer = &omap3_timer, 221 .timer = &omap3_timer,
221 .restart = omap_prcm_restart, 222 .restart = omap_prcm_restart,
222MACHINE_END 223MACHINE_END
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 94af6cde2e36..8e17284a803f 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -912,6 +912,7 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
912 .init_irq = gic_init_irq, 912 .init_irq = gic_init_irq,
913 .handle_irq = gic_handle_irq, 913 .handle_irq = gic_handle_irq,
914 .init_machine = omap_4430sdp_init, 914 .init_machine = omap_4430sdp_init,
915 .init_late = omap4430_init_late,
915 .timer = &omap4_timer, 916 .timer = &omap4_timer,
916 .restart = omap_prcm_restart, 917 .restart = omap_prcm_restart,
917MACHINE_END 918MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 3b8a53c1f2a8..92432c28673d 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -102,6 +102,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
102 .init_irq = omap3_init_irq, 102 .init_irq = omap3_init_irq,
103 .handle_irq = omap3_intc_handle_irq, 103 .handle_irq = omap3_intc_handle_irq,
104 .init_machine = am3517_crane_init, 104 .init_machine = am3517_crane_init,
105 .init_late = am35xx_init_late,
105 .timer = &omap3_timer, 106 .timer = &omap3_timer,
106 .restart = omap_prcm_restart, 107 .restart = omap_prcm_restart,
107MACHINE_END 108MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 99790eb646e8..18f601096ce1 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -385,6 +385,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
385 .init_irq = omap3_init_irq, 385 .init_irq = omap3_init_irq,
386 .handle_irq = omap3_intc_handle_irq, 386 .handle_irq = omap3_intc_handle_irq,
387 .init_machine = am3517_evm_init, 387 .init_machine = am3517_evm_init,
388 .init_late = am35xx_init_late,
388 .timer = &omap3_timer, 389 .timer = &omap3_timer,
389 .restart = omap_prcm_restart, 390 .restart = omap_prcm_restart,
390MACHINE_END 391MACHINE_END
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 768ece2e9c3b..502c31e123be 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -356,6 +356,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
356 .init_irq = omap2_init_irq, 356 .init_irq = omap2_init_irq,
357 .handle_irq = omap2_intc_handle_irq, 357 .handle_irq = omap2_intc_handle_irq,
358 .init_machine = omap_apollon_init, 358 .init_machine = omap_apollon_init,
359 .init_late = omap2420_init_late,
359 .timer = &omap2_timer, 360 .timer = &omap2_timer,
360 .restart = omap_prcm_restart, 361 .restart = omap_prcm_restart,
361MACHINE_END 362MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index c03df142ea67..ded100c80a91 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -669,6 +669,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
669 .init_irq = omap3_init_irq, 669 .init_irq = omap3_init_irq,
670 .handle_irq = omap3_intc_handle_irq, 670 .handle_irq = omap3_intc_handle_irq,
671 .init_machine = cm_t35_init, 671 .init_machine = cm_t35_init,
672 .init_late = omap35xx_init_late,
672 .timer = &omap3_timer, 673 .timer = &omap3_timer,
673 .restart = omap_prcm_restart, 674 .restart = omap_prcm_restart,
674MACHINE_END 675MACHINE_END
@@ -681,6 +682,7 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730")
681 .init_irq = omap3_init_irq, 682 .init_irq = omap3_init_irq,
682 .handle_irq = omap3_intc_handle_irq, 683 .handle_irq = omap3_intc_handle_irq,
683 .init_machine = cm_t3730_init, 684 .init_machine = cm_t3730_init,
685 .init_late = omap3630_init_late,
684 .timer = &omap3_timer, 686 .timer = &omap3_timer,
685 .restart = omap_prcm_restart, 687 .restart = omap_prcm_restart,
686MACHINE_END 688MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 9e66e167e4f3..a33ad4641d9a 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -303,6 +303,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
303 .init_irq = omap3_init_irq, 303 .init_irq = omap3_init_irq,
304 .handle_irq = omap3_intc_handle_irq, 304 .handle_irq = omap3_intc_handle_irq,
305 .init_machine = cm_t3517_init, 305 .init_machine = cm_t3517_init,
306 .init_late = am35xx_init_late,
306 .timer = &omap3_timer, 307 .timer = &omap3_timer,
307 .restart = omap_prcm_restart, 308 .restart = omap_prcm_restart,
308MACHINE_END 309MACHINE_END
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index b063f0d2faa6..6567c1cd5572 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -644,6 +644,7 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
644 .init_irq = omap3_init_irq, 644 .init_irq = omap3_init_irq,
645 .handle_irq = omap3_intc_handle_irq, 645 .handle_irq = omap3_intc_handle_irq,
646 .init_machine = devkit8000_init, 646 .init_machine = devkit8000_init,
647 .init_late = omap35xx_init_late,
647 .timer = &omap3_secure_timer, 648 .timer = &omap3_secure_timer,
648 .restart = omap_prcm_restart, 649 .restart = omap_prcm_restart,
649MACHINE_END 650MACHINE_END
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 7302ba7ff1b9..202934657867 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -125,6 +125,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
125 .init_irq = omap_init_irq, 125 .init_irq = omap_init_irq,
126 .handle_irq = gic_handle_irq, 126 .handle_irq = gic_handle_irq,
127 .init_machine = omap_generic_init, 127 .init_machine = omap_generic_init,
128 .init_late = omap4430_init_late,
128 .timer = &omap4_timer, 129 .timer = &omap4_timer,
129 .dt_compat = omap4_boards_compat, 130 .dt_compat = omap4_boards_compat,
130 .restart = omap_prcm_restart, 131 .restart = omap_prcm_restart,
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 0bbbabe28fcc..876becf8205a 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -398,6 +398,7 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
398 .init_irq = omap2_init_irq, 398 .init_irq = omap2_init_irq,
399 .handle_irq = omap2_intc_handle_irq, 399 .handle_irq = omap2_intc_handle_irq,
400 .init_machine = omap_h4_init, 400 .init_machine = omap_h4_init,
401 .init_late = omap2420_init_late,
401 .timer = &omap2_timer, 402 .timer = &omap2_timer,
402 .restart = omap_prcm_restart, 403 .restart = omap_prcm_restart,
403MACHINE_END 404MACHINE_END
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 7a274098f67b..74915295482e 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -650,6 +650,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
650 .init_irq = omap3_init_irq, 650 .init_irq = omap3_init_irq,
651 .handle_irq = omap3_intc_handle_irq, 651 .handle_irq = omap3_intc_handle_irq,
652 .init_machine = igep_init, 652 .init_machine = igep_init,
653 .init_late = omap35xx_init_late,
653 .timer = &omap3_timer, 654 .timer = &omap3_timer,
654 .restart = omap_prcm_restart, 655 .restart = omap_prcm_restart,
655MACHINE_END 656MACHINE_END
@@ -662,6 +663,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
662 .init_irq = omap3_init_irq, 663 .init_irq = omap3_init_irq,
663 .handle_irq = omap3_intc_handle_irq, 664 .handle_irq = omap3_intc_handle_irq,
664 .init_machine = igep_init, 665 .init_machine = igep_init,
666 .init_late = omap35xx_init_late,
665 .timer = &omap3_timer, 667 .timer = &omap3_timer,
666 .restart = omap_prcm_restart, 668 .restart = omap_prcm_restart,
667MACHINE_END 669MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 1b6049567ab4..ef9e82977499 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -442,6 +442,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
442 .init_irq = omap3_init_irq, 442 .init_irq = omap3_init_irq,
443 .handle_irq = omap3_intc_handle_irq, 443 .handle_irq = omap3_intc_handle_irq,
444 .init_machine = omap_ldp_init, 444 .init_machine = omap_ldp_init,
445 .init_late = omap3430_init_late,
445 .timer = &omap3_timer, 446 .timer = &omap3_timer,
446 .restart = omap_prcm_restart, 447 .restart = omap_prcm_restart,
447MACHINE_END 448MACHINE_END
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 518091c5f77c..8ca14e88a31a 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -694,6 +694,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
694 .init_irq = omap2_init_irq, 694 .init_irq = omap2_init_irq,
695 .handle_irq = omap2_intc_handle_irq, 695 .handle_irq = omap2_intc_handle_irq,
696 .init_machine = n8x0_init_machine, 696 .init_machine = n8x0_init_machine,
697 .init_late = omap2420_init_late,
697 .timer = &omap2_timer, 698 .timer = &omap2_timer,
698 .restart = omap_prcm_restart, 699 .restart = omap_prcm_restart,
699MACHINE_END 700MACHINE_END
@@ -706,6 +707,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
706 .init_irq = omap2_init_irq, 707 .init_irq = omap2_init_irq,
707 .handle_irq = omap2_intc_handle_irq, 708 .handle_irq = omap2_intc_handle_irq,
708 .init_machine = n8x0_init_machine, 709 .init_machine = n8x0_init_machine,
710 .init_late = omap2420_init_late,
709 .timer = &omap2_timer, 711 .timer = &omap2_timer,
710 .restart = omap_prcm_restart, 712 .restart = omap_prcm_restart,
711MACHINE_END 713MACHINE_END
@@ -718,6 +720,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
718 .init_irq = omap2_init_irq, 720 .init_irq = omap2_init_irq,
719 .handle_irq = omap2_intc_handle_irq, 721 .handle_irq = omap2_intc_handle_irq,
720 .init_machine = n8x0_init_machine, 722 .init_machine = n8x0_init_machine,
723 .init_late = omap2420_init_late,
721 .timer = &omap2_timer, 724 .timer = &omap2_timer,
722 .restart = omap_prcm_restart, 725 .restart = omap_prcm_restart,
723MACHINE_END 726MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 2a7b9a9da1db..79c6909eeb78 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -543,6 +543,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
543 .init_irq = omap3_init_irq, 543 .init_irq = omap3_init_irq,
544 .handle_irq = omap3_intc_handle_irq, 544 .handle_irq = omap3_intc_handle_irq,
545 .init_machine = omap3_beagle_init, 545 .init_machine = omap3_beagle_init,
546 .init_late = omap3_init_late,
546 .timer = &omap3_secure_timer, 547 .timer = &omap3_secure_timer,
547 .restart = omap_prcm_restart, 548 .restart = omap_prcm_restart,
548MACHINE_END 549MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index ace3c675e9c2..639bd07ea38a 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -671,6 +671,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
671 .init_irq = omap3_init_irq, 671 .init_irq = omap3_init_irq,
672 .handle_irq = omap3_intc_handle_irq, 672 .handle_irq = omap3_intc_handle_irq,
673 .init_machine = omap3_evm_init, 673 .init_machine = omap3_evm_init,
674 .init_late = omap35xx_init_late,
674 .timer = &omap3_timer, 675 .timer = &omap3_timer,
675 .restart = omap_prcm_restart, 676 .restart = omap_prcm_restart,
676MACHINE_END 677MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index c008bf8e1c36..932e1778aff9 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -242,6 +242,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
242 .init_irq = omap3_init_irq, 242 .init_irq = omap3_init_irq,
243 .handle_irq = omap3_intc_handle_irq, 243 .handle_irq = omap3_intc_handle_irq,
244 .init_machine = omap3logic_init, 244 .init_machine = omap3logic_init,
245 .init_late = omap35xx_init_late,
245 .timer = &omap3_timer, 246 .timer = &omap3_timer,
246 .restart = omap_prcm_restart, 247 .restart = omap_prcm_restart,
247MACHINE_END 248MACHINE_END
@@ -254,6 +255,7 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
254 .init_irq = omap3_init_irq, 255 .init_irq = omap3_init_irq,
255 .handle_irq = omap3_intc_handle_irq, 256 .handle_irq = omap3_intc_handle_irq,
256 .init_machine = omap3logic_init, 257 .init_machine = omap3logic_init,
258 .init_late = omap35xx_init_late,
257 .timer = &omap3_timer, 259 .timer = &omap3_timer,
258 .restart = omap_prcm_restart, 260 .restart = omap_prcm_restart,
259MACHINE_END 261MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 33d995d0f075..57aebee44fd0 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -622,6 +622,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
622 .init_irq = omap3_init_irq, 622 .init_irq = omap3_init_irq,
623 .handle_irq = omap3_intc_handle_irq, 623 .handle_irq = omap3_intc_handle_irq,
624 .init_machine = omap3pandora_init, 624 .init_machine = omap3pandora_init,
625 .init_late = omap35xx_init_late,
625 .timer = &omap3_timer, 626 .timer = &omap3_timer,
626 .restart = omap_prcm_restart, 627 .restart = omap_prcm_restart,
627MACHINE_END 628MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 4396bae91677..b318f5602e36 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -436,6 +436,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
436 .init_irq = omap3_init_irq, 436 .init_irq = omap3_init_irq,
437 .handle_irq = omap3_intc_handle_irq, 437 .handle_irq = omap3_intc_handle_irq,
438 .init_machine = omap3_stalker_init, 438 .init_machine = omap3_stalker_init,
439 .init_late = omap35xx_init_late,
439 .timer = &omap3_secure_timer, 440 .timer = &omap3_secure_timer,
440 .restart = omap_prcm_restart, 441 .restart = omap_prcm_restart,
441MACHINE_END 442MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index ae2251fa4a69..485d14d6a8cd 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -387,6 +387,7 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
387 .init_irq = omap3_init_irq, 387 .init_irq = omap3_init_irq,
388 .handle_irq = omap3_intc_handle_irq, 388 .handle_irq = omap3_intc_handle_irq,
389 .init_machine = omap3_touchbook_init, 389 .init_machine = omap3_touchbook_init,
390 .init_late = omap3430_init_late,
390 .timer = &omap3_secure_timer, 391 .timer = &omap3_secure_timer,
391 .restart = omap_prcm_restart, 392 .restart = omap_prcm_restart,
392MACHINE_END 393MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 68b8fc9ff010..982fb2622ab8 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -521,6 +521,7 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
521 .init_irq = gic_init_irq, 521 .init_irq = gic_init_irq,
522 .handle_irq = gic_handle_irq, 522 .handle_irq = gic_handle_irq,
523 .init_machine = omap4_panda_init, 523 .init_machine = omap4_panda_init,
524 .init_late = omap4430_init_late,
524 .timer = &omap4_timer, 525 .timer = &omap4_timer,
525 .restart = omap_prcm_restart, 526 .restart = omap_prcm_restart,
526MACHINE_END 527MACHINE_END
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 5527c1979a16..8fa2fc3a4c3c 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -554,6 +554,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
554 .init_irq = omap3_init_irq, 554 .init_irq = omap3_init_irq,
555 .handle_irq = omap3_intc_handle_irq, 555 .handle_irq = omap3_intc_handle_irq,
556 .init_machine = overo_init, 556 .init_machine = overo_init,
557 .init_late = omap35xx_init_late,
557 .timer = &omap3_timer, 558 .timer = &omap3_timer,
558 .restart = omap_prcm_restart, 559 .restart = omap_prcm_restart,
559MACHINE_END 560MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index ae53d71f0ce0..0ad1bb3bdb98 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -151,6 +151,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
151 .init_irq = omap3_init_irq, 151 .init_irq = omap3_init_irq,
152 .handle_irq = omap3_intc_handle_irq, 152 .handle_irq = omap3_intc_handle_irq,
153 .init_machine = rm680_init, 153 .init_machine = rm680_init,
154 .init_late = omap3630_init_late,
154 .timer = &omap3_timer, 155 .timer = &omap3_timer,
155 .restart = omap_prcm_restart, 156 .restart = omap_prcm_restart,
156MACHINE_END 157MACHINE_END
@@ -163,6 +164,7 @@ MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
163 .init_irq = omap3_init_irq, 164 .init_irq = omap3_init_irq,
164 .handle_irq = omap3_intc_handle_irq, 165 .handle_irq = omap3_intc_handle_irq,
165 .init_machine = rm680_init, 166 .init_machine = rm680_init,
167 .init_late = omap3630_init_late,
166 .timer = &omap3_timer, 168 .timer = &omap3_timer,
167 .restart = omap_prcm_restart, 169 .restart = omap_prcm_restart,
168MACHINE_END 170MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 2da92a6ba40a..345dd931f76f 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -127,6 +127,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
127 .init_irq = omap3_init_irq, 127 .init_irq = omap3_init_irq,
128 .handle_irq = omap3_intc_handle_irq, 128 .handle_irq = omap3_intc_handle_irq,
129 .init_machine = rx51_init, 129 .init_machine = rx51_init,
130 .init_late = omap3430_init_late,
130 .timer = &omap3_timer, 131 .timer = &omap3_timer,
131 .restart = omap_prcm_restart, 132 .restart = omap_prcm_restart,
132MACHINE_END 133MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index ab9a7a9e9d64..d4c8392cadb6 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -52,6 +52,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
52 .init_irq = ti81xx_init_irq, 52 .init_irq = ti81xx_init_irq,
53 .timer = &omap3_timer, 53 .timer = &omap3_timer,
54 .init_machine = ti81xx_evm_init, 54 .init_machine = ti81xx_evm_init,
55 .init_late = ti81xx_init_late,
55 .restart = omap_prcm_restart, 56 .restart = omap_prcm_restart,
56MACHINE_END 57MACHINE_END
57 58
@@ -63,5 +64,6 @@ MACHINE_START(TI8148EVM, "ti8148evm")
63 .init_irq = ti81xx_init_irq, 64 .init_irq = ti81xx_init_irq,
64 .timer = &omap3_timer, 65 .timer = &omap3_timer,
65 .init_machine = ti81xx_evm_init, 66 .init_machine = ti81xx_evm_init,
67 .init_late = ti81xx_init_late,
66 .restart = omap_prcm_restart, 68 .restart = omap_prcm_restart,
67MACHINE_END 69MACHINE_END
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 5c20bcc57f2b..4e7e56142e6f 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -137,6 +137,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
137 .init_irq = omap3_init_irq, 137 .init_irq = omap3_init_irq,
138 .handle_irq = omap3_intc_handle_irq, 138 .handle_irq = omap3_intc_handle_irq,
139 .init_machine = omap_zoom_init, 139 .init_machine = omap_zoom_init,
140 .init_late = omap3430_init_late,
140 .timer = &omap3_timer, 141 .timer = &omap3_timer,
141 .restart = omap_prcm_restart, 142 .restart = omap_prcm_restart,
142MACHINE_END 143MACHINE_END
@@ -149,6 +150,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
149 .init_irq = omap3_init_irq, 150 .init_irq = omap3_init_irq,
150 .handle_irq = omap3_intc_handle_irq, 151 .handle_irq = omap3_intc_handle_irq,
151 .init_machine = omap_zoom_init, 152 .init_machine = omap_zoom_init,
153 .init_late = omap3630_init_late,
152 .timer = &omap3_timer, 154 .timer = &omap3_timer,
153 .restart = omap_prcm_restart, 155 .restart = omap_prcm_restart,
154MACHINE_END 156MACHINE_END
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index d6c9e6180318..be9dfd1abe60 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -55,7 +55,7 @@ static inline void omap34xx_map_common_io(void)
55} 55}
56#endif 56#endif
57 57
58#ifdef CONFIG_SOC_OMAPTI81XX 58#ifdef CONFIG_SOC_TI81XX
59extern void omapti81xx_map_common_io(void); 59extern void omapti81xx_map_common_io(void);
60#else 60#else
61static inline void omapti81xx_map_common_io(void) 61static inline void omapti81xx_map_common_io(void)
@@ -63,7 +63,7 @@ static inline void omapti81xx_map_common_io(void)
63} 63}
64#endif 64#endif
65 65
66#ifdef CONFIG_SOC_OMAPAM33XX 66#ifdef CONFIG_SOC_AM33XX
67extern void omapam33xx_map_common_io(void); 67extern void omapam33xx_map_common_io(void);
68#else 68#else
69static inline void omapam33xx_map_common_io(void) 69static inline void omapam33xx_map_common_io(void)
@@ -79,6 +79,42 @@ static inline void omap44xx_map_common_io(void)
79} 79}
80#endif 80#endif
81 81
82#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2)
83int omap2_pm_init(void);
84#else
85static inline int omap2_pm_init(void)
86{
87 return 0;
88}
89#endif
90
91#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
92int omap3_pm_init(void);
93#else
94static inline int omap3_pm_init(void)
95{
96 return 0;
97}
98#endif
99
100#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4)
101int omap4_pm_init(void);
102#else
103static inline int omap4_pm_init(void)
104{
105 return 0;
106}
107#endif
108
109#ifdef CONFIG_OMAP_MUX
110int omap_mux_late_init(void);
111#else
112static inline int omap_mux_late_init(void)
113{
114 return 0;
115}
116#endif
117
82extern void omap2_init_common_infrastructure(void); 118extern void omap2_init_common_infrastructure(void);
83 119
84extern struct sys_timer omap2_timer; 120extern struct sys_timer omap2_timer;
@@ -95,6 +131,17 @@ void omap3_init_early(void); /* Do not use this one */
95void am35xx_init_early(void); 131void am35xx_init_early(void);
96void ti81xx_init_early(void); 132void ti81xx_init_early(void);
97void omap4430_init_early(void); 133void omap4430_init_early(void);
134void omap3_init_late(void); /* Do not use this one */
135void omap4430_init_late(void);
136void omap2420_init_late(void);
137void omap2430_init_late(void);
138void omap3430_init_late(void);
139void omap35xx_init_late(void);
140void omap3630_init_late(void);
141void am35xx_init_late(void);
142void ti81xx_init_late(void);
143void omap4430_init_late(void);
144int omap2_common_pm_late_init(void);
98void omap_prcm_restart(char, const char *); 145void omap_prcm_restart(char, const char *);
99 146
100/* 147/*
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index ae62ece04ef9..7b4b9327e543 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -645,7 +645,11 @@ static inline void omap242x_mmc_mux(struct omap_mmc_platform_data
645 645
646void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) 646void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
647{ 647{
648 char *name = "mmci-omap"; 648 struct platform_device *pdev;
649 struct omap_hwmod *oh;
650 int id = 0;
651 char *oh_name = "msdi1";
652 char *dev_name = "mmci-omap";
649 653
650 if (!mmc_data[0]) { 654 if (!mmc_data[0]) {
651 pr_err("%s fails: Incomplete platform data\n", __func__); 655 pr_err("%s fails: Incomplete platform data\n", __func__);
@@ -653,8 +657,17 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
653 } 657 }
654 658
655 omap242x_mmc_mux(mmc_data[0]); 659 omap242x_mmc_mux(mmc_data[0]);
656 omap_mmc_add(name, 0, OMAP2_MMC1_BASE, OMAP2420_MMC_SIZE, 660
657 INT_24XX_MMC_IRQ, mmc_data[0]); 661 oh = omap_hwmod_lookup(oh_name);
662 if (!oh) {
663 pr_err("Could not look up %s\n", oh_name);
664 return;
665 }
666 pdev = omap_device_build(dev_name, id, oh, mmc_data[0],
667 sizeof(struct omap_mmc_platform_data), NULL, 0, 0);
668 if (IS_ERR(pdev))
669 WARN(1, "Can'd build omap_device for %s:%s.\n",
670 dev_name, oh->name);
658} 671}
659 672
660#endif 673#endif
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index b19d8496c16e..ff75abe60af2 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -227,10 +227,6 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
227 227
228 dma_stride = OMAP2_DMA_STRIDE; 228 dma_stride = OMAP2_DMA_STRIDE;
229 dma_common_ch_start = CSDP; 229 dma_common_ch_start = CSDP;
230 if (cpu_is_omap3630() || cpu_is_omap44xx())
231 dma_common_ch_end = CCDN;
232 else
233 dma_common_ch_end = CCFN;
234 230
235 p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL); 231 p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL);
236 if (!p) { 232 if (!p) {
@@ -277,6 +273,13 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
277 dev_err(&pdev->dev, "%s: kzalloc fail\n", __func__); 273 dev_err(&pdev->dev, "%s: kzalloc fail\n", __func__);
278 return -ENOMEM; 274 return -ENOMEM;
279 } 275 }
276
277 /* Check the capabilities register for descriptor loading feature */
278 if (dma_read(CAPS_0, 0) & DMA_HAS_DESCRIPTOR_CAPS)
279 dma_common_ch_end = CCDN;
280 else
281 dma_common_ch_end = CCFN;
282
280 return 0; 283 return 0;
281} 284}
282 285
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c
index 3376388b317a..845309f146fe 100644
--- a/arch/arm/mach-omap2/dsp.c
+++ b/arch/arm/mach-omap2/dsp.c
@@ -28,8 +28,6 @@
28 28
29#include <plat/dsp.h> 29#include <plat/dsp.h>
30 30
31extern phys_addr_t omap_dsp_get_mempool_base(void);
32
33static struct platform_device *omap_dsp_pdev; 31static struct platform_device *omap_dsp_pdev;
34 32
35static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { 33static struct omap_dsp_platform_data omap_dsp_pdata __initdata = {
@@ -47,6 +45,31 @@ static struct omap_dsp_platform_data omap_dsp_pdata __initdata = {
47 .dsp_cm_rmw_bits = omap2_cm_rmw_mod_reg_bits, 45 .dsp_cm_rmw_bits = omap2_cm_rmw_mod_reg_bits,
48}; 46};
49 47
48static phys_addr_t omap_dsp_phys_mempool_base;
49
50void __init omap_dsp_reserve_sdram_memblock(void)
51{
52 phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE;
53 phys_addr_t paddr;
54
55 if (!size)
56 return;
57
58 paddr = arm_memblock_steal(size, SZ_1M);
59 if (!paddr) {
60 pr_err("%s: failed to reserve %llx bytes\n",
61 __func__, (unsigned long long)size);
62 return;
63 }
64
65 omap_dsp_phys_mempool_base = paddr;
66}
67
68static phys_addr_t omap_dsp_get_mempool_base(void)
69{
70 return omap_dsp_phys_mempool_base;
71}
72
50static int __init omap_dsp_init(void) 73static int __init omap_dsp_init(void)
51{ 74{
52 struct platform_device *pdev; 75 struct platform_device *pdev;
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 580e684e8825..46b09dae770e 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -50,6 +50,19 @@
50#define GPMC_ECC_SIZE_CONFIG 0x1fc 50#define GPMC_ECC_SIZE_CONFIG 0x1fc
51#define GPMC_ECC1_RESULT 0x200 51#define GPMC_ECC1_RESULT 0x200
52 52
53/* GPMC ECC control settings */
54#define GPMC_ECC_CTRL_ECCCLEAR 0x100
55#define GPMC_ECC_CTRL_ECCDISABLE 0x000
56#define GPMC_ECC_CTRL_ECCREG1 0x001
57#define GPMC_ECC_CTRL_ECCREG2 0x002
58#define GPMC_ECC_CTRL_ECCREG3 0x003
59#define GPMC_ECC_CTRL_ECCREG4 0x004
60#define GPMC_ECC_CTRL_ECCREG5 0x005
61#define GPMC_ECC_CTRL_ECCREG6 0x006
62#define GPMC_ECC_CTRL_ECCREG7 0x007
63#define GPMC_ECC_CTRL_ECCREG8 0x008
64#define GPMC_ECC_CTRL_ECCREG9 0x009
65
53#define GPMC_CS0_OFFSET 0x60 66#define GPMC_CS0_OFFSET 0x60
54#define GPMC_CS_SIZE 0x30 67#define GPMC_CS_SIZE 0x30
55 68
@@ -860,8 +873,9 @@ int gpmc_enable_hwecc(int cs, int mode, int dev_width, int ecc_size)
860 gpmc_ecc_used = cs; 873 gpmc_ecc_used = cs;
861 874
862 /* clear ecc and enable bits */ 875 /* clear ecc and enable bits */
863 val = ((0x00000001<<8) | 0x00000001); 876 gpmc_write_reg(GPMC_ECC_CONTROL,
864 gpmc_write_reg(GPMC_ECC_CONTROL, val); 877 GPMC_ECC_CTRL_ECCCLEAR |
878 GPMC_ECC_CTRL_ECCREG1);
865 879
866 /* program ecc and result sizes */ 880 /* program ecc and result sizes */
867 val = ((((ecc_size >> 1) - 1) << 22) | (0x0000000F)); 881 val = ((((ecc_size >> 1) - 1) << 22) | (0x0000000F));
@@ -869,13 +883,15 @@ int gpmc_enable_hwecc(int cs, int mode, int dev_width, int ecc_size)
869 883
870 switch (mode) { 884 switch (mode) {
871 case GPMC_ECC_READ: 885 case GPMC_ECC_READ:
872 gpmc_write_reg(GPMC_ECC_CONTROL, 0x101); 886 case GPMC_ECC_WRITE:
887 gpmc_write_reg(GPMC_ECC_CONTROL,
888 GPMC_ECC_CTRL_ECCCLEAR |
889 GPMC_ECC_CTRL_ECCREG1);
873 break; 890 break;
874 case GPMC_ECC_READSYN: 891 case GPMC_ECC_READSYN:
875 gpmc_write_reg(GPMC_ECC_CONTROL, 0x100); 892 gpmc_write_reg(GPMC_ECC_CONTROL,
876 break; 893 GPMC_ECC_CTRL_ECCCLEAR |
877 case GPMC_ECC_WRITE: 894 GPMC_ECC_CTRL_ECCDISABLE);
878 gpmc_write_reg(GPMC_ECC_CONTROL, 0x101);
879 break; 895 break;
880 default: 896 default:
881 printk(KERN_INFO "Error: Unrecognized Mode[%d]!\n", mode); 897 printk(KERN_INFO "Error: Unrecognized Mode[%d]!\n", mode);
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index b0268eaffe13..be697d4e0843 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -355,7 +355,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
355 * 355 *
356 * temporary HACK: ocr_mask instead of fixed supply 356 * temporary HACK: ocr_mask instead of fixed supply
357 */ 357 */
358 if (cpu_is_omap3505() || cpu_is_omap3517()) 358 if (soc_is_am35xx())
359 mmc->slots[0].ocr_mask = MMC_VDD_165_195 | 359 mmc->slots[0].ocr_mask = MMC_VDD_165_195 |
360 MMC_VDD_26_27 | 360 MMC_VDD_26_27 |
361 MMC_VDD_27_28 | 361 MMC_VDD_27_28 |
@@ -365,7 +365,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
365 else 365 else
366 mmc->slots[0].ocr_mask = c->ocr_mask; 366 mmc->slots[0].ocr_mask = c->ocr_mask;
367 367
368 if (!cpu_is_omap3517() && !cpu_is_omap3505()) 368 if (!soc_is_am35xx())
369 mmc->slots[0].features |= HSMMC_HAS_PBIAS; 369 mmc->slots[0].features |= HSMMC_HAS_PBIAS;
370 370
371 if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) 371 if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
@@ -388,7 +388,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
388 } 388 }
389 } 389 }
390 390
391 if (cpu_is_omap3517() || cpu_is_omap3505()) 391 if (soc_is_am35xx())
392 mmc->slots[0].set_power = nop_mmc_set_power; 392 mmc->slots[0].set_power = nop_mmc_set_power;
393 393
394 /* OMAP3630 HSMMC1 supports only 4-bit */ 394 /* OMAP3630 HSMMC1 supports only 4-bit */
@@ -400,7 +400,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
400 } 400 }
401 break; 401 break;
402 case 2: 402 case 2:
403 if (cpu_is_omap3517() || cpu_is_omap3505()) 403 if (soc_is_am35xx())
404 mmc->slots[0].set_power = am35x_hsmmc2_set_power; 404 mmc->slots[0].set_power = am35x_hsmmc2_set_power;
405 405
406 if (c->ext_clock) 406 if (c->ext_clock)
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index f1398171d8a2..0389b3264abe 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -185,8 +185,7 @@ static void __init omap3_cpuinfo(void)
185 */ 185 */
186 if (cpu_is_omap3630()) { 186 if (cpu_is_omap3630()) {
187 cpu_name = "OMAP3630"; 187 cpu_name = "OMAP3630";
188 } else if (cpu_is_omap3517()) { 188 } else if (soc_is_am35xx()) {
189 /* AM35xx devices */
190 cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505"; 189 cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
191 } else if (cpu_is_ti816x()) { 190 } else if (cpu_is_ti816x()) {
192 cpu_name = "TI816X"; 191 cpu_name = "TI816X";
@@ -352,13 +351,13 @@ void __init omap3xxx_check_revision(void)
352 */ 351 */
353 switch (rev) { 352 switch (rev) {
354 case 0: 353 case 0:
355 omap_revision = OMAP3517_REV_ES1_0; 354 omap_revision = AM35XX_REV_ES1_0;
356 cpu_rev = "1.0"; 355 cpu_rev = "1.0";
357 break; 356 break;
358 case 1: 357 case 1:
359 /* FALLTHROUGH */ 358 /* FALLTHROUGH */
360 default: 359 default:
361 omap_revision = OMAP3517_REV_ES1_1; 360 omap_revision = AM35XX_REV_ES1_1;
362 cpu_rev = "1.1"; 361 cpu_rev = "1.1";
363 } 362 }
364 break; 363 break;
diff --git a/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h b/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h
index d79321b0f2a2..548de90b58c2 100644
--- a/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h
+++ b/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h
@@ -16,18 +16,10 @@
16#define OMAP_WKG_ENB_B_0 0x14 16#define OMAP_WKG_ENB_B_0 0x14
17#define OMAP_WKG_ENB_C_0 0x18 17#define OMAP_WKG_ENB_C_0 0x18
18#define OMAP_WKG_ENB_D_0 0x1c 18#define OMAP_WKG_ENB_D_0 0x1c
19#define OMAP_WKG_ENB_SECURE_A_0 0x20
20#define OMAP_WKG_ENB_SECURE_B_0 0x24
21#define OMAP_WKG_ENB_SECURE_C_0 0x28
22#define OMAP_WKG_ENB_SECURE_D_0 0x2c
23#define OMAP_WKG_ENB_A_1 0x410 19#define OMAP_WKG_ENB_A_1 0x410
24#define OMAP_WKG_ENB_B_1 0x414 20#define OMAP_WKG_ENB_B_1 0x414
25#define OMAP_WKG_ENB_C_1 0x418 21#define OMAP_WKG_ENB_C_1 0x418
26#define OMAP_WKG_ENB_D_1 0x41c 22#define OMAP_WKG_ENB_D_1 0x41c
27#define OMAP_WKG_ENB_SECURE_A_1 0x420
28#define OMAP_WKG_ENB_SECURE_B_1 0x424
29#define OMAP_WKG_ENB_SECURE_C_1 0x428
30#define OMAP_WKG_ENB_SECURE_D_1 0x42c
31#define OMAP_AUX_CORE_BOOT_0 0x800 23#define OMAP_AUX_CORE_BOOT_0 0x800
32#define OMAP_AUX_CORE_BOOT_1 0x804 24#define OMAP_AUX_CORE_BOOT_1 0x804
33#define OMAP_PTMSYNCREQ_MASK 0xc00 25#define OMAP_PTMSYNCREQ_MASK 0xc00
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 4b9491aa36fa..8d014ba04abc 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -173,7 +173,7 @@ static struct map_desc omap34xx_io_desc[] __initdata = {
173}; 173};
174#endif 174#endif
175 175
176#ifdef CONFIG_SOC_OMAPTI81XX 176#ifdef CONFIG_SOC_TI81XX
177static struct map_desc omapti81xx_io_desc[] __initdata = { 177static struct map_desc omapti81xx_io_desc[] __initdata = {
178 { 178 {
179 .virtual = L4_34XX_VIRT, 179 .virtual = L4_34XX_VIRT,
@@ -184,7 +184,7 @@ static struct map_desc omapti81xx_io_desc[] __initdata = {
184}; 184};
185#endif 185#endif
186 186
187#ifdef CONFIG_SOC_OMAPAM33XX 187#ifdef CONFIG_SOC_AM33XX
188static struct map_desc omapam33xx_io_desc[] __initdata = { 188static struct map_desc omapam33xx_io_desc[] __initdata = {
189 { 189 {
190 .virtual = L4_34XX_VIRT, 190 .virtual = L4_34XX_VIRT,
@@ -216,41 +216,11 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
216 .type = MT_DEVICE, 216 .type = MT_DEVICE,
217 }, 217 },
218 { 218 {
219 .virtual = OMAP44XX_GPMC_VIRT,
220 .pfn = __phys_to_pfn(OMAP44XX_GPMC_PHYS),
221 .length = OMAP44XX_GPMC_SIZE,
222 .type = MT_DEVICE,
223 },
224 {
225 .virtual = OMAP44XX_EMIF1_VIRT,
226 .pfn = __phys_to_pfn(OMAP44XX_EMIF1_PHYS),
227 .length = OMAP44XX_EMIF1_SIZE,
228 .type = MT_DEVICE,
229 },
230 {
231 .virtual = OMAP44XX_EMIF2_VIRT,
232 .pfn = __phys_to_pfn(OMAP44XX_EMIF2_PHYS),
233 .length = OMAP44XX_EMIF2_SIZE,
234 .type = MT_DEVICE,
235 },
236 {
237 .virtual = OMAP44XX_DMM_VIRT,
238 .pfn = __phys_to_pfn(OMAP44XX_DMM_PHYS),
239 .length = OMAP44XX_DMM_SIZE,
240 .type = MT_DEVICE,
241 },
242 {
243 .virtual = L4_PER_44XX_VIRT, 219 .virtual = L4_PER_44XX_VIRT,
244 .pfn = __phys_to_pfn(L4_PER_44XX_PHYS), 220 .pfn = __phys_to_pfn(L4_PER_44XX_PHYS),
245 .length = L4_PER_44XX_SIZE, 221 .length = L4_PER_44XX_SIZE,
246 .type = MT_DEVICE, 222 .type = MT_DEVICE,
247 }, 223 },
248 {
249 .virtual = L4_EMU_44XX_VIRT,
250 .pfn = __phys_to_pfn(L4_EMU_44XX_PHYS),
251 .length = L4_EMU_44XX_SIZE,
252 .type = MT_DEVICE,
253 },
254#ifdef CONFIG_OMAP4_ERRATA_I688 224#ifdef CONFIG_OMAP4_ERRATA_I688
255 { 225 {
256 .virtual = OMAP4_SRAM_VA, 226 .virtual = OMAP4_SRAM_VA,
@@ -286,14 +256,14 @@ void __init omap34xx_map_common_io(void)
286} 256}
287#endif 257#endif
288 258
289#ifdef CONFIG_SOC_OMAPTI81XX 259#ifdef CONFIG_SOC_TI81XX
290void __init omapti81xx_map_common_io(void) 260void __init omapti81xx_map_common_io(void)
291{ 261{
292 iotable_init(omapti81xx_io_desc, ARRAY_SIZE(omapti81xx_io_desc)); 262 iotable_init(omapti81xx_io_desc, ARRAY_SIZE(omapti81xx_io_desc));
293} 263}
294#endif 264#endif
295 265
296#ifdef CONFIG_SOC_OMAPAM33XX 266#ifdef CONFIG_SOC_AM33XX
297void __init omapam33xx_map_common_io(void) 267void __init omapam33xx_map_common_io(void)
298{ 268{
299 iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc)); 269 iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
@@ -380,6 +350,13 @@ void __init omap2420_init_early(void)
380 omap_hwmod_init_postsetup(); 350 omap_hwmod_init_postsetup();
381 omap2420_clk_init(); 351 omap2420_clk_init();
382} 352}
353
354void __init omap2420_init_late(void)
355{
356 omap_mux_late_init();
357 omap2_common_pm_late_init();
358 omap2_pm_init();
359}
383#endif 360#endif
384 361
385#ifdef CONFIG_SOC_OMAP2430 362#ifdef CONFIG_SOC_OMAP2430
@@ -395,6 +372,13 @@ void __init omap2430_init_early(void)
395 omap_hwmod_init_postsetup(); 372 omap_hwmod_init_postsetup();
396 omap2430_clk_init(); 373 omap2430_clk_init();
397} 374}
375
376void __init omap2430_init_late(void)
377{
378 omap_mux_late_init();
379 omap2_common_pm_late_init();
380 omap2_pm_init();
381}
398#endif 382#endif
399 383
400/* 384/*
@@ -449,6 +433,48 @@ void __init ti81xx_init_early(void)
449 omap_hwmod_init_postsetup(); 433 omap_hwmod_init_postsetup();
450 omap3xxx_clk_init(); 434 omap3xxx_clk_init();
451} 435}
436
437void __init omap3_init_late(void)
438{
439 omap_mux_late_init();
440 omap2_common_pm_late_init();
441 omap3_pm_init();
442}
443
444void __init omap3430_init_late(void)
445{
446 omap_mux_late_init();
447 omap2_common_pm_late_init();
448 omap3_pm_init();
449}
450
451void __init omap35xx_init_late(void)
452{
453 omap_mux_late_init();
454 omap2_common_pm_late_init();
455 omap3_pm_init();
456}
457
458void __init omap3630_init_late(void)
459{
460 omap_mux_late_init();
461 omap2_common_pm_late_init();
462 omap3_pm_init();
463}
464
465void __init am35xx_init_late(void)
466{
467 omap_mux_late_init();
468 omap2_common_pm_late_init();
469 omap3_pm_init();
470}
471
472void __init ti81xx_init_late(void)
473{
474 omap_mux_late_init();
475 omap2_common_pm_late_init();
476 omap3_pm_init();
477}
452#endif 478#endif
453 479
454#ifdef CONFIG_ARCH_OMAP4 480#ifdef CONFIG_ARCH_OMAP4
@@ -465,6 +491,13 @@ void __init omap4430_init_early(void)
465 omap_hwmod_init_postsetup(); 491 omap_hwmod_init_postsetup();
466 omap4xxx_clk_init(); 492 omap4xxx_clk_init();
467} 493}
494
495void __init omap4430_init_late(void)
496{
497 omap_mux_late_init();
498 omap2_common_pm_late_init();
499 omap4_pm_init();
500}
468#endif 501#endif
469 502
470void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, 503void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
diff --git a/arch/arm/mach-omap2/iomap.h b/arch/arm/mach-omap2/iomap.h
index 0812b154f5b5..80b88921faba 100644
--- a/arch/arm/mach-omap2/iomap.h
+++ b/arch/arm/mach-omap2/iomap.h
@@ -37,9 +37,6 @@
37#define OMAP4_L3_PER_IO_OFFSET 0xb1100000 37#define OMAP4_L3_PER_IO_OFFSET 0xb1100000
38#define OMAP4_L3_PER_IO_ADDRESS(pa) IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET) 38#define OMAP4_L3_PER_IO_ADDRESS(pa) IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET)
39 39
40#define OMAP4_GPMC_IO_OFFSET 0xa9000000
41#define OMAP4_GPMC_IO_ADDRESS(pa) IOMEM((pa) + OMAP4_GPMC_IO_OFFSET)
42
43#define OMAP2_EMU_IO_OFFSET 0xaa800000 /* Emulation */ 40#define OMAP2_EMU_IO_OFFSET 0xaa800000 /* Emulation */
44#define OMAP2_EMU_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_EMU_IO_OFFSET) 41#define OMAP2_EMU_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_EMU_IO_OFFSET)
45 42
@@ -170,28 +167,3 @@
170#define L4_ABE_44XX_VIRT (L4_ABE_44XX_PHYS + OMAP2_L4_IO_OFFSET) 167#define L4_ABE_44XX_VIRT (L4_ABE_44XX_PHYS + OMAP2_L4_IO_OFFSET)
171#define L4_ABE_44XX_SIZE SZ_1M 168#define L4_ABE_44XX_SIZE SZ_1M
172 169
173#define L4_EMU_44XX_PHYS L4_EMU_44XX_BASE
174 /* 0x54000000 --> 0xfe800000 */
175#define L4_EMU_44XX_VIRT (L4_EMU_44XX_PHYS + OMAP2_EMU_IO_OFFSET)
176#define L4_EMU_44XX_SIZE SZ_8M
177
178#define OMAP44XX_GPMC_PHYS OMAP44XX_GPMC_BASE
179 /* 0x50000000 --> 0xf9000000 */
180#define OMAP44XX_GPMC_VIRT (OMAP44XX_GPMC_PHYS + OMAP4_GPMC_IO_OFFSET)
181#define OMAP44XX_GPMC_SIZE SZ_1M
182
183
184#define OMAP44XX_EMIF1_PHYS OMAP44XX_EMIF1_BASE
185 /* 0x4c000000 --> 0xfd100000 */
186#define OMAP44XX_EMIF1_VIRT (OMAP44XX_EMIF1_PHYS + OMAP4_L3_PER_IO_OFFSET)
187#define OMAP44XX_EMIF1_SIZE SZ_1M
188
189#define OMAP44XX_EMIF2_PHYS OMAP44XX_EMIF2_BASE
190 /* 0x4d000000 --> 0xfd200000 */
191#define OMAP44XX_EMIF2_SIZE SZ_1M
192#define OMAP44XX_EMIF2_VIRT (OMAP44XX_EMIF1_VIRT + OMAP44XX_EMIF1_SIZE)
193
194#define OMAP44XX_DMM_PHYS OMAP44XX_DMM_BASE
195 /* 0x4e000000 --> 0xfd300000 */
196#define OMAP44XX_DMM_SIZE SZ_1M
197#define OMAP44XX_DMM_VIRT (OMAP44XX_EMIF2_VIRT + OMAP44XX_EMIF2_SIZE)
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 1ecf54565fe2..fdc4303be563 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -231,7 +231,7 @@ static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs
231 goto out; 231 goto out;
232 232
233 irqnr = readl_relaxed(base_addr + 0xd8); 233 irqnr = readl_relaxed(base_addr + 0xd8);
234#ifdef CONFIG_SOC_OMAPTI81XX 234#ifdef CONFIG_SOC_TI81XX
235 if (irqnr) 235 if (irqnr)
236 goto out; 236 goto out;
237 irqnr = readl_relaxed(base_addr + 0xf8); 237 irqnr = readl_relaxed(base_addr + 0xf8);
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 3268ee24eada..80e55c5c9998 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -788,7 +788,7 @@ static void __init omap_mux_free_names(struct omap_mux *m)
788} 788}
789 789
790/* Free all data except for GPIO pins unless CONFIG_DEBUG_FS is set */ 790/* Free all data except for GPIO pins unless CONFIG_DEBUG_FS is set */
791static int __init omap_mux_late_init(void) 791int __init omap_mux_late_init(void)
792{ 792{
793 struct omap_mux_partition *partition; 793 struct omap_mux_partition *partition;
794 int ret; 794 int ret;
@@ -823,7 +823,6 @@ static int __init omap_mux_late_init(void)
823 823
824 return 0; 824 return 0;
825} 825}
826late_initcall(omap_mux_late_init);
827 826
828static void __init omap_mux_package_fixup(struct omap_mux *p, 827static void __init omap_mux_package_fixup(struct omap_mux *p,
829 struct omap_mux *superset) 828 struct omap_mux *superset)
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index fd48797fa95a..b26d3c9bca16 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3306,7 +3306,7 @@ int __init omap3xxx_hwmod_init(void)
3306 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || 3306 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3307 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { 3307 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
3308 h = omap34xx_hwmod_ocp_ifs; 3308 h = omap34xx_hwmod_ocp_ifs;
3309 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { 3309 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
3310 h = am35xx_hwmod_ocp_ifs; 3310 h = am35xx_hwmod_ocp_ifs;
3311 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || 3311 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3312 rev == OMAP3630_REV_ES1_2) { 3312 rev == OMAP3630_REV_ES1_2) {
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index d0c1c9695996..9cb5cede0f50 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -295,7 +295,7 @@ static int __init omap2_common_pm_init(void)
295} 295}
296postcore_initcall(omap2_common_pm_init); 296postcore_initcall(omap2_common_pm_init);
297 297
298static int __init omap2_common_pm_late_init(void) 298int __init omap2_common_pm_late_init(void)
299{ 299{
300 /* 300 /*
301 * In the case of DT, the PMIC and SR initialization will be done using 301 * In the case of DT, the PMIC and SR initialization will be done using
@@ -322,4 +322,3 @@ static int __init omap2_common_pm_late_init(void)
322 322
323 return 0; 323 return 0;
324} 324}
325late_initcall(omap2_common_pm_late_init);
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index facfffca9eac..2edeffc923a6 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -298,13 +298,10 @@ static void __init prcm_setup_regs(void)
298 WKUP_MOD, PM_WKEN); 298 WKUP_MOD, PM_WKEN);
299} 299}
300 300
301static int __init omap2_pm_init(void) 301int __init omap2_pm_init(void)
302{ 302{
303 u32 l; 303 u32 l;
304 304
305 if (!cpu_is_omap24xx())
306 return -ENODEV;
307
308 printk(KERN_INFO "Power Management for OMAP2 initializing\n"); 305 printk(KERN_INFO "Power Management for OMAP2 initializing\n");
309 l = omap2_prm_read_mod_reg(OCP_MOD, OMAP2_PRCM_REVISION_OFFSET); 306 l = omap2_prm_read_mod_reg(OCP_MOD, OMAP2_PRCM_REVISION_OFFSET);
310 printk(KERN_INFO "PRCM revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); 307 printk(KERN_INFO "PRCM revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
@@ -370,17 +367,13 @@ static int __init omap2_pm_init(void)
370 * These routines need to be in SRAM as that's the only 367 * These routines need to be in SRAM as that's the only
371 * memory the MPU can see when it wakes up. 368 * memory the MPU can see when it wakes up.
372 */ 369 */
373 if (cpu_is_omap24xx()) { 370 omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend,
374 omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend, 371 omap24xx_idle_loop_suspend_sz);
375 omap24xx_idle_loop_suspend_sz);
376 372
377 omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend, 373 omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
378 omap24xx_cpu_suspend_sz); 374 omap24xx_cpu_suspend_sz);
379 }
380 375
381 arm_pm_idle = omap2_pm_idle; 376 arm_pm_idle = omap2_pm_idle;
382 377
383 return 0; 378 return 0;
384} 379}
385
386late_initcall(omap2_pm_init);
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 8b43aefba0ea..a34023d0ca7c 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -697,15 +697,12 @@ static void __init pm_errata_configure(void)
697 } 697 }
698} 698}
699 699
700static int __init omap3_pm_init(void) 700int __init omap3_pm_init(void)
701{ 701{
702 struct power_state *pwrst, *tmp; 702 struct power_state *pwrst, *tmp;
703 struct clockdomain *neon_clkdm, *mpu_clkdm; 703 struct clockdomain *neon_clkdm, *mpu_clkdm;
704 int ret; 704 int ret;
705 705
706 if (!cpu_is_omap34xx())
707 return -ENODEV;
708
709 if (!omap3_has_io_chain_ctrl()) 706 if (!omap3_has_io_chain_ctrl())
710 pr_warning("PM: no software I/O chain control; some wakeups may be lost\n"); 707 pr_warning("PM: no software I/O chain control; some wakeups may be lost\n");
711 708
@@ -804,5 +801,3 @@ err2:
804err1: 801err1:
805 return ret; 802 return ret;
806} 803}
807
808late_initcall(omap3_pm_init);
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 885625352429..ea24174f5707 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -141,15 +141,12 @@ static void omap_default_idle(void)
141 * Initializes all powerdomain and clockdomain target states 141 * Initializes all powerdomain and clockdomain target states
142 * and all PRCM settings. 142 * and all PRCM settings.
143 */ 143 */
144static int __init omap4_pm_init(void) 144int __init omap4_pm_init(void)
145{ 145{
146 int ret; 146 int ret;
147 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm, *l4wkup; 147 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm, *l4wkup;
148 struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm; 148 struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
149 149
150 if (!cpu_is_omap44xx())
151 return -ENODEV;
152
153 if (omap_rev() == OMAP4430_REV_ES1_0) { 150 if (omap_rev() == OMAP4430_REV_ES1_0) {
154 WARN(1, "Power Management not supported on OMAP4430 ES1.0\n"); 151 WARN(1, "Power Management not supported on OMAP4430 ES1.0\n");
155 return -ENODEV; 152 return -ENODEV;
@@ -217,4 +214,3 @@ static int __init omap4_pm_init(void)
217err2: 214err2:
218 return ret; 215 return ret;
219} 216}
220late_initcall(omap4_pm_init);
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index b7ea468eea32..fb0a0a6869d1 100644
--- a/arch/arm/mach-omap2/powerdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -311,7 +311,7 @@ void __init omap3xxx_powerdomains_init(void)
311 rev == OMAP3430_REV_ES3_0 || rev == OMAP3630_REV_ES1_0) 311 rev == OMAP3430_REV_ES3_0 || rev == OMAP3630_REV_ES1_0)
312 pwrdm_register_pwrdms(powerdomains_omap3430es2_es3_0); 312 pwrdm_register_pwrdms(powerdomains_omap3430es2_es3_0);
313 else if (rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2 || 313 else if (rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2 ||
314 rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1 || 314 rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1 ||
315 rev == OMAP3630_REV_ES1_1 || rev == OMAP3630_REV_ES1_2) 315 rev == OMAP3630_REV_ES1_1 || rev == OMAP3630_REV_ES1_2)
316 pwrdm_register_pwrdms(powerdomains_omap3430es3_1plus); 316 pwrdm_register_pwrdms(powerdomains_omap3430es3_1plus);
317 else 317 else
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 1b7835865c83..840929bd9dae 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -90,7 +90,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
90} 90}
91 91
92static struct irqaction omap2_gp_timer_irq = { 92static struct irqaction omap2_gp_timer_irq = {
93 .name = "gp timer", 93 .name = "gp_timer",
94 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 94 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
95 .handler = omap2_gp_timer_interrupt, 95 .handler = omap2_gp_timer_interrupt,
96}; 96};
@@ -132,7 +132,7 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
132} 132}
133 133
134static struct clock_event_device clockevent_gpt = { 134static struct clock_event_device clockevent_gpt = {
135 .name = "gp timer", 135 .name = "gp_timer",
136 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 136 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
137 .shift = 32, 137 .shift = 32,
138 .set_next_event = omap2_gp_timer_set_next_event, 138 .set_next_event = omap2_gp_timer_set_next_event,
@@ -236,22 +236,8 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
236} 236}
237 237
238/* Clocksource code */ 238/* Clocksource code */
239
240#ifdef CONFIG_OMAP_32K_TIMER
241/*
242 * When 32k-timer is enabled, don't use GPTimer for clocksource
243 * instead, just leave default clocksource which uses the 32k
244 * sync counter. See clocksource setup in plat-omap/counter_32k.c
245 */
246
247static void __init omap2_gp_clocksource_init(int unused, const char *dummy)
248{
249 omap_init_clocksource_32k();
250}
251
252#else
253
254static struct omap_dm_timer clksrc; 239static struct omap_dm_timer clksrc;
240static bool use_gptimer_clksrc;
255 241
256/* 242/*
257 * clocksource 243 * clocksource
@@ -262,7 +248,7 @@ static cycle_t clocksource_read_cycles(struct clocksource *cs)
262} 248}
263 249
264static struct clocksource clocksource_gpt = { 250static struct clocksource clocksource_gpt = {
265 .name = "gp timer", 251 .name = "gp_timer",
266 .rating = 300, 252 .rating = 300,
267 .read = clocksource_read_cycles, 253 .read = clocksource_read_cycles,
268 .mask = CLOCKSOURCE_MASK(32), 254 .mask = CLOCKSOURCE_MASK(32),
@@ -278,7 +264,46 @@ static u32 notrace dmtimer_read_sched_clock(void)
278} 264}
279 265
280/* Setup free-running counter for clocksource */ 266/* Setup free-running counter for clocksource */
281static void __init omap2_gp_clocksource_init(int gptimer_id, 267static int __init omap2_sync32k_clocksource_init(void)
268{
269 int ret;
270 struct omap_hwmod *oh;
271 void __iomem *vbase;
272 const char *oh_name = "counter_32k";
273
274 /*
275 * First check hwmod data is available for sync32k counter
276 */
277 oh = omap_hwmod_lookup(oh_name);
278 if (!oh || oh->slaves_cnt == 0)
279 return -ENODEV;
280
281 omap_hwmod_setup_one(oh_name);
282
283 vbase = omap_hwmod_get_mpu_rt_va(oh);
284 if (!vbase) {
285 pr_warn("%s: failed to get counter_32k resource\n", __func__);
286 return -ENXIO;
287 }
288
289 ret = omap_hwmod_enable(oh);
290 if (ret) {
291 pr_warn("%s: failed to enable counter_32k module (%d)\n",
292 __func__, ret);
293 return ret;
294 }
295
296 ret = omap_init_clocksource_32k(vbase);
297 if (ret) {
298 pr_warn("%s: failed to initialize counter_32k as a clocksource (%d)\n",
299 __func__, ret);
300 omap_hwmod_idle(oh);
301 }
302
303 return ret;
304}
305
306static void __init omap2_gptimer_clocksource_init(int gptimer_id,
282 const char *fck_source) 307 const char *fck_source)
283{ 308{
284 int res; 309 int res;
@@ -286,9 +311,6 @@ static void __init omap2_gp_clocksource_init(int gptimer_id,
286 res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source); 311 res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source);
287 BUG_ON(res); 312 BUG_ON(res);
288 313
289 pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
290 gptimer_id, clksrc.rate);
291
292 __omap_dm_timer_load_start(&clksrc, 314 __omap_dm_timer_load_start(&clksrc,
293 OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); 315 OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1);
294 setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate); 316 setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate);
@@ -296,15 +318,36 @@ static void __init omap2_gp_clocksource_init(int gptimer_id,
296 if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) 318 if (clocksource_register_hz(&clocksource_gpt, clksrc.rate))
297 pr_err("Could not register clocksource %s\n", 319 pr_err("Could not register clocksource %s\n",
298 clocksource_gpt.name); 320 clocksource_gpt.name);
321 else
322 pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
323 gptimer_id, clksrc.rate);
324}
325
326static void __init omap2_clocksource_init(int gptimer_id,
327 const char *fck_source)
328{
329 /*
330 * First give preference to kernel parameter configuration
331 * by user (clocksource="gp_timer").
332 *
333 * In case of missing kernel parameter for clocksource,
334 * first check for availability for 32k-sync timer, in case
335 * of failure in finding 32k_counter module or registering
336 * it as clocksource, execution will fallback to gp-timer.
337 */
338 if (use_gptimer_clksrc == true)
339 omap2_gptimer_clocksource_init(gptimer_id, fck_source);
340 else if (omap2_sync32k_clocksource_init())
341 /* Fall back to gp-timer code */
342 omap2_gptimer_clocksource_init(gptimer_id, fck_source);
299} 343}
300#endif
301 344
302#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \ 345#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \
303 clksrc_nr, clksrc_src) \ 346 clksrc_nr, clksrc_src) \
304static void __init omap##name##_timer_init(void) \ 347static void __init omap##name##_timer_init(void) \
305{ \ 348{ \
306 omap2_gp_clockevent_init((clkev_nr), clkev_src); \ 349 omap2_gp_clockevent_init((clkev_nr), clkev_src); \
307 omap2_gp_clocksource_init((clksrc_nr), clksrc_src); \ 350 omap2_clocksource_init((clksrc_nr), clksrc_src); \
308} 351}
309 352
310#define OMAP_SYS_TIMER(name) \ 353#define OMAP_SYS_TIMER(name) \
@@ -335,7 +378,7 @@ static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
335static void __init omap4_timer_init(void) 378static void __init omap4_timer_init(void)
336{ 379{
337 omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE); 380 omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
338 omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE); 381 omap2_clocksource_init(2, OMAP4_MPU_SOURCE);
339#ifdef CONFIG_LOCAL_TIMERS 382#ifdef CONFIG_LOCAL_TIMERS
340 /* Local timers are not supprted on OMAP4430 ES1.0 */ 383 /* Local timers are not supprted on OMAP4430 ES1.0 */
341 if (omap_rev() != OMAP4430_REV_ES1_0) { 384 if (omap_rev() != OMAP4430_REV_ES1_0) {
@@ -503,3 +546,28 @@ static int __init omap2_dm_timer_init(void)
503 return 0; 546 return 0;
504} 547}
505arch_initcall(omap2_dm_timer_init); 548arch_initcall(omap2_dm_timer_init);
549
550/**
551 * omap2_override_clocksource - clocksource override with user configuration
552 *
553 * Allows user to override default clocksource, using kernel parameter
554 * clocksource="gp_timer" (For all OMAP2PLUS architectures)
555 *
556 * Note that, here we are using same standard kernel parameter "clocksource=",
557 * and not introducing any OMAP specific interface.
558 */
559static int __init omap2_override_clocksource(char *str)
560{
561 if (!str)
562 return 0;
563 /*
564 * For OMAP architecture, we only have two options
565 * - sync_32k (default)
566 * - gp_timer (sys_clk based)
567 */
568 if (!strcmp(str, "gp_timer"))
569 use_gptimer_clksrc = true;
570
571 return 0;
572}
573early_param("clocksource", omap2_override_clocksource);
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 8d5ed775dd56..b19d1b43c12e 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -90,7 +90,7 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
90 musb_plat.mode = board_data->mode; 90 musb_plat.mode = board_data->mode;
91 musb_plat.extvbus = board_data->extvbus; 91 musb_plat.extvbus = board_data->extvbus;
92 92
93 if (cpu_is_omap3517() || cpu_is_omap3505()) { 93 if (soc_is_am35xx()) {
94 oh_name = "am35x_otg_hs"; 94 oh_name = "am35x_otg_hs";
95 name = "musb-am35x"; 95 name = "musb-am35x";
96 } else if (cpu_is_ti81xx()) { 96 } else if (cpu_is_ti81xx()) {
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
index 57db2038b23c..d0103c80d040 100644
--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
@@ -118,7 +118,7 @@ void __init omap3xxx_voltagedomains_init(void)
118 } 118 }
119#endif 119#endif
120 120
121 if (cpu_is_omap3517() || cpu_is_omap3505()) 121 if (soc_is_am35xx())
122 voltdms = voltagedomains_am35xx; 122 voltdms = voltagedomains_am35xx;
123 else 123 else
124 voltdms = voltagedomains_omap3; 124 voltdms = voltagedomains_omap3;