aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:19:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:19:05 -0400
commit61464c8357c8f6b780e4c44f5c79471799c51ca7 (patch)
tree4509cf075403965528f380f2f825c46908fb7d4e /arch/arm/mach-omap2
parent47061eda2584b9e4516d1e3a9713406a3a559ac8 (diff)
parent9cf1c871526cf6bfec2a653e1e068ee72592542c (diff)
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc general cleanups from Olof Johansson: "This is a large branch that contains a handful of different cleanups: - Fixing up the I/O space remapping on PCI on ARM. This is a series from Rob Herring that restructures how all pci devices allocate I/O space, and it's part of the work to allow multiplatform kernels. - A number of cleanup series for OMAP, moving and removing some headers, sparse irq rework and in general preparation for multiplatform. - Final removal of all non-DT boards for Tegra, it is now device-tree-only! - Removal of a stale platform, nxp4008. It's an old mobile chipset that is no longer in use, and was very likely never really used with a mainline kernel. We have not been able to find anyone interested in keeping it around in the kernel. - Removal of the legacy dmaengine driver on tegra + A handful of other things that I haven't described above." Fix up some conflicts with the staging tree (and because nxp4008 was removed) * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits) ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6 ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus ARM: mmp: using for_each_set_bit to simplify the code ARM: tegra: harmony: fix ldo7 regulator-name ARM: OMAP2+: Make omap4-keypad.h local ARM: OMAP2+: Make l4_3xxx.h local ARM: OMAP2+: Make l4_2xxx.h local ARM: OMAP2+: Make l3_3xxx.h local ARM: OMAP2+: Make l3_2xxx.h local ARM: OMAP1: Move irda.h from plat to mach ARM: OMAP2+: Make hdq1w.h local ARM: OMAP2+: Make gpmc-smsc911x.h local ARM: OMAP2+: Make gpmc-smc91x.h local ARM: OMAP1: Move flash.h from plat to mach ARM: OMAP2+: Make debug-devices.h local ARM: OMAP1: Move board-voiceblue.h from plat to mach ARM: OMAP1: Move board-sx1.h from plat to mach ARM: OMAP2+: Make omap-wakeupgen.h local ARM: OMAP2+: Make omap-secure.h local ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local ...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Makefile108
-rw-r--r--arch/arm/mach-omap2/am33xx.h25
-rw-r--r--arch/arm/mach-omap2/am35xx-emac.c2
-rw-r--r--arch/arm/mach-omap2/am35xx.h (renamed from arch/arm/mach-omap2/include/mach/am35xx.h)0
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c8
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c14
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c8
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c18
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c10
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c13
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c16
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c13
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c13
-rw-r--r--arch/arm/mach-omap2/board-flash.c8
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/board-h4.c5
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c9
-rw-r--r--arch/arm/mach-omap2/board-ldp.c11
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c16
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c7
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c29
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c18
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c9
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c21
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c9
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c16
-rw-r--r--arch/arm/mach-omap2/board-overo.c19
-rw-r--r--arch/arm/mach-omap2/board-rm680.c8
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c15
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c4
-rw-r--r--arch/arm/mach-omap2/board-rx51.c4
-rw-r--r--arch/arm/mach-omap2/board-rx51.h (renamed from arch/arm/mach-omap2/include/mach/board-rx51.h)0
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c8
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c12
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c4
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c6
-rw-r--r--arch/arm/mach-omap2/board-zoom.c1
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c2
-rw-r--r--arch/arm/mach-omap2/clkt34xx_dpll3m2.c10
-rw-r--r--arch/arm/mach-omap2/clkt_clksel.c28
-rw-r--r--arch/arm/mach-omap2/clkt_dpll.c10
-rw-r--r--arch/arm/mach-omap2/clock.c28
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c2
-rw-r--r--arch/arm/mach-omap2/clock2430.c2
-rw-r--r--arch/arm/mach-omap2/clock2430_data.c3
-rw-r--r--arch/arm/mach-omap2/clock2xxx.c2
-rw-r--r--arch/arm/mach-omap2/clock33xx_data.c2
-rw-r--r--arch/arm/mach-omap2/clock3xxx.c5
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c3
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/clockdomain.c74
-rw-r--r--arch/arm/mach-omap2/cm2xxx_3xxx.c3
-rw-r--r--arch/arm/mach-omap2/common-board-devices.c8
-rw-r--r--arch/arm/mach-omap2/common.c4
-rw-r--r--arch/arm/mach-omap2/common.h9
-rw-r--r--arch/arm/mach-omap2/control.c2
-rw-r--r--arch/arm/mach-omap2/control.h10
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c1
-rw-r--r--arch/arm/mach-omap2/ctrl_module_core_44xx.h (renamed from arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h)0
-rw-r--r--arch/arm/mach-omap2/ctrl_module_pad_core_44xx.h (renamed from arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h)0
-rw-r--r--arch/arm/mach-omap2/ctrl_module_pad_wkup_44xx.h (renamed from arch/arm/mach-omap2/include/mach/ctrl_module_pad_wkup_44xx.h)0
-rw-r--r--arch/arm/mach-omap2/ctrl_module_wkup_44xx.h (renamed from arch/arm/mach-omap2/include/mach/ctrl_module_wkup_44xx.h)0
-rw-r--r--arch/arm/mach-omap2/debug-devices.h9
-rw-r--r--arch/arm/mach-omap2/devices.c31
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c9
-rw-r--r--arch/arm/mach-omap2/dpll44xx.c2
-rw-r--r--arch/arm/mach-omap2/dsp.c2
-rw-r--r--arch/arm/mach-omap2/emu.c3
-rw-r--r--arch/arm/mach-omap2/gpio.c1
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c34
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c29
-rw-r--r--arch/arm/mach-omap2/gpmc-smc91x.c5
-rw-r--r--arch/arm/mach-omap2/gpmc-smc91x.h42
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c3
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.h35
-rw-r--r--arch/arm/mach-omap2/gpmc.c169
-rw-r--r--arch/arm/mach-omap2/hdq1w.c2
-rw-r--r--arch/arm/mach-omap2/hdq1w.h36
-rw-r--r--arch/arm/mach-omap2/hsmmc.c3
-rw-r--r--arch/arm/mach-omap2/i2c.c1
-rw-r--r--arch/arm/mach-omap2/id.c9
-rw-r--r--arch/arm/mach-omap2/id.h (renamed from arch/arm/mach-omap2/include/mach/id.h)0
-rw-r--r--arch/arm/mach-omap2/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-omap2/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-omap2/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-omap2/include/mach/smp.h5
-rw-r--r--arch/arm/mach-omap2/io.c1
-rw-r--r--arch/arm/mach-omap2/irq.c10
-rw-r--r--arch/arm/mach-omap2/l3_2xxx.h20
-rw-r--r--arch/arm/mach-omap2/l3_3xxx.h20
-rw-r--r--arch/arm/mach-omap2/l4_2xxx.h24
-rw-r--r--arch/arm/mach-omap2/l4_3xxx.h34
-rw-r--r--arch/arm/mach-omap2/mailbox.c4
-rw-r--r--arch/arm/mach-omap2/mcbsp.c4
-rw-r--r--arch/arm/mach-omap2/msdi.c1
-rw-r--r--arch/arm/mach-omap2/omap-hotplug.c2
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c12
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c3
-rw-r--r--arch/arm/mach-omap2/omap-secure.c2
-rw-r--r--arch/arm/mach-omap2/omap-secure.h (renamed from arch/arm/mach-omap2/include/mach/omap-secure.h)0
-rw-r--r--arch/arm/mach-omap2/omap-smp.c6
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c5
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.h (renamed from arch/arm/mach-omap2/include/mach/omap-wakeupgen.h)0
-rw-r--r--arch/arm/mach-omap2/omap24xx.h87
-rw-r--r--arch/arm/mach-omap2/omap34xx.h99
-rw-r--r--arch/arm/mach-omap2/omap4-common.c11
-rw-r--r--arch/arm/mach-omap2/omap4-keypad.h8
-rw-r--r--arch/arm/mach-omap2/omap44xx.h62
-rw-r--r--arch/arm/mach-omap2/omap54xx.h32
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c24
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c32
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c80
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c110
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c4
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c10
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c160
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c7
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h1
-rw-r--r--arch/arm/mach-omap2/omap_l3_noc.c5
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c2
-rw-r--r--arch/arm/mach-omap2/opp.c15
-rw-r--r--arch/arm/mach-omap2/opp2420_data.c2
-rw-r--r--arch/arm/mach-omap2/opp2430_data.c2
-rw-r--r--arch/arm/mach-omap2/opp3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/opp4xxx_data.c3
-rw-r--r--arch/arm/mach-omap2/pm-debug.c1
-rw-r--r--arch/arm/mach-omap2/pm.c4
-rw-r--r--arch/arm/mach-omap2/pm24xx.c14
-rw-r--r--arch/arm/mach-omap2/pm34xx.c10
-rw-r--r--arch/arm/mach-omap2/pm44xx.c8
-rw-r--r--arch/arm/mach-omap2/powerdomain.c42
-rw-r--r--arch/arm/mach-omap2/powerdomain2xxx_3xxx.c4
-rw-r--r--arch/arm/mach-omap2/powerdomain44xx.c4
-rw-r--r--arch/arm/mach-omap2/powerdomains3xxx_data.c4
-rw-r--r--arch/arm/mach-omap2/prcm.c9
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.c7
-rw-r--r--arch/arm/mach-omap2/prm44xx.c5
-rw-r--r--arch/arm/mach-omap2/prm_common.c1
-rw-r--r--arch/arm/mach-omap2/sdrc2xxx.c2
-rw-r--r--arch/arm/mach-omap2/serial.c14
-rw-r--r--arch/arm/mach-omap2/sleep24xx.S3
-rw-r--r--arch/arm/mach-omap2/sleep34xx.S2
-rw-r--r--arch/arm/mach-omap2/sleep44xx.S4
-rw-r--r--arch/arm/mach-omap2/soc.h7
-rw-r--r--arch/arm/mach-omap2/sr_device.c13
-rw-r--r--arch/arm/mach-omap2/sram242x.S3
-rw-r--r--arch/arm/mach-omap2/sram243x.S3
-rw-r--r--arch/arm/mach-omap2/sram34xx.S3
-rw-r--r--arch/arm/mach-omap2/ti81xx.h27
-rw-r--r--arch/arm/mach-omap2/timer.c11
-rw-r--r--arch/arm/mach-omap2/twl-common.c38
-rw-r--r--arch/arm/mach-omap2/twl-common.h9
-rw-r--r--arch/arm/mach-omap2/usb-host.c2
-rw-r--r--arch/arm/mach-omap2/usb-musb.c7
-rw-r--r--arch/arm/mach-omap2/vc.c8
-rw-r--r--arch/arm/mach-omap2/voltage.c12
-rw-r--r--arch/arm/mach-omap2/voltage.h2
-rw-r--r--arch/arm/mach-omap2/voltagedomains3xxx_data.c3
-rw-r--r--arch/arm/mach-omap2/vp.c16
160 files changed, 1439 insertions, 906 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 34c2c7f59f0a..7706fdfd0252 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -4,36 +4,30 @@
4 4
5# Common support 5# Common support
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ 6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o 7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o
8 8
9omap-2-3-common = irq.o 9# INTCPS IP block support - XXX should be moved to drivers/
10hwmod-common = omap_hwmod.o \ 10obj-$(CONFIG_ARCH_OMAP2) += irq.o
11 omap_hwmod_common_data.o 11obj-$(CONFIG_ARCH_OMAP3) += irq.o
12clock-common = clock.o clock_common_data.o \ 12obj-$(CONFIG_SOC_AM33XX) += irq.o
13 clkt_dpll.o clkt_clksel.o
14secure-common = omap-smc.o omap-secure.o
15 13
16obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) 14# Secure monitor API support
17obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) 15obj-$(CONFIG_ARCH_OMAP3) += omap-smc.o omap-secure.o
18obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) 16obj-$(CONFIG_ARCH_OMAP4) += omap-smc.o omap-secure.o
19obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) 17obj-$(CONFIG_SOC_OMAP5) += omap-smc.o omap-secure.o
20obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common)
21 18
22ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) 19ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
23obj-y += mcbsp.o 20obj-y += mcbsp.o
24endif 21endif
25 22
26obj-$(CONFIG_TWL4030_CORE) += omap_twl.o 23obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
27obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
28 24
29# SMP support ONLY available for OMAP4 25# SMP support ONLY available for OMAP4
30 26
31obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 27obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
32obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o 28obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
33omap-4-5-common = omap4-common.o omap-wakeupgen.o \ 29obj-$(CONFIG_ARCH_OMAP4) += omap4-common.o omap-wakeupgen.o
34 sleep44xx.o 30obj-$(CONFIG_SOC_OMAP5) += omap4-common.o omap-wakeupgen.o
35obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common)
36obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common)
37 31
38plus_sec := $(call as-instr,.arch_extension sec,+sec) 32plus_sec := $(call as-instr,.arch_extension sec,+sec)
39AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) 33AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
@@ -58,6 +52,7 @@ obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o
58# SMS/SDRC 52# SMS/SDRC
59obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o 53obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
60# obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o 54# obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o
55obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
61 56
62# OPP table initialization 57# OPP table initialization
63ifeq ($(CONFIG_PM_OPP),y) 58ifeq ($(CONFIG_PM_OPP),y)
@@ -68,15 +63,15 @@ endif
68 63
69# Power Management 64# Power Management
70ifeq ($(CONFIG_PM),y) 65ifeq ($(CONFIG_PM),y)
71obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o 66obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o sleep24xx.o
72obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o
73obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o 67obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o
74obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o 68obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o
75obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o 69obj-$(CONFIG_ARCH_OMAP4) += sleep44xx.o
70obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o sleep44xx.o
76obj-$(CONFIG_PM_DEBUG) += pm-debug.o 71obj-$(CONFIG_PM_DEBUG) += pm-debug.o
77 72
78obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o 73obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o
79obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o 74obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o
80 75
81AFLAGS_sleep24xx.o :=-Wa,-march=armv6 76AFLAGS_sleep24xx.o :=-Wa,-march=armv6
82AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) 77AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec)
@@ -88,92 +83,76 @@ endif
88endif 83endif
89 84
90ifeq ($(CONFIG_CPU_IDLE),y) 85ifeq ($(CONFIG_CPU_IDLE),y)
91obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o 86obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o
92obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o 87obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o
93endif 88endif
94 89
95# PRCM 90# PRCM
96omap-prcm-4-5-common = prcm.o cminst44xx.o cm44xx.o \ 91obj-y += prcm.o prm_common.o
97 prcm_mpu44xx.o prminst44xx.o \ 92obj-$(CONFIG_ARCH_OMAP2) += cm2xxx_3xxx.o prm2xxx_3xxx.o
98 vc44xx_data.o vp44xx_data.o 93obj-$(CONFIG_ARCH_OMAP3) += cm2xxx_3xxx.o prm2xxx_3xxx.o
99obj-y += prm_common.o
100obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
101obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
102obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o 94obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
103obj-$(CONFIG_SOC_AM33XX) += prcm.o prm33xx.o cm33xx.o 95obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o
104obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common) prm44xx.o 96omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \
97 prcm_mpu44xx.o prminst44xx.o \
98 vc44xx_data.o vp44xx_data.o \
99 prm44xx.o
100obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common)
105obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common) 101obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common)
106 102
107# OMAP voltage domains 103# OMAP voltage domains
108voltagedomain-common := voltage.o vc.o vp.o 104obj-y += voltage.o vc.o vp.o
109obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common)
110obj-$(CONFIG_ARCH_OMAP2) += voltagedomains2xxx_data.o 105obj-$(CONFIG_ARCH_OMAP2) += voltagedomains2xxx_data.o
111obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common)
112obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o 106obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o
113obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common)
114obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o 107obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o
115obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common) 108obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o
116obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o
117obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common)
118 109
119# OMAP powerdomain framework 110# OMAP powerdomain framework
120powerdomain-common += powerdomain.o powerdomain-common.o 111obj-y += powerdomain.o powerdomain-common.o
121obj-$(CONFIG_ARCH_OMAP2) += $(powerdomain-common)
122obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_data.o 112obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_data.o
123obj-$(CONFIG_ARCH_OMAP2) += powerdomain2xxx_3xxx.o 113obj-$(CONFIG_ARCH_OMAP2) += powerdomain2xxx_3xxx.o
124obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_3xxx_data.o 114obj-$(CONFIG_ARCH_OMAP2) += powerdomains2xxx_3xxx_data.o
125obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common)
126obj-$(CONFIG_ARCH_OMAP3) += powerdomain2xxx_3xxx.o 115obj-$(CONFIG_ARCH_OMAP3) += powerdomain2xxx_3xxx.o
127obj-$(CONFIG_ARCH_OMAP3) += powerdomains3xxx_data.o 116obj-$(CONFIG_ARCH_OMAP3) += powerdomains3xxx_data.o
128obj-$(CONFIG_ARCH_OMAP3) += powerdomains2xxx_3xxx_data.o 117obj-$(CONFIG_ARCH_OMAP3) += powerdomains2xxx_3xxx_data.o
129obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common)
130obj-$(CONFIG_ARCH_OMAP4) += powerdomain44xx.o 118obj-$(CONFIG_ARCH_OMAP4) += powerdomain44xx.o
131obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o 119obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o
132obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common)
133obj-$(CONFIG_SOC_AM33XX) += powerdomain33xx.o 120obj-$(CONFIG_SOC_AM33XX) += powerdomain33xx.o
134obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o 121obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o
135obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common)
136obj-$(CONFIG_SOC_OMAP5) += powerdomain44xx.o 122obj-$(CONFIG_SOC_OMAP5) += powerdomain44xx.o
137 123
138# PRCM clockdomain control 124# PRCM clockdomain control
139clockdomain-common += clockdomain.o 125obj-y += clockdomain.o
140obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common)
141obj-$(CONFIG_ARCH_OMAP2) += clockdomain2xxx_3xxx.o 126obj-$(CONFIG_ARCH_OMAP2) += clockdomain2xxx_3xxx.o
142obj-$(CONFIG_ARCH_OMAP2) += clockdomains2xxx_3xxx_data.o 127obj-$(CONFIG_ARCH_OMAP2) += clockdomains2xxx_3xxx_data.o
143obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o 128obj-$(CONFIG_SOC_OMAP2420) += clockdomains2420_data.o
144obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o 129obj-$(CONFIG_SOC_OMAP2430) += clockdomains2430_data.o
145obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common)
146obj-$(CONFIG_ARCH_OMAP3) += clockdomain2xxx_3xxx.o 130obj-$(CONFIG_ARCH_OMAP3) += clockdomain2xxx_3xxx.o
147obj-$(CONFIG_ARCH_OMAP3) += clockdomains2xxx_3xxx_data.o 131obj-$(CONFIG_ARCH_OMAP3) += clockdomains2xxx_3xxx_data.o
148obj-$(CONFIG_ARCH_OMAP3) += clockdomains3xxx_data.o 132obj-$(CONFIG_ARCH_OMAP3) += clockdomains3xxx_data.o
149obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common)
150obj-$(CONFIG_ARCH_OMAP4) += clockdomain44xx.o 133obj-$(CONFIG_ARCH_OMAP4) += clockdomain44xx.o
151obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o 134obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o
152obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common)
153obj-$(CONFIG_SOC_AM33XX) += clockdomain33xx.o 135obj-$(CONFIG_SOC_AM33XX) += clockdomain33xx.o
154obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o 136obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o
155obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common)
156obj-$(CONFIG_SOC_OMAP5) += clockdomain44xx.o 137obj-$(CONFIG_SOC_OMAP5) += clockdomain44xx.o
157 138
158# Clock framework 139# Clock framework
159obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o 140obj-y += clock.o clock_common_data.o \
160obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_sys.o 141 clkt_dpll.o clkt_clksel.o
161obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpllcore.o 142obj-$(CONFIG_ARCH_OMAP2) += clock2xxx.o
143obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpllcore.o clkt2xxx_sys.o
162obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_virt_prcm_set.o 144obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_virt_prcm_set.o
163obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o clkt2xxx_osc.o 145obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o clkt2xxx_osc.o
164obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpll.o clkt_iclk.o 146obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpll.o clkt_iclk.o
165obj-$(CONFIG_SOC_OMAP2420) += clock2420_data.o 147obj-$(CONFIG_SOC_OMAP2420) += clock2420_data.o
166obj-$(CONFIG_SOC_OMAP2430) += clock2430.o clock2430_data.o 148obj-$(CONFIG_SOC_OMAP2430) += clock2430.o clock2430_data.o
167obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o 149obj-$(CONFIG_ARCH_OMAP3) += clock3xxx.o
168obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clkt34xx_dpll3m2.o 150obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clkt34xx_dpll3m2.o
169obj-$(CONFIG_ARCH_OMAP3) += clock3517.o clock36xx.o 151obj-$(CONFIG_ARCH_OMAP3) += clock3517.o clock36xx.o clkt_iclk.o
170obj-$(CONFIG_ARCH_OMAP3) += dpll3xxx.o clock3xxx_data.o 152obj-$(CONFIG_ARCH_OMAP3) += dpll3xxx.o clock3xxx_data.o
171obj-$(CONFIG_ARCH_OMAP3) += clkt_iclk.o 153obj-$(CONFIG_ARCH_OMAP4) += clock44xx_data.o
172obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o
173obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o 154obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o
174obj-$(CONFIG_SOC_AM33XX) += $(clock-common) dpll3xxx.o 155obj-$(CONFIG_SOC_AM33XX) += dpll3xxx.o clock33xx_data.o
175obj-$(CONFIG_SOC_AM33XX) += clock33xx_data.o
176obj-$(CONFIG_SOC_OMAP5) += $(clock-common)
177obj-$(CONFIG_SOC_OMAP5) += dpll3xxx.o dpll44xx.o 156obj-$(CONFIG_SOC_OMAP5) += dpll3xxx.o dpll44xx.o
178 157
179# OMAP2 clock rate set data (old "OPP" data) 158# OMAP2 clock rate set data (old "OPP" data)
@@ -181,6 +160,7 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
181obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o 160obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o
182 161
183# hwmod data 162# hwmod data
163obj-y += omap_hwmod_common_data.o
184obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o 164obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o
185obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o 165obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o
186obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o 166obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o
@@ -229,10 +209,10 @@ obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
229obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o 209obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o
230obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o 210obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
231obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o 211obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o
232obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o 212obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o
233obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o 213obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o
234obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o 214obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o
235obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o 215obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o
236obj-$(CONFIG_MACH_ENCORE) += board-omap3encore.o 216obj-$(CONFIG_MACH_ENCORE) += board-omap3encore.o
237obj-$(CONFIG_MACH_OVERO) += board-overo.o 217obj-$(CONFIG_MACH_OVERO) += board-overo.o
238obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o 218obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o
diff --git a/arch/arm/mach-omap2/am33xx.h b/arch/arm/mach-omap2/am33xx.h
new file mode 100644
index 000000000000..06c19bb7bca6
--- /dev/null
+++ b/arch/arm/mach-omap2/am33xx.h
@@ -0,0 +1,25 @@
1/*
2 * This file contains the address info for various AM33XX modules.
3 *
4 * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __ASM_ARCH_AM33XX_H
17#define __ASM_ARCH_AM33XX_H
18
19#define L4_SLOW_AM33XX_BASE 0x48000000
20
21#define AM33XX_SCM_BASE 0x44E10000
22#define AM33XX_CTRL_BASE AM33XX_SCM_BASE
23#define AM33XX_PRCM_BASE 0x44E00000
24
25#endif /* __ASM_ARCH_AM33XX_H */
diff --git a/arch/arm/mach-omap2/am35xx-emac.c b/arch/arm/mach-omap2/am35xx-emac.c
index 2c90ac686686..d0c54c573d34 100644
--- a/arch/arm/mach-omap2/am35xx-emac.c
+++ b/arch/arm/mach-omap2/am35xx-emac.c
@@ -19,7 +19,7 @@
19#include <linux/davinci_emac.h> 19#include <linux/davinci_emac.h>
20#include <asm/system.h> 20#include <asm/system.h>
21#include <plat/omap_device.h> 21#include <plat/omap_device.h>
22#include <mach/am35xx.h> 22#include "am35xx.h"
23#include "control.h" 23#include "control.h"
24#include "am35xx-emac.h" 24#include "am35xx-emac.h"
25 25
diff --git a/arch/arm/mach-omap2/include/mach/am35xx.h b/arch/arm/mach-omap2/am35xx.h
index 95594495fcf6..95594495fcf6 100644
--- a/arch/arm/mach-omap2/include/mach/am35xx.h
+++ b/arch/arm/mach-omap2/am35xx.h
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 9511584fdc4f..95b384d54f8a 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -33,11 +33,10 @@
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35 35
36#include <plat/board.h>
37#include "common.h" 36#include "common.h"
38#include <plat/gpmc.h> 37#include <plat/gpmc.h>
39#include <plat/usb.h> 38#include <plat/usb.h>
40#include <plat/gpmc-smc91x.h> 39#include "gpmc-smc91x.h"
41 40
42#include <video/omapdss.h> 41#include <video/omapdss.h>
43#include <video/omap-panel-generic-dpi.h> 42#include <video/omap-panel-generic-dpi.h>
@@ -212,9 +211,6 @@ static struct regulator_init_data sdp2430_vmmc1 = {
212}; 211};
213 212
214static struct twl4030_gpio_platform_data sdp2430_gpio_data = { 213static struct twl4030_gpio_platform_data sdp2430_gpio_data = {
215 .gpio_base = OMAP_MAX_GPIO_LINES,
216 .irq_base = TWL4030_GPIO_IRQ_BASE,
217 .irq_end = TWL4030_GPIO_IRQ_END,
218}; 214};
219 215
220static struct twl4030_platform_data sdp2430_twldata = { 216static struct twl4030_platform_data sdp2430_twldata = {
@@ -235,7 +231,7 @@ static int __init omap2430_i2c_init(void)
235 sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78); 231 sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78);
236 omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, 232 omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
237 ARRAY_SIZE(sdp2430_i2c1_boardinfo)); 233 ARRAY_SIZE(sdp2430_i2c1_boardinfo));
238 omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ, 234 omap_pmic_init(2, 100, "twl4030", 7 + OMAP_INTC_START,
239 &sdp2430_twldata); 235 &sdp2430_twldata);
240 return 0; 236 return 0;
241} 237}
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index a98c688058a9..96cd3693e1ae 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -24,14 +24,12 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/mmc/host.h> 26#include <linux/mmc/host.h>
27#include <linux/platform_data/spi-omap2-mcspi.h>
27 28
28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32 32
33#include <plat/mcspi.h>
34#include <plat/board.h>
35#include <plat/usb.h> 33#include <plat/usb.h>
36#include "common.h" 34#include "common.h"
37#include <plat/dma.h> 35#include <plat/dma.h>
@@ -39,7 +37,7 @@
39#include <video/omapdss.h> 37#include <video/omapdss.h>
40#include <video/omap-panel-tfp410.h> 38#include <video/omap-panel-tfp410.h>
41 39
42#include <plat/gpmc-smc91x.h> 40#include "gpmc-smc91x.h"
43 41
44#include "board-flash.h" 42#include "board-flash.h"
45#include "mux.h" 43#include "mux.h"
@@ -191,9 +189,6 @@ static struct omap_dss_board_info sdp3430_dss_data = {
191 .default_device = &sdp3430_lcd_device, 189 .default_device = &sdp3430_lcd_device,
192}; 190};
193 191
194static struct omap_board_config_kernel sdp3430_config[] __initdata = {
195};
196
197static struct omap2_hsmmc_info mmc[] = { 192static struct omap2_hsmmc_info mmc[] = {
198 { 193 {
199 .mmc = 1, 194 .mmc = 1,
@@ -233,9 +228,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
233} 228}
234 229
235static struct twl4030_gpio_platform_data sdp3430_gpio_data = { 230static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
236 .gpio_base = OMAP_MAX_GPIO_LINES,
237 .irq_base = TWL4030_GPIO_IRQ_BASE,
238 .irq_end = TWL4030_GPIO_IRQ_END,
239 .pulldowns = BIT(2) | BIT(6) | BIT(8) | BIT(13) 231 .pulldowns = BIT(2) | BIT(6) | BIT(8) | BIT(13)
240 | BIT(16) | BIT(17), 232 | BIT(16) | BIT(17),
241 .setup = sdp3430_twl_gpio_setup, 233 .setup = sdp3430_twl_gpio_setup,
@@ -576,8 +568,6 @@ static void __init omap_3430sdp_init(void)
576 int gpio_pendown; 568 int gpio_pendown;
577 569
578 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 570 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
579 omap_board_config = sdp3430_config;
580 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
581 omap_hsmmc_init(mmc); 571 omap_hsmmc_init(mmc);
582 omap3430_i2c_init(); 572 omap3430_i2c_init();
583 omap_display_init(&sdp3430_dss_data); 573 omap_display_init(&sdp3430_dss_data);
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 2dc9ba523c7a..fc224ad86747 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -17,8 +17,7 @@
17#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
18 18
19#include "common.h" 19#include "common.h"
20#include <plat/board.h> 20#include "gpmc-smc91x.h"
21#include <plat/gpmc-smc91x.h>
22#include <plat/usb.h> 21#include <plat/usb.h>
23 22
24#include <mach/board-zoom.h> 23#include <mach/board-zoom.h>
@@ -67,9 +66,6 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
67 .reset_gpio_port[2] = -EINVAL 66 .reset_gpio_port[2] = -EINVAL
68}; 67};
69 68
70static struct omap_board_config_kernel sdp_config[] __initdata = {
71};
72
73#ifdef CONFIG_OMAP_MUX 69#ifdef CONFIG_OMAP_MUX
74static struct omap_board_mux board_mux[] __initdata = { 70static struct omap_board_mux board_mux[] __initdata = {
75 { .reg_offset = OMAP_MUX_TERMINATOR }, 71 { .reg_offset = OMAP_MUX_TERMINATOR },
@@ -197,8 +193,6 @@ static struct flash_partitions sdp_flash_partitions[] = {
197static void __init omap_sdp_init(void) 193static void __init omap_sdp_init(void)
198{ 194{
199 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); 195 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
200 omap_board_config = sdp_config;
201 omap_board_config_size = ARRAY_SIZE(sdp_config);
202 zoom_peripherals_init(); 196 zoom_peripherals_init();
203 omap_sdrc_init(h8mbx00u0mer0em_sdrc_params, 197 omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
204 h8mbx00u0mer0em_sdrc_params); 198 h8mbx00u0mer0em_sdrc_params);
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index ad8a7d94afcd..749ce9634e8e 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -28,23 +28,22 @@
28#include <linux/leds_pwm.h> 28#include <linux/leds_pwm.h>
29#include <linux/platform_data/omap4-keypad.h> 29#include <linux/platform_data/omap4-keypad.h>
30 30
31#include <mach/hardware.h>
32#include <asm/hardware/gic.h> 31#include <asm/hardware/gic.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 34#include <asm/mach/map.h>
36 35
37#include <plat/board.h>
38#include "common.h" 36#include "common.h"
39#include <plat/usb.h> 37#include <plat/usb.h>
40#include <plat/mmc.h> 38#include <plat/mmc.h>
41#include <plat/omap4-keypad.h> 39#include "omap4-keypad.h"
42#include <video/omapdss.h> 40#include <video/omapdss.h>
43#include <video/omap-panel-nokia-dsi.h> 41#include <video/omap-panel-nokia-dsi.h>
44#include <video/omap-panel-picodlp.h> 42#include <video/omap-panel-picodlp.h>
45#include <linux/wl12xx.h> 43#include <linux/wl12xx.h>
46#include <linux/platform_data/omap-abe-twl6040.h> 44#include <linux/platform_data/omap-abe-twl6040.h>
47 45
46#include "soc.h"
48#include "mux.h" 47#include "mux.h"
49#include "hsmmc.h" 48#include "hsmmc.h"
50#include "control.h" 49#include "control.h"
@@ -544,7 +543,14 @@ static struct twl6040_platform_data twl6040_data = {
544 .codec = &twl6040_codec, 543 .codec = &twl6040_codec,
545 .vibra = &twl6040_vibra, 544 .vibra = &twl6040_vibra,
546 .audpwron_gpio = 127, 545 .audpwron_gpio = 127,
547 .irq_base = TWL6040_CODEC_IRQ_BASE, 546};
547
548static struct i2c_board_info __initdata sdp4430_i2c_1_boardinfo[] = {
549 {
550 I2C_BOARD_INFO("twl6040", 0x4b),
551 .irq = 119 + OMAP44XX_IRQ_GIC_START,
552 .platform_data = &twl6040_data,
553 },
548}; 554};
549 555
550static struct twl4030_platform_data sdp4430_twldata = { 556static struct twl4030_platform_data sdp4430_twldata = {
@@ -580,8 +586,8 @@ static int __init omap4_i2c_init(void)
580 TWL_COMMON_REGULATOR_CLK32KG | 586 TWL_COMMON_REGULATOR_CLK32KG |
581 TWL_COMMON_REGULATOR_V1V8 | 587 TWL_COMMON_REGULATOR_V1V8 |
582 TWL_COMMON_REGULATOR_V2V1); 588 TWL_COMMON_REGULATOR_V2V1);
583 omap4_pmic_init("twl6030", &sdp4430_twldata, 589 omap4_pmic_init("twl6030", &sdp4430_twldata, sdp4430_i2c_1_boardinfo,
584 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 590 ARRAY_SIZE(sdp4430_i2c_1_boardinfo));
585 omap_register_i2c_bus(2, 400, NULL, 0); 591 omap_register_i2c_bus(2, 400, NULL, 0);
586 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, 592 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
587 ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); 593 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 92432c28673d..318feadb1d6e 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -21,12 +21,10 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23 23
24#include <mach/hardware.h>
25#include <asm/mach-types.h> 24#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 26#include <asm/mach/map.h>
28 27
29#include <plat/board.h>
30#include "common.h" 28#include "common.h"
31#include <plat/usb.h> 29#include <plat/usb.h>
32 30
@@ -37,11 +35,6 @@
37#define GPIO_USB_POWER 35 35#define GPIO_USB_POWER 35
38#define GPIO_USB_NRESET 38 36#define GPIO_USB_NRESET 38
39 37
40
41/* Board initialization */
42static struct omap_board_config_kernel am3517_crane_config[] __initdata = {
43};
44
45#ifdef CONFIG_OMAP_MUX 38#ifdef CONFIG_OMAP_MUX
46static struct omap_board_mux board_mux[] __initdata = { 39static struct omap_board_mux board_mux[] __initdata = {
47 { .reg_offset = OMAP_MUX_TERMINATOR }, 40 { .reg_offset = OMAP_MUX_TERMINATOR },
@@ -67,9 +60,6 @@ static void __init am3517_crane_init(void)
67 omap_serial_init(); 60 omap_serial_init();
68 omap_sdrc_init(NULL, NULL); 61 omap_sdrc_init(NULL, NULL);
69 62
70 omap_board_config = am3517_crane_config;
71 omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
72
73 /* Configure GPIO for EHCI port */ 63 /* Configure GPIO for EHCI port */
74 if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { 64 if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {
75 pr_err("Can not configure mux for GPIO_USB_NRESET %d\n", 65 pr_err("Can not configure mux for GPIO_USB_NRESET %d\n",
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 18f601096ce1..0d99c9110d01 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -25,14 +25,13 @@
25#include <linux/can/platform/ti_hecc.h> 25#include <linux/can/platform/ti_hecc.h>
26#include <linux/davinci_emac.h> 26#include <linux/davinci_emac.h>
27#include <linux/mmc/host.h> 27#include <linux/mmc/host.h>
28#include <linux/platform_data/gpio-omap.h>
28 29
29#include <mach/hardware.h> 30#include "am35xx.h"
30#include <mach/am35xx.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34 34
35#include <plat/board.h>
36#include "common.h" 35#include "common.h"
37#include <plat/usb.h> 36#include <plat/usb.h>
38#include <video/omapdss.h> 37#include <video/omapdss.h>
@@ -296,8 +295,7 @@ static struct resource am3517_hecc_resources[] = {
296 .flags = IORESOURCE_MEM, 295 .flags = IORESOURCE_MEM,
297 }, 296 },
298 { 297 {
299 .start = INT_35XX_HECC0_IRQ, 298 .start = 24 + OMAP_INTC_START,
300 .end = INT_35XX_HECC0_IRQ,
301 .flags = IORESOURCE_IRQ, 299 .flags = IORESOURCE_IRQ,
302 }, 300 },
303}; 301};
@@ -324,9 +322,6 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata)
324 platform_device_register(&am3517_hecc_device); 322 platform_device_register(&am3517_hecc_device);
325} 323}
326 324
327static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
328};
329
330static struct omap2_hsmmc_info mmc[] = { 325static struct omap2_hsmmc_info mmc[] = {
331 { 326 {
332 .mmc = 1, 327 .mmc = 1,
@@ -346,8 +341,6 @@ static struct omap2_hsmmc_info mmc[] = {
346 341
347static void __init am3517_evm_init(void) 342static void __init am3517_evm_init(void)
348{ 343{
349 omap_board_config = am3517_evm_config;
350 omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
351 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 344 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
352 345
353 am3517_evm_i2c_init(); 346 am3517_evm_i2c_init();
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index e5fa46bfde2f..3e2d76f05af4 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -29,13 +29,11 @@
29#include <linux/smc91x.h> 29#include <linux/smc91x.h>
30#include <linux/gpio.h> 30#include <linux/gpio.h>
31 31
32#include <mach/hardware.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
35#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
36 35
37#include <plat/led.h> 36#include <plat/led.h>
38#include <plat/board.h>
39#include "common.h" 37#include "common.h"
40#include <plat/gpmc.h> 38#include <plat/gpmc.h>
41 39
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 97d719047af3..8ffd612c5e07 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -23,6 +23,7 @@
23#include <linux/input/matrix_keypad.h> 23#include <linux/input/matrix_keypad.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/platform_data/gpio-omap.h>
26 27
27#include <linux/i2c/at24.h> 28#include <linux/i2c/at24.h>
28#include <linux/i2c/twl.h> 29#include <linux/i2c/twl.h>
@@ -37,15 +38,14 @@
37#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
38#include <asm/mach/map.h> 39#include <asm/mach/map.h>
39 40
40#include <plat/board.h>
41#include "common.h" 41#include "common.h"
42#include <plat/nand.h> 42#include <linux/platform_data/mtd-nand-omap2.h>
43#include <plat/gpmc.h> 43#include <plat/gpmc.h>
44#include <plat/usb.h> 44#include <plat/usb.h>
45#include <video/omapdss.h> 45#include <video/omapdss.h>
46#include <video/omap-panel-generic-dpi.h> 46#include <video/omap-panel-generic-dpi.h>
47#include <video/omap-panel-tfp410.h> 47#include <video/omap-panel-tfp410.h>
48#include <plat/mcspi.h> 48#include <linux/platform_data/spi-omap2-mcspi.h>
49 49
50#include <mach/hardware.h> 50#include <mach/hardware.h>
51 51
@@ -64,7 +64,7 @@
64 64
65#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 65#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
66#include <linux/smsc911x.h> 66#include <linux/smsc911x.h>
67#include <plat/gpmc-smsc911x.h> 67#include "gpmc-smsc911x.h"
68 68
69static struct omap_smsc911x_platform_data cm_t35_smsc911x_cfg = { 69static struct omap_smsc911x_platform_data cm_t35_smsc911x_cfg = {
70 .id = 0, 70 .id = 0,
@@ -470,9 +470,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
470} 470}
471 471
472static struct twl4030_gpio_platform_data cm_t35_gpio_data = { 472static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
473 .gpio_base = OMAP_MAX_GPIO_LINES,
474 .irq_base = TWL4030_GPIO_IRQ_BASE,
475 .irq_end = TWL4030_GPIO_IRQ_END,
476 .setup = cm_t35_twl_gpio_setup, 473 .setup = cm_t35_twl_gpio_setup,
477}; 474};
478 475
@@ -714,13 +711,8 @@ static inline void cm_t35_init_mux(void) {}
714static inline void cm_t3730_init_mux(void) {} 711static inline void cm_t3730_init_mux(void) {}
715#endif 712#endif
716 713
717static struct omap_board_config_kernel cm_t35_config[] __initdata = {
718};
719
720static void __init cm_t3x_common_init(void) 714static void __init cm_t3x_common_init(void)
721{ 715{
722 omap_board_config = cm_t35_config;
723 omap_board_config_size = ARRAY_SIZE(cm_t35_config);
724 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 716 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
725 omap_serial_init(); 717 omap_serial_init();
726 omap_sdrc_init(mt46h32m32lf6_sdrc_params, 718 omap_sdrc_init(mt46h32m32lf6_sdrc_params,
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index a33ad4641d9a..59c0a45f75b0 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -38,13 +38,12 @@
38#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40 40
41#include <plat/board.h>
42#include "common.h" 41#include "common.h"
43#include <plat/usb.h> 42#include <plat/usb.h>
44#include <plat/nand.h> 43#include <linux/platform_data/mtd-nand-omap2.h>
45#include <plat/gpmc.h> 44#include <plat/gpmc.h>
46 45
47#include <mach/am35xx.h> 46#include "am35xx.h"
48 47
49#include "mux.h" 48#include "mux.h"
50#include "control.h" 49#include "control.h"
@@ -90,8 +89,7 @@ static struct resource cm_t3517_hecc_resources[] = {
90 .flags = IORESOURCE_MEM, 89 .flags = IORESOURCE_MEM,
91 }, 90 },
92 { 91 {
93 .start = INT_35XX_HECC0_IRQ, 92 .start = 24 + OMAP_INTC_START,
94 .end = INT_35XX_HECC0_IRQ,
95 .flags = IORESOURCE_IRQ, 93 .flags = IORESOURCE_IRQ,
96 }, 94 },
97}; 95};
@@ -249,9 +247,6 @@ static void __init cm_t3517_init_nand(void)
249static inline void cm_t3517_init_nand(void) {} 247static inline void cm_t3517_init_nand(void) {}
250#endif 248#endif
251 249
252static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
253};
254
255#ifdef CONFIG_OMAP_MUX 250#ifdef CONFIG_OMAP_MUX
256static struct omap_board_mux board_mux[] __initdata = { 251static struct omap_board_mux board_mux[] __initdata = {
257 /* GPIO186 - Green LED */ 252 /* GPIO186 - Green LED */
@@ -285,8 +280,6 @@ static void __init cm_t3517_init(void)
285 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 280 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
286 omap_serial_init(); 281 omap_serial_init();
287 omap_sdrc_init(NULL, NULL); 282 omap_sdrc_init(NULL, NULL);
288 omap_board_config = cm_t3517_config;
289 omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
290 cm_t3517_init_leds(); 283 cm_t3517_init_leds();
291 cm_t3517_init_nand(); 284 cm_t3517_init_nand();
292 cm_t3517_init_rtc(); 285 cm_t3517_init_rtc();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 6567c1cd5572..7bb8056d4388 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -32,31 +32,27 @@
32 32
33#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
34#include <linux/i2c/twl.h> 34#include <linux/i2c/twl.h>
35 35#include "id.h"
36#include <mach/hardware.h>
37#include <mach/id.h>
38#include <asm/mach-types.h> 36#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
40#include <asm/mach/map.h> 38#include <asm/mach/map.h>
41#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
42 40
43#include <plat/board.h>
44#include "common.h" 41#include "common.h"
45#include <plat/gpmc.h> 42#include <plat/gpmc.h>
46#include <plat/nand.h> 43#include <linux/platform_data/mtd-nand-omap2.h>
47#include <plat/usb.h> 44#include <plat/usb.h>
48#include <video/omapdss.h> 45#include <video/omapdss.h>
49#include <video/omap-panel-generic-dpi.h> 46#include <video/omap-panel-generic-dpi.h>
50#include <video/omap-panel-tfp410.h> 47#include <video/omap-panel-tfp410.h>
51 48
52#include <plat/mcspi.h> 49#include <linux/platform_data/spi-omap2-mcspi.h>
53#include <linux/input/matrix_keypad.h> 50#include <linux/input/matrix_keypad.h>
54#include <linux/spi/spi.h> 51#include <linux/spi/spi.h>
55#include <linux/dm9000.h> 52#include <linux/dm9000.h>
56#include <linux/interrupt.h> 53#include <linux/interrupt.h>
57 54
58#include "sdram-micron-mt46h32m32lf-6.h" 55#include "sdram-micron-mt46h32m32lf-6.h"
59
60#include "mux.h" 56#include "mux.h"
61#include "hsmmc.h" 57#include "hsmmc.h"
62#include "common-board-devices.h" 58#include "common-board-devices.h"
@@ -236,9 +232,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
236} 232}
237 233
238static struct twl4030_gpio_platform_data devkit8000_gpio_data = { 234static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
239 .gpio_base = OMAP_MAX_GPIO_LINES,
240 .irq_base = TWL4030_GPIO_IRQ_BASE,
241 .irq_end = TWL4030_GPIO_IRQ_END,
242 .use_leds = true, 235 .use_leds = true,
243 .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13) 236 .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13)
244 | BIT(15) | BIT(16) | BIT(17), 237 | BIT(15) | BIT(16) | BIT(17),
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index 53c39d239d6e..0cabe61cd507 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -16,13 +16,14 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <plat/irqs.h>
20 19
20#include <plat/cpu.h>
21#include <plat/gpmc.h> 21#include <plat/gpmc.h>
22#include <plat/nand.h> 22#include <linux/platform_data/mtd-nand-omap2.h>
23#include <plat/onenand.h> 23#include <linux/platform_data/mtd-onenand-omap2.h>
24#include <plat/tc.h> 24#include <plat/tc.h>
25 25
26#include "common.h"
26#include "board-flash.h" 27#include "board-flash.h"
27 28
28#define REG_FPGA_REV 0x10 29#define REG_FPGA_REV 0x10
@@ -140,7 +141,6 @@ __init board_nand_init(struct mtd_partition *nand_parts,
140 board_nand_data.devsize = nand_type; 141 board_nand_data.devsize = nand_type;
141 142
142 board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT; 143 board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT;
143 board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs;
144 gpmc_nand_init(&board_nand_data); 144 gpmc_nand_init(&board_nand_data);
145} 145}
146#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ 146#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 6f93a20536ea..2ea7c577b295 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -16,11 +16,9 @@
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/irqdomain.h> 17#include <linux/irqdomain.h>
18 18
19#include <mach/hardware.h>
20#include <asm/hardware/gic.h> 19#include <asm/hardware/gic.h>
21#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
22 21
23#include <plat/board.h>
24#include "common.h" 22#include "common.h"
25#include "common-board-devices.h" 23#include "common-board-devices.h"
26 24
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index ace20482e3e1..f6c48dd764fe 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -27,20 +27,19 @@
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/input/matrix_keypad.h> 28#include <linux/input/matrix_keypad.h>
29 29
30#include <mach/hardware.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>
36#include "common.h"
37#include <plat/menelaus.h> 34#include <plat/menelaus.h>
38#include <plat/dma.h> 35#include <plat/dma.h>
39#include <plat/gpmc.h> 36#include <plat/gpmc.h>
37#include "debug-devices.h"
40 38
41#include <video/omapdss.h> 39#include <video/omapdss.h>
42#include <video/omap-panel-generic-dpi.h> 40#include <video/omap-panel-generic-dpi.h>
43 41
42#include "common.h"
44#include "mux.h" 43#include "mux.h"
45#include "control.h" 44#include "control.h"
46 45
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 28214483aaba..fb8bd837dd13 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -29,13 +29,13 @@
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31 31
32#include <plat/board.h>
33#include "common.h" 32#include "common.h"
34#include <plat/gpmc.h> 33#include <plat/gpmc.h>
35#include <plat/usb.h> 34#include <plat/usb.h>
35
36#include <video/omapdss.h> 36#include <video/omapdss.h>
37#include <video/omap-panel-tfp410.h> 37#include <video/omap-panel-tfp410.h>
38#include <plat/onenand.h> 38#include <linux/platform_data/mtd-onenand-omap2.h>
39 39
40#include "mux.h" 40#include "mux.h"
41#include "hsmmc.h" 41#include "hsmmc.h"
@@ -192,7 +192,7 @@ static void __init igep_flash_init(void) {}
192#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 192#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
193 193
194#include <linux/smsc911x.h> 194#include <linux/smsc911x.h>
195#include <plat/gpmc-smsc911x.h> 195#include "gpmc-smsc911x.h"
196 196
197static struct omap_smsc911x_platform_data smsc911x_cfg = { 197static struct omap_smsc911x_platform_data smsc911x_cfg = {
198 .cs = IGEP2_SMSC911X_CS, 198 .cs = IGEP2_SMSC911X_CS,
@@ -425,9 +425,6 @@ static int igep_twl_gpio_setup(struct device *dev,
425}; 425};
426 426
427static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { 427static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
428 .gpio_base = OMAP_MAX_GPIO_LINES,
429 .irq_base = TWL4030_GPIO_IRQ_BASE,
430 .irq_end = TWL4030_GPIO_IRQ_END,
431 .use_leds = true, 428 .use_leds = true,
432 .setup = igep_twl_gpio_setup, 429 .setup = igep_twl_gpio_setup,
433}; 430};
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index ef9e82977499..ee8c3cfb95b3 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -28,21 +28,17 @@
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
31#include <linux/platform_data/spi-omap2-mcspi.h>
31 32
32#include <mach/hardware.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include <plat/mcspi.h>
38#include <plat/board.h>
39#include "common.h" 37#include "common.h"
40#include <plat/gpmc.h> 38#include <plat/gpmc.h>
41#include <mach/board-zoom.h> 39#include <mach/board-zoom.h>
42
43#include <asm/delay.h>
44#include <plat/usb.h> 40#include <plat/usb.h>
45#include <plat/gpmc-smsc911x.h> 41#include "gpmc-smsc911x.h"
46 42
47#include <video/omapdss.h> 43#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 44#include <video/omap-panel-generic-dpi.h>
@@ -275,9 +271,6 @@ static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
275} 271}
276 272
277static struct twl4030_gpio_platform_data ldp_gpio_data = { 273static struct twl4030_gpio_platform_data ldp_gpio_data = {
278 .gpio_base = OMAP_MAX_GPIO_LINES,
279 .irq_base = TWL4030_GPIO_IRQ_BASE,
280 .irq_end = TWL4030_GPIO_IRQ_END,
281 .setup = ldp_twl_gpio_setup, 274 .setup = ldp_twl_gpio_setup,
282}; 275};
283 276
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 677357ff61ac..d95f727ca39a 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -20,19 +20,16 @@
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/usb/musb.h> 22#include <linux/usb/musb.h>
23#include <linux/platform_data/spi-omap2-mcspi.h>
24#include <linux/platform_data/mtd-onenand-omap2.h>
23#include <sound/tlv320aic3x.h> 25#include <sound/tlv320aic3x.h>
24 26
25#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
26#include <asm/mach-types.h> 28#include <asm/mach-types.h>
27 29
28#include <plat/board.h>
29#include "common.h" 30#include "common.h"
30#include <plat/menelaus.h> 31#include <plat/menelaus.h>
31#include <mach/irqs.h>
32#include <plat/mcspi.h>
33#include <plat/onenand.h>
34#include <plat/mmc.h> 32#include <plat/mmc.h>
35#include <plat/serial.h>
36 33
37#include "mux.h" 34#include "mux.h"
38 35
@@ -553,8 +550,8 @@ static int n8x0_auto_sleep_regulators(void)
553 550
554 ret = menelaus_set_regulator_sleep(1, val); 551 ret = menelaus_set_regulator_sleep(1, val);
555 if (ret < 0) { 552 if (ret < 0) {
556 printk(KERN_ERR "Could not set regulators to sleep on " 553 pr_err("Could not set regulators to sleep on menelaus: %u\n",
557 "menelaus: %u\n", ret); 554 ret);
558 return ret; 555 return ret;
559 } 556 }
560 return 0; 557 return 0;
@@ -566,8 +563,7 @@ static int n8x0_auto_voltage_scale(void)
566 563
567 ret = menelaus_set_vcore_hw(1400, 1050); 564 ret = menelaus_set_vcore_hw(1400, 1050);
568 if (ret < 0) { 565 if (ret < 0) {
569 printk(KERN_ERR "Could not set VCORE voltage on " 566 pr_err("Could not set VCORE voltage on menelaus: %u\n", ret);
570 "menelaus: %u\n", ret);
571 return ret; 567 return ret;
572 } 568 }
573 return 0; 569 return 0;
@@ -600,7 +596,7 @@ static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
600static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = { 596static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = {
601 { 597 {
602 I2C_BOARD_INFO("menelaus", 0x72), 598 I2C_BOARD_INFO("menelaus", 0x72),
603 .irq = INT_24XX_SYS_NIRQ, 599 .irq = 7 + OMAP_INTC_START,
604 .platform_data = &n8x0_menelaus_platform_data, 600 .platform_data = &n8x0_menelaus_platform_data,
605 }, 601 },
606}; 602};
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 6202fc76e490..68ff8d51973c 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -33,18 +33,16 @@
33#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
34#include <linux/i2c/twl.h> 34#include <linux/i2c/twl.h>
35 35
36#include <mach/hardware.h>
37#include <asm/mach-types.h> 36#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 38#include <asm/mach/map.h>
40#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
41 40
42#include <plat/board.h>
43#include "common.h" 41#include "common.h"
44#include <video/omapdss.h> 42#include <video/omapdss.h>
45#include <video/omap-panel-tfp410.h> 43#include <video/omap-panel-tfp410.h>
46#include <plat/gpmc.h> 44#include <plat/gpmc.h>
47#include <plat/nand.h> 45#include <linux/platform_data/mtd-nand-omap2.h>
48#include <plat/usb.h> 46#include <plat/usb.h>
49#include <plat/omap_device.h> 47#include <plat/omap_device.h>
50 48
@@ -297,9 +295,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
297} 295}
298 296
299static struct twl4030_gpio_platform_data beagle_gpio_data = { 297static struct twl4030_gpio_platform_data beagle_gpio_data = {
300 .gpio_base = OMAP_MAX_GPIO_LINES,
301 .irq_base = TWL4030_GPIO_IRQ_BASE,
302 .irq_end = TWL4030_GPIO_IRQ_END,
303 .use_leds = true, 298 .use_leds = true,
304 .pullups = BIT(1), 299 .pullups = BIT(1),
305 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) 300 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3d2a988e3d9a..c64e565bdef5 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -41,16 +41,14 @@
41#include <linux/mmc/host.h> 41#include <linux/mmc/host.h>
42#include <linux/export.h> 42#include <linux/export.h>
43 43
44#include <mach/hardware.h>
45#include <asm/mach-types.h> 44#include <asm/mach-types.h>
46#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
47#include <asm/mach/map.h> 46#include <asm/mach/map.h>
48 47
49#include <plat/board.h>
50#include <plat/usb.h> 48#include <plat/usb.h>
51#include <plat/nand.h> 49#include <linux/platform_data/mtd-nand-omap2.h>
52#include "common.h" 50#include "common.h"
53#include <plat/mcspi.h> 51#include <linux/platform_data/spi-omap2-mcspi.h>
54#include <video/omapdss.h> 52#include <video/omapdss.h>
55#include <video/omap-panel-tfp410.h> 53#include <video/omap-panel-tfp410.h>
56 54
@@ -76,6 +74,18 @@
76#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64 74#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64
77#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7 75#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7
78 76
77/*
78 * OMAP35x EVM revision
79 * Run time detection of EVM revision is done by reading Ethernet
80 * PHY ID -
81 * GEN_1 = 0x01150000
82 * GEN_2 = 0x92200000
83 */
84enum {
85 OMAP3EVM_BOARD_GEN_1 = 0, /* EVM Rev between A - D */
86 OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */
87};
88
79static u8 omap3_evm_version; 89static u8 omap3_evm_version;
80 90
81u8 get_omap3_evm_rev(void) 91u8 get_omap3_evm_rev(void)
@@ -109,7 +119,7 @@ static void __init omap3_evm_get_revision(void)
109} 119}
110 120
111#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 121#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
112#include <plat/gpmc-smsc911x.h> 122#include "gpmc-smsc911x.h"
113 123
114static struct omap_smsc911x_platform_data smsc911x_cfg = { 124static struct omap_smsc911x_platform_data smsc911x_cfg = {
115 .cs = OMAP3EVM_SMSC911X_CS, 125 .cs = OMAP3EVM_SMSC911X_CS,
@@ -378,9 +388,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
378} 388}
379 389
380static struct twl4030_gpio_platform_data omap3evm_gpio_data = { 390static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
381 .gpio_base = OMAP_MAX_GPIO_LINES,
382 .irq_base = TWL4030_GPIO_IRQ_BASE,
383 .irq_end = TWL4030_GPIO_IRQ_END,
384 .use_leds = true, 391 .use_leds = true,
385 .setup = omap3evm_twl_gpio_setup, 392 .setup = omap3evm_twl_gpio_setup,
386}; 393};
@@ -527,9 +534,6 @@ static int __init omap3_evm_i2c_init(void)
527 return 0; 534 return 0;
528} 535}
529 536
530static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
531};
532
533static struct usbhs_omap_board_data usbhs_bdata __initdata = { 537static struct usbhs_omap_board_data usbhs_bdata __initdata = {
534 538
535 .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, 539 .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
@@ -689,9 +693,6 @@ static void __init omap3_evm_init(void)
689 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux; 693 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
690 omap3_mux_init(obm, OMAP_PACKAGE_CBB); 694 omap3_mux_init(obm, OMAP_PACKAGE_CBB);
691 695
692 omap_board_config = omap3_evm_config;
693 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
694
695 omap_mux_init_gpio(63, OMAP_PIN_INPUT); 696 omap_mux_init_gpio(63, OMAP_PIN_INPUT);
696 omap_hsmmc_init(mmc); 697 omap_hsmmc_init(mmc);
697 698
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index fca93d1afd43..7bd8253b5d1d 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -30,24 +30,21 @@
30#include <linux/i2c/twl.h> 30#include <linux/i2c/twl.h>
31#include <linux/mmc/host.h> 31#include <linux/mmc/host.h>
32 32
33#include <mach/hardware.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 36
37#include "gpmc-smsc911x.h"
38#include <plat/gpmc.h>
39#include <plat/sdrc.h>
40#include <plat/usb.h>
41
42#include "common.h"
38#include "mux.h" 43#include "mux.h"
39#include "hsmmc.h" 44#include "hsmmc.h"
40#include "control.h" 45#include "control.h"
41#include "common-board-devices.h" 46#include "common-board-devices.h"
42 47
43#include <plat/mux.h>
44#include <plat/board.h>
45#include "common.h"
46#include <plat/gpmc-smsc911x.h>
47#include <plat/gpmc.h>
48#include <plat/sdrc.h>
49#include <plat/usb.h>
50
51#define OMAP3LOGIC_SMSC911X_CS 1 48#define OMAP3LOGIC_SMSC911X_CS 1
52 49
53#define OMAP3530_LV_SOM_MMC_GPIO_CD 110 50#define OMAP3530_LV_SOM_MMC_GPIO_CD 110
@@ -78,9 +75,6 @@ static struct regulator_init_data omap3logic_vmmc1 = {
78}; 75};
79 76
80static struct twl4030_gpio_platform_data omap3logic_gpio_data = { 77static struct twl4030_gpio_platform_data omap3logic_gpio_data = {
81 .gpio_base = OMAP_MAX_GPIO_LINES,
82 .irq_base = TWL4030_GPIO_IRQ_BASE,
83 .irq_end = TWL4030_GPIO_IRQ_END,
84 .use_leds = true, 78 .use_leds = true,
85 .pullups = BIT(1), 79 .pullups = BIT(1),
86 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) 80 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8)
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 57aebee44fd0..00a1f4ae6e44 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -35,18 +35,16 @@
35#include <linux/mmc/host.h> 35#include <linux/mmc/host.h>
36#include <linux/mmc/card.h> 36#include <linux/mmc/card.h>
37#include <linux/regulator/fixed.h> 37#include <linux/regulator/fixed.h>
38#include <linux/platform_data/spi-omap2-mcspi.h>
38 39
39#include <asm/mach-types.h> 40#include <asm/mach-types.h>
40#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
41#include <asm/mach/map.h> 42#include <asm/mach/map.h>
42 43
43#include <plat/board.h>
44#include "common.h" 44#include "common.h"
45#include <mach/hardware.h>
46#include <plat/mcspi.h>
47#include <plat/usb.h> 45#include <plat/usb.h>
48#include <video/omapdss.h> 46#include <video/omapdss.h>
49#include <plat/nand.h> 47#include <linux/platform_data/mtd-nand-omap2.h>
50 48
51#include "mux.h" 49#include "mux.h"
52#include "sdram-micron-mt46h32m32lf-6.h" 50#include "sdram-micron-mt46h32m32lf-6.h"
@@ -321,9 +319,6 @@ static int omap3pandora_twl_gpio_setup(struct device *dev,
321} 319}
322 320
323static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { 321static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
324 .gpio_base = OMAP_MAX_GPIO_LINES,
325 .irq_base = TWL4030_GPIO_IRQ_BASE,
326 .irq_end = TWL4030_GPIO_IRQ_END,
327 .setup = omap3pandora_twl_gpio_setup, 322 .setup = omap3pandora_twl_gpio_setup,
328}; 323};
329 324
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index b318f5602e36..c7f3d026e6d4 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -28,23 +28,26 @@
28#include <linux/regulator/machine.h> 28#include <linux/regulator/machine.h>
29#include <linux/i2c/twl.h> 29#include <linux/i2c/twl.h>
30#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
31#include <linux/input/matrix_keypad.h>
32#include <linux/spi/spi.h>
33#include <linux/interrupt.h>
34#include <linux/smsc911x.h>
35#include <linux/i2c/at24.h>
31 36
32#include <mach/hardware.h>
33#include <asm/mach-types.h> 37#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 39#include <asm/mach/map.h>
36#include <asm/mach/flash.h> 40#include <asm/mach/flash.h>
37 41
38#include <plat/board.h>
39#include "common.h" 42#include "common.h"
40#include <plat/gpmc.h> 43#include <plat/gpmc.h>
41#include <plat/nand.h> 44#include <linux/platform_data/mtd-nand-omap2.h>
42#include <plat/usb.h> 45#include <plat/usb.h>
43#include <video/omapdss.h> 46#include <video/omapdss.h>
44#include <video/omap-panel-generic-dpi.h> 47#include <video/omap-panel-generic-dpi.h>
45#include <video/omap-panel-tfp410.h> 48#include <video/omap-panel-tfp410.h>
46 49
47#include <plat/mcspi.h> 50#include <linux/platform_data/spi-omap2-mcspi.h>
48#include <linux/input/matrix_keypad.h> 51#include <linux/input/matrix_keypad.h>
49#include <linux/spi/spi.h> 52#include <linux/spi/spi.h>
50#include <linux/interrupt.h> 53#include <linux/interrupt.h>
@@ -57,7 +60,7 @@
57#include "common-board-devices.h" 60#include "common-board-devices.h"
58 61
59#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 62#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
60#include <plat/gpmc-smsc911x.h> 63#include "gpmc-smsc911x.h"
61 64
62#define OMAP3STALKER_ETHR_START 0x2c000000 65#define OMAP3STALKER_ETHR_START 0x2c000000
63#define OMAP3STALKER_ETHR_SIZE 1024 66#define OMAP3STALKER_ETHR_SIZE 1024
@@ -279,9 +282,6 @@ omap3stalker_twl_gpio_setup(struct device *dev,
279} 282}
280 283
281static struct twl4030_gpio_platform_data omap3stalker_gpio_data = { 284static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
282 .gpio_base = OMAP_MAX_GPIO_LINES,
283 .irq_base = TWL4030_GPIO_IRQ_BASE,
284 .irq_end = TWL4030_GPIO_IRQ_END,
285 .use_leds = true, 285 .use_leds = true,
286 .setup = omap3stalker_twl_gpio_setup, 286 .setup = omap3stalker_twl_gpio_setup,
287}; 287};
@@ -362,9 +362,6 @@ static int __init omap3_stalker_i2c_init(void)
362 362
363#define OMAP3_STALKER_TS_GPIO 175 363#define OMAP3_STALKER_TS_GPIO 175
364 364
365static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
366};
367
368static struct platform_device *omap3_stalker_devices[] __initdata = { 365static struct platform_device *omap3_stalker_devices[] __initdata = {
369 &keys_gpio, 366 &keys_gpio,
370}; 367};
@@ -399,8 +396,6 @@ static void __init omap3_stalker_init(void)
399{ 396{
400 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 397 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
401 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 398 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
402 omap_board_config = omap3_stalker_config;
403 omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
404 399
405 omap_mux_init_gpio(23, OMAP_PIN_INPUT); 400 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
406 omap_hsmmc_init(mmc); 401 omap_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 485d14d6a8cd..944ffc436577 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -29,7 +29,7 @@
29#include <linux/mtd/nand.h> 29#include <linux/mtd/nand.h>
30#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
31 31
32#include <plat/mcspi.h> 32#include <linux/platform_data/spi-omap2-mcspi.h>
33#include <linux/spi/spi.h> 33#include <linux/spi/spi.h>
34 34
35#include <linux/spi/ads7846.h> 35#include <linux/spi/ads7846.h>
@@ -37,17 +37,15 @@
37#include <linux/regulator/machine.h> 37#include <linux/regulator/machine.h>
38#include <linux/i2c/twl.h> 38#include <linux/i2c/twl.h>
39 39
40#include <mach/hardware.h>
41#include <asm/mach-types.h> 40#include <asm/mach-types.h>
42#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
43#include <asm/mach/map.h> 42#include <asm/mach/map.h>
44#include <asm/mach/flash.h> 43#include <asm/mach/flash.h>
45#include <asm/system_info.h> 44#include <asm/system_info.h>
46 45
47#include <plat/board.h>
48#include "common.h" 46#include "common.h"
49#include <plat/gpmc.h> 47#include <plat/gpmc.h>
50#include <plat/nand.h> 48#include <linux/platform_data/mtd-nand-omap2.h>
51#include <plat/usb.h> 49#include <plat/usb.h>
52 50
53#include "mux.h" 51#include "mux.h"
@@ -139,9 +137,6 @@ static int touchbook_twl_gpio_setup(struct device *dev,
139} 137}
140 138
141static struct twl4030_gpio_platform_data touchbook_gpio_data = { 139static struct twl4030_gpio_platform_data touchbook_gpio_data = {
142 .gpio_base = OMAP_MAX_GPIO_LINES,
143 .irq_base = TWL4030_GPIO_IRQ_BASE,
144 .irq_end = TWL4030_GPIO_IRQ_END,
145 .use_leds = true, 140 .use_leds = true,
146 .pullups = BIT(1), 141 .pullups = BIT(1),
147 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) 142 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 70f6d1d25463..7b592d3d7797 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -32,19 +32,18 @@
32#include <linux/wl12xx.h> 32#include <linux/wl12xx.h>
33#include <linux/platform_data/omap-abe-twl6040.h> 33#include <linux/platform_data/omap-abe-twl6040.h>
34 34
35#include <mach/hardware.h>
36#include <asm/hardware/gic.h> 35#include <asm/hardware/gic.h>
37#include <asm/mach-types.h> 36#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 38#include <asm/mach/map.h>
40#include <video/omapdss.h> 39#include <video/omapdss.h>
41 40
42#include <plat/board.h>
43#include "common.h" 41#include "common.h"
44#include <plat/usb.h> 42#include <plat/usb.h>
45#include <plat/mmc.h> 43#include <plat/mmc.h>
46#include <video/omap-panel-tfp410.h> 44#include <video/omap-panel-tfp410.h>
47 45
46#include "soc.h"
48#include "hsmmc.h" 47#include "hsmmc.h"
49#include "control.h" 48#include "control.h"
50#include "mux.h" 49#include "mux.h"
@@ -263,7 +262,14 @@ static struct twl6040_codec_data twl6040_codec = {
263static struct twl6040_platform_data twl6040_data = { 262static struct twl6040_platform_data twl6040_data = {
264 .codec = &twl6040_codec, 263 .codec = &twl6040_codec,
265 .audpwron_gpio = 127, 264 .audpwron_gpio = 127,
266 .irq_base = TWL6040_CODEC_IRQ_BASE, 265};
266
267static struct i2c_board_info __initdata panda_i2c_1_boardinfo[] = {
268 {
269 I2C_BOARD_INFO("twl6040", 0x4b),
270 .irq = 119 + OMAP44XX_IRQ_GIC_START,
271 .platform_data = &twl6040_data,
272 },
267}; 273};
268 274
269/* Panda board uses the common PMIC configuration */ 275/* Panda board uses the common PMIC configuration */
@@ -293,8 +299,8 @@ static int __init omap4_panda_i2c_init(void)
293 TWL_COMMON_REGULATOR_CLK32KG | 299 TWL_COMMON_REGULATOR_CLK32KG |
294 TWL_COMMON_REGULATOR_V1V8 | 300 TWL_COMMON_REGULATOR_V1V8 |
295 TWL_COMMON_REGULATOR_V2V1); 301 TWL_COMMON_REGULATOR_V2V1);
296 omap4_pmic_init("twl6030", &omap4_panda_twldata, 302 omap4_pmic_init("twl6030", &omap4_panda_twldata, panda_i2c_1_boardinfo,
297 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 303 ARRAY_SIZE(panda_i2c_1_boardinfo));
298 omap_register_i2c_bus(2, 400, NULL, 0); 304 omap_register_i2c_bus(2, 400, NULL, 0);
299 /* 305 /*
300 * Bus 3 is attached to the DVI port where devices like the pico DLP 306 * Bus 3 is attached to the DVI port where devices like the pico DLP
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 779734d8ba37..2e7f24030fc9 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -37,21 +37,19 @@
37#include <linux/mtd/partitions.h> 37#include <linux/mtd/partitions.h>
38#include <linux/mmc/host.h> 38#include <linux/mmc/host.h>
39 39
40#include <linux/platform_data/mtd-nand-omap2.h>
41#include <linux/platform_data/spi-omap2-mcspi.h>
42
40#include <asm/mach-types.h> 43#include <asm/mach-types.h>
41#include <asm/mach/arch.h> 44#include <asm/mach/arch.h>
42#include <asm/mach/flash.h> 45#include <asm/mach/flash.h>
43#include <asm/mach/map.h> 46#include <asm/mach/map.h>
44 47
45#include <plat/board.h>
46#include "common.h" 48#include "common.h"
47#include <video/omapdss.h> 49#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 50#include <video/omap-panel-generic-dpi.h>
49#include <video/omap-panel-tfp410.h> 51#include <video/omap-panel-tfp410.h>
50#include <plat/gpmc.h> 52#include <plat/gpmc.h>
51#include <mach/hardware.h>
52#include <plat/nand.h>
53#include <plat/mcspi.h>
54#include <plat/mux.h>
55#include <plat/usb.h> 53#include <plat/usb.h>
56 54
57#include "mux.h" 55#include "mux.h"
@@ -116,7 +114,7 @@ static inline void __init overo_ads7846_init(void) { return; }
116#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 114#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
117 115
118#include <linux/smsc911x.h> 116#include <linux/smsc911x.h>
119#include <plat/gpmc-smsc911x.h> 117#include "gpmc-smsc911x.h"
120 118
121static struct omap_smsc911x_platform_data smsc911x_cfg = { 119static struct omap_smsc911x_platform_data smsc911x_cfg = {
122 .id = 0, 120 .id = 0,
@@ -399,9 +397,6 @@ static int overo_twl_gpio_setup(struct device *dev,
399} 397}
400 398
401static struct twl4030_gpio_platform_data overo_gpio_data = { 399static struct twl4030_gpio_platform_data overo_gpio_data = {
402 .gpio_base = OMAP_MAX_GPIO_LINES,
403 .irq_base = TWL4030_GPIO_IRQ_BASE,
404 .irq_end = TWL4030_GPIO_IRQ_END,
405 .use_leds = true, 400 .use_leds = true,
406 .setup = overo_twl_gpio_setup, 401 .setup = overo_twl_gpio_setup,
407}; 402};
@@ -522,8 +517,7 @@ static void __init overo_init(void)
522 udelay(10); 517 udelay(10);
523 gpio_set_value(OVERO_GPIO_W2W_NRESET, 1); 518 gpio_set_value(OVERO_GPIO_W2W_NRESET, 1);
524 } else { 519 } else {
525 printk(KERN_ERR "could not obtain gpio for " 520 pr_err("could not obtain gpio for OVERO_GPIO_W2W_NRESET\n");
526 "OVERO_GPIO_W2W_NRESET\n");
527 } 521 }
528 522
529 ret = gpio_request_array(overo_bt_gpios, ARRAY_SIZE(overo_bt_gpios)); 523 ret = gpio_request_array(overo_bt_gpios, ARRAY_SIZE(overo_bt_gpios));
@@ -542,8 +536,7 @@ static void __init overo_init(void)
542 if (ret == 0) 536 if (ret == 0)
543 gpio_export(OVERO_GPIO_USBH_CPEN, 0); 537 gpio_export(OVERO_GPIO_USBH_CPEN, 0);
544 else 538 else
545 printk(KERN_ERR "could not obtain gpio for " 539 pr_err("could not obtain gpio for OVERO_GPIO_USBH_CPEN\n");
546 "OVERO_GPIO_USBH_CPEN\n");
547} 540}
548 541
549MACHINE_START(OVERO, "Gumstix Overo") 542MACHINE_START(OVERO, "Gumstix Overo")
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0ad1bb3bdb98..45997bfbcbd2 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -17,6 +17,7 @@
17#include <linux/regulator/fixed.h> 17#include <linux/regulator/fixed.h>
18#include <linux/regulator/machine.h> 18#include <linux/regulator/machine.h>
19#include <linux/regulator/consumer.h> 19#include <linux/regulator/consumer.h>
20#include <linux/platform_data/mtd-onenand-omap2.h>
20 21
21#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
22#include <asm/mach-types.h> 23#include <asm/mach-types.h>
@@ -26,7 +27,7 @@
26#include <plat/usb.h> 27#include <plat/usb.h>
27#include <plat/gpmc.h> 28#include <plat/gpmc.h>
28#include "common.h" 29#include "common.h"
29#include <plat/onenand.h> 30#include <plat/serial.h>
30 31
31#include "mux.h" 32#include "mux.h"
32#include "hsmmc.h" 33#include "hsmmc.h"
@@ -72,9 +73,6 @@ static struct platform_device *rm680_peripherals_devices[] __initdata = {
72 73
73/* TWL */ 74/* TWL */
74static struct twl4030_gpio_platform_data rm680_gpio_data = { 75static struct twl4030_gpio_platform_data rm680_gpio_data = {
75 .gpio_base = OMAP_MAX_GPIO_LINES,
76 .irq_base = TWL4030_GPIO_IRQ_BASE,
77 .irq_end = TWL4030_GPIO_IRQ_END,
78 .pullups = BIT(0), 76 .pullups = BIT(0),
79 .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), 77 .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15),
80}; 78};
@@ -87,7 +85,7 @@ static struct twl4030_platform_data rm680_twl_data = {
87static void __init rm680_i2c_init(void) 85static void __init rm680_i2c_init(void)
88{ 86{
89 omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0); 87 omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
90 omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); 88 omap_pmic_init(1, 2900, "twl5031", 7 + OMAP_INTC_START, &rm680_twl_data);
91 omap_register_i2c_bus(2, 400, NULL, 0); 89 omap_register_i2c_bus(2, 400, NULL, 0);
92 omap_register_i2c_bus(3, 400, NULL, 0); 90 omap_register_i2c_bus(3, 400, NULL, 0);
93} 91}
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index df2534de3361..3945c5017085 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -25,17 +25,17 @@
25#include <linux/gpio_keys.h> 25#include <linux/gpio_keys.h>
26#include <linux/mmc/host.h> 26#include <linux/mmc/host.h>
27#include <linux/power/isp1704_charger.h> 27#include <linux/power/isp1704_charger.h>
28#include <linux/platform_data/spi-omap2-mcspi.h>
29#include <linux/platform_data/mtd-onenand-omap2.h>
30
28#include <asm/system_info.h> 31#include <asm/system_info.h>
29 32
30#include <plat/mcspi.h>
31#include <plat/board.h>
32#include "common.h" 33#include "common.h"
33#include <plat/dma.h> 34#include <plat/dma.h>
34#include <plat/gpmc.h> 35#include <plat/gpmc.h>
35#include <plat/onenand.h> 36#include "gpmc-smc91x.h"
36#include <plat/gpmc-smc91x.h>
37 37
38#include <mach/board-rx51.h> 38#include "board-rx51.h"
39 39
40#include <sound/tlv320aic3x.h> 40#include <sound/tlv320aic3x.h>
41#include <sound/tpa6130a2-plat.h> 41#include <sound/tpa6130a2-plat.h>
@@ -774,9 +774,6 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
774} 774}
775 775
776static struct twl4030_gpio_platform_data rx51_gpio_data = { 776static struct twl4030_gpio_platform_data rx51_gpio_data = {
777 .gpio_base = OMAP_MAX_GPIO_LINES,
778 .irq_base = TWL4030_GPIO_IRQ_BASE,
779 .irq_end = TWL4030_GPIO_IRQ_END,
780 .pulldowns = BIT(0) | BIT(1) | BIT(2) | BIT(3) 777 .pulldowns = BIT(0) | BIT(1) | BIT(2) | BIT(3)
781 | BIT(4) | BIT(5) 778 | BIT(4) | BIT(5)
782 | BIT(8) | BIT(9) | BIT(10) | BIT(11) 779 | BIT(8) | BIT(9) | BIT(10) | BIT(11)
@@ -1051,7 +1048,7 @@ static int __init rx51_i2c_init(void)
1051 rx51_twldata.vdac->constraints.apply_uV = true; 1048 rx51_twldata.vdac->constraints.apply_uV = true;
1052 rx51_twldata.vdac->constraints.name = "VDAC"; 1049 rx51_twldata.vdac->constraints.name = "VDAC";
1053 1050
1054 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); 1051 omap_pmic_init(1, 2200, "twl5030", 7 + OMAP_INTC_START, &rx51_twldata);
1055 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, 1052 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
1056 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); 1053 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
1057#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) 1054#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
index 2c1289bd5e6a..c22e111bcd00 100644
--- a/arch/arm/mach-omap2/board-rx51-video.c
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -17,9 +17,9 @@
17#include <asm/mach-types.h> 17#include <asm/mach-types.h>
18#include <video/omapdss.h> 18#include <video/omapdss.h>
19#include <plat/vram.h> 19#include <plat/vram.h>
20#include <plat/mcspi.h> 20#include <linux/platform_data/spi-omap2-mcspi.h>
21 21
22#include <mach/board-rx51.h> 22#include "board-rx51.h"
23 23
24#include "mux.h" 24#include "mux.h"
25 25
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 345dd931f76f..7bbb05d9689b 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -17,14 +17,12 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/leds.h> 19#include <linux/leds.h>
20#include <linux/platform_data/spi-omap2-mcspi.h>
20 21
21#include <mach/hardware.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25 25
26#include <plat/mcspi.h>
27#include <plat/board.h>
28#include "common.h" 26#include "common.h"
29#include <plat/dma.h> 27#include <plat/dma.h>
30#include <plat/gpmc.h> 28#include <plat/gpmc.h>
diff --git a/arch/arm/mach-omap2/include/mach/board-rx51.h b/arch/arm/mach-omap2/board-rx51.h
index b76f49e7eed5..b76f49e7eed5 100644
--- a/arch/arm/mach-omap2/include/mach/board-rx51.h
+++ b/arch/arm/mach-omap2/board-rx51.h
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index d4c8392cadb6..c4f8833b4c3c 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -15,13 +15,10 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <mach/hardware.h>
19#include <asm/mach-types.h> 18#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 20#include <asm/mach/map.h>
22 21
23#include <plat/irqs.h>
24#include <plat/board.h>
25#include "common.h" 22#include "common.h"
26#include <plat/usb.h> 23#include <plat/usb.h>
27 24
@@ -32,15 +29,10 @@ static struct omap_musb_board_data musb_board_data = {
32 .power = 500, 29 .power = 500,
33}; 30};
34 31
35static struct omap_board_config_kernel ti81xx_evm_config[] __initdata = {
36};
37
38static void __init ti81xx_evm_init(void) 32static void __init ti81xx_evm_init(void)
39{ 33{
40 omap_serial_init(); 34 omap_serial_init();
41 omap_sdrc_init(NULL, NULL); 35 omap_sdrc_init(NULL, NULL);
42 omap_board_config = ti81xx_evm_config;
43 omap_board_config_size = ARRAY_SIZE(ti81xx_evm_config);
44 usb_musb_init(&musb_board_data); 36 usb_musb_init(&musb_board_data);
45} 37}
46 38
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index f64f44173061..afb2278a29f6 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -18,10 +18,13 @@
18#include <linux/regulator/machine.h> 18#include <linux/regulator/machine.h>
19 19
20#include <plat/gpmc.h> 20#include <plat/gpmc.h>
21#include <plat/gpmc-smsc911x.h> 21#include "gpmc-smsc911x.h"
22 22
23#include <mach/board-zoom.h> 23#include <mach/board-zoom.h>
24 24
25#include "soc.h"
26#include "common.h"
27
25#define ZOOM_SMSC911X_CS 7 28#define ZOOM_SMSC911X_CS 7
26#define ZOOM_SMSC911X_GPIO 158 29#define ZOOM_SMSC911X_GPIO 158
27#define ZOOM_QUADUART_CS 3 30#define ZOOM_QUADUART_CS 3
@@ -81,8 +84,7 @@ static inline void __init zoom_init_quaduart(void)
81 quart_cs = ZOOM_QUADUART_CS; 84 quart_cs = ZOOM_QUADUART_CS;
82 85
83 if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) { 86 if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) {
84 printk(KERN_ERR "Failed to request GPMC mem" 87 pr_err("Failed to request GPMC mem for Quad UART(TL16CP754C)\n");
85 "for Quad UART(TL16CP754C)\n");
86 return; 88 return;
87 } 89 }
88 90
@@ -104,8 +106,8 @@ static inline int omap_zoom_debugboard_detect(void)
104 106
105 if (gpio_request_one(debug_board_detect, GPIOF_IN, 107 if (gpio_request_one(debug_board_detect, GPIOF_IN,
106 "Zoom debug board detect") < 0) { 108 "Zoom debug board detect") < 0) {
107 printk(KERN_ERR "Failed to request GPIO%d for Zoom debug" 109 pr_err("Failed to request GPIO%d for Zoom debug board detect\n",
108 "board detect\n", debug_board_detect); 110 debug_board_detect);
109 return 0; 111 return 0;
110 } 112 }
111 113
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c
index 28187f134fff..b940ab2259fb 100644
--- a/arch/arm/mach-omap2/board-zoom-display.c
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -14,10 +14,12 @@
14#include <linux/gpio.h> 14#include <linux/gpio.h>
15#include <linux/i2c/twl.h> 15#include <linux/i2c/twl.h>
16#include <linux/spi/spi.h> 16#include <linux/spi/spi.h>
17#include <plat/mcspi.h> 17#include <linux/platform_data/spi-omap2-mcspi.h>
18#include <video/omapdss.h> 18#include <video/omapdss.h>
19#include <mach/board-zoom.h> 19#include <mach/board-zoom.h>
20 20
21#include "common.h"
22
21#define LCD_PANEL_RESET_GPIO_PROD 96 23#define LCD_PANEL_RESET_GPIO_PROD 96
22#define LCD_PANEL_RESET_GPIO_PILOT 55 24#define LCD_PANEL_RESET_GPIO_PILOT 55
23#define LCD_PANEL_QVGA_GPIO 56 25#define LCD_PANEL_QVGA_GPIO 56
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index b797cb279618..6bcc107b9fc3 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -19,6 +19,7 @@
19#include <linux/regulator/fixed.h> 19#include <linux/regulator/fixed.h>
20#include <linux/wl12xx.h> 20#include <linux/wl12xx.h>
21#include <linux/mmc/host.h> 21#include <linux/mmc/host.h>
22#include <linux/platform_data/gpio-omap.h>
22 23
23#include <asm/mach-types.h> 24#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -251,9 +252,6 @@ static void zoom2_set_hs_extmute(int mute)
251} 252}
252 253
253static struct twl4030_gpio_platform_data zoom_gpio_data = { 254static struct twl4030_gpio_platform_data zoom_gpio_data = {
254 .gpio_base = OMAP_MAX_GPIO_LINES,
255 .irq_base = TWL4030_GPIO_IRQ_BASE,
256 .irq_end = TWL4030_GPIO_IRQ_END,
257 .setup = zoom_twl_gpio_setup, 255 .setup = zoom_twl_gpio_setup,
258}; 256};
259 257
@@ -281,7 +279,7 @@ static int __init omap_i2c_init(void)
281 codec_data->hs_extmute = 1; 279 codec_data->hs_extmute = 1;
282 codec_data->set_hs_extmute = zoom2_set_hs_extmute; 280 codec_data->set_hs_extmute = zoom2_set_hs_extmute;
283 } 281 }
284 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); 282 omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
285 omap_register_i2c_bus(2, 400, NULL, 0); 283 omap_register_i2c_bus(2, 400, NULL, 0);
286 omap_register_i2c_bus(3, 400, NULL, 0); 284 omap_register_i2c_bus(3, 400, NULL, 0);
287 return 0; 285 return 0;
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 4e7e56142e6f..4994438e1f46 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -22,7 +22,6 @@
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23 23
24#include "common.h" 24#include "common.h"
25#include <plat/board.h>
26#include <plat/usb.h> 25#include <plat/usb.h>
27 26
28#include <mach/board-zoom.h> 27#include <mach/board-zoom.h>
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
index 3d9d746b221a..cabcfdba5246 100644
--- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
+++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
@@ -33,11 +33,11 @@
33#include <linux/cpufreq.h> 33#include <linux/cpufreq.h>
34#include <linux/slab.h> 34#include <linux/slab.h>
35 35
36#include <plat/cpu.h>
37#include <plat/clock.h> 36#include <plat/clock.h>
38#include <plat/sram.h> 37#include <plat/sram.h>
39#include <plat/sdrc.h> 38#include <plat/sdrc.h>
40 39
40#include "soc.h"
41#include "clock.h" 41#include "clock.h"
42#include "clock2xxx.h" 42#include "clock2xxx.h"
43#include "opp2xxx.h" 43#include "opp2xxx.h"
diff --git a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c
index d6e34dd9e7e7..298887b5bf66 100644
--- a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c
+++ b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c
@@ -92,15 +92,13 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
92 92
93 pr_debug("clock: changing CORE DPLL rate from %lu to %lu\n", clk->rate, 93 pr_debug("clock: changing CORE DPLL rate from %lu to %lu\n", clk->rate,
94 validrate); 94 validrate);
95 pr_debug("clock: SDRC CS0 timing params used:" 95 pr_debug("clock: SDRC CS0 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n",
96 " RFR %08x CTRLA %08x CTRLB %08x MR %08x\n",
97 sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, 96 sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla,
98 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr); 97 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr);
99 if (sdrc_cs1) 98 if (sdrc_cs1)
100 pr_debug("clock: SDRC CS1 timing params used: " 99 pr_debug("clock: SDRC CS1 timing params used: RFR %08x CTRLA %08x CTRLB %08x MR %08x\n",
101 " RFR %08x CTRLA %08x CTRLB %08x MR %08x\n", 100 sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla,
102 sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla, 101 sdrc_cs1->actim_ctrlb, sdrc_cs1->mr);
103 sdrc_cs1->actim_ctrlb, sdrc_cs1->mr);
104 102
105 if (sdrc_cs1) 103 if (sdrc_cs1)
106 omap3_configure_core_dpll( 104 omap3_configure_core_dpll(
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
index 04d551b1f7f7..19a980956d44 100644
--- a/arch/arm/mach-omap2/clkt_clksel.c
+++ b/arch/arm/mach-omap2/clkt_clksel.c
@@ -71,8 +71,8 @@ static const struct clksel *_get_clksel_by_parent(struct clk *clk,
71 71
72 if (!clks->parent) { 72 if (!clks->parent) {
73 /* This indicates a data problem */ 73 /* This indicates a data problem */
74 WARN(1, "clock: Could not find parent clock %s in clksel array " 74 WARN(1, "clock: %s: could not find parent clock %s in clksel array\n",
75 "of clock %s\n", src_clk->name, clk->name); 75 clk->name, src_clk->name);
76 return NULL; 76 return NULL;
77 } 77 }
78 78
@@ -126,8 +126,8 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
126 126
127 if (max_div == 0) { 127 if (max_div == 0) {
128 /* This indicates an error in the clksel data */ 128 /* This indicates an error in the clksel data */
129 WARN(1, "clock: Could not find divisor for clock %s parent %s" 129 WARN(1, "clock: %s: could not find divisor for parent %s\n",
130 "\n", clk->name, src_clk->parent->name); 130 clk->name, src_clk->parent->name);
131 return 0; 131 return 0;
132 } 132 }
133 133
@@ -191,8 +191,8 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 field_val)
191 191
192 if (!clkr->div) { 192 if (!clkr->div) {
193 /* This indicates a data error */ 193 /* This indicates a data error */
194 WARN(1, "clock: Could not find fieldval %d for clock %s parent " 194 WARN(1, "clock: %s: could not find fieldval %d parent %s\n",
195 "%s\n", field_val, clk->name, clk->parent->name); 195 clk->name, field_val, clk->parent->name);
196 return 0; 196 return 0;
197 } 197 }
198 198
@@ -230,8 +230,8 @@ static u32 _divisor_to_clksel(struct clk *clk, u32 div)
230 } 230 }
231 231
232 if (!clkr->div) { 232 if (!clkr->div) {
233 pr_err("clock: Could not find divisor %d for clock %s parent " 233 pr_err("clock: %s: could not find divisor %d parent %s\n",
234 "%s\n", div, clk->name, clk->parent->name); 234 clk->name, div, clk->parent->name);
235 return ~0; 235 return ~0;
236 } 236 }
237 237
@@ -300,8 +300,8 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
300 300
301 /* Sanity check */ 301 /* Sanity check */
302 if (clkr->div <= last_div) 302 if (clkr->div <= last_div)
303 pr_err("clock: clksel_rate table not sorted " 303 pr_err("clock: %s: clksel_rate table not sorted",
304 "for clock %s", clk->name); 304 clk->name);
305 305
306 last_div = clkr->div; 306 last_div = clkr->div;
307 307
@@ -312,9 +312,8 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
312 } 312 }
313 313
314 if (!clkr->div) { 314 if (!clkr->div) {
315 pr_err("clock: Could not find divisor for target " 315 pr_err("clock: %s: could not find divisor for target rate %ld parent %s\n",
316 "rate %ld for clock %s parent %s\n", target_rate, 316 clk->name, target_rate, clk->parent->name);
317 clk->name, clk->parent->name);
318 return ~0; 317 return ~0;
319 } 318 }
320 319
@@ -359,8 +358,7 @@ void omap2_init_clksel_parent(struct clk *clk)
359 358
360 if (clkr->val == r) { 359 if (clkr->val == r) {
361 if (clk->parent != clks->parent) { 360 if (clk->parent != clks->parent) {
362 pr_debug("clock: inited %s parent " 361 pr_debug("clock: %s: inited parent to %s (was %s)\n",
363 "to %s (was %s)\n",
364 clk->name, clks->parent->name, 362 clk->name, clks->parent->name,
365 ((clk->parent) ? 363 ((clk->parent) ?
366 clk->parent->name : "NULL")); 364 clk->parent->name : "NULL"));
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c
index cd7fd0f91149..a3b60c7b9aa8 100644
--- a/arch/arm/mach-omap2/clkt_dpll.c
+++ b/arch/arm/mach-omap2/clkt_dpll.c
@@ -22,8 +22,8 @@
22#include <asm/div64.h> 22#include <asm/div64.h>
23 23
24#include <plat/clock.h> 24#include <plat/clock.h>
25#include <plat/cpu.h>
26 25
26#include "soc.h"
27#include "clock.h" 27#include "clock.h"
28#include "cm-regbits-24xx.h" 28#include "cm-regbits-24xx.h"
29#include "cm-regbits-34xx.h" 29#include "cm-regbits-34xx.h"
@@ -105,13 +105,13 @@ static int _dpll_test_fint(struct clk *clk, u8 n)
105 } 105 }
106 106
107 if (fint < fint_min) { 107 if (fint < fint_min) {
108 pr_debug("rejecting n=%d due to Fint failure, " 108 pr_debug("rejecting n=%d due to Fint failure, lowering max_divider\n",
109 "lowering max_divider\n", n); 109 n);
110 dd->max_divider = n; 110 dd->max_divider = n;
111 ret = DPLL_FINT_UNDERFLOW; 111 ret = DPLL_FINT_UNDERFLOW;
112 } else if (fint > fint_max) { 112 } else if (fint > fint_max) {
113 pr_debug("rejecting n=%d due to Fint failure, " 113 pr_debug("rejecting n=%d due to Fint failure, boosting min_divider\n",
114 "boosting min_divider\n", n); 114 n);
115 dd->min_divider = n; 115 dd->min_divider = n;
116 ret = DPLL_FINT_INVALID; 116 ret = DPLL_FINT_INVALID;
117 } else if (cpu_is_omap3430() && fint > OMAP3430_DPLL_FINT_BAND1_MAX && 117 } else if (cpu_is_omap3430() && fint > OMAP3430_DPLL_FINT_BAND1_MAX &&
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index ea3f565ba1a4..e97f98ffe8b2 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -22,14 +22,16 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <trace/events/power.h>
26 25
27#include <asm/cpu.h> 26#include <asm/cpu.h>
27
28#include <plat/clock.h> 28#include <plat/clock.h>
29#include "clockdomain.h"
30#include <plat/cpu.h>
31#include <plat/prcm.h> 29#include <plat/prcm.h>
32 30
31#include <trace/events/power.h>
32
33#include "soc.h"
34#include "clockdomain.h"
33#include "clock.h" 35#include "clock.h"
34#include "cm2xxx_3xxx.h" 36#include "cm2xxx_3xxx.h"
35#include "cm-regbits-24xx.h" 37#include "cm-regbits-24xx.h"
@@ -102,8 +104,8 @@ void omap2_init_clk_clkdm(struct clk *clk)
102 clk->name, clk->clkdm_name); 104 clk->name, clk->clkdm_name);
103 clk->clkdm = clkdm; 105 clk->clkdm = clkdm;
104 } else { 106 } else {
105 pr_debug("clock: could not associate clk %s to " 107 pr_debug("clock: could not associate clk %s to clkdm %s\n",
106 "clkdm %s\n", clk->name, clk->clkdm_name); 108 clk->name, clk->clkdm_name);
107 } 109 }
108} 110}
109 111
@@ -226,8 +228,7 @@ void omap2_dflt_clk_disable(struct clk *clk)
226 * 'Independent' here refers to a clock which is not 228 * 'Independent' here refers to a clock which is not
227 * controlled by its parent. 229 * controlled by its parent.
228 */ 230 */
229 printk(KERN_ERR "clock: clk_disable called on independent " 231 pr_err("clock: clk_disable called on independent clock %s which has no enable_reg\n", clk->name);
230 "clock %s which has no enable_reg\n", clk->name);
231 return; 232 return;
232 } 233 }
233 234
@@ -270,8 +271,7 @@ const struct clkops clkops_omap2_dflt = {
270void omap2_clk_disable(struct clk *clk) 271void omap2_clk_disable(struct clk *clk)
271{ 272{
272 if (clk->usecount == 0) { 273 if (clk->usecount == 0) {
273 WARN(1, "clock: %s: omap2_clk_disable() called, but usecount " 274 WARN(1, "clock: %s: omap2_clk_disable() called, but usecount already 0?", clk->name);
274 "already 0?", clk->name);
275 return; 275 return;
276 } 276 }
277 277
@@ -332,8 +332,8 @@ int omap2_clk_enable(struct clk *clk)
332 if (clkdm_control && clk->clkdm) { 332 if (clkdm_control && clk->clkdm) {
333 ret = clkdm_clk_enable(clk->clkdm, clk); 333 ret = clkdm_clk_enable(clk->clkdm, clk);
334 if (ret) { 334 if (ret) {
335 WARN(1, "clock: %s: could not enable clockdomain %s: " 335 WARN(1, "clock: %s: could not enable clockdomain %s: %d\n",
336 "%d\n", clk->name, clk->clkdm->name, ret); 336 clk->name, clk->clkdm->name, ret);
337 goto oce_err2; 337 goto oce_err2;
338 } 338 }
339 } 339 }
@@ -501,10 +501,8 @@ void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name,
501 501
502 hfclkin_rate = clk_get_rate(hfclkin_ck); 502 hfclkin_rate = clk_get_rate(hfclkin_ck);
503 503
504 pr_info("Switched to new clocking rate (Crystal/Core/MPU): " 504 pr_info("Switched to new clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n",
505 "%ld.%01ld/%ld/%ld MHz\n", 505 (hfclkin_rate / 1000000), ((hfclkin_rate / 100000) % 10),
506 (hfclkin_rate / 1000000),
507 ((hfclkin_rate / 100000) % 10),
508 (clk_get_rate(core_ck) / 1000000), 506 (clk_get_rate(core_ck) / 1000000),
509 (clk_get_rate(mpu_ck) / 1000000)); 507 (clk_get_rate(mpu_ck) / 1000000));
510} 508}
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 002745181ad6..12c178dbc9f5 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -18,9 +18,9 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/list.h> 19#include <linux/list.h>
20 20
21#include <plat/hardware.h>
22#include <plat/clkdev_omap.h> 21#include <plat/clkdev_omap.h>
23 22
23#include "soc.h"
24#include "iomap.h" 24#include "iomap.h"
25#include "clock.h" 25#include "clock.h"
26#include "clock2xxx.h" 26#include "clock2xxx.h"
diff --git a/arch/arm/mach-omap2/clock2430.c b/arch/arm/mach-omap2/clock2430.c
index dfda9a3f2cb2..a8e326177466 100644
--- a/arch/arm/mach-omap2/clock2430.c
+++ b/arch/arm/mach-omap2/clock2430.c
@@ -21,9 +21,9 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <plat/hardware.h>
25#include <plat/clock.h> 24#include <plat/clock.h>
26 25
26#include "soc.h"
27#include "iomap.h" 27#include "iomap.h"
28#include "clock.h" 28#include "clock.h"
29#include "clock2xxx.h" 29#include "clock2xxx.h"
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index cacabb070e22..7ea91398217a 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -17,9 +17,9 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/list.h> 18#include <linux/list.h>
19 19
20#include <plat/hardware.h>
21#include <plat/clkdev_omap.h> 20#include <plat/clkdev_omap.h>
22 21
22#include "soc.h"
23#include "iomap.h" 23#include "iomap.h"
24#include "clock.h" 24#include "clock.h"
25#include "clock2xxx.h" 25#include "clock2xxx.h"
@@ -1856,6 +1856,7 @@ static struct omap_clk omap2430_clks[] = {
1856 CLK(NULL, "func_32k_ck", &func_32k_ck, CK_243X), 1856 CLK(NULL, "func_32k_ck", &func_32k_ck, CK_243X),
1857 CLK(NULL, "secure_32k_ck", &secure_32k_ck, CK_243X), 1857 CLK(NULL, "secure_32k_ck", &secure_32k_ck, CK_243X),
1858 CLK(NULL, "osc_ck", &osc_ck, CK_243X), 1858 CLK(NULL, "osc_ck", &osc_ck, CK_243X),
1859 CLK("twl", "fck", &osc_ck, CK_243X),
1859 CLK(NULL, "sys_ck", &sys_ck, CK_243X), 1860 CLK(NULL, "sys_ck", &sys_ck, CK_243X),
1860 CLK(NULL, "alt_ck", &alt_ck, CK_243X), 1861 CLK(NULL, "alt_ck", &alt_ck, CK_243X),
1861 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_243X), 1862 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_243X),
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
index 12500097378d..e92be1fc1a00 100644
--- a/arch/arm/mach-omap2/clock2xxx.c
+++ b/arch/arm/mach-omap2/clock2xxx.c
@@ -22,9 +22,9 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/io.h> 23#include <linux/io.h>
24 24
25#include <plat/cpu.h>
26#include <plat/clock.h> 25#include <plat/clock.h>
27 26
27#include "soc.h"
28#include "clock.h" 28#include "clock.h"
29#include "clock2xxx.h" 29#include "clock2xxx.h"
30#include "cm.h" 30#include "cm.h"
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
index ae27de8899a6..8e06de665b14 100644
--- a/arch/arm/mach-omap2/clock33xx_data.c
+++ b/arch/arm/mach-omap2/clock33xx_data.c
@@ -18,8 +18,8 @@
18#include <linux/list.h> 18#include <linux/list.h>
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <plat/clkdev_omap.h> 20#include <plat/clkdev_omap.h>
21#include <plat/am33xx.h>
22 21
22#include "am33xx.h"
23#include "iomap.h" 23#include "iomap.h"
24#include "control.h" 24#include "control.h"
25#include "clock.h" 25#include "clock.h"
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c
index 794d82702c85..15cdc6471737 100644
--- a/arch/arm/mach-omap2/clock3xxx.c
+++ b/arch/arm/mach-omap2/clock3xxx.c
@@ -21,9 +21,9 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <plat/hardware.h>
25#include <plat/clock.h> 24#include <plat/clock.h>
26 25
26#include "soc.h"
27#include "clock.h" 27#include "clock.h"
28#include "clock3xxx.h" 28#include "clock3xxx.h"
29#include "prm2xxx_3xxx.h" 29#include "prm2xxx_3xxx.h"
@@ -49,8 +49,7 @@ int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate)
49 * on DPLL4. 49 * on DPLL4.
50 */ 50 */
51 if (omap_rev() == OMAP3430_REV_ES1_0) { 51 if (omap_rev() == OMAP3430_REV_ES1_0) {
52 pr_err("clock: DPLL4 cannot change rate due to " 52 pr_err("clock: DPLL4 cannot change rate due to silicon 'Limitation 2.5' on 3430ES1.\n");
53 "silicon 'Limitation 2.5' on 3430ES1.\n");
54 return -EINVAL; 53 return -EINVAL;
55 } 54 }
56 55
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 83bed9ad3017..700317a1bd16 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -21,9 +21,9 @@
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <plat/hardware.h>
25#include <plat/clkdev_omap.h> 24#include <plat/clkdev_omap.h>
26 25
26#include "soc.h"
27#include "iomap.h" 27#include "iomap.h"
28#include "clock.h" 28#include "clock.h"
29#include "clock3xxx.h" 29#include "clock3xxx.h"
@@ -3226,6 +3226,7 @@ static struct omap_clk omap3xxx_clks[] = {
3226 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_3XXX), 3226 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_3XXX),
3227 CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck, CK_3XXX), 3227 CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck, CK_3XXX),
3228 CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX), 3228 CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX),
3229 CLK("twl", "fck", &osc_sys_ck, CK_3XXX),
3229 CLK(NULL, "sys_ck", &sys_ck, CK_3XXX), 3230 CLK(NULL, "sys_ck", &sys_ck, CK_3XXX),
3230 CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX), 3231 CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX),
3231 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX), 3232 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX),
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index d7f55e43b761..500682c051c1 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -28,9 +28,9 @@
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/io.h> 29#include <linux/io.h>
30 30
31#include <plat/hardware.h>
32#include <plat/clkdev_omap.h> 31#include <plat/clkdev_omap.h>
33 32
33#include "soc.h"
34#include "iomap.h" 34#include "iomap.h"
35#include "clock.h" 35#include "clock.h"
36#include "clock44xx.h" 36#include "clock44xx.h"
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index 8664f5a8bfb6..a1555627ad97 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -174,9 +174,8 @@ void _clkdm_add_autodeps(struct clockdomain *clkdm)
174 if (IS_ERR(autodep->clkdm.ptr)) 174 if (IS_ERR(autodep->clkdm.ptr))
175 continue; 175 continue;
176 176
177 pr_debug("clockdomain: adding %s sleepdep/wkdep for " 177 pr_debug("clockdomain: %s: adding %s sleepdep/wkdep\n",
178 "clkdm %s\n", autodep->clkdm.ptr->name, 178 clkdm->name, autodep->clkdm.ptr->name);
179 clkdm->name);
180 179
181 clkdm_add_sleepdep(clkdm, autodep->clkdm.ptr); 180 clkdm_add_sleepdep(clkdm, autodep->clkdm.ptr);
182 clkdm_add_wkdep(clkdm, autodep->clkdm.ptr); 181 clkdm_add_wkdep(clkdm, autodep->clkdm.ptr);
@@ -205,9 +204,8 @@ void _clkdm_del_autodeps(struct clockdomain *clkdm)
205 if (IS_ERR(autodep->clkdm.ptr)) 204 if (IS_ERR(autodep->clkdm.ptr))
206 continue; 205 continue;
207 206
208 pr_debug("clockdomain: removing %s sleepdep/wkdep for " 207 pr_debug("clockdomain: %s: removing %s sleepdep/wkdep\n",
209 "clkdm %s\n", autodep->clkdm.ptr->name, 208 clkdm->name, autodep->clkdm.ptr->name);
210 clkdm->name);
211 209
212 clkdm_del_sleepdep(clkdm, autodep->clkdm.ptr); 210 clkdm_del_sleepdep(clkdm, autodep->clkdm.ptr);
213 clkdm_del_wkdep(clkdm, autodep->clkdm.ptr); 211 clkdm_del_wkdep(clkdm, autodep->clkdm.ptr);
@@ -469,14 +467,14 @@ int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
469 ret = -EINVAL; 467 ret = -EINVAL;
470 468
471 if (ret) { 469 if (ret) {
472 pr_debug("clockdomain: hardware cannot set/clear wake up of " 470 pr_debug("clockdomain: hardware cannot set/clear wake up of %s when %s wakes up\n",
473 "%s when %s wakes up\n", clkdm1->name, clkdm2->name); 471 clkdm1->name, clkdm2->name);
474 return ret; 472 return ret;
475 } 473 }
476 474
477 if (atomic_inc_return(&cd->wkdep_usecount) == 1) { 475 if (atomic_inc_return(&cd->wkdep_usecount) == 1) {
478 pr_debug("clockdomain: hardware will wake up %s when %s wakes " 476 pr_debug("clockdomain: hardware will wake up %s when %s wakes up\n",
479 "up\n", clkdm1->name, clkdm2->name); 477 clkdm1->name, clkdm2->name);
480 478
481 ret = arch_clkdm->clkdm_add_wkdep(clkdm1, clkdm2); 479 ret = arch_clkdm->clkdm_add_wkdep(clkdm1, clkdm2);
482 } 480 }
@@ -510,14 +508,14 @@ int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
510 ret = -EINVAL; 508 ret = -EINVAL;
511 509
512 if (ret) { 510 if (ret) {
513 pr_debug("clockdomain: hardware cannot set/clear wake up of " 511 pr_debug("clockdomain: hardware cannot set/clear wake up of %s when %s wakes up\n",
514 "%s when %s wakes up\n", clkdm1->name, clkdm2->name); 512 clkdm1->name, clkdm2->name);
515 return ret; 513 return ret;
516 } 514 }
517 515
518 if (atomic_dec_return(&cd->wkdep_usecount) == 0) { 516 if (atomic_dec_return(&cd->wkdep_usecount) == 0) {
519 pr_debug("clockdomain: hardware will no longer wake up %s " 517 pr_debug("clockdomain: hardware will no longer wake up %s after %s wakes up\n",
520 "after %s wakes up\n", clkdm1->name, clkdm2->name); 518 clkdm1->name, clkdm2->name);
521 519
522 ret = arch_clkdm->clkdm_del_wkdep(clkdm1, clkdm2); 520 ret = arch_clkdm->clkdm_del_wkdep(clkdm1, clkdm2);
523 } 521 }
@@ -555,8 +553,8 @@ int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
555 ret = -EINVAL; 553 ret = -EINVAL;
556 554
557 if (ret) { 555 if (ret) {
558 pr_debug("clockdomain: hardware cannot set/clear wake up of " 556 pr_debug("clockdomain: hardware cannot set/clear wake up of %s when %s wakes up\n",
559 "%s when %s wakes up\n", clkdm1->name, clkdm2->name); 557 clkdm1->name, clkdm2->name);
560 return ret; 558 return ret;
561 } 559 }
562 560
@@ -613,15 +611,14 @@ int clkdm_add_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
613 ret = -EINVAL; 611 ret = -EINVAL;
614 612
615 if (ret) { 613 if (ret) {
616 pr_debug("clockdomain: hardware cannot set/clear sleep " 614 pr_debug("clockdomain: hardware cannot set/clear sleep dependency affecting %s from %s\n",
617 "dependency affecting %s from %s\n", clkdm1->name, 615 clkdm1->name, clkdm2->name);
618 clkdm2->name);
619 return ret; 616 return ret;
620 } 617 }
621 618
622 if (atomic_inc_return(&cd->sleepdep_usecount) == 1) { 619 if (atomic_inc_return(&cd->sleepdep_usecount) == 1) {
623 pr_debug("clockdomain: will prevent %s from sleeping if %s " 620 pr_debug("clockdomain: will prevent %s from sleeping if %s is active\n",
624 "is active\n", clkdm1->name, clkdm2->name); 621 clkdm1->name, clkdm2->name);
625 622
626 ret = arch_clkdm->clkdm_add_sleepdep(clkdm1, clkdm2); 623 ret = arch_clkdm->clkdm_add_sleepdep(clkdm1, clkdm2);
627 } 624 }
@@ -657,16 +654,14 @@ int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
657 ret = -EINVAL; 654 ret = -EINVAL;
658 655
659 if (ret) { 656 if (ret) {
660 pr_debug("clockdomain: hardware cannot set/clear sleep " 657 pr_debug("clockdomain: hardware cannot set/clear sleep dependency affecting %s from %s\n",
661 "dependency affecting %s from %s\n", clkdm1->name, 658 clkdm1->name, clkdm2->name);
662 clkdm2->name);
663 return ret; 659 return ret;
664 } 660 }
665 661
666 if (atomic_dec_return(&cd->sleepdep_usecount) == 0) { 662 if (atomic_dec_return(&cd->sleepdep_usecount) == 0) {
667 pr_debug("clockdomain: will no longer prevent %s from " 663 pr_debug("clockdomain: will no longer prevent %s from sleeping if %s is active\n",
668 "sleeping if %s is active\n", clkdm1->name, 664 clkdm1->name, clkdm2->name);
669 clkdm2->name);
670 665
671 ret = arch_clkdm->clkdm_del_sleepdep(clkdm1, clkdm2); 666 ret = arch_clkdm->clkdm_del_sleepdep(clkdm1, clkdm2);
672 } 667 }
@@ -706,9 +701,8 @@ int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
706 ret = -EINVAL; 701 ret = -EINVAL;
707 702
708 if (ret) { 703 if (ret) {
709 pr_debug("clockdomain: hardware cannot set/clear sleep " 704 pr_debug("clockdomain: hardware cannot set/clear sleep dependency affecting %s from %s\n",
710 "dependency affecting %s from %s\n", clkdm1->name, 705 clkdm1->name, clkdm2->name);
711 clkdm2->name);
712 return ret; 706 return ret;
713 } 707 }
714 708
@@ -755,8 +749,8 @@ int clkdm_sleep(struct clockdomain *clkdm)
755 return -EINVAL; 749 return -EINVAL;
756 750
757 if (!(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) { 751 if (!(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
758 pr_debug("clockdomain: %s does not support forcing " 752 pr_debug("clockdomain: %s does not support forcing sleep via software\n",
759 "sleep via software\n", clkdm->name); 753 clkdm->name);
760 return -EINVAL; 754 return -EINVAL;
761 } 755 }
762 756
@@ -790,8 +784,8 @@ int clkdm_wakeup(struct clockdomain *clkdm)
790 return -EINVAL; 784 return -EINVAL;
791 785
792 if (!(clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) { 786 if (!(clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
793 pr_debug("clockdomain: %s does not support forcing " 787 pr_debug("clockdomain: %s does not support forcing wakeup via software\n",
794 "wakeup via software\n", clkdm->name); 788 clkdm->name);
795 return -EINVAL; 789 return -EINVAL;
796 } 790 }
797 791
@@ -826,8 +820,8 @@ void clkdm_allow_idle(struct clockdomain *clkdm)
826 return; 820 return;
827 821
828 if (!(clkdm->flags & CLKDM_CAN_ENABLE_AUTO)) { 822 if (!(clkdm->flags & CLKDM_CAN_ENABLE_AUTO)) {
829 pr_debug("clock: automatic idle transitions cannot be enabled " 823 pr_debug("clock: %s: automatic idle transitions cannot be enabled\n",
830 "on clockdomain %s\n", clkdm->name); 824 clkdm->name);
831 return; 825 return;
832 } 826 }
833 827
@@ -861,8 +855,8 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
861 return; 855 return;
862 856
863 if (!(clkdm->flags & CLKDM_CAN_DISABLE_AUTO)) { 857 if (!(clkdm->flags & CLKDM_CAN_DISABLE_AUTO)) {
864 pr_debug("clockdomain: automatic idle transitions cannot be " 858 pr_debug("clockdomain: %s: automatic idle transitions cannot be disabled\n",
865 "disabled on %s\n", clkdm->name); 859 clkdm->name);
866 return; 860 return;
867 } 861 }
868 862
@@ -927,7 +921,7 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
927 pwrdm_state_switch(clkdm->pwrdm.ptr); 921 pwrdm_state_switch(clkdm->pwrdm.ptr);
928 spin_unlock_irqrestore(&clkdm->lock, flags); 922 spin_unlock_irqrestore(&clkdm->lock, flags);
929 923
930 pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name); 924 pr_debug("clockdomain: %s: enabled\n", clkdm->name);
931 925
932 return 0; 926 return 0;
933} 927}
@@ -952,7 +946,7 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)
952 pwrdm_state_switch(clkdm->pwrdm.ptr); 946 pwrdm_state_switch(clkdm->pwrdm.ptr);
953 spin_unlock_irqrestore(&clkdm->lock, flags); 947 spin_unlock_irqrestore(&clkdm->lock, flags);
954 948
955 pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name); 949 pr_debug("clockdomain: %s: disabled\n", clkdm->name);
956 950
957 return 0; 951 return 0;
958} 952}
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c
index 389f9f8b570c..a911e76b4ecf 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c
@@ -18,8 +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/hardware.h> 21#include "soc.h"
22
23#include "iomap.h" 22#include "iomap.h"
24#include "common.h" 23#include "common.h"
25#include "cm.h" 24#include "cm.h"
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index c1875862679f..48daac2581b4 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -24,9 +24,10 @@
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/spi/ads7846.h> 25#include <linux/spi/ads7846.h>
26 26
27#include <plat/mcspi.h> 27#include <linux/platform_data/spi-omap2-mcspi.h>
28#include <plat/nand.h> 28#include <linux/platform_data/mtd-nand-omap2.h>
29 29
30#include "common.h"
30#include "common-board-devices.h" 31#include "common-board-devices.h"
31 32
32#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ 33#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
@@ -119,8 +120,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
119 } 120 }
120 121
121 if (nandcs > GPMC_CS_NUM) { 122 if (nandcs > GPMC_CS_NUM) {
122 printk(KERN_INFO "NAND: Unable to find configuration " 123 pr_info("NAND: Unable to find configuration in GPMC\n");
123 "in GPMC\n ");
124 return; 124 return;
125 } 125 }
126 126
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 069f9725b1c3..17950c6e130b 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -17,11 +17,9 @@
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/hardware.h>
21#include <plat/board.h>
22#include <plat/mux.h>
23#include <plat/clock.h> 20#include <plat/clock.h>
24 21
22#include "soc.h"
25#include "iomap.h" 23#include "iomap.h"
26#include "common.h" 24#include "common.h"
27#include "sdrc.h" 25#include "sdrc.h"
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 1f65b1871c23..da0f5c187353 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -26,11 +26,18 @@
26#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H 26#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H
27#ifndef __ASSEMBLER__ 27#ifndef __ASSEMBLER__
28 28
29#include <linux/irq.h>
29#include <linux/delay.h> 30#include <linux/delay.h>
30#include <linux/i2c/twl.h> 31#include <linux/i2c/twl.h>
31#include <plat/common.h> 32
32#include <asm/proc-fns.h> 33#include <asm/proc-fns.h>
33 34
35#include <plat/cpu.h>
36#include <plat/serial.h>
37#include <plat/common.h>
38
39#define OMAP_INTC_START NR_IRQS
40
34#ifdef CONFIG_SOC_OMAP2420 41#ifdef CONFIG_SOC_OMAP2420
35extern void omap242x_map_common_io(void); 42extern void omap242x_map_common_io(void);
36#else 43#else
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 3223b81e7532..d1ff8399a222 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -15,9 +15,9 @@
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/hardware.h>
19#include <plat/sdrc.h> 18#include <plat/sdrc.h>
20 19
20#include "soc.h"
21#include "iomap.h" 21#include "iomap.h"
22#include "common.h" 22#include "common.h"
23#include "cm-regbits-34xx.h" 23#include "cm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index b8cdc8531b60..123186ac7d2e 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -16,12 +16,12 @@
16#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H 16#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H
17#define __ARCH_ARM_MACH_OMAP2_CONTROL_H 17#define __ARCH_ARM_MACH_OMAP2_CONTROL_H
18 18
19#include <mach/ctrl_module_core_44xx.h> 19#include "ctrl_module_core_44xx.h"
20#include <mach/ctrl_module_wkup_44xx.h> 20#include "ctrl_module_wkup_44xx.h"
21#include <mach/ctrl_module_pad_core_44xx.h> 21#include "ctrl_module_pad_core_44xx.h"
22#include <mach/ctrl_module_pad_wkup_44xx.h> 22#include "ctrl_module_pad_wkup_44xx.h"
23 23
24#include <plat/am33xx.h> 24#include "am33xx.h"
25 25
26#ifndef __ASSEMBLY__ 26#ifndef __ASSEMBLY__
27#define OMAP242X_CTRL_REGADDR(reg) \ 27#define OMAP242X_CTRL_REGADDR(reg) \
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index f2a49a48ef59..bc2756959be5 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -28,7 +28,6 @@
28#include <linux/cpu_pm.h> 28#include <linux/cpu_pm.h>
29 29
30#include <plat/prcm.h> 30#include <plat/prcm.h>
31#include <plat/irqs.h>
32#include "powerdomain.h" 31#include "powerdomain.h"
33#include "clockdomain.h" 32#include "clockdomain.h"
34 33
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h b/arch/arm/mach-omap2/ctrl_module_core_44xx.h
index 01970824e0e5..01970824e0e5 100644
--- a/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h
+++ b/arch/arm/mach-omap2/ctrl_module_core_44xx.h
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/ctrl_module_pad_core_44xx.h
index c88420de1151..c88420de1151 100644
--- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h
+++ b/arch/arm/mach-omap2/ctrl_module_pad_core_44xx.h
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_wkup_44xx.h b/arch/arm/mach-omap2/ctrl_module_pad_wkup_44xx.h
index 17c9b37042c0..17c9b37042c0 100644
--- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_wkup_44xx.h
+++ b/arch/arm/mach-omap2/ctrl_module_pad_wkup_44xx.h
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_wkup_44xx.h b/arch/arm/mach-omap2/ctrl_module_wkup_44xx.h
index a0af9baec3f7..a0af9baec3f7 100644
--- a/arch/arm/mach-omap2/include/mach/ctrl_module_wkup_44xx.h
+++ b/arch/arm/mach-omap2/ctrl_module_wkup_44xx.h
diff --git a/arch/arm/mach-omap2/debug-devices.h b/arch/arm/mach-omap2/debug-devices.h
new file mode 100644
index 000000000000..a4edbd2f7484
--- /dev/null
+++ b/arch/arm/mach-omap2/debug-devices.h
@@ -0,0 +1,9 @@
1#ifndef _OMAP_DEBUG_DEVICES_H
2#define _OMAP_DEBUG_DEVICES_H
3
4#include <linux/types.h>
5
6/* for TI reference platforms sharing the same debug card */
7extern int debug_card_init(u32 addr, unsigned gpio);
8
9#endif
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index c00c68961bb8..d092d2a89ee0 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -17,21 +17,20 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/of.h> 19#include <linux/of.h>
20#include <linux/pinctrl/machine.h>
20#include <linux/platform_data/omap4-keypad.h> 21#include <linux/platform_data/omap4-keypad.h>
21 22
22#include <mach/hardware.h>
23#include <mach/irqs.h>
24#include <asm/mach-types.h> 23#include <asm/mach-types.h>
25#include <asm/mach/map.h> 24#include <asm/mach/map.h>
26#include <asm/pmu.h>
27 25
28#include "iomap.h" 26#include "iomap.h"
29#include <plat/board.h>
30#include <plat/dma.h> 27#include <plat/dma.h>
31#include <plat/omap_hwmod.h> 28#include <plat/omap_hwmod.h>
32#include <plat/omap_device.h> 29#include <plat/omap_device.h>
33#include <plat/omap4-keypad.h> 30#include "omap4-keypad.h"
34 31
32#include "soc.h"
33#include "common.h"
35#include "mux.h" 34#include "mux.h"
36#include "control.h" 35#include "control.h"
37#include "devices.h" 36#include "devices.h"
@@ -112,7 +111,7 @@ static struct resource omap2cam_resources[] = {
112 .flags = IORESOURCE_MEM, 111 .flags = IORESOURCE_MEM,
113 }, 112 },
114 { 113 {
115 .start = INT_24XX_CAM_IRQ, 114 .start = 24 + OMAP_INTC_START,
116 .flags = IORESOURCE_IRQ, 115 .flags = IORESOURCE_IRQ,
117 } 116 }
118}; 117};
@@ -201,7 +200,7 @@ static struct resource omap3isp_resources[] = {
201 .flags = IORESOURCE_MEM, 200 .flags = IORESOURCE_MEM,
202 }, 201 },
203 { 202 {
204 .start = INT_34XX_CAM_IRQ, 203 .start = 24 + OMAP_INTC_START,
205 .flags = IORESOURCE_IRQ, 204 .flags = IORESOURCE_IRQ,
206 } 205 }
207}; 206};
@@ -385,7 +384,7 @@ static inline void omap_init_hdmi_audio(void) {}
385 384
386#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 385#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
387 386
388#include <plat/mcspi.h> 387#include <linux/platform_data/spi-omap2-mcspi.h>
389 388
390static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused) 389static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused)
391{ 390{
@@ -435,20 +434,18 @@ static inline void omap_init_mcspi(void) {}
435#endif 434#endif
436 435
437static struct resource omap2_pmu_resource = { 436static struct resource omap2_pmu_resource = {
438 .start = 3, 437 .start = 3 + OMAP_INTC_START,
439 .end = 3,
440 .flags = IORESOURCE_IRQ, 438 .flags = IORESOURCE_IRQ,
441}; 439};
442 440
443static struct resource omap3_pmu_resource = { 441static struct resource omap3_pmu_resource = {
444 .start = INT_34XX_BENCH_MPU_EMUL, 442 .start = 3 + OMAP_INTC_START,
445 .end = INT_34XX_BENCH_MPU_EMUL,
446 .flags = IORESOURCE_IRQ, 443 .flags = IORESOURCE_IRQ,
447}; 444};
448 445
449static struct platform_device omap_pmu_device = { 446static struct platform_device omap_pmu_device = {
450 .name = "arm-pmu", 447 .name = "arm-pmu",
451 .id = ARM_PMU_DEVICE_CPU, 448 .id = -1,
452 .num_resources = 1, 449 .num_resources = 1,
453}; 450};
454 451
@@ -475,7 +472,7 @@ static struct resource omap2_sham_resources[] = {
475 .flags = IORESOURCE_MEM, 472 .flags = IORESOURCE_MEM,
476 }, 473 },
477 { 474 {
478 .start = INT_24XX_SHA1MD5, 475 .start = 51 + OMAP_INTC_START,
479 .flags = IORESOURCE_IRQ, 476 .flags = IORESOURCE_IRQ,
480 } 477 }
481}; 478};
@@ -493,7 +490,7 @@ static struct resource omap3_sham_resources[] = {
493 .flags = IORESOURCE_MEM, 490 .flags = IORESOURCE_MEM,
494 }, 491 },
495 { 492 {
496 .start = INT_34XX_SHA1MD52_IRQ, 493 .start = 49 + OMAP_INTC_START,
497 .flags = IORESOURCE_IRQ, 494 .flags = IORESOURCE_IRQ,
498 }, 495 },
499 { 496 {
@@ -631,6 +628,10 @@ static inline void omap_init_vout(void) {}
631 628
632static int __init omap2_init_devices(void) 629static int __init omap2_init_devices(void)
633{ 630{
631 /* Enable dummy states for those platforms without pinctrl support */
632 if (!of_have_populated_dt())
633 pinctrl_provide_dummies();
634
634 /* 635 /*
635 * please keep these calls, and their implementations above, 636 * please keep these calls, and their implementations above,
636 * in alphabetical order so they're easier to sort through. 637 * in alphabetical order so they're easier to sort through.
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index b9c8d2f6a81f..ef666455c13a 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -28,9 +28,9 @@
28#include <linux/bitops.h> 28#include <linux/bitops.h>
29#include <linux/clkdev.h> 29#include <linux/clkdev.h>
30 30
31#include <plat/cpu.h>
32#include <plat/clock.h> 31#include <plat/clock.h>
33 32
33#include "soc.h"
34#include "clock.h" 34#include "clock.h"
35#include "cm2xxx_3xxx.h" 35#include "cm2xxx_3xxx.h"
36#include "cm-regbits-34xx.h" 36#include "cm-regbits-34xx.h"
@@ -623,8 +623,11 @@ unsigned long omap3_clkoutx2_recalc(struct clk *clk)
623 while (pclk && !pclk->dpll_data) 623 while (pclk && !pclk->dpll_data)
624 pclk = pclk->parent; 624 pclk = pclk->parent;
625 625
626 /* clk does not have a DPLL as a parent? */ 626 /* clk does not have a DPLL as a parent? error in the clock data */
627 WARN_ON(!pclk); 627 if (!pclk) {
628 WARN_ON(1);
629 return 0;
630 }
628 631
629 dd = pclk->dpll_data; 632 dd = pclk->dpll_data;
630 633
diff --git a/arch/arm/mach-omap2/dpll44xx.c b/arch/arm/mach-omap2/dpll44xx.c
index 9c6a296b3dc3..09d0ccccb861 100644
--- a/arch/arm/mach-omap2/dpll44xx.c
+++ b/arch/arm/mach-omap2/dpll44xx.c
@@ -15,9 +15,9 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/bitops.h> 16#include <linux/bitops.h>
17 17
18#include <plat/cpu.h>
19#include <plat/clock.h> 18#include <plat/clock.h>
20 19
20#include "soc.h"
21#include "clock.h" 21#include "clock.h"
22#include "clock44xx.h" 22#include "clock44xx.h"
23#include "cm-regbits-44xx.h" 23#include "cm-regbits-44xx.h"
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c
index a636ebc16b39..98388109f22a 100644
--- a/arch/arm/mach-omap2/dsp.c
+++ b/arch/arm/mach-omap2/dsp.c
@@ -30,7 +30,7 @@
30#include <plat/omap-pm.h> 30#include <plat/omap-pm.h>
31#endif 31#endif
32 32
33#include <plat/dsp.h> 33#include <linux/platform_data/dsp-omap.h>
34 34
35static struct platform_device *omap_dsp_pdev; 35static struct platform_device *omap_dsp_pdev;
36 36
diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
index e28e761b7ab9..b3566f68a559 100644
--- a/arch/arm/mach-omap2/emu.c
+++ b/arch/arm/mach-omap2/emu.c
@@ -21,8 +21,7 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/err.h> 22#include <linux/err.h>
23 23
24#include <mach/hardware.h> 24#include "soc.h"
25
26#include "iomap.h" 25#include "iomap.h"
27 26
28MODULE_LICENSE("GPL"); 27MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index fe626e903dea..d1058f16fb40 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -21,6 +21,7 @@
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/of.h> 23#include <linux/of.h>
24#include <linux/platform_data/gpio-omap.h>
24 25
25#include <plat/omap_hwmod.h> 26#include <plat/omap_hwmod.h>
26#include <plat/omap_device.h> 27#include <plat/omap_device.h>
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 386dec8d2351..4acf497faeb3 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -13,23 +13,31 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/mtd/nand.h> 15#include <linux/mtd/nand.h>
16#include <linux/platform_data/mtd-nand-omap2.h>
16 17
17#include <asm/mach/flash.h> 18#include <asm/mach/flash.h>
18 19
19#include <plat/cpu.h>
20#include <plat/nand.h>
21#include <plat/board.h>
22#include <plat/gpmc.h> 20#include <plat/gpmc.h>
23 21
24static struct resource gpmc_nand_resource = { 22#include "soc.h"
25 .flags = IORESOURCE_MEM, 23
24static struct resource gpmc_nand_resource[] = {
25 {
26 .flags = IORESOURCE_MEM,
27 },
28 {
29 .flags = IORESOURCE_IRQ,
30 },
31 {
32 .flags = IORESOURCE_IRQ,
33 },
26}; 34};
27 35
28static struct platform_device gpmc_nand_device = { 36static struct platform_device gpmc_nand_device = {
29 .name = "omap2-nand", 37 .name = "omap2-nand",
30 .id = 0, 38 .id = 0,
31 .num_resources = 1, 39 .num_resources = ARRAY_SIZE(gpmc_nand_resource),
32 .resource = &gpmc_nand_resource, 40 .resource = gpmc_nand_resource,
33}; 41};
34 42
35static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data) 43static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data)
@@ -75,6 +83,7 @@ static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data
75 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 0); 83 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 0);
76 gpmc_cs_configure(gpmc_nand_data->cs, 84 gpmc_cs_configure(gpmc_nand_data->cs,
77 GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); 85 GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND);
86 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_WP, 0);
78 err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); 87 err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t);
79 if (err) 88 if (err)
80 return err; 89 return err;
@@ -90,12 +99,19 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
90 gpmc_nand_device.dev.platform_data = gpmc_nand_data; 99 gpmc_nand_device.dev.platform_data = gpmc_nand_data;
91 100
92 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE, 101 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
93 &gpmc_nand_data->phys_base); 102 (unsigned long *)&gpmc_nand_resource[0].start);
94 if (err < 0) { 103 if (err < 0) {
95 dev_err(dev, "Cannot request GPMC CS\n"); 104 dev_err(dev, "Cannot request GPMC CS\n");
96 return err; 105 return err;
97 } 106 }
98 107
108 gpmc_nand_resource[0].end = gpmc_nand_resource[0].start +
109 NAND_IO_SIZE - 1;
110
111 gpmc_nand_resource[1].start =
112 gpmc_get_client_irq(GPMC_IRQ_FIFOEVENTENABLE);
113 gpmc_nand_resource[2].start =
114 gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT);
99 /* Set timings in GPMC */ 115 /* Set timings in GPMC */
100 err = omap2_nand_gpmc_retime(gpmc_nand_data); 116 err = omap2_nand_gpmc_retime(gpmc_nand_data);
101 if (err < 0) { 117 if (err < 0) {
@@ -108,6 +124,8 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
108 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_RDY_BSY, 1); 124 gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_RDY_BSY, 1);
109 } 125 }
110 126
127 gpmc_update_nand_reg(&gpmc_nand_data->reg, gpmc_nand_data->cs);
128
111 err = platform_device_register(&gpmc_nand_device); 129 err = platform_device_register(&gpmc_nand_device);
112 if (err < 0) { 130 if (err < 0) {
113 dev_err(dev, "Unable to register NAND device\n"); 131 dev_err(dev, "Unable to register NAND device\n");
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index a0fa9bb2bda5..916716e1da3b 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -15,19 +15,27 @@
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/mtd/onenand_regs.h> 16#include <linux/mtd/onenand_regs.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/platform_data/mtd-onenand-omap2.h>
18 19
19#include <asm/mach/flash.h> 20#include <asm/mach/flash.h>
20 21
21#include <plat/cpu.h>
22#include <plat/onenand.h>
23#include <plat/board.h>
24#include <plat/gpmc.h> 22#include <plat/gpmc.h>
25 23
24#include "soc.h"
25
26#define ONENAND_IO_SIZE SZ_128K
27
26static struct omap_onenand_platform_data *gpmc_onenand_data; 28static struct omap_onenand_platform_data *gpmc_onenand_data;
27 29
30static struct resource gpmc_onenand_resource = {
31 .flags = IORESOURCE_MEM,
32};
33
28static struct platform_device gpmc_onenand_device = { 34static struct platform_device gpmc_onenand_device = {
29 .name = "omap2-onenand", 35 .name = "omap2-onenand",
30 .id = -1, 36 .id = -1,
37 .num_resources = 1,
38 .resource = &gpmc_onenand_resource,
31}; 39};
32 40
33static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base) 41static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base)
@@ -390,6 +398,8 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr)
390 398
391void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) 399void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
392{ 400{
401 int err;
402
393 gpmc_onenand_data = _onenand_data; 403 gpmc_onenand_data = _onenand_data;
394 gpmc_onenand_data->onenand_setup = gpmc_onenand_setup; 404 gpmc_onenand_data->onenand_setup = gpmc_onenand_setup;
395 gpmc_onenand_device.dev.platform_data = gpmc_onenand_data; 405 gpmc_onenand_device.dev.platform_data = gpmc_onenand_data;
@@ -401,8 +411,19 @@ void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
401 gpmc_onenand_data->flags |= ONENAND_SYNC_READ; 411 gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
402 } 412 }
403 413
414 err = gpmc_cs_request(gpmc_onenand_data->cs, ONENAND_IO_SIZE,
415 (unsigned long *)&gpmc_onenand_resource.start);
416 if (err < 0) {
417 pr_err("%s: Cannot request GPMC CS\n", __func__);
418 return;
419 }
420
421 gpmc_onenand_resource.end = gpmc_onenand_resource.start +
422 ONENAND_IO_SIZE - 1;
423
404 if (platform_device_register(&gpmc_onenand_device) < 0) { 424 if (platform_device_register(&gpmc_onenand_device) < 0) {
405 printk(KERN_ERR "Unable to register OneNAND device\n"); 425 pr_err("%s: Unable to register OneNAND device\n", __func__);
426 gpmc_cs_free(gpmc_onenand_data->cs);
406 return; 427 return;
407 } 428 }
408} 429}
diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c
index ba10c24f3d8d..565475310374 100644
--- a/arch/arm/mach-omap2/gpmc-smc91x.c
+++ b/arch/arm/mach-omap2/gpmc-smc91x.c
@@ -17,9 +17,10 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/smc91x.h> 18#include <linux/smc91x.h>
19 19
20#include <plat/board.h>
21#include <plat/gpmc.h> 20#include <plat/gpmc.h>
22#include <plat/gpmc-smc91x.h> 21#include "gpmc-smc91x.h"
22
23#include "soc.h"
23 24
24static struct omap_smc91x_platform_data *gpmc_cfg; 25static struct omap_smc91x_platform_data *gpmc_cfg;
25 26
diff --git a/arch/arm/mach-omap2/gpmc-smc91x.h b/arch/arm/mach-omap2/gpmc-smc91x.h
new file mode 100644
index 000000000000..b64fbee4d567
--- /dev/null
+++ b/arch/arm/mach-omap2/gpmc-smc91x.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/plat-omap/include/mach/gpmc-smc91x.h
3 *
4 * Copyright (C) 2009 Nokia Corporation
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
11#ifndef __ASM_ARCH_OMAP_GPMC_SMC91X_H__
12
13#define GPMC_TIMINGS_SMC91C96 (1 << 4)
14#define GPMC_MUX_ADD_DATA (1 << 5) /* GPMC_CONFIG1_MUXADDDATA */
15#define GPMC_READ_MON (1 << 6) /* GPMC_CONFIG1_WAIT_READ_MON */
16#define GPMC_WRITE_MON (1 << 7) /* GPMC_CONFIG1_WAIT_WRITE_MON */
17
18struct omap_smc91x_platform_data {
19 int cs;
20 int gpio_irq;
21 int gpio_pwrdwn;
22 int gpio_reset;
23 int wait_pin; /* Optional GPMC_CONFIG1_WAITPINSELECT */
24 u32 flags;
25 int (*retime)(void);
26};
27
28#if defined(CONFIG_SMC91X) || \
29 defined(CONFIG_SMC91X_MODULE)
30
31extern void gpmc_smc91x_init(struct omap_smc91x_platform_data *d);
32
33#else
34
35#define board_smc91x_data NULL
36
37static inline void gpmc_smc91x_init(struct omap_smc91x_platform_data *d)
38{
39}
40
41#endif
42#endif
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index b6c77be3e8f7..249a0b440cd6 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -20,9 +20,8 @@
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/smsc911x.h> 21#include <linux/smsc911x.h>
22 22
23#include <plat/board.h>
24#include <plat/gpmc.h> 23#include <plat/gpmc.h>
25#include <plat/gpmc-smsc911x.h> 24#include "gpmc-smsc911x.h"
26 25
27static struct resource gpmc_smsc911x_resources[] = { 26static struct resource gpmc_smsc911x_resources[] = {
28 [0] = { 27 [0] = {
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.h b/arch/arm/mach-omap2/gpmc-smsc911x.h
new file mode 100644
index 000000000000..ea6c9c88c725
--- /dev/null
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
3 *
4 * Copyright (C) 2009 Li-Pro.Net
5 * Stephan Linz <linz@li-pro.net>
6 *
7 * Modified from arch/arm/plat-omap/include/plat/gpmc-smc91x.h
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
14#ifndef __ASM_ARCH_OMAP_GPMC_SMSC911X_H__
15
16struct omap_smsc911x_platform_data {
17 int id;
18 int cs;
19 int gpio_irq;
20 int gpio_reset;
21 u32 flags;
22};
23
24#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
25
26extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d);
27
28#else
29
30static inline void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d)
31{
32}
33
34#endif
35#endif
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index b2b5759ab0fe..72428bd45efc 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -28,8 +28,13 @@
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <plat/gpmc.h> 29#include <plat/gpmc.h>
30 30
31#include <plat/cpu.h>
32#include <plat/gpmc.h>
31#include <plat/sdrc.h> 33#include <plat/sdrc.h>
32 34
35#include "soc.h"
36#include "common.h"
37
33/* GPMC register offsets */ 38/* GPMC register offsets */
34#define GPMC_REVISION 0x00 39#define GPMC_REVISION 0x00
35#define GPMC_SYSCONFIG 0x10 40#define GPMC_SYSCONFIG 0x10
@@ -78,6 +83,15 @@
78#define ENABLE_PREFETCH (0x1 << 7) 83#define ENABLE_PREFETCH (0x1 << 7)
79#define DMA_MPU_MODE 2 84#define DMA_MPU_MODE 2
80 85
86/* XXX: Only NAND irq has been considered,currently these are the only ones used
87 */
88#define GPMC_NR_IRQ 2
89
90struct gpmc_client_irq {
91 unsigned irq;
92 u32 bitmask;
93};
94
81/* Structure to save gpmc cs context */ 95/* Structure to save gpmc cs context */
82struct gpmc_cs_config { 96struct gpmc_cs_config {
83 u32 config1; 97 u32 config1;
@@ -105,6 +119,10 @@ struct omap3_gpmc_regs {
105 struct gpmc_cs_config cs_context[GPMC_CS_NUM]; 119 struct gpmc_cs_config cs_context[GPMC_CS_NUM];
106}; 120};
107 121
122static struct gpmc_client_irq gpmc_client_irq[GPMC_NR_IRQ];
123static struct irq_chip gpmc_irq_chip;
124static unsigned gpmc_irq_start;
125
108static struct resource gpmc_mem_root; 126static struct resource gpmc_mem_root;
109static struct resource gpmc_cs_mem[GPMC_CS_NUM]; 127static struct resource gpmc_cs_mem[GPMC_CS_NUM];
110static DEFINE_SPINLOCK(gpmc_mem_lock); 128static DEFINE_SPINLOCK(gpmc_mem_lock);
@@ -279,7 +297,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
279 297
280 div = gpmc_cs_calc_divider(cs, t->sync_clk); 298 div = gpmc_cs_calc_divider(cs, t->sync_clk);
281 if (div < 0) 299 if (div < 0)
282 return -1; 300 return div;
283 301
284 GPMC_SET_ONE(GPMC_CS_CONFIG2, 0, 3, cs_on); 302 GPMC_SET_ONE(GPMC_CS_CONFIG2, 0, 3, cs_on);
285 GPMC_SET_ONE(GPMC_CS_CONFIG2, 8, 12, cs_rd_off); 303 GPMC_SET_ONE(GPMC_CS_CONFIG2, 8, 12, cs_rd_off);
@@ -682,6 +700,117 @@ int gpmc_prefetch_reset(int cs)
682} 700}
683EXPORT_SYMBOL(gpmc_prefetch_reset); 701EXPORT_SYMBOL(gpmc_prefetch_reset);
684 702
703void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
704{
705 reg->gpmc_status = gpmc_base + GPMC_STATUS;
706 reg->gpmc_nand_command = gpmc_base + GPMC_CS0_OFFSET +
707 GPMC_CS_NAND_COMMAND + GPMC_CS_SIZE * cs;
708 reg->gpmc_nand_address = gpmc_base + GPMC_CS0_OFFSET +
709 GPMC_CS_NAND_ADDRESS + GPMC_CS_SIZE * cs;
710 reg->gpmc_nand_data = gpmc_base + GPMC_CS0_OFFSET +
711 GPMC_CS_NAND_DATA + GPMC_CS_SIZE * cs;
712 reg->gpmc_prefetch_config1 = gpmc_base + GPMC_PREFETCH_CONFIG1;
713 reg->gpmc_prefetch_config2 = gpmc_base + GPMC_PREFETCH_CONFIG2;
714 reg->gpmc_prefetch_control = gpmc_base + GPMC_PREFETCH_CONTROL;
715 reg->gpmc_prefetch_status = gpmc_base + GPMC_PREFETCH_STATUS;
716 reg->gpmc_ecc_config = gpmc_base + GPMC_ECC_CONFIG;
717 reg->gpmc_ecc_control = gpmc_base + GPMC_ECC_CONTROL;
718 reg->gpmc_ecc_size_config = gpmc_base + GPMC_ECC_SIZE_CONFIG;
719 reg->gpmc_ecc1_result = gpmc_base + GPMC_ECC1_RESULT;
720 reg->gpmc_bch_result0 = gpmc_base + GPMC_ECC_BCH_RESULT_0;
721}
722
723int gpmc_get_client_irq(unsigned irq_config)
724{
725 int i;
726
727 if (hweight32(irq_config) > 1)
728 return 0;
729
730 for (i = 0; i < GPMC_NR_IRQ; i++)
731 if (gpmc_client_irq[i].bitmask & irq_config)
732 return gpmc_client_irq[i].irq;
733
734 return 0;
735}
736
737static int gpmc_irq_endis(unsigned irq, bool endis)
738{
739 int i;
740 u32 regval;
741
742 for (i = 0; i < GPMC_NR_IRQ; i++)
743 if (irq == gpmc_client_irq[i].irq) {
744 regval = gpmc_read_reg(GPMC_IRQENABLE);
745 if (endis)
746 regval |= gpmc_client_irq[i].bitmask;
747 else
748 regval &= ~gpmc_client_irq[i].bitmask;
749 gpmc_write_reg(GPMC_IRQENABLE, regval);
750 break;
751 }
752
753 return 0;
754}
755
756static void gpmc_irq_disable(struct irq_data *p)
757{
758 gpmc_irq_endis(p->irq, false);
759}
760
761static void gpmc_irq_enable(struct irq_data *p)
762{
763 gpmc_irq_endis(p->irq, true);
764}
765
766static void gpmc_irq_noop(struct irq_data *data) { }
767
768static unsigned int gpmc_irq_noop_ret(struct irq_data *data) { return 0; }
769
770static int gpmc_setup_irq(int gpmc_irq)
771{
772 int i;
773 u32 regval;
774
775 if (!gpmc_irq)
776 return -EINVAL;
777
778 gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0);
779 if (IS_ERR_VALUE(gpmc_irq_start)) {
780 pr_err("irq_alloc_descs failed\n");
781 return gpmc_irq_start;
782 }
783
784 gpmc_irq_chip.name = "gpmc";
785 gpmc_irq_chip.irq_startup = gpmc_irq_noop_ret;
786 gpmc_irq_chip.irq_enable = gpmc_irq_enable;
787 gpmc_irq_chip.irq_disable = gpmc_irq_disable;
788 gpmc_irq_chip.irq_shutdown = gpmc_irq_noop;
789 gpmc_irq_chip.irq_ack = gpmc_irq_noop;
790 gpmc_irq_chip.irq_mask = gpmc_irq_noop;
791 gpmc_irq_chip.irq_unmask = gpmc_irq_noop;
792
793 gpmc_client_irq[0].bitmask = GPMC_IRQ_FIFOEVENTENABLE;
794 gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT;
795
796 for (i = 0; i < GPMC_NR_IRQ; i++) {
797 gpmc_client_irq[i].irq = gpmc_irq_start + i;
798 irq_set_chip_and_handler(gpmc_client_irq[i].irq,
799 &gpmc_irq_chip, handle_simple_irq);
800 set_irq_flags(gpmc_client_irq[i].irq,
801 IRQF_VALID | IRQF_NOAUTOEN);
802 }
803
804 /* Disable interrupts */
805 gpmc_write_reg(GPMC_IRQENABLE, 0);
806
807 /* clear interrupts */
808 regval = gpmc_read_reg(GPMC_IRQSTATUS);
809 gpmc_write_reg(GPMC_IRQSTATUS, regval);
810
811 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL);
812}
813
685static void __init gpmc_mem_init(void) 814static void __init gpmc_mem_init(void)
686{ 815{
687 int cs; 816 int cs;
@@ -711,8 +840,8 @@ static void __init gpmc_mem_init(void)
711 840
712static int __init gpmc_init(void) 841static int __init gpmc_init(void)
713{ 842{
714 u32 l, irq; 843 u32 l;
715 int cs, ret = -EINVAL; 844 int ret = -EINVAL;
716 int gpmc_irq; 845 int gpmc_irq;
717 char *ck = NULL; 846 char *ck = NULL;
718 847
@@ -722,16 +851,16 @@ static int __init gpmc_init(void)
722 l = OMAP2420_GPMC_BASE; 851 l = OMAP2420_GPMC_BASE;
723 else 852 else
724 l = OMAP34XX_GPMC_BASE; 853 l = OMAP34XX_GPMC_BASE;
725 gpmc_irq = INT_34XX_GPMC_IRQ; 854 gpmc_irq = 20 + OMAP_INTC_START;
726 } else if (cpu_is_omap34xx()) { 855 } else if (cpu_is_omap34xx()) {
727 ck = "gpmc_fck"; 856 ck = "gpmc_fck";
728 l = OMAP34XX_GPMC_BASE; 857 l = OMAP34XX_GPMC_BASE;
729 gpmc_irq = INT_34XX_GPMC_IRQ; 858 gpmc_irq = 20 + OMAP_INTC_START;
730 } else if (cpu_is_omap44xx() || soc_is_omap54xx()) { 859 } else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
731 /* Base address and irq number are same for OMAP4/5 */ 860 /* Base address and irq number are same for OMAP4/5 */
732 ck = "gpmc_ck"; 861 ck = "gpmc_ck";
733 l = OMAP44XX_GPMC_BASE; 862 l = OMAP44XX_GPMC_BASE;
734 gpmc_irq = OMAP44XX_IRQ_GPMC; 863 gpmc_irq = 20 + OMAP44XX_IRQ_GIC_START;
735 } 864 }
736 865
737 if (WARN_ON(!ck)) 866 if (WARN_ON(!ck))
@@ -761,16 +890,7 @@ static int __init gpmc_init(void)
761 gpmc_write_reg(GPMC_SYSCONFIG, l); 890 gpmc_write_reg(GPMC_SYSCONFIG, l);
762 gpmc_mem_init(); 891 gpmc_mem_init();
763 892
764 /* initalize the irq_chained */ 893 ret = gpmc_setup_irq(gpmc_irq);
765 irq = OMAP_GPMC_IRQ_BASE;
766 for (cs = 0; cs < GPMC_CS_NUM; cs++) {
767 irq_set_chip_and_handler(irq, &dummy_irq_chip,
768 handle_simple_irq);
769 set_irq_flags(irq, IRQF_VALID);
770 irq++;
771 }
772
773 ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL);
774 if (ret) 894 if (ret)
775 pr_err("gpmc: irq-%d could not claim: err %d\n", 895 pr_err("gpmc: irq-%d could not claim: err %d\n",
776 gpmc_irq, ret); 896 gpmc_irq, ret);
@@ -780,12 +900,19 @@ postcore_initcall(gpmc_init);
780 900
781static irqreturn_t gpmc_handle_irq(int irq, void *dev) 901static irqreturn_t gpmc_handle_irq(int irq, void *dev)
782{ 902{
783 u8 cs; 903 int i;
904 u32 regval;
905
906 regval = gpmc_read_reg(GPMC_IRQSTATUS);
907
908 if (!regval)
909 return IRQ_NONE;
910
911 for (i = 0; i < GPMC_NR_IRQ; i++)
912 if (regval & gpmc_client_irq[i].bitmask)
913 generic_handle_irq(gpmc_client_irq[i].irq);
784 914
785 /* check cs to invoke the irq */ 915 gpmc_write_reg(GPMC_IRQSTATUS, regval);
786 cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7;
787 if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END)
788 generic_handle_irq(OMAP_GPMC_IRQ_BASE+cs);
789 916
790 return IRQ_HANDLED; 917 return IRQ_HANDLED;
791} 918}
diff --git a/arch/arm/mach-omap2/hdq1w.c b/arch/arm/mach-omap2/hdq1w.c
index cdd6dda03828..e003f2bba30c 100644
--- a/arch/arm/mach-omap2/hdq1w.c
+++ b/arch/arm/mach-omap2/hdq1w.c
@@ -29,7 +29,7 @@
29 29
30#include <plat/omap_hwmod.h> 30#include <plat/omap_hwmod.h>
31#include <plat/omap_device.h> 31#include <plat/omap_device.h>
32#include <plat/hdq1w.h> 32#include "hdq1w.h"
33 33
34#include "common.h" 34#include "common.h"
35 35
diff --git a/arch/arm/mach-omap2/hdq1w.h b/arch/arm/mach-omap2/hdq1w.h
new file mode 100644
index 000000000000..0c1efc846d8d
--- /dev/null
+++ b/arch/arm/mach-omap2/hdq1w.h
@@ -0,0 +1,36 @@
1/*
2 * Shared macros and function prototypes for the HDQ1W/1-wire IP block
3 *
4 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 */
21#ifndef ARCH_ARM_MACH_OMAP2_HDQ1W_H
22#define ARCH_ARM_MACH_OMAP2_HDQ1W_H
23
24#include <plat/omap_hwmod.h>
25
26/*
27 * XXX A future cleanup patch should modify
28 * drivers/w1/masters/omap_hdq.c to use these macros
29 */
30#define HDQ_CTRL_STATUS_OFFSET 0x0c
31#define HDQ_CTRL_STATUS_CLOCKENABLE_SHIFT 5
32
33
34extern int omap_hdq1w_reset(struct omap_hwmod *oh);
35
36#endif
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index a9675d8d1822..03ebf47cfa9a 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -15,9 +15,10 @@
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18#include <linux/platform_data/gpio-omap.h>
19
18#include <plat/mmc.h> 20#include <plat/mmc.h>
19#include <plat/omap-pm.h> 21#include <plat/omap-pm.h>
20#include <plat/mux.h>
21#include <plat/omap_device.h> 22#include <plat/omap_device.h>
22 23
23#include "mux.h" 24#include "mux.h"
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index a12e224eb97d..fc57e67b321f 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <plat/cpu.h>
23#include <plat/i2c.h> 22#include <plat/i2c.h>
24#include "common.h" 23#include "common.h"
25#include <plat/omap_hwmod.h> 24#include <plat/omap_hwmod.h>
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 40373db649aa..cf2362ccb234 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -22,10 +22,10 @@
22#include <asm/cputype.h> 22#include <asm/cputype.h>
23 23
24#include "common.h" 24#include "common.h"
25#include <plat/cpu.h>
26 25
27#include <mach/id.h> 26#include "id.h"
28 27
28#include "soc.h"
29#include "control.h" 29#include "control.h"
30 30
31static unsigned int omap_revision; 31static unsigned int omap_revision;
@@ -161,9 +161,8 @@ void __init omap2xxx_check_revision(void)
161 } 161 }
162 162
163 if (j == ARRAY_SIZE(omap_ids)) { 163 if (j == ARRAY_SIZE(omap_ids)) {
164 printk(KERN_ERR "Unknown OMAP device type. " 164 pr_err("Unknown OMAP device type. Handling it as OMAP%04x\n",
165 "Handling it as OMAP%04x\n", 165 omap_ids[i].type >> 16);
166 omap_ids[i].type >> 16);
167 j = i; 166 j = i;
168 } 167 }
169 168
diff --git a/arch/arm/mach-omap2/include/mach/id.h b/arch/arm/mach-omap2/id.h
index 02ed3aa56f1e..02ed3aa56f1e 100644
--- a/arch/arm/mach-omap2/include/mach/id.h
+++ b/arch/arm/mach-omap2/id.h
diff --git a/arch/arm/mach-omap2/include/mach/gpio.h b/arch/arm/mach-omap2/include/mach/gpio.h
index be4d290d57ee..5621cc59c9f4 100644
--- a/arch/arm/mach-omap2/include/mach/gpio.h
+++ b/arch/arm/mach-omap2/include/mach/gpio.h
@@ -1,5 +1,3 @@
1/* 1/*
2 * arch/arm/mach-omap2/include/mach/gpio.h 2 * arch/arm/mach-omap2/include/mach/gpio.h
3 */ 3 */
4
5#include <plat/gpio.h>
diff --git a/arch/arm/mach-omap2/include/mach/hardware.h b/arch/arm/mach-omap2/include/mach/hardware.h
index 78edf9d33f71..54492dbf6973 100644
--- a/arch/arm/mach-omap2/include/mach/hardware.h
+++ b/arch/arm/mach-omap2/include/mach/hardware.h
@@ -1,5 +1,3 @@
1/* 1/*
2 * arch/arm/mach-omap2/include/mach/hardware.h 2 * arch/arm/mach-omap2/include/mach/hardware.h
3 */ 3 */
4
5#include <plat/hardware.h>
diff --git a/arch/arm/mach-omap2/include/mach/irqs.h b/arch/arm/mach-omap2/include/mach/irqs.h
index 44dab7725696..ba5282cafa42 100644
--- a/arch/arm/mach-omap2/include/mach/irqs.h
+++ b/arch/arm/mach-omap2/include/mach/irqs.h
@@ -1,5 +1,3 @@
1/* 1/*
2 * arch/arm/mach-omap2/include/mach/irqs.h 2 * arch/arm/mach-omap2/include/mach/irqs.h
3 */ 3 */
4
5#include <plat/irqs.h>
diff --git a/arch/arm/mach-omap2/include/mach/smp.h b/arch/arm/mach-omap2/include/mach/smp.h
deleted file mode 100644
index 323675f21b69..000000000000
--- a/arch/arm/mach-omap2/include/mach/smp.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-omap2/include/mach/smp.h
3 */
4
5#include <plat/smp.h>
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 4d2d981ff5c5..0d79c23e9f88 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -33,6 +33,7 @@
33#include <plat/multi.h> 33#include <plat/multi.h>
34#include <plat/dma.h> 34#include <plat/dma.h>
35 35
36#include "soc.h"
36#include "iomap.h" 37#include "iomap.h"
37#include "voltage.h" 38#include "voltage.h"
38#include "powerdomain.h" 39#include "powerdomain.h"
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index bcd83db41bbc..3926f370448f 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -23,8 +23,7 @@
23#include <linux/of_address.h> 23#include <linux/of_address.h>
24#include <linux/of_irq.h> 24#include <linux/of_irq.h>
25 25
26#include <mach/hardware.h> 26#include "soc.h"
27
28#include "iomap.h" 27#include "iomap.h"
29#include "common.h" 28#include "common.h"
30 29
@@ -49,6 +48,8 @@
49#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) 48#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
50#define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */ 49#define INTCPS_SIR_IRQ_OFFSET 0x0040 /* omap2/3 active interrupt offset */
51#define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */ 50#define ACTIVEIRQ_MASK 0x7f /* omap2/3 active interrupt bits */
51#define INTCPS_NR_MIR_REGS 3
52#define INTCPS_NR_IRQS 96
52 53
53/* 54/*
54 * OMAP2 has a number of different interrupt controllers, each interrupt 55 * OMAP2 has a number of different interrupt controllers, each interrupt
@@ -107,9 +108,8 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
107 unsigned long tmp; 108 unsigned long tmp;
108 109
109 tmp = intc_bank_read_reg(bank, INTC_REVISION) & 0xff; 110 tmp = intc_bank_read_reg(bank, INTC_REVISION) & 0xff;
110 printk(KERN_INFO "IRQ: Found an INTC at 0x%p " 111 pr_info("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n",
111 "(revision %ld.%ld) with %d interrupts\n", 112 bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
112 bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
113 113
114 tmp = intc_bank_read_reg(bank, INTC_SYSCONFIG); 114 tmp = intc_bank_read_reg(bank, INTC_SYSCONFIG);
115 tmp |= 1 << 1; /* soft reset */ 115 tmp |= 1 << 1; /* soft reset */
diff --git a/arch/arm/mach-omap2/l3_2xxx.h b/arch/arm/mach-omap2/l3_2xxx.h
new file mode 100644
index 000000000000..b8b5641379b0
--- /dev/null
+++ b/arch/arm/mach-omap2/l3_2xxx.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/plat-omap/include/plat/l3_2xxx.h - L3 firewall definitions
3 *
4 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
5 * Sumit Semwal
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_2XXX_H
14#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_2XXX_H
15
16/* L3 CONNIDs */
17/* Display Sub system (DSS) */
18#define OMAP2_L3_CORE_FW_CONNID_DSS 8
19
20#endif
diff --git a/arch/arm/mach-omap2/l3_3xxx.h b/arch/arm/mach-omap2/l3_3xxx.h
new file mode 100644
index 000000000000..cde1938c5f82
--- /dev/null
+++ b/arch/arm/mach-omap2/l3_3xxx.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/plat-omap/include/plat/l3_3xxx.h - L3 firewall definitions
3 *
4 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
5 * Sumit Semwal
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_3XXX_H
14#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_3XXX_H
15
16/* L3 Initiator IDs */
17/* Display Sub system (DSS) */
18#define OMAP3_L3_CORE_FW_INIT_ID_DSS 29
19
20#endif
diff --git a/arch/arm/mach-omap2/l4_2xxx.h b/arch/arm/mach-omap2/l4_2xxx.h
new file mode 100644
index 000000000000..3f39cf8a35c6
--- /dev/null
+++ b/arch/arm/mach-omap2/l4_2xxx.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/plat-omap/include/plat/l4_2xxx.h - L4 firewall definitions
3 *
4 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
5 * Sumit Semwal
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L4_2XXX_H
14#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L4_2XXX_H
15
16/* L4 CORE */
17/* Display Sub system (DSS) */
18#define OMAP2420_L4_CORE_FW_DSS_CORE_REGION 28
19#define OMAP2420_L4_CORE_FW_DSS_DISPC_REGION 29
20#define OMAP2420_L4_CORE_FW_DSS_RFBI_REGION 30
21#define OMAP2420_L4_CORE_FW_DSS_VENC_REGION 31
22#define OMAP2420_L4_CORE_FW_DSS_TA_REGION 32
23
24#endif
diff --git a/arch/arm/mach-omap2/l4_3xxx.h b/arch/arm/mach-omap2/l4_3xxx.h
new file mode 100644
index 000000000000..881a858b1ffc
--- /dev/null
+++ b/arch/arm/mach-omap2/l4_3xxx.h
@@ -0,0 +1,34 @@
1/*
2 * arch/arm/plat-omap/include/mach/l4_3xxx.h - L4 firewall definitions
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_L4_3XXX_H
14#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_L4_3XXX_H
15
16/* L4 CORE */
17#define OMAP3_L4_CORE_FW_I2C1_REGION 21
18#define OMAP3_L4_CORE_FW_I2C1_TA_REGION 22
19#define OMAP3_L4_CORE_FW_I2C2_REGION 23
20#define OMAP3_L4_CORE_FW_I2C2_TA_REGION 24
21#define OMAP3_L4_CORE_FW_I2C3_REGION 73
22#define OMAP3_L4_CORE_FW_I2C3_TA_REGION 74
23
24/* Display Sub system (DSS) */
25#define OMAP3_L4_CORE_FW_DSS_PROT_GROUP 2
26
27#define OMAP3_L4_CORE_FW_DSS_DSI_REGION 104
28#define OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION 3
29#define OMAP3_L4_CORE_FW_DSS_CORE_REGION 4
30#define OMAP3_L4_CORE_FW_DSS_DISPC_REGION 4
31#define OMAP3_L4_CORE_FW_DSS_RFBI_REGION 5
32#define OMAP3_L4_CORE_FW_DSS_VENC_REGION 6
33#define OMAP3_L4_CORE_FW_DSS_TA_REGION 7
34#endif
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 6875be837d9f..0d974565f8ca 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -16,8 +16,10 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/pm_runtime.h> 18#include <linux/pm_runtime.h>
19
19#include <plat/mailbox.h> 20#include <plat/mailbox.h>
20#include <mach/irqs.h> 21
22#include "soc.h"
21 23
22#define MAILBOX_REVISION 0x000 24#define MAILBOX_REVISION 0x000
23#define MAILBOX_MESSAGE(m) (0x040 + 4 * (m)) 25#define MAILBOX_MESSAGE(m) (0x040 + 4 * (m))
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 577cb77db26c..7d47407d6d46 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -17,11 +17,9 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/platform_data/asoc-ti-mcbsp.h>
20 21
21#include <mach/irqs.h>
22#include <plat/dma.h> 22#include <plat/dma.h>
23#include <plat/cpu.h>
24#include <plat/mcbsp.h>
25#include <plat/omap_device.h> 23#include <plat/omap_device.h>
26#include <linux/pm_runtime.h> 24#include <linux/pm_runtime.h>
27 25
diff --git a/arch/arm/mach-omap2/msdi.c b/arch/arm/mach-omap2/msdi.c
index fb5bc6cf3773..9e57b4aadb06 100644
--- a/arch/arm/mach-omap2/msdi.c
+++ b/arch/arm/mach-omap2/msdi.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/platform_data/gpio-omap.h>
26 27
27#include <plat/omap_hwmod.h> 28#include <plat/omap_hwmod.h>
28#include <plat/omap_device.h> 29#include <plat/omap_device.h>
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 414083b427df..765a2aceb665 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -20,7 +20,7 @@
20#include <linux/io.h> 20#include <linux/io.h>
21 21
22#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <mach/omap-wakeupgen.h> 23#include "omap-wakeupgen.h"
24 24
25#include "common.h" 25#include "common.h"
26 26
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index 1be8bcb52e93..df298d46707c 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -14,7 +14,9 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15 15
16#include <plat/iommu.h> 16#include <plat/iommu.h>
17#include <plat/irqs.h> 17
18#include "soc.h"
19#include "common.h"
18 20
19struct iommu_device { 21struct iommu_device {
20 resource_size_t base; 22 resource_size_t base;
@@ -29,7 +31,7 @@ static int num_iommu_devices;
29static struct iommu_device omap3_devices[] = { 31static struct iommu_device omap3_devices[] = {
30 { 32 {
31 .base = 0x480bd400, 33 .base = 0x480bd400,
32 .irq = 24, 34 .irq = 24 + OMAP_INTC_START,
33 .pdata = { 35 .pdata = {
34 .name = "isp", 36 .name = "isp",
35 .nr_tlb_entries = 8, 37 .nr_tlb_entries = 8,
@@ -41,7 +43,7 @@ static struct iommu_device omap3_devices[] = {
41#if defined(CONFIG_OMAP_IOMMU_IVA2) 43#if defined(CONFIG_OMAP_IOMMU_IVA2)
42 { 44 {
43 .base = 0x5d000000, 45 .base = 0x5d000000,
44 .irq = 28, 46 .irq = 28 + OMAP_INTC_START,
45 .pdata = { 47 .pdata = {
46 .name = "iva2", 48 .name = "iva2",
47 .nr_tlb_entries = 32, 49 .nr_tlb_entries = 32,
@@ -64,7 +66,7 @@ static struct platform_device *omap3_iommu_pdev[NR_OMAP3_IOMMU_DEVICES];
64static struct iommu_device omap4_devices[] = { 66static struct iommu_device omap4_devices[] = {
65 { 67 {
66 .base = OMAP4_MMU1_BASE, 68 .base = OMAP4_MMU1_BASE,
67 .irq = OMAP44XX_IRQ_DUCATI_MMU, 69 .irq = 100 + OMAP44XX_IRQ_GIC_START,
68 .pdata = { 70 .pdata = {
69 .name = "ducati", 71 .name = "ducati",
70 .nr_tlb_entries = 32, 72 .nr_tlb_entries = 32,
@@ -75,7 +77,7 @@ static struct iommu_device omap4_devices[] = {
75 }, 77 },
76 { 78 {
77 .base = OMAP4_MMU2_BASE, 79 .base = OMAP4_MMU2_BASE,
78 .irq = OMAP44XX_IRQ_TESLA_MMU, 80 .irq = 28 + OMAP44XX_IRQ_GIC_START,
79 .pdata = { 81 .pdata = {
80 .name = "tesla", 82 .name = "tesla",
81 .nr_tlb_entries = 32, 83 .nr_tlb_entries = 32,
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 637a1bdf2ac4..ff4e6a0e9c7c 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -50,9 +50,8 @@
50#include <asm/suspend.h> 50#include <asm/suspend.h>
51#include <asm/hardware/cache-l2x0.h> 51#include <asm/hardware/cache-l2x0.h>
52 52
53#include <plat/omap44xx.h>
54
55#include "common.h" 53#include "common.h"
54#include "omap44xx.h"
56#include "omap4-sar-layout.h" 55#include "omap4-sar-layout.h"
57#include "pm.h" 56#include "pm.h"
58#include "prcm_mpu44xx.h" 57#include "prcm_mpu44xx.h"
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c
index d9ae4a53d818..a004cb9acf52 100644
--- a/arch/arm/mach-omap2/omap-secure.c
+++ b/arch/arm/mach-omap2/omap-secure.c
@@ -19,7 +19,7 @@
19#include <asm/memblock.h> 19#include <asm/memblock.h>
20 20
21#include <plat/omap-secure.h> 21#include <plat/omap-secure.h>
22#include <mach/omap-secure.h> 22#include "omap-secure.h"
23 23
24static phys_addr_t omap_secure_memblock_base; 24static phys_addr_t omap_secure_memblock_base;
25 25
diff --git a/arch/arm/mach-omap2/include/mach/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h
index c90a43589abe..c90a43589abe 100644
--- a/arch/arm/mach-omap2/include/mach/omap-secure.h
+++ b/arch/arm/mach-omap2/omap-secure.h
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9a35adf91232..06d8bc3a8886 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -24,11 +24,11 @@
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 26
27#include <mach/hardware.h> 27#include "omap-secure.h"
28#include <mach/omap-secure.h> 28#include "omap-wakeupgen.h"
29#include <mach/omap-wakeupgen.h>
30#include <asm/cputype.h> 29#include <asm/cputype.h>
31 30
31#include "soc.h"
32#include "iomap.h" 32#include "iomap.h"
33#include "common.h" 33#include "common.h"
34#include "clockdomain.h" 34#include "clockdomain.h"
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index c4bee21f4210..5d3b4f4f81ae 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -27,9 +27,10 @@
27 27
28#include <asm/hardware/gic.h> 28#include <asm/hardware/gic.h>
29 29
30#include <mach/omap-wakeupgen.h> 30#include "omap-wakeupgen.h"
31#include <mach/omap-secure.h> 31#include "omap-secure.h"
32 32
33#include "soc.h"
33#include "omap4-sar-layout.h" 34#include "omap4-sar-layout.h"
34#include "common.h" 35#include "common.h"
35 36
diff --git a/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h b/arch/arm/mach-omap2/omap-wakeupgen.h
index b0fd16f5c391..b0fd16f5c391 100644
--- a/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h
+++ b/arch/arm/mach-omap2/omap-wakeupgen.h
diff --git a/arch/arm/mach-omap2/omap24xx.h b/arch/arm/mach-omap2/omap24xx.h
new file mode 100644
index 000000000000..641a2c8d2eee
--- /dev/null
+++ b/arch/arm/mach-omap2/omap24xx.h
@@ -0,0 +1,87 @@
1/*
2 * This file contains the processor specific definitions
3 * of the TI OMAP24XX.
4 *
5 * Copyright (C) 2007 Texas Instruments.
6 * Copyright (C) 2007 Nokia Corporation.
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 */
23
24#ifndef __ASM_ARCH_OMAP2_H
25#define __ASM_ARCH_OMAP2_H
26
27/*
28 * Please place only base defines here and put the rest in device
29 * specific headers. Note also that some of these defines are needed
30 * for omap1 to compile without adding ifdefs.
31 */
32
33#define L4_24XX_BASE 0x48000000
34#define L4_WK_243X_BASE 0x49000000
35#define L3_24XX_BASE 0x68000000
36
37/* interrupt controller */
38#define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000)
39#define OMAP24XX_IVA_INTC_BASE 0x40000000
40
41#define OMAP242X_CTRL_BASE L4_24XX_BASE
42#define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
43#define OMAP2420_PRCM_BASE (L4_24XX_BASE + 0x8000)
44#define OMAP2420_CM_BASE (L4_24XX_BASE + 0x8000)
45#define OMAP2420_PRM_BASE OMAP2420_CM_BASE
46#define OMAP2420_SDRC_BASE (L3_24XX_BASE + 0x9000)
47#define OMAP2420_SMS_BASE 0x68008000
48#define OMAP2420_GPMC_BASE 0x6800a000
49
50#define OMAP2430_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000)
51#define OMAP2430_PRCM_BASE (L4_WK_243X_BASE + 0x6000)
52#define OMAP2430_CM_BASE (L4_WK_243X_BASE + 0x6000)
53#define OMAP2430_PRM_BASE OMAP2430_CM_BASE
54
55#define OMAP243X_SMS_BASE 0x6C000000
56#define OMAP243X_SDRC_BASE 0x6D000000
57#define OMAP243X_GPMC_BASE 0x6E000000
58#define OMAP243X_SCM_BASE (L4_WK_243X_BASE + 0x2000)
59#define OMAP243X_CTRL_BASE OMAP243X_SCM_BASE
60#define OMAP243X_HS_BASE (L4_24XX_BASE + 0x000ac000)
61
62/* DSP SS */
63#define OMAP2420_DSP_BASE 0x58000000
64#define OMAP2420_DSP_MEM_BASE (OMAP2420_DSP_BASE + 0x0)
65#define OMAP2420_DSP_IPI_BASE (OMAP2420_DSP_BASE + 0x1000000)
66#define OMAP2420_DSP_MMU_BASE (OMAP2420_DSP_BASE + 0x2000000)
67
68#define OMAP243X_DSP_BASE 0x5C000000
69#define OMAP243X_DSP_MEM_BASE (OMAP243X_DSP_BASE + 0x0)
70#define OMAP243X_DSP_MMU_BASE (OMAP243X_DSP_BASE + 0x1000000)
71
72/* Mailbox */
73#define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000)
74
75/* Camera */
76#define OMAP24XX_CAMERA_BASE (L4_24XX_BASE + 0x52000)
77
78/* Security */
79#define OMAP24XX_SEC_BASE (L4_24XX_BASE + 0xA0000)
80#define OMAP24XX_SEC_RNG_BASE (OMAP24XX_SEC_BASE + 0x0000)
81#define OMAP24XX_SEC_DES_BASE (OMAP24XX_SEC_BASE + 0x2000)
82#define OMAP24XX_SEC_SHA1MD5_BASE (OMAP24XX_SEC_BASE + 0x4000)
83#define OMAP24XX_SEC_AES_BASE (OMAP24XX_SEC_BASE + 0x6000)
84#define OMAP24XX_SEC_PKA_BASE (OMAP24XX_SEC_BASE + 0x8000)
85
86#endif /* __ASM_ARCH_OMAP2_H */
87
diff --git a/arch/arm/mach-omap2/omap34xx.h b/arch/arm/mach-omap2/omap34xx.h
new file mode 100644
index 000000000000..c0d1b4b1653f
--- /dev/null
+++ b/arch/arm/mach-omap2/omap34xx.h
@@ -0,0 +1,99 @@
1/*
2 * This file contains the processor specific definitions of the TI OMAP34XX.
3 *
4 * Copyright (C) 2007 Texas Instruments.
5 * Copyright (C) 2007 Nokia Corporation.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ASM_ARCH_OMAP3_H
23#define __ASM_ARCH_OMAP3_H
24
25/*
26 * Please place only base defines here and put the rest in device
27 * specific headers.
28 */
29
30#define L4_34XX_BASE 0x48000000
31#define L4_WK_34XX_BASE 0x48300000
32#define L4_PER_34XX_BASE 0x49000000
33#define L4_EMU_34XX_BASE 0x54000000
34#define L3_34XX_BASE 0x68000000
35
36#define L4_WK_AM33XX_BASE 0x44C00000
37
38#define OMAP3430_32KSYNCT_BASE 0x48320000
39#define OMAP3430_CM_BASE 0x48004800
40#define OMAP3430_PRM_BASE 0x48306800
41#define OMAP343X_SMS_BASE 0x6C000000
42#define OMAP343X_SDRC_BASE 0x6D000000
43#define OMAP34XX_GPMC_BASE 0x6E000000
44#define OMAP343X_SCM_BASE 0x48002000
45#define OMAP343X_CTRL_BASE OMAP343X_SCM_BASE
46
47#define OMAP34XX_IC_BASE 0x48200000
48
49#define OMAP3430_ISP_BASE (L4_34XX_BASE + 0xBC000)
50#define OMAP3430_ISP_CBUFF_BASE (OMAP3430_ISP_BASE + 0x0100)
51#define OMAP3430_ISP_CCP2_BASE (OMAP3430_ISP_BASE + 0x0400)
52#define OMAP3430_ISP_CCDC_BASE (OMAP3430_ISP_BASE + 0x0600)
53#define OMAP3430_ISP_HIST_BASE (OMAP3430_ISP_BASE + 0x0A00)
54#define OMAP3430_ISP_H3A_BASE (OMAP3430_ISP_BASE + 0x0C00)
55#define OMAP3430_ISP_PREV_BASE (OMAP3430_ISP_BASE + 0x0E00)
56#define OMAP3430_ISP_RESZ_BASE (OMAP3430_ISP_BASE + 0x1000)
57#define OMAP3430_ISP_SBL_BASE (OMAP3430_ISP_BASE + 0x1200)
58#define OMAP3430_ISP_MMU_BASE (OMAP3430_ISP_BASE + 0x1400)
59#define OMAP3430_ISP_CSI2A_REGS1_BASE (OMAP3430_ISP_BASE + 0x1800)
60#define OMAP3430_ISP_CSIPHY2_BASE (OMAP3430_ISP_BASE + 0x1970)
61#define OMAP3630_ISP_CSI2A_REGS2_BASE (OMAP3430_ISP_BASE + 0x19C0)
62#define OMAP3630_ISP_CSI2C_REGS1_BASE (OMAP3430_ISP_BASE + 0x1C00)
63#define OMAP3630_ISP_CSIPHY1_BASE (OMAP3430_ISP_BASE + 0x1D70)
64#define OMAP3630_ISP_CSI2C_REGS2_BASE (OMAP3430_ISP_BASE + 0x1DC0)
65
66#define OMAP3430_ISP_END (OMAP3430_ISP_BASE + 0x06F)
67#define OMAP3430_ISP_CBUFF_END (OMAP3430_ISP_CBUFF_BASE + 0x077)
68#define OMAP3430_ISP_CCP2_END (OMAP3430_ISP_CCP2_BASE + 0x1EF)
69#define OMAP3430_ISP_CCDC_END (OMAP3430_ISP_CCDC_BASE + 0x0A7)
70#define OMAP3430_ISP_HIST_END (OMAP3430_ISP_HIST_BASE + 0x047)
71#define OMAP3430_ISP_H3A_END (OMAP3430_ISP_H3A_BASE + 0x05F)
72#define OMAP3430_ISP_PREV_END (OMAP3430_ISP_PREV_BASE + 0x09F)
73#define OMAP3430_ISP_RESZ_END (OMAP3430_ISP_RESZ_BASE + 0x0AB)
74#define OMAP3430_ISP_SBL_END (OMAP3430_ISP_SBL_BASE + 0x0FB)
75#define OMAP3430_ISP_MMU_END (OMAP3430_ISP_MMU_BASE + 0x06F)
76#define OMAP3430_ISP_CSI2A_REGS1_END (OMAP3430_ISP_CSI2A_REGS1_BASE + 0x16F)
77#define OMAP3430_ISP_CSIPHY2_END (OMAP3430_ISP_CSIPHY2_BASE + 0x00B)
78#define OMAP3630_ISP_CSI2A_REGS2_END (OMAP3630_ISP_CSI2A_REGS2_BASE + 0x3F)
79#define OMAP3630_ISP_CSI2C_REGS1_END (OMAP3630_ISP_CSI2C_REGS1_BASE + 0x16F)
80#define OMAP3630_ISP_CSIPHY1_END (OMAP3630_ISP_CSIPHY1_BASE + 0x00B)
81#define OMAP3630_ISP_CSI2C_REGS2_END (OMAP3630_ISP_CSI2C_REGS2_BASE + 0x3F)
82
83#define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000)
84#define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000)
85#define OMAP34XX_UHH_CONFIG_BASE (L4_34XX_BASE + 0x64000)
86#define OMAP34XX_OHCI_BASE (L4_34XX_BASE + 0x64400)
87#define OMAP34XX_EHCI_BASE (L4_34XX_BASE + 0x64800)
88#define OMAP34XX_SR1_BASE 0x480C9000
89#define OMAP34XX_SR2_BASE 0x480CB000
90
91#define OMAP34XX_MAILBOX_BASE (L4_34XX_BASE + 0x94000)
92
93/* Security */
94#define OMAP34XX_SEC_BASE (L4_34XX_BASE + 0xA0000)
95#define OMAP34XX_SEC_SHA1MD5_BASE (OMAP34XX_SEC_BASE + 0x23000)
96#define OMAP34XX_SEC_AES_BASE (OMAP34XX_SEC_BASE + 0x25000)
97
98#endif /* __ASM_ARCH_OMAP3_H */
99
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index c29dee998a79..9fc865502f0c 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -16,26 +16,25 @@
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/memblock.h> 18#include <linux/memblock.h>
19#include <linux/of_irq.h>
20#include <linux/of_platform.h>
21#include <linux/export.h>
19 22
20#include <asm/hardware/gic.h> 23#include <asm/hardware/gic.h>
21#include <asm/hardware/cache-l2x0.h> 24#include <asm/hardware/cache-l2x0.h>
22#include <asm/mach/map.h> 25#include <asm/mach/map.h>
23#include <asm/memblock.h> 26#include <asm/memblock.h>
24#include <linux/of_irq.h>
25#include <linux/of_platform.h>
26 27
27#include <plat/irqs.h>
28#include <plat/sram.h> 28#include <plat/sram.h>
29#include <plat/omap-secure.h> 29#include <plat/omap-secure.h>
30#include <plat/mmc.h> 30#include <plat/mmc.h>
31 31
32#include <mach/hardware.h> 32#include "omap-wakeupgen.h"
33#include <mach/omap-wakeupgen.h>
34 33
34#include "soc.h"
35#include "common.h" 35#include "common.h"
36#include "hsmmc.h" 36#include "hsmmc.h"
37#include "omap4-sar-layout.h" 37#include "omap4-sar-layout.h"
38#include <linux/export.h>
39 38
40#ifdef CONFIG_CACHE_L2X0 39#ifdef CONFIG_CACHE_L2X0
41static void __iomem *l2cache_base; 40static void __iomem *l2cache_base;
diff --git a/arch/arm/mach-omap2/omap4-keypad.h b/arch/arm/mach-omap2/omap4-keypad.h
new file mode 100644
index 000000000000..20de0d5a7e77
--- /dev/null
+++ b/arch/arm/mach-omap2/omap4-keypad.h
@@ -0,0 +1,8 @@
1#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H
2#define ARCH_ARM_PLAT_OMAP4_KEYPAD_H
3
4struct omap_board_data;
5
6extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
7 struct omap_board_data *);
8#endif
diff --git a/arch/arm/mach-omap2/omap44xx.h b/arch/arm/mach-omap2/omap44xx.h
new file mode 100644
index 000000000000..43b927b2e2e8
--- /dev/null
+++ b/arch/arm/mach-omap2/omap44xx.h
@@ -0,0 +1,62 @@
1/*:
2 * Address mappings and base address for OMAP4 interconnects
3 * and peripherals.
4 *
5 * Copyright (C) 2009 Texas Instruments
6 *
7 * Author: 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 __ASM_ARCH_OMAP44XX_H
14#define __ASM_ARCH_OMAP44XX_H
15
16/*
17 * Please place only base defines here and put the rest in device
18 * specific headers.
19 */
20#define L4_44XX_BASE 0x4a000000
21#define L4_WK_44XX_BASE 0x4a300000
22#define L4_PER_44XX_BASE 0x48000000
23#define L4_EMU_44XX_BASE 0x54000000
24#define L3_44XX_BASE 0x44000000
25#define OMAP44XX_EMIF1_BASE 0x4c000000
26#define OMAP44XX_EMIF2_BASE 0x4d000000
27#define OMAP44XX_DMM_BASE 0x4e000000
28#define OMAP4430_32KSYNCT_BASE 0x4a304000
29#define OMAP4430_CM1_BASE 0x4a004000
30#define OMAP4430_CM_BASE OMAP4430_CM1_BASE
31#define OMAP4430_CM2_BASE 0x4a008000
32#define OMAP4430_PRM_BASE 0x4a306000
33#define OMAP4430_PRCM_MPU_BASE 0x48243000
34#define OMAP44XX_GPMC_BASE 0x50000000
35#define OMAP443X_SCM_BASE 0x4a002000
36#define OMAP443X_CTRL_BASE 0x4a100000
37#define OMAP44XX_IC_BASE 0x48200000
38#define OMAP44XX_IVA_INTC_BASE 0x40000000
39#define IRQ_SIR_IRQ 0x0040
40#define OMAP44XX_GIC_DIST_BASE 0x48241000
41#define OMAP44XX_GIC_CPU_BASE 0x48240100
42#define OMAP44XX_IRQ_GIC_START 32
43#define OMAP44XX_SCU_BASE 0x48240000
44#define OMAP44XX_LOCAL_TWD_BASE 0x48240600
45#define OMAP44XX_L2CACHE_BASE 0x48242000
46#define OMAP44XX_WKUPGEN_BASE 0x48281000
47#define OMAP44XX_MCPDM_BASE 0x40132000
48#define OMAP44XX_SAR_RAM_BASE 0x4a326000
49
50#define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000)
51#define OMAP44XX_HSUSB_OTG_BASE (L4_44XX_BASE + 0xAB000)
52
53#define OMAP4_MMU1_BASE 0x55082000
54#define OMAP4_MMU2_BASE 0x4A066000
55
56#define OMAP44XX_USBTLL_BASE (L4_44XX_BASE + 0x62000)
57#define OMAP44XX_UHH_CONFIG_BASE (L4_44XX_BASE + 0x64000)
58#define OMAP44XX_HSUSB_OHCI_BASE (L4_44XX_BASE + 0x64800)
59#define OMAP44XX_HSUSB_EHCI_BASE (L4_44XX_BASE + 0x64C00)
60
61#endif /* __ASM_ARCH_OMAP44XX_H */
62
diff --git a/arch/arm/mach-omap2/omap54xx.h b/arch/arm/mach-omap2/omap54xx.h
new file mode 100644
index 000000000000..a2582bb3cab3
--- /dev/null
+++ b/arch/arm/mach-omap2/omap54xx.h
@@ -0,0 +1,32 @@
1/*:
2 * Address mappings and base address for OMAP5 interconnects
3 * and peripherals.
4 *
5 * Copyright (C) 2012 Texas Instruments
6 * Santosh Shilimkar <santosh.shilimkar@ti.com>
7 * Sricharan <r.sricharan@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 __ASM_SOC_OMAP54XX_H
14#define __ASM_SOC_OMAP54XX_H
15
16/*
17 * Please place only base defines here and put the rest in device
18 * specific headers.
19 */
20#define L4_54XX_BASE 0x4a000000
21#define L4_WK_54XX_BASE 0x4ae00000
22#define L4_PER_54XX_BASE 0x48000000
23#define L3_54XX_BASE 0x44000000
24#define OMAP54XX_32KSYNCT_BASE 0x4ae04000
25#define OMAP54XX_CM_CORE_AON_BASE 0x4a004000
26#define OMAP54XX_CM_CORE_BASE 0x4a008000
27#define OMAP54XX_PRM_BASE 0x4ae06000
28#define OMAP54XX_PRCM_MPU_BASE 0x48243000
29#define OMAP54XX_SCM_BASE 0x4a002000
30#define OMAP54XX_CTRL_BASE 0x4a002800
31
32#endif /* __ASM_SOC_OMAP555554XX_H */
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 37afbd173c2c..3615e0d9ee3c 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -139,14 +139,14 @@
139#include <linux/slab.h> 139#include <linux/slab.h>
140#include <linux/bootmem.h> 140#include <linux/bootmem.h>
141 141
142#include "common.h"
143#include <plat/cpu.h>
144#include "clockdomain.h"
145#include "powerdomain.h"
146#include <plat/clock.h> 142#include <plat/clock.h>
147#include <plat/omap_hwmod.h> 143#include <plat/omap_hwmod.h>
148#include <plat/prcm.h> 144#include <plat/prcm.h>
149 145
146#include "soc.h"
147#include "common.h"
148#include "clockdomain.h"
149#include "powerdomain.h"
150#include "cm2xxx_3xxx.h" 150#include "cm2xxx_3xxx.h"
151#include "cminst44xx.h" 151#include "cminst44xx.h"
152#include "prm2xxx_3xxx.h" 152#include "prm2xxx_3xxx.h"
@@ -1438,8 +1438,8 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
1438 * Return the bit position of the reset line that match the 1438 * Return the bit position of the reset line that match the
1439 * input name. Return -ENOENT if not found. 1439 * input name. Return -ENOENT if not found.
1440 */ 1440 */
1441static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name, 1441static int _lookup_hardreset(struct omap_hwmod *oh, const char *name,
1442 struct omap_hwmod_rst_info *ohri) 1442 struct omap_hwmod_rst_info *ohri)
1443{ 1443{
1444 int i; 1444 int i;
1445 1445
@@ -1475,7 +1475,7 @@ static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name,
1475static int _assert_hardreset(struct omap_hwmod *oh, const char *name) 1475static int _assert_hardreset(struct omap_hwmod *oh, const char *name)
1476{ 1476{
1477 struct omap_hwmod_rst_info ohri; 1477 struct omap_hwmod_rst_info ohri;
1478 u8 ret = -EINVAL; 1478 int ret = -EINVAL;
1479 1479
1480 if (!oh) 1480 if (!oh)
1481 return -EINVAL; 1481 return -EINVAL;
@@ -1484,7 +1484,7 @@ static int _assert_hardreset(struct omap_hwmod *oh, const char *name)
1484 return -ENOSYS; 1484 return -ENOSYS;
1485 1485
1486 ret = _lookup_hardreset(oh, name, &ohri); 1486 ret = _lookup_hardreset(oh, name, &ohri);
1487 if (IS_ERR_VALUE(ret)) 1487 if (ret < 0)
1488 return ret; 1488 return ret;
1489 1489
1490 ret = soc_ops.assert_hardreset(oh, &ohri); 1490 ret = soc_ops.assert_hardreset(oh, &ohri);
@@ -1542,7 +1542,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
1542static int _read_hardreset(struct omap_hwmod *oh, const char *name) 1542static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1543{ 1543{
1544 struct omap_hwmod_rst_info ohri; 1544 struct omap_hwmod_rst_info ohri;
1545 u8 ret = -EINVAL; 1545 int ret = -EINVAL;
1546 1546
1547 if (!oh) 1547 if (!oh)
1548 return -EINVAL; 1548 return -EINVAL;
@@ -1551,7 +1551,7 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1551 return -ENOSYS; 1551 return -ENOSYS;
1552 1552
1553 ret = _lookup_hardreset(oh, name, &ohri); 1553 ret = _lookup_hardreset(oh, name, &ohri);
1554 if (IS_ERR_VALUE(ret)) 1554 if (ret < 0)
1555 return ret; 1555 return ret;
1556 1556
1557 return soc_ops.is_hardreset_asserted(oh, &ohri); 1557 return soc_ops.is_hardreset_asserted(oh, &ohri);
@@ -1641,8 +1641,8 @@ static int _ocp_softreset(struct omap_hwmod *oh)
1641 1641
1642 /* clocks must be on for this operation */ 1642 /* clocks must be on for this operation */
1643 if (oh->_state != _HWMOD_STATE_ENABLED) { 1643 if (oh->_state != _HWMOD_STATE_ENABLED) {
1644 pr_warning("omap_hwmod: %s: reset can only be entered from " 1644 pr_warn("omap_hwmod: %s: reset can only be entered from enabled state\n",
1645 "enabled state\n", oh->name); 1645 oh->name);
1646 return -EINVAL; 1646 return -EINVAL;
1647 } 1647 }
1648 1648
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 50cfab61b0e2..10575a1bc1f1 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -12,17 +12,15 @@
12 * XXX handle crossbar/shared link difference for L3? 12 * XXX handle crossbar/shared link difference for L3?
13 * XXX these should be marked initdata for multi-OMAP kernels 13 * XXX these should be marked initdata for multi-OMAP kernels
14 */ 14 */
15#include <linux/platform_data/spi-omap2-mcspi.h>
16
15#include <plat/omap_hwmod.h> 17#include <plat/omap_hwmod.h>
16#include <mach/irqs.h>
17#include <plat/cpu.h>
18#include <plat/dma.h> 18#include <plat/dma.h>
19#include <plat/serial.h> 19#include <plat/serial.h>
20#include <plat/i2c.h> 20#include <plat/i2c.h>
21#include <plat/gpio.h>
22#include <plat/mcspi.h>
23#include <plat/dmtimer.h> 21#include <plat/dmtimer.h>
24#include <plat/l3_2xxx.h> 22#include "l3_2xxx.h"
25#include <plat/l4_2xxx.h> 23#include "l4_2xxx.h"
26#include <plat/mmc.h> 24#include <plat/mmc.h>
27 25
28#include "omap_hwmod_common_data.h" 26#include "omap_hwmod_common_data.h"
@@ -162,9 +160,9 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {
162 160
163/* mailbox */ 161/* mailbox */
164static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { 162static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
165 { .name = "dsp", .irq = 26 }, 163 { .name = "dsp", .irq = 26 + OMAP_INTC_START, },
166 { .name = "iva", .irq = 34 }, 164 { .name = "iva", .irq = 34 + OMAP_INTC_START, },
167 { .irq = -1 } 165 { .irq = -1 },
168}; 166};
169 167
170static struct omap_hwmod omap2420_mailbox_hwmod = { 168static struct omap_hwmod omap2420_mailbox_hwmod = {
@@ -199,9 +197,9 @@ static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
199 197
200/* mcbsp1 */ 198/* mcbsp1 */
201static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { 199static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
202 { .name = "tx", .irq = 59 }, 200 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
203 { .name = "rx", .irq = 60 }, 201 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
204 { .irq = -1 } 202 { .irq = -1 },
205}; 203};
206 204
207static struct omap_hwmod omap2420_mcbsp1_hwmod = { 205static struct omap_hwmod omap2420_mcbsp1_hwmod = {
@@ -225,9 +223,9 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
225 223
226/* mcbsp2 */ 224/* mcbsp2 */
227static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { 225static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
228 { .name = "tx", .irq = 62 }, 226 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
229 { .name = "rx", .irq = 63 }, 227 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
230 { .irq = -1 } 228 { .irq = -1 },
231}; 229};
232 230
233static struct omap_hwmod omap2420_mcbsp2_hwmod = { 231static struct omap_hwmod omap2420_mcbsp2_hwmod = {
@@ -265,8 +263,8 @@ static struct omap_hwmod_class omap2420_msdi_hwmod_class = {
265 263
266/* msdi1 */ 264/* msdi1 */
267static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = { 265static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = {
268 { .irq = 83 }, 266 { .irq = 83 + OMAP_INTC_START, },
269 { .irq = -1 } 267 { .irq = -1 },
270}; 268};
271 269
272static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = { 270static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 58b5bc196d32..60de70feeae5 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -12,21 +12,19 @@
12 * XXX handle crossbar/shared link difference for L3? 12 * XXX handle crossbar/shared link difference for L3?
13 * XXX these should be marked initdata for multi-OMAP kernels 13 * XXX these should be marked initdata for multi-OMAP kernels
14 */ 14 */
15#include <linux/platform_data/asoc-ti-mcbsp.h>
16#include <linux/platform_data/spi-omap2-mcspi.h>
17
15#include <plat/omap_hwmod.h> 18#include <plat/omap_hwmod.h>
16#include <mach/irqs.h>
17#include <plat/cpu.h>
18#include <plat/dma.h> 19#include <plat/dma.h>
19#include <plat/serial.h> 20#include <plat/serial.h>
20#include <plat/i2c.h> 21#include <plat/i2c.h>
21#include <plat/gpio.h>
22#include <plat/mcbsp.h>
23#include <plat/mcspi.h>
24#include <plat/dmtimer.h> 22#include <plat/dmtimer.h>
25#include <plat/mmc.h> 23#include <plat/mmc.h>
26#include <plat/l3_2xxx.h> 24#include "l3_2xxx.h"
27 25
26#include "soc.h"
28#include "omap_hwmod_common_data.h" 27#include "omap_hwmod_common_data.h"
29
30#include "prm-regbits-24xx.h" 28#include "prm-regbits-24xx.h"
31#include "cm-regbits-24xx.h" 29#include "cm-regbits-24xx.h"
32#include "wd_timer.h" 30#include "wd_timer.h"
@@ -133,8 +131,8 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
133 131
134/* gpio5 */ 132/* gpio5 */
135static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { 133static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
136 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ 134 { .irq = 33 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK5 */
137 { .irq = -1 } 135 { .irq = -1 },
138}; 136};
139 137
140static struct omap_hwmod omap2430_gpio5_hwmod = { 138static struct omap_hwmod omap2430_gpio5_hwmod = {
@@ -173,8 +171,8 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
173 171
174/* mailbox */ 172/* mailbox */
175static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { 173static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
176 { .irq = 26 }, 174 { .irq = 26 + OMAP_INTC_START, },
177 { .irq = -1 } 175 { .irq = -1 },
178}; 176};
179 177
180static struct omap_hwmod omap2430_mailbox_hwmod = { 178static struct omap_hwmod omap2430_mailbox_hwmod = {
@@ -195,8 +193,8 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
195 193
196/* mcspi3 */ 194/* mcspi3 */
197static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { 195static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
198 { .irq = 91 }, 196 { .irq = 91 + OMAP_INTC_START, },
199 { .irq = -1 } 197 { .irq = -1 },
200}; 198};
201 199
202static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { 200static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
@@ -250,9 +248,9 @@ static struct omap_hwmod_class usbotg_class = {
250/* usb_otg_hs */ 248/* usb_otg_hs */
251static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = { 249static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
252 250
253 { .name = "mc", .irq = 92 }, 251 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
254 { .name = "dma", .irq = 93 }, 252 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
255 { .irq = -1 } 253 { .irq = -1 },
256}; 254};
257 255
258static struct omap_hwmod omap2430_usbhsotg_hwmod = { 256static struct omap_hwmod omap2430_usbhsotg_hwmod = {
@@ -303,11 +301,11 @@ static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
303 301
304/* mcbsp1 */ 302/* mcbsp1 */
305static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = { 303static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
306 { .name = "tx", .irq = 59 }, 304 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
307 { .name = "rx", .irq = 60 }, 305 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
308 { .name = "ovr", .irq = 61 }, 306 { .name = "ovr", .irq = 61 + OMAP_INTC_START, },
309 { .name = "common", .irq = 64 }, 307 { .name = "common", .irq = 64 + OMAP_INTC_START, },
310 { .irq = -1 } 308 { .irq = -1 },
311}; 309};
312 310
313static struct omap_hwmod omap2430_mcbsp1_hwmod = { 311static struct omap_hwmod omap2430_mcbsp1_hwmod = {
@@ -331,10 +329,10 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
331 329
332/* mcbsp2 */ 330/* mcbsp2 */
333static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = { 331static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
334 { .name = "tx", .irq = 62 }, 332 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
335 { .name = "rx", .irq = 63 }, 333 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
336 { .name = "common", .irq = 16 }, 334 { .name = "common", .irq = 16 + OMAP_INTC_START, },
337 { .irq = -1 } 335 { .irq = -1 },
338}; 336};
339 337
340static struct omap_hwmod omap2430_mcbsp2_hwmod = { 338static struct omap_hwmod omap2430_mcbsp2_hwmod = {
@@ -358,10 +356,10 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
358 356
359/* mcbsp3 */ 357/* mcbsp3 */
360static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = { 358static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
361 { .name = "tx", .irq = 89 }, 359 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
362 { .name = "rx", .irq = 90 }, 360 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
363 { .name = "common", .irq = 17 }, 361 { .name = "common", .irq = 17 + OMAP_INTC_START, },
364 { .irq = -1 } 362 { .irq = -1 },
365}; 363};
366 364
367static struct omap_hwmod omap2430_mcbsp3_hwmod = { 365static struct omap_hwmod omap2430_mcbsp3_hwmod = {
@@ -385,10 +383,10 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
385 383
386/* mcbsp4 */ 384/* mcbsp4 */
387static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = { 385static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
388 { .name = "tx", .irq = 54 }, 386 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
389 { .name = "rx", .irq = 55 }, 387 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
390 { .name = "common", .irq = 18 }, 388 { .name = "common", .irq = 18 + OMAP_INTC_START, },
391 { .irq = -1 } 389 { .irq = -1 },
392}; 390};
393 391
394static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { 392static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
@@ -418,10 +416,10 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
418 416
419/* mcbsp5 */ 417/* mcbsp5 */
420static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = { 418static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
421 { .name = "tx", .irq = 81 }, 419 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
422 { .name = "rx", .irq = 82 }, 420 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
423 { .name = "common", .irq = 19 }, 421 { .name = "common", .irq = 19 + OMAP_INTC_START, },
424 { .irq = -1 } 422 { .irq = -1 },
425}; 423};
426 424
427static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { 425static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
@@ -468,8 +466,8 @@ static struct omap_hwmod_class omap2430_mmc_class = {
468 466
469/* MMC/SD/SDIO1 */ 467/* MMC/SD/SDIO1 */
470static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { 468static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
471 { .irq = 83 }, 469 { .irq = 83 + OMAP_INTC_START, },
472 { .irq = -1 } 470 { .irq = -1 },
473}; 471};
474 472
475static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = { 473static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
@@ -509,8 +507,8 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
509 507
510/* MMC/SD/SDIO2 */ 508/* MMC/SD/SDIO2 */
511static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { 509static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
512 { .irq = 86 }, 510 { .irq = 86 + OMAP_INTC_START, },
513 { .irq = -1 } 511 { .irq = -1 },
514}; 512};
515 513
516static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = { 514static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index 102d76e9e9ea..8851bbb6bb24 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -13,9 +13,7 @@
13#include <plat/serial.h> 13#include <plat/serial.h>
14#include <plat/dma.h> 14#include <plat/dma.h>
15#include <plat/common.h> 15#include <plat/common.h>
16#include <plat/hdq1w.h> 16#include "hdq1w.h"
17
18#include <mach/irqs.h>
19 17
20#include "omap_hwmod_common_data.h" 18#include "omap_hwmod_common_data.h"
21 19
@@ -182,126 +180,126 @@ struct omap_hwmod_class iva_hwmod_class = {
182/* Common MPU IRQ line data */ 180/* Common MPU IRQ line data */
183 181
184struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = { 182struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = {
185 { .irq = 37, }, 183 { .irq = 37 + OMAP_INTC_START, },
186 { .irq = -1 } 184 { .irq = -1 },
187}; 185};
188 186
189struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = { 187struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = {
190 { .irq = 38, }, 188 { .irq = 38 + OMAP_INTC_START, },
191 { .irq = -1 } 189 { .irq = -1 },
192}; 190};
193 191
194struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = { 192struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = {
195 { .irq = 39, }, 193 { .irq = 39 + OMAP_INTC_START, },
196 { .irq = -1 } 194 { .irq = -1 },
197}; 195};
198 196
199struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = { 197struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = {
200 { .irq = 40, }, 198 { .irq = 40 + OMAP_INTC_START, },
201 { .irq = -1 } 199 { .irq = -1 },
202}; 200};
203 201
204struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = { 202struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = {
205 { .irq = 41, }, 203 { .irq = 41 + OMAP_INTC_START, },
206 { .irq = -1 } 204 { .irq = -1 },
207}; 205};
208 206
209struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = { 207struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = {
210 { .irq = 42, }, 208 { .irq = 42 + OMAP_INTC_START, },
211 { .irq = -1 } 209 { .irq = -1 },
212}; 210};
213 211
214struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = { 212struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = {
215 { .irq = 43, }, 213 { .irq = 43 + OMAP_INTC_START, },
216 { .irq = -1 } 214 { .irq = -1 },
217}; 215};
218 216
219struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = { 217struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = {
220 { .irq = 44, }, 218 { .irq = 44 + OMAP_INTC_START, },
221 { .irq = -1 } 219 { .irq = -1 },
222}; 220};
223 221
224struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = { 222struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = {
225 { .irq = 45, }, 223 { .irq = 45 + OMAP_INTC_START, },
226 { .irq = -1 } 224 { .irq = -1 },
227}; 225};
228 226
229struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = { 227struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = {
230 { .irq = 46, }, 228 { .irq = 46 + OMAP_INTC_START, },
231 { .irq = -1 } 229 { .irq = -1 },
232}; 230};
233 231
234struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = { 232struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = {
235 { .irq = 47, }, 233 { .irq = 47 + OMAP_INTC_START, },
236 { .irq = -1 } 234 { .irq = -1 },
237}; 235};
238 236
239struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = { 237struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = {
240 { .irq = INT_24XX_UART1_IRQ, }, 238 { .irq = 72 + OMAP_INTC_START, },
241 { .irq = -1 } 239 { .irq = -1 },
242}; 240};
243 241
244struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = { 242struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = {
245 { .irq = INT_24XX_UART2_IRQ, }, 243 { .irq = 73 + OMAP_INTC_START, },
246 { .irq = -1 } 244 { .irq = -1 },
247}; 245};
248 246
249struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = { 247struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = {
250 { .irq = INT_24XX_UART3_IRQ, }, 248 { .irq = 74 + OMAP_INTC_START, },
251 { .irq = -1 } 249 { .irq = -1 },
252}; 250};
253 251
254struct omap_hwmod_irq_info omap2_dispc_irqs[] = { 252struct omap_hwmod_irq_info omap2_dispc_irqs[] = {
255 { .irq = 25 }, 253 { .irq = 25 + OMAP_INTC_START, },
256 { .irq = -1 } 254 { .irq = -1 },
257}; 255};
258 256
259struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = { 257struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = {
260 { .irq = INT_24XX_I2C1_IRQ, }, 258 { .irq = 56 + OMAP_INTC_START, },
261 { .irq = -1 } 259 { .irq = -1 },
262}; 260};
263 261
264struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = { 262struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = {
265 { .irq = INT_24XX_I2C2_IRQ, }, 263 { .irq = 57 + OMAP_INTC_START, },
266 { .irq = -1 } 264 { .irq = -1 },
267}; 265};
268 266
269struct omap_hwmod_irq_info omap2_gpio1_irqs[] = { 267struct omap_hwmod_irq_info omap2_gpio1_irqs[] = {
270 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */ 268 { .irq = 29 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK1 */
271 { .irq = -1 } 269 { .irq = -1 },
272}; 270};
273 271
274struct omap_hwmod_irq_info omap2_gpio2_irqs[] = { 272struct omap_hwmod_irq_info omap2_gpio2_irqs[] = {
275 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */ 273 { .irq = 30 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK2 */
276 { .irq = -1 } 274 { .irq = -1 },
277}; 275};
278 276
279struct omap_hwmod_irq_info omap2_gpio3_irqs[] = { 277struct omap_hwmod_irq_info omap2_gpio3_irqs[] = {
280 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */ 278 { .irq = 31 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK3 */
281 { .irq = -1 } 279 { .irq = -1 },
282}; 280};
283 281
284struct omap_hwmod_irq_info omap2_gpio4_irqs[] = { 282struct omap_hwmod_irq_info omap2_gpio4_irqs[] = {
285 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */ 283 { .irq = 32 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK4 */
286 { .irq = -1 } 284 { .irq = -1 },
287}; 285};
288 286
289struct omap_hwmod_irq_info omap2_dma_system_irqs[] = { 287struct omap_hwmod_irq_info omap2_dma_system_irqs[] = {
290 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */ 288 { .name = "0", .irq = 12 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ0 */
291 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */ 289 { .name = "1", .irq = 13 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ1 */
292 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */ 290 { .name = "2", .irq = 14 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ2 */
293 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */ 291 { .name = "3", .irq = 15 + OMAP_INTC_START, }, /* INT_24XX_SDMA_IRQ3 */
294 { .irq = -1 } 292 { .irq = -1 },
295}; 293};
296 294
297struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = { 295struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = {
298 { .irq = 65 }, 296 { .irq = 65 + OMAP_INTC_START, },
299 { .irq = -1 } 297 { .irq = -1 },
300}; 298};
301 299
302struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = { 300struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
303 { .irq = 66 }, 301 { .irq = 66 + OMAP_INTC_START, },
304 { .irq = -1 } 302 { .irq = -1 },
305}; 303};
306 304
307struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = { 305struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = {
@@ -320,7 +318,7 @@ struct omap_hwmod_class omap2_hdq1w_class = {
320}; 318};
321 319
322struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = { 320struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = {
323 { .irq = 58, }, 321 { .irq = 58 + OMAP_INTC_START, },
324 { .irq = -1 } 322 { .irq = -1 },
325}; 323};
326 324
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
index 5178e40e84f9..f853a0b1d5ca 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
@@ -15,8 +15,8 @@
15 15
16#include <plat/omap_hwmod.h> 16#include <plat/omap_hwmod.h>
17#include <plat/serial.h> 17#include <plat/serial.h>
18#include <plat/l3_2xxx.h> 18#include "l3_2xxx.h"
19#include <plat/l4_2xxx.h> 19#include "l4_2xxx.h"
20 20
21#include "omap_hwmod_common_data.h" 21#include "omap_hwmod_common_data.h"
22 22
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index afad69c6ba6e..feeb401cf87e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -10,12 +10,10 @@
10 */ 10 */
11#include <plat/omap_hwmod.h> 11#include <plat/omap_hwmod.h>
12#include <plat/serial.h> 12#include <plat/serial.h>
13#include <plat/gpio.h> 13#include <linux/platform_data/gpio-omap.h>
14#include <plat/dma.h> 14#include <plat/dma.h>
15#include <plat/dmtimer.h> 15#include <plat/dmtimer.h>
16#include <plat/mcspi.h> 16#include <linux/platform_data/spi-omap2-mcspi.h>
17
18#include <mach/irqs.h>
19 17
20#include "omap_hwmod_common_data.h" 18#include "omap_hwmod_common_data.h"
21#include "cm-regbits-24xx.h" 19#include "cm-regbits-24xx.h"
@@ -23,8 +21,8 @@
23#include "wd_timer.h" 21#include "wd_timer.h"
24 22
25struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { 23struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
26 { .irq = 48, }, 24 { .irq = 48 + OMAP_INTC_START, },
27 { .irq = -1 } 25 { .irq = -1 },
28}; 26};
29 27
30struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = { 28struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index ce7e6068768f..94b38af17055 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -15,26 +15,26 @@
15 * XXX these should be marked initdata for multi-OMAP kernels 15 * XXX these should be marked initdata for multi-OMAP kernels
16 */ 16 */
17#include <linux/power/smartreflex.h> 17#include <linux/power/smartreflex.h>
18#include <linux/platform_data/gpio-omap.h>
18 19
19#include <plat/omap_hwmod.h> 20#include <plat/omap_hwmod.h>
20#include <mach/irqs.h>
21#include <plat/cpu.h>
22#include <plat/dma.h> 21#include <plat/dma.h>
23#include <plat/serial.h> 22#include <plat/serial.h>
24#include <plat/l3_3xxx.h> 23#include "l3_3xxx.h"
25#include <plat/l4_3xxx.h> 24#include "l4_3xxx.h"
26#include <plat/i2c.h> 25#include <plat/i2c.h>
27#include <plat/gpio.h>
28#include <plat/mmc.h> 26#include <plat/mmc.h>
29#include <plat/mcbsp.h> 27#include <linux/platform_data/asoc-ti-mcbsp.h>
30#include <plat/mcspi.h> 28#include <linux/platform_data/spi-omap2-mcspi.h>
31#include <plat/dmtimer.h> 29#include <plat/dmtimer.h>
32 30
31#include "am35xx.h"
32
33#include "soc.h"
33#include "omap_hwmod_common_data.h" 34#include "omap_hwmod_common_data.h"
34#include "prm-regbits-34xx.h" 35#include "prm-regbits-34xx.h"
35#include "cm-regbits-34xx.h" 36#include "cm-regbits-34xx.h"
36#include "wd_timer.h" 37#include "wd_timer.h"
37#include <mach/am35xx.h>
38 38
39/* 39/*
40 * OMAP3xxx hardware module integration data 40 * OMAP3xxx hardware module integration data
@@ -51,9 +51,9 @@
51 51
52/* L3 */ 52/* L3 */
53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { 53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
54 { .irq = INT_34XX_L3_DBG_IRQ }, 54 { .irq = 9 + OMAP_INTC_START, },
55 { .irq = INT_34XX_L3_APP_IRQ }, 55 { .irq = 10 + OMAP_INTC_START, },
56 { .irq = -1 } 56 { .irq = -1 },
57}; 57};
58 58
59static struct omap_hwmod omap3xxx_l3_main_hwmod = { 59static struct omap_hwmod omap3xxx_l3_main_hwmod = {
@@ -364,8 +364,8 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
364 364
365/* timer12 */ 365/* timer12 */
366static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { 366static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
367 { .irq = 95, }, 367 { .irq = 95 + OMAP_INTC_START, },
368 { .irq = -1 } 368 { .irq = -1 },
369}; 369};
370 370
371static struct omap_hwmod omap3xxx_timer12_hwmod = { 371static struct omap_hwmod omap3xxx_timer12_hwmod = {
@@ -499,8 +499,8 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
499 499
500/* UART4 */ 500/* UART4 */
501static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { 501static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
502 { .irq = INT_36XX_UART4_IRQ, }, 502 { .irq = 80 + OMAP_INTC_START, },
503 { .irq = -1 } 503 { .irq = -1 },
504}; 504};
505 505
506static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { 506static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
@@ -527,8 +527,8 @@ static struct omap_hwmod omap36xx_uart4_hwmod = {
527}; 527};
528 528
529static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = { 529static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
530 { .irq = INT_35XX_UART4_IRQ, }, 530 { .irq = 84 + OMAP_INTC_START, },
531 { .irq = -1 } 531 { .irq = -1 },
532}; 532};
533 533
534static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { 534static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
@@ -683,8 +683,8 @@ static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
683}; 683};
684 684
685static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { 685static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
686 { .irq = 25 }, 686 { .irq = 25 + OMAP_INTC_START, },
687 { .irq = -1 } 687 { .irq = -1 },
688}; 688};
689 689
690/* dss_dsi1 */ 690/* dss_dsi1 */
@@ -813,8 +813,8 @@ static struct omap_i2c_dev_attr i2c3_dev_attr = {
813}; 813};
814 814
815static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { 815static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
816 { .irq = INT_34XX_I2C3_IRQ, }, 816 { .irq = 61 + OMAP_INTC_START, },
817 { .irq = -1 } 817 { .irq = -1 },
818}; 818};
819 819
820static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { 820static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
@@ -972,8 +972,8 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = {
972 972
973/* gpio5 */ 973/* gpio5 */
974static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = { 974static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
975 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */ 975 { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
976 { .irq = -1 } 976 { .irq = -1 },
977}; 977};
978 978
979static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { 979static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
@@ -1002,8 +1002,8 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
1002 1002
1003/* gpio6 */ 1003/* gpio6 */
1004static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = { 1004static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
1005 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */ 1005 { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
1006 { .irq = -1 } 1006 { .irq = -1 },
1007}; 1007};
1008 1008
1009static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { 1009static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
@@ -1107,10 +1107,10 @@ static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1107 1107
1108/* mcbsp1 */ 1108/* mcbsp1 */
1109static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { 1109static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
1110 { .name = "common", .irq = 16 }, 1110 { .name = "common", .irq = 16 + OMAP_INTC_START, },
1111 { .name = "tx", .irq = 59 }, 1111 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
1112 { .name = "rx", .irq = 60 }, 1112 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
1113 { .irq = -1 } 1113 { .irq = -1 },
1114}; 1114};
1115 1115
1116static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { 1116static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
@@ -1134,10 +1134,10 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1134 1134
1135/* mcbsp2 */ 1135/* mcbsp2 */
1136static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { 1136static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
1137 { .name = "common", .irq = 17 }, 1137 { .name = "common", .irq = 17 + OMAP_INTC_START, },
1138 { .name = "tx", .irq = 62 }, 1138 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
1139 { .name = "rx", .irq = 63 }, 1139 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
1140 { .irq = -1 } 1140 { .irq = -1 },
1141}; 1141};
1142 1142
1143static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { 1143static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
@@ -1166,10 +1166,10 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1166 1166
1167/* mcbsp3 */ 1167/* mcbsp3 */
1168static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { 1168static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
1169 { .name = "common", .irq = 22 }, 1169 { .name = "common", .irq = 22 + OMAP_INTC_START, },
1170 { .name = "tx", .irq = 89 }, 1170 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
1171 { .name = "rx", .irq = 90 }, 1171 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
1172 { .irq = -1 } 1172 { .irq = -1 },
1173}; 1173};
1174 1174
1175static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { 1175static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
@@ -1198,10 +1198,10 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1198 1198
1199/* mcbsp4 */ 1199/* mcbsp4 */
1200static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { 1200static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
1201 { .name = "common", .irq = 23 }, 1201 { .name = "common", .irq = 23 + OMAP_INTC_START, },
1202 { .name = "tx", .irq = 54 }, 1202 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
1203 { .name = "rx", .irq = 55 }, 1203 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
1204 { .irq = -1 } 1204 { .irq = -1 },
1205}; 1205};
1206 1206
1207static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { 1207static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
@@ -1231,10 +1231,10 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1231 1231
1232/* mcbsp5 */ 1232/* mcbsp5 */
1233static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { 1233static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
1234 { .name = "common", .irq = 27 }, 1234 { .name = "common", .irq = 27 + OMAP_INTC_START, },
1235 { .name = "tx", .irq = 81 }, 1235 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
1236 { .name = "rx", .irq = 82 }, 1236 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
1237 { .irq = -1 } 1237 { .irq = -1 },
1238}; 1238};
1239 1239
1240static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { 1240static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
@@ -1276,8 +1276,8 @@ static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1276 1276
1277/* mcbsp2_sidetone */ 1277/* mcbsp2_sidetone */
1278static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { 1278static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
1279 { .name = "irq", .irq = 4 }, 1279 { .name = "irq", .irq = 4 + OMAP_INTC_START, },
1280 { .irq = -1 } 1280 { .irq = -1 },
1281}; 1281};
1282 1282
1283static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { 1283static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
@@ -1298,8 +1298,8 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1298 1298
1299/* mcbsp3_sidetone */ 1299/* mcbsp3_sidetone */
1300static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { 1300static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
1301 { .name = "irq", .irq = 5 }, 1301 { .name = "irq", .irq = 5 + OMAP_INTC_START, },
1302 { .irq = -1 } 1302 { .irq = -1 },
1303}; 1303};
1304 1304
1305static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { 1305static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
@@ -1361,8 +1361,8 @@ static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1361}; 1361};
1362 1362
1363static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = { 1363static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
1364 { .irq = 18 }, 1364 { .irq = 18 + OMAP_INTC_START, },
1365 { .irq = -1 } 1365 { .irq = -1 },
1366}; 1366};
1367 1367
1368static struct omap_hwmod omap34xx_sr1_hwmod = { 1368static struct omap_hwmod omap34xx_sr1_hwmod = {
@@ -1406,8 +1406,8 @@ static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1406}; 1406};
1407 1407
1408static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = { 1408static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
1409 { .irq = 19 }, 1409 { .irq = 19 + OMAP_INTC_START, },
1410 { .irq = -1 } 1410 { .irq = -1 },
1411}; 1411};
1412 1412
1413static struct omap_hwmod omap34xx_sr2_hwmod = { 1413static struct omap_hwmod omap34xx_sr2_hwmod = {
@@ -1467,8 +1467,8 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1467}; 1467};
1468 1468
1469static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { 1469static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
1470 { .irq = 26 }, 1470 { .irq = 26 + OMAP_INTC_START, },
1471 { .irq = -1 } 1471 { .irq = -1 },
1472}; 1472};
1473 1473
1474static struct omap_hwmod omap3xxx_mailbox_hwmod = { 1474static struct omap_hwmod omap3xxx_mailbox_hwmod = {
@@ -1558,8 +1558,8 @@ static struct omap_hwmod omap34xx_mcspi2 = {
1558 1558
1559/* mcspi3 */ 1559/* mcspi3 */
1560static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { 1560static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
1561 { .name = "irq", .irq = 91 }, /* 91 */ 1561 { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
1562 { .irq = -1 } 1562 { .irq = -1 },
1563}; 1563};
1564 1564
1565static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { 1565static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
@@ -1594,8 +1594,8 @@ static struct omap_hwmod omap34xx_mcspi3 = {
1594 1594
1595/* mcspi4 */ 1595/* mcspi4 */
1596static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { 1596static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
1597 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ 1597 { .name = "irq", .irq = 48 + OMAP_INTC_START, },
1598 { .irq = -1 } 1598 { .irq = -1 },
1599}; 1599};
1600 1600
1601static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { 1601static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
@@ -1647,9 +1647,9 @@ static struct omap_hwmod_class usbotg_class = {
1647/* usb_otg_hs */ 1647/* usb_otg_hs */
1648static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { 1648static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1649 1649
1650 { .name = "mc", .irq = 92 }, 1650 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
1651 { .name = "dma", .irq = 93 }, 1651 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
1652 { .irq = -1 } 1652 { .irq = -1 },
1653}; 1653};
1654 1654
1655static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { 1655static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
@@ -1679,8 +1679,8 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1679 1679
1680/* usb_otg_hs */ 1680/* usb_otg_hs */
1681static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { 1681static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
1682 { .name = "mc", .irq = 71 }, 1682 { .name = "mc", .irq = 71 + OMAP_INTC_START, },
1683 { .irq = -1 } 1683 { .irq = -1 },
1684}; 1684};
1685 1685
1686static struct omap_hwmod_class am35xx_usbotg_class = { 1686static struct omap_hwmod_class am35xx_usbotg_class = {
@@ -1715,8 +1715,8 @@ static struct omap_hwmod_class omap34xx_mmc_class = {
1715/* MMC/SD/SDIO1 */ 1715/* MMC/SD/SDIO1 */
1716 1716
1717static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { 1717static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
1718 { .irq = 83, }, 1718 { .irq = 83 + OMAP_INTC_START, },
1719 { .irq = -1 } 1719 { .irq = -1 },
1720}; 1720};
1721 1721
1722static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { 1722static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
@@ -1782,8 +1782,8 @@ static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1782/* MMC/SD/SDIO2 */ 1782/* MMC/SD/SDIO2 */
1783 1783
1784static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { 1784static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
1785 { .irq = INT_24XX_MMC2_IRQ, }, 1785 { .irq = 86 + OMAP_INTC_START, },
1786 { .irq = -1 } 1786 { .irq = -1 },
1787}; 1787};
1788 1788
1789static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { 1789static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
@@ -1843,8 +1843,8 @@ static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1843/* MMC/SD/SDIO3 */ 1843/* MMC/SD/SDIO3 */
1844 1844
1845static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { 1845static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
1846 { .irq = 94, }, 1846 { .irq = 94 + OMAP_INTC_START, },
1847 { .irq = -1 } 1847 { .irq = -1 },
1848}; 1848};
1849 1849
1850static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { 1850static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
@@ -1902,9 +1902,9 @@ static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1902}; 1902};
1903 1903
1904static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = { 1904static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
1905 { .name = "ohci-irq", .irq = 76 }, 1905 { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
1906 { .name = "ehci-irq", .irq = 77 }, 1906 { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
1907 { .irq = -1 } 1907 { .irq = -1 },
1908}; 1908};
1909 1909
1910static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { 1910static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
@@ -1996,8 +1996,8 @@ static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1996}; 1996};
1997 1997
1998static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = { 1998static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
1999 { .name = "tll-irq", .irq = 78 }, 1999 { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
2000 { .irq = -1 } 2000 { .irq = -1 },
2001}; 2001};
2002 2002
2003static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { 2003static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
@@ -3223,11 +3223,11 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
3223}; 3223};
3224 3224
3225static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = { 3225static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
3226 { .name = "rxthresh", .irq = INT_35XX_EMAC_C0_RXTHRESH_IRQ }, 3226 { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
3227 { .name = "rx_pulse", .irq = INT_35XX_EMAC_C0_RX_PULSE_IRQ }, 3227 { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
3228 { .name = "tx_pulse", .irq = INT_35XX_EMAC_C0_TX_PULSE_IRQ }, 3228 { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
3229 { .name = "misc_pulse", .irq = INT_35XX_EMAC_C0_MISC_PULSE_IRQ }, 3229 { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
3230 { .irq = -1 } 3230 { .irq = -1 },
3231}; 3231};
3232 3232
3233static struct omap_hwmod_class am35xx_emac_class = { 3233static struct omap_hwmod_class am35xx_emac_class = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 64b564f13d5b..c7dcb606cd0c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -19,15 +19,14 @@
19 */ 19 */
20 20
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/platform_data/gpio-omap.h>
22#include <linux/power/smartreflex.h> 23#include <linux/power/smartreflex.h>
23 24
24#include <plat/omap_hwmod.h> 25#include <plat/omap_hwmod.h>
25#include <plat/cpu.h>
26#include <plat/i2c.h> 26#include <plat/i2c.h>
27#include <plat/gpio.h>
28#include <plat/dma.h> 27#include <plat/dma.h>
29#include <plat/mcspi.h> 28#include <linux/platform_data/spi-omap2-mcspi.h>
30#include <plat/mcbsp.h> 29#include <linux/platform_data/asoc-ti-mcbsp.h>
31#include <plat/mmc.h> 30#include <plat/mmc.h>
32#include <plat/dmtimer.h> 31#include <plat/dmtimer.h>
33#include <plat/common.h> 32#include <plat/common.h>
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index e7e8eeae95e5..dddb677fed68 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -16,6 +16,7 @@
16 16
17#include <plat/omap_hwmod.h> 17#include <plat/omap_hwmod.h>
18 18
19#include "common.h"
19#include "display.h" 20#include "display.h"
20 21
21/* Common address space across OMAP2xxx */ 22/* Common address space across OMAP2xxx */
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c
index d15225ff5c49..f447e02102bb 100644
--- a/arch/arm/mach-omap2/omap_l3_noc.c
+++ b/arch/arm/mach-omap2/omap_l3_noc.c
@@ -28,6 +28,7 @@
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/slab.h> 29#include <linux/slab.h>
30 30
31#include "soc.h"
31#include "omap_l3_noc.h" 32#include "omap_l3_noc.h"
32 33
33/* 34/*
@@ -190,7 +191,7 @@ static int __devinit omap4_l3_probe(struct platform_device *pdev)
190 IRQF_DISABLED, "l3-dbg-irq", l3); 191 IRQF_DISABLED, "l3-dbg-irq", l3);
191 if (ret) { 192 if (ret) {
192 pr_crit("L3: request_irq failed to register for 0x%x\n", 193 pr_crit("L3: request_irq failed to register for 0x%x\n",
193 OMAP44XX_IRQ_L3_DBG); 194 9 + OMAP44XX_IRQ_GIC_START);
194 goto err3; 195 goto err3;
195 } 196 }
196 197
@@ -200,7 +201,7 @@ static int __devinit omap4_l3_probe(struct platform_device *pdev)
200 IRQF_DISABLED, "l3-app-irq", l3); 201 IRQF_DISABLED, "l3-app-irq", l3);
201 if (ret) { 202 if (ret) {
202 pr_crit("L3: request_irq failed to register for 0x%x\n", 203 pr_crit("L3: request_irq failed to register for 0x%x\n",
203 OMAP44XX_IRQ_L3_APP); 204 10 + OMAP44XX_IRQ_GIC_START);
204 goto err4; 205 goto err4;
205 } 206 }
206 207
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index 874aecc0faca..d992db8ff0b0 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -29,6 +29,8 @@
29#include <linux/usb.h> 29#include <linux/usb.h>
30 30
31#include <plat/usb.h> 31#include <plat/usb.h>
32
33#include "soc.h"
32#include "control.h" 34#include "control.h"
33 35
34void am35x_musb_reset(void) 36void am35x_musb_reset(void)
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c
index d8f6dbf45d16..45ad7f74f356 100644
--- a/arch/arm/mach-omap2/opp.c
+++ b/arch/arm/mach-omap2/opp.c
@@ -64,25 +64,22 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
64 } 64 }
65 oh = omap_hwmod_lookup(opp_def->hwmod_name); 65 oh = omap_hwmod_lookup(opp_def->hwmod_name);
66 if (!oh || !oh->od) { 66 if (!oh || !oh->od) {
67 pr_debug("%s: no hwmod or odev for %s, [%d] " 67 pr_debug("%s: no hwmod or odev for %s, [%d] cannot add OPPs.\n",
68 "cannot add OPPs.\n", __func__, 68 __func__, opp_def->hwmod_name, i);
69 opp_def->hwmod_name, i);
70 continue; 69 continue;
71 } 70 }
72 dev = &oh->od->pdev->dev; 71 dev = &oh->od->pdev->dev;
73 72
74 r = opp_add(dev, opp_def->freq, opp_def->u_volt); 73 r = opp_add(dev, opp_def->freq, opp_def->u_volt);
75 if (r) { 74 if (r) {
76 dev_err(dev, "%s: add OPP %ld failed for %s [%d] " 75 dev_err(dev, "%s: add OPP %ld failed for %s [%d] result=%d\n",
77 "result=%d\n", 76 __func__, opp_def->freq,
78 __func__, opp_def->freq, 77 opp_def->hwmod_name, i, r);
79 opp_def->hwmod_name, i, r);
80 } else { 78 } else {
81 if (!opp_def->default_available) 79 if (!opp_def->default_available)
82 r = opp_disable(dev, opp_def->freq); 80 r = opp_disable(dev, opp_def->freq);
83 if (r) 81 if (r)
84 dev_err(dev, "%s: disable %ld failed for %s " 82 dev_err(dev, "%s: disable %ld failed for %s [%d] result=%d\n",
85 "[%d] result=%d\n",
86 __func__, opp_def->freq, 83 __func__, opp_def->freq,
87 opp_def->hwmod_name, i, r); 84 opp_def->hwmod_name, i, r);
88 } 85 }
diff --git a/arch/arm/mach-omap2/opp2420_data.c b/arch/arm/mach-omap2/opp2420_data.c
index 5037e76e4e23..a9e8cf21705d 100644
--- a/arch/arm/mach-omap2/opp2420_data.c
+++ b/arch/arm/mach-omap2/opp2420_data.c
@@ -28,7 +28,7 @@
28 * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/ 28 * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/
29 */ 29 */
30 30
31#include <plat/hardware.h> 31#include <linux/kernel.h>
32 32
33#include "opp2xxx.h" 33#include "opp2xxx.h"
34#include "sdrc.h" 34#include "sdrc.h"
diff --git a/arch/arm/mach-omap2/opp2430_data.c b/arch/arm/mach-omap2/opp2430_data.c
index 750805c528d8..0e75ec3e114b 100644
--- a/arch/arm/mach-omap2/opp2430_data.c
+++ b/arch/arm/mach-omap2/opp2430_data.c
@@ -26,7 +26,7 @@
26 * This is technically part of the OMAP2xxx clock code. 26 * This is technically part of the OMAP2xxx clock code.
27 */ 27 */
28 28
29#include <plat/hardware.h> 29#include <linux/kernel.h>
30 30
31#include "opp2xxx.h" 31#include "opp2xxx.h"
32#include "sdrc.h" 32#include "sdrc.h"
diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c
index d95f3f945d4a..75cef5f67a8a 100644
--- a/arch/arm/mach-omap2/opp3xxx_data.c
+++ b/arch/arm/mach-omap2/opp3xxx_data.c
@@ -19,8 +19,6 @@
19 */ 19 */
20#include <linux/module.h> 20#include <linux/module.h>
21 21
22#include <plat/cpu.h>
23
24#include "control.h" 22#include "control.h"
25#include "omap_opp_data.h" 23#include "omap_opp_data.h"
26#include "pm.h" 24#include "pm.h"
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c
index c95415da23c2..a9fd6d5fe79e 100644
--- a/arch/arm/mach-omap2/opp4xxx_data.c
+++ b/arch/arm/mach-omap2/opp4xxx_data.c
@@ -20,8 +20,7 @@
20 */ 20 */
21#include <linux/module.h> 21#include <linux/module.h>
22 22
23#include <plat/cpu.h> 23#include "soc.h"
24
25#include "control.h" 24#include "control.h"
26#include "omap_opp_data.h" 25#include "omap_opp_data.h"
27#include "pm.h" 26#include "pm.h"
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 814bcd901596..3e1345fc0713 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -28,7 +28,6 @@
28#include <linux/slab.h> 28#include <linux/slab.h>
29 29
30#include <plat/clock.h> 30#include <plat/clock.h>
31#include <plat/board.h>
32#include "powerdomain.h" 31#include "powerdomain.h"
33#include "clockdomain.h" 32#include "clockdomain.h"
34#include <plat/dmtimer.h> 33#include <plat/dmtimer.h>
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 9cb5cede0f50..939bd6f70b51 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -203,8 +203,8 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
203 bootup_volt = opp_get_voltage(opp); 203 bootup_volt = opp_get_voltage(opp);
204 rcu_read_unlock(); 204 rcu_read_unlock();
205 if (!bootup_volt) { 205 if (!bootup_volt) {
206 pr_err("%s: unable to find voltage corresponding " 206 pr_err("%s: unable to find voltage corresponding to the bootup OPP for vdd_%s\n",
207 "to the bootup OPP for vdd_%s\n", __func__, vdd_name); 207 __func__, vdd_name);
208 goto exit; 208 goto exit;
209 } 209 }
210 210
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 2edeffc923a6..8af6cd6ac331 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -29,6 +29,7 @@
29#include <linux/irq.h> 29#include <linux/irq.h>
30#include <linux/time.h> 30#include <linux/time.h>
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/platform_data/gpio-omap.h>
32 33
33#include <asm/mach/time.h> 34#include <asm/mach/time.h>
34#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
@@ -38,9 +39,6 @@
38#include <plat/clock.h> 39#include <plat/clock.h>
39#include <plat/sram.h> 40#include <plat/sram.h>
40#include <plat/dma.h> 41#include <plat/dma.h>
41#include <plat/board.h>
42
43#include <mach/irqs.h>
44 42
45#include "common.h" 43#include "common.h"
46#include "prm2xxx_3xxx.h" 44#include "prm2xxx_3xxx.h"
@@ -352,16 +350,6 @@ int __init omap2_pm_init(void)
352 350
353 prcm_setup_regs(); 351 prcm_setup_regs();
354 352
355 /* Hack to prevent MPU retention when STI console is enabled. */
356 {
357 const struct omap_sti_console_config *sti;
358
359 sti = omap_get_config(OMAP_TAG_STI_CONSOLE,
360 struct omap_sti_console_config);
361 if (sti != NULL && sti->enable)
362 sti_console_enabled = 1;
363 }
364
365 /* 353 /*
366 * We copy the assembler sleep/wakeup routines to SRAM. 354 * We copy the assembler sleep/wakeup routines to SRAM.
367 * These routines need to be in SRAM as that's the only 355 * These routines need to be in SRAM as that's the only
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 05bd8f02723f..ba670db1fd37 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -28,6 +28,8 @@
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/platform_data/gpio-omap.h>
32
31#include <trace/events/power.h> 33#include <trace/events/power.h>
32 34
33#include <asm/suspend.h> 35#include <asm/suspend.h>
@@ -389,9 +391,8 @@ restore:
389 list_for_each_entry(pwrst, &pwrst_list, node) { 391 list_for_each_entry(pwrst, &pwrst_list, node) {
390 state = pwrdm_read_prev_pwrst(pwrst->pwrdm); 392 state = pwrdm_read_prev_pwrst(pwrst->pwrdm);
391 if (state > pwrst->next_state) { 393 if (state > pwrst->next_state) {
392 pr_info("Powerdomain (%s) didn't enter " 394 pr_info("Powerdomain (%s) didn't enter target state %d\n",
393 "target state %d\n", 395 pwrst->pwrdm->name, pwrst->next_state);
394 pwrst->pwrdm->name, pwrst->next_state);
395 ret = -1; 396 ret = -1;
396 } 397 }
397 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); 398 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
@@ -731,8 +732,7 @@ int __init omap3_pm_init(void)
731 omap3_secure_ram_storage = 732 omap3_secure_ram_storage =
732 kmalloc(0x803F, GFP_KERNEL); 733 kmalloc(0x803F, GFP_KERNEL);
733 if (!omap3_secure_ram_storage) 734 if (!omap3_secure_ram_storage)
734 pr_err("Memory allocation failed when " 735 pr_err("Memory allocation failed when allocating for secure sram context\n");
735 "allocating for secure sram context\n");
736 736
737 local_irq_disable(); 737 local_irq_disable();
738 local_fiq_disable(); 738 local_fiq_disable();
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index ea24174f5707..04922d149068 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -69,9 +69,8 @@ static int omap4_pm_suspend(void)
69 list_for_each_entry(pwrst, &pwrst_list, node) { 69 list_for_each_entry(pwrst, &pwrst_list, node) {
70 state = pwrdm_read_prev_pwrst(pwrst->pwrdm); 70 state = pwrdm_read_prev_pwrst(pwrst->pwrdm);
71 if (state > pwrst->next_state) { 71 if (state > pwrst->next_state) {
72 pr_info("Powerdomain (%s) didn't enter " 72 pr_info("Powerdomain (%s) didn't enter target state %d\n",
73 "target state %d\n", 73 pwrst->pwrdm->name, pwrst->next_state);
74 pwrst->pwrdm->name, pwrst->next_state);
75 ret = -1; 74 ret = -1;
76 } 75 }
77 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); 76 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
@@ -189,8 +188,7 @@ int __init omap4_pm_init(void)
189 ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm); 188 ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
190 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm); 189 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
191 if (ret) { 190 if (ret) {
192 pr_err("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 " 191 pr_err("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 wakeup dependency\n");
193 "wakeup dependency\n");
194 goto err2; 192 goto err2;
195 } 193 }
196 194
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 69b36e185e9b..1678a3284233 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -28,11 +28,13 @@
28#include "prm44xx.h" 28#include "prm44xx.h"
29 29
30#include <asm/cpu.h> 30#include <asm/cpu.h>
31#include <plat/cpu.h> 31
32#include <plat/prcm.h>
33
32#include "powerdomain.h" 34#include "powerdomain.h"
33#include "clockdomain.h" 35#include "clockdomain.h"
34#include <plat/prcm.h>
35 36
37#include "soc.h"
36#include "pm.h" 38#include "pm.h"
37 39
38#define PWRDM_TRACE_STATES_FLAG (1<<31) 40#define PWRDM_TRACE_STATES_FLAG (1<<31)
@@ -339,8 +341,8 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)
339 if (!pwrdm || !clkdm) 341 if (!pwrdm || !clkdm)
340 return -EINVAL; 342 return -EINVAL;
341 343
342 pr_debug("powerdomain: associating clockdomain %s with powerdomain " 344 pr_debug("powerdomain: %s: associating clockdomain %s\n",
343 "%s\n", clkdm->name, pwrdm->name); 345 pwrdm->name, clkdm->name);
344 346
345 for (i = 0; i < PWRDM_MAX_CLKDMS; i++) { 347 for (i = 0; i < PWRDM_MAX_CLKDMS; i++) {
346 if (!pwrdm->pwrdm_clkdms[i]) 348 if (!pwrdm->pwrdm_clkdms[i])
@@ -354,8 +356,8 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)
354 } 356 }
355 357
356 if (i == PWRDM_MAX_CLKDMS) { 358 if (i == PWRDM_MAX_CLKDMS) {
357 pr_debug("powerdomain: increase PWRDM_MAX_CLKDMS for " 359 pr_debug("powerdomain: %s: increase PWRDM_MAX_CLKDMS for clkdm %s\n",
358 "pwrdm %s clkdm %s\n", pwrdm->name, clkdm->name); 360 pwrdm->name, clkdm->name);
359 WARN_ON(1); 361 WARN_ON(1);
360 ret = -ENOMEM; 362 ret = -ENOMEM;
361 goto pac_exit; 363 goto pac_exit;
@@ -387,16 +389,16 @@ int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)
387 if (!pwrdm || !clkdm) 389 if (!pwrdm || !clkdm)
388 return -EINVAL; 390 return -EINVAL;
389 391
390 pr_debug("powerdomain: dissociating clockdomain %s from powerdomain " 392 pr_debug("powerdomain: %s: dissociating clockdomain %s\n",
391 "%s\n", clkdm->name, pwrdm->name); 393 pwrdm->name, clkdm->name);
392 394
393 for (i = 0; i < PWRDM_MAX_CLKDMS; i++) 395 for (i = 0; i < PWRDM_MAX_CLKDMS; i++)
394 if (pwrdm->pwrdm_clkdms[i] == clkdm) 396 if (pwrdm->pwrdm_clkdms[i] == clkdm)
395 break; 397 break;
396 398
397 if (i == PWRDM_MAX_CLKDMS) { 399 if (i == PWRDM_MAX_CLKDMS) {
398 pr_debug("powerdomain: clkdm %s not associated with pwrdm " 400 pr_debug("powerdomain: %s: clkdm %s not associated?!\n",
399 "%s ?!\n", clkdm->name, pwrdm->name); 401 pwrdm->name, clkdm->name);
400 ret = -ENOENT; 402 ret = -ENOENT;
401 goto pdc_exit; 403 goto pdc_exit;
402 } 404 }
@@ -485,7 +487,7 @@ int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
485 if (!(pwrdm->pwrsts & (1 << pwrst))) 487 if (!(pwrdm->pwrsts & (1 << pwrst)))
486 return -EINVAL; 488 return -EINVAL;
487 489
488 pr_debug("powerdomain: setting next powerstate for %s to %0x\n", 490 pr_debug("powerdomain: %s: setting next powerstate to %0x\n",
489 pwrdm->name, pwrst); 491 pwrdm->name, pwrst);
490 492
491 if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) { 493 if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) {
@@ -587,7 +589,7 @@ int pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst)
587 if (!(pwrdm->pwrsts_logic_ret & (1 << pwrst))) 589 if (!(pwrdm->pwrsts_logic_ret & (1 << pwrst)))
588 return -EINVAL; 590 return -EINVAL;
589 591
590 pr_debug("powerdomain: setting next logic powerstate for %s to %0x\n", 592 pr_debug("powerdomain: %s: setting next logic powerstate to %0x\n",
591 pwrdm->name, pwrst); 593 pwrdm->name, pwrst);
592 594
593 if (arch_pwrdm && arch_pwrdm->pwrdm_set_logic_retst) 595 if (arch_pwrdm && arch_pwrdm->pwrdm_set_logic_retst)
@@ -624,8 +626,8 @@ int pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, u8 pwrst)
624 if (!(pwrdm->pwrsts_mem_on[bank] & (1 << pwrst))) 626 if (!(pwrdm->pwrsts_mem_on[bank] & (1 << pwrst)))
625 return -EINVAL; 627 return -EINVAL;
626 628
627 pr_debug("powerdomain: setting next memory powerstate for domain %s " 629 pr_debug("powerdomain: %s: setting next memory powerstate for bank %0x while pwrdm-ON to %0x\n",
628 "bank %0x while pwrdm-ON to %0x\n", pwrdm->name, bank, pwrst); 630 pwrdm->name, bank, pwrst);
629 631
630 if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_onst) 632 if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_onst)
631 ret = arch_pwrdm->pwrdm_set_mem_onst(pwrdm, bank, pwrst); 633 ret = arch_pwrdm->pwrdm_set_mem_onst(pwrdm, bank, pwrst);
@@ -662,8 +664,8 @@ int pwrdm_set_mem_retst(struct powerdomain *pwrdm, u8 bank, u8 pwrst)
662 if (!(pwrdm->pwrsts_mem_ret[bank] & (1 << pwrst))) 664 if (!(pwrdm->pwrsts_mem_ret[bank] & (1 << pwrst)))
663 return -EINVAL; 665 return -EINVAL;
664 666
665 pr_debug("powerdomain: setting next memory powerstate for domain %s " 667 pr_debug("powerdomain: %s: setting next memory powerstate for bank %0x while pwrdm-RET to %0x\n",
666 "bank %0x while pwrdm-RET to %0x\n", pwrdm->name, bank, pwrst); 668 pwrdm->name, bank, pwrst);
667 669
668 if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_retst) 670 if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_retst)
669 ret = arch_pwrdm->pwrdm_set_mem_retst(pwrdm, bank, pwrst); 671 ret = arch_pwrdm->pwrdm_set_mem_retst(pwrdm, bank, pwrst);
@@ -841,7 +843,7 @@ int pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm)
841 * warn & fail if it is not ON. 843 * warn & fail if it is not ON.
842 */ 844 */
843 845
844 pr_debug("powerdomain: clearing previous power state reg for %s\n", 846 pr_debug("powerdomain: %s: clearing previous power state reg\n",
845 pwrdm->name); 847 pwrdm->name);
846 848
847 if (arch_pwrdm && arch_pwrdm->pwrdm_clear_all_prev_pwrst) 849 if (arch_pwrdm && arch_pwrdm->pwrdm_clear_all_prev_pwrst)
@@ -871,8 +873,7 @@ int pwrdm_enable_hdwr_sar(struct powerdomain *pwrdm)
871 if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR)) 873 if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR))
872 return ret; 874 return ret;
873 875
874 pr_debug("powerdomain: %s: setting SAVEANDRESTORE bit\n", 876 pr_debug("powerdomain: %s: setting SAVEANDRESTORE bit\n", pwrdm->name);
875 pwrdm->name);
876 877
877 if (arch_pwrdm && arch_pwrdm->pwrdm_enable_hdwr_sar) 878 if (arch_pwrdm && arch_pwrdm->pwrdm_enable_hdwr_sar)
878 ret = arch_pwrdm->pwrdm_enable_hdwr_sar(pwrdm); 879 ret = arch_pwrdm->pwrdm_enable_hdwr_sar(pwrdm);
@@ -901,8 +902,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
901 if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR)) 902 if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR))
902 return ret; 903 return ret;
903 904
904 pr_debug("powerdomain: %s: clearing SAVEANDRESTORE bit\n", 905 pr_debug("powerdomain: %s: clearing SAVEANDRESTORE bit\n", pwrdm->name);
905 pwrdm->name);
906 906
907 if (arch_pwrdm && arch_pwrdm->pwrdm_disable_hdwr_sar) 907 if (arch_pwrdm && arch_pwrdm->pwrdm_disable_hdwr_sar)
908 ret = arch_pwrdm->pwrdm_disable_hdwr_sar(pwrdm); 908 ret = arch_pwrdm->pwrdm_disable_hdwr_sar(pwrdm);
diff --git a/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c b/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
index 0f0a9f1592fe..3950ccfe5f4a 100644
--- a/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
@@ -122,8 +122,8 @@ static int omap2_pwrdm_wait_transition(struct powerdomain *pwrdm)
122 udelay(1); 122 udelay(1);
123 123
124 if (c > PWRDM_TRANSITION_BAILOUT) { 124 if (c > PWRDM_TRANSITION_BAILOUT) {
125 printk(KERN_ERR "powerdomain: waited too long for " 125 pr_err("powerdomain: %s: waited too long to complete transition\n",
126 "powerdomain %s to complete transition\n", pwrdm->name); 126 pwrdm->name);
127 return -EAGAIN; 127 return -EAGAIN;
128 } 128 }
129 129
diff --git a/arch/arm/mach-omap2/powerdomain44xx.c b/arch/arm/mach-omap2/powerdomain44xx.c
index 601325b852a4..aeac6f35ca10 100644
--- a/arch/arm/mach-omap2/powerdomain44xx.c
+++ b/arch/arm/mach-omap2/powerdomain44xx.c
@@ -198,8 +198,8 @@ static int omap4_pwrdm_wait_transition(struct powerdomain *pwrdm)
198 udelay(1); 198 udelay(1);
199 199
200 if (c > PWRDM_TRANSITION_BAILOUT) { 200 if (c > PWRDM_TRANSITION_BAILOUT) {
201 printk(KERN_ERR "powerdomain: waited too long for " 201 pr_err("powerdomain: %s: waited too long to complete transition\n",
202 "powerdomain %s to complete transition\n", pwrdm->name); 202 pwrdm->name);
203 return -EAGAIN; 203 return -EAGAIN;
204 } 204 }
205 205
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index bb883e463078..8b23d234fb55 100644
--- a/arch/arm/mach-omap2/powerdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -15,11 +15,9 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/bug.h> 16#include <linux/bug.h>
17 17
18#include <plat/cpu.h> 18#include "soc.h"
19
20#include "powerdomain.h" 19#include "powerdomain.h"
21#include "powerdomains2xxx_3xxx_data.h" 20#include "powerdomains2xxx_3xxx_data.h"
22
23#include "prcm-common.h" 21#include "prcm-common.h"
24#include "prm2xxx_3xxx.h" 22#include "prm2xxx_3xxx.h"
25#include "prm-regbits-34xx.h" 23#include "prm-regbits-34xx.h"
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 053e24ed3c48..0f51e034e0aa 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -27,7 +27,6 @@
27 27
28#include "common.h" 28#include "common.h"
29#include <plat/prcm.h> 29#include <plat/prcm.h>
30#include <plat/irqs.h>
31 30
32#include "clock.h" 31#include "clock.h"
33#include "clock2xxx.h" 32#include "clock2xxx.h"
@@ -140,11 +139,11 @@ int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest,
140 MAX_MODULE_ENABLE_WAIT, i); 139 MAX_MODULE_ENABLE_WAIT, i);
141 140
142 if (i < MAX_MODULE_ENABLE_WAIT) 141 if (i < MAX_MODULE_ENABLE_WAIT)
143 pr_debug("cm: Module associated with clock %s ready after %d " 142 pr_debug("cm: Module associated with clock %s ready after %d loops\n",
144 "loops\n", name, i); 143 name, i);
145 else 144 else
146 pr_err("cm: Module associated with clock %s didn't enable in " 145 pr_err("cm: Module associated with clock %s didn't enable in %d tries\n",
147 "%d tries\n", name, MAX_MODULE_ENABLE_WAIT); 146 name, MAX_MODULE_ENABLE_WAIT);
148 147
149 return (i < MAX_MODULE_ENABLE_WAIT) ? 1 : 0; 148 return (i < MAX_MODULE_ENABLE_WAIT) ? 1 : 0;
150}; 149};
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index a0309dea6794..9529984d8d2b 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -17,11 +17,10 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/irq.h> 18#include <linux/irq.h>
19 19
20#include "common.h"
21#include <plat/cpu.h>
22#include <plat/prcm.h> 20#include <plat/prcm.h>
23#include <plat/irqs.h>
24 21
22#include "soc.h"
23#include "common.h"
25#include "vp.h" 24#include "vp.h"
26 25
27#include "prm2xxx_3xxx.h" 26#include "prm2xxx_3xxx.h"
@@ -40,7 +39,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = {
40 .nr_regs = 1, 39 .nr_regs = 1,
41 .irqs = omap3_prcm_irqs, 40 .irqs = omap3_prcm_irqs,
42 .nr_irqs = ARRAY_SIZE(omap3_prcm_irqs), 41 .nr_irqs = ARRAY_SIZE(omap3_prcm_irqs),
43 .irq = INT_34XX_PRCM_MPU_IRQ, 42 .irq = 11 + OMAP_INTC_START,
44 .read_pending_irqs = &omap3xxx_prm_read_pending_irqs, 43 .read_pending_irqs = &omap3xxx_prm_read_pending_irqs,
45 .ocp_barrier = &omap3xxx_prm_ocp_barrier, 44 .ocp_barrier = &omap3xxx_prm_ocp_barrier,
46 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen, 45 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen,
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index bb727c2d9337..f0c4d5f4a174 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -17,10 +17,9 @@
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/cpu.h>
21#include <plat/irqs.h>
22#include <plat/prcm.h> 20#include <plat/prcm.h>
23 21
22#include "soc.h"
24#include "iomap.h" 23#include "iomap.h"
25#include "common.h" 24#include "common.h"
26#include "vp.h" 25#include "vp.h"
@@ -40,7 +39,7 @@ static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
40 .nr_regs = 2, 39 .nr_regs = 2,
41 .irqs = omap4_prcm_irqs, 40 .irqs = omap4_prcm_irqs,
42 .nr_irqs = ARRAY_SIZE(omap4_prcm_irqs), 41 .nr_irqs = ARRAY_SIZE(omap4_prcm_irqs),
43 .irq = OMAP44XX_IRQ_PRCM, 42 .irq = 11 + OMAP44XX_IRQ_GIC_START,
44 .read_pending_irqs = &omap44xx_prm_read_pending_irqs, 43 .read_pending_irqs = &omap44xx_prm_read_pending_irqs,
45 .ocp_barrier = &omap44xx_prm_ocp_barrier, 44 .ocp_barrier = &omap44xx_prm_ocp_barrier,
46 .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen, 45 .save_and_clear_irqen = &omap44xx_prm_save_and_clear_irqen,
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 03b126d9ad94..6b4d332be2f6 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -26,7 +26,6 @@
26 26
27#include <plat/common.h> 27#include <plat/common.h>
28#include <plat/prcm.h> 28#include <plat/prcm.h>
29#include <plat/irqs.h>
30 29
31#include "prm2xxx_3xxx.h" 30#include "prm2xxx_3xxx.h"
32#include "prm44xx.h" 31#include "prm44xx.h"
diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c
index 1133bb2f632b..73e55e485329 100644
--- a/arch/arm/mach-omap2/sdrc2xxx.c
+++ b/arch/arm/mach-omap2/sdrc2xxx.c
@@ -24,11 +24,11 @@
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/hardware.h>
28#include <plat/clock.h> 27#include <plat/clock.h>
29#include <plat/sram.h> 28#include <plat/sram.h>
30#include <plat/sdrc.h> 29#include <plat/sdrc.h>
31 30
31#include "soc.h"
32#include "iomap.h" 32#include "iomap.h"
33#include "common.h" 33#include "common.h"
34#include "prm2xxx_3xxx.h" 34#include "prm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 9e80d209d138..0405c8190803 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -29,11 +29,11 @@
29 29
30#include <plat/omap-serial.h> 30#include <plat/omap-serial.h>
31#include "common.h" 31#include "common.h"
32#include <plat/board.h>
33#include <plat/dma.h> 32#include <plat/dma.h>
34#include <plat/omap_hwmod.h> 33#include <plat/omap_hwmod.h>
35#include <plat/omap_device.h> 34#include <plat/omap_device.h>
36#include <plat/omap-pm.h> 35#include <plat/omap-pm.h>
36#include <plat/serial.h>
37 37
38#include "prm2xxx_3xxx.h" 38#include "prm2xxx_3xxx.h"
39#include "pm.h" 39#include "pm.h"
@@ -232,9 +232,8 @@ static int __init omap_serial_early_init(void)
232 232
233 if (console_loglevel >= 10) { 233 if (console_loglevel >= 10) {
234 uart_debug = true; 234 uart_debug = true;
235 pr_info("%s used as console in debug mode" 235 pr_info("%s used as console in debug mode: uart%d clocks will not be gated",
236 " uart%d clocks will not be" 236 uart_name, uart->num);
237 " gated", uart_name, uart->num);
238 } 237 }
239 238
240 if (cmdline_find_option("no_console_suspend")) 239 if (cmdline_find_option("no_console_suspend"))
@@ -319,8 +318,11 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
319 318
320 pdev = omap_device_build(name, uart->num, oh, pdata, pdata_size, 319 pdev = omap_device_build(name, uart->num, oh, pdata, pdata_size,
321 NULL, 0, false); 320 NULL, 0, false);
322 WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n", 321 if (IS_ERR(pdev)) {
323 name, oh->name); 322 WARN(1, "Could not build omap_device for %s: %s.\n", name,
323 oh->name);
324 return;
325 }
324 326
325 if ((console_uart_id == bdata->id) && no_console_suspend) 327 if ((console_uart_id == bdata->id) && no_console_suspend)
326 omap_device_disable_idle_on_suspend(pdev); 328 omap_device_disable_idle_on_suspend(pdev);
diff --git a/arch/arm/mach-omap2/sleep24xx.S b/arch/arm/mach-omap2/sleep24xx.S
index d4bf904d84ab..ce0ccd26efbd 100644
--- a/arch/arm/mach-omap2/sleep24xx.S
+++ b/arch/arm/mach-omap2/sleep24xx.S
@@ -28,8 +28,7 @@
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <asm/assembler.h> 29#include <asm/assembler.h>
30 30
31#include <plat/omap24xx.h> 31#include "omap24xx.h"
32
33#include "sdrc.h" 32#include "sdrc.h"
34 33
35/* First address of reserved address space? apparently valid for OMAP2 & 3 */ 34/* First address of reserved address space? apparently valid for OMAP2 & 3 */
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
index 1f62f23673fb..506987979c1c 100644
--- a/arch/arm/mach-omap2/sleep34xx.S
+++ b/arch/arm/mach-omap2/sleep34xx.S
@@ -26,9 +26,9 @@
26 26
27#include <asm/assembler.h> 27#include <asm/assembler.h>
28 28
29#include <plat/hardware.h>
30#include <plat/sram.h> 29#include <plat/sram.h>
31 30
31#include "omap34xx.h"
32#include "iomap.h" 32#include "iomap.h"
33#include "cm2xxx_3xxx.h" 33#include "cm2xxx_3xxx.h"
34#include "prm2xxx_3xxx.h" 34#include "prm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S
index 91e71d8f46f0..88ff83a0942e 100644
--- a/arch/arm/mach-omap2/sleep44xx.S
+++ b/arch/arm/mach-omap2/sleep44xx.S
@@ -14,10 +14,10 @@
14#include <asm/memory.h> 14#include <asm/memory.h>
15#include <asm/hardware/cache-l2x0.h> 15#include <asm/hardware/cache-l2x0.h>
16 16
17#include <plat/omap44xx.h> 17#include "omap-secure.h"
18#include <mach/omap-secure.h>
19 18
20#include "common.h" 19#include "common.h"
20#include "omap44xx.h"
21#include "omap4-sar-layout.h" 21#include "omap4-sar-layout.h"
22 22
23#if defined(CONFIG_SMP) && defined(CONFIG_PM) 23#if defined(CONFIG_SMP) && defined(CONFIG_PM)
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
new file mode 100644
index 000000000000..fc9b96daf851
--- /dev/null
+++ b/arch/arm/mach-omap2/soc.h
@@ -0,0 +1,7 @@
1#include <plat/cpu.h>
2#include "omap24xx.h"
3#include "omap34xx.h"
4#include "omap44xx.h"
5#include "ti81xx.h"
6#include "am33xx.h"
7#include "omap54xx.h"
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index d033a65f4e4e..cbeae56b56a9 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -104,16 +104,15 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
104 104
105 sr_data = kzalloc(sizeof(struct omap_sr_data), GFP_KERNEL); 105 sr_data = kzalloc(sizeof(struct omap_sr_data), GFP_KERNEL);
106 if (!sr_data) { 106 if (!sr_data) {
107 pr_err("%s: Unable to allocate memory for %s sr_data.Error!\n", 107 pr_err("%s: Unable to allocate memory for %s sr_data\n",
108 __func__, oh->name); 108 __func__, oh->name);
109 return -ENOMEM; 109 return -ENOMEM;
110 } 110 }
111 111
112 sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr; 112 sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;
113 if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) { 113 if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) {
114 pr_err("%s: No voltage domain specified for %s." 114 pr_err("%s: No voltage domain specified for %s. Cannot initialize\n",
115 "Cannot initialize\n", __func__, 115 __func__, oh->name);
116 oh->name);
117 goto exit; 116 goto exit;
118 } 117 }
119 118
@@ -131,8 +130,8 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
131 130
132 omap_voltage_get_volttable(sr_data->voltdm, &volt_data); 131 omap_voltage_get_volttable(sr_data->voltdm, &volt_data);
133 if (!volt_data) { 132 if (!volt_data) {
134 pr_warning("%s: No Voltage table registered fo VDD%d." 133 pr_err("%s: No Voltage table registered for VDD%d\n",
135 "Something really wrong\n\n", __func__, i + 1); 134 __func__, i + 1);
136 goto exit; 135 goto exit;
137 } 136 }
138 137
diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S
index ee0bfcc1410f..8f7326cd435b 100644
--- a/arch/arm/mach-omap2/sram242x.S
+++ b/arch/arm/mach-omap2/sram242x.S
@@ -32,8 +32,7 @@
32 32
33#include <asm/assembler.h> 33#include <asm/assembler.h>
34 34
35#include <mach/hardware.h> 35#include "soc.h"
36
37#include "iomap.h" 36#include "iomap.h"
38#include "prm2xxx_3xxx.h" 37#include "prm2xxx_3xxx.h"
39#include "cm2xxx_3xxx.h" 38#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S
index d4d39ef04769..b140d6578529 100644
--- a/arch/arm/mach-omap2/sram243x.S
+++ b/arch/arm/mach-omap2/sram243x.S
@@ -32,8 +32,7 @@
32 32
33#include <asm/assembler.h> 33#include <asm/assembler.h>
34 34
35#include <mach/hardware.h> 35#include "soc.h"
36
37#include "iomap.h" 36#include "iomap.h"
38#include "prm2xxx_3xxx.h" 37#include "prm2xxx_3xxx.h"
39#include "cm2xxx_3xxx.h" 38#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S
index df5a21322b0a..2d0ceaa23fb8 100644
--- a/arch/arm/mach-omap2/sram34xx.S
+++ b/arch/arm/mach-omap2/sram34xx.S
@@ -29,8 +29,7 @@
29 29
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31 31
32#include <mach/hardware.h> 32#include "soc.h"
33
34#include "iomap.h" 33#include "iomap.h"
35#include "sdrc.h" 34#include "sdrc.h"
36#include "cm2xxx_3xxx.h" 35#include "cm2xxx_3xxx.h"
diff --git a/arch/arm/mach-omap2/ti81xx.h b/arch/arm/mach-omap2/ti81xx.h
new file mode 100644
index 000000000000..8f9843f78422
--- /dev/null
+++ b/arch/arm/mach-omap2/ti81xx.h
@@ -0,0 +1,27 @@
1/*
2 * This file contains the address data for various TI81XX modules.
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __ASM_ARCH_TI81XX_H
17#define __ASM_ARCH_TI81XX_H
18
19#define L4_SLOW_TI81XX_BASE 0x48000000
20
21#define TI81XX_SCM_BASE 0x48140000
22#define TI81XX_CTRL_BASE TI81XX_SCM_BASE
23#define TI81XX_PRCM_BASE 0x48180000
24
25#define TI81XX_ARM_INTC_BASE 0x48200000
26
27#endif /* __ASM_ARCH_TI81XX_H */
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 2ba4f57dda86..5214d5bfba27 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -38,14 +38,16 @@
38#include <linux/slab.h> 38#include <linux/slab.h>
39 39
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41#include <plat/dmtimer.h>
42#include <asm/smp_twd.h> 41#include <asm/smp_twd.h>
43#include <asm/sched_clock.h> 42#include <asm/sched_clock.h>
44#include "common.h" 43
45#include <plat/omap_hwmod.h> 44#include <plat/omap_hwmod.h>
46#include <plat/omap_device.h> 45#include <plat/omap_device.h>
46#include <plat/dmtimer.h>
47#include <plat/omap-pm.h> 47#include <plat/omap-pm.h>
48 48
49#include "soc.h"
50#include "common.h"
49#include "powerdomain.h" 51#include "powerdomain.h"
50 52
51/* Parent clocks, eventually these will come from the clock framework */ 53/* Parent clocks, eventually these will come from the clock framework */
@@ -211,7 +213,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
211 res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source); 213 res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
212 BUG_ON(res); 214 BUG_ON(res);
213 215
214 omap2_gp_timer_irq.dev_id = (void *)&clkev; 216 omap2_gp_timer_irq.dev_id = &clkev;
215 setup_irq(clkev.irq, &omap2_gp_timer_irq); 217 setup_irq(clkev.irq, &omap2_gp_timer_irq);
216 218
217 __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW); 219 __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW);
@@ -380,8 +382,7 @@ OMAP_SYS_TIMER(3_am33xx)
380#ifdef CONFIG_ARCH_OMAP4 382#ifdef CONFIG_ARCH_OMAP4
381#ifdef CONFIG_LOCAL_TIMERS 383#ifdef CONFIG_LOCAL_TIMERS
382static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 384static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
383 OMAP44XX_LOCAL_TWD_BASE, 385 OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START);
384 OMAP44XX_IRQ_LOCALTIMER);
385#endif 386#endif
386 387
387static void __init omap4_timer_init(void) 388static void __init omap4_timer_init(void)
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 329b726012f3..45f77413c21d 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -29,6 +29,7 @@
29#include <plat/i2c.h> 29#include <plat/i2c.h>
30#include <plat/usb.h> 30#include <plat/usb.h>
31 31
32#include "soc.h"
32#include "twl-common.h" 33#include "twl-common.h"
33#include "pm.h" 34#include "pm.h"
34#include "voltage.h" 35#include "voltage.h"
@@ -39,16 +40,6 @@ static struct i2c_board_info __initdata pmic_i2c_board_info = {
39 .flags = I2C_CLIENT_WAKE, 40 .flags = I2C_CLIENT_WAKE,
40}; 41};
41 42
42static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
43 {
44 .addr = 0x48,
45 .flags = I2C_CLIENT_WAKE,
46 },
47 {
48 I2C_BOARD_INFO("twl6040", 0x4b),
49 },
50};
51
52#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) 43#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
53static int twl_set_voltage(void *data, int target_uV) 44static int twl_set_voltage(void *data, int target_uV)
54{ 45{
@@ -78,30 +69,25 @@ void __init omap_pmic_init(int bus, u32 clkrate,
78 69
79void __init omap4_pmic_init(const char *pmic_type, 70void __init omap4_pmic_init(const char *pmic_type,
80 struct twl4030_platform_data *pmic_data, 71 struct twl4030_platform_data *pmic_data,
81 struct twl6040_platform_data *twl6040_data, int twl6040_irq) 72 struct i2c_board_info *devices, int nr_devices)
82{ 73{
83 /* PMIC part*/ 74 /* PMIC part*/
84 omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); 75 omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
85 strncpy(omap4_i2c1_board_info[0].type, pmic_type, 76 omap_pmic_init(1, 400, pmic_type, 7 + OMAP44XX_IRQ_GIC_START, pmic_data);
86 sizeof(omap4_i2c1_board_info[0].type));
87 omap4_i2c1_board_info[0].irq = OMAP44XX_IRQ_SYS_1N;
88 omap4_i2c1_board_info[0].platform_data = pmic_data;
89
90 /* TWL6040 audio IC part */
91 omap4_i2c1_board_info[1].irq = twl6040_irq;
92 omap4_i2c1_board_info[1].platform_data = twl6040_data;
93
94 omap_register_i2c_bus(1, 400, omap4_i2c1_board_info, 2);
95 77
78 /* Register additional devices on i2c1 bus if needed */
79 if (devices)
80 i2c_register_board_info(1, devices, nr_devices);
96} 81}
97 82
98void __init omap_pmic_late_init(void) 83void __init omap_pmic_late_init(void)
99{ 84{
100 /* Init the OMAP TWL parameters (if PMIC has been registered) */ 85 /* Init the OMAP TWL parameters (if PMIC has been registerd) */
101 if (pmic_i2c_board_info.irq) 86 if (!pmic_i2c_board_info.irq)
102 omap3_twl_init(); 87 return;
103 if (omap4_i2c1_board_info[0].irq) 88
104 omap4_twl_init(); 89 omap3_twl_init();
90 omap4_twl_init();
105} 91}
106 92
107#if defined(CONFIG_ARCH_OMAP3) 93#if defined(CONFIG_ARCH_OMAP3)
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index 8fe71cfd002c..2256efe90cf1 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -1,7 +1,7 @@
1#ifndef __OMAP_PMIC_COMMON__ 1#ifndef __OMAP_PMIC_COMMON__
2#define __OMAP_PMIC_COMMON__ 2#define __OMAP_PMIC_COMMON__
3 3
4#include <plat/irqs.h> 4#include "common.h"
5 5
6#define TWL_COMMON_PDATA_USB (1 << 0) 6#define TWL_COMMON_PDATA_USB (1 << 0)
7#define TWL_COMMON_PDATA_BCI (1 << 1) 7#define TWL_COMMON_PDATA_BCI (1 << 1)
@@ -32,6 +32,7 @@
32 32
33struct twl4030_platform_data; 33struct twl4030_platform_data;
34struct twl6040_platform_data; 34struct twl6040_platform_data;
35struct i2c_board_info;
35 36
36void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, 37void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
37 struct twl4030_platform_data *pmic_data); 38 struct twl4030_platform_data *pmic_data);
@@ -40,18 +41,18 @@ void omap_pmic_late_init(void);
40static inline void omap2_pmic_init(const char *pmic_type, 41static inline void omap2_pmic_init(const char *pmic_type,
41 struct twl4030_platform_data *pmic_data) 42 struct twl4030_platform_data *pmic_data)
42{ 43{
43 omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); 44 omap_pmic_init(2, 2600, pmic_type, 7 + OMAP_INTC_START, pmic_data);
44} 45}
45 46
46static inline void omap3_pmic_init(const char *pmic_type, 47static inline void omap3_pmic_init(const char *pmic_type,
47 struct twl4030_platform_data *pmic_data) 48 struct twl4030_platform_data *pmic_data)
48{ 49{
49 omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); 50 omap_pmic_init(1, 2600, pmic_type, 7 + OMAP_INTC_START, pmic_data);
50} 51}
51 52
52void omap4_pmic_init(const char *pmic_type, 53void omap4_pmic_init(const char *pmic_type,
53 struct twl4030_platform_data *pmic_data, 54 struct twl4030_platform_data *pmic_data,
54 struct twl6040_platform_data *audio_data, int twl6040_irq); 55 struct i2c_board_info *devices, int nr_devices);
55 56
56void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, 57void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
57 u32 pdata_flags, u32 regulators_flags); 58 u32 pdata_flags, u32 regulators_flags);
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index dde8a11f47d5..ac95daaa4702 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -25,8 +25,6 @@
25 25
26#include <asm/io.h> 26#include <asm/io.h>
27 27
28#include <mach/hardware.h>
29#include <mach/irqs.h>
30#include <plat/usb.h> 28#include <plat/usb.h>
31#include <plat/omap_device.h> 29#include <plat/omap_device.h>
32 30
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index e9b4b234dc5f..51da21cb78f1 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -23,14 +23,13 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/dma-mapping.h> 24#include <linux/dma-mapping.h>
25#include <linux/io.h> 25#include <linux/io.h>
26
27#include <linux/usb/musb.h> 26#include <linux/usb/musb.h>
28 27
29#include <mach/hardware.h>
30#include <mach/irqs.h>
31#include <mach/am35xx.h>
32#include <plat/usb.h> 28#include <plat/usb.h>
33#include <plat/omap_device.h> 29#include <plat/omap_device.h>
30
31#include "am35xx.h"
32
34#include "mux.h" 33#include "mux.h"
35 34
36static struct musb_hdrc_config musb_config = { 35static struct musb_hdrc_config musb_config = {
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index 84da34f9a7cf..880249b17012 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -12,8 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/bug.h> 13#include <linux/bug.h>
14 14
15#include <plat/cpu.h> 15#include "soc.h"
16
17#include "voltage.h" 16#include "voltage.h"
18#include "vc.h" 17#include "vc.h"
19#include "prm-regbits-34xx.h" 18#include "prm-regbits-34xx.h"
@@ -116,9 +115,8 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm,
116 } 115 }
117 116
118 if (!voltdm->pmic->uv_to_vsel) { 117 if (!voltdm->pmic->uv_to_vsel) {
119 pr_err("%s: PMIC function to convert voltage in uV to" 118 pr_err("%s: PMIC function to convert voltage in uV to vsel not registered. Hence unable to scale voltage for vdd_%s\n",
120 "vsel not registered. Hence unable to scale voltage" 119 __func__, voltdm->name);
121 "for vdd_%s\n", __func__, voltdm->name);
122 return -ENODATA; 120 return -ENODATA;
123 } 121 }
124 122
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 4dc60e83e00d..3ac8fe1d8213 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -195,8 +195,8 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
195 return &voltdm->volt_data[i]; 195 return &voltdm->volt_data[i];
196 } 196 }
197 197
198 pr_notice("%s: Unable to match the current voltage with the voltage" 198 pr_notice("%s: Unable to match the current voltage with the voltage table for vdd_%s\n",
199 "table for vdd_%s\n", __func__, voltdm->name); 199 __func__, voltdm->name);
200 200
201 return ERR_PTR(-ENODATA); 201 return ERR_PTR(-ENODATA);
202} 202}
@@ -249,8 +249,8 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm,
249 voltdm->scale = omap_vc_bypass_scale; 249 voltdm->scale = omap_vc_bypass_scale;
250 return; 250 return;
251 default: 251 default:
252 pr_warning("%s: Trying to change the method of voltage scaling" 252 pr_warn("%s: Trying to change the method of voltage scaling to an unsupported one!\n",
253 "to an unsupported one!\n", __func__); 253 __func__);
254 } 254 }
255} 255}
256 256
@@ -331,8 +331,8 @@ int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct powerdomain *pwrdm)
331 if (!voltdm || !pwrdm) 331 if (!voltdm || !pwrdm)
332 return -EINVAL; 332 return -EINVAL;
333 333
334 pr_debug("voltagedomain: associating powerdomain %s with voltagedomain " 334 pr_debug("voltagedomain: %s: associating powerdomain %s\n",
335 "%s\n", pwrdm->name, voltdm->name); 335 voltdm->name, pwrdm->name);
336 336
337 list_add(&pwrdm->voltdm_node, &voltdm->pwrdm_list); 337 list_add(&pwrdm->voltdm_node, &voltdm->pwrdm_list);
338 338
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index 0ac2caf15941..7283b7ed7de8 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -16,7 +16,7 @@
16 16
17#include <linux/err.h> 17#include <linux/err.h>
18 18
19#include <plat/voltage.h> 19#include <linux/platform_data/voltage-omap.h>
20 20
21#include "vc.h" 21#include "vc.h"
22#include "vp.h" 22#include "vp.h"
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
index d0103c80d040..63afbfed3cbc 100644
--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
@@ -18,9 +18,8 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/init.h> 19#include <linux/init.h>
20 20
21#include "soc.h"
21#include "common.h" 22#include "common.h"
22#include <plat/cpu.h>
23
24#include "prm-regbits-34xx.h" 23#include "prm-regbits-34xx.h"
25#include "omap_opp_data.h" 24#include "omap_opp_data.h"
26#include "voltage.h" 25#include "voltage.h"
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index f95c1bad9dc6..85241b828c02 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -138,8 +138,8 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
138 udelay(1); 138 udelay(1);
139 } 139 }
140 if (timeout >= VP_TRANXDONE_TIMEOUT) { 140 if (timeout >= VP_TRANXDONE_TIMEOUT) {
141 pr_warning("%s: vdd_%s TRANXDONE timeout exceeded." 141 pr_warn("%s: vdd_%s TRANXDONE timeout exceeded. Voltage change aborted",
142 "Voltage change aborted", __func__, voltdm->name); 142 __func__, voltdm->name);
143 return -ETIMEDOUT; 143 return -ETIMEDOUT;
144 } 144 }
145 145
@@ -157,9 +157,8 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
157 omap_test_timeout(vp->common->ops->check_txdone(vp->id), 157 omap_test_timeout(vp->common->ops->check_txdone(vp->id),
158 VP_TRANXDONE_TIMEOUT, timeout); 158 VP_TRANXDONE_TIMEOUT, timeout);
159 if (timeout >= VP_TRANXDONE_TIMEOUT) 159 if (timeout >= VP_TRANXDONE_TIMEOUT)
160 pr_err("%s: vdd_%s TRANXDONE timeout exceeded." 160 pr_err("%s: vdd_%s TRANXDONE timeout exceeded. TRANXDONE never got set after the voltage update\n",
161 "TRANXDONE never got set after the voltage update\n", 161 __func__, voltdm->name);
162 __func__, voltdm->name);
163 162
164 omap_vc_post_scale(voltdm, target_volt, target_vsel, current_vsel); 163 omap_vc_post_scale(voltdm, target_volt, target_vsel, current_vsel);
165 164
@@ -176,8 +175,7 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
176 } 175 }
177 176
178 if (timeout >= VP_TRANXDONE_TIMEOUT) 177 if (timeout >= VP_TRANXDONE_TIMEOUT)
179 pr_warning("%s: vdd_%s TRANXDONE timeout exceeded while trying" 178 pr_warn("%s: vdd_%s TRANXDONE timeout exceeded while trying to clear the TRANXDONE status\n",
180 "to clear the TRANXDONE status\n",
181 __func__, voltdm->name); 179 __func__, voltdm->name);
182 180
183 /* Clear force bit */ 181 /* Clear force bit */
@@ -257,8 +255,8 @@ void omap_vp_disable(struct voltagedomain *voltdm)
257 255
258 /* If VP is already disabled, do nothing. Return */ 256 /* If VP is already disabled, do nothing. Return */
259 if (!vp->enabled) { 257 if (!vp->enabled) {
260 pr_warning("%s: Trying to disable VP for vdd_%s when" 258 pr_warn("%s: Trying to disable VP for vdd_%s when it is already disabled\n",
261 "it is already disabled\n", __func__, voltdm->name); 259 __func__, voltdm->name);
262 return; 260 return;
263 } 261 }
264 262