aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-09-23 22:31:35 -0400
committerTony Lindgren <tony@atomide.com>2012-09-23 22:31:35 -0400
commit9cd68fa707cf6372f33eb51a5719dd7626efe5f6 (patch)
tree66cde27bd288e011a6e4cff87d342666399a1266 /arch
parent5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff)
parent76a5d9bfc42d60e9a672e0cae776157a60970f4e (diff)
Merge tag 'omap-devel-b-c-2-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into devel-late
OMAP patches intended for the 3.7 merge window: - Runtime PM conversions for the GPMC and RNG IP blocks - Preparation patches for the OMAP common clock framework conversion - clkdev alias additions required by other drivers - Performance Monitoring Unit (PMU) support for OMAP2, 3, and non-4430 OMAP4 - OMAP hwmod code and data improvements - Preparation patches for the IOMMU runtime PM conversion - Preparation patches for OMAP4 full-chip retention support Based on a merge of v3.6-rc6, the omap-cleanup-b-for-3.7 tag (7852ec0536ca39cefffc6301dc77f8ae55592926),the cleanup-fixes-for-v3.7 tag (de6ca33a96a6bf61fcb91d3d399703e19ead9d1e), and the omap-devel-am33xx-for-v3.7 tag (11964f53eb4d9ce59a058be9999d9cfcb1ced878), due to dependencies. These patches have been tested for meaningful warnings from checkpatch, sparse, smatch, and cppcheck. Basic build, boot[1], and PM test logs are available here: http://www.pwsan.com/omap/testlogs/hwmod_prcm_clock_a_3.7/20120923173830/ ... 1. Note that the N800 boot fails due to a known issue present in the base commit: http://www.spinics.net/lists/arm-kernel/msg196034.html
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/srmcons.c1
-rw-r--r--arch/arm/mach-omap1/ams-delta-fiq-handler.S1
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c2
-rw-r--r--arch/arm/mach-omap1/board-fsample.c1
-rw-r--r--arch/arm/mach-omap1/board-generic.c6
-rw-r--r--arch/arm/mach-omap1/board-h2.c1
-rw-r--r--arch/arm/mach-omap1/board-h3.c1
-rw-r--r--arch/arm/mach-omap1/board-htcherald.c6
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c1
-rw-r--r--arch/arm/mach-omap1/board-osk.c2
-rw-r--r--arch/arm/mach-omap1/board-palmte.c2
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c2
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c2
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c1
-rw-r--r--arch/arm/mach-omap1/board-sx1.c1
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c6
-rw-r--r--arch/arm/mach-omap1/clock.c4
-rw-r--r--arch/arm/mach-omap1/clock_data.c21
-rw-r--r--arch/arm/mach-omap1/devices.c31
-rw-r--r--arch/arm/mach-omap1/dma.c8
-rw-r--r--arch/arm/mach-omap1/gpio15xx.c1
-rw-r--r--arch/arm/mach-omap1/gpio16xx.c1
-rw-r--r--arch/arm/mach-omap1/gpio7xx.c1
-rw-r--r--arch/arm/mach-omap1/include/mach/ams-delta-fiq.h2
-rw-r--r--arch/arm/mach-omap1/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-omap1/include/mach/hardware.h285
-rw-r--r--arch/arm/mach-omap1/include/mach/irqs.h267
-rw-r--r--arch/arm/mach-omap1/include/mach/omap1510.h (renamed from arch/arm/plat-omap/include/plat/omap1510.h)3
-rw-r--r--arch/arm/mach-omap1/include/mach/omap16xx.h (renamed from arch/arm/plat-omap/include/plat/omap16xx.h)3
-rw-r--r--arch/arm/mach-omap1/include/mach/omap7xx.h (renamed from arch/arm/plat-omap/include/plat/omap7xx.h)3
-rw-r--r--arch/arm/mach-omap1/lcd_dma.c6
-rw-r--r--arch/arm/mach-omap1/leds-h2p2-debug.c13
-rw-r--r--arch/arm/mach-omap1/leds.c1
-rw-r--r--arch/arm/mach-omap1/serial.c1
-rw-r--r--arch/arm/mach-omap1/timer.c2
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/am33xx.h (renamed from arch/arm/plat-omap/include/plat/am33xx.h)0
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c6
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c10
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c6
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c6
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c10
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c11
-rw-r--r--arch/arm/mach-omap2/board-apollon.c6
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c10
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c9
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c7
-rw-r--r--arch/arm/mach-omap2/board-flash.c4
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/board-h4.c11
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c5
-rw-r--r--arch/arm/mach-omap2/board-ldp.c7
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c12
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c5
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c23
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c18
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c5
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c15
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c5
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c8
-rw-r--r--arch/arm/mach-omap2/board-overo.c12
-rw-r--r--arch/arm/mach-omap2/board-rm680.c6
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c6
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c8
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c10
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c2
-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_apll.c2
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c12
-rw-r--r--arch/arm/mach-omap2/clkt34xx_dpll3m2.c30
-rw-r--r--arch/arm/mach-omap2/clkt_clksel.c94
-rw-r--r--arch/arm/mach-omap2/clkt_dpll.c40
-rw-r--r--arch/arm/mach-omap2/clock.c35
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c26
-rw-r--r--arch/arm/mach-omap2/clock2430.c2
-rw-r--r--arch/arm/mach-omap2/clock2430_data.c26
-rw-r--r--arch/arm/mach-omap2/clock2xxx.c2
-rw-r--r--arch/arm/mach-omap2/clock33xx_data.c5
-rw-r--r--arch/arm/mach-omap2/clock3xxx.c13
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c40
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c23
-rw-r--r--arch/arm/mach-omap2/clockdomain.c91
-rw-r--r--arch/arm/mach-omap2/clockdomain.h20
-rw-r--r--arch/arm/mach-omap2/clockdomain2xxx_3xxx.c49
-rw-r--r--arch/arm/mach-omap2/clockdomain44xx.c11
-rw-r--r--arch/arm/mach-omap2/clockdomains3xxx_data.c7
-rw-r--r--arch/arm/mach-omap2/clockdomains44xx_data.c3
-rw-r--r--arch/arm/mach-omap2/cm-regbits-33xx.h158
-rw-r--r--arch/arm/mach-omap2/cm-regbits-34xx.h2
-rw-r--r--arch/arm/mach-omap2/cm-regbits-44xx.h411
-rw-r--r--arch/arm/mach-omap2/cm2xxx_3xxx.c5
-rw-r--r--arch/arm/mach-omap2/cm2xxx_3xxx.h1
-rw-r--r--arch/arm/mach-omap2/common-board-devices.c4
-rw-r--r--arch/arm/mach-omap2/common.c3
-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.h3
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c1
-rw-r--r--arch/arm/mach-omap2/devices.c59
-rw-r--r--arch/arm/mach-omap2/display.c4
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c61
-rw-r--r--arch/arm/mach-omap2/dpll44xx.c2
-rw-r--r--arch/arm/mach-omap2/emu.c3
-rw-r--r--arch/arm/mach-omap2/gpio.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c32
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c27
-rw-r--r--arch/arm/mach-omap2/gpmc-smc91x.c3
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c1
-rw-r--r--arch/arm/mach-omap2/gpmc.c349
-rw-r--r--arch/arm/mach-omap2/hsmmc.c2
-rw-r--r--arch/arm/mach-omap2/i2c.c1
-rw-r--r--arch/arm/mach-omap2/id.c7
-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/io.c3
-rw-r--r--arch/arm/mach-omap2/irq.c10
-rw-r--r--arch/arm/mach-omap2/mailbox.c4
-rw-r--r--arch/arm/mach-omap2/mcbsp.c2
-rw-r--r--arch/arm/mach-omap2/msdi.c1
-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-smp.c2
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c1
-rw-r--r--arch/arm/mach-omap2/omap24xx.h (renamed from arch/arm/plat-omap/include/plat/omap24xx.h)2
-rw-r--r--arch/arm/mach-omap2/omap34xx.h (renamed from arch/arm/plat-omap/include/plat/omap34xx.h)2
-rw-r--r--arch/arm/mach-omap2/omap4-common.c9
-rw-r--r--arch/arm/mach-omap2/omap44xx.h (renamed from arch/arm/plat-omap/include/plat/omap44xx.h)2
-rw-r--r--arch/arm/mach-omap2/omap54xx.h (renamed from arch/arm/plat-omap/include/plat/omap54xx.h)0
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c336
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c44
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c92
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c108
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c17
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c118
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c3381
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c432
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c246
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h7
-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.c9
-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/pmu.c95
-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.c65
-rw-r--r--arch/arm/mach-omap2/powerdomains3xxx_data.c4
-rw-r--r--arch/arm/mach-omap2/prcm-common.h2
-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.c32
-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.S2
-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.h (renamed from arch/arm/plat-omap/include/plat/ti81xx.h)0
-rw-r--r--arch/arm/mach-omap2/timer.c11
-rw-r--r--arch/arm/mach-omap2/twl-common.c3
-rw-r--r--arch/arm/mach-omap2/twl-common.h6
-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/voltagedomains3xxx_data.c3
-rw-r--r--arch/arm/mach-omap2/vp.c16
-rw-r--r--arch/arm/mach-ux500/board-mop500.c21
-rw-r--r--arch/arm/plat-omap/Kconfig1
-rw-r--r--arch/arm/plat-omap/Makefile3
-rw-r--r--arch/arm/plat-omap/clock.c27
-rw-r--r--arch/arm/plat-omap/common.c40
-rw-r--r--arch/arm/plat-omap/counter_32k.c3
-rw-r--r--arch/arm/plat-omap/debug-devices.c3
-rw-r--r--arch/arm/plat-omap/debug-leds.c1
-rw-r--r--arch/arm/plat-omap/devices.c92
-rw-r--r--arch/arm/plat-omap/dma.c54
-rw-r--r--arch/arm/plat-omap/fb.c2
-rw-r--r--arch/arm/plat-omap/i2c.c3
-rw-r--r--arch/arm/plat-omap/include/plat/board.h138
-rw-r--r--arch/arm/plat-omap/include/plat/clock.h5
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h3
-rw-r--r--arch/arm/plat-omap/include/plat/debug-devices.h9
-rw-r--r--arch/arm/plat-omap/include/plat/dma.h2
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h1
-rw-r--r--arch/arm/plat-omap/include/plat/gpio-switch.h54
-rw-r--r--arch/arm/plat-omap/include/plat/gpio.h228
-rw-r--r--arch/arm/plat-omap/include/plat/gpmc.h19
-rw-r--r--arch/arm/plat-omap/include/plat/hardware.h293
-rw-r--r--arch/arm/plat-omap/include/plat/iommu.h15
-rw-r--r--arch/arm/plat-omap/include/plat/irqs-44xx.h144
-rw-r--r--arch/arm/plat-omap/include/plat/irqs.h453
-rw-r--r--arch/arm/plat-omap/include/plat/mmc.h1
-rw-r--r--arch/arm/plat-omap/include/plat/nand.h3
-rw-r--r--arch/arm/plat-omap/include/plat/omap-serial.h50
-rw-r--r--arch/arm/plat-omap/include/plat/omap4-keypad.h2
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h4
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h27
-rw-r--r--arch/arm/plat-omap/include/plat/usb.h1
-rw-r--r--arch/arm/plat-omap/mux.c2
-rw-r--r--arch/arm/plat-omap/omap-pm-noop.c39
-rw-r--r--arch/arm/plat-omap/omap_device.c84
-rw-r--r--arch/arm/plat-omap/sram.c1
-rw-r--r--arch/ia64/hp/sim/simserial.c3
-rw-r--r--arch/m68k/emu/nfcon.c4
-rw-r--r--arch/mips/cavium-octeon/serial.c30
-rw-r--r--arch/mips/sni/a20r.c32
-rw-r--r--arch/parisc/kernel/pdc_cons.c1
-rw-r--r--arch/um/drivers/line.c3
-rw-r--r--arch/xtensa/platforms/iss/console.c1
226 files changed, 7062 insertions, 2755 deletions
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 3ea809430eda..5d5865204a1d 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -223,6 +223,7 @@ srmcons_init(void)
223 driver->subtype = SYSTEM_TYPE_SYSCONS; 223 driver->subtype = SYSTEM_TYPE_SYSCONS;
224 driver->init_termios = tty_std_termios; 224 driver->init_termios = tty_std_termios;
225 tty_set_operations(driver, &srmcons_ops); 225 tty_set_operations(driver, &srmcons_ops);
226 tty_port_link_device(&srmcons_singleton.port, driver, 0);
226 err = tty_register_driver(driver); 227 err = tty_register_driver(driver);
227 if (err) { 228 if (err) {
228 put_tty_driver(driver); 229 put_tty_driver(driver);
diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
index a051cb8ae57f..d2b6acce8fc1 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S
+++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S
@@ -18,6 +18,7 @@
18 18
19#include <plat/board-ams-delta.h> 19#include <plat/board-ams-delta.h>
20 20
21#include <mach/irqs.h>
21#include <mach/ams-delta-fiq.h> 22#include <mach/ams-delta-fiq.h>
22 23
23#include "iomap.h" 24#include "iomap.h"
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index c53469802c03..6f192c4900b1 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -26,6 +26,7 @@
26#include <linux/export.h> 26#include <linux/export.h>
27#include <linux/omapfb.h> 27#include <linux/omapfb.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/platform_data/gpio-omap.h>
29 30
30#include <media/soc_camera.h> 31#include <media/soc_camera.h>
31 32
@@ -37,7 +38,6 @@
37#include <plat/board-ams-delta.h> 38#include <plat/board-ams-delta.h>
38#include <plat/keypad.h> 39#include <plat/keypad.h>
39#include <plat/mux.h> 40#include <plat/mux.h>
40#include <plat/board.h>
41 41
42#include <mach/hardware.h> 42#include <mach/hardware.h>
43#include <mach/ams-delta-fiq.h> 43#include <mach/ams-delta-fiq.h>
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 6872f3fd400f..6d985521a39e 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -32,7 +32,6 @@
32#include <plat/flash.h> 32#include <plat/flash.h>
33#include <plat/fpga.h> 33#include <plat/fpga.h>
34#include <plat/keypad.h> 34#include <plat/keypad.h>
35#include <plat/board.h>
36 35
37#include <mach/hardware.h> 36#include <mach/hardware.h>
38 37
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index 6ec385e2b98e..04b5fdaff831 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -23,7 +23,6 @@
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <plat/mux.h> 25#include <plat/mux.h>
26#include <plat/board.h>
27 26
28#include <mach/usb.h> 27#include <mach/usb.h>
29 28
@@ -52,9 +51,6 @@ static struct omap_usb_config generic1610_usb_config __initdata = {
52}; 51};
53#endif 52#endif
54 53
55static struct omap_board_config_kernel generic_config[] __initdata = {
56};
57
58static void __init omap_generic_init(void) 54static void __init omap_generic_init(void)
59{ 55{
60#ifdef CONFIG_ARCH_OMAP15XX 56#ifdef CONFIG_ARCH_OMAP15XX
@@ -76,8 +72,6 @@ static void __init omap_generic_init(void)
76 } 72 }
77#endif 73#endif
78 74
79 omap_board_config = generic_config;
80 omap_board_config_size = ARRAY_SIZE(generic_config);
81 omap_serial_init(); 75 omap_serial_init();
82 omap_register_i2c_bus(1, 100, NULL, 0); 76 omap_register_i2c_bus(1, 100, NULL, 0);
83} 77}
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 44a4ab195fbc..fe79c56b2dc0 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -31,6 +31,7 @@
31#include <linux/i2c/tps65010.h> 31#include <linux/i2c/tps65010.h>
32#include <linux/smc91x.h> 32#include <linux/smc91x.h>
33#include <linux/omapfb.h> 33#include <linux/omapfb.h>
34#include <linux/platform_data/gpio-omap.h>
34 35
35#include <asm/mach-types.h> 36#include <asm/mach-types.h>
36#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 86cb5a04a404..6c46f33894fb 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -31,6 +31,7 @@
31#include <linux/i2c/tps65010.h> 31#include <linux/i2c/tps65010.h>
32#include <linux/smc91x.h> 32#include <linux/smc91x.h>
33#include <linux/omapfb.h> 33#include <linux/omapfb.h>
34#include <linux/platform_data/gpio-omap.h>
34 35
35#include <asm/setup.h> 36#include <asm/setup.h>
36#include <asm/page.h> 37#include <asm/page.h>
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index b3f6e943e661..1dcb751b8fe5 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -41,8 +41,7 @@
41#include <asm/mach-types.h> 41#include <asm/mach-types.h>
42#include <asm/mach/arch.h> 42#include <asm/mach/arch.h>
43 43
44#include <plat/omap7xx.h> 44#include <mach/omap7xx.h>
45#include <plat/board.h>
46#include <plat/keypad.h> 45#include <plat/keypad.h>
47#include <plat/mmc.h> 46#include <plat/mmc.h>
48 47
@@ -476,8 +475,7 @@ static void __init htcherald_lcd_init(void)
476 break; 475 break;
477 } 476 }
478 if (!tries) 477 if (!tries)
479 printk(KERN_WARNING "Timeout waiting for end of frame " 478 pr_err("Timeout waiting for end of frame -- LCD may not be available\n");
480 "-- LCD may not be available\n");
481 479
482 /* turn off DMA */ 480 /* turn off DMA */
483 reg = omap_readw(OMAP_DMA_LCD_CCR); 481 reg = omap_readw(OMAP_DMA_LCD_CCR);
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 2c0ca8fc3380..ec01f03d0446 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -26,7 +26,6 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <plat/board.h>
30#include <plat/keypad.h> 29#include <plat/keypad.h>
31#include <plat/lcd_mipid.h> 30#include <plat/lcd_mipid.h>
32#include <plat/mmc.h> 31#include <plat/mmc.h>
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 8784705edb60..3b2d9071022a 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -39,6 +39,8 @@
39#include <linux/mtd/partitions.h> 39#include <linux/mtd/partitions.h>
40#include <linux/mtd/physmap.h> 40#include <linux/mtd/physmap.h>
41#include <linux/i2c/tps65010.h> 41#include <linux/i2c/tps65010.h>
42#include <linux/platform_data/gpio-omap.h>
43#include <linux/platform_data/omap1_bl.h>
42 44
43#include <asm/mach-types.h> 45#include <asm/mach-types.h>
44#include <asm/mach/arch.h> 46#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 26bcb9defcdc..49f8d745ea1f 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -28,6 +28,7 @@
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/apm-emulation.h> 29#include <linux/apm-emulation.h>
30#include <linux/omapfb.h> 30#include <linux/omapfb.h>
31#include <linux/platform_data/omap1_bl.h>
31 32
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
@@ -37,7 +38,6 @@
37#include <plat/mux.h> 38#include <plat/mux.h>
38#include <plat/tc.h> 39#include <plat/tc.h>
39#include <plat/dma.h> 40#include <plat/dma.h>
40#include <plat/board.h>
41#include <plat/irda.h> 41#include <plat/irda.h>
42#include <plat/keypad.h> 42#include <plat/keypad.h>
43 43
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 4d099446dfa8..01523cd78e58 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -27,6 +27,7 @@
27#include <linux/omapfb.h> 27#include <linux/omapfb.h>
28#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
29#include <linux/spi/ads7846.h> 29#include <linux/spi/ads7846.h>
30#include <linux/platform_data/omap1_bl.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -37,7 +38,6 @@
37#include <plat/mux.h> 38#include <plat/mux.h>
38#include <plat/dma.h> 39#include <plat/dma.h>
39#include <plat/tc.h> 40#include <plat/tc.h>
40#include <plat/board.h>
41#include <plat/irda.h> 41#include <plat/irda.h>
42#include <plat/keypad.h> 42#include <plat/keypad.h>
43 43
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 355980321c2d..a7abce69043a 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -30,6 +30,7 @@
30#include <linux/omapfb.h> 30#include <linux/omapfb.h>
31#include <linux/spi/spi.h> 31#include <linux/spi/spi.h>
32#include <linux/spi/ads7846.h> 32#include <linux/spi/ads7846.h>
33#include <linux/platform_data/omap1_bl.h>
33 34
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -39,7 +40,6 @@
39#include <plat/mux.h> 40#include <plat/mux.h>
40#include <plat/dma.h> 41#include <plat/dma.h>
41#include <plat/tc.h> 42#include <plat/tc.h>
42#include <plat/board.h>
43#include <plat/irda.h> 43#include <plat/irda.h>
44#include <plat/keypad.h> 44#include <plat/keypad.h>
45 45
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 703d55ecffe2..277e0bc60a43 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -32,7 +32,6 @@
32#include <plat/fpga.h> 32#include <plat/fpga.h>
33#include <plat/flash.h> 33#include <plat/flash.h>
34#include <plat/keypad.h> 34#include <plat/keypad.h>
35#include <plat/board.h>
36 35
37#include <mach/hardware.h> 36#include <mach/hardware.h>
38 37
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 8c665bd16ac2..2e1fff26a2f3 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -38,7 +38,6 @@
38#include <plat/dma.h> 38#include <plat/dma.h>
39#include <plat/irda.h> 39#include <plat/irda.h>
40#include <plat/tc.h> 40#include <plat/tc.h>
41#include <plat/board.h>
42#include <plat/keypad.h> 41#include <plat/keypad.h>
43#include <plat/board-sx1.h> 42#include <plat/board-sx1.h>
44 43
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 3497769eb353..1668af3017de 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -35,7 +35,6 @@
35#include <plat/flash.h> 35#include <plat/flash.h>
36#include <plat/mux.h> 36#include <plat/mux.h>
37#include <plat/tc.h> 37#include <plat/tc.h>
38#include <plat/board.h>
39 38
40#include <mach/hardware.h> 39#include <mach/hardware.h>
41#include <mach/usb.h> 40#include <mach/usb.h>
@@ -155,9 +154,6 @@ static struct omap_usb_config voiceblue_usb_config __initdata = {
155 .pins[2] = 6, 154 .pins[2] = 6,
156}; 155};
157 156
158static struct omap_board_config_kernel voiceblue_config[] = {
159};
160
161#define MACHINE_PANICED 1 157#define MACHINE_PANICED 1
162#define MACHINE_REBOOTING 2 158#define MACHINE_REBOOTING 2
163#define MACHINE_REBOOT 4 159#define MACHINE_REBOOT 4
@@ -275,8 +271,6 @@ static void __init voiceblue_init(void)
275 voiceblue_smc91x_resources[1].start = gpio_to_irq(8); 271 voiceblue_smc91x_resources[1].start = gpio_to_irq(8);
276 voiceblue_smc91x_resources[1].end = gpio_to_irq(8); 272 voiceblue_smc91x_resources[1].end = gpio_to_irq(8);
277 platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); 273 platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
278 omap_board_config = voiceblue_config;
279 omap_board_config_size = ARRAY_SIZE(voiceblue_config);
280 omap_serial_init(); 274 omap_serial_init();
281 omap1_usb_init(&voiceblue_usb_config); 275 omap1_usb_init(&voiceblue_usb_config);
282 omap_register_i2c_bus(1, 100, NULL, 0); 276 omap_register_i2c_bus(1, 100, NULL, 0);
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index a9ee06b6cb42..638f4070fc70 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -587,8 +587,8 @@ void omap1_clk_disable_unused(struct clk *clk)
587 /* Clocks in the DSP domain need api_ck. Just assume bootloader 587 /* Clocks in the DSP domain need api_ck. Just assume bootloader
588 * has not enabled any DSP clocks */ 588 * has not enabled any DSP clocks */
589 if (clk->enable_reg == DSP_IDLECT2) { 589 if (clk->enable_reg == DSP_IDLECT2) {
590 printk(KERN_INFO "Skipping reset check for DSP domain " 590 pr_info("Skipping reset check for DSP domain clock \"%s\"\n",
591 "clock \"%s\"\n", clk->name); 591 clk->name);
592 return; 592 return;
593 } 593 }
594 594
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c
index c007d80dfb62..9b45f4b0ee22 100644
--- a/arch/arm/mach-omap1/clock_data.c
+++ b/arch/arm/mach-omap1/clock_data.c
@@ -25,7 +25,6 @@
25#include <plat/clock.h> 25#include <plat/clock.h>
26#include <plat/cpu.h> 26#include <plat/cpu.h>
27#include <plat/clkdev_omap.h> 27#include <plat/clkdev_omap.h>
28#include <plat/board.h>
29#include <plat/sram.h> /* for omap_sram_reprogram_clock() */ 28#include <plat/sram.h> /* for omap_sram_reprogram_clock() */
30 29
31#include <mach/hardware.h> 30#include <mach/hardware.h>
@@ -776,11 +775,10 @@ static struct clk_functions omap1_clk_functions = {
776 775
777static void __init omap1_show_rates(void) 776static void __init omap1_show_rates(void)
778{ 777{
779 pr_notice("Clocking rate (xtal/DPLL1/MPU): " 778 pr_notice("Clocking rate (xtal/DPLL1/MPU): %ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n",
780 "%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n", 779 ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10,
781 ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10, 780 ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
782 ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, 781 arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
783 arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
784} 782}
785 783
786u32 cpu_mask; 784u32 cpu_mask;
@@ -788,7 +786,6 @@ u32 cpu_mask;
788int __init omap1_clk_init(void) 786int __init omap1_clk_init(void)
789{ 787{
790 struct omap_clk *c; 788 struct omap_clk *c;
791 const struct omap_clock_config *info;
792 int crystal_type = 0; /* Default 12 MHz */ 789 int crystal_type = 0; /* Default 12 MHz */
793 u32 reg; 790 u32 reg;
794 791
@@ -837,19 +834,13 @@ int __init omap1_clk_init(void)
837 ck_dpll1_p = clk_get(NULL, "ck_dpll1"); 834 ck_dpll1_p = clk_get(NULL, "ck_dpll1");
838 ck_ref_p = clk_get(NULL, "ck_ref"); 835 ck_ref_p = clk_get(NULL, "ck_ref");
839 836
840 info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
841 if (info != NULL) {
842 if (!cpu_is_omap15xx())
843 crystal_type = info->system_clock_type;
844 }
845
846 if (cpu_is_omap7xx()) 837 if (cpu_is_omap7xx())
847 ck_ref.rate = 13000000; 838 ck_ref.rate = 13000000;
848 if (cpu_is_omap16xx() && crystal_type == 2) 839 if (cpu_is_omap16xx() && crystal_type == 2)
849 ck_ref.rate = 19200000; 840 ck_ref.rate = 19200000;
850 841
851 pr_info("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: " 842 pr_info("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n",
852 "0x%04x\n", omap_readw(ARM_SYSST), omap_readw(DPLL_CTL), 843 omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
853 omap_readw(ARM_CKCTL)); 844 omap_readw(ARM_CKCTL));
854 845
855 /* We want to be in syncronous scalable mode */ 846 /* We want to be in syncronous scalable mode */
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index fa1fa4deb6aa..7a5a3285e965 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -20,12 +20,11 @@
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21 21
22#include <plat/tc.h> 22#include <plat/tc.h>
23#include <plat/board.h>
24#include <plat/mux.h> 23#include <plat/mux.h>
25#include <plat/dma.h> 24#include <plat/dma.h>
26#include <plat/mmc.h> 25#include <plat/mmc.h>
27#include <plat/omap7xx.h>
28 26
27#include <mach/omap7xx.h>
29#include <mach/camera.h> 28#include <mach/camera.h>
30#include <mach/hardware.h> 29#include <mach/hardware.h>
31 30
@@ -358,6 +357,33 @@ static inline void omap_init_uwire(void) {}
358#endif 357#endif
359 358
360 359
360#define OMAP1_RNG_BASE 0xfffe5000
361
362static struct resource omap1_rng_resources[] = {
363 {
364 .start = OMAP1_RNG_BASE,
365 .end = OMAP1_RNG_BASE + 0x4f,
366 .flags = IORESOURCE_MEM,
367 },
368};
369
370static struct platform_device omap1_rng_device = {
371 .name = "omap_rng",
372 .id = -1,
373 .num_resources = ARRAY_SIZE(omap1_rng_resources),
374 .resource = omap1_rng_resources,
375};
376
377static void omap1_init_rng(void)
378{
379 if (!cpu_is_omap16xx())
380 return;
381
382 (void) platform_device_register(&omap1_rng_device);
383}
384
385/*-------------------------------------------------------------------------*/
386
361/* 387/*
362 * This gets called after board-specific INIT_MACHINE, and initializes most 388 * This gets called after board-specific INIT_MACHINE, and initializes most
363 * on-chip peripherals accessible on this board (except for few like USB): 389 * on-chip peripherals accessible on this board (except for few like USB):
@@ -396,6 +422,7 @@ static int __init omap1_init_devices(void)
396 omap_init_spi100k(); 422 omap_init_spi100k();
397 omap_init_sti(); 423 omap_init_sti();
398 omap_init_uwire(); 424 omap_init_uwire();
425 omap1_init_rng();
399 426
400 return 0; 427 return 0;
401} 428}
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index 3ef7d52316b4..29007fef84cd 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -27,7 +27,8 @@
27 27
28#include <plat/dma.h> 28#include <plat/dma.h>
29#include <plat/tc.h> 29#include <plat/tc.h>
30#include <plat/irqs.h> 30
31#include <mach/irqs.h>
31 32
32#define OMAP1_DMA_BASE (0xfffed800) 33#define OMAP1_DMA_BASE (0xfffed800)
33#define OMAP1_LOGICAL_DMA_CH_COUNT 17 34#define OMAP1_LOGICAL_DMA_CH_COUNT 17
@@ -330,8 +331,9 @@ static int __init omap1_system_dma_init(void)
330 d->chan = kzalloc(sizeof(struct omap_dma_lch) * 331 d->chan = kzalloc(sizeof(struct omap_dma_lch) *
331 (d->lch_count), GFP_KERNEL); 332 (d->lch_count), GFP_KERNEL);
332 if (!d->chan) { 333 if (!d->chan) {
333 dev_err(&pdev->dev, "%s: Memory allocation failed" 334 dev_err(&pdev->dev,
334 "for d->chan!!!\n", __func__); 335 "%s: Memory allocation failed for d->chan!\n",
336 __func__);
335 goto exit_release_d; 337 goto exit_release_d;
336 } 338 }
337 339
diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c
index ebef15e5e7b7..98e6f39224a4 100644
--- a/arch/arm/mach-omap1/gpio15xx.c
+++ b/arch/arm/mach-omap1/gpio15xx.c
@@ -17,6 +17,7 @@
17 */ 17 */
18 18
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/platform_data/gpio-omap.h>
20 21
21#define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE 22#define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE
22#define OMAP1510_GPIO_BASE 0xFFFCE000 23#define OMAP1510_GPIO_BASE 0xFFFCE000
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c
index 2a48cd2e1754..33f419236b17 100644
--- a/arch/arm/mach-omap1/gpio16xx.c
+++ b/arch/arm/mach-omap1/gpio16xx.c
@@ -17,6 +17,7 @@
17 */ 17 */
18 18
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/platform_data/gpio-omap.h>
20 21
21#define OMAP1610_GPIO1_BASE 0xfffbe400 22#define OMAP1610_GPIO1_BASE 0xfffbe400
22#define OMAP1610_GPIO2_BASE 0xfffbec00 23#define OMAP1610_GPIO2_BASE 0xfffbec00
diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c
index acf12b73eace..958ce9acee95 100644
--- a/arch/arm/mach-omap1/gpio7xx.c
+++ b/arch/arm/mach-omap1/gpio7xx.c
@@ -17,6 +17,7 @@
17 */ 17 */
18 18
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/platform_data/gpio-omap.h>
20 21
21#define OMAP7XX_GPIO1_BASE 0xfffbc000 22#define OMAP7XX_GPIO1_BASE 0xfffbc000
22#define OMAP7XX_GPIO2_BASE 0xfffbc800 23#define OMAP7XX_GPIO2_BASE 0xfffbc800
diff --git a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h
index 23eed0035ed8..adb5e7649659 100644
--- a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h
+++ b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h
@@ -14,8 +14,6 @@
14#ifndef __AMS_DELTA_FIQ_H 14#ifndef __AMS_DELTA_FIQ_H
15#define __AMS_DELTA_FIQ_H 15#define __AMS_DELTA_FIQ_H
16 16
17#include <plat/irqs.h>
18
19/* 17/*
20 * Interrupt number used for passing control from FIQ to IRQ. 18 * Interrupt number used for passing control from FIQ to IRQ.
21 * IRQ12, described as reserved, has been selected. 19 * IRQ12, described as reserved, has been selected.
diff --git a/arch/arm/mach-omap1/include/mach/gpio.h b/arch/arm/mach-omap1/include/mach/gpio.h
index e737706a8fe1..ebf86c0f4f46 100644
--- a/arch/arm/mach-omap1/include/mach/gpio.h
+++ b/arch/arm/mach-omap1/include/mach/gpio.h
@@ -1,5 +1,3 @@
1/* 1/*
2 * arch/arm/mach-omap1/include/mach/gpio.h 2 * arch/arm/mach-omap1/include/mach/gpio.h
3 */ 3 */
4
5#include <plat/gpio.h>
diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h
index 01e35fa106b8..84248d250adb 100644
--- a/arch/arm/mach-omap1/include/mach/hardware.h
+++ b/arch/arm/mach-omap1/include/mach/hardware.h
@@ -1,11 +1,46 @@
1/* 1/*
2 * arch/arm/mach-omap1/include/mach/hardware.h 2 * arch/arm/mach-omap1/include/mach/hardware.h
3 *
4 * Hardware definitions for TI OMAP processors and boards
5 *
6 * NOTE: Please put device driver specific defines into a separate header
7 * file for each driver.
8 *
9 * Copyright (C) 2001 RidgeRun, Inc.
10 * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com>
11 *
12 * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com>
13 * and Dirk Behme <dirk.behme@de.bosch.com>
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 *
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
23 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * You should have received a copy of the GNU General Public License along
32 * with this program; if not, write to the Free Software Foundation, Inc.,
33 * 675 Mass Ave, Cambridge, MA 02139, USA.
3 */ 34 */
4 35
5#ifndef __MACH_HARDWARE_H 36#ifndef __ASM_ARCH_OMAP_HARDWARE_H
6#define __MACH_HARDWARE_H 37#define __ASM_ARCH_OMAP_HARDWARE_H
7 38
39#include <asm/sizes.h>
8#ifndef __ASSEMBLER__ 40#ifndef __ASSEMBLER__
41#include <asm/types.h>
42#include <plat/cpu.h>
43
9/* 44/*
10 * NOTE: Please use ioremap + __raw_read/write where possible instead of these 45 * NOTE: Please use ioremap + __raw_read/write where possible instead of these
11 */ 46 */
@@ -35,7 +70,249 @@ static inline u32 omap_cs3_phys(void)
35 ? 0 : OMAP_CS3_PHYS; 70 ? 0 : OMAP_CS3_PHYS;
36} 71}
37 72
73#endif /* ifndef __ASSEMBLER__ */
74
75#include <plat/serial.h>
76
77/*
78 * ---------------------------------------------------------------------------
79 * Common definitions for all OMAP processors
80 * NOTE: Put all processor or board specific parts to the special header
81 * files.
82 * ---------------------------------------------------------------------------
83 */
84
85/*
86 * ----------------------------------------------------------------------------
87 * Timers
88 * ----------------------------------------------------------------------------
89 */
90#define OMAP_MPU_TIMER1_BASE (0xfffec500)
91#define OMAP_MPU_TIMER2_BASE (0xfffec600)
92#define OMAP_MPU_TIMER3_BASE (0xfffec700)
93#define MPU_TIMER_FREE (1 << 6)
94#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
95#define MPU_TIMER_AR (1 << 1)
96#define MPU_TIMER_ST (1 << 0)
97
98/*
99 * ----------------------------------------------------------------------------
100 * Clocks
101 * ----------------------------------------------------------------------------
102 */
103#define CLKGEN_REG_BASE (0xfffece00)
104#define ARM_CKCTL (CLKGEN_REG_BASE + 0x0)
105#define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4)
106#define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8)
107#define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC)
108#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
109#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
110#define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
111#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
112
113#define CK_RATEF 1
114#define CK_IDLEF 2
115#define CK_ENABLEF 4
116#define CK_SELECTF 8
117#define SETARM_IDLE_SHIFT
118
119/* DPLL control registers */
120#define DPLL_CTL (0xfffecf00)
121
122/* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
123#define DSP_CONFIG_REG_BASE IOMEM(0xe1008000)
124#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
125#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
126#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
127#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
128
129/*
130 * ---------------------------------------------------------------------------
131 * UPLD
132 * ---------------------------------------------------------------------------
133 */
134#define ULPD_REG_BASE (0xfffe0800)
135#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
136#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
137#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
138# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
139# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
140#define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34)
141# define SOFT_UDC_REQ (1 << 4)
142# define SOFT_USB_CLK_REQ (1 << 3)
143# define SOFT_DPLL_REQ (1 << 0)
144#define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c)
145#define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40)
146#define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c)
147#define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50)
148#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68)
149# define DIS_MMC2_DPLL_REQ (1 << 11)
150# define DIS_MMC1_DPLL_REQ (1 << 10)
151# define DIS_UART3_DPLL_REQ (1 << 9)
152# define DIS_UART2_DPLL_REQ (1 << 8)
153# define DIS_UART1_DPLL_REQ (1 << 7)
154# define DIS_USB_HOST_DPLL_REQ (1 << 6)
155#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74)
156#define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c)
157
158/*
159 * ---------------------------------------------------------------------------
160 * Watchdog timer
161 * ---------------------------------------------------------------------------
162 */
163
164/* Watchdog timer within the OMAP3.2 gigacell */
165#define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
166#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
167#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
168#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
169#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
170
171/*
172 * ---------------------------------------------------------------------------
173 * Interrupts
174 * ---------------------------------------------------------------------------
175 */
176#ifdef CONFIG_ARCH_OMAP1
177
178/*
179 * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
180 * or something similar.. -- PFM.
181 */
182
183#define OMAP_IH1_BASE 0xfffecb00
184#define OMAP_IH2_BASE 0xfffe0000
185
186#define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00)
187#define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04)
188#define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10)
189#define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14)
190#define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18)
191#define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c)
192#define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c)
193
194#define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00)
195#define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04)
196#define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10)
197#define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14)
198#define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18)
199#define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c)
200#define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c)
201
202#define IRQ_ITR_REG_OFFSET 0x00
203#define IRQ_MIR_REG_OFFSET 0x04
204#define IRQ_SIR_IRQ_REG_OFFSET 0x10
205#define IRQ_SIR_FIQ_REG_OFFSET 0x14
206#define IRQ_CONTROL_REG_OFFSET 0x18
207#define IRQ_ISR_REG_OFFSET 0x9c
208#define IRQ_ILR0_REG_OFFSET 0x1c
209#define IRQ_GMR_REG_OFFSET 0xa0
210
38#endif 211#endif
39#endif
40 212
41#include <plat/hardware.h> 213/*
214 * ----------------------------------------------------------------------------
215 * System control registers
216 * ----------------------------------------------------------------------------
217 */
218#define MOD_CONF_CTRL_0 0xfffe1080
219#define MOD_CONF_CTRL_1 0xfffe1110
220
221/*
222 * ----------------------------------------------------------------------------
223 * Pin multiplexing registers
224 * ----------------------------------------------------------------------------
225 */
226#define FUNC_MUX_CTRL_0 0xfffe1000
227#define FUNC_MUX_CTRL_1 0xfffe1004
228#define FUNC_MUX_CTRL_2 0xfffe1008
229#define COMP_MODE_CTRL_0 0xfffe100c
230#define FUNC_MUX_CTRL_3 0xfffe1010
231#define FUNC_MUX_CTRL_4 0xfffe1014
232#define FUNC_MUX_CTRL_5 0xfffe1018
233#define FUNC_MUX_CTRL_6 0xfffe101C
234#define FUNC_MUX_CTRL_7 0xfffe1020
235#define FUNC_MUX_CTRL_8 0xfffe1024
236#define FUNC_MUX_CTRL_9 0xfffe1028
237#define FUNC_MUX_CTRL_A 0xfffe102C
238#define FUNC_MUX_CTRL_B 0xfffe1030
239#define FUNC_MUX_CTRL_C 0xfffe1034
240#define FUNC_MUX_CTRL_D 0xfffe1038
241#define PULL_DWN_CTRL_0 0xfffe1040
242#define PULL_DWN_CTRL_1 0xfffe1044
243#define PULL_DWN_CTRL_2 0xfffe1048
244#define PULL_DWN_CTRL_3 0xfffe104c
245#define PULL_DWN_CTRL_4 0xfffe10ac
246
247/* OMAP-1610 specific multiplexing registers */
248#define FUNC_MUX_CTRL_E 0xfffe1090
249#define FUNC_MUX_CTRL_F 0xfffe1094
250#define FUNC_MUX_CTRL_10 0xfffe1098
251#define FUNC_MUX_CTRL_11 0xfffe109c
252#define FUNC_MUX_CTRL_12 0xfffe10a0
253#define PU_PD_SEL_0 0xfffe10b4
254#define PU_PD_SEL_1 0xfffe10b8
255#define PU_PD_SEL_2 0xfffe10bc
256#define PU_PD_SEL_3 0xfffe10c0
257#define PU_PD_SEL_4 0xfffe10c4
258
259/* Timer32K for 1610 and 1710*/
260#define OMAP_TIMER32K_BASE 0xFFFBC400
261
262/*
263 * ---------------------------------------------------------------------------
264 * TIPB bus interface
265 * ---------------------------------------------------------------------------
266 */
267#define TIPB_PUBLIC_CNTL_BASE 0xfffed300
268#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
269#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
270#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
271
272/*
273 * ----------------------------------------------------------------------------
274 * MPUI interface
275 * ----------------------------------------------------------------------------
276 */
277#define MPUI_BASE (0xfffec900)
278#define MPUI_CTRL (MPUI_BASE + 0x0)
279#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
280#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
281#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
282#define MPUI_STATUS_REG (MPUI_BASE + 0x10)
283#define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
284#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
285#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
286
287/*
288 * ----------------------------------------------------------------------------
289 * LED Pulse Generator
290 * ----------------------------------------------------------------------------
291 */
292#define OMAP_LPG1_BASE 0xfffbd000
293#define OMAP_LPG2_BASE 0xfffbd800
294#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
295#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
296#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
297#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
298
299/*
300 * ----------------------------------------------------------------------------
301 * Pulse-Width Light
302 * ----------------------------------------------------------------------------
303 */
304#define OMAP_PWL_BASE 0xfffb5800
305#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
306#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
307
308/*
309 * ---------------------------------------------------------------------------
310 * Processor specific defines
311 * ---------------------------------------------------------------------------
312 */
313
314#include "omap7xx.h"
315#include "omap1510.h"
316#include "omap16xx.h"
317
318#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/arch/arm/mach-omap1/include/mach/irqs.h b/arch/arm/mach-omap1/include/mach/irqs.h
index 9292fdc1cb0b..729992d7d26a 100644
--- a/arch/arm/mach-omap1/include/mach/irqs.h
+++ b/arch/arm/mach-omap1/include/mach/irqs.h
@@ -1,5 +1,268 @@
1/* 1/*
2 * arch/arm/mach-omap1/include/mach/irqs.h 2 * arch/arm/plat-omap/include/mach/irqs.h
3 *
4 * Copyright (C) Greg Lonnon 2001
5 * Updated for OMAP-1610 by Tony Lindgren <tony@atomide.com>
6 *
7 * Copyright (C) 2009 Texas Instruments
8 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * NOTE: The interrupt vectors for the OMAP-1509, OMAP-1510, and OMAP-1610
25 * are different.
3 */ 26 */
4 27
5#include <plat/irqs.h> 28#ifndef __ASM_ARCH_OMAP15XX_IRQS_H
29#define __ASM_ARCH_OMAP15XX_IRQS_H
30
31/*
32 * IRQ numbers for interrupt handler 1
33 *
34 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
35 *
36 */
37#define INT_CAMERA 1
38#define INT_FIQ 3
39#define INT_RTDX 6
40#define INT_DSP_MMU_ABORT 7
41#define INT_HOST 8
42#define INT_ABORT 9
43#define INT_BRIDGE_PRIV 13
44#define INT_GPIO_BANK1 14
45#define INT_UART3 15
46#define INT_TIMER3 16
47#define INT_DMA_CH0_6 19
48#define INT_DMA_CH1_7 20
49#define INT_DMA_CH2_8 21
50#define INT_DMA_CH3 22
51#define INT_DMA_CH4 23
52#define INT_DMA_CH5 24
53#define INT_TIMER1 26
54#define INT_WD_TIMER 27
55#define INT_BRIDGE_PUB 28
56#define INT_TIMER2 30
57#define INT_LCD_CTRL 31
58
59/*
60 * OMAP-1510 specific IRQ numbers for interrupt handler 1
61 */
62#define INT_1510_IH2_IRQ 0
63#define INT_1510_RES2 2
64#define INT_1510_SPI_TX 4
65#define INT_1510_SPI_RX 5
66#define INT_1510_DSP_MAILBOX1 10
67#define INT_1510_DSP_MAILBOX2 11
68#define INT_1510_RES12 12
69#define INT_1510_LB_MMU 17
70#define INT_1510_RES18 18
71#define INT_1510_LOCAL_BUS 29
72
73/*
74 * OMAP-1610 specific IRQ numbers for interrupt handler 1
75 */
76#define INT_1610_IH2_IRQ INT_1510_IH2_IRQ
77#define INT_1610_IH2_FIQ 2
78#define INT_1610_McBSP2_TX 4
79#define INT_1610_McBSP2_RX 5
80#define INT_1610_DSP_MAILBOX1 10
81#define INT_1610_DSP_MAILBOX2 11
82#define INT_1610_LCD_LINE 12
83#define INT_1610_GPTIMER1 17
84#define INT_1610_GPTIMER2 18
85#define INT_1610_SSR_FIFO_0 29
86
87/*
88 * OMAP-7xx specific IRQ numbers for interrupt handler 1
89 */
90#define INT_7XX_IH2_FIQ 0
91#define INT_7XX_IH2_IRQ 1
92#define INT_7XX_USB_NON_ISO 2
93#define INT_7XX_USB_ISO 3
94#define INT_7XX_ICR 4
95#define INT_7XX_EAC 5
96#define INT_7XX_GPIO_BANK1 6
97#define INT_7XX_GPIO_BANK2 7
98#define INT_7XX_GPIO_BANK3 8
99#define INT_7XX_McBSP2TX 10
100#define INT_7XX_McBSP2RX 11
101#define INT_7XX_McBSP2RX_OVF 12
102#define INT_7XX_LCD_LINE 14
103#define INT_7XX_GSM_PROTECT 15
104#define INT_7XX_TIMER3 16
105#define INT_7XX_GPIO_BANK5 17
106#define INT_7XX_GPIO_BANK6 18
107#define INT_7XX_SPGIO_WR 29
108
109/*
110 * IRQ numbers for interrupt handler 2
111 *
112 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
113 */
114#define IH2_BASE 32
115
116#define INT_KEYBOARD (1 + IH2_BASE)
117#define INT_uWireTX (2 + IH2_BASE)
118#define INT_uWireRX (3 + IH2_BASE)
119#define INT_I2C (4 + IH2_BASE)
120#define INT_MPUIO (5 + IH2_BASE)
121#define INT_USB_HHC_1 (6 + IH2_BASE)
122#define INT_McBSP3TX (10 + IH2_BASE)
123#define INT_McBSP3RX (11 + IH2_BASE)
124#define INT_McBSP1TX (12 + IH2_BASE)
125#define INT_McBSP1RX (13 + IH2_BASE)
126#define INT_UART1 (14 + IH2_BASE)
127#define INT_UART2 (15 + IH2_BASE)
128#define INT_BT_MCSI1TX (16 + IH2_BASE)
129#define INT_BT_MCSI1RX (17 + IH2_BASE)
130#define INT_SOSSI_MATCH (19 + IH2_BASE)
131#define INT_USB_W2FC (20 + IH2_BASE)
132#define INT_1WIRE (21 + IH2_BASE)
133#define INT_OS_TIMER (22 + IH2_BASE)
134#define INT_MMC (23 + IH2_BASE)
135#define INT_GAUGE_32K (24 + IH2_BASE)
136#define INT_RTC_TIMER (25 + IH2_BASE)
137#define INT_RTC_ALARM (26 + IH2_BASE)
138#define INT_MEM_STICK (27 + IH2_BASE)
139
140/*
141 * OMAP-1510 specific IRQ numbers for interrupt handler 2
142 */
143#define INT_1510_DSP_MMU (28 + IH2_BASE)
144#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
145
146/*
147 * OMAP-1610 specific IRQ numbers for interrupt handler 2
148 */
149#define INT_1610_FAC (0 + IH2_BASE)
150#define INT_1610_USB_HHC_2 (7 + IH2_BASE)
151#define INT_1610_USB_OTG (8 + IH2_BASE)
152#define INT_1610_SoSSI (9 + IH2_BASE)
153#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
154#define INT_1610_DSP_MMU (28 + IH2_BASE)
155#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
156#define INT_1610_STI (32 + IH2_BASE)
157#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
158#define INT_1610_GPTIMER3 (34 + IH2_BASE)
159#define INT_1610_GPTIMER4 (35 + IH2_BASE)
160#define INT_1610_GPTIMER5 (36 + IH2_BASE)
161#define INT_1610_GPTIMER6 (37 + IH2_BASE)
162#define INT_1610_GPTIMER7 (38 + IH2_BASE)
163#define INT_1610_GPTIMER8 (39 + IH2_BASE)
164#define INT_1610_GPIO_BANK2 (40 + IH2_BASE)
165#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
166#define INT_1610_MMC2 (42 + IH2_BASE)
167#define INT_1610_CF (43 + IH2_BASE)
168#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
169#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
170#define INT_1610_SPI (49 + IH2_BASE)
171#define INT_1610_DMA_CH6 (53 + IH2_BASE)
172#define INT_1610_DMA_CH7 (54 + IH2_BASE)
173#define INT_1610_DMA_CH8 (55 + IH2_BASE)
174#define INT_1610_DMA_CH9 (56 + IH2_BASE)
175#define INT_1610_DMA_CH10 (57 + IH2_BASE)
176#define INT_1610_DMA_CH11 (58 + IH2_BASE)
177#define INT_1610_DMA_CH12 (59 + IH2_BASE)
178#define INT_1610_DMA_CH13 (60 + IH2_BASE)
179#define INT_1610_DMA_CH14 (61 + IH2_BASE)
180#define INT_1610_DMA_CH15 (62 + IH2_BASE)
181#define INT_1610_NAND (63 + IH2_BASE)
182#define INT_1610_SHA1MD5 (91 + IH2_BASE)
183
184/*
185 * OMAP-7xx specific IRQ numbers for interrupt handler 2
186 */
187#define INT_7XX_HW_ERRORS (0 + IH2_BASE)
188#define INT_7XX_NFIQ_PWR_FAIL (1 + IH2_BASE)
189#define INT_7XX_CFCD (2 + IH2_BASE)
190#define INT_7XX_CFIREQ (3 + IH2_BASE)
191#define INT_7XX_I2C (4 + IH2_BASE)
192#define INT_7XX_PCC (5 + IH2_BASE)
193#define INT_7XX_MPU_EXT_NIRQ (6 + IH2_BASE)
194#define INT_7XX_SPI_100K_1 (7 + IH2_BASE)
195#define INT_7XX_SYREN_SPI (8 + IH2_BASE)
196#define INT_7XX_VLYNQ (9 + IH2_BASE)
197#define INT_7XX_GPIO_BANK4 (10 + IH2_BASE)
198#define INT_7XX_McBSP1TX (11 + IH2_BASE)
199#define INT_7XX_McBSP1RX (12 + IH2_BASE)
200#define INT_7XX_McBSP1RX_OF (13 + IH2_BASE)
201#define INT_7XX_UART_MODEM_IRDA_2 (14 + IH2_BASE)
202#define INT_7XX_UART_MODEM_1 (15 + IH2_BASE)
203#define INT_7XX_MCSI (16 + IH2_BASE)
204#define INT_7XX_uWireTX (17 + IH2_BASE)
205#define INT_7XX_uWireRX (18 + IH2_BASE)
206#define INT_7XX_SMC_CD (19 + IH2_BASE)
207#define INT_7XX_SMC_IREQ (20 + IH2_BASE)
208#define INT_7XX_HDQ_1WIRE (21 + IH2_BASE)
209#define INT_7XX_TIMER32K (22 + IH2_BASE)
210#define INT_7XX_MMC_SDIO (23 + IH2_BASE)
211#define INT_7XX_UPLD (24 + IH2_BASE)
212#define INT_7XX_USB_HHC_1 (27 + IH2_BASE)
213#define INT_7XX_USB_HHC_2 (28 + IH2_BASE)
214#define INT_7XX_USB_GENI (29 + IH2_BASE)
215#define INT_7XX_USB_OTG (30 + IH2_BASE)
216#define INT_7XX_CAMERA_IF (31 + IH2_BASE)
217#define INT_7XX_RNG (32 + IH2_BASE)
218#define INT_7XX_DUAL_MODE_TIMER (33 + IH2_BASE)
219#define INT_7XX_DBB_RF_EN (34 + IH2_BASE)
220#define INT_7XX_MPUIO_KEYPAD (35 + IH2_BASE)
221#define INT_7XX_SHA1_MD5 (36 + IH2_BASE)
222#define INT_7XX_SPI_100K_2 (37 + IH2_BASE)
223#define INT_7XX_RNG_IDLE (38 + IH2_BASE)
224#define INT_7XX_MPUIO (39 + IH2_BASE)
225#define INT_7XX_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE)
226#define INT_7XX_LLPC_OE_FALLING (41 + IH2_BASE)
227#define INT_7XX_LLPC_OE_RISING (42 + IH2_BASE)
228#define INT_7XX_LLPC_VSYNC (43 + IH2_BASE)
229#define INT_7XX_WAKE_UP_REQ (46 + IH2_BASE)
230#define INT_7XX_DMA_CH6 (53 + IH2_BASE)
231#define INT_7XX_DMA_CH7 (54 + IH2_BASE)
232#define INT_7XX_DMA_CH8 (55 + IH2_BASE)
233#define INT_7XX_DMA_CH9 (56 + IH2_BASE)
234#define INT_7XX_DMA_CH10 (57 + IH2_BASE)
235#define INT_7XX_DMA_CH11 (58 + IH2_BASE)
236#define INT_7XX_DMA_CH12 (59 + IH2_BASE)
237#define INT_7XX_DMA_CH13 (60 + IH2_BASE)
238#define INT_7XX_DMA_CH14 (61 + IH2_BASE)
239#define INT_7XX_DMA_CH15 (62 + IH2_BASE)
240#define INT_7XX_NAND (63 + IH2_BASE)
241
242/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730/850) and
243 * 16 MPUIO lines */
244#define OMAP_MAX_GPIO_LINES 192
245#define IH_GPIO_BASE (128 + IH2_BASE)
246#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
247#define OMAP_IRQ_END (IH_MPUIO_BASE + 16)
248
249/* External FPGA handles interrupts on Innovator boards */
250#define OMAP_FPGA_IRQ_BASE (OMAP_IRQ_END)
251#ifdef CONFIG_MACH_OMAP_INNOVATOR
252#define OMAP_FPGA_NR_IRQS 24
253#else
254#define OMAP_FPGA_NR_IRQS 0
255#endif
256#define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS)
257
258#define NR_IRQS OMAP_FPGA_IRQ_END
259
260#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
261
262#include <mach/hardware.h>
263
264#ifdef CONFIG_FIQ
265#define FIQ_START 1024
266#endif
267
268#endif
diff --git a/arch/arm/plat-omap/include/plat/omap1510.h b/arch/arm/mach-omap1/include/mach/omap1510.h
index d24004668138..8fe05d6137c0 100644
--- a/arch/arm/plat-omap/include/plat/omap1510.h
+++ b/arch/arm/mach-omap1/include/mach/omap1510.h
@@ -1,5 +1,4 @@
1/* arch/arm/plat-omap/include/mach/omap1510.h 1/*
2 *
3 * Hardware definitions for TI OMAP1510 processor. 2 * Hardware definitions for TI OMAP1510 processor.
4 * 3 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com> 4 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
diff --git a/arch/arm/plat-omap/include/plat/omap16xx.h b/arch/arm/mach-omap1/include/mach/omap16xx.h
index e69e1d857b45..cd1c724869c7 100644
--- a/arch/arm/plat-omap/include/plat/omap16xx.h
+++ b/arch/arm/mach-omap1/include/mach/omap16xx.h
@@ -1,5 +1,4 @@
1/* arch/arm/plat-omap/include/mach/omap16xx.h 1/*
2 *
3 * Hardware definitions for TI OMAP1610/5912/1710 processors. 2 * Hardware definitions for TI OMAP1610/5912/1710 processors.
4 * 3 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com> 4 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
diff --git a/arch/arm/plat-omap/include/plat/omap7xx.h b/arch/arm/mach-omap1/include/mach/omap7xx.h
index 48e4757e1e30..63da994bc609 100644
--- a/arch/arm/plat-omap/include/plat/omap7xx.h
+++ b/arch/arm/mach-omap1/include/mach/omap7xx.h
@@ -1,5 +1,4 @@
1/* arch/arm/plat-omap/include/mach/omap7xx.h 1/*
2 *
3 * Hardware definitions for TI OMAP7XX processor. 2 * Hardware definitions for TI OMAP7XX processor.
4 * 3 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com> 4 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 5769c71815b2..ed42628611bc 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -113,8 +113,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror);
113void omap_set_lcd_dma_b1_vxres(unsigned long vxres) 113void omap_set_lcd_dma_b1_vxres(unsigned long vxres)
114{ 114{
115 if (cpu_is_omap15xx()) { 115 if (cpu_is_omap15xx()) {
116 printk(KERN_ERR "DMA virtual resolution is not supported " 116 pr_err("DMA virtual resolution is not supported in 1510 mode\n");
117 "in 1510 mode\n");
118 BUG(); 117 BUG();
119 } 118 }
120 lcd_dma.vxres = vxres; 119 lcd_dma.vxres = vxres;
@@ -437,8 +436,7 @@ static int __init omap_init_lcd_dma(void)
437 r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, 436 r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0,
438 "LCD DMA", NULL); 437 "LCD DMA", NULL);
439 if (r != 0) 438 if (r != 0)
440 printk(KERN_ERR "unable to request IRQ for LCD DMA " 439 pr_err("unable to request IRQ for LCD DMA (error %d)\n", r);
441 "(error %d)\n", r);
442 440
443 return r; 441 return r;
444} 442}
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c
index f6b14a14a957..6f958aec9459 100644
--- a/arch/arm/mach-omap1/leds-h2p2-debug.c
+++ b/arch/arm/mach-omap1/leds-h2p2-debug.c
@@ -14,6 +14,7 @@
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/platform_data/gpio-omap.h>
17 18
18#include <mach/hardware.h> 19#include <mach/hardware.h>
19#include <asm/leds.h> 20#include <asm/leds.h>
@@ -68,11 +69,13 @@ void h2p2_dbg_leds_event(led_event_t evt)
68 gpio_set_value(GPIO_IDLE, 0); 69 gpio_set_value(GPIO_IDLE, 0);
69 } 70 }
70 71
71 __raw_writew(~0, &fpga->leds);
72 led_state &= ~LED_STATE_ENABLED; 72 led_state &= ~LED_STATE_ENABLED;
73 if (evt == led_halted) { 73 if (fpga) {
74 iounmap(fpga); 74 __raw_writew(~0, &fpga->leds);
75 fpga = NULL; 75 if (evt == led_halted) {
76 iounmap(fpga);
77 fpga = NULL;
78 }
76 } 79 }
77 80
78 goto done; 81 goto done;
@@ -158,7 +161,7 @@ void h2p2_dbg_leds_event(led_event_t evt)
158 /* 161 /*
159 * Actually burn the LEDs 162 * Actually burn the LEDs
160 */ 163 */
161 if (led_state & LED_STATE_ENABLED) 164 if (led_state & LED_STATE_ENABLED && fpga)
162 __raw_writew(~hw_led_state, &fpga->leds); 165 __raw_writew(~hw_led_state, &fpga->leds);
163 166
164done: 167done:
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c
index ae6dd93b8ddc..7b1a3833165d 100644
--- a/arch/arm/mach-omap1/leds.c
+++ b/arch/arm/mach-omap1/leds.c
@@ -6,6 +6,7 @@
6#include <linux/gpio.h> 6#include <linux/gpio.h>
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/init.h> 8#include <linux/init.h>
9#include <linux/platform_data/gpio-omap.h>
9 10
10#include <asm/leds.h> 11#include <asm/leds.h>
11#include <asm/mach-types.h> 12#include <asm/mach-types.h>
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 6809c9e56c93..0d1709b1a6fe 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -22,7 +22,6 @@
22 22
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24 24
25#include <plat/board.h>
26#include <plat/mux.h> 25#include <plat/mux.h>
27#include <plat/fpga.h> 26#include <plat/fpga.h>
28 27
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index aa81593db1af..cdeb9d3ef640 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -141,7 +141,7 @@ static int __init omap1_dm_timer_init(void)
141 141
142 pdata->set_timer_src = omap1_dm_timer_set_src; 142 pdata->set_timer_src = omap1_dm_timer_set_src;
143 pdata->timer_capability = OMAP_TIMER_ALWON | 143 pdata->timer_capability = OMAP_TIMER_ALWON |
144 OMAP_TIMER_NEEDS_RESET; 144 OMAP_TIMER_NEEDS_RESET | OMAP_TIMER_HAS_DSP_IRQ;
145 145
146 ret = platform_device_add_data(pdev, pdata, sizeof(*pdata)); 146 ret = platform_device_add_data(pdev, pdata, sizeof(*pdata));
147 if (ret) { 147 if (ret) {
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 34c2c7f59f0a..0deb30072977 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -194,10 +194,12 @@ obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o
194obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o 194obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o
195obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_interconnect_data.o 195obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_interconnect_data.o
196obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o 196obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o
197obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_data.o
197obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o 198obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o
198 199
199# EMU peripherals 200# EMU peripherals
200obj-$(CONFIG_OMAP3_EMU) += emu.o 201obj-$(CONFIG_OMAP3_EMU) += emu.o
202obj-$(CONFIG_HW_PERF_EVENTS) += pmu.o
201 203
202# L3 interconnect 204# L3 interconnect
203obj-$(CONFIG_ARCH_OMAP3) += omap_l3_smx.o 205obj-$(CONFIG_ARCH_OMAP3) += omap_l3_smx.o
diff --git a/arch/arm/plat-omap/include/plat/am33xx.h b/arch/arm/mach-omap2/am33xx.h
index 06c19bb7bca6..06c19bb7bca6 100644
--- a/arch/arm/plat-omap/include/plat/am33xx.h
+++ b/arch/arm/mach-omap2/am33xx.h
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 9511584fdc4f..0900eac57d56 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -33,7 +33,6 @@
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>
@@ -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..5453173ff57b 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -25,13 +25,11 @@
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/mmc/host.h> 26#include <linux/mmc/host.h>
27 27
28#include <mach/hardware.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 30#include <asm/mach/map.h>
32 31
33#include <plat/mcspi.h> 32#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>
@@ -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..8518b1345988 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -17,7 +17,6 @@
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>
21#include <plat/gpmc-smc91x.h> 20#include <plat/gpmc-smc91x.h>
22#include <plat/usb.h> 21#include <plat/usb.h>
23 22
@@ -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..db43e22526c0 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -28,13 +28,11 @@
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>
@@ -45,6 +43,7 @@
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,6 @@ 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,
548}; 546};
549 547
550static struct twl4030_platform_data sdp4430_twldata = { 548static struct twl4030_platform_data sdp4430_twldata = {
@@ -581,7 +579,7 @@ static int __init omap4_i2c_init(void)
581 TWL_COMMON_REGULATOR_V1V8 | 579 TWL_COMMON_REGULATOR_V1V8 |
582 TWL_COMMON_REGULATOR_V2V1); 580 TWL_COMMON_REGULATOR_V2V1);
583 omap4_pmic_init("twl6030", &sdp4430_twldata, 581 omap4_pmic_init("twl6030", &sdp4430_twldata,
584 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 582 &twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
585 omap_register_i2c_bus(2, 400, NULL, 0); 583 omap_register_i2c_bus(2, 400, NULL, 0);
586 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, 584 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
587 ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); 585 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..403d048a00ee 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 <mach/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..cea3abace815 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
@@ -204,7 +202,7 @@ static inline void __init apollon_init_smc91x(void)
204 return; 202 return;
205 } 203 }
206 204
207 clk_enable(gpmc_fck); 205 clk_prepare_enable(gpmc_fck);
208 rate = clk_get_rate(gpmc_fck); 206 rate = clk_get_rate(gpmc_fck);
209 207
210 eth_cs = APOLLON_ETH_CS; 208 eth_cs = APOLLON_ETH_CS;
@@ -248,7 +246,7 @@ static inline void __init apollon_init_smc91x(void)
248 gpmc_cs_free(APOLLON_ETH_CS); 246 gpmc_cs_free(APOLLON_ETH_CS);
249 } 247 }
250out: 248out:
251 clk_disable(gpmc_fck); 249 clk_disable_unprepare(gpmc_fck);
252 clk_put(gpmc_fck); 250 clk_put(gpmc_fck);
253} 251}
254 252
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 97d719047af3..34cb90471d96 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,7 +38,6 @@
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 <plat/nand.h>
43#include <plat/gpmc.h> 43#include <plat/gpmc.h>
@@ -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..27a5450751ed 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -38,7 +38,6 @@
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 <plat/nand.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..18b63ad56274 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -32,15 +32,12 @@
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
36#include <mach/hardware.h>
37#include <mach/id.h> 35#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 <plat/nand.h>
@@ -56,7 +53,6 @@
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..9017813f9abc 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 <plat/nand.h>
23#include <plat/onenand.h> 23#include <plat/onenand.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..313b3f426a56 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 <plat/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
@@ -266,9 +265,9 @@ static inline void __init h4_init_debug(void)
266 return; 265 return;
267 } 266 }
268 267
269 clk_enable(gpmc_fck); 268 clk_prepare_enable(gpmc_fck);
270 rate = clk_get_rate(gpmc_fck); 269 rate = clk_get_rate(gpmc_fck);
271 clk_disable(gpmc_fck); 270 clk_disable_unprepare(gpmc_fck);
272 clk_put(gpmc_fck); 271 clk_put(gpmc_fck);
273 272
274 if (is_gpmc_muxed()) 273 if (is_gpmc_muxed())
@@ -312,7 +311,7 @@ static inline void __init h4_init_debug(void)
312 gpmc_cs_free(eth_cs); 311 gpmc_cs_free(eth_cs);
313 312
314out: 313out:
315 clk_disable(gpmc_fck); 314 clk_disable_unprepare(gpmc_fck);
316 clk_put(gpmc_fck); 315 clk_put(gpmc_fck);
317} 316}
318 317
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 28214483aaba..8408bb2748a6 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -29,10 +29,10 @@
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 <plat/onenand.h>
@@ -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..3f3a552b1036 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -29,18 +29,14 @@
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30#include <linux/mmc/host.h> 30#include <linux/mmc/host.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/map.h> 34#include <asm/mach/map.h>
36 35
37#include <plat/mcspi.h> 36#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 <plat/gpmc-smsc911x.h>
46 42
@@ -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..4b43fe311571 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -25,14 +25,11 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28#include <plat/board.h>
29#include "common.h" 28#include "common.h"
30#include <plat/menelaus.h> 29#include <plat/menelaus.h>
31#include <mach/irqs.h>
32#include <plat/mcspi.h> 30#include <plat/mcspi.h>
33#include <plat/onenand.h> 31#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..801bcb4c5e22 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -33,13 +33,11 @@
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>
@@ -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 0d362e9f9cb9..b94873d0c6b6 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -40,12 +40,10 @@
40#include <linux/mmc/host.h> 40#include <linux/mmc/host.h>
41#include <linux/export.h> 41#include <linux/export.h>
42 42
43#include <mach/hardware.h>
44#include <asm/mach-types.h> 43#include <asm/mach-types.h>
45#include <asm/mach/arch.h> 44#include <asm/mach/arch.h>
46#include <asm/mach/map.h> 45#include <asm/mach/map.h>
47 46
48#include <plat/board.h>
49#include <plat/usb.h> 47#include <plat/usb.h>
50#include <plat/nand.h> 48#include <plat/nand.h>
51#include "common.h" 49#include "common.h"
@@ -75,6 +73,18 @@
75#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64 73#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64
76#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7 74#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7
77 75
76/*
77 * OMAP35x EVM revision
78 * Run time detection of EVM revision is done by reading Ethernet
79 * PHY ID -
80 * GEN_1 = 0x01150000
81 * GEN_2 = 0x92200000
82 */
83enum {
84 OMAP3EVM_BOARD_GEN_1 = 0, /* EVM Rev between A - D */
85 OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */
86};
87
78static u8 omap3_evm_version; 88static u8 omap3_evm_version;
79 89
80u8 get_omap3_evm_rev(void) 90u8 get_omap3_evm_rev(void)
@@ -377,9 +387,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
377} 387}
378 388
379static struct twl4030_gpio_platform_data omap3evm_gpio_data = { 389static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
380 .gpio_base = OMAP_MAX_GPIO_LINES,
381 .irq_base = TWL4030_GPIO_IRQ_BASE,
382 .irq_end = TWL4030_GPIO_IRQ_END,
383 .use_leds = true, 390 .use_leds = true,
384 .setup = omap3evm_twl_gpio_setup, 391 .setup = omap3evm_twl_gpio_setup,
385}; 392};
@@ -526,9 +533,6 @@ static int __init omap3_evm_i2c_init(void)
526 return 0; 533 return 0;
527} 534}
528 535
529static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
530};
531
532static struct usbhs_omap_board_data usbhs_bdata __initdata = { 536static struct usbhs_omap_board_data usbhs_bdata __initdata = {
533 537
534 .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, 538 .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
@@ -688,9 +692,6 @@ static void __init omap3_evm_init(void)
688 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux; 692 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
689 omap3_mux_init(obm, OMAP_PACKAGE_CBB); 693 omap3_mux_init(obm, OMAP_PACKAGE_CBB);
690 694
691 omap_board_config = omap3_evm_config;
692 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
693
694 omap_mux_init_gpio(63, OMAP_PIN_INPUT); 695 omap_mux_init_gpio(63, OMAP_PIN_INPUT);
695 omap_hsmmc_init(mmc); 696 omap_hsmmc_init(mmc);
696 697
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index fca93d1afd43..b5e56fa83c19 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
38#include "mux.h"
39#include "hsmmc.h"
40#include "control.h"
41#include "common-board-devices.h"
42
43#include <plat/mux.h>
44#include <plat/board.h>
45#include "common.h"
46#include <plat/gpmc-smsc911x.h> 37#include <plat/gpmc-smsc911x.h>
47#include <plat/gpmc.h> 38#include <plat/gpmc.h>
48#include <plat/sdrc.h> 39#include <plat/sdrc.h>
49#include <plat/usb.h> 40#include <plat/usb.h>
50 41
42#include "common.h"
43#include "mux.h"
44#include "hsmmc.h"
45#include "control.h"
46#include "common-board-devices.h"
47
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..e700a98feba6 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -40,9 +40,7 @@
40#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41#include <asm/mach/map.h> 41#include <asm/mach/map.h>
42 42
43#include <plat/board.h>
44#include "common.h" 43#include "common.h"
45#include <mach/hardware.h>
46#include <plat/mcspi.h> 44#include <plat/mcspi.h>
47#include <plat/usb.h> 45#include <plat/usb.h>
48#include <video/omapdss.h> 46#include <video/omapdss.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..b8756f0d2a08 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -28,14 +28,17 @@
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 <plat/nand.h>
@@ -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..0e2f838e4009 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -37,14 +37,12 @@
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 <plat/nand.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..8ae2c599dd7f 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"
@@ -172,7 +171,7 @@ static void __init omap4_ehci_init(void)
172 return; 171 return;
173 } 172 }
174 clk_set_rate(phy_ref_clk, 19200000); 173 clk_set_rate(phy_ref_clk, 19200000);
175 clk_enable(phy_ref_clk); 174 clk_prepare_enable(phy_ref_clk);
176 175
177 /* disable the power to the usb hub prior to init and reset phy+hub */ 176 /* disable the power to the usb hub prior to init and reset phy+hub */
178 ret = gpio_request_array(panda_ehci_gpios, 177 ret = gpio_request_array(panda_ehci_gpios,
@@ -263,7 +262,6 @@ 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,
267}; 265};
268 266
269/* Panda board uses the common PMIC configuration */ 267/* Panda board uses the common PMIC configuration */
@@ -294,7 +292,7 @@ static int __init omap4_panda_i2c_init(void)
294 TWL_COMMON_REGULATOR_V1V8 | 292 TWL_COMMON_REGULATOR_V1V8 |
295 TWL_COMMON_REGULATOR_V2V1); 293 TWL_COMMON_REGULATOR_V2V1);
296 omap4_pmic_init("twl6030", &omap4_panda_twldata, 294 omap4_pmic_init("twl6030", &omap4_panda_twldata,
297 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 295 &twl6040_data, 119 + OMAP44XX_IRQ_GIC_START);
298 omap_register_i2c_bus(2, 400, NULL, 0); 296 omap_register_i2c_bus(2, 400, NULL, 0);
299 /* 297 /*
300 * Bus 3 is attached to the DVI port where devices like the pico DLP 298 * 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..13c101c2c643 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -42,16 +42,13 @@
42#include <asm/mach/flash.h> 42#include <asm/mach/flash.h>
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44 44
45#include <plat/board.h>
46#include "common.h" 45#include "common.h"
47#include <video/omapdss.h> 46#include <video/omapdss.h>
48#include <video/omap-panel-generic-dpi.h> 47#include <video/omap-panel-generic-dpi.h>
49#include <video/omap-panel-tfp410.h> 48#include <video/omap-panel-tfp410.h>
50#include <plat/gpmc.h> 49#include <plat/gpmc.h>
51#include <mach/hardware.h>
52#include <plat/nand.h> 50#include <plat/nand.h>
53#include <plat/mcspi.h> 51#include <plat/mcspi.h>
54#include <plat/mux.h>
55#include <plat/usb.h> 52#include <plat/usb.h>
56 53
57#include "mux.h" 54#include "mux.h"
@@ -399,9 +396,6 @@ static int overo_twl_gpio_setup(struct device *dev,
399} 396}
400 397
401static struct twl4030_gpio_platform_data overo_gpio_data = { 398static 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, 399 .use_leds = true,
406 .setup = overo_twl_gpio_setup, 400 .setup = overo_twl_gpio_setup,
407}; 401};
@@ -522,8 +516,7 @@ static void __init overo_init(void)
522 udelay(10); 516 udelay(10);
523 gpio_set_value(OVERO_GPIO_W2W_NRESET, 1); 517 gpio_set_value(OVERO_GPIO_W2W_NRESET, 1);
524 } else { 518 } else {
525 printk(KERN_ERR "could not obtain gpio for " 519 pr_err("could not obtain gpio for OVERO_GPIO_W2W_NRESET\n");
526 "OVERO_GPIO_W2W_NRESET\n");
527 } 520 }
528 521
529 ret = gpio_request_array(overo_bt_gpios, ARRAY_SIZE(overo_bt_gpios)); 522 ret = gpio_request_array(overo_bt_gpios, ARRAY_SIZE(overo_bt_gpios));
@@ -542,8 +535,7 @@ static void __init overo_init(void)
542 if (ret == 0) 535 if (ret == 0)
543 gpio_export(OVERO_GPIO_USBH_CPEN, 0); 536 gpio_export(OVERO_GPIO_USBH_CPEN, 0);
544 else 537 else
545 printk(KERN_ERR "could not obtain gpio for " 538 pr_err("could not obtain gpio for OVERO_GPIO_USBH_CPEN\n");
546 "OVERO_GPIO_USBH_CPEN\n");
547} 539}
548 540
549MACHINE_START(OVERO, "Gumstix Overo") 541MACHINE_START(OVERO, "Gumstix Overo")
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0ad1bb3bdb98..00773a32524a 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -27,6 +27,7 @@
27#include <plat/gpmc.h> 27#include <plat/gpmc.h>
28#include "common.h" 28#include "common.h"
29#include <plat/onenand.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..456049055daa 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -28,7 +28,6 @@
28#include <asm/system_info.h> 28#include <asm/system_info.h>
29 29
30#include <plat/mcspi.h> 30#include <plat/mcspi.h>
31#include <plat/board.h>
32#include "common.h" 31#include "common.h"
33#include <plat/dma.h> 32#include <plat/dma.h>
34#include <plat/gpmc.h> 33#include <plat/gpmc.h>
@@ -774,9 +773,6 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
774} 773}
775 774
776static struct twl4030_gpio_platform_data rx51_gpio_data = { 775static 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) 776 .pulldowns = BIT(0) | BIT(1) | BIT(2) | BIT(3)
781 | BIT(4) | BIT(5) 777 | BIT(4) | BIT(5)
782 | BIT(8) | BIT(9) | BIT(10) | BIT(11) 778 | BIT(8) | BIT(9) | BIT(10) | BIT(11)
@@ -1051,7 +1047,7 @@ static int __init rx51_i2c_init(void)
1051 rx51_twldata.vdac->constraints.apply_uV = true; 1047 rx51_twldata.vdac->constraints.apply_uV = true;
1052 rx51_twldata.vdac->constraints.name = "VDAC"; 1048 rx51_twldata.vdac->constraints.name = "VDAC";
1053 1049
1054 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); 1050 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, 1051 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
1056 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); 1052 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
1057#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) 1053#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 345dd931f76f..93b466150002 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -18,13 +18,11 @@
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/leds.h> 19#include <linux/leds.h>
20 20
21#include <mach/hardware.h>
22#include <asm/mach-types.h> 21#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 23#include <asm/mach/map.h>
25 24
26#include <plat/mcspi.h> 25#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/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..0d8d91917d10 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -22,6 +22,9 @@
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..ea79bc299baf 100644
--- a/arch/arm/mach-omap2/board-zoom-display.c
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -18,6 +18,8 @@
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_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c
index b19a1f7234ae..c2d15212d64d 100644
--- a/arch/arm/mach-omap2/clkt2xxx_apll.c
+++ b/arch/arm/mach-omap2/clkt2xxx_apll.c
@@ -59,7 +59,7 @@ static int omap2_clk_apll_enable(struct clk *clk, u32 status_mask)
59 omap2_cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); 59 omap2_cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
60 60
61 omap2_cm_wait_idlest(cm_idlest_pll, status_mask, 61 omap2_cm_wait_idlest(cm_idlest_pll, status_mask,
62 OMAP24XX_CM_IDLEST_VAL, clk->name); 62 OMAP24XX_CM_IDLEST_VAL, __clk_get_name(clk));
63 63
64 /* 64 /*
65 * REVISIT: Should we return an error code if omap2_wait_clock_ready() 65 * REVISIT: Should we return an error code if omap2_wait_clock_ready()
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
index 3d9d746b221a..3524f0e7b6d5 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"
@@ -68,14 +68,15 @@ unsigned long omap2_table_mpu_recalc(struct clk *clk)
68long omap2_round_to_table_rate(struct clk *clk, unsigned long rate) 68long omap2_round_to_table_rate(struct clk *clk, unsigned long rate)
69{ 69{
70 const struct prcm_config *ptr; 70 const struct prcm_config *ptr;
71 long highest_rate; 71 long highest_rate, sys_clk_rate;
72 72
73 highest_rate = -EINVAL; 73 highest_rate = -EINVAL;
74 sys_clk_rate = __clk_get_rate(sclk);
74 75
75 for (ptr = rate_table; ptr->mpu_speed; ptr++) { 76 for (ptr = rate_table; ptr->mpu_speed; ptr++) {
76 if (!(ptr->flags & cpu_mask)) 77 if (!(ptr->flags & cpu_mask))
77 continue; 78 continue;
78 if (ptr->xtal_speed != sclk->rate) 79 if (ptr->xtal_speed != sys_clk_rate)
79 continue; 80 continue;
80 81
81 highest_rate = ptr->mpu_speed; 82 highest_rate = ptr->mpu_speed;
@@ -94,12 +95,15 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)
94 const struct prcm_config *prcm; 95 const struct prcm_config *prcm;
95 unsigned long found_speed = 0; 96 unsigned long found_speed = 0;
96 unsigned long flags; 97 unsigned long flags;
98 long sys_clk_rate;
99
100 sys_clk_rate = __clk_get_rate(sclk);
97 101
98 for (prcm = rate_table; prcm->mpu_speed; prcm++) { 102 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
99 if (!(prcm->flags & cpu_mask)) 103 if (!(prcm->flags & cpu_mask))
100 continue; 104 continue;
101 105
102 if (prcm->xtal_speed != sclk->rate) 106 if (prcm->xtal_speed != sys_clk_rate)
103 continue; 107 continue;
104 108
105 if (prcm->mpu_speed <= rate) { 109 if (prcm->mpu_speed <= rate) {
diff --git a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c
index d6e34dd9e7e7..7c6da2f731dc 100644
--- a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c
+++ b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c
@@ -56,6 +56,7 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
56 struct omap_sdrc_params *sdrc_cs0; 56 struct omap_sdrc_params *sdrc_cs0;
57 struct omap_sdrc_params *sdrc_cs1; 57 struct omap_sdrc_params *sdrc_cs1;
58 int ret; 58 int ret;
59 unsigned long clkrate;
59 60
60 if (!clk || !rate) 61 if (!clk || !rate)
61 return -EINVAL; 62 return -EINVAL;
@@ -64,11 +65,12 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
64 if (validrate != rate) 65 if (validrate != rate)
65 return -EINVAL; 66 return -EINVAL;
66 67
67 sdrcrate = sdrc_ick_p->rate; 68 sdrcrate = __clk_get_rate(sdrc_ick_p);
68 if (rate > clk->rate) 69 clkrate = __clk_get_rate(clk);
69 sdrcrate <<= ((rate / clk->rate) >> 1); 70 if (rate > clkrate)
71 sdrcrate <<= ((rate / clkrate) >> 1);
70 else 72 else
71 sdrcrate >>= ((clk->rate / rate) >> 1); 73 sdrcrate >>= ((clkrate / rate) >> 1);
72 74
73 ret = omap2_sdrc_get_params(sdrcrate, &sdrc_cs0, &sdrc_cs1); 75 ret = omap2_sdrc_get_params(sdrcrate, &sdrc_cs0, &sdrc_cs1);
74 if (ret) 76 if (ret)
@@ -82,7 +84,7 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
82 /* 84 /*
83 * XXX This only needs to be done when the CPU frequency changes 85 * XXX This only needs to be done when the CPU frequency changes
84 */ 86 */
85 _mpurate = arm_fck_p->rate / CYCLES_PER_MHZ; 87 _mpurate = __clk_get_rate(arm_fck_p) / CYCLES_PER_MHZ;
86 c = (_mpurate << SDRC_MPURATE_SCALE) >> SDRC_MPURATE_BASE_SHIFT; 88 c = (_mpurate << SDRC_MPURATE_SCALE) >> SDRC_MPURATE_BASE_SHIFT;
87 c += 1; /* for safety */ 89 c += 1; /* for safety */
88 c *= SDRC_MPURATE_LOOPS; 90 c *= SDRC_MPURATE_LOOPS;
@@ -90,28 +92,26 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
90 if (c == 0) 92 if (c == 0)
91 c = 1; 93 c = 1;
92 94
93 pr_debug("clock: changing CORE DPLL rate from %lu to %lu\n", clk->rate, 95 pr_debug("clock: changing CORE DPLL rate from %lu to %lu\n",
94 validrate); 96 clkrate, validrate);
95 pr_debug("clock: SDRC CS0 timing params used:" 97 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, 98 sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla,
98 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr); 99 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr);
99 if (sdrc_cs1) 100 if (sdrc_cs1)
100 pr_debug("clock: SDRC CS1 timing params used: " 101 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", 102 sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla,
102 sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla, 103 sdrc_cs1->actim_ctrlb, sdrc_cs1->mr);
103 sdrc_cs1->actim_ctrlb, sdrc_cs1->mr);
104 104
105 if (sdrc_cs1) 105 if (sdrc_cs1)
106 omap3_configure_core_dpll( 106 omap3_configure_core_dpll(
107 new_div, unlock_dll, c, rate > clk->rate, 107 new_div, unlock_dll, c, rate > clkrate,
108 sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, 108 sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla,
109 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr, 109 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr,
110 sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla, 110 sdrc_cs1->rfr_ctrl, sdrc_cs1->actim_ctrla,
111 sdrc_cs1->actim_ctrlb, sdrc_cs1->mr); 111 sdrc_cs1->actim_ctrlb, sdrc_cs1->mr);
112 else 112 else
113 omap3_configure_core_dpll( 113 omap3_configure_core_dpll(
114 new_div, unlock_dll, c, rate > clk->rate, 114 new_div, unlock_dll, c, rate > clkrate,
115 sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla, 115 sdrc_cs0->rfr_ctrl, sdrc_cs0->actim_ctrla,
116 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr, 116 sdrc_cs0->actim_ctrlb, sdrc_cs0->mr,
117 0, 0, 0, 0); 117 0, 0, 0, 0);
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
index 04d551b1f7f7..eaed3900a83c 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_get_name(clk), __clk_get_name(src_clk));
76 return NULL; 76 return NULL;
77 } 77 }
78 78
@@ -126,8 +126,9 @@ 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_get_name(clk),
131 __clk_get_name(__clk_get_parent(src_clk)));
131 return 0; 132 return 0;
132 } 133 }
133 134
@@ -176,8 +177,10 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 field_val)
176{ 177{
177 const struct clksel *clks; 178 const struct clksel *clks;
178 const struct clksel_rate *clkr; 179 const struct clksel_rate *clkr;
180 struct clk *parent;
179 181
180 clks = _get_clksel_by_parent(clk, clk->parent); 182 parent = __clk_get_parent(clk);
183 clks = _get_clksel_by_parent(clk, parent);
181 if (!clks) 184 if (!clks)
182 return 0; 185 return 0;
183 186
@@ -191,8 +194,8 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 field_val)
191 194
192 if (!clkr->div) { 195 if (!clkr->div) {
193 /* This indicates a data error */ 196 /* This indicates a data error */
194 WARN(1, "clock: Could not find fieldval %d for clock %s parent " 197 WARN(1, "clock: %s: could not find fieldval %d for parent %s\n",
195 "%s\n", field_val, clk->name, clk->parent->name); 198 __clk_get_name(clk), field_val, __clk_get_name(parent));
196 return 0; 199 return 0;
197 } 200 }
198 201
@@ -213,11 +216,13 @@ static u32 _divisor_to_clksel(struct clk *clk, u32 div)
213{ 216{
214 const struct clksel *clks; 217 const struct clksel *clks;
215 const struct clksel_rate *clkr; 218 const struct clksel_rate *clkr;
219 struct clk *parent;
216 220
217 /* should never happen */ 221 /* should never happen */
218 WARN_ON(div == 0); 222 WARN_ON(div == 0);
219 223
220 clks = _get_clksel_by_parent(clk, clk->parent); 224 parent = __clk_get_parent(clk);
225 clks = _get_clksel_by_parent(clk, parent);
221 if (!clks) 226 if (!clks)
222 return ~0; 227 return ~0;
223 228
@@ -230,8 +235,8 @@ static u32 _divisor_to_clksel(struct clk *clk, u32 div)
230 } 235 }
231 236
232 if (!clkr->div) { 237 if (!clkr->div) {
233 pr_err("clock: Could not find divisor %d for clock %s parent " 238 pr_err("clock: %s: could not find divisor %d for parent %s\n",
234 "%s\n", div, clk->name, clk->parent->name); 239 __clk_get_name(clk), div, __clk_get_name(parent));
235 return ~0; 240 return ~0;
236 } 241 }
237 242
@@ -281,16 +286,23 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
281 const struct clksel *clks; 286 const struct clksel *clks;
282 const struct clksel_rate *clkr; 287 const struct clksel_rate *clkr;
283 u32 last_div = 0; 288 u32 last_div = 0;
289 struct clk *parent;
290 unsigned long parent_rate;
291 const char *clk_name;
292
293 parent = __clk_get_parent(clk);
294 parent_rate = __clk_get_rate(parent);
295 clk_name = __clk_get_name(clk);
284 296
285 if (!clk->clksel || !clk->clksel_mask) 297 if (!clk->clksel || !clk->clksel_mask)
286 return ~0; 298 return ~0;
287 299
288 pr_debug("clock: clksel_round_rate_div: %s target_rate %ld\n", 300 pr_debug("clock: clksel_round_rate_div: %s target_rate %ld\n",
289 clk->name, target_rate); 301 clk_name, target_rate);
290 302
291 *new_div = 1; 303 *new_div = 1;
292 304
293 clks = _get_clksel_by_parent(clk, clk->parent); 305 clks = _get_clksel_by_parent(clk, parent);
294 if (!clks) 306 if (!clks)
295 return ~0; 307 return ~0;
296 308
@@ -300,30 +312,29 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
300 312
301 /* Sanity check */ 313 /* Sanity check */
302 if (clkr->div <= last_div) 314 if (clkr->div <= last_div)
303 pr_err("clock: clksel_rate table not sorted " 315 pr_err("clock: %s: clksel_rate table not sorted\n",
304 "for clock %s", clk->name); 316 clk_name);
305 317
306 last_div = clkr->div; 318 last_div = clkr->div;
307 319
308 test_rate = clk->parent->rate / clkr->div; 320 test_rate = parent_rate / clkr->div;
309 321
310 if (test_rate <= target_rate) 322 if (test_rate <= target_rate)
311 break; /* found it */ 323 break; /* found it */
312 } 324 }
313 325
314 if (!clkr->div) { 326 if (!clkr->div) {
315 pr_err("clock: Could not find divisor for target " 327 pr_err("clock: %s: could not find divisor for target rate %ld for parent %s\n",
316 "rate %ld for clock %s parent %s\n", target_rate, 328 clk_name, target_rate, __clk_get_name(parent));
317 clk->name, clk->parent->name);
318 return ~0; 329 return ~0;
319 } 330 }
320 331
321 *new_div = clkr->div; 332 *new_div = clkr->div;
322 333
323 pr_debug("clock: new_div = %d, new_rate = %ld\n", *new_div, 334 pr_debug("clock: new_div = %d, new_rate = %ld\n", *new_div,
324 (clk->parent->rate / clkr->div)); 335 (parent_rate / clkr->div));
325 336
326 return clk->parent->rate / clkr->div; 337 return parent_rate / clkr->div;
327} 338}
328 339
329/* 340/*
@@ -345,10 +356,15 @@ void omap2_init_clksel_parent(struct clk *clk)
345 const struct clksel *clks; 356 const struct clksel *clks;
346 const struct clksel_rate *clkr; 357 const struct clksel_rate *clkr;
347 u32 r, found = 0; 358 u32 r, found = 0;
359 struct clk *parent;
360 const char *clk_name;
348 361
349 if (!clk->clksel || !clk->clksel_mask) 362 if (!clk->clksel || !clk->clksel_mask)
350 return; 363 return;
351 364
365 parent = __clk_get_parent(clk);
366 clk_name = __clk_get_name(clk);
367
352 r = __raw_readl(clk->clksel_reg) & clk->clksel_mask; 368 r = __raw_readl(clk->clksel_reg) & clk->clksel_mask;
353 r >>= __ffs(clk->clksel_mask); 369 r >>= __ffs(clk->clksel_mask);
354 370
@@ -358,12 +374,13 @@ void omap2_init_clksel_parent(struct clk *clk)
358 continue; 374 continue;
359 375
360 if (clkr->val == r) { 376 if (clkr->val == r) {
361 if (clk->parent != clks->parent) { 377 if (parent != clks->parent) {
362 pr_debug("clock: inited %s parent " 378 pr_debug("clock: %s: inited parent to %s (was %s)\n",
363 "to %s (was %s)\n", 379 clk_name,
364 clk->name, clks->parent->name, 380 __clk_get_name(clks->parent),
365 ((clk->parent) ? 381 ((parent) ?
366 clk->parent->name : "NULL")); 382 __clk_get_name(parent) :
383 "NULL"));
367 clk_reparent(clk, clks->parent); 384 clk_reparent(clk, clks->parent);
368 }; 385 };
369 found = 1; 386 found = 1;
@@ -373,7 +390,7 @@ void omap2_init_clksel_parent(struct clk *clk)
373 390
374 /* This indicates a data error */ 391 /* This indicates a data error */
375 WARN(!found, "clock: %s: init parent: could not find regval %0x\n", 392 WARN(!found, "clock: %s: init parent: could not find regval %0x\n",
376 clk->name, r); 393 clk_name, r);
377 394
378 return; 395 return;
379} 396}
@@ -391,15 +408,17 @@ unsigned long omap2_clksel_recalc(struct clk *clk)
391{ 408{
392 unsigned long rate; 409 unsigned long rate;
393 u32 div = 0; 410 u32 div = 0;
411 struct clk *parent;
394 412
395 div = _read_divisor(clk); 413 div = _read_divisor(clk);
396 if (div == 0) 414 if (div == 0)
397 return clk->rate; 415 return __clk_get_rate(clk);
398 416
399 rate = clk->parent->rate / div; 417 parent = __clk_get_parent(clk);
418 rate = __clk_get_rate(parent) / div;
400 419
401 pr_debug("clock: %s: recalc'd rate is %ld (div %d)\n", clk->name, 420 pr_debug("clock: %s: recalc'd rate is %ld (div %d)\n",
402 rate, div); 421 __clk_get_name(clk), rate, div);
403 422
404 return rate; 423 return rate;
405} 424}
@@ -454,9 +473,10 @@ int omap2_clksel_set_rate(struct clk *clk, unsigned long rate)
454 473
455 _write_clksel_reg(clk, field_val); 474 _write_clksel_reg(clk, field_val);
456 475
457 clk->rate = clk->parent->rate / new_div; 476 clk->rate = __clk_get_rate(__clk_get_parent(clk)) / new_div;
458 477
459 pr_debug("clock: %s: set rate to %ld\n", clk->name, clk->rate); 478 pr_debug("clock: %s: set rate to %ld\n", __clk_get_name(clk),
479 __clk_get_rate(clk));
460 480
461 return 0; 481 return 0;
462} 482}
@@ -498,13 +518,15 @@ int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent)
498 clk_reparent(clk, new_parent); 518 clk_reparent(clk, new_parent);
499 519
500 /* CLKSEL clocks follow their parents' rates, divided by a divisor */ 520 /* CLKSEL clocks follow their parents' rates, divided by a divisor */
501 clk->rate = new_parent->rate; 521 clk->rate = __clk_get_rate(new_parent);
502 522
503 if (parent_div > 0) 523 if (parent_div > 0)
504 clk->rate /= parent_div; 524 __clk_get_rate(clk) /= parent_div;
505 525
506 pr_debug("clock: %s: set parent to %s (new rate %ld)\n", 526 pr_debug("clock: %s: set parent to %s (new rate %ld)\n",
507 clk->name, clk->parent->name, clk->rate); 527 __clk_get_name(clk),
528 __clk_get_name(__clk_get_parent(clk)),
529 __clk_get_rate(clk));
508 530
509 return 0; 531 return 0;
510} 532}
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c
index cd7fd0f91149..80411142f482 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"
@@ -87,7 +87,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n)
87 dd = clk->dpll_data; 87 dd = clk->dpll_data;
88 88
89 /* DPLL divider must result in a valid jitter correction val */ 89 /* DPLL divider must result in a valid jitter correction val */
90 fint = clk->parent->rate / n; 90 fint = __clk_get_rate(__clk_get_parent(clk)) / n;
91 91
92 if (cpu_is_omap24xx()) { 92 if (cpu_is_omap24xx()) {
93 /* Should not be called for OMAP2, so warn if it is called */ 93 /* Should not be called for OMAP2, so warn if it is called */
@@ -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 &&
@@ -211,7 +211,7 @@ void omap2_init_dpll_parent(struct clk *clk)
211 if (v == OMAP3XXX_EN_DPLL_LPBYPASS || 211 if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
212 v == OMAP3XXX_EN_DPLL_FRBYPASS) 212 v == OMAP3XXX_EN_DPLL_FRBYPASS)
213 clk_reparent(clk, dd->clk_bypass); 213 clk_reparent(clk, dd->clk_bypass);
214 } else if (cpu_is_omap44xx()) { 214 } else if (soc_is_am33xx() || cpu_is_omap44xx()) {
215 if (v == OMAP4XXX_EN_DPLL_LPBYPASS || 215 if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
216 v == OMAP4XXX_EN_DPLL_FRBYPASS || 216 v == OMAP4XXX_EN_DPLL_FRBYPASS ||
217 v == OMAP4XXX_EN_DPLL_MNBYPASS) 217 v == OMAP4XXX_EN_DPLL_MNBYPASS)
@@ -252,16 +252,16 @@ u32 omap2_get_dpll_rate(struct clk *clk)
252 if (cpu_is_omap24xx()) { 252 if (cpu_is_omap24xx()) {
253 if (v == OMAP2XXX_EN_DPLL_LPBYPASS || 253 if (v == OMAP2XXX_EN_DPLL_LPBYPASS ||
254 v == OMAP2XXX_EN_DPLL_FRBYPASS) 254 v == OMAP2XXX_EN_DPLL_FRBYPASS)
255 return dd->clk_bypass->rate; 255 return __clk_get_rate(dd->clk_bypass);
256 } else if (cpu_is_omap34xx()) { 256 } else if (cpu_is_omap34xx()) {
257 if (v == OMAP3XXX_EN_DPLL_LPBYPASS || 257 if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
258 v == OMAP3XXX_EN_DPLL_FRBYPASS) 258 v == OMAP3XXX_EN_DPLL_FRBYPASS)
259 return dd->clk_bypass->rate; 259 return __clk_get_rate(dd->clk_bypass);
260 } else if (cpu_is_omap44xx()) { 260 } else if (soc_is_am33xx() || cpu_is_omap44xx()) {
261 if (v == OMAP4XXX_EN_DPLL_LPBYPASS || 261 if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
262 v == OMAP4XXX_EN_DPLL_FRBYPASS || 262 v == OMAP4XXX_EN_DPLL_FRBYPASS ||
263 v == OMAP4XXX_EN_DPLL_MNBYPASS) 263 v == OMAP4XXX_EN_DPLL_MNBYPASS)
264 return dd->clk_bypass->rate; 264 return __clk_get_rate(dd->clk_bypass);
265 } 265 }
266 266
267 v = __raw_readl(dd->mult_div1_reg); 267 v = __raw_readl(dd->mult_div1_reg);
@@ -270,7 +270,7 @@ u32 omap2_get_dpll_rate(struct clk *clk)
270 dpll_div = v & dd->div1_mask; 270 dpll_div = v & dd->div1_mask;
271 dpll_div >>= __ffs(dd->div1_mask); 271 dpll_div >>= __ffs(dd->div1_mask);
272 272
273 dpll_clk = (long long)dd->clk_ref->rate * dpll_mult; 273 dpll_clk = (long long) __clk_get_rate(dd->clk_ref) * dpll_mult;
274 do_div(dpll_clk, dpll_div + 1); 274 do_div(dpll_clk, dpll_div + 1);
275 275
276 return dpll_clk; 276 return dpll_clk;
@@ -296,16 +296,20 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
296 unsigned long scaled_rt_rp; 296 unsigned long scaled_rt_rp;
297 unsigned long new_rate = 0; 297 unsigned long new_rate = 0;
298 struct dpll_data *dd; 298 struct dpll_data *dd;
299 unsigned long ref_rate;
300 const char *clk_name;
299 301
300 if (!clk || !clk->dpll_data) 302 if (!clk || !clk->dpll_data)
301 return ~0; 303 return ~0;
302 304
303 dd = clk->dpll_data; 305 dd = clk->dpll_data;
304 306
307 ref_rate = __clk_get_rate(dd->clk_ref);
308 clk_name = __clk_get_name(clk);
305 pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n", 309 pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n",
306 clk->name, target_rate); 310 clk_name, target_rate);
307 311
308 scaled_rt_rp = target_rate / (dd->clk_ref->rate / DPLL_SCALE_FACTOR); 312 scaled_rt_rp = target_rate / (ref_rate / DPLL_SCALE_FACTOR);
309 scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR; 313 scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR;
310 314
311 dd->last_rounded_rate = 0; 315 dd->last_rounded_rate = 0;
@@ -332,14 +336,14 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
332 break; 336 break;
333 337
334 r = _dpll_test_mult(&m, n, &new_rate, target_rate, 338 r = _dpll_test_mult(&m, n, &new_rate, target_rate,
335 dd->clk_ref->rate); 339 ref_rate);
336 340
337 /* m can't be set low enough for this n - try with a larger n */ 341 /* m can't be set low enough for this n - try with a larger n */
338 if (r == DPLL_MULT_UNDERFLOW) 342 if (r == DPLL_MULT_UNDERFLOW)
339 continue; 343 continue;
340 344
341 pr_debug("clock: %s: m = %d: n = %d: new_rate = %ld\n", 345 pr_debug("clock: %s: m = %d: n = %d: new_rate = %ld\n",
342 clk->name, m, n, new_rate); 346 clk_name, m, n, new_rate);
343 347
344 if (target_rate == new_rate) { 348 if (target_rate == new_rate) {
345 dd->last_rounded_m = m; 349 dd->last_rounded_m = m;
@@ -350,8 +354,8 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
350 } 354 }
351 355
352 if (target_rate != new_rate) { 356 if (target_rate != new_rate) {
353 pr_debug("clock: %s: cannot round to rate %ld\n", clk->name, 357 pr_debug("clock: %s: cannot round to rate %ld\n",
354 target_rate); 358 clk_name, target_rate);
355 return ~0; 359 return ~0;
356 } 360 }
357 361
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index ea3f565ba1a4..961ac8f7e13d 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"
@@ -76,7 +78,7 @@ static void _omap2_module_wait_ready(struct clk *clk)
76 clk->ops->find_idlest(clk, &idlest_reg, &idlest_bit, &idlest_val); 78 clk->ops->find_idlest(clk, &idlest_reg, &idlest_bit, &idlest_val);
77 79
78 omap2_cm_wait_idlest(idlest_reg, (1 << idlest_bit), idlest_val, 80 omap2_cm_wait_idlest(idlest_reg, (1 << idlest_bit), idlest_val,
79 clk->name); 81 __clk_get_name(clk));
80} 82}
81 83
82/* Public functions */ 84/* Public functions */
@@ -92,18 +94,21 @@ static void _omap2_module_wait_ready(struct clk *clk)
92void omap2_init_clk_clkdm(struct clk *clk) 94void omap2_init_clk_clkdm(struct clk *clk)
93{ 95{
94 struct clockdomain *clkdm; 96 struct clockdomain *clkdm;
97 const char *clk_name;
95 98
96 if (!clk->clkdm_name) 99 if (!clk->clkdm_name)
97 return; 100 return;
98 101
102 clk_name = __clk_get_name(clk);
103
99 clkdm = clkdm_lookup(clk->clkdm_name); 104 clkdm = clkdm_lookup(clk->clkdm_name);
100 if (clkdm) { 105 if (clkdm) {
101 pr_debug("clock: associated clk %s to clkdm %s\n", 106 pr_debug("clock: associated clk %s to clkdm %s\n",
102 clk->name, clk->clkdm_name); 107 clk_name, clk->clkdm_name);
103 clk->clkdm = clkdm; 108 clk->clkdm = clkdm;
104 } else { 109 } else {
105 pr_debug("clock: could not associate clk %s to " 110 pr_debug("clock: could not associate clk %s to clkdm %s\n",
106 "clkdm %s\n", clk->name, clk->clkdm_name); 111 clk_name, clk->clkdm_name);
107 } 112 }
108} 113}
109 114
@@ -226,8 +231,7 @@ void omap2_dflt_clk_disable(struct clk *clk)
226 * 'Independent' here refers to a clock which is not 231 * 'Independent' here refers to a clock which is not
227 * controlled by its parent. 232 * controlled by its parent.
228 */ 233 */
229 printk(KERN_ERR "clock: clk_disable called on independent " 234 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; 235 return;
232 } 236 }
233 237
@@ -270,8 +274,7 @@ const struct clkops clkops_omap2_dflt = {
270void omap2_clk_disable(struct clk *clk) 274void omap2_clk_disable(struct clk *clk)
271{ 275{
272 if (clk->usecount == 0) { 276 if (clk->usecount == 0) {
273 WARN(1, "clock: %s: omap2_clk_disable() called, but usecount " 277 WARN(1, "clock: %s: omap2_clk_disable() called, but usecount already 0?", clk->name);
274 "already 0?", clk->name);
275 return; 278 return;
276 } 279 }
277 280
@@ -332,8 +335,8 @@ int omap2_clk_enable(struct clk *clk)
332 if (clkdm_control && clk->clkdm) { 335 if (clkdm_control && clk->clkdm) {
333 ret = clkdm_clk_enable(clk->clkdm, clk); 336 ret = clkdm_clk_enable(clk->clkdm, clk);
334 if (ret) { 337 if (ret) {
335 WARN(1, "clock: %s: could not enable clockdomain %s: " 338 WARN(1, "clock: %s: could not enable clockdomain %s: %d\n",
336 "%d\n", clk->name, clk->clkdm->name, ret); 339 clk->name, clk->clkdm->name, ret);
337 goto oce_err2; 340 goto oce_err2;
338 } 341 }
339 } 342 }
@@ -501,10 +504,8 @@ void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name,
501 504
502 hfclkin_rate = clk_get_rate(hfclkin_ck); 505 hfclkin_rate = clk_get_rate(hfclkin_ck);
503 506
504 pr_info("Switched to new clocking rate (Crystal/Core/MPU): " 507 pr_info("Switched to new clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n",
505 "%ld.%01ld/%ld/%ld MHz\n", 508 (hfclkin_rate / 1000000), ((hfclkin_rate / 100000) % 10),
506 (hfclkin_rate / 1000000),
507 ((hfclkin_rate / 100000) % 10),
508 (clk_get_rate(core_ck) / 1000000), 509 (clk_get_rate(core_ck) / 1000000),
509 (clk_get_rate(mpu_ck) / 1000000)); 510 (clk_get_rate(mpu_ck) / 1000000));
510} 511}
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 002745181ad6..c3cde1a2b6de 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"
@@ -1804,6 +1804,7 @@ static struct omap_clk omap2420_clks[] = {
1804 CLK(NULL, "gfx_ick", &gfx_ick, CK_242X), 1804 CLK(NULL, "gfx_ick", &gfx_ick, CK_242X),
1805 /* DSS domain clocks */ 1805 /* DSS domain clocks */
1806 CLK("omapdss_dss", "ick", &dss_ick, CK_242X), 1806 CLK("omapdss_dss", "ick", &dss_ick, CK_242X),
1807 CLK(NULL, "dss_ick", &dss_ick, CK_242X),
1807 CLK(NULL, "dss1_fck", &dss1_fck, CK_242X), 1808 CLK(NULL, "dss1_fck", &dss1_fck, CK_242X),
1808 CLK(NULL, "dss2_fck", &dss2_fck, CK_242X), 1809 CLK(NULL, "dss2_fck", &dss2_fck, CK_242X),
1809 CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_242X), 1810 CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_242X),
@@ -1843,12 +1844,16 @@ static struct omap_clk omap2420_clks[] = {
1843 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X), 1844 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X),
1844 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X), 1845 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X),
1845 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X), 1846 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X),
1847 CLK(NULL, "mcbsp1_ick", &mcbsp1_ick, CK_242X),
1846 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_242X), 1848 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_242X),
1847 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X), 1849 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X),
1850 CLK(NULL, "mcbsp2_ick", &mcbsp2_ick, CK_242X),
1848 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_242X), 1851 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_242X),
1849 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X), 1852 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X),
1853 CLK(NULL, "mcspi1_ick", &mcspi1_ick, CK_242X),
1850 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_242X), 1854 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_242X),
1851 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X), 1855 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X),
1856 CLK(NULL, "mcspi2_ick", &mcspi2_ick, CK_242X),
1852 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_242X), 1857 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_242X),
1853 CLK(NULL, "uart1_ick", &uart1_ick, CK_242X), 1858 CLK(NULL, "uart1_ick", &uart1_ick, CK_242X),
1854 CLK(NULL, "uart1_fck", &uart1_fck, CK_242X), 1859 CLK(NULL, "uart1_fck", &uart1_fck, CK_242X),
@@ -1859,12 +1864,15 @@ static struct omap_clk omap2420_clks[] = {
1859 CLK(NULL, "gpios_ick", &gpios_ick, CK_242X), 1864 CLK(NULL, "gpios_ick", &gpios_ick, CK_242X),
1860 CLK(NULL, "gpios_fck", &gpios_fck, CK_242X), 1865 CLK(NULL, "gpios_fck", &gpios_fck, CK_242X),
1861 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X), 1866 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X),
1867 CLK(NULL, "mpu_wdt_ick", &mpu_wdt_ick, CK_242X),
1862 CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_242X), 1868 CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_242X),
1863 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X), 1869 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X),
1864 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X), 1870 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X),
1865 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X), 1871 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X),
1866 CLK("omap24xxcam", "fck", &cam_fck, CK_242X), 1872 CLK("omap24xxcam", "fck", &cam_fck, CK_242X),
1873 CLK(NULL, "cam_fck", &cam_fck, CK_242X),
1867 CLK("omap24xxcam", "ick", &cam_ick, CK_242X), 1874 CLK("omap24xxcam", "ick", &cam_ick, CK_242X),
1875 CLK(NULL, "cam_ick", &cam_ick, CK_242X),
1868 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_242X), 1876 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_242X),
1869 CLK(NULL, "wdt4_ick", &wdt4_ick, CK_242X), 1877 CLK(NULL, "wdt4_ick", &wdt4_ick, CK_242X),
1870 CLK(NULL, "wdt4_fck", &wdt4_fck, CK_242X), 1878 CLK(NULL, "wdt4_fck", &wdt4_fck, CK_242X),
@@ -1873,16 +1881,22 @@ static struct omap_clk omap2420_clks[] = {
1873 CLK(NULL, "mspro_ick", &mspro_ick, CK_242X), 1881 CLK(NULL, "mspro_ick", &mspro_ick, CK_242X),
1874 CLK(NULL, "mspro_fck", &mspro_fck, CK_242X), 1882 CLK(NULL, "mspro_fck", &mspro_fck, CK_242X),
1875 CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X), 1883 CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X),
1884 CLK(NULL, "mmc_ick", &mmc_ick, CK_242X),
1876 CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X), 1885 CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X),
1886 CLK(NULL, "mmc_fck", &mmc_fck, CK_242X),
1877 CLK(NULL, "fac_ick", &fac_ick, CK_242X), 1887 CLK(NULL, "fac_ick", &fac_ick, CK_242X),
1878 CLK(NULL, "fac_fck", &fac_fck, CK_242X), 1888 CLK(NULL, "fac_fck", &fac_fck, CK_242X),
1879 CLK(NULL, "eac_ick", &eac_ick, CK_242X), 1889 CLK(NULL, "eac_ick", &eac_ick, CK_242X),
1880 CLK(NULL, "eac_fck", &eac_fck, CK_242X), 1890 CLK(NULL, "eac_fck", &eac_fck, CK_242X),
1881 CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X), 1891 CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X),
1892 CLK(NULL, "hdq_ick", &hdq_ick, CK_242X),
1882 CLK("omap_hdq.0", "fck", &hdq_fck, CK_242X), 1893 CLK("omap_hdq.0", "fck", &hdq_fck, CK_242X),
1894 CLK(NULL, "hdq_fck", &hdq_fck, CK_242X),
1883 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X), 1895 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X),
1896 CLK(NULL, "i2c1_ick", &i2c1_ick, CK_242X),
1884 CLK(NULL, "i2c1_fck", &i2c1_fck, CK_242X), 1897 CLK(NULL, "i2c1_fck", &i2c1_fck, CK_242X),
1885 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X), 1898 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X),
1899 CLK(NULL, "i2c2_ick", &i2c2_ick, CK_242X),
1886 CLK(NULL, "i2c2_fck", &i2c2_fck, CK_242X), 1900 CLK(NULL, "i2c2_fck", &i2c2_fck, CK_242X),
1887 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X), 1901 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X),
1888 CLK(NULL, "sdma_fck", &sdma_fck, CK_242X), 1902 CLK(NULL, "sdma_fck", &sdma_fck, CK_242X),
@@ -1892,14 +1906,18 @@ static struct omap_clk omap2420_clks[] = {
1892 CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), 1906 CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X),
1893 CLK(NULL, "des_ick", &des_ick, CK_242X), 1907 CLK(NULL, "des_ick", &des_ick, CK_242X),
1894 CLK("omap-sham", "ick", &sha_ick, CK_242X), 1908 CLK("omap-sham", "ick", &sha_ick, CK_242X),
1909 CLK(NULL, "sha_ick", &sha_ick, CK_242X),
1895 CLK("omap_rng", "ick", &rng_ick, CK_242X), 1910 CLK("omap_rng", "ick", &rng_ick, CK_242X),
1911 CLK(NULL, "rng_ick", &rng_ick, CK_242X),
1896 CLK("omap-aes", "ick", &aes_ick, CK_242X), 1912 CLK("omap-aes", "ick", &aes_ick, CK_242X),
1913 CLK(NULL, "aes_ick", &aes_ick, CK_242X),
1897 CLK(NULL, "pka_ick", &pka_ick, CK_242X), 1914 CLK(NULL, "pka_ick", &pka_ick, CK_242X),
1898 CLK(NULL, "usb_fck", &usb_fck, CK_242X), 1915 CLK(NULL, "usb_fck", &usb_fck, CK_242X),
1899 CLK("musb-hdrc", "fck", &osc_ck, CK_242X), 1916 CLK("musb-hdrc", "fck", &osc_ck, CK_242X),
1900 CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_243X), 1917 CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_242X),
1901 CLK(NULL, "timer_sys_ck", &sys_ck, CK_243X), 1918 CLK(NULL, "timer_sys_ck", &sys_ck, CK_242X),
1902 CLK(NULL, "timer_ext_ck", &alt_ck, CK_243X), 1919 CLK(NULL, "timer_ext_ck", &alt_ck, CK_242X),
1920 CLK(NULL, "cpufreq_ck", &virt_prcm_set, CK_242X),
1903}; 1921};
1904 1922
1905/* 1923/*
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..22404fe435e7 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),
@@ -1887,6 +1888,7 @@ static struct omap_clk omap2430_clks[] = {
1887 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), 1888 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
1888 /* DSS domain clocks */ 1889 /* DSS domain clocks */
1889 CLK("omapdss_dss", "ick", &dss_ick, CK_243X), 1890 CLK("omapdss_dss", "ick", &dss_ick, CK_243X),
1891 CLK(NULL, "dss_ick", &dss_ick, CK_243X),
1890 CLK(NULL, "dss1_fck", &dss1_fck, CK_243X), 1892 CLK(NULL, "dss1_fck", &dss1_fck, CK_243X),
1891 CLK(NULL, "dss2_fck", &dss2_fck, CK_243X), 1893 CLK(NULL, "dss2_fck", &dss2_fck, CK_243X),
1892 CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X), 1894 CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X),
@@ -1926,20 +1928,28 @@ static struct omap_clk omap2430_clks[] = {
1926 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X), 1928 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X),
1927 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X), 1929 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X),
1928 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X), 1930 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X),
1931 CLK(NULL, "mcbsp1_ick", &mcbsp1_ick, CK_243X),
1929 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_243X), 1932 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_243X),
1930 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X), 1933 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X),
1934 CLK(NULL, "mcbsp2_ick", &mcbsp2_ick, CK_243X),
1931 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_243X), 1935 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_243X),
1932 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X), 1936 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X),
1937 CLK(NULL, "mcbsp3_ick", &mcbsp3_ick, CK_243X),
1933 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_243X), 1938 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_243X),
1934 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X), 1939 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X),
1940 CLK(NULL, "mcbsp4_ick", &mcbsp4_ick, CK_243X),
1935 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_243X), 1941 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_243X),
1936 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X), 1942 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X),
1943 CLK(NULL, "mcbsp5_ick", &mcbsp5_ick, CK_243X),
1937 CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_243X), 1944 CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_243X),
1938 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X), 1945 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X),
1946 CLK(NULL, "mcspi1_ick", &mcspi1_ick, CK_243X),
1939 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_243X), 1947 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_243X),
1940 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X), 1948 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X),
1949 CLK(NULL, "mcspi2_ick", &mcspi2_ick, CK_243X),
1941 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_243X), 1950 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_243X),
1942 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X), 1951 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X),
1952 CLK(NULL, "mcspi3_ick", &mcspi3_ick, CK_243X),
1943 CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_243X), 1953 CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_243X),
1944 CLK(NULL, "uart1_ick", &uart1_ick, CK_243X), 1954 CLK(NULL, "uart1_ick", &uart1_ick, CK_243X),
1945 CLK(NULL, "uart1_fck", &uart1_fck, CK_243X), 1955 CLK(NULL, "uart1_fck", &uart1_fck, CK_243X),
@@ -1950,13 +1960,16 @@ static struct omap_clk omap2430_clks[] = {
1950 CLK(NULL, "gpios_ick", &gpios_ick, CK_243X), 1960 CLK(NULL, "gpios_ick", &gpios_ick, CK_243X),
1951 CLK(NULL, "gpios_fck", &gpios_fck, CK_243X), 1961 CLK(NULL, "gpios_fck", &gpios_fck, CK_243X),
1952 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X), 1962 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X),
1963 CLK(NULL, "mpu_wdt_ick", &mpu_wdt_ick, CK_243X),
1953 CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_243X), 1964 CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_243X),
1954 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X), 1965 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X),
1955 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X), 1966 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X),
1956 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X), 1967 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X),
1957 CLK(NULL, "icr_ick", &icr_ick, CK_243X), 1968 CLK(NULL, "icr_ick", &icr_ick, CK_243X),
1958 CLK("omap24xxcam", "fck", &cam_fck, CK_243X), 1969 CLK("omap24xxcam", "fck", &cam_fck, CK_243X),
1970 CLK(NULL, "cam_fck", &cam_fck, CK_243X),
1959 CLK("omap24xxcam", "ick", &cam_ick, CK_243X), 1971 CLK("omap24xxcam", "ick", &cam_ick, CK_243X),
1972 CLK(NULL, "cam_ick", &cam_ick, CK_243X),
1960 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_243X), 1973 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_243X),
1961 CLK(NULL, "wdt4_ick", &wdt4_ick, CK_243X), 1974 CLK(NULL, "wdt4_ick", &wdt4_ick, CK_243X),
1962 CLK(NULL, "wdt4_fck", &wdt4_fck, CK_243X), 1975 CLK(NULL, "wdt4_fck", &wdt4_fck, CK_243X),
@@ -1965,10 +1978,14 @@ static struct omap_clk omap2430_clks[] = {
1965 CLK(NULL, "fac_ick", &fac_ick, CK_243X), 1978 CLK(NULL, "fac_ick", &fac_ick, CK_243X),
1966 CLK(NULL, "fac_fck", &fac_fck, CK_243X), 1979 CLK(NULL, "fac_fck", &fac_fck, CK_243X),
1967 CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X), 1980 CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X),
1981 CLK(NULL, "hdq_ick", &hdq_ick, CK_243X),
1968 CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X), 1982 CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X),
1983 CLK(NULL, "hdq_fck", &hdq_fck, CK_243X),
1969 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X), 1984 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X),
1985 CLK(NULL, "i2c1_ick", &i2c1_ick, CK_243X),
1970 CLK(NULL, "i2chs1_fck", &i2chs1_fck, CK_243X), 1986 CLK(NULL, "i2chs1_fck", &i2chs1_fck, CK_243X),
1971 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X), 1987 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X),
1988 CLK(NULL, "i2c2_ick", &i2c2_ick, CK_243X),
1972 CLK(NULL, "i2chs2_fck", &i2chs2_fck, CK_243X), 1989 CLK(NULL, "i2chs2_fck", &i2chs2_fck, CK_243X),
1973 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X), 1990 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X),
1974 CLK(NULL, "sdma_fck", &sdma_fck, CK_243X), 1991 CLK(NULL, "sdma_fck", &sdma_fck, CK_243X),
@@ -1977,22 +1994,29 @@ static struct omap_clk omap2430_clks[] = {
1977 CLK(NULL, "des_ick", &des_ick, CK_243X), 1994 CLK(NULL, "des_ick", &des_ick, CK_243X),
1978 CLK("omap-sham", "ick", &sha_ick, CK_243X), 1995 CLK("omap-sham", "ick", &sha_ick, CK_243X),
1979 CLK("omap_rng", "ick", &rng_ick, CK_243X), 1996 CLK("omap_rng", "ick", &rng_ick, CK_243X),
1997 CLK(NULL, "rng_ick", &rng_ick, CK_243X),
1980 CLK("omap-aes", "ick", &aes_ick, CK_243X), 1998 CLK("omap-aes", "ick", &aes_ick, CK_243X),
1981 CLK(NULL, "pka_ick", &pka_ick, CK_243X), 1999 CLK(NULL, "pka_ick", &pka_ick, CK_243X),
1982 CLK(NULL, "usb_fck", &usb_fck, CK_243X), 2000 CLK(NULL, "usb_fck", &usb_fck, CK_243X),
1983 CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X), 2001 CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X),
2002 CLK(NULL, "usbhs_ick", &usbhs_ick, CK_243X),
1984 CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X), 2003 CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X),
2004 CLK(NULL, "mmchs1_ick", &mmchs1_ick, CK_243X),
1985 CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_243X), 2005 CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_243X),
1986 CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X), 2006 CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X),
2007 CLK(NULL, "mmchs2_ick", &mmchs2_ick, CK_243X),
1987 CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_243X), 2008 CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_243X),
1988 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), 2009 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X),
1989 CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), 2010 CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X),
1990 CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), 2011 CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),
1991 CLK("omap_hsmmc.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X), 2012 CLK("omap_hsmmc.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X),
2013 CLK(NULL, "mmchsdb1_fck", &mmchsdb1_fck, CK_243X),
1992 CLK("omap_hsmmc.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X), 2014 CLK("omap_hsmmc.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X),
2015 CLK(NULL, "mmchsdb2_fck", &mmchsdb2_fck, CK_243X),
1993 CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_243X), 2016 CLK(NULL, "timer_32k_ck", &func_32k_ck, CK_243X),
1994 CLK(NULL, "timer_sys_ck", &sys_ck, CK_243X), 2017 CLK(NULL, "timer_sys_ck", &sys_ck, CK_243X),
1995 CLK(NULL, "timer_ext_ck", &alt_ck, CK_243X), 2018 CLK(NULL, "timer_ext_ck", &alt_ck, CK_243X),
2019 CLK(NULL, "cpufreq_ck", &virt_prcm_set, CK_243X),
1996}; 2020};
1997 2021
1998/* 2022/*
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..b87b88c2638b 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"
@@ -1013,6 +1013,7 @@ static struct omap_clk am33xx_clks[] = {
1013 CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_AM33XX), 1013 CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_AM33XX),
1014 CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_AM33XX), 1014 CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_AM33XX),
1015 CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_AM33XX), 1015 CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_AM33XX),
1016 CLK("cpu0", NULL, &dpll_mpu_ck, CK_AM33XX),
1016 CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_AM33XX), 1017 CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_AM33XX),
1017 CLK(NULL, "dpll_ddr_ck", &dpll_ddr_ck, CK_AM33XX), 1018 CLK(NULL, "dpll_ddr_ck", &dpll_ddr_ck, CK_AM33XX),
1018 CLK(NULL, "dpll_ddr_m2_ck", &dpll_ddr_m2_ck, CK_AM33XX), 1019 CLK(NULL, "dpll_ddr_m2_ck", &dpll_ddr_m2_ck, CK_AM33XX),
@@ -1027,7 +1028,9 @@ static struct omap_clk am33xx_clks[] = {
1027 CLK(NULL, "cefuse_fck", &cefuse_fck, CK_AM33XX), 1028 CLK(NULL, "cefuse_fck", &cefuse_fck, CK_AM33XX),
1028 CLK(NULL, "clkdiv32k_ick", &clkdiv32k_ick, CK_AM33XX), 1029 CLK(NULL, "clkdiv32k_ick", &clkdiv32k_ick, CK_AM33XX),
1029 CLK(NULL, "dcan0_fck", &dcan0_fck, CK_AM33XX), 1030 CLK(NULL, "dcan0_fck", &dcan0_fck, CK_AM33XX),
1031 CLK("481cc000.d_can", NULL, &dcan0_fck, CK_AM33XX),
1030 CLK(NULL, "dcan1_fck", &dcan1_fck, CK_AM33XX), 1032 CLK(NULL, "dcan1_fck", &dcan1_fck, CK_AM33XX),
1033 CLK("481d0000.d_can", NULL, &dcan1_fck, CK_AM33XX),
1031 CLK(NULL, "debugss_ick", &debugss_ick, CK_AM33XX), 1034 CLK(NULL, "debugss_ick", &debugss_ick, CK_AM33XX),
1032 CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX), 1035 CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX),
1033 CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX), 1036 CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX),
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c
index 794d82702c85..83bb01427d40 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
@@ -64,15 +63,15 @@ void __init omap3_clk_lock_dpll5(void)
64 63
65 dpll5_clk = clk_get(NULL, "dpll5_ck"); 64 dpll5_clk = clk_get(NULL, "dpll5_ck");
66 clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST); 65 clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST);
67 clk_enable(dpll5_clk); 66 clk_prepare_enable(dpll5_clk);
68 67
69 /* Program dpll5_m2_clk divider for no division */ 68 /* Program dpll5_m2_clk divider for no division */
70 dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck"); 69 dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck");
71 clk_enable(dpll5_m2_clk); 70 clk_prepare_enable(dpll5_m2_clk);
72 clk_set_rate(dpll5_m2_clk, DPLL5_FREQ_FOR_USBHOST); 71 clk_set_rate(dpll5_m2_clk, DPLL5_FREQ_FOR_USBHOST);
73 72
74 clk_disable(dpll5_m2_clk); 73 clk_disable_unprepare(dpll5_m2_clk);
75 clk_disable(dpll5_clk); 74 clk_disable_unprepare(dpll5_clk);
76 return; 75 return;
77} 76}
78 77
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 83bed9ad3017..1f42c9d5ecf3 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"
@@ -3215,7 +3215,6 @@ static struct clk dummy_apb_pclk = {
3215 * clkdev 3215 * clkdev
3216 */ 3216 */
3217 3217
3218/* XXX At some point we should rename this file to clock3xxx_data.c */
3219static struct omap_clk omap3xxx_clks[] = { 3218static struct omap_clk omap3xxx_clks[] = {
3220 CLK(NULL, "apb_pclk", &dummy_apb_pclk, CK_3XXX), 3219 CLK(NULL, "apb_pclk", &dummy_apb_pclk, CK_3XXX),
3221 CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_3XXX), 3220 CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_3XXX),
@@ -3226,6 +3225,7 @@ static struct omap_clk omap3xxx_clks[] = {
3226 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_3XXX), 3225 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_3XXX),
3227 CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck, CK_3XXX), 3226 CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck, CK_3XXX),
3228 CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX), 3227 CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX),
3228 CLK("twl", "fck", &osc_sys_ck, CK_3XXX),
3229 CLK(NULL, "sys_ck", &sys_ck, CK_3XXX), 3229 CLK(NULL, "sys_ck", &sys_ck, CK_3XXX),
3230 CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX), 3230 CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX),
3231 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX), 3231 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX),
@@ -3242,11 +3242,13 @@ static struct omap_clk omap3xxx_clks[] = {
3242 CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_3XXX), 3242 CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_3XXX),
3243 CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck, CK_3XXX), 3243 CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck, CK_3XXX),
3244 CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_3XXX), 3244 CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_3XXX),
3245 CLK(NULL, "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX),
3245 CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX), 3246 CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX),
3246 CLK(NULL, "dpll4_ck", &dpll4_ck, CK_3XXX), 3247 CLK(NULL, "dpll4_ck", &dpll4_ck, CK_3XXX),
3247 CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_3XXX), 3248 CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_3XXX),
3248 CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck, CK_36XX), 3249 CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck, CK_36XX),
3249 CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_3XXX), 3250 CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_3XXX),
3251 CLK(NULL, "omap_96m_alwon_fck_3630", &omap_96m_alwon_fck_3630, CK_36XX),
3250 CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_3XXX), 3252 CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_3XXX),
3251 CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_3XXX), 3253 CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_3XXX),
3252 CLK(NULL, "omap_54m_fck", &omap_54m_fck, CK_3XXX), 3254 CLK(NULL, "omap_54m_fck", &omap_54m_fck, CK_3XXX),
@@ -3262,6 +3264,7 @@ static struct omap_clk omap3xxx_clks[] = {
3262 CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_3XXX), 3264 CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_3XXX),
3263 CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck, CK_3XXX), 3265 CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck, CK_3XXX),
3264 CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_3XXX), 3266 CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_3XXX),
3267 CLK(NULL, "emu_per_alwon_ck", &emu_per_alwon_ck, CK_3XXX),
3265 CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck, CK_3XXX), 3268 CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck, CK_3XXX),
3266 CLK(NULL, "dpll5_ck", &dpll5_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3269 CLK(NULL, "dpll5_ck", &dpll5_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3267 CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3270 CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
@@ -3271,6 +3274,7 @@ static struct omap_clk omap3xxx_clks[] = {
3271 CLK(NULL, "dpll1_fck", &dpll1_fck, CK_3XXX), 3274 CLK(NULL, "dpll1_fck", &dpll1_fck, CK_3XXX),
3272 CLK(NULL, "mpu_ck", &mpu_ck, CK_3XXX), 3275 CLK(NULL, "mpu_ck", &mpu_ck, CK_3XXX),
3273 CLK(NULL, "arm_fck", &arm_fck, CK_3XXX), 3276 CLK(NULL, "arm_fck", &arm_fck, CK_3XXX),
3277 CLK(NULL, "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_3XXX),
3274 CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_3XXX), 3278 CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_3XXX),
3275 CLK(NULL, "dpll2_fck", &dpll2_fck, CK_34XX | CK_36XX), 3279 CLK(NULL, "dpll2_fck", &dpll2_fck, CK_34XX | CK_36XX),
3276 CLK(NULL, "iva2_ck", &iva2_ck, CK_34XX | CK_36XX), 3280 CLK(NULL, "iva2_ck", &iva2_ck, CK_34XX | CK_36XX),
@@ -3294,6 +3298,7 @@ static struct omap_clk omap3xxx_clks[] = {
3294 CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3298 CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3295 CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3299 CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3296 CLK("usbhs_omap", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3300 CLK("usbhs_omap", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3301 CLK("usbhs_tll", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3297 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), 3302 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
3298 CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3303 CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3299 CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX), 3304 CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX),
@@ -3314,6 +3319,7 @@ static struct omap_clk omap3xxx_clks[] = {
3314 CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1), 3319 CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1),
3315 CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX), 3320 CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX),
3316 CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX), 3321 CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX),
3322 CLK(NULL, "hdq_fck", &hdq_fck, CK_3XXX),
3317 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1), 3323 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1),
3318 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX), 3324 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX),
3319 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1), 3325 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1),
@@ -3321,6 +3327,8 @@ static struct omap_clk omap3xxx_clks[] = {
3321 CLK(NULL, "core_l3_ick", &core_l3_ick, CK_3XXX), 3327 CLK(NULL, "core_l3_ick", &core_l3_ick, CK_3XXX),
3322 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1, CK_3430ES1), 3328 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1, CK_3430ES1),
3323 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX), 3329 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX),
3330 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es1, CK_3430ES1),
3331 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX),
3324 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_3XXX), 3332 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_3XXX),
3325 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_3XXX), 3333 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_3XXX),
3326 CLK(NULL, "security_l3_ick", &security_l3_ick, CK_34XX | CK_36XX), 3334 CLK(NULL, "security_l3_ick", &security_l3_ick, CK_34XX | CK_36XX),
@@ -3328,28 +3336,42 @@ static struct omap_clk omap3xxx_clks[] = {
3328 CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), 3336 CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX),
3329 CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3337 CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3330 CLK("usbhs_omap", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3338 CLK("usbhs_omap", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3339 CLK("usbhs_tll", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3331 CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3340 CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3341 CLK(NULL, "mmchs3_ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3332 CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), 3342 CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX),
3333 CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), 3343 CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX),
3334 CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX), 3344 CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX),
3335 CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX), 3345 CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX),
3336 CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_3XXX), 3346 CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_3XXX),
3337 CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_3XXX), 3347 CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_3XXX),
3348 CLK(NULL, "mmchs2_ick", &mmchs2_ick, CK_3XXX),
3349 CLK(NULL, "mmchs1_ick", &mmchs1_ick, CK_3XXX),
3338 CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX), 3350 CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX),
3339 CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX), 3351 CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX),
3352 CLK(NULL, "hdq_ick", &hdq_ick, CK_3XXX),
3340 CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX), 3353 CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX),
3341 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_3XXX), 3354 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_3XXX),
3342 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_3XXX), 3355 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_3XXX),
3343 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_3XXX), 3356 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_3XXX),
3357 CLK(NULL, "mcspi4_ick", &mcspi4_ick, CK_3XXX),
3358 CLK(NULL, "mcspi3_ick", &mcspi3_ick, CK_3XXX),
3359 CLK(NULL, "mcspi2_ick", &mcspi2_ick, CK_3XXX),
3360 CLK(NULL, "mcspi1_ick", &mcspi1_ick, CK_3XXX),
3344 CLK("omap_i2c.3", "ick", &i2c3_ick, CK_3XXX), 3361 CLK("omap_i2c.3", "ick", &i2c3_ick, CK_3XXX),
3345 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_3XXX), 3362 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_3XXX),
3346 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_3XXX), 3363 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_3XXX),
3364 CLK(NULL, "i2c3_ick", &i2c3_ick, CK_3XXX),
3365 CLK(NULL, "i2c2_ick", &i2c2_ick, CK_3XXX),
3366 CLK(NULL, "i2c1_ick", &i2c1_ick, CK_3XXX),
3347 CLK(NULL, "uart2_ick", &uart2_ick, CK_3XXX), 3367 CLK(NULL, "uart2_ick", &uart2_ick, CK_3XXX),
3348 CLK(NULL, "uart1_ick", &uart1_ick, CK_3XXX), 3368 CLK(NULL, "uart1_ick", &uart1_ick, CK_3XXX),
3349 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_3XXX), 3369 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_3XXX),
3350 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_3XXX), 3370 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_3XXX),
3351 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_3XXX), 3371 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_3XXX),
3352 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_3XXX), 3372 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_3XXX),
3373 CLK(NULL, "mcbsp5_ick", &mcbsp5_ick, CK_3XXX),
3374 CLK(NULL, "mcbsp1_ick", &mcbsp1_ick, CK_3XXX),
3353 CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1), 3375 CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1),
3354 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_34XX | CK_36XX), 3376 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_34XX | CK_36XX),
3355 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_3XXX), 3377 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_3XXX),
@@ -3368,7 +3390,9 @@ static struct omap_clk omap3xxx_clks[] = {
3368 CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_3XXX), 3390 CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_3XXX),
3369 CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_3XXX), 3391 CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_3XXX),
3370 CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1), 3392 CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1),
3393 CLK(NULL, "dss_ick", &dss_ick_3430es1, CK_3430ES1),
3371 CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3394 CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3395 CLK(NULL, "dss_ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3372 CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX), 3396 CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX),
3373 CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX), 3397 CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX),
3374 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX), 3398 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX),
@@ -3384,6 +3408,8 @@ static struct omap_clk omap3xxx_clks[] = {
3384 CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX), 3408 CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX),
3385 CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX), 3409 CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX),
3386 CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX), 3410 CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX),
3411 CLK("usbhs_tll", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX),
3412 CLK("usbhs_tll", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX),
3387 CLK(NULL, "init_60m_fclk", &dummy_ck, CK_3XXX), 3413 CLK(NULL, "init_60m_fclk", &dummy_ck, CK_3XXX),
3388 CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX), 3414 CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX),
3389 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), 3415 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX),
@@ -3393,6 +3419,7 @@ static struct omap_clk omap3xxx_clks[] = {
3393 CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX), 3419 CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX),
3394 CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX), 3420 CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX),
3395 CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX), 3421 CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX),
3422 CLK(NULL, "wdt2_ick", &wdt2_ick, CK_3XXX),
3396 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_3XXX), 3423 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_3XXX),
3397 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_3XXX), 3424 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_3XXX),
3398 CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX), 3425 CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX),
@@ -3438,9 +3465,13 @@ static struct omap_clk omap3xxx_clks[] = {
3438 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX), 3465 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX),
3439 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX), 3466 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX),
3440 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX), 3467 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX),
3468 CLK(NULL, "mcbsp4_ick", &mcbsp2_ick, CK_3XXX),
3469 CLK(NULL, "mcbsp3_ick", &mcbsp3_ick, CK_3XXX),
3470 CLK(NULL, "mcbsp2_ick", &mcbsp4_ick, CK_3XXX),
3441 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_3XXX), 3471 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_3XXX),
3442 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_3XXX), 3472 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_3XXX),
3443 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_3XXX), 3473 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_3XXX),
3474 CLK(NULL, "emu_src_ck", &emu_src_ck, CK_3XXX),
3444 CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX), 3475 CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX),
3445 CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX), 3476 CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX),
3446 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX), 3477 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX),
@@ -3456,8 +3487,12 @@ static struct omap_clk omap3xxx_clks[] = {
3456 CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX), 3487 CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX),
3457 CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX), 3488 CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX),
3458 CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX), 3489 CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX),
3490 CLK(NULL, "emac_ick", &emac_ick, CK_AM35XX),
3491 CLK(NULL, "emac_fck", &emac_fck, CK_AM35XX),
3459 CLK("davinci_emac.0", NULL, &emac_ick, CK_AM35XX), 3492 CLK("davinci_emac.0", NULL, &emac_ick, CK_AM35XX),
3460 CLK("davinci_mdio.0", NULL, &emac_fck, CK_AM35XX), 3493 CLK("davinci_mdio.0", NULL, &emac_fck, CK_AM35XX),
3494 CLK(NULL, "vpfe_ick", &emac_ick, CK_AM35XX),
3495 CLK(NULL, "vpfe_fck", &emac_fck, CK_AM35XX),
3461 CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX), 3496 CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX),
3462 CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX), 3497 CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX),
3463 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_am35xx, CK_AM35XX), 3498 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_am35xx, CK_AM35XX),
@@ -3466,6 +3501,7 @@ static struct omap_clk omap3xxx_clks[] = {
3466 CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX), 3501 CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX),
3467 CLK(NULL, "timer_32k_ck", &omap_32k_fck, CK_3XXX), 3502 CLK(NULL, "timer_32k_ck", &omap_32k_fck, CK_3XXX),
3468 CLK(NULL, "timer_sys_ck", &sys_ck, CK_3XXX), 3503 CLK(NULL, "timer_sys_ck", &sys_ck, CK_3XXX),
3504 CLK(NULL, "cpufreq_ck", &dpll1_ck, CK_3XXX),
3469}; 3505};
3470 3506
3471 3507
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index d7f55e43b761..d661d138f270 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"
@@ -3156,6 +3156,7 @@ static struct omap_clk omap44xx_clks[] = {
3156 CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), 3156 CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X),
3157 CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), 3157 CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X),
3158 CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X), 3158 CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X),
3159 CLK(NULL, "dss_fck", &dss_fck, CK_443X),
3159 CLK("omapdss_dss", "ick", &dss_fck, CK_443X), 3160 CLK("omapdss_dss", "ick", &dss_fck, CK_443X),
3160 CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), 3161 CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X),
3161 CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), 3162 CLK(NULL, "emif1_fck", &emif1_fck, CK_443X),
@@ -3212,6 +3213,7 @@ static struct omap_clk omap44xx_clks[] = {
3212 CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), 3213 CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X),
3213 CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), 3214 CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X),
3214 CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), 3215 CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X),
3216 CLK(NULL, "rng_ick", &rng_ick, CK_443X),
3215 CLK("omap_rng", "ick", &rng_ick, CK_443X), 3217 CLK("omap_rng", "ick", &rng_ick, CK_443X),
3216 CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), 3218 CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X),
3217 CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X), 3219 CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X),
@@ -3243,6 +3245,7 @@ static struct omap_clk omap44xx_clks[] = {
3243 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), 3245 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X),
3244 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), 3246 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
3245 CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X), 3247 CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X),
3248 CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X),
3246 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), 3249 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X),
3247 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), 3250 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
3248 CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), 3251 CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X),
@@ -3253,15 +3256,19 @@ static struct omap_clk omap44xx_clks[] = {
3253 CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), 3256 CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X),
3254 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), 3257 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X),
3255 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), 3258 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X),
3259 CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X),
3256 CLK("usbhs_omap", "hs_fck", &usb_host_hs_fck, CK_443X), 3260 CLK("usbhs_omap", "hs_fck", &usb_host_hs_fck, CK_443X),
3257 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), 3261 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X),
3258 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), 3262 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X),
3263 CLK(NULL, "usb_otg_hs_ick", &usb_otg_hs_ick, CK_443X),
3259 CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), 3264 CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X),
3260 CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X), 3265 CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X),
3261 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), 3266 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X),
3262 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), 3267 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X),
3263 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), 3268 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X),
3269 CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X),
3264 CLK("usbhs_omap", "usbtll_ick", &usb_tll_hs_ick, CK_443X), 3270 CLK("usbhs_omap", "usbtll_ick", &usb_tll_hs_ick, CK_443X),
3271 CLK("usbhs_tll", "usbtll_ick", &usb_tll_hs_ick, CK_443X),
3265 CLK(NULL, "usim_ck", &usim_ck, CK_443X), 3272 CLK(NULL, "usim_ck", &usim_ck, CK_443X),
3266 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), 3273 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
3267 CLK(NULL, "usim_fck", &usim_fck, CK_443X), 3274 CLK(NULL, "usim_fck", &usim_fck, CK_443X),
@@ -3312,8 +3319,10 @@ static struct omap_clk omap44xx_clks[] = {
3312 CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), 3319 CLK(NULL, "uart4_ick", &dummy_ck, CK_443X),
3313 CLK("usbhs_omap", "usbhost_ick", &dummy_ck, CK_443X), 3320 CLK("usbhs_omap", "usbhost_ick", &dummy_ck, CK_443X),
3314 CLK("usbhs_omap", "usbtll_fck", &dummy_ck, CK_443X), 3321 CLK("usbhs_omap", "usbtll_fck", &dummy_ck, CK_443X),
3322 CLK("usbhs_tll", "usbtll_fck", &dummy_ck, CK_443X),
3315 CLK("omap_wdt", "ick", &dummy_ck, CK_443X), 3323 CLK("omap_wdt", "ick", &dummy_ck, CK_443X),
3316 CLK(NULL, "timer_32k_ck", &sys_32k_ck, CK_443X), 3324 CLK(NULL, "timer_32k_ck", &sys_32k_ck, CK_443X),
3325 /* TODO: Remove "omap_timer.X" aliases once DT migration is complete */
3317 CLK("omap_timer.1", "timer_sys_ck", &sys_clkin_ck, CK_443X), 3326 CLK("omap_timer.1", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3318 CLK("omap_timer.2", "timer_sys_ck", &sys_clkin_ck, CK_443X), 3327 CLK("omap_timer.2", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3319 CLK("omap_timer.3", "timer_sys_ck", &sys_clkin_ck, CK_443X), 3328 CLK("omap_timer.3", "timer_sys_ck", &sys_clkin_ck, CK_443X),
@@ -3325,6 +3334,18 @@ static struct omap_clk omap44xx_clks[] = {
3325 CLK("omap_timer.6", "timer_sys_ck", &syc_clk_div_ck, CK_443X), 3334 CLK("omap_timer.6", "timer_sys_ck", &syc_clk_div_ck, CK_443X),
3326 CLK("omap_timer.7", "timer_sys_ck", &syc_clk_div_ck, CK_443X), 3335 CLK("omap_timer.7", "timer_sys_ck", &syc_clk_div_ck, CK_443X),
3327 CLK("omap_timer.8", "timer_sys_ck", &syc_clk_div_ck, CK_443X), 3336 CLK("omap_timer.8", "timer_sys_ck", &syc_clk_div_ck, CK_443X),
3337 CLK("4a318000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3338 CLK("48032000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3339 CLK("48034000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3340 CLK("48036000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3341 CLK("4803e000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3342 CLK("48086000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3343 CLK("48088000.timer", "timer_sys_ck", &sys_clkin_ck, CK_443X),
3344 CLK("49038000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X),
3345 CLK("4903a000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X),
3346 CLK("4903c000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X),
3347 CLK("4903e000.timer", "timer_sys_ck", &syc_clk_div_ck, CK_443X),
3348 CLK(NULL, "cpufreq_ck", &dpll_mpu_ck, CK_443X),
3328}; 3349};
3329 3350
3330int __init omap4xxx_clk_init(void) 3351int __init omap4xxx_clk_init(void)
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index 8664f5a8bfb6..cbb879139c51 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
@@ -905,6 +899,23 @@ bool clkdm_in_hwsup(struct clockdomain *clkdm)
905 return ret; 899 return ret;
906} 900}
907 901
902/**
903 * clkdm_missing_idle_reporting - can @clkdm enter autoidle even if in use?
904 * @clkdm: struct clockdomain *
905 *
906 * Returns true if clockdomain @clkdm has the
907 * CLKDM_MISSING_IDLE_REPORTING flag set, or false if not or @clkdm is
908 * null. More information is available in the documentation for the
909 * CLKDM_MISSING_IDLE_REPORTING macro.
910 */
911bool clkdm_missing_idle_reporting(struct clockdomain *clkdm)
912{
913 if (!clkdm)
914 return false;
915
916 return (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) ? true : false;
917}
918
908/* Clockdomain-to-clock/hwmod framework interface code */ 919/* Clockdomain-to-clock/hwmod framework interface code */
909 920
910static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm) 921static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
@@ -927,7 +938,7 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
927 pwrdm_state_switch(clkdm->pwrdm.ptr); 938 pwrdm_state_switch(clkdm->pwrdm.ptr);
928 spin_unlock_irqrestore(&clkdm->lock, flags); 939 spin_unlock_irqrestore(&clkdm->lock, flags);
929 940
930 pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name); 941 pr_debug("clockdomain: %s: enabled\n", clkdm->name);
931 942
932 return 0; 943 return 0;
933} 944}
@@ -952,7 +963,7 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)
952 pwrdm_state_switch(clkdm->pwrdm.ptr); 963 pwrdm_state_switch(clkdm->pwrdm.ptr);
953 spin_unlock_irqrestore(&clkdm->lock, flags); 964 spin_unlock_irqrestore(&clkdm->lock, flags);
954 965
955 pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name); 966 pr_debug("clockdomain: %s: disabled\n", clkdm->name);
956 967
957 return 0; 968 return 0;
958} 969}
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index 5601dc13785e..629576be7444 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -1,9 +1,7 @@
1/* 1/*
2 * arch/arm/plat-omap/include/mach/clockdomain.h
3 *
4 * OMAP2/3 clockdomain framework functions 2 * OMAP2/3 clockdomain framework functions
5 * 3 *
6 * Copyright (C) 2008 Texas Instruments, Inc. 4 * Copyright (C) 2008, 2012 Texas Instruments, Inc.
7 * Copyright (C) 2008-2011 Nokia Corporation 5 * Copyright (C) 2008-2011 Nokia Corporation
8 * 6 *
9 * Paul Walmsley 7 * Paul Walmsley
@@ -34,6 +32,20 @@
34 * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is 32 * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is
35 * active whenever the MPU is active. True for interconnects and 33 * active whenever the MPU is active. True for interconnects and
36 * the WKUP clockdomains. 34 * the WKUP clockdomains.
35 * CLKDM_MISSING_IDLE_REPORTING: The idle status of the IP blocks and
36 * clocks inside this clockdomain are not taken into account by
37 * the PRCM when determining whether the clockdomain is idle.
38 * Without this flag, if the clockdomain is set to
39 * hardware-supervised idle mode, the PRCM may transition the
40 * enclosing powerdomain to a low power state, even when devices
41 * inside the clockdomain and powerdomain are in use. (An example
42 * of such a clockdomain is the EMU clockdomain on OMAP3/4.) If
43 * this flag is set, and the clockdomain does not support the
44 * force-sleep mode, then the HW_AUTO mode will be used to put the
45 * clockdomain to sleep. Similarly, if the clockdomain supports
46 * the force-wakeup mode, then it will be used whenever a clock or
47 * IP block inside the clockdomain is active, rather than the
48 * HW_AUTO mode.
37 */ 49 */
38#define CLKDM_CAN_FORCE_SLEEP (1 << 0) 50#define CLKDM_CAN_FORCE_SLEEP (1 << 0)
39#define CLKDM_CAN_FORCE_WAKEUP (1 << 1) 51#define CLKDM_CAN_FORCE_WAKEUP (1 << 1)
@@ -41,6 +53,7 @@
41#define CLKDM_CAN_DISABLE_AUTO (1 << 3) 53#define CLKDM_CAN_DISABLE_AUTO (1 << 3)
42#define CLKDM_NO_AUTODEPS (1 << 4) 54#define CLKDM_NO_AUTODEPS (1 << 4)
43#define CLKDM_ACTIVE_WITH_MPU (1 << 5) 55#define CLKDM_ACTIVE_WITH_MPU (1 << 5)
56#define CLKDM_MISSING_IDLE_REPORTING (1 << 6)
44 57
45#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) 58#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
46#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) 59#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)
@@ -187,6 +200,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm);
187void clkdm_allow_idle(struct clockdomain *clkdm); 200void clkdm_allow_idle(struct clockdomain *clkdm);
188void clkdm_deny_idle(struct clockdomain *clkdm); 201void clkdm_deny_idle(struct clockdomain *clkdm);
189bool clkdm_in_hwsup(struct clockdomain *clkdm); 202bool clkdm_in_hwsup(struct clockdomain *clkdm);
203bool clkdm_missing_idle_reporting(struct clockdomain *clkdm);
190 204
191int clkdm_wakeup(struct clockdomain *clkdm); 205int clkdm_wakeup(struct clockdomain *clkdm);
192int clkdm_sleep(struct clockdomain *clkdm); 206int clkdm_sleep(struct clockdomain *clkdm);
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
index f99e65cfb862..9a7792aec673 100644
--- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
@@ -162,6 +162,19 @@ static void _disable_hwsup(struct clockdomain *clkdm)
162 clkdm->clktrctrl_mask); 162 clkdm->clktrctrl_mask);
163} 163}
164 164
165static int omap3_clkdm_sleep(struct clockdomain *clkdm)
166{
167 omap3xxx_cm_clkdm_force_sleep(clkdm->pwrdm.ptr->prcm_offs,
168 clkdm->clktrctrl_mask);
169 return 0;
170}
171
172static int omap3_clkdm_wakeup(struct clockdomain *clkdm)
173{
174 omap3xxx_cm_clkdm_force_wakeup(clkdm->pwrdm.ptr->prcm_offs,
175 clkdm->clktrctrl_mask);
176 return 0;
177}
165 178
166static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) 179static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
167{ 180{
@@ -170,6 +183,17 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
170 if (!clkdm->clktrctrl_mask) 183 if (!clkdm->clktrctrl_mask)
171 return 0; 184 return 0;
172 185
186 /*
187 * The CLKDM_MISSING_IDLE_REPORTING flag documentation has
188 * more details on the unpleasant problem this is working
189 * around
190 */
191 if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
192 !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
193 _enable_hwsup(clkdm);
194 return 0;
195 }
196
173 hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, 197 hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
174 clkdm->clktrctrl_mask); 198 clkdm->clktrctrl_mask);
175 199
@@ -193,6 +217,17 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
193 if (!clkdm->clktrctrl_mask) 217 if (!clkdm->clktrctrl_mask)
194 return 0; 218 return 0;
195 219
220 /*
221 * The CLKDM_MISSING_IDLE_REPORTING flag documentation has
222 * more details on the unpleasant problem this is working
223 * around
224 */
225 if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) &&
226 (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
227 omap3_clkdm_wakeup(clkdm);
228 return 0;
229 }
230
196 hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, 231 hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
197 clkdm->clktrctrl_mask); 232 clkdm->clktrctrl_mask);
198 233
@@ -209,20 +244,6 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
209 return 0; 244 return 0;
210} 245}
211 246
212static int omap3_clkdm_sleep(struct clockdomain *clkdm)
213{
214 omap3xxx_cm_clkdm_force_sleep(clkdm->pwrdm.ptr->prcm_offs,
215 clkdm->clktrctrl_mask);
216 return 0;
217}
218
219static int omap3_clkdm_wakeup(struct clockdomain *clkdm)
220{
221 omap3xxx_cm_clkdm_force_wakeup(clkdm->pwrdm.ptr->prcm_offs,
222 clkdm->clktrctrl_mask);
223 return 0;
224}
225
226static void omap3_clkdm_allow_idle(struct clockdomain *clkdm) 247static void omap3_clkdm_allow_idle(struct clockdomain *clkdm)
227{ 248{
228 if (atomic_read(&clkdm->usecount) > 0) 249 if (atomic_read(&clkdm->usecount) > 0)
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c
index 762f2cc542ce..6fc6155625bc 100644
--- a/arch/arm/mach-omap2/clockdomain44xx.c
+++ b/arch/arm/mach-omap2/clockdomain44xx.c
@@ -113,6 +113,17 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm)
113 if (!clkdm->prcm_partition) 113 if (!clkdm->prcm_partition)
114 return 0; 114 return 0;
115 115
116 /*
117 * The CLKDM_MISSING_IDLE_REPORTING flag documentation has
118 * more details on the unpleasant problem this is working
119 * around
120 */
121 if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
122 !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
123 omap4_clkdm_allow_idle(clkdm);
124 return 0;
125 }
126
116 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, 127 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition,
117 clkdm->cm_inst, clkdm->clkdm_offs); 128 clkdm->cm_inst, clkdm->clkdm_offs);
118 129
diff --git a/arch/arm/mach-omap2/clockdomains3xxx_data.c b/arch/arm/mach-omap2/clockdomains3xxx_data.c
index 56089c49142a..933a35cd124a 100644
--- a/arch/arm/mach-omap2/clockdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/clockdomains3xxx_data.c
@@ -387,14 +387,11 @@ static struct clockdomain per_am35x_clkdm = {
387 .clktrctrl_mask = OMAP3430_CLKTRCTRL_PER_MASK, 387 .clktrctrl_mask = OMAP3430_CLKTRCTRL_PER_MASK,
388}; 388};
389 389
390/*
391 * Disable hw supervised mode for emu_clkdm, because emu_pwrdm is
392 * switched of even if sdti is in use
393 */
394static struct clockdomain emu_clkdm = { 390static struct clockdomain emu_clkdm = {
395 .name = "emu_clkdm", 391 .name = "emu_clkdm",
396 .pwrdm = { .name = "emu_pwrdm" }, 392 .pwrdm = { .name = "emu_pwrdm" },
397 .flags = /* CLKDM_CAN_ENABLE_AUTO | */CLKDM_CAN_SWSUP, 393 .flags = (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_SWSUP |
394 CLKDM_MISSING_IDLE_REPORTING),
398 .clktrctrl_mask = OMAP3430_CLKTRCTRL_EMU_MASK, 395 .clktrctrl_mask = OMAP3430_CLKTRCTRL_EMU_MASK,
399}; 396};
400 397
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 63d60a773d3b..b56d06b48782 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -390,7 +390,8 @@ static struct clockdomain emu_sys_44xx_clkdm = {
390 .prcm_partition = OMAP4430_PRM_PARTITION, 390 .prcm_partition = OMAP4430_PRM_PARTITION,
391 .cm_inst = OMAP4430_PRM_EMU_CM_INST, 391 .cm_inst = OMAP4430_PRM_EMU_CM_INST,
392 .clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS, 392 .clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS,
393 .flags = CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_FORCE_WAKEUP, 393 .flags = (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_FORCE_WAKEUP |
394 CLKDM_MISSING_IDLE_REPORTING),
394}; 395};
395 396
396static struct clockdomain l3_dma_44xx_clkdm = { 397static struct clockdomain l3_dma_44xx_clkdm = {
diff --git a/arch/arm/mach-omap2/cm-regbits-33xx.h b/arch/arm/mach-omap2/cm-regbits-33xx.h
index 532027ee3d8d..adf7bb79b18f 100644
--- a/arch/arm/mach-omap2/cm-regbits-33xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-33xx.h
@@ -25,263 +25,328 @@
25 * CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER 25 * CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER
26 */ 26 */
27#define AM33XX_AUTO_DPLL_MODE_SHIFT 0 27#define AM33XX_AUTO_DPLL_MODE_SHIFT 0
28#define AM33XX_AUTO_DPLL_MODE_WIDTH 3
28#define AM33XX_AUTO_DPLL_MODE_MASK (0x7 << 0) 29#define AM33XX_AUTO_DPLL_MODE_MASK (0x7 << 0)
29 30
30/* Used by CM_WKUP_CLKSTCTRL */ 31/* Used by CM_WKUP_CLKSTCTRL */
31#define AM33XX_CLKACTIVITY_ADC_FCLK_SHIFT 14 32#define AM33XX_CLKACTIVITY_ADC_FCLK_SHIFT 14
33#define AM33XX_CLKACTIVITY_ADC_FCLK_WIDTH 1
32#define AM33XX_CLKACTIVITY_ADC_FCLK_MASK (1 << 16) 34#define AM33XX_CLKACTIVITY_ADC_FCLK_MASK (1 << 16)
33 35
34/* Used by CM_PER_L4LS_CLKSTCTRL */ 36/* Used by CM_PER_L4LS_CLKSTCTRL */
35#define AM33XX_CLKACTIVITY_CAN_CLK_SHIFT 11 37#define AM33XX_CLKACTIVITY_CAN_CLK_SHIFT 11
38#define AM33XX_CLKACTIVITY_CAN_CLK_WIDTH 1
36#define AM33XX_CLKACTIVITY_CAN_CLK_MASK (1 << 11) 39#define AM33XX_CLKACTIVITY_CAN_CLK_MASK (1 << 11)
37 40
38/* Used by CM_PER_CLK_24MHZ_CLKSTCTRL */ 41/* Used by CM_PER_CLK_24MHZ_CLKSTCTRL */
39#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_SHIFT 4 42#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_SHIFT 4
43#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_WIDTH 1
40#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_MASK (1 << 4) 44#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_MASK (1 << 4)
41 45
42/* Used by CM_PER_CPSW_CLKSTCTRL */ 46/* Used by CM_PER_CPSW_CLKSTCTRL */
43#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_SHIFT 4 47#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_SHIFT 4
48#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_WIDTH 1
44#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_MASK (1 << 4) 49#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_MASK (1 << 4)
45 50
46/* Used by CM_PER_L4HS_CLKSTCTRL */ 51/* Used by CM_PER_L4HS_CLKSTCTRL */
47#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_SHIFT 4 52#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_SHIFT 4
53#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_WIDTH 1
48#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_MASK (1 << 4) 54#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_MASK (1 << 4)
49 55
50/* Used by CM_PER_L4HS_CLKSTCTRL */ 56/* Used by CM_PER_L4HS_CLKSTCTRL */
51#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_SHIFT 5 57#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_SHIFT 5
58#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_WIDTH 1
52#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_MASK (1 << 5) 59#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_MASK (1 << 5)
53 60
54/* Used by CM_PER_L4HS_CLKSTCTRL */ 61/* Used by CM_PER_L4HS_CLKSTCTRL */
55#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_SHIFT 6 62#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_SHIFT 6
63#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_WIDTH 1
56#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_MASK (1 << 6) 64#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_MASK (1 << 6)
57 65
58/* Used by CM_PER_L3_CLKSTCTRL */ 66/* Used by CM_PER_L3_CLKSTCTRL */
59#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_SHIFT 6 67#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_SHIFT 6
68#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_WIDTH 1
60#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_MASK (1 << 6) 69#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_MASK (1 << 6)
61 70
62/* Used by CM_CEFUSE_CLKSTCTRL */ 71/* Used by CM_CEFUSE_CLKSTCTRL */
63#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 72#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9
73#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_WIDTH 1
64#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) 74#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9)
65 75
66/* Used by CM_L3_AON_CLKSTCTRL */ 76/* Used by CM_L3_AON_CLKSTCTRL */
67#define AM33XX_CLKACTIVITY_DBGSYSCLK_SHIFT 2 77#define AM33XX_CLKACTIVITY_DBGSYSCLK_SHIFT 2
78#define AM33XX_CLKACTIVITY_DBGSYSCLK_WIDTH 1
68#define AM33XX_CLKACTIVITY_DBGSYSCLK_MASK (1 << 2) 79#define AM33XX_CLKACTIVITY_DBGSYSCLK_MASK (1 << 2)
69 80
70/* Used by CM_L3_AON_CLKSTCTRL */ 81/* Used by CM_L3_AON_CLKSTCTRL */
71#define AM33XX_CLKACTIVITY_DEBUG_CLKA_SHIFT 4 82#define AM33XX_CLKACTIVITY_DEBUG_CLKA_SHIFT 4
83#define AM33XX_CLKACTIVITY_DEBUG_CLKA_WIDTH 1
72#define AM33XX_CLKACTIVITY_DEBUG_CLKA_MASK (1 << 4) 84#define AM33XX_CLKACTIVITY_DEBUG_CLKA_MASK (1 << 4)
73 85
74/* Used by CM_PER_L3_CLKSTCTRL */ 86/* Used by CM_PER_L3_CLKSTCTRL */
75#define AM33XX_CLKACTIVITY_EMIF_GCLK_SHIFT 2 87#define AM33XX_CLKACTIVITY_EMIF_GCLK_SHIFT 2
88#define AM33XX_CLKACTIVITY_EMIF_GCLK_WIDTH 1
76#define AM33XX_CLKACTIVITY_EMIF_GCLK_MASK (1 << 2) 89#define AM33XX_CLKACTIVITY_EMIF_GCLK_MASK (1 << 2)
77 90
78/* Used by CM_GFX_L3_CLKSTCTRL */ 91/* Used by CM_GFX_L3_CLKSTCTRL */
79#define AM33XX_CLKACTIVITY_GFX_FCLK_SHIFT 9 92#define AM33XX_CLKACTIVITY_GFX_FCLK_SHIFT 9
93#define AM33XX_CLKACTIVITY_GFX_FCLK_WIDTH 1
80#define AM33XX_CLKACTIVITY_GFX_FCLK_MASK (1 << 9) 94#define AM33XX_CLKACTIVITY_GFX_FCLK_MASK (1 << 9)
81 95
82/* Used by CM_GFX_L3_CLKSTCTRL */ 96/* Used by CM_GFX_L3_CLKSTCTRL */
83#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_SHIFT 8 97#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_SHIFT 8
98#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_WIDTH 1
84#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_MASK (1 << 8) 99#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_MASK (1 << 8)
85 100
86/* Used by CM_WKUP_CLKSTCTRL */ 101/* Used by CM_WKUP_CLKSTCTRL */
87#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_SHIFT 8 102#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_SHIFT 8
103#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_WIDTH 1
88#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_MASK (1 << 8) 104#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_MASK (1 << 8)
89 105
90/* Used by CM_PER_L4LS_CLKSTCTRL */ 106/* Used by CM_PER_L4LS_CLKSTCTRL */
91#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_SHIFT 19 107#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_SHIFT 19
108#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_WIDTH 1
92#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_MASK (1 << 19) 109#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_MASK (1 << 19)
93 110
94/* Used by CM_PER_L4LS_CLKSTCTRL */ 111/* Used by CM_PER_L4LS_CLKSTCTRL */
95#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_SHIFT 20 112#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_SHIFT 20
113#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_WIDTH 1
96#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_MASK (1 << 20) 114#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_MASK (1 << 20)
97 115
98/* Used by CM_PER_L4LS_CLKSTCTRL */ 116/* Used by CM_PER_L4LS_CLKSTCTRL */
99#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_SHIFT 21 117#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_SHIFT 21
118#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_WIDTH 1
100#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_MASK (1 << 21) 119#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_MASK (1 << 21)
101 120
102/* Used by CM_PER_L4LS_CLKSTCTRL */ 121/* Used by CM_PER_L4LS_CLKSTCTRL */
103#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_SHIFT 22 122#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_SHIFT 22
123#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_WIDTH 1
104#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_MASK (1 << 22) 124#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_MASK (1 << 22)
105 125
106/* Used by CM_PER_L4LS_CLKSTCTRL */ 126/* Used by CM_PER_L4LS_CLKSTCTRL */
107#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_SHIFT 26 127#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_SHIFT 26
128#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_WIDTH 1
108#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_MASK (1 << 26) 129#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_MASK (1 << 26)
109 130
110/* Used by CM_PER_L4LS_CLKSTCTRL */ 131/* Used by CM_PER_L4LS_CLKSTCTRL */
111#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_SHIFT 18 132#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_SHIFT 18
133#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_WIDTH 1
112#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_MASK (1 << 18) 134#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_MASK (1 << 18)
113 135
114/* Used by CM_WKUP_CLKSTCTRL */ 136/* Used by CM_WKUP_CLKSTCTRL */
115#define AM33XX_CLKACTIVITY_I2C0_GFCLK_SHIFT 11 137#define AM33XX_CLKACTIVITY_I2C0_GFCLK_SHIFT 11
138#define AM33XX_CLKACTIVITY_I2C0_GFCLK_WIDTH 1
116#define AM33XX_CLKACTIVITY_I2C0_GFCLK_MASK (1 << 11) 139#define AM33XX_CLKACTIVITY_I2C0_GFCLK_MASK (1 << 11)
117 140
118/* Used by CM_PER_L4LS_CLKSTCTRL */ 141/* Used by CM_PER_L4LS_CLKSTCTRL */
119#define AM33XX_CLKACTIVITY_I2C_FCLK_SHIFT 24 142#define AM33XX_CLKACTIVITY_I2C_FCLK_SHIFT 24
143#define AM33XX_CLKACTIVITY_I2C_FCLK_WIDTH 1
120#define AM33XX_CLKACTIVITY_I2C_FCLK_MASK (1 << 24) 144#define AM33XX_CLKACTIVITY_I2C_FCLK_MASK (1 << 24)
121 145
122/* Used by CM_PER_PRUSS_CLKSTCTRL */ 146/* Used by CM_PER_PRUSS_CLKSTCTRL */
123#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_SHIFT 5 147#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_SHIFT 5
148#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_WIDTH 1
124#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_MASK (1 << 5) 149#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_MASK (1 << 5)
125 150
126/* Used by CM_PER_PRUSS_CLKSTCTRL */ 151/* Used by CM_PER_PRUSS_CLKSTCTRL */
127#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_SHIFT 4 152#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_SHIFT 4
153#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_WIDTH 1
128#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_MASK (1 << 4) 154#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_MASK (1 << 4)
129 155
130/* Used by CM_PER_PRUSS_CLKSTCTRL */ 156/* Used by CM_PER_PRUSS_CLKSTCTRL */
131#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_SHIFT 6 157#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_SHIFT 6
158#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_WIDTH 1
132#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_MASK (1 << 6) 159#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_MASK (1 << 6)
133 160
134/* Used by CM_PER_L3S_CLKSTCTRL */ 161/* Used by CM_PER_L3S_CLKSTCTRL */
135#define AM33XX_CLKACTIVITY_L3S_GCLK_SHIFT 3 162#define AM33XX_CLKACTIVITY_L3S_GCLK_SHIFT 3
163#define AM33XX_CLKACTIVITY_L3S_GCLK_WIDTH 1
136#define AM33XX_CLKACTIVITY_L3S_GCLK_MASK (1 << 3) 164#define AM33XX_CLKACTIVITY_L3S_GCLK_MASK (1 << 3)
137 165
138/* Used by CM_L3_AON_CLKSTCTRL */ 166/* Used by CM_L3_AON_CLKSTCTRL */
139#define AM33XX_CLKACTIVITY_L3_AON_GCLK_SHIFT 3 167#define AM33XX_CLKACTIVITY_L3_AON_GCLK_SHIFT 3
168#define AM33XX_CLKACTIVITY_L3_AON_GCLK_WIDTH 1
140#define AM33XX_CLKACTIVITY_L3_AON_GCLK_MASK (1 << 3) 169#define AM33XX_CLKACTIVITY_L3_AON_GCLK_MASK (1 << 3)
141 170
142/* Used by CM_PER_L3_CLKSTCTRL */ 171/* Used by CM_PER_L3_CLKSTCTRL */
143#define AM33XX_CLKACTIVITY_L3_GCLK_SHIFT 4 172#define AM33XX_CLKACTIVITY_L3_GCLK_SHIFT 4
173#define AM33XX_CLKACTIVITY_L3_GCLK_WIDTH 1
144#define AM33XX_CLKACTIVITY_L3_GCLK_MASK (1 << 4) 174#define AM33XX_CLKACTIVITY_L3_GCLK_MASK (1 << 4)
145 175
146/* Used by CM_PER_L4FW_CLKSTCTRL */ 176/* Used by CM_PER_L4FW_CLKSTCTRL */
147#define AM33XX_CLKACTIVITY_L4FW_GCLK_SHIFT 8 177#define AM33XX_CLKACTIVITY_L4FW_GCLK_SHIFT 8
178#define AM33XX_CLKACTIVITY_L4FW_GCLK_WIDTH 1
148#define AM33XX_CLKACTIVITY_L4FW_GCLK_MASK (1 << 8) 179#define AM33XX_CLKACTIVITY_L4FW_GCLK_MASK (1 << 8)
149 180
150/* Used by CM_PER_L4HS_CLKSTCTRL */ 181/* Used by CM_PER_L4HS_CLKSTCTRL */
151#define AM33XX_CLKACTIVITY_L4HS_GCLK_SHIFT 3 182#define AM33XX_CLKACTIVITY_L4HS_GCLK_SHIFT 3
183#define AM33XX_CLKACTIVITY_L4HS_GCLK_WIDTH 1
152#define AM33XX_CLKACTIVITY_L4HS_GCLK_MASK (1 << 3) 184#define AM33XX_CLKACTIVITY_L4HS_GCLK_MASK (1 << 3)
153 185
154/* Used by CM_PER_L4LS_CLKSTCTRL */ 186/* Used by CM_PER_L4LS_CLKSTCTRL */
155#define AM33XX_CLKACTIVITY_L4LS_GCLK_SHIFT 8 187#define AM33XX_CLKACTIVITY_L4LS_GCLK_SHIFT 8
188#define AM33XX_CLKACTIVITY_L4LS_GCLK_WIDTH 1
156#define AM33XX_CLKACTIVITY_L4LS_GCLK_MASK (1 << 8) 189#define AM33XX_CLKACTIVITY_L4LS_GCLK_MASK (1 << 8)
157 190
158/* Used by CM_GFX_L4LS_GFX_CLKSTCTRL__1 */ 191/* Used by CM_GFX_L4LS_GFX_CLKSTCTRL__1 */
159#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_SHIFT 8 192#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_SHIFT 8
193#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_WIDTH 1
160#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_MASK (1 << 8) 194#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_MASK (1 << 8)
161 195
162/* Used by CM_CEFUSE_CLKSTCTRL */ 196/* Used by CM_CEFUSE_CLKSTCTRL */
163#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 197#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8
198#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_WIDTH 1
164#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) 199#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8)
165 200
166/* Used by CM_RTC_CLKSTCTRL */ 201/* Used by CM_RTC_CLKSTCTRL */
167#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_SHIFT 8 202#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_SHIFT 8
203#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_WIDTH 1
168#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_MASK (1 << 8) 204#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_MASK (1 << 8)
169 205
170/* Used by CM_L4_WKUP_AON_CLKSTCTRL */ 206/* Used by CM_L4_WKUP_AON_CLKSTCTRL */
171#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_SHIFT 2 207#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_SHIFT 2
208#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_WIDTH 1
172#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_MASK (1 << 2) 209#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_MASK (1 << 2)
173 210
174/* Used by CM_WKUP_CLKSTCTRL */ 211/* Used by CM_WKUP_CLKSTCTRL */
175#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_SHIFT 2 212#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_SHIFT 2
213#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_WIDTH 1
176#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_MASK (1 << 2) 214#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_MASK (1 << 2)
177 215
178/* Used by CM_PER_L4LS_CLKSTCTRL */ 216/* Used by CM_PER_L4LS_CLKSTCTRL */
179#define AM33XX_CLKACTIVITY_LCDC_GCLK_SHIFT 17 217#define AM33XX_CLKACTIVITY_LCDC_GCLK_SHIFT 17
218#define AM33XX_CLKACTIVITY_LCDC_GCLK_WIDTH 1
180#define AM33XX_CLKACTIVITY_LCDC_GCLK_MASK (1 << 17) 219#define AM33XX_CLKACTIVITY_LCDC_GCLK_MASK (1 << 17)
181 220
182/* Used by CM_PER_LCDC_CLKSTCTRL */ 221/* Used by CM_PER_LCDC_CLKSTCTRL */
183#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_SHIFT 4 222#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_SHIFT 4
223#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_WIDTH 1
184#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_MASK (1 << 4) 224#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_MASK (1 << 4)
185 225
186/* Used by CM_PER_LCDC_CLKSTCTRL */ 226/* Used by CM_PER_LCDC_CLKSTCTRL */
187#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_SHIFT 5 227#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_SHIFT 5
228#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_WIDTH 1
188#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_MASK (1 << 5) 229#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_MASK (1 << 5)
189 230
190/* Used by CM_PER_L3_CLKSTCTRL */ 231/* Used by CM_PER_L3_CLKSTCTRL */
191#define AM33XX_CLKACTIVITY_MCASP_GCLK_SHIFT 7 232#define AM33XX_CLKACTIVITY_MCASP_GCLK_SHIFT 7
233#define AM33XX_CLKACTIVITY_MCASP_GCLK_WIDTH 1
192#define AM33XX_CLKACTIVITY_MCASP_GCLK_MASK (1 << 7) 234#define AM33XX_CLKACTIVITY_MCASP_GCLK_MASK (1 << 7)
193 235
194/* Used by CM_PER_L3_CLKSTCTRL */ 236/* Used by CM_PER_L3_CLKSTCTRL */
195#define AM33XX_CLKACTIVITY_MMC_FCLK_SHIFT 3 237#define AM33XX_CLKACTIVITY_MMC_FCLK_SHIFT 3
238#define AM33XX_CLKACTIVITY_MMC_FCLK_WIDTH 1
196#define AM33XX_CLKACTIVITY_MMC_FCLK_MASK (1 << 3) 239#define AM33XX_CLKACTIVITY_MMC_FCLK_MASK (1 << 3)
197 240
198/* Used by CM_MPU_CLKSTCTRL */ 241/* Used by CM_MPU_CLKSTCTRL */
199#define AM33XX_CLKACTIVITY_MPU_CLK_SHIFT 2 242#define AM33XX_CLKACTIVITY_MPU_CLK_SHIFT 2
243#define AM33XX_CLKACTIVITY_MPU_CLK_WIDTH 1
200#define AM33XX_CLKACTIVITY_MPU_CLK_MASK (1 << 2) 244#define AM33XX_CLKACTIVITY_MPU_CLK_MASK (1 << 2)
201 245
202/* Used by CM_PER_OCPWP_L3_CLKSTCTRL */ 246/* Used by CM_PER_OCPWP_L3_CLKSTCTRL */
203#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_SHIFT 4 247#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_SHIFT 4
248#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_WIDTH 1
204#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_MASK (1 << 4) 249#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_MASK (1 << 4)
205 250
206/* Used by CM_PER_OCPWP_L3_CLKSTCTRL */ 251/* Used by CM_PER_OCPWP_L3_CLKSTCTRL */
207#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_SHIFT 5 252#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_SHIFT 5
253#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_WIDTH 1
208#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_MASK (1 << 5) 254#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_MASK (1 << 5)
209 255
210/* Used by CM_RTC_CLKSTCTRL */ 256/* Used by CM_RTC_CLKSTCTRL */
211#define AM33XX_CLKACTIVITY_RTC_32KCLK_SHIFT 9 257#define AM33XX_CLKACTIVITY_RTC_32KCLK_SHIFT 9
258#define AM33XX_CLKACTIVITY_RTC_32KCLK_WIDTH 1
212#define AM33XX_CLKACTIVITY_RTC_32KCLK_MASK (1 << 9) 259#define AM33XX_CLKACTIVITY_RTC_32KCLK_MASK (1 << 9)
213 260
214/* Used by CM_PER_L4LS_CLKSTCTRL */ 261/* Used by CM_PER_L4LS_CLKSTCTRL */
215#define AM33XX_CLKACTIVITY_SPI_GCLK_SHIFT 25 262#define AM33XX_CLKACTIVITY_SPI_GCLK_SHIFT 25
263#define AM33XX_CLKACTIVITY_SPI_GCLK_WIDTH 1
216#define AM33XX_CLKACTIVITY_SPI_GCLK_MASK (1 << 25) 264#define AM33XX_CLKACTIVITY_SPI_GCLK_MASK (1 << 25)
217 265
218/* Used by CM_WKUP_CLKSTCTRL */ 266/* Used by CM_WKUP_CLKSTCTRL */
219#define AM33XX_CLKACTIVITY_SR_SYSCLK_SHIFT 3 267#define AM33XX_CLKACTIVITY_SR_SYSCLK_SHIFT 3
268#define AM33XX_CLKACTIVITY_SR_SYSCLK_WIDTH 1
220#define AM33XX_CLKACTIVITY_SR_SYSCLK_MASK (1 << 3) 269#define AM33XX_CLKACTIVITY_SR_SYSCLK_MASK (1 << 3)
221 270
222/* Used by CM_WKUP_CLKSTCTRL */ 271/* Used by CM_WKUP_CLKSTCTRL */
223#define AM33XX_CLKACTIVITY_TIMER0_GCLK_SHIFT 10 272#define AM33XX_CLKACTIVITY_TIMER0_GCLK_SHIFT 10
273#define AM33XX_CLKACTIVITY_TIMER0_GCLK_WIDTH 1
224#define AM33XX_CLKACTIVITY_TIMER0_GCLK_MASK (1 << 10) 274#define AM33XX_CLKACTIVITY_TIMER0_GCLK_MASK (1 << 10)
225 275
226/* Used by CM_WKUP_CLKSTCTRL */ 276/* Used by CM_WKUP_CLKSTCTRL */
227#define AM33XX_CLKACTIVITY_TIMER1_GCLK_SHIFT 13 277#define AM33XX_CLKACTIVITY_TIMER1_GCLK_SHIFT 13
278#define AM33XX_CLKACTIVITY_TIMER1_GCLK_WIDTH 1
228#define AM33XX_CLKACTIVITY_TIMER1_GCLK_MASK (1 << 13) 279#define AM33XX_CLKACTIVITY_TIMER1_GCLK_MASK (1 << 13)
229 280
230/* Used by CM_PER_L4LS_CLKSTCTRL */ 281/* Used by CM_PER_L4LS_CLKSTCTRL */
231#define AM33XX_CLKACTIVITY_TIMER2_GCLK_SHIFT 14 282#define AM33XX_CLKACTIVITY_TIMER2_GCLK_SHIFT 14
283#define AM33XX_CLKACTIVITY_TIMER2_GCLK_WIDTH 1
232#define AM33XX_CLKACTIVITY_TIMER2_GCLK_MASK (1 << 14) 284#define AM33XX_CLKACTIVITY_TIMER2_GCLK_MASK (1 << 14)
233 285
234/* Used by CM_PER_L4LS_CLKSTCTRL */ 286/* Used by CM_PER_L4LS_CLKSTCTRL */
235#define AM33XX_CLKACTIVITY_TIMER3_GCLK_SHIFT 15 287#define AM33XX_CLKACTIVITY_TIMER3_GCLK_SHIFT 15
288#define AM33XX_CLKACTIVITY_TIMER3_GCLK_WIDTH 1
236#define AM33XX_CLKACTIVITY_TIMER3_GCLK_MASK (1 << 15) 289#define AM33XX_CLKACTIVITY_TIMER3_GCLK_MASK (1 << 15)
237 290
238/* Used by CM_PER_L4LS_CLKSTCTRL */ 291/* Used by CM_PER_L4LS_CLKSTCTRL */
239#define AM33XX_CLKACTIVITY_TIMER4_GCLK_SHIFT 16 292#define AM33XX_CLKACTIVITY_TIMER4_GCLK_SHIFT 16
293#define AM33XX_CLKACTIVITY_TIMER4_GCLK_WIDTH 1
240#define AM33XX_CLKACTIVITY_TIMER4_GCLK_MASK (1 << 16) 294#define AM33XX_CLKACTIVITY_TIMER4_GCLK_MASK (1 << 16)
241 295
242/* Used by CM_PER_L4LS_CLKSTCTRL */ 296/* Used by CM_PER_L4LS_CLKSTCTRL */
243#define AM33XX_CLKACTIVITY_TIMER5_GCLK_SHIFT 27 297#define AM33XX_CLKACTIVITY_TIMER5_GCLK_SHIFT 27
298#define AM33XX_CLKACTIVITY_TIMER5_GCLK_WIDTH 1
244#define AM33XX_CLKACTIVITY_TIMER5_GCLK_MASK (1 << 27) 299#define AM33XX_CLKACTIVITY_TIMER5_GCLK_MASK (1 << 27)
245 300
246/* Used by CM_PER_L4LS_CLKSTCTRL */ 301/* Used by CM_PER_L4LS_CLKSTCTRL */
247#define AM33XX_CLKACTIVITY_TIMER6_GCLK_SHIFT 28 302#define AM33XX_CLKACTIVITY_TIMER6_GCLK_SHIFT 28
303#define AM33XX_CLKACTIVITY_TIMER6_GCLK_WIDTH 1
248#define AM33XX_CLKACTIVITY_TIMER6_GCLK_MASK (1 << 28) 304#define AM33XX_CLKACTIVITY_TIMER6_GCLK_MASK (1 << 28)
249 305
250/* Used by CM_PER_L4LS_CLKSTCTRL */ 306/* Used by CM_PER_L4LS_CLKSTCTRL */
251#define AM33XX_CLKACTIVITY_TIMER7_GCLK_SHIFT 13 307#define AM33XX_CLKACTIVITY_TIMER7_GCLK_SHIFT 13
308#define AM33XX_CLKACTIVITY_TIMER7_GCLK_WIDTH 1
252#define AM33XX_CLKACTIVITY_TIMER7_GCLK_MASK (1 << 13) 309#define AM33XX_CLKACTIVITY_TIMER7_GCLK_MASK (1 << 13)
253 310
254/* Used by CM_WKUP_CLKSTCTRL */ 311/* Used by CM_WKUP_CLKSTCTRL */
255#define AM33XX_CLKACTIVITY_UART0_GFCLK_SHIFT 12 312#define AM33XX_CLKACTIVITY_UART0_GFCLK_SHIFT 12
313#define AM33XX_CLKACTIVITY_UART0_GFCLK_WIDTH 1
256#define AM33XX_CLKACTIVITY_UART0_GFCLK_MASK (1 << 12) 314#define AM33XX_CLKACTIVITY_UART0_GFCLK_MASK (1 << 12)
257 315
258/* Used by CM_PER_L4LS_CLKSTCTRL */ 316/* Used by CM_PER_L4LS_CLKSTCTRL */
259#define AM33XX_CLKACTIVITY_UART_GFCLK_SHIFT 10 317#define AM33XX_CLKACTIVITY_UART_GFCLK_SHIFT 10
318#define AM33XX_CLKACTIVITY_UART_GFCLK_WIDTH 1
260#define AM33XX_CLKACTIVITY_UART_GFCLK_MASK (1 << 10) 319#define AM33XX_CLKACTIVITY_UART_GFCLK_MASK (1 << 10)
261 320
262/* Used by CM_WKUP_CLKSTCTRL */ 321/* Used by CM_WKUP_CLKSTCTRL */
263#define AM33XX_CLKACTIVITY_WDT0_GCLK_SHIFT 9 322#define AM33XX_CLKACTIVITY_WDT0_GCLK_SHIFT 9
323#define AM33XX_CLKACTIVITY_WDT0_GCLK_WIDTH 1
264#define AM33XX_CLKACTIVITY_WDT0_GCLK_MASK (1 << 9) 324#define AM33XX_CLKACTIVITY_WDT0_GCLK_MASK (1 << 9)
265 325
266/* Used by CM_WKUP_CLKSTCTRL */ 326/* Used by CM_WKUP_CLKSTCTRL */
267#define AM33XX_CLKACTIVITY_WDT1_GCLK_SHIFT 4 327#define AM33XX_CLKACTIVITY_WDT1_GCLK_SHIFT 4
328#define AM33XX_CLKACTIVITY_WDT1_GCLK_WIDTH 1
268#define AM33XX_CLKACTIVITY_WDT1_GCLK_MASK (1 << 4) 329#define AM33XX_CLKACTIVITY_WDT1_GCLK_MASK (1 << 4)
269 330
270/* Used by CLKSEL_GFX_FCLK */ 331/* Used by CLKSEL_GFX_FCLK */
271#define AM33XX_CLKDIV_SEL_GFX_FCLK_SHIFT 0 332#define AM33XX_CLKDIV_SEL_GFX_FCLK_SHIFT 0
333#define AM33XX_CLKDIV_SEL_GFX_FCLK_WIDTH 1
272#define AM33XX_CLKDIV_SEL_GFX_FCLK_MASK (1 << 0) 334#define AM33XX_CLKDIV_SEL_GFX_FCLK_MASK (1 << 0)
273 335
274/* Used by CM_CLKOUT_CTRL */ 336/* Used by CM_CLKOUT_CTRL */
275#define AM33XX_CLKOUT2DIV_SHIFT 3 337#define AM33XX_CLKOUT2DIV_SHIFT 3
276#define AM33XX_CLKOUT2DIV_MASK (0x05 << 3) 338#define AM33XX_CLKOUT2DIV_WIDTH 3
339#define AM33XX_CLKOUT2DIV_MASK (0x7 << 3)
277 340
278/* Used by CM_CLKOUT_CTRL */ 341/* Used by CM_CLKOUT_CTRL */
279#define AM33XX_CLKOUT2EN_SHIFT 7 342#define AM33XX_CLKOUT2EN_SHIFT 7
343#define AM33XX_CLKOUT2EN_WIDTH 1
280#define AM33XX_CLKOUT2EN_MASK (1 << 7) 344#define AM33XX_CLKOUT2EN_MASK (1 << 7)
281 345
282/* Used by CM_CLKOUT_CTRL */ 346/* Used by CM_CLKOUT_CTRL */
283#define AM33XX_CLKOUT2SOURCE_SHIFT 0 347#define AM33XX_CLKOUT2SOURCE_SHIFT 0
284#define AM33XX_CLKOUT2SOURCE_MASK (0x02 << 0) 348#define AM33XX_CLKOUT2SOURCE_WIDTH 3
349#define AM33XX_CLKOUT2SOURCE_MASK (0x7 << 0)
285 350
286/* 351/*
287 * Used by CLKSEL_GPIO0_DBCLK, CLKSEL_LCDC_PIXEL_CLK, CLKSEL_TIMER2_CLK, 352 * Used by CLKSEL_GPIO0_DBCLK, CLKSEL_LCDC_PIXEL_CLK, CLKSEL_TIMER2_CLK,
@@ -289,6 +354,7 @@
289 * CLKSEL_TIMER7_CLK 354 * CLKSEL_TIMER7_CLK
290 */ 355 */
291#define AM33XX_CLKSEL_SHIFT 0 356#define AM33XX_CLKSEL_SHIFT 0
357#define AM33XX_CLKSEL_WIDTH 1
292#define AM33XX_CLKSEL_MASK (0x01 << 0) 358#define AM33XX_CLKSEL_MASK (0x01 << 0)
293 359
294/* 360/*
@@ -296,17 +362,21 @@
296 * CM_CPTS_RFT_CLKSEL 362 * CM_CPTS_RFT_CLKSEL
297 */ 363 */
298#define AM33XX_CLKSEL_0_0_SHIFT 0 364#define AM33XX_CLKSEL_0_0_SHIFT 0
365#define AM33XX_CLKSEL_0_0_WIDTH 1
299#define AM33XX_CLKSEL_0_0_MASK (1 << 0) 366#define AM33XX_CLKSEL_0_0_MASK (1 << 0)
300 367
301#define AM33XX_CLKSEL_0_1_SHIFT 0 368#define AM33XX_CLKSEL_0_1_SHIFT 0
369#define AM33XX_CLKSEL_0_1_WIDTH 2
302#define AM33XX_CLKSEL_0_1_MASK (3 << 0) 370#define AM33XX_CLKSEL_0_1_MASK (3 << 0)
303 371
304/* Renamed from CLKSEL Used by CLKSEL_TIMER1MS_CLK */ 372/* Renamed from CLKSEL Used by CLKSEL_TIMER1MS_CLK */
305#define AM33XX_CLKSEL_0_2_SHIFT 0 373#define AM33XX_CLKSEL_0_2_SHIFT 0
374#define AM33XX_CLKSEL_0_2_WIDTH 3
306#define AM33XX_CLKSEL_0_2_MASK (7 << 0) 375#define AM33XX_CLKSEL_0_2_MASK (7 << 0)
307 376
308/* Used by CLKSEL_GFX_FCLK */ 377/* Used by CLKSEL_GFX_FCLK */
309#define AM33XX_CLKSEL_GFX_FCLK_SHIFT 1 378#define AM33XX_CLKSEL_GFX_FCLK_SHIFT 1
379#define AM33XX_CLKSEL_GFX_FCLK_WIDTH 1
310#define AM33XX_CLKSEL_GFX_FCLK_MASK (1 << 1) 380#define AM33XX_CLKSEL_GFX_FCLK_MASK (1 << 1)
311 381
312/* 382/*
@@ -318,6 +388,7 @@
318 * CM_GFX_L3_CLKSTCTRL, CM_GFX_L4LS_GFX_CLKSTCTRL__1, CM_CEFUSE_CLKSTCTRL 388 * CM_GFX_L3_CLKSTCTRL, CM_GFX_L4LS_GFX_CLKSTCTRL__1, CM_CEFUSE_CLKSTCTRL
319 */ 389 */
320#define AM33XX_CLKTRCTRL_SHIFT 0 390#define AM33XX_CLKTRCTRL_SHIFT 0
391#define AM33XX_CLKTRCTRL_WIDTH 2
321#define AM33XX_CLKTRCTRL_MASK (0x3 << 0) 392#define AM33XX_CLKTRCTRL_MASK (0x3 << 0)
322 393
323/* 394/*
@@ -326,34 +397,42 @@
326 * CM_SSC_DELTAMSTEP_DPLL_PER 397 * CM_SSC_DELTAMSTEP_DPLL_PER
327 */ 398 */
328#define AM33XX_DELTAMSTEP_SHIFT 0 399#define AM33XX_DELTAMSTEP_SHIFT 0
329#define AM33XX_DELTAMSTEP_MASK (0x19 << 0) 400#define AM33XX_DELTAMSTEP_WIDTH 20
401#define AM33XX_DELTAMSTEP_MASK (0xfffff << 0)
330 402
331/* Used by CM_CLKSEL_DPLL_DDR, CM_CLKSEL_DPLL_DISP, CM_CLKSEL_DPLL_MPU */ 403/* Used by CM_CLKSEL_DPLL_DDR, CM_CLKSEL_DPLL_DISP, CM_CLKSEL_DPLL_MPU */
332#define AM33XX_DPLL_BYP_CLKSEL_SHIFT 23 404#define AM33XX_DPLL_BYP_CLKSEL_SHIFT 23
405#define AM33XX_DPLL_BYP_CLKSEL_WIDTH 1
333#define AM33XX_DPLL_BYP_CLKSEL_MASK (1 << 23) 406#define AM33XX_DPLL_BYP_CLKSEL_MASK (1 << 23)
334 407
335/* Used by CM_CLKDCOLDO_DPLL_PER */ 408/* Used by CM_CLKDCOLDO_DPLL_PER */
336#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 409#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8
410#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_WIDTH 1
337#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) 411#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8)
338 412
339/* Used by CM_CLKDCOLDO_DPLL_PER */ 413/* Used by CM_CLKDCOLDO_DPLL_PER */
340#define AM33XX_DPLL_CLKDCOLDO_PWDN_SHIFT 12 414#define AM33XX_DPLL_CLKDCOLDO_PWDN_SHIFT 12
415#define AM33XX_DPLL_CLKDCOLDO_PWDN_WIDTH 1
341#define AM33XX_DPLL_CLKDCOLDO_PWDN_MASK (1 << 12) 416#define AM33XX_DPLL_CLKDCOLDO_PWDN_MASK (1 << 12)
342 417
343/* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */ 418/* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */
344#define AM33XX_DPLL_CLKOUT_DIV_SHIFT 0 419#define AM33XX_DPLL_CLKOUT_DIV_SHIFT 0
420#define AM33XX_DPLL_CLKOUT_DIV_WIDTH 5
345#define AM33XX_DPLL_CLKOUT_DIV_MASK (0x1f << 0) 421#define AM33XX_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
346 422
347/* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_PER */ 423/* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_PER */
348#define AM33XX_DPLL_CLKOUT_DIV_0_6_SHIFT 0 424#define AM33XX_DPLL_CLKOUT_DIV_0_6_SHIFT 0
349#define AM33XX_DPLL_CLKOUT_DIV_0_6_MASK (0x06 << 0) 425#define AM33XX_DPLL_CLKOUT_DIV_0_6_WIDTH 7
426#define AM33XX_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0)
350 427
351/* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */ 428/* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */
352#define AM33XX_DPLL_CLKOUT_DIVCHACK_SHIFT 5 429#define AM33XX_DPLL_CLKOUT_DIVCHACK_SHIFT 5
430#define AM33XX_DPLL_CLKOUT_DIVCHACK_WIDTH 1
353#define AM33XX_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) 431#define AM33XX_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5)
354 432
355/* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_PER */ 433/* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_PER */
356#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_SHIFT 7 434#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_SHIFT 7
435#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_WIDTH 1
357#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_MASK (1 << 7) 436#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_MASK (1 << 7)
358 437
359/* 438/*
@@ -361,6 +440,7 @@
361 * CM_DIV_M2_DPLL_PER 440 * CM_DIV_M2_DPLL_PER
362 */ 441 */
363#define AM33XX_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 442#define AM33XX_DPLL_CLKOUT_GATE_CTRL_SHIFT 8
443#define AM33XX_DPLL_CLKOUT_GATE_CTRL_WIDTH 1
364#define AM33XX_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) 444#define AM33XX_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8)
365 445
366/* 446/*
@@ -368,19 +448,22 @@
368 * CM_CLKSEL_DPLL_MPU 448 * CM_CLKSEL_DPLL_MPU
369 */ 449 */
370#define AM33XX_DPLL_DIV_SHIFT 0 450#define AM33XX_DPLL_DIV_SHIFT 0
451#define AM33XX_DPLL_DIV_WIDTH 7
371#define AM33XX_DPLL_DIV_MASK (0x7f << 0) 452#define AM33XX_DPLL_DIV_MASK (0x7f << 0)
372 453
373#define AM33XX_DPLL_PER_DIV_MASK (0xff << 0) 454#define AM33XX_DPLL_PER_DIV_MASK (0xff << 0)
374 455
375/* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_PERIPH */ 456/* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_PERIPH */
376#define AM33XX_DPLL_DIV_0_7_SHIFT 0 457#define AM33XX_DPLL_DIV_0_7_SHIFT 0
377#define AM33XX_DPLL_DIV_0_7_MASK (0x07 << 0) 458#define AM33XX_DPLL_DIV_0_7_WIDTH 8
459#define AM33XX_DPLL_DIV_0_7_MASK (0xff << 0)
378 460
379/* 461/*
380 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP, 462 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
381 * CM_CLKMODE_DPLL_MPU 463 * CM_CLKMODE_DPLL_MPU
382 */ 464 */
383#define AM33XX_DPLL_DRIFTGUARD_EN_SHIFT 8 465#define AM33XX_DPLL_DRIFTGUARD_EN_SHIFT 8
466#define AM33XX_DPLL_DRIFTGUARD_EN_WIDTH 1
384#define AM33XX_DPLL_DRIFTGUARD_EN_MASK (1 << 8) 467#define AM33XX_DPLL_DRIFTGUARD_EN_MASK (1 << 8)
385 468
386/* 469/*
@@ -388,6 +471,7 @@
388 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER 471 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
389 */ 472 */
390#define AM33XX_DPLL_EN_SHIFT 0 473#define AM33XX_DPLL_EN_SHIFT 0
474#define AM33XX_DPLL_EN_WIDTH 3
391#define AM33XX_DPLL_EN_MASK (0x7 << 0) 475#define AM33XX_DPLL_EN_MASK (0x7 << 0)
392 476
393/* 477/*
@@ -395,6 +479,7 @@
395 * CM_CLKMODE_DPLL_MPU 479 * CM_CLKMODE_DPLL_MPU
396 */ 480 */
397#define AM33XX_DPLL_LPMODE_EN_SHIFT 10 481#define AM33XX_DPLL_LPMODE_EN_SHIFT 10
482#define AM33XX_DPLL_LPMODE_EN_WIDTH 1
398#define AM33XX_DPLL_LPMODE_EN_MASK (1 << 10) 483#define AM33XX_DPLL_LPMODE_EN_MASK (1 << 10)
399 484
400/* 485/*
@@ -402,10 +487,12 @@
402 * CM_CLKSEL_DPLL_MPU 487 * CM_CLKSEL_DPLL_MPU
403 */ 488 */
404#define AM33XX_DPLL_MULT_SHIFT 8 489#define AM33XX_DPLL_MULT_SHIFT 8
490#define AM33XX_DPLL_MULT_WIDTH 11
405#define AM33XX_DPLL_MULT_MASK (0x7ff << 8) 491#define AM33XX_DPLL_MULT_MASK (0x7ff << 8)
406 492
407/* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_PERIPH */ 493/* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_PERIPH */
408#define AM33XX_DPLL_MULT_PERIPH_SHIFT 8 494#define AM33XX_DPLL_MULT_PERIPH_SHIFT 8
495#define AM33XX_DPLL_MULT_PERIPH_WIDTH 12
409#define AM33XX_DPLL_MULT_PERIPH_MASK (0xfff << 8) 496#define AM33XX_DPLL_MULT_PERIPH_MASK (0xfff << 8)
410 497
411/* 498/*
@@ -413,17 +500,20 @@
413 * CM_CLKMODE_DPLL_MPU 500 * CM_CLKMODE_DPLL_MPU
414 */ 501 */
415#define AM33XX_DPLL_REGM4XEN_SHIFT 11 502#define AM33XX_DPLL_REGM4XEN_SHIFT 11
503#define AM33XX_DPLL_REGM4XEN_WIDTH 1
416#define AM33XX_DPLL_REGM4XEN_MASK (1 << 11) 504#define AM33XX_DPLL_REGM4XEN_MASK (1 << 11)
417 505
418/* Used by CM_CLKSEL_DPLL_PERIPH */ 506/* Used by CM_CLKSEL_DPLL_PERIPH */
419#define AM33XX_DPLL_SD_DIV_SHIFT 24 507#define AM33XX_DPLL_SD_DIV_SHIFT 24
420#define AM33XX_DPLL_SD_DIV_MASK (24, 31) 508#define AM33XX_DPLL_SD_DIV_WIDTH 8
509#define AM33XX_DPLL_SD_DIV_MASK (0xff << 24)
421 510
422/* 511/*
423 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP, 512 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
424 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER 513 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
425 */ 514 */
426#define AM33XX_DPLL_SSC_ACK_SHIFT 13 515#define AM33XX_DPLL_SSC_ACK_SHIFT 13
516#define AM33XX_DPLL_SSC_ACK_WIDTH 1
427#define AM33XX_DPLL_SSC_ACK_MASK (1 << 13) 517#define AM33XX_DPLL_SSC_ACK_MASK (1 << 13)
428 518
429/* 519/*
@@ -431,6 +521,7 @@
431 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER 521 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
432 */ 522 */
433#define AM33XX_DPLL_SSC_DOWNSPREAD_SHIFT 14 523#define AM33XX_DPLL_SSC_DOWNSPREAD_SHIFT 14
524#define AM33XX_DPLL_SSC_DOWNSPREAD_WIDTH 1
434#define AM33XX_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) 525#define AM33XX_DPLL_SSC_DOWNSPREAD_MASK (1 << 14)
435 526
436/* 527/*
@@ -438,54 +529,67 @@
438 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER 529 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
439 */ 530 */
440#define AM33XX_DPLL_SSC_EN_SHIFT 12 531#define AM33XX_DPLL_SSC_EN_SHIFT 12
532#define AM33XX_DPLL_SSC_EN_WIDTH 1
441#define AM33XX_DPLL_SSC_EN_MASK (1 << 12) 533#define AM33XX_DPLL_SSC_EN_MASK (1 << 12)
442 534
443/* Used by CM_DIV_M4_DPLL_CORE */ 535/* Used by CM_DIV_M4_DPLL_CORE */
444#define AM33XX_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 536#define AM33XX_HSDIVIDER_CLKOUT1_DIV_SHIFT 0
537#define AM33XX_HSDIVIDER_CLKOUT1_DIV_WIDTH 5
445#define AM33XX_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) 538#define AM33XX_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0)
446 539
447/* Used by CM_DIV_M4_DPLL_CORE */ 540/* Used by CM_DIV_M4_DPLL_CORE */
448#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 541#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5
542#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_WIDTH 1
449#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) 543#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5)
450 544
451/* Used by CM_DIV_M4_DPLL_CORE */ 545/* Used by CM_DIV_M4_DPLL_CORE */
452#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 546#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8
547#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_WIDTH 1
453#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) 548#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8)
454 549
455/* Used by CM_DIV_M4_DPLL_CORE */ 550/* Used by CM_DIV_M4_DPLL_CORE */
456#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 551#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12
552#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_WIDTH 1
457#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) 553#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12)
458 554
459/* Used by CM_DIV_M5_DPLL_CORE */ 555/* Used by CM_DIV_M5_DPLL_CORE */
460#define AM33XX_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 556#define AM33XX_HSDIVIDER_CLKOUT2_DIV_SHIFT 0
557#define AM33XX_HSDIVIDER_CLKOUT2_DIV_WIDTH 5
461#define AM33XX_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) 558#define AM33XX_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0)
462 559
463/* Used by CM_DIV_M5_DPLL_CORE */ 560/* Used by CM_DIV_M5_DPLL_CORE */
464#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 561#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5
562#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_WIDTH 1
465#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) 563#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5)
466 564
467/* Used by CM_DIV_M5_DPLL_CORE */ 565/* Used by CM_DIV_M5_DPLL_CORE */
468#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 566#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8
567#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_WIDTH 1
469#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) 568#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8)
470 569
471/* Used by CM_DIV_M5_DPLL_CORE */ 570/* Used by CM_DIV_M5_DPLL_CORE */
472#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 571#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12
572#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_WIDTH 1
473#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) 573#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12)
474 574
475/* Used by CM_DIV_M6_DPLL_CORE */ 575/* Used by CM_DIV_M6_DPLL_CORE */
476#define AM33XX_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 576#define AM33XX_HSDIVIDER_CLKOUT3_DIV_SHIFT 0
477#define AM33XX_HSDIVIDER_CLKOUT3_DIV_MASK (0x04 << 0) 577#define AM33XX_HSDIVIDER_CLKOUT3_DIV_WIDTH 5
578#define AM33XX_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0)
478 579
479/* Used by CM_DIV_M6_DPLL_CORE */ 580/* Used by CM_DIV_M6_DPLL_CORE */
480#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 581#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5
582#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_WIDTH 1
481#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) 583#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5)
482 584
483/* Used by CM_DIV_M6_DPLL_CORE */ 585/* Used by CM_DIV_M6_DPLL_CORE */
484#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 586#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8
587#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_WIDTH 1
485#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) 588#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8)
486 589
487/* Used by CM_DIV_M6_DPLL_CORE */ 590/* Used by CM_DIV_M6_DPLL_CORE */
488#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 591#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12
592#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_WIDTH 1
489#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) 593#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12)
490 594
491/* 595/*
@@ -522,11 +626,12 @@
522 * CM_GFX_MMUCFG_CLKCTRL, CM_GFX_MMUDATA_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL 626 * CM_GFX_MMUCFG_CLKCTRL, CM_GFX_MMUDATA_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL
523 */ 627 */
524#define AM33XX_IDLEST_SHIFT 16 628#define AM33XX_IDLEST_SHIFT 16
629#define AM33XX_IDLEST_WIDTH 2
525#define AM33XX_IDLEST_MASK (0x3 << 16) 630#define AM33XX_IDLEST_MASK (0x3 << 16)
526#define AM33XX_IDLEST_VAL 0x3
527 631
528/* Used by CM_MAC_CLKSEL */ 632/* Used by CM_MAC_CLKSEL */
529#define AM33XX_MII_CLK_SEL_SHIFT 2 633#define AM33XX_MII_CLK_SEL_SHIFT 2
634#define AM33XX_MII_CLK_SEL_WIDTH 1
530#define AM33XX_MII_CLK_SEL_MASK (1 << 2) 635#define AM33XX_MII_CLK_SEL_MASK (1 << 2)
531 636
532/* 637/*
@@ -535,7 +640,8 @@
535 * CM_SSC_MODFREQDIV_DPLL_PER 640 * CM_SSC_MODFREQDIV_DPLL_PER
536 */ 641 */
537#define AM33XX_MODFREQDIV_EXPONENT_SHIFT 8 642#define AM33XX_MODFREQDIV_EXPONENT_SHIFT 8
538#define AM33XX_MODFREQDIV_EXPONENT_MASK (0x10 << 8) 643#define AM33XX_MODFREQDIV_EXPONENT_WIDTH 3
644#define AM33XX_MODFREQDIV_EXPONENT_MASK (0x7 << 8)
539 645
540/* 646/*
541 * Used by CM_SSC_MODFREQDIV_DPLL_CORE, CM_SSC_MODFREQDIV_DPLL_DDR, 647 * Used by CM_SSC_MODFREQDIV_DPLL_CORE, CM_SSC_MODFREQDIV_DPLL_DDR,
@@ -543,7 +649,8 @@
543 * CM_SSC_MODFREQDIV_DPLL_PER 649 * CM_SSC_MODFREQDIV_DPLL_PER
544 */ 650 */
545#define AM33XX_MODFREQDIV_MANTISSA_SHIFT 0 651#define AM33XX_MODFREQDIV_MANTISSA_SHIFT 0
546#define AM33XX_MODFREQDIV_MANTISSA_MASK (0x06 << 0) 652#define AM33XX_MODFREQDIV_MANTISSA_WIDTH 7
653#define AM33XX_MODFREQDIV_MANTISSA_MASK (0x7f << 0)
547 654
548/* 655/*
549 * Used by CM_MPU_MPU_CLKCTRL, CM_RTC_RTC_CLKCTRL, CM_PER_AES0_CLKCTRL, 656 * Used by CM_MPU_MPU_CLKCTRL, CM_RTC_RTC_CLKCTRL, CM_PER_AES0_CLKCTRL,
@@ -580,42 +687,52 @@
580 * CM_CEFUSE_CEFUSE_CLKCTRL 687 * CM_CEFUSE_CEFUSE_CLKCTRL
581 */ 688 */
582#define AM33XX_MODULEMODE_SHIFT 0 689#define AM33XX_MODULEMODE_SHIFT 0
690#define AM33XX_MODULEMODE_WIDTH 2
583#define AM33XX_MODULEMODE_MASK (0x3 << 0) 691#define AM33XX_MODULEMODE_MASK (0x3 << 0)
584 692
585/* Used by CM_WKUP_DEBUGSS_CLKCTRL */ 693/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
586#define AM33XX_OPTCLK_DEBUG_CLKA_SHIFT 30 694#define AM33XX_OPTCLK_DEBUG_CLKA_SHIFT 30
695#define AM33XX_OPTCLK_DEBUG_CLKA_WIDTH 1
587#define AM33XX_OPTCLK_DEBUG_CLKA_MASK (1 << 30) 696#define AM33XX_OPTCLK_DEBUG_CLKA_MASK (1 << 30)
588 697
589/* Used by CM_WKUP_DEBUGSS_CLKCTRL */ 698/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
590#define AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT 19 699#define AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT 19
700#define AM33XX_OPTFCLKEN_DBGSYSCLK_WIDTH 1
591#define AM33XX_OPTFCLKEN_DBGSYSCLK_MASK (1 << 19) 701#define AM33XX_OPTFCLKEN_DBGSYSCLK_MASK (1 << 19)
592 702
593/* Used by CM_WKUP_GPIO0_CLKCTRL */ 703/* Used by CM_WKUP_GPIO0_CLKCTRL */
594#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_SHIFT 18 704#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_SHIFT 18
705#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_WIDTH 1
595#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_MASK (1 << 18) 706#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_MASK (1 << 18)
596 707
597/* Used by CM_PER_GPIO1_CLKCTRL */ 708/* Used by CM_PER_GPIO1_CLKCTRL */
598#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_SHIFT 18 709#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_SHIFT 18
710#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_WIDTH 1
599#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_MASK (1 << 18) 711#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_MASK (1 << 18)
600 712
601/* Used by CM_PER_GPIO2_CLKCTRL */ 713/* Used by CM_PER_GPIO2_CLKCTRL */
602#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_SHIFT 18 714#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_SHIFT 18
715#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_WIDTH 1
603#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_MASK (1 << 18) 716#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_MASK (1 << 18)
604 717
605/* Used by CM_PER_GPIO3_CLKCTRL */ 718/* Used by CM_PER_GPIO3_CLKCTRL */
606#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_SHIFT 18 719#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_SHIFT 18
720#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_WIDTH 1
607#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_MASK (1 << 18) 721#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_MASK (1 << 18)
608 722
609/* Used by CM_PER_GPIO4_CLKCTRL */ 723/* Used by CM_PER_GPIO4_CLKCTRL */
610#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_SHIFT 18 724#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_SHIFT 18
725#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_WIDTH 1
611#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_MASK (1 << 18) 726#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_MASK (1 << 18)
612 727
613/* Used by CM_PER_GPIO5_CLKCTRL */ 728/* Used by CM_PER_GPIO5_CLKCTRL */
614#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_SHIFT 18 729#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_SHIFT 18
730#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_WIDTH 1
615#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_MASK (1 << 18) 731#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_MASK (1 << 18)
616 732
617/* Used by CM_PER_GPIO6_CLKCTRL */ 733/* Used by CM_PER_GPIO6_CLKCTRL */
618#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_SHIFT 18 734#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_SHIFT 18
735#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_WIDTH 1
619#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_MASK (1 << 18) 736#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_MASK (1 << 18)
620 737
621/* 738/*
@@ -627,25 +744,30 @@
627 * CM_WKUP_WKUP_M3_CLKCTRL, CM_GFX_BITBLT_CLKCTRL, CM_GFX_GFX_CLKCTRL 744 * CM_WKUP_WKUP_M3_CLKCTRL, CM_GFX_BITBLT_CLKCTRL, CM_GFX_GFX_CLKCTRL
628 */ 745 */
629#define AM33XX_STBYST_SHIFT 18 746#define AM33XX_STBYST_SHIFT 18
747#define AM33XX_STBYST_WIDTH 1
630#define AM33XX_STBYST_MASK (1 << 18) 748#define AM33XX_STBYST_MASK (1 << 18)
631 749
632/* Used by CM_WKUP_DEBUGSS_CLKCTRL */ 750/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
633#define AM33XX_STM_PMD_CLKDIVSEL_SHIFT 27 751#define AM33XX_STM_PMD_CLKDIVSEL_SHIFT 27
634#define AM33XX_STM_PMD_CLKDIVSEL_MASK (0x29 << 27) 752#define AM33XX_STM_PMD_CLKDIVSEL_WIDTH 3
753#define AM33XX_STM_PMD_CLKDIVSEL_MASK (0x7 << 27)
635 754
636/* Used by CM_WKUP_DEBUGSS_CLKCTRL */ 755/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
637#define AM33XX_STM_PMD_CLKSEL_SHIFT 22 756#define AM33XX_STM_PMD_CLKSEL_SHIFT 22
638#define AM33XX_STM_PMD_CLKSEL_MASK (0x23 << 22) 757#define AM33XX_STM_PMD_CLKSEL_WIDTH 2
758#define AM33XX_STM_PMD_CLKSEL_MASK (0x3 << 22)
639 759
640/* 760/*
641 * Used by CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDR, CM_IDLEST_DPLL_DISP, 761 * Used by CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDR, CM_IDLEST_DPLL_DISP,
642 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER 762 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER
643 */ 763 */
644#define AM33XX_ST_DPLL_CLK_SHIFT 0 764#define AM33XX_ST_DPLL_CLK_SHIFT 0
765#define AM33XX_ST_DPLL_CLK_WIDTH 1
645#define AM33XX_ST_DPLL_CLK_MASK (1 << 0) 766#define AM33XX_ST_DPLL_CLK_MASK (1 << 0)
646 767
647/* Used by CM_CLKDCOLDO_DPLL_PER */ 768/* Used by CM_CLKDCOLDO_DPLL_PER */
648#define AM33XX_ST_DPLL_CLKDCOLDO_SHIFT 8 769#define AM33XX_ST_DPLL_CLKDCOLDO_SHIFT 8
770#define AM33XX_ST_DPLL_CLKDCOLDO_WIDTH 1
649#define AM33XX_ST_DPLL_CLKDCOLDO_MASK (1 << 8) 771#define AM33XX_ST_DPLL_CLKDCOLDO_MASK (1 << 8)
650 772
651/* 773/*
@@ -653,18 +775,22 @@
653 * CM_DIV_M2_DPLL_PER 775 * CM_DIV_M2_DPLL_PER
654 */ 776 */
655#define AM33XX_ST_DPLL_CLKOUT_SHIFT 9 777#define AM33XX_ST_DPLL_CLKOUT_SHIFT 9
778#define AM33XX_ST_DPLL_CLKOUT_WIDTH 1
656#define AM33XX_ST_DPLL_CLKOUT_MASK (1 << 9) 779#define AM33XX_ST_DPLL_CLKOUT_MASK (1 << 9)
657 780
658/* Used by CM_DIV_M4_DPLL_CORE */ 781/* Used by CM_DIV_M4_DPLL_CORE */
659#define AM33XX_ST_HSDIVIDER_CLKOUT1_SHIFT 9 782#define AM33XX_ST_HSDIVIDER_CLKOUT1_SHIFT 9
783#define AM33XX_ST_HSDIVIDER_CLKOUT1_WIDTH 1
660#define AM33XX_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) 784#define AM33XX_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9)
661 785
662/* Used by CM_DIV_M5_DPLL_CORE */ 786/* Used by CM_DIV_M5_DPLL_CORE */
663#define AM33XX_ST_HSDIVIDER_CLKOUT2_SHIFT 9 787#define AM33XX_ST_HSDIVIDER_CLKOUT2_SHIFT 9
788#define AM33XX_ST_HSDIVIDER_CLKOUT2_WIDTH 1
664#define AM33XX_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) 789#define AM33XX_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9)
665 790
666/* Used by CM_DIV_M6_DPLL_CORE */ 791/* Used by CM_DIV_M6_DPLL_CORE */
667#define AM33XX_ST_HSDIVIDER_CLKOUT3_SHIFT 9 792#define AM33XX_ST_HSDIVIDER_CLKOUT3_SHIFT 9
793#define AM33XX_ST_HSDIVIDER_CLKOUT3_WIDTH 1
668#define AM33XX_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) 794#define AM33XX_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9)
669 795
670/* 796/*
@@ -672,16 +798,20 @@
672 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER 798 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER
673 */ 799 */
674#define AM33XX_ST_MN_BYPASS_SHIFT 8 800#define AM33XX_ST_MN_BYPASS_SHIFT 8
801#define AM33XX_ST_MN_BYPASS_WIDTH 1
675#define AM33XX_ST_MN_BYPASS_MASK (1 << 8) 802#define AM33XX_ST_MN_BYPASS_MASK (1 << 8)
676 803
677/* Used by CM_WKUP_DEBUGSS_CLKCTRL */ 804/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
678#define AM33XX_TRC_PMD_CLKDIVSEL_SHIFT 24 805#define AM33XX_TRC_PMD_CLKDIVSEL_SHIFT 24
679#define AM33XX_TRC_PMD_CLKDIVSEL_MASK (0x26 << 24) 806#define AM33XX_TRC_PMD_CLKDIVSEL_WIDTH 3
807#define AM33XX_TRC_PMD_CLKDIVSEL_MASK (0x7 << 24)
680 808
681/* Used by CM_WKUP_DEBUGSS_CLKCTRL */ 809/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
682#define AM33XX_TRC_PMD_CLKSEL_SHIFT 20 810#define AM33XX_TRC_PMD_CLKSEL_SHIFT 20
683#define AM33XX_TRC_PMD_CLKSEL_MASK (0x21 << 20) 811#define AM33XX_TRC_PMD_CLKSEL_WIDTH 2
812#define AM33XX_TRC_PMD_CLKSEL_MASK (0x3 << 20)
684 813
685/* Used by CONTROL_SEC_CLK_CTRL */ 814/* Used by CONTROL_SEC_CLK_CTRL */
815#define AM33XX_TIMER0_CLKSEL_WIDTH 2
686#define AM33XX_TIMER0_CLKSEL_MASK (0x3 << 4) 816#define AM33XX_TIMER0_CLKSEL_MASK (0x3 << 4)
687#endif 817#endif
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index 975f6bda0e0b..59598ffd8783 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -218,6 +218,8 @@
218#define OMAP3430_ST_MAILBOXES_MASK (1 << 7) 218#define OMAP3430_ST_MAILBOXES_MASK (1 << 7)
219#define OMAP3430_ST_OMAPCTRL_SHIFT 6 219#define OMAP3430_ST_OMAPCTRL_SHIFT 6
220#define OMAP3430_ST_OMAPCTRL_MASK (1 << 6) 220#define OMAP3430_ST_OMAPCTRL_MASK (1 << 6)
221#define OMAP3430_ST_SAD2D_SHIFT 3
222#define OMAP3430_ST_SAD2D_MASK (1 << 3)
221#define OMAP3430_ST_SDMA_SHIFT 2 223#define OMAP3430_ST_SDMA_SHIFT 2
222#define OMAP3430_ST_SDMA_MASK (1 << 2) 224#define OMAP3430_ST_SDMA_MASK (1 << 2)
223#define OMAP3430_ST_SDRC_SHIFT 1 225#define OMAP3430_ST_SDRC_SHIFT 1
diff --git a/arch/arm/mach-omap2/cm-regbits-44xx.h b/arch/arm/mach-omap2/cm-regbits-44xx.h
index 65597a745638..4c6c2f7de65b 100644
--- a/arch/arm/mach-omap2/cm-regbits-44xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-44xx.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP44xx Clock Management register bits 2 * OMAP44xx Clock Management register bits
3 * 3 *
4 * Copyright (C) 2009-2010 Texas Instruments, Inc. 4 * Copyright (C) 2009-2012 Texas Instruments, Inc.
5 * Copyright (C) 2009-2010 Nokia Corporation 5 * Copyright (C) 2009-2010 Nokia Corporation
6 * 6 *
7 * Paul Walmsley (paul@pwsan.com) 7 * Paul Walmsley (paul@pwsan.com)
@@ -24,6 +24,7 @@
24 24
25/* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ 25/* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
26#define OMAP4430_ABE_DYNDEP_SHIFT 3 26#define OMAP4430_ABE_DYNDEP_SHIFT 3
27#define OMAP4430_ABE_DYNDEP_WIDTH 0x1
27#define OMAP4430_ABE_DYNDEP_MASK (1 << 3) 28#define OMAP4430_ABE_DYNDEP_MASK (1 << 3)
28 29
29/* 30/*
@@ -31,14 +32,17 @@
31 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 32 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
32 */ 33 */
33#define OMAP4430_ABE_STATDEP_SHIFT 3 34#define OMAP4430_ABE_STATDEP_SHIFT 3
35#define OMAP4430_ABE_STATDEP_WIDTH 0x1
34#define OMAP4430_ABE_STATDEP_MASK (1 << 3) 36#define OMAP4430_ABE_STATDEP_MASK (1 << 3)
35 37
36/* Used by CM_L4CFG_DYNAMICDEP */ 38/* Used by CM_L4CFG_DYNAMICDEP */
37#define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 39#define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16
40#define OMAP4430_ALWONCORE_DYNDEP_WIDTH 0x1
38#define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16) 41#define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16)
39 42
40/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ 43/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */
41#define OMAP4430_ALWONCORE_STATDEP_SHIFT 16 44#define OMAP4430_ALWONCORE_STATDEP_SHIFT 16
45#define OMAP4430_ALWONCORE_STATDEP_WIDTH 0x1
42#define OMAP4430_ALWONCORE_STATDEP_MASK (1 << 16) 46#define OMAP4430_ALWONCORE_STATDEP_MASK (1 << 16)
43 47
44/* 48/*
@@ -47,294 +51,367 @@
47 * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB 51 * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB
48 */ 52 */
49#define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 53#define OMAP4430_AUTO_DPLL_MODE_SHIFT 0
54#define OMAP4430_AUTO_DPLL_MODE_WIDTH 0x3
50#define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) 55#define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0)
51 56
52/* Used by CM_L4CFG_DYNAMICDEP */ 57/* Used by CM_L4CFG_DYNAMICDEP */
53#define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 58#define OMAP4430_CEFUSE_DYNDEP_SHIFT 17
59#define OMAP4430_CEFUSE_DYNDEP_WIDTH 0x1
54#define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17) 60#define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17)
55 61
56/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ 62/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */
57#define OMAP4430_CEFUSE_STATDEP_SHIFT 17 63#define OMAP4430_CEFUSE_STATDEP_SHIFT 17
64#define OMAP4430_CEFUSE_STATDEP_WIDTH 0x1
58#define OMAP4430_CEFUSE_STATDEP_MASK (1 << 17) 65#define OMAP4430_CEFUSE_STATDEP_MASK (1 << 17)
59 66
60/* Used by CM1_ABE_CLKSTCTRL */ 67/* Used by CM1_ABE_CLKSTCTRL */
61#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13 68#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13
69#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_WIDTH 0x1
62#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13) 70#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13)
63 71
64/* Used by CM1_ABE_CLKSTCTRL */ 72/* Used by CM1_ABE_CLKSTCTRL */
65#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT 12 73#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT 12
74#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_WIDTH 0x1
66#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK (1 << 12) 75#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK (1 << 12)
67 76
68/* Used by CM_WKUP_CLKSTCTRL */ 77/* Used by CM_WKUP_CLKSTCTRL */
69#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT 9 78#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT 9
79#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_WIDTH 0x1
70#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9) 80#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9)
71 81
72/* Used by CM1_ABE_CLKSTCTRL */ 82/* Used by CM1_ABE_CLKSTCTRL */
73#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT 11 83#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT 11
84#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_WIDTH 0x1
74#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK (1 << 11) 85#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK (1 << 11)
75 86
76/* Used by CM1_ABE_CLKSTCTRL */ 87/* Used by CM1_ABE_CLKSTCTRL */
77#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 88#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8
89#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_WIDTH 0x1
78#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8) 90#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8)
79 91
80/* Used by CM_MEMIF_CLKSTCTRL */ 92/* Used by CM_MEMIF_CLKSTCTRL */
81#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 93#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11
94#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_WIDTH 0x1
82#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11) 95#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11)
83 96
84/* Used by CM_MEMIF_CLKSTCTRL */ 97/* Used by CM_MEMIF_CLKSTCTRL */
85#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 98#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12
99#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_WIDTH 0x1
86#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12) 100#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12)
87 101
88/* Used by CM_MEMIF_CLKSTCTRL */ 102/* Used by CM_MEMIF_CLKSTCTRL */
89#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 103#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13
104#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_WIDTH 0x1
90#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13) 105#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13)
91 106
92/* Used by CM_CAM_CLKSTCTRL */ 107/* Used by CM_CAM_CLKSTCTRL */
93#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT 9 108#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT 9
109#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_WIDTH 0x1
94#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK (1 << 9) 110#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK (1 << 9)
95 111
96/* Used by CM_ALWON_CLKSTCTRL */ 112/* Used by CM_ALWON_CLKSTCTRL */
97#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_SHIFT 12 113#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_SHIFT 12
114#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_WIDTH 0x1
98#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_MASK (1 << 12) 115#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_MASK (1 << 12)
99 116
100/* Used by CM_EMU_CLKSTCTRL */ 117/* Used by CM_EMU_CLKSTCTRL */
101#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9 118#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9
119#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_WIDTH 0x1
102#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9) 120#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9)
103 121
104/* Used by CM_L4CFG_CLKSTCTRL */ 122/* Used by CM_L4CFG_CLKSTCTRL */
105#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_SHIFT 9 123#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_SHIFT 9
124#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_WIDTH 0x1
106#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_MASK (1 << 9) 125#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_MASK (1 << 9)
107 126
108/* Used by CM_CEFUSE_CLKSTCTRL */ 127/* Used by CM_CEFUSE_CLKSTCTRL */
109#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 128#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9
129#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_WIDTH 0x1
110#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) 130#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9)
111 131
112/* Used by CM_MEMIF_CLKSTCTRL */ 132/* Used by CM_MEMIF_CLKSTCTRL */
113#define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 133#define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9
134#define OMAP4430_CLKACTIVITY_DLL_CLK_WIDTH 0x1
114#define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9) 135#define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9)
115 136
116/* Used by CM_L4PER_CLKSTCTRL */ 137/* Used by CM_L4PER_CLKSTCTRL */
117#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 138#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9
139#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_WIDTH 0x1
118#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9) 140#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9)
119 141
120/* Used by CM_L4PER_CLKSTCTRL */ 142/* Used by CM_L4PER_CLKSTCTRL */
121#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 143#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10
144#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_WIDTH 0x1
122#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10) 145#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10)
123 146
124/* Used by CM_L4PER_CLKSTCTRL */ 147/* Used by CM_L4PER_CLKSTCTRL */
125#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 148#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11
149#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_WIDTH 0x1
126#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11) 150#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11)
127 151
128/* Used by CM_L4PER_CLKSTCTRL */ 152/* Used by CM_L4PER_CLKSTCTRL */
129#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 153#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12
154#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_WIDTH 0x1
130#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12) 155#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12)
131 156
132/* Used by CM_L4PER_CLKSTCTRL */ 157/* Used by CM_L4PER_CLKSTCTRL */
133#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 158#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13
159#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_WIDTH 0x1
134#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13) 160#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13)
135 161
136/* Used by CM_L4PER_CLKSTCTRL */ 162/* Used by CM_L4PER_CLKSTCTRL */
137#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 163#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14
164#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_WIDTH 0x1
138#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14) 165#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14)
139 166
140/* Used by CM_DSS_CLKSTCTRL */ 167/* Used by CM_DSS_CLKSTCTRL */
141#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT 10 168#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT 10
169#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_WIDTH 0x1
142#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK (1 << 10) 170#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK (1 << 10)
143 171
144/* Used by CM_DSS_CLKSTCTRL */ 172/* Used by CM_DSS_CLKSTCTRL */
145#define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT 9 173#define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT 9
174#define OMAP4430_CLKACTIVITY_DSS_FCLK_WIDTH 0x1
146#define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK (1 << 9) 175#define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK (1 << 9)
147 176
148/* Used by CM_DUCATI_CLKSTCTRL */ 177/* Used by CM_DUCATI_CLKSTCTRL */
149#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT 8 178#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT 8
179#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_WIDTH 0x1
150#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK (1 << 8) 180#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK (1 << 8)
151 181
152/* Used by CM_EMU_CLKSTCTRL */ 182/* Used by CM_EMU_CLKSTCTRL */
153#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT 8 183#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT 8
184#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_WIDTH 0x1
154#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK (1 << 8) 185#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK (1 << 8)
155 186
156/* Used by CM_CAM_CLKSTCTRL */ 187/* Used by CM_CAM_CLKSTCTRL */
157#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 188#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10
189#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_WIDTH 0x1
158#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10) 190#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10)
159 191
160/* Used by CM_L4PER_CLKSTCTRL */ 192/* Used by CM_L4PER_CLKSTCTRL */
161#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 193#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15
194#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_WIDTH 0x1
162#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15) 195#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15)
163 196
164/* Used by CM1_ABE_CLKSTCTRL */ 197/* Used by CM1_ABE_CLKSTCTRL */
165#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10 198#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10
199#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_WIDTH 0x1
166#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10) 200#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10)
167 201
168/* Used by CM_DSS_CLKSTCTRL */ 202/* Used by CM_DSS_CLKSTCTRL */
169#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 203#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11
204#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_WIDTH 0x1
170#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11) 205#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11)
171 206
172/* Used by CM_L3INIT_CLKSTCTRL */ 207/* Used by CM_L3INIT_CLKSTCTRL */
173#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 208#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20
209#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_WIDTH 0x1
174#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20) 210#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20)
175 211
176/* Used by CM_L3INIT_CLKSTCTRL */ 212/* Used by CM_L3INIT_CLKSTCTRL */
177#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 213#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26
214#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_WIDTH 0x1
178#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26) 215#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26)
179 216
180/* Used by CM_L3INIT_CLKSTCTRL */ 217/* Used by CM_L3INIT_CLKSTCTRL */
181#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 218#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21
219#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_WIDTH 0x1
182#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21) 220#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21)
183 221
184/* Used by CM_L3INIT_CLKSTCTRL */ 222/* Used by CM_L3INIT_CLKSTCTRL */
185#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 223#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27
224#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_WIDTH 0x1
186#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27) 225#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27)
187 226
188/* Used by CM_L3INIT_CLKSTCTRL */ 227/* Used by CM_L3INIT_CLKSTCTRL */
189#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 228#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13
229#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_WIDTH 0x1
190#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13) 230#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13)
191 231
192/* Used by CM_L3INIT_CLKSTCTRL */ 232/* Used by CM_L3INIT_CLKSTCTRL */
193#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 233#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12
234#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_WIDTH 0x1
194#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12) 235#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12)
195 236
196/* Used by CM_L3INIT_CLKSTCTRL */ 237/* Used by CM_L3INIT_CLKSTCTRL */
197#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 238#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28
239#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_WIDTH 0x1
198#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28) 240#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28)
199 241
200/* Used by CM_L3INIT_CLKSTCTRL */ 242/* Used by CM_L3INIT_CLKSTCTRL */
201#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 243#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29
244#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_WIDTH 0x1
202#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29) 245#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29)
203 246
204/* Used by CM_L3INIT_CLKSTCTRL */ 247/* Used by CM_L3INIT_CLKSTCTRL */
205#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 248#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11
249#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_WIDTH 0x1
206#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11) 250#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11)
207 251
208/* Used by CM_L3INIT_CLKSTCTRL */ 252/* Used by CM_L3INIT_CLKSTCTRL */
209#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 253#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16
254#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_WIDTH 0x1
210#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16) 255#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16)
211 256
212/* Used by CM_L3INIT_CLKSTCTRL */ 257/* Used by CM_L3INIT_CLKSTCTRL */
213#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 258#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17
259#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_WIDTH 0x1
214#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17) 260#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17)
215 261
216/* Used by CM_L3INIT_CLKSTCTRL */ 262/* Used by CM_L3INIT_CLKSTCTRL */
217#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 263#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18
264#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_WIDTH 0x1
218#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18) 265#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18)
219 266
220/* Used by CM_L3INIT_CLKSTCTRL */ 267/* Used by CM_L3INIT_CLKSTCTRL */
221#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 268#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19
269#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_WIDTH 0x1
222#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19) 270#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19)
223 271
224/* Used by CM_CAM_CLKSTCTRL */ 272/* Used by CM_CAM_CLKSTCTRL */
225#define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT 8 273#define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT 8
274#define OMAP4430_CLKACTIVITY_ISS_GCLK_WIDTH 0x1
226#define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK (1 << 8) 275#define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK (1 << 8)
227 276
228/* Used by CM_IVAHD_CLKSTCTRL */ 277/* Used by CM_IVAHD_CLKSTCTRL */
229#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT 8 278#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT 8
279#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_WIDTH 0x1
230#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK (1 << 8) 280#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK (1 << 8)
231 281
232/* Used by CM_D2D_CLKSTCTRL */ 282/* Used by CM_D2D_CLKSTCTRL */
233#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10 283#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10
284#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_WIDTH 0x1
234#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10) 285#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10)
235 286
236/* Used by CM_L3_1_CLKSTCTRL */ 287/* Used by CM_L3_1_CLKSTCTRL */
237#define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 288#define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8
289#define OMAP4430_CLKACTIVITY_L3_1_GICLK_WIDTH 0x1
238#define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8) 290#define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8)
239 291
240/* Used by CM_L3_2_CLKSTCTRL */ 292/* Used by CM_L3_2_CLKSTCTRL */
241#define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 293#define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8
294#define OMAP4430_CLKACTIVITY_L3_2_GICLK_WIDTH 0x1
242#define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8) 295#define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8)
243 296
244/* Used by CM_D2D_CLKSTCTRL */ 297/* Used by CM_D2D_CLKSTCTRL */
245#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT 8 298#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT 8
299#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_WIDTH 0x1
246#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK (1 << 8) 300#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK (1 << 8)
247 301
248/* Used by CM_SDMA_CLKSTCTRL */ 302/* Used by CM_SDMA_CLKSTCTRL */
249#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT 8 303#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT 8
304#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_WIDTH 0x1
250#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK (1 << 8) 305#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK (1 << 8)
251 306
252/* Used by CM_DSS_CLKSTCTRL */ 307/* Used by CM_DSS_CLKSTCTRL */
253#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 308#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8
309#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_WIDTH 0x1
254#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8) 310#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8)
255 311
256/* Used by CM_MEMIF_CLKSTCTRL */ 312/* Used by CM_MEMIF_CLKSTCTRL */
257#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 313#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8
314#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_WIDTH 0x1
258#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8) 315#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8)
259 316
260/* Used by CM_GFX_CLKSTCTRL */ 317/* Used by CM_GFX_CLKSTCTRL */
261#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 318#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8
319#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_WIDTH 0x1
262#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8) 320#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8)
263 321
264/* Used by CM_L3INIT_CLKSTCTRL */ 322/* Used by CM_L3INIT_CLKSTCTRL */
265#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 323#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8
324#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_WIDTH 0x1
266#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8) 325#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8)
267 326
268/* Used by CM_L3INSTR_CLKSTCTRL */ 327/* Used by CM_L3INSTR_CLKSTCTRL */
269#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT 8 328#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT 8
329#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_WIDTH 0x1
270#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK (1 << 8) 330#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK (1 << 8)
271 331
272/* Used by CM_L4SEC_CLKSTCTRL */ 332/* Used by CM_L4SEC_CLKSTCTRL */
273#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT 8 333#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT 8
334#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_WIDTH 0x1
274#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK (1 << 8) 335#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK (1 << 8)
275 336
276/* Used by CM_ALWON_CLKSTCTRL */ 337/* Used by CM_ALWON_CLKSTCTRL */
277#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT 8 338#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT 8
339#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_WIDTH 0x1
278#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK (1 << 8) 340#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK (1 << 8)
279 341
280/* Used by CM_CEFUSE_CLKSTCTRL */ 342/* Used by CM_CEFUSE_CLKSTCTRL */
281#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 343#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8
344#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_WIDTH 0x1
282#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) 345#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8)
283 346
284/* Used by CM_L4CFG_CLKSTCTRL */ 347/* Used by CM_L4CFG_CLKSTCTRL */
285#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 348#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8
349#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_WIDTH 0x1
286#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8) 350#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8)
287 351
288/* Used by CM_D2D_CLKSTCTRL */ 352/* Used by CM_D2D_CLKSTCTRL */
289#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 353#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9
354#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_WIDTH 0x1
290#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9) 355#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9)
291 356
292/* Used by CM_L3INIT_CLKSTCTRL */ 357/* Used by CM_L3INIT_CLKSTCTRL */
293#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 358#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9
359#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_WIDTH 0x1
294#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9) 360#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9)
295 361
296/* Used by CM_L4PER_CLKSTCTRL */ 362/* Used by CM_L4PER_CLKSTCTRL */
297#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 363#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8
364#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_WIDTH 0x1
298#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8) 365#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8)
299 366
300/* Used by CM_L4SEC_CLKSTCTRL */ 367/* Used by CM_L4SEC_CLKSTCTRL */
301#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT 9 368#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT 9
369#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_WIDTH 0x1
302#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK (1 << 9) 370#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK (1 << 9)
303 371
304/* Used by CM_WKUP_CLKSTCTRL */ 372/* Used by CM_WKUP_CLKSTCTRL */
305#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 373#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12
374#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_WIDTH 0x1
306#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12) 375#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12)
307 376
308/* Used by CM_MPU_CLKSTCTRL */ 377/* Used by CM_MPU_CLKSTCTRL */
309#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 378#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8
379#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_WIDTH 0x1
310#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8) 380#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8)
311 381
312/* Used by CM1_ABE_CLKSTCTRL */ 382/* Used by CM1_ABE_CLKSTCTRL */
313#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 383#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9
384#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_WIDTH 0x1
314#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9) 385#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9)
315 386
316/* Used by CM_L4PER_CLKSTCTRL */ 387/* Used by CM_L4PER_CLKSTCTRL */
317#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 388#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16
389#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_WIDTH 0x1
318#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16) 390#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16)
319 391
320/* Used by CM_L4PER_CLKSTCTRL */ 392/* Used by CM_L4PER_CLKSTCTRL */
321#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 393#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17
394#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_WIDTH 0x1
322#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17) 395#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17)
323 396
324/* Used by CM_L4PER_CLKSTCTRL */ 397/* Used by CM_L4PER_CLKSTCTRL */
325#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 398#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18
399#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_WIDTH 0x1
326#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18) 400#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18)
327 401
328/* Used by CM_L4PER_CLKSTCTRL */ 402/* Used by CM_L4PER_CLKSTCTRL */
329#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 403#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19
404#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_WIDTH 0x1
330#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19) 405#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19)
331 406
332/* Used by CM_L4PER_CLKSTCTRL */ 407/* Used by CM_L4PER_CLKSTCTRL */
333#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 408#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25
409#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_WIDTH 0x1
334#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25) 410#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25)
335 411
336/* Used by CM_L4PER_CLKSTCTRL */ 412/* Used by CM_L4PER_CLKSTCTRL */
337#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 413#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20
414#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_WIDTH 0x1
338#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20) 415#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20)
339 416
340/* Used by CM_L4PER_CLKSTCTRL */ 417/* Used by CM_L4PER_CLKSTCTRL */
@@ -343,94 +420,114 @@
343 420
344/* Used by CM_L4PER_CLKSTCTRL */ 421/* Used by CM_L4PER_CLKSTCTRL */
345#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 422#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22
423#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_WIDTH 0x1
346#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22) 424#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22)
347 425
348/* Used by CM_L4PER_CLKSTCTRL */ 426/* Used by CM_L4PER_CLKSTCTRL */
349#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 427#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24
428#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_WIDTH 0x1
350#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24) 429#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24)
351 430
352/* Used by CM_MEMIF_CLKSTCTRL */ 431/* Used by CM_MEMIF_CLKSTCTRL */
353#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 432#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10
433#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_WIDTH 0x1
354#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10) 434#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10)
355 435
356/* Used by CM_GFX_CLKSTCTRL */ 436/* Used by CM_GFX_CLKSTCTRL */
357#define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT 9 437#define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT 9
438#define OMAP4430_CLKACTIVITY_SGX_GFCLK_WIDTH 0x1
358#define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK (1 << 9) 439#define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK (1 << 9)
359 440
360/* Used by CM_ALWON_CLKSTCTRL */ 441/* Used by CM_ALWON_CLKSTCTRL */
361#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT 11 442#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT 11
443#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_WIDTH 0x1
362#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK (1 << 11) 444#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK (1 << 11)
363 445
364/* Used by CM_ALWON_CLKSTCTRL */ 446/* Used by CM_ALWON_CLKSTCTRL */
365#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT 10 447#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT 10
448#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_WIDTH 0x1
366#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK (1 << 10) 449#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK (1 << 10)
367 450
368/* Used by CM_ALWON_CLKSTCTRL */ 451/* Used by CM_ALWON_CLKSTCTRL */
369#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT 9 452#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT 9
453#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_WIDTH 0x1
370#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK (1 << 9) 454#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK (1 << 9)
371 455
372/* Used by CM_WKUP_CLKSTCTRL */ 456/* Used by CM_WKUP_CLKSTCTRL */
373#define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT 8 457#define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT 8
458#define OMAP4430_CLKACTIVITY_SYS_CLK_WIDTH 0x1
374#define OMAP4430_CLKACTIVITY_SYS_CLK_MASK (1 << 8) 459#define OMAP4430_CLKACTIVITY_SYS_CLK_MASK (1 << 8)
375 460
376/* Used by CM_TESLA_CLKSTCTRL */ 461/* Used by CM_TESLA_CLKSTCTRL */
377#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 462#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8
463#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_WIDTH 0x1
378#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8) 464#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8)
379 465
380/* Used by CM_L3INIT_CLKSTCTRL */ 466/* Used by CM_L3INIT_CLKSTCTRL */
381#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 467#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22
468#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_WIDTH 0x1
382#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22) 469#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22)
383 470
384/* Used by CM_L3INIT_CLKSTCTRL */ 471/* Used by CM_L3INIT_CLKSTCTRL */
385#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 472#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23
473#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_WIDTH 0x1
386#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23) 474#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23)
387 475
388/* Used by CM_L3INIT_CLKSTCTRL */ 476/* Used by CM_L3INIT_CLKSTCTRL */
389#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 477#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24
478#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_WIDTH 0x1
390#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24) 479#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24)
391 480
392/* Used by CM_L3INIT_CLKSTCTRL */ 481/* Used by CM_L3INIT_CLKSTCTRL */
393#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10 482#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10
483#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_WIDTH 0x1
394#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10) 484#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10)
395 485
396/* Used by CM_L3INIT_CLKSTCTRL */ 486/* Used by CM_L3INIT_CLKSTCTRL */
397#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14 487#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14
488#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_WIDTH 0x1
398#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14) 489#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14)
399 490
400/* Used by CM_L3INIT_CLKSTCTRL */ 491/* Used by CM_L3INIT_CLKSTCTRL */
401#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 492#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15
493#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_WIDTH 0x1
402#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15) 494#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15)
403 495
404/* Used by CM_WKUP_CLKSTCTRL */ 496/* Used by CM_WKUP_CLKSTCTRL */
405#define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 497#define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10
498#define OMAP4430_CLKACTIVITY_USIM_GFCLK_WIDTH 0x1
406#define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10) 499#define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10)
407 500
408/* Used by CM_L3INIT_CLKSTCTRL */ 501/* Used by CM_L3INIT_CLKSTCTRL */
409#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 502#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30
503#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_WIDTH 0x1
410#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30) 504#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30)
411 505
412/* Used by CM_L3INIT_CLKSTCTRL */ 506/* Used by CM_L3INIT_CLKSTCTRL */
413#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 507#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25
508#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_WIDTH 0x1
414#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25) 509#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25)
415 510
416/* Used by CM_WKUP_CLKSTCTRL */ 511/* Used by CM_WKUP_CLKSTCTRL */
417#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11 512#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11
513#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_WIDTH 0x1
418#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11) 514#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11)
419 515
420/* Used by CM_WKUP_CLKSTCTRL */ 516/* Used by CM_WKUP_CLKSTCTRL */
421#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_SHIFT 13 517#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_SHIFT 13
518#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_WIDTH 0x1
422#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_MASK (1 << 13) 519#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_MASK (1 << 13)
423 520
424/* 521/*
425 * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, 522 * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL,
426 * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, 523 * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
427 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MMC6_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL, 524 * CM_L3INIT_MMC2_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL,
428 * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL, 525 * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL,
429 * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL, 526 * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL,
430 * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, 527 * CM_L4PER_DMTIMER9_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL
431 * CM_WKUP_TIMER1_CLKCTRL
432 */ 528 */
433#define OMAP4430_CLKSEL_SHIFT 24 529#define OMAP4430_CLKSEL_SHIFT 24
530#define OMAP4430_CLKSEL_WIDTH 0x1
434#define OMAP4430_CLKSEL_MASK (1 << 24) 531#define OMAP4430_CLKSEL_MASK (1 << 24)
435 532
436/* 533/*
@@ -438,50 +535,62 @@
438 * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL 535 * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL
439 */ 536 */
440#define OMAP4430_CLKSEL_0_0_SHIFT 0 537#define OMAP4430_CLKSEL_0_0_SHIFT 0
538#define OMAP4430_CLKSEL_0_0_WIDTH 0x1
441#define OMAP4430_CLKSEL_0_0_MASK (1 << 0) 539#define OMAP4430_CLKSEL_0_0_MASK (1 << 0)
442 540
443/* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */ 541/* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */
444#define OMAP4430_CLKSEL_0_1_SHIFT 0 542#define OMAP4430_CLKSEL_0_1_SHIFT 0
543#define OMAP4430_CLKSEL_0_1_WIDTH 0x2
445#define OMAP4430_CLKSEL_0_1_MASK (0x3 << 0) 544#define OMAP4430_CLKSEL_0_1_MASK (0x3 << 0)
446 545
447/* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */ 546/* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */
448#define OMAP4430_CLKSEL_24_25_SHIFT 24 547#define OMAP4430_CLKSEL_24_25_SHIFT 24
548#define OMAP4430_CLKSEL_24_25_WIDTH 0x2
449#define OMAP4430_CLKSEL_24_25_MASK (0x3 << 24) 549#define OMAP4430_CLKSEL_24_25_MASK (0x3 << 24)
450 550
451/* Used by CM_L3INIT_USB_OTG_CLKCTRL */ 551/* Used by CM_L3INIT_USB_OTG_CLKCTRL */
452#define OMAP4430_CLKSEL_60M_SHIFT 24 552#define OMAP4430_CLKSEL_60M_SHIFT 24
553#define OMAP4430_CLKSEL_60M_WIDTH 0x1
453#define OMAP4430_CLKSEL_60M_MASK (1 << 24) 554#define OMAP4430_CLKSEL_60M_MASK (1 << 24)
454 555
455/* Used by CM_MPU_MPU_CLKCTRL */ 556/* Used by CM_MPU_MPU_CLKCTRL */
456#define OMAP4460_CLKSEL_ABE_DIV_MODE_SHIFT 25 557#define OMAP4460_CLKSEL_ABE_DIV_MODE_SHIFT 25
558#define OMAP4460_CLKSEL_ABE_DIV_MODE_WIDTH 0x1
457#define OMAP4460_CLKSEL_ABE_DIV_MODE_MASK (1 << 25) 559#define OMAP4460_CLKSEL_ABE_DIV_MODE_MASK (1 << 25)
458 560
459/* Used by CM1_ABE_AESS_CLKCTRL */ 561/* Used by CM1_ABE_AESS_CLKCTRL */
460#define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 562#define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24
563#define OMAP4430_CLKSEL_AESS_FCLK_WIDTH 0x1
461#define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24) 564#define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24)
462 565
463/* Used by CM_CLKSEL_CORE */ 566/* Used by CM_CLKSEL_CORE */
464#define OMAP4430_CLKSEL_CORE_SHIFT 0 567#define OMAP4430_CLKSEL_CORE_SHIFT 0
568#define OMAP4430_CLKSEL_CORE_WIDTH 0x1
465#define OMAP4430_CLKSEL_CORE_MASK (1 << 0) 569#define OMAP4430_CLKSEL_CORE_MASK (1 << 0)
466 570
467/* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */ 571/* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */
468#define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 572#define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1
573#define OMAP4430_CLKSEL_CORE_1_1_WIDTH 0x1
469#define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1) 574#define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1)
470 575
471/* Used by CM_WKUP_USIM_CLKCTRL */ 576/* Used by CM_WKUP_USIM_CLKCTRL */
472#define OMAP4430_CLKSEL_DIV_SHIFT 24 577#define OMAP4430_CLKSEL_DIV_SHIFT 24
578#define OMAP4430_CLKSEL_DIV_WIDTH 0x1
473#define OMAP4430_CLKSEL_DIV_MASK (1 << 24) 579#define OMAP4430_CLKSEL_DIV_MASK (1 << 24)
474 580
475/* Used by CM_MPU_MPU_CLKCTRL */ 581/* Used by CM_MPU_MPU_CLKCTRL */
476#define OMAP4460_CLKSEL_EMIF_DIV_MODE_SHIFT 24 582#define OMAP4460_CLKSEL_EMIF_DIV_MODE_SHIFT 24
583#define OMAP4460_CLKSEL_EMIF_DIV_MODE_WIDTH 0x1
477#define OMAP4460_CLKSEL_EMIF_DIV_MODE_MASK (1 << 24) 584#define OMAP4460_CLKSEL_EMIF_DIV_MODE_MASK (1 << 24)
478 585
479/* Used by CM_CAM_FDIF_CLKCTRL */ 586/* Used by CM_CAM_FDIF_CLKCTRL */
480#define OMAP4430_CLKSEL_FCLK_SHIFT 24 587#define OMAP4430_CLKSEL_FCLK_SHIFT 24
588#define OMAP4430_CLKSEL_FCLK_WIDTH 0x2
481#define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24) 589#define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24)
482 590
483/* Used by CM_L4PER_MCBSP4_CLKCTRL */ 591/* Used by CM_L4PER_MCBSP4_CLKCTRL */
484#define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25 592#define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25
593#define OMAP4430_CLKSEL_INTERNAL_SOURCE_WIDTH 0x1
485#define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK (1 << 25) 594#define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK (1 << 25)
486 595
487/* 596/*
@@ -490,34 +599,42 @@
490 * CM1_ABE_MCBSP3_CLKCTRL 599 * CM1_ABE_MCBSP3_CLKCTRL
491 */ 600 */
492#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 601#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26
602#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_WIDTH 0x2
493#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26) 603#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26)
494 604
495/* Used by CM_CLKSEL_CORE */ 605/* Used by CM_CLKSEL_CORE */
496#define OMAP4430_CLKSEL_L3_SHIFT 4 606#define OMAP4430_CLKSEL_L3_SHIFT 4
607#define OMAP4430_CLKSEL_L3_WIDTH 0x1
497#define OMAP4430_CLKSEL_L3_MASK (1 << 4) 608#define OMAP4430_CLKSEL_L3_MASK (1 << 4)
498 609
499/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */ 610/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */
500#define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 611#define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2
612#define OMAP4430_CLKSEL_L3_SHADOW_WIDTH 0x1
501#define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2) 613#define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2)
502 614
503/* Used by CM_CLKSEL_CORE */ 615/* Used by CM_CLKSEL_CORE */
504#define OMAP4430_CLKSEL_L4_SHIFT 8 616#define OMAP4430_CLKSEL_L4_SHIFT 8
617#define OMAP4430_CLKSEL_L4_WIDTH 0x1
505#define OMAP4430_CLKSEL_L4_MASK (1 << 8) 618#define OMAP4430_CLKSEL_L4_MASK (1 << 8)
506 619
507/* Used by CM_CLKSEL_ABE */ 620/* Used by CM_CLKSEL_ABE */
508#define OMAP4430_CLKSEL_OPP_SHIFT 0 621#define OMAP4430_CLKSEL_OPP_SHIFT 0
622#define OMAP4430_CLKSEL_OPP_WIDTH 0x2
509#define OMAP4430_CLKSEL_OPP_MASK (0x3 << 0) 623#define OMAP4430_CLKSEL_OPP_MASK (0x3 << 0)
510 624
511/* Used by CM_EMU_DEBUGSS_CLKCTRL */ 625/* Used by CM_EMU_DEBUGSS_CLKCTRL */
512#define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27 626#define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27
627#define OMAP4430_CLKSEL_PMD_STM_CLK_WIDTH 0x3
513#define OMAP4430_CLKSEL_PMD_STM_CLK_MASK (0x7 << 27) 628#define OMAP4430_CLKSEL_PMD_STM_CLK_MASK (0x7 << 27)
514 629
515/* Used by CM_EMU_DEBUGSS_CLKCTRL */ 630/* Used by CM_EMU_DEBUGSS_CLKCTRL */
516#define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT 24 631#define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT 24
632#define OMAP4430_CLKSEL_PMD_TRACE_CLK_WIDTH 0x3
517#define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK (0x7 << 24) 633#define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK (0x7 << 24)
518 634
519/* Used by CM_GFX_GFX_CLKCTRL */ 635/* Used by CM_GFX_GFX_CLKCTRL */
520#define OMAP4430_CLKSEL_SGX_FCLK_SHIFT 24 636#define OMAP4430_CLKSEL_SGX_FCLK_SHIFT 24
637#define OMAP4430_CLKSEL_SGX_FCLK_WIDTH 0x1
521#define OMAP4430_CLKSEL_SGX_FCLK_MASK (1 << 24) 638#define OMAP4430_CLKSEL_SGX_FCLK_MASK (1 << 24)
522 639
523/* 640/*
@@ -525,18 +642,22 @@
525 * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL 642 * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL
526 */ 643 */
527#define OMAP4430_CLKSEL_SOURCE_SHIFT 24 644#define OMAP4430_CLKSEL_SOURCE_SHIFT 24
645#define OMAP4430_CLKSEL_SOURCE_WIDTH 0x2
528#define OMAP4430_CLKSEL_SOURCE_MASK (0x3 << 24) 646#define OMAP4430_CLKSEL_SOURCE_MASK (0x3 << 24)
529 647
530/* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */ 648/* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */
531#define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 649#define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24
650#define OMAP4430_CLKSEL_SOURCE_24_24_WIDTH 0x1
532#define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) 651#define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24)
533 652
534/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 653/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
535#define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 654#define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24
655#define OMAP4430_CLKSEL_UTMI_P1_WIDTH 0x1
536#define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24) 656#define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24)
537 657
538/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 658/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
539#define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 659#define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25
660#define OMAP4430_CLKSEL_UTMI_P2_WIDTH 0x1
540#define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25) 661#define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25)
541 662
542/* 663/*
@@ -549,30 +670,37 @@
549 * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL 670 * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL
550 */ 671 */
551#define OMAP4430_CLKTRCTRL_SHIFT 0 672#define OMAP4430_CLKTRCTRL_SHIFT 0
673#define OMAP4430_CLKTRCTRL_WIDTH 0x2
552#define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) 674#define OMAP4430_CLKTRCTRL_MASK (0x3 << 0)
553 675
554/* Used by CM_EMU_OVERRIDE_DPLL_CORE */ 676/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
555#define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT 0 677#define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT 0
678#define OMAP4430_CORE_DPLL_EMU_DIV_WIDTH 0x7
556#define OMAP4430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0) 679#define OMAP4430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0)
557 680
558/* Used by CM_EMU_OVERRIDE_DPLL_CORE */ 681/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
559#define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT 8 682#define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT 8
683#define OMAP4430_CORE_DPLL_EMU_MULT_WIDTH 0xb
560#define OMAP4430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8) 684#define OMAP4430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8)
561 685
562/* Used by REVISION_CM1, REVISION_CM2 */ 686/* Used by REVISION_CM1, REVISION_CM2 */
563#define OMAP4430_CUSTOM_SHIFT 6 687#define OMAP4430_CUSTOM_SHIFT 6
688#define OMAP4430_CUSTOM_WIDTH 0x2
564#define OMAP4430_CUSTOM_MASK (0x3 << 6) 689#define OMAP4430_CUSTOM_MASK (0x3 << 6)
565 690
566/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ 691/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
567#define OMAP4430_D2D_DYNDEP_SHIFT 18 692#define OMAP4430_D2D_DYNDEP_SHIFT 18
693#define OMAP4430_D2D_DYNDEP_WIDTH 0x1
568#define OMAP4430_D2D_DYNDEP_MASK (1 << 18) 694#define OMAP4430_D2D_DYNDEP_MASK (1 << 18)
569 695
570/* Used by CM_MPU_STATICDEP */ 696/* Used by CM_MPU_STATICDEP */
571#define OMAP4430_D2D_STATDEP_SHIFT 18 697#define OMAP4430_D2D_STATDEP_SHIFT 18
698#define OMAP4430_D2D_STATDEP_WIDTH 0x1
572#define OMAP4430_D2D_STATDEP_MASK (1 << 18) 699#define OMAP4430_D2D_STATDEP_MASK (1 << 18)
573 700
574/* Used by CM_CLKSEL_DPLL_MPU */ 701/* Used by CM_CLKSEL_DPLL_MPU */
575#define OMAP4460_DCC_COUNT_MAX_SHIFT 24 702#define OMAP4460_DCC_COUNT_MAX_SHIFT 24
703#define OMAP4460_DCC_COUNT_MAX_WIDTH 0x8
576#define OMAP4460_DCC_COUNT_MAX_MASK (0xff << 24) 704#define OMAP4460_DCC_COUNT_MAX_MASK (0xff << 24)
577 705
578/* Used by CM_CLKSEL_DPLL_MPU */ 706/* Used by CM_CLKSEL_DPLL_MPU */
@@ -586,22 +714,27 @@
586 * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB 714 * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB
587 */ 715 */
588#define OMAP4430_DELTAMSTEP_SHIFT 0 716#define OMAP4430_DELTAMSTEP_SHIFT 0
717#define OMAP4430_DELTAMSTEP_WIDTH 0x14
589#define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0) 718#define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0)
590 719
591/* Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_USB */ 720/* Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_USB */
592#define OMAP4460_DELTAMSTEP_0_20_SHIFT 0 721#define OMAP4460_DELTAMSTEP_0_20_SHIFT 0
722#define OMAP4460_DELTAMSTEP_0_20_WIDTH 0x15
593#define OMAP4460_DELTAMSTEP_0_20_MASK (0x1fffff << 0) 723#define OMAP4460_DELTAMSTEP_0_20_MASK (0x1fffff << 0)
594 724
595/* Used by CM_DLL_CTRL */ 725/* Used by CM_DLL_CTRL */
596#define OMAP4430_DLL_OVERRIDE_SHIFT 0 726#define OMAP4430_DLL_OVERRIDE_SHIFT 0
727#define OMAP4430_DLL_OVERRIDE_WIDTH 0x1
597#define OMAP4430_DLL_OVERRIDE_MASK (1 << 0) 728#define OMAP4430_DLL_OVERRIDE_MASK (1 << 0)
598 729
599/* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */ 730/* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */
600#define OMAP4430_DLL_OVERRIDE_2_2_SHIFT 2 731#define OMAP4430_DLL_OVERRIDE_2_2_SHIFT 2
732#define OMAP4430_DLL_OVERRIDE_2_2_WIDTH 0x1
601#define OMAP4430_DLL_OVERRIDE_2_2_MASK (1 << 2) 733#define OMAP4430_DLL_OVERRIDE_2_2_MASK (1 << 2)
602 734
603/* Used by CM_SHADOW_FREQ_CONFIG1 */ 735/* Used by CM_SHADOW_FREQ_CONFIG1 */
604#define OMAP4430_DLL_RESET_SHIFT 3 736#define OMAP4430_DLL_RESET_SHIFT 3
737#define OMAP4430_DLL_RESET_WIDTH 0x1
605#define OMAP4430_DLL_RESET_MASK (1 << 3) 738#define OMAP4430_DLL_RESET_MASK (1 << 3)
606 739
607/* 740/*
@@ -610,30 +743,37 @@
610 * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB 743 * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB
611 */ 744 */
612#define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 745#define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23
746#define OMAP4430_DPLL_BYP_CLKSEL_WIDTH 0x1
613#define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23) 747#define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23)
614 748
615/* Used by CM_CLKDCOLDO_DPLL_USB */ 749/* Used by CM_CLKDCOLDO_DPLL_USB */
616#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 750#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8
751#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_WIDTH 0x1
617#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) 752#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8)
618 753
619/* Used by CM_CLKSEL_DPLL_CORE */ 754/* Used by CM_CLKSEL_DPLL_CORE */
620#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 755#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20
756#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_WIDTH 0x1
621#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20) 757#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20)
622 758
623/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ 759/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
624#define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 760#define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0
761#define OMAP4430_DPLL_CLKOUTHIF_DIV_WIDTH 0x5
625#define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) 762#define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0)
626 763
627/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ 764/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
628#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 765#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5
766#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_WIDTH 0x1
629#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5) 767#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5)
630 768
631/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ 769/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
632#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 770#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8
771#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_WIDTH 0x1
633#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8) 772#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8)
634 773
635/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ 774/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */
636#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT 10 775#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT 10
776#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_WIDTH 0x1
637#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) 777#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10)
638 778
639/* 779/*
@@ -641,10 +781,12 @@
641 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO 781 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
642 */ 782 */
643#define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 783#define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0
784#define OMAP4430_DPLL_CLKOUT_DIV_WIDTH 0x5
644#define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) 785#define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
645 786
646/* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */ 787/* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */
647#define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT 0 788#define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT 0
789#define OMAP4430_DPLL_CLKOUT_DIV_0_6_WIDTH 0x7
648#define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) 790#define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0)
649 791
650/* 792/*
@@ -652,10 +794,12 @@
652 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO 794 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
653 */ 795 */
654#define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 796#define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5
797#define OMAP4430_DPLL_CLKOUT_DIVCHACK_WIDTH 0x1
655#define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) 798#define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5)
656 799
657/* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */ 800/* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */
658#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT 7 801#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT 7
802#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_WIDTH 0x1
659#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7) 803#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7)
660 804
661/* 805/*
@@ -663,18 +807,22 @@
663 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB 807 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
664 */ 808 */
665#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 809#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8
810#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_WIDTH 0x1
666#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) 811#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8)
667 812
668/* Used by CM_SHADOW_FREQ_CONFIG1 */ 813/* Used by CM_SHADOW_FREQ_CONFIG1 */
669#define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 814#define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8
815#define OMAP4430_DPLL_CORE_DPLL_EN_WIDTH 0x3
670#define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8) 816#define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8)
671 817
672/* Used by CM_SHADOW_FREQ_CONFIG1 */ 818/* Used by CM_SHADOW_FREQ_CONFIG1 */
673#define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 819#define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11
820#define OMAP4430_DPLL_CORE_M2_DIV_WIDTH 0x5
674#define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11) 821#define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11)
675 822
676/* Used by CM_SHADOW_FREQ_CONFIG2 */ 823/* Used by CM_SHADOW_FREQ_CONFIG2 */
677#define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 824#define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3
825#define OMAP4430_DPLL_CORE_M5_DIV_WIDTH 0x5
678#define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3) 826#define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3)
679 827
680/* 828/*
@@ -683,10 +831,12 @@
683 * CM_CLKSEL_DPLL_UNIPRO 831 * CM_CLKSEL_DPLL_UNIPRO
684 */ 832 */
685#define OMAP4430_DPLL_DIV_SHIFT 0 833#define OMAP4430_DPLL_DIV_SHIFT 0
834#define OMAP4430_DPLL_DIV_WIDTH 0x7
686#define OMAP4430_DPLL_DIV_MASK (0x7f << 0) 835#define OMAP4430_DPLL_DIV_MASK (0x7f << 0)
687 836
688/* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */ 837/* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */
689#define OMAP4430_DPLL_DIV_0_7_SHIFT 0 838#define OMAP4430_DPLL_DIV_0_7_SHIFT 0
839#define OMAP4430_DPLL_DIV_0_7_WIDTH 0x8
690#define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) 840#define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0)
691 841
692/* 842/*
@@ -694,10 +844,12 @@
694 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER 844 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
695 */ 845 */
696#define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 846#define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8
847#define OMAP4430_DPLL_DRIFTGUARD_EN_WIDTH 0x1
697#define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8) 848#define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8)
698 849
699/* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */ 850/* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */
700#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT 3 851#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT 3
852#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_WIDTH 0x1
701#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3) 853#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3)
702 854
703/* 855/*
@@ -706,6 +858,7 @@
706 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB 858 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
707 */ 859 */
708#define OMAP4430_DPLL_EN_SHIFT 0 860#define OMAP4430_DPLL_EN_SHIFT 0
861#define OMAP4430_DPLL_EN_WIDTH 0x3
709#define OMAP4430_DPLL_EN_MASK (0x7 << 0) 862#define OMAP4430_DPLL_EN_MASK (0x7 << 0)
710 863
711/* 864/*
@@ -714,6 +867,7 @@
714 * CM_CLKMODE_DPLL_UNIPRO 867 * CM_CLKMODE_DPLL_UNIPRO
715 */ 868 */
716#define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 869#define OMAP4430_DPLL_LPMODE_EN_SHIFT 10
870#define OMAP4430_DPLL_LPMODE_EN_WIDTH 0x1
717#define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) 871#define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10)
718 872
719/* 873/*
@@ -722,10 +876,12 @@
722 * CM_CLKSEL_DPLL_UNIPRO 876 * CM_CLKSEL_DPLL_UNIPRO
723 */ 877 */
724#define OMAP4430_DPLL_MULT_SHIFT 8 878#define OMAP4430_DPLL_MULT_SHIFT 8
879#define OMAP4430_DPLL_MULT_WIDTH 0xb
725#define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) 880#define OMAP4430_DPLL_MULT_MASK (0x7ff << 8)
726 881
727/* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */ 882/* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */
728#define OMAP4430_DPLL_MULT_USB_SHIFT 8 883#define OMAP4430_DPLL_MULT_USB_SHIFT 8
884#define OMAP4430_DPLL_MULT_USB_WIDTH 0xc
729#define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) 885#define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8)
730 886
731/* 887/*
@@ -734,10 +890,12 @@
734 * CM_CLKMODE_DPLL_UNIPRO 890 * CM_CLKMODE_DPLL_UNIPRO
735 */ 891 */
736#define OMAP4430_DPLL_REGM4XEN_SHIFT 11 892#define OMAP4430_DPLL_REGM4XEN_SHIFT 11
893#define OMAP4430_DPLL_REGM4XEN_WIDTH 0x1
737#define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) 894#define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11)
738 895
739/* Used by CM_CLKSEL_DPLL_USB */ 896/* Used by CM_CLKSEL_DPLL_USB */
740#define OMAP4430_DPLL_SD_DIV_SHIFT 24 897#define OMAP4430_DPLL_SD_DIV_SHIFT 24
898#define OMAP4430_DPLL_SD_DIV_WIDTH 0x8
741#define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) 899#define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24)
742 900
743/* 901/*
@@ -746,6 +904,7 @@
746 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB 904 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
747 */ 905 */
748#define OMAP4430_DPLL_SSC_ACK_SHIFT 13 906#define OMAP4430_DPLL_SSC_ACK_SHIFT 13
907#define OMAP4430_DPLL_SSC_ACK_WIDTH 0x1
749#define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13) 908#define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13)
750 909
751/* 910/*
@@ -754,6 +913,7 @@
754 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB 913 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
755 */ 914 */
756#define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 915#define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14
916#define OMAP4430_DPLL_SSC_DOWNSPREAD_WIDTH 0x1
757#define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) 917#define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14)
758 918
759/* 919/*
@@ -762,42 +922,52 @@
762 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB 922 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
763 */ 923 */
764#define OMAP4430_DPLL_SSC_EN_SHIFT 12 924#define OMAP4430_DPLL_SSC_EN_SHIFT 12
925#define OMAP4430_DPLL_SSC_EN_WIDTH 0x1
765#define OMAP4430_DPLL_SSC_EN_MASK (1 << 12) 926#define OMAP4430_DPLL_SSC_EN_MASK (1 << 12)
766 927
767/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ 928/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
768#define OMAP4430_DSS_DYNDEP_SHIFT 8 929#define OMAP4430_DSS_DYNDEP_SHIFT 8
930#define OMAP4430_DSS_DYNDEP_WIDTH 0x1
769#define OMAP4430_DSS_DYNDEP_MASK (1 << 8) 931#define OMAP4430_DSS_DYNDEP_MASK (1 << 8)
770 932
771/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ 933/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
772#define OMAP4430_DSS_STATDEP_SHIFT 8 934#define OMAP4430_DSS_STATDEP_SHIFT 8
935#define OMAP4430_DSS_STATDEP_WIDTH 0x1
773#define OMAP4430_DSS_STATDEP_MASK (1 << 8) 936#define OMAP4430_DSS_STATDEP_MASK (1 << 8)
774 937
775/* Used by CM_L3_2_DYNAMICDEP */ 938/* Used by CM_L3_2_DYNAMICDEP */
776#define OMAP4430_DUCATI_DYNDEP_SHIFT 0 939#define OMAP4430_DUCATI_DYNDEP_SHIFT 0
940#define OMAP4430_DUCATI_DYNDEP_WIDTH 0x1
777#define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0) 941#define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0)
778 942
779/* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ 943/* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
780#define OMAP4430_DUCATI_STATDEP_SHIFT 0 944#define OMAP4430_DUCATI_STATDEP_SHIFT 0
945#define OMAP4430_DUCATI_STATDEP_WIDTH 0x1
781#define OMAP4430_DUCATI_STATDEP_MASK (1 << 0) 946#define OMAP4430_DUCATI_STATDEP_MASK (1 << 0)
782 947
783/* Used by CM_SHADOW_FREQ_CONFIG1 */ 948/* Used by CM_SHADOW_FREQ_CONFIG1 */
784#define OMAP4430_FREQ_UPDATE_SHIFT 0 949#define OMAP4430_FREQ_UPDATE_SHIFT 0
950#define OMAP4430_FREQ_UPDATE_WIDTH 0x1
785#define OMAP4430_FREQ_UPDATE_MASK (1 << 0) 951#define OMAP4430_FREQ_UPDATE_MASK (1 << 0)
786 952
787/* Used by REVISION_CM1, REVISION_CM2 */ 953/* Used by REVISION_CM1, REVISION_CM2 */
788#define OMAP4430_FUNC_SHIFT 16 954#define OMAP4430_FUNC_SHIFT 16
955#define OMAP4430_FUNC_WIDTH 0xc
789#define OMAP4430_FUNC_MASK (0xfff << 16) 956#define OMAP4430_FUNC_MASK (0xfff << 16)
790 957
791/* Used by CM_L3_2_DYNAMICDEP */ 958/* Used by CM_L3_2_DYNAMICDEP */
792#define OMAP4430_GFX_DYNDEP_SHIFT 10 959#define OMAP4430_GFX_DYNDEP_SHIFT 10
960#define OMAP4430_GFX_DYNDEP_WIDTH 0x1
793#define OMAP4430_GFX_DYNDEP_MASK (1 << 10) 961#define OMAP4430_GFX_DYNDEP_MASK (1 << 10)
794 962
795/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ 963/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
796#define OMAP4430_GFX_STATDEP_SHIFT 10 964#define OMAP4430_GFX_STATDEP_SHIFT 10
965#define OMAP4430_GFX_STATDEP_WIDTH 0x1
797#define OMAP4430_GFX_STATDEP_MASK (1 << 10) 966#define OMAP4430_GFX_STATDEP_MASK (1 << 10)
798 967
799/* Used by CM_SHADOW_FREQ_CONFIG2 */ 968/* Used by CM_SHADOW_FREQ_CONFIG2 */
800#define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 969#define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0
970#define OMAP4430_GPMC_FREQ_UPDATE_WIDTH 0x1
801#define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0) 971#define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0)
802 972
803/* 973/*
@@ -805,6 +975,7 @@
805 * CM_DIV_M4_DPLL_PER 975 * CM_DIV_M4_DPLL_PER
806 */ 976 */
807#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 977#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0
978#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_WIDTH 0x5
808#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) 979#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0)
809 980
810/* 981/*
@@ -812,6 +983,7 @@
812 * CM_DIV_M4_DPLL_PER 983 * CM_DIV_M4_DPLL_PER
813 */ 984 */
814#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 985#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5
986#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_WIDTH 0x1
815#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) 987#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5)
816 988
817/* 989/*
@@ -819,6 +991,7 @@
819 * CM_DIV_M4_DPLL_PER 991 * CM_DIV_M4_DPLL_PER
820 */ 992 */
821#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 993#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8
994#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_WIDTH 0x1
822#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) 995#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8)
823 996
824/* 997/*
@@ -826,6 +999,7 @@
826 * CM_DIV_M4_DPLL_PER 999 * CM_DIV_M4_DPLL_PER
827 */ 1000 */
828#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 1001#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12
1002#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_WIDTH 0x1
829#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) 1003#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12)
830 1004
831/* 1005/*
@@ -833,6 +1007,7 @@
833 * CM_DIV_M5_DPLL_PER 1007 * CM_DIV_M5_DPLL_PER
834 */ 1008 */
835#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 1009#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0
1010#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_WIDTH 0x5
836#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) 1011#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0)
837 1012
838/* 1013/*
@@ -840,6 +1015,7 @@
840 * CM_DIV_M5_DPLL_PER 1015 * CM_DIV_M5_DPLL_PER
841 */ 1016 */
842#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 1017#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5
1018#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_WIDTH 0x1
843#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) 1019#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5)
844 1020
845/* 1021/*
@@ -847,6 +1023,7 @@
847 * CM_DIV_M5_DPLL_PER 1023 * CM_DIV_M5_DPLL_PER
848 */ 1024 */
849#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 1025#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8
1026#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_WIDTH 0x1
850#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) 1027#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8)
851 1028
852/* 1029/*
@@ -854,38 +1031,47 @@
854 * CM_DIV_M5_DPLL_PER 1031 * CM_DIV_M5_DPLL_PER
855 */ 1032 */
856#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 1033#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12
1034#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_WIDTH 0x1
857#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) 1035#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12)
858 1036
859/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ 1037/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
860#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 1038#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0
1039#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_WIDTH 0x5
861#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) 1040#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0)
862 1041
863/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ 1042/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
864#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 1043#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5
1044#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_WIDTH 0x1
865#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) 1045#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5)
866 1046
867/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ 1047/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
868#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 1048#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8
1049#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_WIDTH 0x1
869#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) 1050#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8)
870 1051
871/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ 1052/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
872#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 1053#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12
1054#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_WIDTH 0x1
873#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) 1055#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12)
874 1056
875/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ 1057/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
876#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 1058#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0
1059#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_WIDTH 0x5
877#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) 1060#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0)
878 1061
879/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ 1062/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
880#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 1063#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5
1064#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_WIDTH 0x1
881#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5) 1065#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5)
882 1066
883/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ 1067/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
884#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 1068#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8
1069#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_WIDTH 0x1
885#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8) 1070#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8)
886 1071
887/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ 1072/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
888#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 1073#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12
1074#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_WIDTH 0x1
889#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12) 1075#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12)
890 1076
891/* 1077/*
@@ -893,53 +1079,48 @@
893 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, 1079 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL,
894 * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, 1080 * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL,
895 * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, 1081 * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL,
896 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, 1082 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL,
897 * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, 1083 * CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
898 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, 1084 * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, CM_CM1_PROFILING_CLKCTRL,
899 * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, 1085 * CM_CM2_PROFILING_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL,
900 * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, 1086 * CM_D2D_SAD2D_FW_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
901 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
902 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, 1087 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
903 * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, 1088 * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
904 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, 1089 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
905 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, 1090 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
906 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, 1091 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL,
907 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, 1092 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
908 * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, 1093 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL,
909 * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL, 1094 * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL,
910 * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL, 1095 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
911 * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL,
912 * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL,
913 * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL,
914 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, 1096 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
915 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, 1097 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
916 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, 1098 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
917 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, 1099 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
918 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, 1100 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
919 * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, 1101 * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL,
920 * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, 1102 * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL,
921 * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, 1103 * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
922 * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, 1104 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
923 * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, 1105 * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL,
924 * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, 1106 * CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL,
925 * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, 1107 * CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL,
926 * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, 1108 * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
927 * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
928 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
929 * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, 1109 * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL,
930 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, 1110 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL,
931 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, 1111 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
932 * CM_MEMIF_EMIF_H2_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
933 * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, 1112 * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL,
934 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, 1113 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL,
935 * CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, 1114 * CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL,
936 * CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL 1115 * CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL
937 */ 1116 */
938#define OMAP4430_IDLEST_SHIFT 16 1117#define OMAP4430_IDLEST_SHIFT 16
1118#define OMAP4430_IDLEST_WIDTH 0x2
939#define OMAP4430_IDLEST_MASK (0x3 << 16) 1119#define OMAP4430_IDLEST_MASK (0x3 << 16)
940 1120
941/* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ 1121/* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
942#define OMAP4430_ISS_DYNDEP_SHIFT 9 1122#define OMAP4430_ISS_DYNDEP_SHIFT 9
1123#define OMAP4430_ISS_DYNDEP_WIDTH 0x1
943#define OMAP4430_ISS_DYNDEP_MASK (1 << 9) 1124#define OMAP4430_ISS_DYNDEP_MASK (1 << 9)
944 1125
945/* 1126/*
@@ -947,10 +1128,12 @@
947 * CM_TESLA_STATICDEP 1128 * CM_TESLA_STATICDEP
948 */ 1129 */
949#define OMAP4430_ISS_STATDEP_SHIFT 9 1130#define OMAP4430_ISS_STATDEP_SHIFT 9
1131#define OMAP4430_ISS_STATDEP_WIDTH 0x1
950#define OMAP4430_ISS_STATDEP_MASK (1 << 9) 1132#define OMAP4430_ISS_STATDEP_MASK (1 << 9)
951 1133
952/* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ 1134/* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
953#define OMAP4430_IVAHD_DYNDEP_SHIFT 2 1135#define OMAP4430_IVAHD_DYNDEP_SHIFT 2
1136#define OMAP4430_IVAHD_DYNDEP_WIDTH 0x1
954#define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2) 1137#define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2)
955 1138
956/* 1139/*
@@ -959,10 +1142,12 @@
959 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1142 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
960 */ 1143 */
961#define OMAP4430_IVAHD_STATDEP_SHIFT 2 1144#define OMAP4430_IVAHD_STATDEP_SHIFT 2
1145#define OMAP4430_IVAHD_STATDEP_WIDTH 0x1
962#define OMAP4430_IVAHD_STATDEP_MASK (1 << 2) 1146#define OMAP4430_IVAHD_STATDEP_MASK (1 << 2)
963 1147
964/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ 1148/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
965#define OMAP4430_L3INIT_DYNDEP_SHIFT 7 1149#define OMAP4430_L3INIT_DYNDEP_SHIFT 7
1150#define OMAP4430_L3INIT_DYNDEP_WIDTH 0x1
966#define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7) 1151#define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7)
967 1152
968/* 1153/*
@@ -970,6 +1155,7 @@
970 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1155 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
971 */ 1156 */
972#define OMAP4430_L3INIT_STATDEP_SHIFT 7 1157#define OMAP4430_L3INIT_STATDEP_SHIFT 7
1158#define OMAP4430_L3INIT_STATDEP_WIDTH 0x1
973#define OMAP4430_L3INIT_STATDEP_MASK (1 << 7) 1159#define OMAP4430_L3INIT_STATDEP_MASK (1 << 7)
974 1160
975/* 1161/*
@@ -977,6 +1163,7 @@
977 * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP 1163 * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
978 */ 1164 */
979#define OMAP4430_L3_1_DYNDEP_SHIFT 5 1165#define OMAP4430_L3_1_DYNDEP_SHIFT 5
1166#define OMAP4430_L3_1_DYNDEP_WIDTH 0x1
980#define OMAP4430_L3_1_DYNDEP_MASK (1 << 5) 1167#define OMAP4430_L3_1_DYNDEP_MASK (1 << 5)
981 1168
982/* 1169/*
@@ -986,6 +1173,7 @@
986 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1173 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
987 */ 1174 */
988#define OMAP4430_L3_1_STATDEP_SHIFT 5 1175#define OMAP4430_L3_1_STATDEP_SHIFT 5
1176#define OMAP4430_L3_1_STATDEP_WIDTH 0x1
989#define OMAP4430_L3_1_STATDEP_MASK (1 << 5) 1177#define OMAP4430_L3_1_STATDEP_MASK (1 << 5)
990 1178
991/* 1179/*
@@ -995,6 +1183,7 @@
995 * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP 1183 * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP
996 */ 1184 */
997#define OMAP4430_L3_2_DYNDEP_SHIFT 6 1185#define OMAP4430_L3_2_DYNDEP_SHIFT 6
1186#define OMAP4430_L3_2_DYNDEP_WIDTH 0x1
998#define OMAP4430_L3_2_DYNDEP_MASK (1 << 6) 1187#define OMAP4430_L3_2_DYNDEP_MASK (1 << 6)
999 1188
1000/* 1189/*
@@ -1004,10 +1193,12 @@
1004 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1193 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1005 */ 1194 */
1006#define OMAP4430_L3_2_STATDEP_SHIFT 6 1195#define OMAP4430_L3_2_STATDEP_SHIFT 6
1196#define OMAP4430_L3_2_STATDEP_WIDTH 0x1
1007#define OMAP4430_L3_2_STATDEP_MASK (1 << 6) 1197#define OMAP4430_L3_2_STATDEP_MASK (1 << 6)
1008 1198
1009/* Used by CM_L3_1_DYNAMICDEP */ 1199/* Used by CM_L3_1_DYNAMICDEP */
1010#define OMAP4430_L4CFG_DYNDEP_SHIFT 12 1200#define OMAP4430_L4CFG_DYNDEP_SHIFT 12
1201#define OMAP4430_L4CFG_DYNDEP_WIDTH 0x1
1011#define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12) 1202#define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12)
1012 1203
1013/* 1204/*
@@ -1015,10 +1206,12 @@
1015 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1206 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1016 */ 1207 */
1017#define OMAP4430_L4CFG_STATDEP_SHIFT 12 1208#define OMAP4430_L4CFG_STATDEP_SHIFT 12
1209#define OMAP4430_L4CFG_STATDEP_WIDTH 0x1
1018#define OMAP4430_L4CFG_STATDEP_MASK (1 << 12) 1210#define OMAP4430_L4CFG_STATDEP_MASK (1 << 12)
1019 1211
1020/* Used by CM_L3_2_DYNAMICDEP */ 1212/* Used by CM_L3_2_DYNAMICDEP */
1021#define OMAP4430_L4PER_DYNDEP_SHIFT 13 1213#define OMAP4430_L4PER_DYNDEP_SHIFT 13
1214#define OMAP4430_L4PER_DYNDEP_WIDTH 0x1
1022#define OMAP4430_L4PER_DYNDEP_MASK (1 << 13) 1215#define OMAP4430_L4PER_DYNDEP_MASK (1 << 13)
1023 1216
1024/* 1217/*
@@ -1026,10 +1219,12 @@
1026 * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1219 * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1027 */ 1220 */
1028#define OMAP4430_L4PER_STATDEP_SHIFT 13 1221#define OMAP4430_L4PER_STATDEP_SHIFT 13
1222#define OMAP4430_L4PER_STATDEP_WIDTH 0x1
1029#define OMAP4430_L4PER_STATDEP_MASK (1 << 13) 1223#define OMAP4430_L4PER_STATDEP_MASK (1 << 13)
1030 1224
1031/* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ 1225/* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1032#define OMAP4430_L4SEC_DYNDEP_SHIFT 14 1226#define OMAP4430_L4SEC_DYNDEP_SHIFT 14
1227#define OMAP4430_L4SEC_DYNDEP_WIDTH 0x1
1033#define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14) 1228#define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14)
1034 1229
1035/* 1230/*
@@ -1037,10 +1232,12 @@
1037 * CM_SDMA_STATICDEP 1232 * CM_SDMA_STATICDEP
1038 */ 1233 */
1039#define OMAP4430_L4SEC_STATDEP_SHIFT 14 1234#define OMAP4430_L4SEC_STATDEP_SHIFT 14
1235#define OMAP4430_L4SEC_STATDEP_WIDTH 0x1
1040#define OMAP4430_L4SEC_STATDEP_MASK (1 << 14) 1236#define OMAP4430_L4SEC_STATDEP_MASK (1 << 14)
1041 1237
1042/* Used by CM_L4CFG_DYNAMICDEP */ 1238/* Used by CM_L4CFG_DYNAMICDEP */
1043#define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 1239#define OMAP4430_L4WKUP_DYNDEP_SHIFT 15
1240#define OMAP4430_L4WKUP_DYNDEP_WIDTH 0x1
1044#define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15) 1241#define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15)
1045 1242
1046/* 1243/*
@@ -1048,6 +1245,7 @@
1048 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1245 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1049 */ 1246 */
1050#define OMAP4430_L4WKUP_STATDEP_SHIFT 15 1247#define OMAP4430_L4WKUP_STATDEP_SHIFT 15
1248#define OMAP4430_L4WKUP_STATDEP_WIDTH 0x1
1051#define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15) 1249#define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15)
1052 1250
1053/* 1251/*
@@ -1055,6 +1253,7 @@
1055 * CM_MPU_DYNAMICDEP 1253 * CM_MPU_DYNAMICDEP
1056 */ 1254 */
1057#define OMAP4430_MEMIF_DYNDEP_SHIFT 4 1255#define OMAP4430_MEMIF_DYNDEP_SHIFT 4
1256#define OMAP4430_MEMIF_DYNDEP_WIDTH 0x1
1058#define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4) 1257#define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4)
1059 1258
1060/* 1259/*
@@ -1064,6 +1263,7 @@
1064 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP 1263 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1065 */ 1264 */
1066#define OMAP4430_MEMIF_STATDEP_SHIFT 4 1265#define OMAP4430_MEMIF_STATDEP_SHIFT 4
1266#define OMAP4430_MEMIF_STATDEP_WIDTH 0x1
1067#define OMAP4430_MEMIF_STATDEP_MASK (1 << 4) 1267#define OMAP4430_MEMIF_STATDEP_MASK (1 << 4)
1068 1268
1069/* 1269/*
@@ -1073,6 +1273,7 @@
1073 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB 1273 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
1074 */ 1274 */
1075#define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 1275#define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8
1276#define OMAP4430_MODFREQDIV_EXPONENT_WIDTH 0x3
1076#define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8) 1277#define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8)
1077 1278
1078/* 1279/*
@@ -1082,6 +1283,7 @@
1082 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB 1283 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
1083 */ 1284 */
1084#define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 1285#define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0
1286#define OMAP4430_MODFREQDIV_MANTISSA_WIDTH 0x7
1085#define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0) 1287#define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0)
1086 1288
1087/* 1289/*
@@ -1089,69 +1291,68 @@
1089 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, 1291 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL,
1090 * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, 1292 * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL,
1091 * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, 1293 * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL,
1092 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, 1294 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL,
1093 * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, 1295 * CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
1094 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, 1296 * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, CM_CM1_PROFILING_CLKCTRL,
1095 * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, 1297 * CM_CM2_PROFILING_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL,
1096 * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, 1298 * CM_D2D_SAD2D_FW_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1097 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1098 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, 1299 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
1099 * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, 1300 * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
1100 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, 1301 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
1101 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, 1302 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
1102 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, 1303 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL,
1103 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, 1304 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1104 * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, 1305 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL,
1105 * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL, 1306 * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL,
1106 * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL, 1307 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1107 * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL,
1108 * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL,
1109 * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL,
1110 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, 1308 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
1111 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, 1309 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
1112 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, 1310 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
1113 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, 1311 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
1114 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, 1312 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
1115 * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, 1313 * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL,
1116 * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, 1314 * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL,
1117 * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, 1315 * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1118 * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, 1316 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
1119 * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, 1317 * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL,
1120 * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, 1318 * CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL,
1121 * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, 1319 * CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL,
1122 * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, 1320 * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1123 * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
1124 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1125 * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, 1321 * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL,
1126 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, 1322 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL,
1127 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, 1323 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
1128 * CM_MEMIF_EMIF_H2_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
1129 * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, 1324 * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL,
1130 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, 1325 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL,
1131 * CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, 1326 * CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL,
1132 * CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL 1327 * CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL
1133 */ 1328 */
1134#define OMAP4430_MODULEMODE_SHIFT 0 1329#define OMAP4430_MODULEMODE_SHIFT 0
1330#define OMAP4430_MODULEMODE_WIDTH 0x2
1135#define OMAP4430_MODULEMODE_MASK (0x3 << 0) 1331#define OMAP4430_MODULEMODE_MASK (0x3 << 0)
1136 1332
1137/* Used by CM_L4CFG_DYNAMICDEP */ 1333/* Used by CM_L4CFG_DYNAMICDEP */
1138#define OMAP4460_MPU_DYNDEP_SHIFT 19 1334#define OMAP4460_MPU_DYNDEP_SHIFT 19
1335#define OMAP4460_MPU_DYNDEP_WIDTH 0x1
1139#define OMAP4460_MPU_DYNDEP_MASK (1 << 19) 1336#define OMAP4460_MPU_DYNDEP_MASK (1 << 19)
1140 1337
1141/* Used by CM_DSS_DSS_CLKCTRL */ 1338/* Used by CM_DSS_DSS_CLKCTRL */
1142#define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9 1339#define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9
1340#define OMAP4430_OPTFCLKEN_48MHZ_CLK_WIDTH 0x1
1143#define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9) 1341#define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9)
1144 1342
1145/* Used by CM_WKUP_BANDGAP_CLKCTRL */ 1343/* Used by CM_WKUP_BANDGAP_CLKCTRL */
1146#define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8 1344#define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8
1345#define OMAP4430_OPTFCLKEN_BGAP_32K_WIDTH 0x1
1147#define OMAP4430_OPTFCLKEN_BGAP_32K_MASK (1 << 8) 1346#define OMAP4430_OPTFCLKEN_BGAP_32K_MASK (1 << 8)
1148 1347
1149/* Used by CM_ALWON_USBPHY_CLKCTRL */ 1348/* Used by CM_ALWON_USBPHY_CLKCTRL */
1150#define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 8 1349#define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 8
1350#define OMAP4430_OPTFCLKEN_CLK32K_WIDTH 0x1
1151#define OMAP4430_OPTFCLKEN_CLK32K_MASK (1 << 8) 1351#define OMAP4430_OPTFCLKEN_CLK32K_MASK (1 << 8)
1152 1352
1153/* Used by CM_CAM_ISS_CLKCTRL */ 1353/* Used by CM_CAM_ISS_CLKCTRL */
1154#define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8 1354#define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8
1355#define OMAP4430_OPTFCLKEN_CTRLCLK_WIDTH 0x1
1155#define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8) 1356#define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8)
1156 1357
1157/* 1358/*
@@ -1160,126 +1361,157 @@
1160 * CM_WKUP_GPIO1_CLKCTRL 1361 * CM_WKUP_GPIO1_CLKCTRL
1161 */ 1362 */
1162#define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 1363#define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8
1364#define OMAP4430_OPTFCLKEN_DBCLK_WIDTH 0x1
1163#define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8) 1365#define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8)
1164 1366
1165/* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */ 1367/* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */
1166#define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT 8 1368#define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT 8
1369#define OMAP4430_OPTFCLKEN_DLL_CLK_WIDTH 0x1
1167#define OMAP4430_OPTFCLKEN_DLL_CLK_MASK (1 << 8) 1370#define OMAP4430_OPTFCLKEN_DLL_CLK_MASK (1 << 8)
1168 1371
1169/* Used by CM_DSS_DSS_CLKCTRL */ 1372/* Used by CM_DSS_DSS_CLKCTRL */
1170#define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8 1373#define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8
1374#define OMAP4430_OPTFCLKEN_DSSCLK_WIDTH 0x1
1171#define OMAP4430_OPTFCLKEN_DSSCLK_MASK (1 << 8) 1375#define OMAP4430_OPTFCLKEN_DSSCLK_MASK (1 << 8)
1172 1376
1173/* Used by CM_WKUP_USIM_CLKCTRL */ 1377/* Used by CM_WKUP_USIM_CLKCTRL */
1174#define OMAP4430_OPTFCLKEN_FCLK_SHIFT 8 1378#define OMAP4430_OPTFCLKEN_FCLK_SHIFT 8
1379#define OMAP4430_OPTFCLKEN_FCLK_WIDTH 0x1
1175#define OMAP4430_OPTFCLKEN_FCLK_MASK (1 << 8) 1380#define OMAP4430_OPTFCLKEN_FCLK_MASK (1 << 8)
1176 1381
1177/* Used by CM1_ABE_SLIMBUS_CLKCTRL */ 1382/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1178#define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8 1383#define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8
1384#define OMAP4430_OPTFCLKEN_FCLK0_WIDTH 0x1
1179#define OMAP4430_OPTFCLKEN_FCLK0_MASK (1 << 8) 1385#define OMAP4430_OPTFCLKEN_FCLK0_MASK (1 << 8)
1180 1386
1181/* Used by CM1_ABE_SLIMBUS_CLKCTRL */ 1387/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1182#define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9 1388#define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9
1389#define OMAP4430_OPTFCLKEN_FCLK1_WIDTH 0x1
1183#define OMAP4430_OPTFCLKEN_FCLK1_MASK (1 << 9) 1390#define OMAP4430_OPTFCLKEN_FCLK1_MASK (1 << 9)
1184 1391
1185/* Used by CM1_ABE_SLIMBUS_CLKCTRL */ 1392/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1186#define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 1393#define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10
1394#define OMAP4430_OPTFCLKEN_FCLK2_WIDTH 0x1
1187#define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10) 1395#define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10)
1188 1396
1189/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1397/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1190#define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 1398#define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15
1399#define OMAP4430_OPTFCLKEN_FUNC48MCLK_WIDTH 0x1
1191#define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15) 1400#define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15)
1192 1401
1193/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1402/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1194#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 1403#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13
1404#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_WIDTH 0x1
1195#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13) 1405#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13)
1196 1406
1197/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1407/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1198#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 1408#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14
1409#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_WIDTH 0x1
1199#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14) 1410#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14)
1200 1411
1201/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1412/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1202#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 1413#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11
1414#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_WIDTH 0x1
1203#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11) 1415#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11)
1204 1416
1205/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1417/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1206#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 1418#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12
1419#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_WIDTH 0x1
1207#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12) 1420#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12)
1208 1421
1209/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ 1422/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1210#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8 1423#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8
1424#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_WIDTH 0x1
1211#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK (1 << 8) 1425#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK (1 << 8)
1212 1426
1213/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ 1427/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1214#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9 1428#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9
1429#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_WIDTH 0x1
1215#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK (1 << 9) 1430#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK (1 << 9)
1216 1431
1217/* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */ 1432/* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */
1218#define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8 1433#define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8
1434#define OMAP4430_OPTFCLKEN_PHY_48M_WIDTH 0x1
1219#define OMAP4430_OPTFCLKEN_PHY_48M_MASK (1 << 8) 1435#define OMAP4430_OPTFCLKEN_PHY_48M_MASK (1 << 8)
1220 1436
1221/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ 1437/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1222#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10 1438#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10
1439#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_WIDTH 0x1
1223#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 10) 1440#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 10)
1224 1441
1225/* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */ 1442/* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */
1226#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11 1443#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11
1444#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_WIDTH 0x1
1227#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK (1 << 11) 1445#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK (1 << 11)
1228 1446
1229/* Used by CM_DSS_DSS_CLKCTRL */ 1447/* Used by CM_DSS_DSS_CLKCTRL */
1230#define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10 1448#define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10
1449#define OMAP4430_OPTFCLKEN_SYS_CLK_WIDTH 0x1
1231#define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10) 1450#define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10)
1232 1451
1233/* Used by CM_WKUP_BANDGAP_CLKCTRL */ 1452/* Used by CM_WKUP_BANDGAP_CLKCTRL */
1234#define OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT 8 1453#define OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT 8
1454#define OMAP4460_OPTFCLKEN_TS_FCLK_WIDTH 0x1
1235#define OMAP4460_OPTFCLKEN_TS_FCLK_MASK (1 << 8) 1455#define OMAP4460_OPTFCLKEN_TS_FCLK_MASK (1 << 8)
1236 1456
1237/* Used by CM_DSS_DSS_CLKCTRL */ 1457/* Used by CM_DSS_DSS_CLKCTRL */
1238#define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11 1458#define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11
1459#define OMAP4430_OPTFCLKEN_TV_CLK_WIDTH 0x1
1239#define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11) 1460#define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11)
1240 1461
1241/* Used by CM_L3INIT_UNIPRO1_CLKCTRL */ 1462/* Used by CM_L3INIT_UNIPRO1_CLKCTRL */
1242#define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 1463#define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8
1464#define OMAP4430_OPTFCLKEN_TXPHYCLK_WIDTH 0x1
1243#define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8) 1465#define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8)
1244 1466
1245/* Used by CM_L3INIT_USB_TLL_CLKCTRL */ 1467/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1246#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 1468#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8
1469#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_WIDTH 0x1
1247#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8) 1470#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8)
1248 1471
1249/* Used by CM_L3INIT_USB_TLL_CLKCTRL */ 1472/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1250#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 1473#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9
1474#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_WIDTH 0x1
1251#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9) 1475#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9)
1252 1476
1253/* Used by CM_L3INIT_USB_TLL_CLKCTRL */ 1477/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1254#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 1478#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10
1479#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_WIDTH 0x1
1255#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10) 1480#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10)
1256 1481
1257/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1482/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1258#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 1483#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8
1484#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_WIDTH 0x1
1259#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8) 1485#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8)
1260 1486
1261/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1487/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1262#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 1488#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9
1489#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_WIDTH 0x1
1263#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9) 1490#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9)
1264 1491
1265/* Used by CM_L3INIT_USB_HOST_CLKCTRL */ 1492/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1266#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 1493#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10
1494#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_WIDTH 0x1
1267#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10) 1495#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10)
1268 1496
1269/* Used by CM_L3INIT_USB_OTG_CLKCTRL */ 1497/* Used by CM_L3INIT_USB_OTG_CLKCTRL */
1270#define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8 1498#define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8
1499#define OMAP4430_OPTFCLKEN_XCLK_WIDTH 0x1
1271#define OMAP4430_OPTFCLKEN_XCLK_MASK (1 << 8) 1500#define OMAP4430_OPTFCLKEN_XCLK_MASK (1 << 8)
1272 1501
1273/* Used by CM_EMU_OVERRIDE_DPLL_CORE */ 1502/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
1274#define OMAP4430_OVERRIDE_ENABLE_SHIFT 19 1503#define OMAP4430_OVERRIDE_ENABLE_SHIFT 19
1504#define OMAP4430_OVERRIDE_ENABLE_WIDTH 0x1
1275#define OMAP4430_OVERRIDE_ENABLE_MASK (1 << 19) 1505#define OMAP4430_OVERRIDE_ENABLE_MASK (1 << 19)
1276 1506
1277/* Used by CM_CLKSEL_ABE */ 1507/* Used by CM_CLKSEL_ABE */
1278#define OMAP4430_PAD_CLKS_GATE_SHIFT 8 1508#define OMAP4430_PAD_CLKS_GATE_SHIFT 8
1509#define OMAP4430_PAD_CLKS_GATE_WIDTH 0x1
1279#define OMAP4430_PAD_CLKS_GATE_MASK (1 << 8) 1510#define OMAP4430_PAD_CLKS_GATE_MASK (1 << 8)
1280 1511
1281/* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */ 1512/* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */
1282#define OMAP4430_PERF_CURRENT_SHIFT 0 1513#define OMAP4430_PERF_CURRENT_SHIFT 0
1514#define OMAP4430_PERF_CURRENT_WIDTH 0x8
1283#define OMAP4430_PERF_CURRENT_MASK (0xff << 0) 1515#define OMAP4430_PERF_CURRENT_MASK (0xff << 0)
1284 1516
1285/* 1517/*
@@ -1288,74 +1520,85 @@
1288 * CM_IVA_DVFS_PERF_TESLA 1520 * CM_IVA_DVFS_PERF_TESLA
1289 */ 1521 */
1290#define OMAP4430_PERF_REQ_SHIFT 0 1522#define OMAP4430_PERF_REQ_SHIFT 0
1523#define OMAP4430_PERF_REQ_WIDTH 0x8
1291#define OMAP4430_PERF_REQ_MASK (0xff << 0) 1524#define OMAP4430_PERF_REQ_MASK (0xff << 0)
1292 1525
1293/* Used by CM_RESTORE_ST */ 1526/* Used by CM_RESTORE_ST */
1294#define OMAP4430_PHASE1_COMPLETED_SHIFT 0 1527#define OMAP4430_PHASE1_COMPLETED_SHIFT 0
1528#define OMAP4430_PHASE1_COMPLETED_WIDTH 0x1
1295#define OMAP4430_PHASE1_COMPLETED_MASK (1 << 0) 1529#define OMAP4430_PHASE1_COMPLETED_MASK (1 << 0)
1296 1530
1297/* Used by CM_RESTORE_ST */ 1531/* Used by CM_RESTORE_ST */
1298#define OMAP4430_PHASE2A_COMPLETED_SHIFT 1 1532#define OMAP4430_PHASE2A_COMPLETED_SHIFT 1
1533#define OMAP4430_PHASE2A_COMPLETED_WIDTH 0x1
1299#define OMAP4430_PHASE2A_COMPLETED_MASK (1 << 1) 1534#define OMAP4430_PHASE2A_COMPLETED_MASK (1 << 1)
1300 1535
1301/* Used by CM_RESTORE_ST */ 1536/* Used by CM_RESTORE_ST */
1302#define OMAP4430_PHASE2B_COMPLETED_SHIFT 2 1537#define OMAP4430_PHASE2B_COMPLETED_SHIFT 2
1538#define OMAP4430_PHASE2B_COMPLETED_WIDTH 0x1
1303#define OMAP4430_PHASE2B_COMPLETED_MASK (1 << 2) 1539#define OMAP4430_PHASE2B_COMPLETED_MASK (1 << 2)
1304 1540
1305/* Used by CM_EMU_DEBUGSS_CLKCTRL */ 1541/* Used by CM_EMU_DEBUGSS_CLKCTRL */
1306#define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20 1542#define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20
1543#define OMAP4430_PMD_STM_MUX_CTRL_WIDTH 0x2
1307#define OMAP4430_PMD_STM_MUX_CTRL_MASK (0x3 << 20) 1544#define OMAP4430_PMD_STM_MUX_CTRL_MASK (0x3 << 20)
1308 1545
1309/* Used by CM_EMU_DEBUGSS_CLKCTRL */ 1546/* Used by CM_EMU_DEBUGSS_CLKCTRL */
1310#define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 1547#define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22
1548#define OMAP4430_PMD_TRACE_MUX_CTRL_WIDTH 0x2
1311#define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22) 1549#define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22)
1312 1550
1313/* Used by CM_DYN_DEP_PRESCAL */ 1551/* Used by CM_DYN_DEP_PRESCAL */
1314#define OMAP4430_PRESCAL_SHIFT 0 1552#define OMAP4430_PRESCAL_SHIFT 0
1553#define OMAP4430_PRESCAL_WIDTH 0x6
1315#define OMAP4430_PRESCAL_MASK (0x3f << 0) 1554#define OMAP4430_PRESCAL_MASK (0x3f << 0)
1316 1555
1317/* Used by REVISION_CM1, REVISION_CM2 */ 1556/* Used by REVISION_CM1, REVISION_CM2 */
1318#define OMAP4430_R_RTL_SHIFT 11 1557#define OMAP4430_R_RTL_SHIFT 11
1558#define OMAP4430_R_RTL_WIDTH 0x5
1319#define OMAP4430_R_RTL_MASK (0x1f << 11) 1559#define OMAP4430_R_RTL_MASK (0x1f << 11)
1320 1560
1321/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */ 1561/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */
1322#define OMAP4430_SAR_MODE_SHIFT 4 1562#define OMAP4430_SAR_MODE_SHIFT 4
1563#define OMAP4430_SAR_MODE_WIDTH 0x1
1323#define OMAP4430_SAR_MODE_MASK (1 << 4) 1564#define OMAP4430_SAR_MODE_MASK (1 << 4)
1324 1565
1325/* Used by CM_SCALE_FCLK */ 1566/* Used by CM_SCALE_FCLK */
1326#define OMAP4430_SCALE_FCLK_SHIFT 0 1567#define OMAP4430_SCALE_FCLK_SHIFT 0
1568#define OMAP4430_SCALE_FCLK_WIDTH 0x1
1327#define OMAP4430_SCALE_FCLK_MASK (1 << 0) 1569#define OMAP4430_SCALE_FCLK_MASK (1 << 0)
1328 1570
1329/* Used by REVISION_CM1, REVISION_CM2 */ 1571/* Used by REVISION_CM1, REVISION_CM2 */
1330#define OMAP4430_SCHEME_SHIFT 30 1572#define OMAP4430_SCHEME_SHIFT 30
1573#define OMAP4430_SCHEME_WIDTH 0x2
1331#define OMAP4430_SCHEME_MASK (0x3 << 30) 1574#define OMAP4430_SCHEME_MASK (0x3 << 30)
1332 1575
1333/* Used by CM_L4CFG_DYNAMICDEP */ 1576/* Used by CM_L4CFG_DYNAMICDEP */
1334#define OMAP4430_SDMA_DYNDEP_SHIFT 11 1577#define OMAP4430_SDMA_DYNDEP_SHIFT 11
1578#define OMAP4430_SDMA_DYNDEP_WIDTH 0x1
1335#define OMAP4430_SDMA_DYNDEP_MASK (1 << 11) 1579#define OMAP4430_SDMA_DYNDEP_MASK (1 << 11)
1336 1580
1337/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ 1581/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
1338#define OMAP4430_SDMA_STATDEP_SHIFT 11 1582#define OMAP4430_SDMA_STATDEP_SHIFT 11
1583#define OMAP4430_SDMA_STATDEP_WIDTH 0x1
1339#define OMAP4430_SDMA_STATDEP_MASK (1 << 11) 1584#define OMAP4430_SDMA_STATDEP_MASK (1 << 11)
1340 1585
1341/* Used by CM_CLKSEL_ABE */ 1586/* Used by CM_CLKSEL_ABE */
1342#define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10 1587#define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10
1588#define OMAP4430_SLIMBUS_CLK_GATE_WIDTH 0x1
1343#define OMAP4430_SLIMBUS_CLK_GATE_MASK (1 << 10) 1589#define OMAP4430_SLIMBUS_CLK_GATE_MASK (1 << 10)
1344 1590
1345/* 1591/*
1346 * Used by CM1_ABE_AESS_CLKCTRL, CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, 1592 * Used by CM1_ABE_AESS_CLKCTRL, CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL,
1347 * CM_D2D_SAD2D_CLKCTRL, CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, 1593 * CM_D2D_SAD2D_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1348 * CM_DUCATI_DUCATI_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, 1594 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
1349 * CM_IVAHD_IVAHD_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL,
1350 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, 1595 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL,
1351 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
1352 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
1353 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL, 1596 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
1354 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, 1597 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL,
1355 * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, 1598 * CM_SDMA_SDMA_CLKCTRL, CM_TESLA_TESLA_CLKCTRL
1356 * CM_TESLA_TESLA_CLKCTRL
1357 */ 1599 */
1358#define OMAP4430_STBYST_SHIFT 18 1600#define OMAP4430_STBYST_SHIFT 18
1601#define OMAP4430_STBYST_WIDTH 0x1
1359#define OMAP4430_STBYST_MASK (1 << 18) 1602#define OMAP4430_STBYST_MASK (1 << 18)
1360 1603
1361/* 1604/*
@@ -1364,10 +1607,12 @@
1364 * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB 1607 * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB
1365 */ 1608 */
1366#define OMAP4430_ST_DPLL_CLK_SHIFT 0 1609#define OMAP4430_ST_DPLL_CLK_SHIFT 0
1610#define OMAP4430_ST_DPLL_CLK_WIDTH 0x1
1367#define OMAP4430_ST_DPLL_CLK_MASK (1 << 0) 1611#define OMAP4430_ST_DPLL_CLK_MASK (1 << 0)
1368 1612
1369/* Used by CM_CLKDCOLDO_DPLL_USB */ 1613/* Used by CM_CLKDCOLDO_DPLL_USB */
1370#define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT 9 1614#define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT 9
1615#define OMAP4430_ST_DPLL_CLKDCOLDO_WIDTH 0x1
1371#define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9) 1616#define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9)
1372 1617
1373/* 1618/*
@@ -1375,14 +1620,17 @@
1375 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB 1620 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
1376 */ 1621 */
1377#define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 1622#define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9
1623#define OMAP4430_ST_DPLL_CLKOUT_WIDTH 0x1
1378#define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9) 1624#define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9)
1379 1625
1380/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ 1626/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
1381#define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 1627#define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9
1628#define OMAP4430_ST_DPLL_CLKOUTHIF_WIDTH 0x1
1382#define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9) 1629#define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9)
1383 1630
1384/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ 1631/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */
1385#define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT 11 1632#define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT 11
1633#define OMAP4430_ST_DPLL_CLKOUTX2_WIDTH 0x1
1386#define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11) 1634#define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11)
1387 1635
1388/* 1636/*
@@ -1390,6 +1638,7 @@
1390 * CM_DIV_M4_DPLL_PER 1638 * CM_DIV_M4_DPLL_PER
1391 */ 1639 */
1392#define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 1640#define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9
1641#define OMAP4430_ST_HSDIVIDER_CLKOUT1_WIDTH 0x1
1393#define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) 1642#define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9)
1394 1643
1395/* 1644/*
@@ -1397,14 +1646,17 @@
1397 * CM_DIV_M5_DPLL_PER 1646 * CM_DIV_M5_DPLL_PER
1398 */ 1647 */
1399#define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 1648#define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9
1649#define OMAP4430_ST_HSDIVIDER_CLKOUT2_WIDTH 0x1
1400#define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) 1650#define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9)
1401 1651
1402/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ 1652/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
1403#define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 1653#define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9
1654#define OMAP4430_ST_HSDIVIDER_CLKOUT3_WIDTH 0x1
1404#define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) 1655#define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9)
1405 1656
1406/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ 1657/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
1407#define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 1658#define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9
1659#define OMAP4430_ST_HSDIVIDER_CLKOUT4_WIDTH 0x1
1408#define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9) 1660#define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9)
1409 1661
1410/* 1662/*
@@ -1413,18 +1665,22 @@
1413 * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB 1665 * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB
1414 */ 1666 */
1415#define OMAP4430_ST_MN_BYPASS_SHIFT 8 1667#define OMAP4430_ST_MN_BYPASS_SHIFT 8
1668#define OMAP4430_ST_MN_BYPASS_WIDTH 0x1
1416#define OMAP4430_ST_MN_BYPASS_MASK (1 << 8) 1669#define OMAP4430_ST_MN_BYPASS_MASK (1 << 8)
1417 1670
1418/* Used by CM_SYS_CLKSEL */ 1671/* Used by CM_SYS_CLKSEL */
1419#define OMAP4430_SYS_CLKSEL_SHIFT 0 1672#define OMAP4430_SYS_CLKSEL_SHIFT 0
1673#define OMAP4430_SYS_CLKSEL_WIDTH 0x3
1420#define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0) 1674#define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0)
1421 1675
1422/* Used by CM_L4CFG_DYNAMICDEP */ 1676/* Used by CM_L4CFG_DYNAMICDEP */
1423#define OMAP4430_TESLA_DYNDEP_SHIFT 1 1677#define OMAP4430_TESLA_DYNDEP_SHIFT 1
1678#define OMAP4430_TESLA_DYNDEP_WIDTH 0x1
1424#define OMAP4430_TESLA_DYNDEP_MASK (1 << 1) 1679#define OMAP4430_TESLA_DYNDEP_MASK (1 << 1)
1425 1680
1426/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ 1681/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
1427#define OMAP4430_TESLA_STATDEP_SHIFT 1 1682#define OMAP4430_TESLA_STATDEP_SHIFT 1
1683#define OMAP4430_TESLA_STATDEP_WIDTH 0x1
1428#define OMAP4430_TESLA_STATDEP_MASK (1 << 1) 1684#define OMAP4430_TESLA_STATDEP_MASK (1 << 1)
1429 1685
1430/* 1686/*
@@ -1433,13 +1689,16 @@
1433 * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP 1689 * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1434 */ 1690 */
1435#define OMAP4430_WINDOWSIZE_SHIFT 24 1691#define OMAP4430_WINDOWSIZE_SHIFT 24
1692#define OMAP4430_WINDOWSIZE_WIDTH 0x4
1436#define OMAP4430_WINDOWSIZE_MASK (0xf << 24) 1693#define OMAP4430_WINDOWSIZE_MASK (0xf << 24)
1437 1694
1438/* Used by REVISION_CM1, REVISION_CM2 */ 1695/* Used by REVISION_CM1, REVISION_CM2 */
1439#define OMAP4430_X_MAJOR_SHIFT 8 1696#define OMAP4430_X_MAJOR_SHIFT 8
1697#define OMAP4430_X_MAJOR_WIDTH 0x3
1440#define OMAP4430_X_MAJOR_MASK (0x7 << 8) 1698#define OMAP4430_X_MAJOR_MASK (0x7 << 8)
1441 1699
1442/* Used by REVISION_CM1, REVISION_CM2 */ 1700/* Used by REVISION_CM1, REVISION_CM2 */
1443#define OMAP4430_Y_MINOR_SHIFT 0 1701#define OMAP4430_Y_MINOR_SHIFT 0
1702#define OMAP4430_Y_MINOR_WIDTH 0x6
1444#define OMAP4430_Y_MINOR_MASK (0x3f << 0) 1703#define OMAP4430_Y_MINOR_MASK (0x3f << 0)
1445#endif 1704#endif
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c
index 389f9f8b570c..7f07ab02a5b3 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"
@@ -36,7 +35,7 @@
36#define OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP 0x3 35#define OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP 0x3
37 36
38static const u8 cm_idlest_offs[] = { 37static const u8 cm_idlest_offs[] = {
39 CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3 38 CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3, OMAP24XX_CM_IDLEST4
40}; 39};
41 40
42u32 omap2_cm_read_mod_reg(s16 module, u16 idx) 41u32 omap2_cm_read_mod_reg(s16 module, u16 idx)
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h
index 088bbad73db5..57b2f3c2fbf3 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.h
@@ -71,6 +71,7 @@
71#define OMAP24XX_CM_FCLKEN2 0x0004 71#define OMAP24XX_CM_FCLKEN2 0x0004
72#define OMAP24XX_CM_ICLKEN4 0x001c 72#define OMAP24XX_CM_ICLKEN4 0x001c
73#define OMAP24XX_CM_AUTOIDLE4 0x003c 73#define OMAP24XX_CM_AUTOIDLE4 0x003c
74#define OMAP24XX_CM_IDLEST4 0x002c
74 75
75#define OMAP2430_CM_IDLEST3 0x0028 76#define OMAP2430_CM_IDLEST3 0x0028
76 77
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index c1875862679f..f81dd0a18aaf 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -27,6 +27,7 @@
27#include <plat/mcspi.h> 27#include <plat/mcspi.h>
28#include <plat/nand.h> 28#include <plat/nand.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..8e43c4d885d5 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -17,11 +17,10 @@
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> 20#include <plat/mux.h>
23#include <plat/clock.h> 21#include <plat/clock.h>
24 22
23#include "soc.h"
25#include "iomap.h" 24#include "iomap.h"
26#include "common.h" 25#include "common.h"
27#include "sdrc.h" 26#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..5594b42372ee 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -21,7 +21,7 @@
21#include <mach/ctrl_module_pad_core_44xx.h> 21#include <mach/ctrl_module_pad_core_44xx.h>
22#include <mach/ctrl_module_pad_wkup_44xx.h> 22#include <mach/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) \
@@ -354,6 +354,7 @@
354 354
355/* AM33XX CONTROL_STATUS bitfields (partial) */ 355/* AM33XX CONTROL_STATUS bitfields (partial) */
356#define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT 22 356#define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT 22
357#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2
357#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) 358#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22)
358 359
359/* CONTROL OMAP STATUS register to identify OMAP3 features */ 360/* CONTROL OMAP STATUS register to identify OMAP3 features */
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/devices.c b/arch/arm/mach-omap2/devices.c
index c00c68961bb8..1b7e1c6e5359 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -17,21 +17,21 @@
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> 25#include <asm/pmu.h>
27 26
28#include "iomap.h" 27#include "iomap.h"
29#include <plat/board.h>
30#include <plat/dma.h> 28#include <plat/dma.h>
31#include <plat/omap_hwmod.h> 29#include <plat/omap_hwmod.h>
32#include <plat/omap_device.h> 30#include <plat/omap_device.h>
33#include <plat/omap4-keypad.h> 31#include <plat/omap4-keypad.h>
34 32
33#include "soc.h"
34#include "common.h"
35#include "mux.h" 35#include "mux.h"
36#include "control.h" 36#include "control.h"
37#include "devices.h" 37#include "devices.h"
@@ -112,7 +112,7 @@ static struct resource omap2cam_resources[] = {
112 .flags = IORESOURCE_MEM, 112 .flags = IORESOURCE_MEM,
113 }, 113 },
114 { 114 {
115 .start = INT_24XX_CAM_IRQ, 115 .start = 24 + OMAP_INTC_START,
116 .flags = IORESOURCE_IRQ, 116 .flags = IORESOURCE_IRQ,
117 } 117 }
118}; 118};
@@ -201,7 +201,7 @@ static struct resource omap3isp_resources[] = {
201 .flags = IORESOURCE_MEM, 201 .flags = IORESOURCE_MEM,
202 }, 202 },
203 { 203 {
204 .start = INT_34XX_CAM_IRQ, 204 .start = 24 + OMAP_INTC_START,
205 .flags = IORESOURCE_IRQ, 205 .flags = IORESOURCE_IRQ,
206 } 206 }
207}; 207};
@@ -434,37 +434,24 @@ static void omap_init_mcspi(void)
434static inline void omap_init_mcspi(void) {} 434static inline void omap_init_mcspi(void) {}
435#endif 435#endif
436 436
437static struct resource omap2_pmu_resource = { 437/**
438 .start = 3, 438 * omap_init_rng - bind the RNG hwmod to the RNG omap_device
439 .end = 3, 439 *
440 .flags = IORESOURCE_IRQ, 440 * Bind the RNG hwmod to the RNG omap_device. No return value.
441}; 441 */
442 442static void omap_init_rng(void)
443static struct resource omap3_pmu_resource = {
444 .start = INT_34XX_BENCH_MPU_EMUL,
445 .end = INT_34XX_BENCH_MPU_EMUL,
446 .flags = IORESOURCE_IRQ,
447};
448
449static struct platform_device omap_pmu_device = {
450 .name = "arm-pmu",
451 .id = ARM_PMU_DEVICE_CPU,
452 .num_resources = 1,
453};
454
455static void omap_init_pmu(void)
456{ 443{
457 if (cpu_is_omap24xx()) 444 struct omap_hwmod *oh;
458 omap_pmu_device.resource = &omap2_pmu_resource; 445 struct platform_device *pdev;
459 else if (cpu_is_omap34xx()) 446
460 omap_pmu_device.resource = &omap3_pmu_resource; 447 oh = omap_hwmod_lookup("rng");
461 else 448 if (!oh)
462 return; 449 return;
463 450
464 platform_device_register(&omap_pmu_device); 451 pdev = omap_device_build("omap_rng", -1, oh, NULL, 0, NULL, 0, 0);
452 WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n");
465} 453}
466 454
467
468#if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) 455#if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
469 456
470#ifdef CONFIG_ARCH_OMAP2 457#ifdef CONFIG_ARCH_OMAP2
@@ -475,7 +462,7 @@ static struct resource omap2_sham_resources[] = {
475 .flags = IORESOURCE_MEM, 462 .flags = IORESOURCE_MEM,
476 }, 463 },
477 { 464 {
478 .start = INT_24XX_SHA1MD5, 465 .start = 51 + OMAP_INTC_START,
479 .flags = IORESOURCE_IRQ, 466 .flags = IORESOURCE_IRQ,
480 } 467 }
481}; 468};
@@ -493,7 +480,7 @@ static struct resource omap3_sham_resources[] = {
493 .flags = IORESOURCE_MEM, 480 .flags = IORESOURCE_MEM,
494 }, 481 },
495 { 482 {
496 .start = INT_34XX_SHA1MD52_IRQ, 483 .start = 49 + OMAP_INTC_START,
497 .flags = IORESOURCE_IRQ, 484 .flags = IORESOURCE_IRQ,
498 }, 485 },
499 { 486 {
@@ -631,6 +618,10 @@ static inline void omap_init_vout(void) {}
631 618
632static int __init omap2_init_devices(void) 619static int __init omap2_init_devices(void)
633{ 620{
621 /* Enable dummy states for those platforms without pinctrl support */
622 if (!of_have_populated_dt())
623 pinctrl_provide_dummies();
624
634 /* 625 /*
635 * please keep these calls, and their implementations above, 626 * please keep these calls, and their implementations above,
636 * in alphabetical order so they're easier to sort through. 627 * in alphabetical order so they're easier to sort through.
@@ -645,8 +636,8 @@ static int __init omap2_init_devices(void)
645 omap_init_mcpdm(); 636 omap_init_mcpdm();
646 omap_init_mcspi(); 637 omap_init_mcspi();
647 } 638 }
648 omap_init_pmu();
649 omap_init_sti(); 639 omap_init_sti();
640 omap_init_rng();
650 omap_init_sham(); 641 omap_init_sham();
651 omap_init_aes(); 642 omap_init_aes();
652 omap_init_vout(); 643 omap_init_vout();
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index af1ed7d24a1f..5a3afd2b737d 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -488,7 +488,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
488 488
489 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) 489 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
490 if (oc->_clk) 490 if (oc->_clk)
491 clk_enable(oc->_clk); 491 clk_prepare_enable(oc->_clk);
492 492
493 dispc_disable_outputs(); 493 dispc_disable_outputs();
494 494
@@ -515,7 +515,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
515 515
516 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) 516 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
517 if (oc->_clk) 517 if (oc->_clk)
518 clk_disable(oc->_clk); 518 clk_disable_unprepare(oc->_clk);
519 519
520 r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0; 520 r = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0;
521 521
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index b9c8d2f6a81f..814e1808e158 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"
@@ -63,8 +63,10 @@ static int _omap3_wait_dpll_status(struct clk *clk, u8 state)
63 const struct dpll_data *dd; 63 const struct dpll_data *dd;
64 int i = 0; 64 int i = 0;
65 int ret = -EINVAL; 65 int ret = -EINVAL;
66 const char *clk_name;
66 67
67 dd = clk->dpll_data; 68 dd = clk->dpll_data;
69 clk_name = __clk_get_name(clk);
68 70
69 state <<= __ffs(dd->idlest_mask); 71 state <<= __ffs(dd->idlest_mask);
70 72
@@ -76,10 +78,10 @@ static int _omap3_wait_dpll_status(struct clk *clk, u8 state)
76 78
77 if (i == MAX_DPLL_WAIT_TRIES) { 79 if (i == MAX_DPLL_WAIT_TRIES) {
78 printk(KERN_ERR "clock: %s failed transition to '%s'\n", 80 printk(KERN_ERR "clock: %s failed transition to '%s'\n",
79 clk->name, (state) ? "locked" : "bypassed"); 81 clk_name, (state) ? "locked" : "bypassed");
80 } else { 82 } else {
81 pr_debug("clock: %s transition to '%s' in %d loops\n", 83 pr_debug("clock: %s transition to '%s' in %d loops\n",
82 clk->name, (state) ? "locked" : "bypassed", i); 84 clk_name, (state) ? "locked" : "bypassed", i);
83 85
84 ret = 0; 86 ret = 0;
85 } 87 }
@@ -93,7 +95,7 @@ static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n)
93 unsigned long fint; 95 unsigned long fint;
94 u16 f = 0; 96 u16 f = 0;
95 97
96 fint = clk->dpll_data->clk_ref->rate / n; 98 fint = __clk_get_rate(clk->dpll_data->clk_ref) / n;
97 99
98 pr_debug("clock: fint is %lu\n", fint); 100 pr_debug("clock: fint is %lu\n", fint);
99 101
@@ -140,7 +142,7 @@ static int _omap3_noncore_dpll_lock(struct clk *clk)
140 u8 state = 1; 142 u8 state = 1;
141 int r = 0; 143 int r = 0;
142 144
143 pr_debug("clock: locking DPLL %s\n", clk->name); 145 pr_debug("clock: locking DPLL %s\n", __clk_get_name(clk));
144 146
145 dd = clk->dpll_data; 147 dd = clk->dpll_data;
146 state <<= __ffs(dd->idlest_mask); 148 state <<= __ffs(dd->idlest_mask);
@@ -187,7 +189,7 @@ static int _omap3_noncore_dpll_bypass(struct clk *clk)
187 return -EINVAL; 189 return -EINVAL;
188 190
189 pr_debug("clock: configuring DPLL %s for low-power bypass\n", 191 pr_debug("clock: configuring DPLL %s for low-power bypass\n",
190 clk->name); 192 __clk_get_name(clk));
191 193
192 ai = omap3_dpll_autoidle_read(clk); 194 ai = omap3_dpll_autoidle_read(clk);
193 195
@@ -217,7 +219,7 @@ static int _omap3_noncore_dpll_stop(struct clk *clk)
217 if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP))) 219 if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP)))
218 return -EINVAL; 220 return -EINVAL;
219 221
220 pr_debug("clock: stopping DPLL %s\n", clk->name); 222 pr_debug("clock: stopping DPLL %s\n", __clk_get_name(clk));
221 223
222 ai = omap3_dpll_autoidle_read(clk); 224 ai = omap3_dpll_autoidle_read(clk);
223 225
@@ -245,7 +247,7 @@ static void _lookup_dco(struct clk *clk, u8 *dco, u16 m, u8 n)
245{ 247{
246 unsigned long fint, clkinp; /* watch out for overflow */ 248 unsigned long fint, clkinp; /* watch out for overflow */
247 249
248 clkinp = clk->parent->rate; 250 clkinp = __clk_get_rate(__clk_get_parent(clk));
249 fint = (clkinp / n) * m; 251 fint = (clkinp / n) * m;
250 252
251 if (fint < 1000000000) 253 if (fint < 1000000000)
@@ -271,7 +273,7 @@ static void _lookup_sddiv(struct clk *clk, u8 *sd_div, u16 m, u8 n)
271 unsigned long clkinp, sd; /* watch out for overflow */ 273 unsigned long clkinp, sd; /* watch out for overflow */
272 int mod1, mod2; 274 int mod1, mod2;
273 275
274 clkinp = clk->parent->rate; 276 clkinp = __clk_get_rate(__clk_get_parent(clk));
275 277
276 /* 278 /*
277 * target sigma-delta to near 250MHz 279 * target sigma-delta to near 250MHz
@@ -311,7 +313,7 @@ static int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel)
311 * Set jitter correction. No jitter correction for OMAP4 and 3630 313 * Set jitter correction. No jitter correction for OMAP4 and 3630
312 * since freqsel field is no longer present 314 * since freqsel field is no longer present
313 */ 315 */
314 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) { 316 if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) {
315 v = __raw_readl(dd->control_reg); 317 v = __raw_readl(dd->control_reg);
316 v &= ~dd->freqsel_mask; 318 v &= ~dd->freqsel_mask;
317 v |= freqsel << __ffs(dd->freqsel_mask); 319 v |= freqsel << __ffs(dd->freqsel_mask);
@@ -380,16 +382,19 @@ int omap3_noncore_dpll_enable(struct clk *clk)
380{ 382{
381 int r; 383 int r;
382 struct dpll_data *dd; 384 struct dpll_data *dd;
385 struct clk *parent;
383 386
384 dd = clk->dpll_data; 387 dd = clk->dpll_data;
385 if (!dd) 388 if (!dd)
386 return -EINVAL; 389 return -EINVAL;
387 390
388 if (clk->rate == dd->clk_bypass->rate) { 391 parent = __clk_get_parent(clk);
389 WARN_ON(clk->parent != dd->clk_bypass); 392
393 if (__clk_get_rate(clk) == __clk_get_rate(dd->clk_bypass)) {
394 WARN_ON(parent != dd->clk_bypass);
390 r = _omap3_noncore_dpll_bypass(clk); 395 r = _omap3_noncore_dpll_bypass(clk);
391 } else { 396 } else {
392 WARN_ON(clk->parent != dd->clk_ref); 397 WARN_ON(parent != dd->clk_ref);
393 r = _omap3_noncore_dpll_lock(clk); 398 r = _omap3_noncore_dpll_lock(clk);
394 } 399 }
395 /* 400 /*
@@ -432,7 +437,7 @@ void omap3_noncore_dpll_disable(struct clk *clk)
432int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) 437int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
433{ 438{
434 struct clk *new_parent = NULL; 439 struct clk *new_parent = NULL;
435 unsigned long hw_rate; 440 unsigned long hw_rate, bypass_rate;
436 u16 freqsel = 0; 441 u16 freqsel = 0;
437 struct dpll_data *dd; 442 struct dpll_data *dd;
438 int ret; 443 int ret;
@@ -456,7 +461,8 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
456 omap2_clk_enable(dd->clk_bypass); 461 omap2_clk_enable(dd->clk_bypass);
457 omap2_clk_enable(dd->clk_ref); 462 omap2_clk_enable(dd->clk_ref);
458 463
459 if (dd->clk_bypass->rate == rate && 464 bypass_rate = __clk_get_rate(dd->clk_bypass);
465 if (bypass_rate == rate &&
460 (clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) { 466 (clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) {
461 pr_debug("clock: %s: set rate: entering bypass.\n", clk->name); 467 pr_debug("clock: %s: set rate: entering bypass.\n", clk->name);
462 468
@@ -471,7 +477,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
471 return -EINVAL; 477 return -EINVAL;
472 478
473 /* No freqsel on OMAP4 and OMAP3630 */ 479 /* No freqsel on OMAP4 and OMAP3630 */
474 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) { 480 if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) {
475 freqsel = _omap3_dpll_compute_freqsel(clk, 481 freqsel = _omap3_dpll_compute_freqsel(clk,
476 dd->last_rounded_n); 482 dd->last_rounded_n);
477 if (!freqsel) 483 if (!freqsel)
@@ -479,7 +485,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
479 } 485 }
480 486
481 pr_debug("clock: %s: set rate: locking rate to %lu.\n", 487 pr_debug("clock: %s: set rate: locking rate to %lu.\n",
482 clk->name, rate); 488 __clk_get_name(clk), rate);
483 489
484 ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m, 490 ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m,
485 dd->last_rounded_n, freqsel); 491 dd->last_rounded_n, freqsel);
@@ -557,7 +563,7 @@ void omap3_dpll_allow_idle(struct clk *clk)
557 563
558 if (!dd->autoidle_reg) { 564 if (!dd->autoidle_reg) {
559 pr_debug("clock: DPLL %s: autoidle not supported\n", 565 pr_debug("clock: DPLL %s: autoidle not supported\n",
560 clk->name); 566 __clk_get_name(clk));
561 return; 567 return;
562 } 568 }
563 569
@@ -591,7 +597,7 @@ void omap3_dpll_deny_idle(struct clk *clk)
591 597
592 if (!dd->autoidle_reg) { 598 if (!dd->autoidle_reg) {
593 pr_debug("clock: DPLL %s: autoidle not supported\n", 599 pr_debug("clock: DPLL %s: autoidle not supported\n",
594 clk->name); 600 __clk_get_name(clk));
595 return; 601 return;
596 } 602 }
597 603
@@ -617,25 +623,30 @@ unsigned long omap3_clkoutx2_recalc(struct clk *clk)
617 unsigned long rate; 623 unsigned long rate;
618 u32 v; 624 u32 v;
619 struct clk *pclk; 625 struct clk *pclk;
626 unsigned long parent_rate;
620 627
621 /* Walk up the parents of clk, looking for a DPLL */ 628 /* Walk up the parents of clk, looking for a DPLL */
622 pclk = clk->parent; 629 pclk = __clk_get_parent(clk);
623 while (pclk && !pclk->dpll_data) 630 while (pclk && !pclk->dpll_data)
624 pclk = pclk->parent; 631 pclk = __clk_get_parent(pclk);
625 632
626 /* clk does not have a DPLL as a parent? */ 633 /* clk does not have a DPLL as a parent? error in the clock data */
627 WARN_ON(!pclk); 634 if (!pclk) {
635 WARN_ON(1);
636 return 0;
637 }
628 638
629 dd = pclk->dpll_data; 639 dd = pclk->dpll_data;
630 640
631 WARN_ON(!dd->enable_mask); 641 WARN_ON(!dd->enable_mask);
632 642
643 parent_rate = __clk_get_rate(__clk_get_parent(clk));
633 v = __raw_readl(dd->control_reg) & dd->enable_mask; 644 v = __raw_readl(dd->control_reg) & dd->enable_mask;
634 v >>= __ffs(dd->enable_mask); 645 v >>= __ffs(dd->enable_mask);
635 if ((v != OMAP3XXX_EN_DPLL_LOCKED) || (dd->flags & DPLL_J_TYPE)) 646 if ((v != OMAP3XXX_EN_DPLL_LOCKED) || (dd->flags & DPLL_J_TYPE))
636 rate = clk->parent->rate; 647 rate = parent_rate;
637 else 648 else
638 rate = clk->parent->rate * 2; 649 rate = parent_rate * 2;
639 return rate; 650 return rate;
640} 651}
641 652
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/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 9ad7d489b0de..e7b246da02d0 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>
@@ -60,6 +61,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); 61 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);
61 if (!pdata->regs) { 62 if (!pdata->regs) {
62 pr_err("gpio%d: Memory allocation failed\n", id); 63 pr_err("gpio%d: Memory allocation failed\n", id);
64 kfree(pdata);
63 return -ENOMEM; 65 return -ENOMEM;
64 } 66 }
65 67
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 386dec8d2351..9e9f47ad6187 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -16,20 +16,28 @@
16 16
17#include <asm/mach/flash.h> 17#include <asm/mach/flash.h>
18 18
19#include <plat/cpu.h>
20#include <plat/nand.h> 19#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..b66fb8e5faaa 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -18,16 +18,24 @@
18 18
19#include <asm/mach/flash.h> 19#include <asm/mach/flash.h>
20 20
21#include <plat/cpu.h>
22#include <plat/onenand.h> 21#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..245839dfc722 100644
--- a/arch/arm/mach-omap2/gpmc-smc91x.c
+++ b/arch/arm/mach-omap2/gpmc-smc91x.c
@@ -17,10 +17,11 @@
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 <plat/gpmc-smc91x.h>
23 22
23#include "soc.h"
24
24static struct omap_smc91x_platform_data *gpmc_cfg; 25static struct omap_smc91x_platform_data *gpmc_cfg;
25 26
26static struct resource gpmc_smc91x_resources[] = { 27static struct resource gpmc_smc91x_resources[] = {
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index b6c77be3e8f7..a3a28878f0c9 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -20,7 +20,6 @@
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 <plat/gpmc-smsc911x.h>
26 25
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index b2b5759ab0fe..8ab1e1bde5e9 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -24,11 +24,20 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/platform_device.h>
27 28
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29#include <plat/gpmc.h> 30#include <plat/gpmc.h>
30 31
32#include <plat/cpu.h>
33#include <plat/gpmc.h>
31#include <plat/sdrc.h> 34#include <plat/sdrc.h>
35#include <plat/omap_device.h>
36
37#include "soc.h"
38#include "common.h"
39
40#define DEVICE_NAME "omap-gpmc"
32 41
33/* GPMC register offsets */ 42/* GPMC register offsets */
34#define GPMC_REVISION 0x00 43#define GPMC_REVISION 0x00
@@ -78,6 +87,21 @@
78#define ENABLE_PREFETCH (0x1 << 7) 87#define ENABLE_PREFETCH (0x1 << 7)
79#define DMA_MPU_MODE 2 88#define DMA_MPU_MODE 2
80 89
90#define GPMC_REVISION_MAJOR(l) ((l >> 4) & 0xf)
91#define GPMC_REVISION_MINOR(l) (l & 0xf)
92
93#define GPMC_HAS_WR_ACCESS 0x1
94#define GPMC_HAS_WR_DATA_MUX_BUS 0x2
95
96/* XXX: Only NAND irq has been considered,currently these are the only ones used
97 */
98#define GPMC_NR_IRQ 2
99
100struct gpmc_client_irq {
101 unsigned irq;
102 u32 bitmask;
103};
104
81/* Structure to save gpmc cs context */ 105/* Structure to save gpmc cs context */
82struct gpmc_cs_config { 106struct gpmc_cs_config {
83 u32 config1; 107 u32 config1;
@@ -105,12 +129,19 @@ struct omap3_gpmc_regs {
105 struct gpmc_cs_config cs_context[GPMC_CS_NUM]; 129 struct gpmc_cs_config cs_context[GPMC_CS_NUM];
106}; 130};
107 131
132static struct gpmc_client_irq gpmc_client_irq[GPMC_NR_IRQ];
133static struct irq_chip gpmc_irq_chip;
134static unsigned gpmc_irq_start;
135
108static struct resource gpmc_mem_root; 136static struct resource gpmc_mem_root;
109static struct resource gpmc_cs_mem[GPMC_CS_NUM]; 137static struct resource gpmc_cs_mem[GPMC_CS_NUM];
110static DEFINE_SPINLOCK(gpmc_mem_lock); 138static DEFINE_SPINLOCK(gpmc_mem_lock);
111static unsigned int gpmc_cs_map; /* flag for cs which are initialized */ 139static unsigned int gpmc_cs_map; /* flag for cs which are initialized */
112static int gpmc_ecc_used = -EINVAL; /* cs using ecc engine */ 140static int gpmc_ecc_used = -EINVAL; /* cs using ecc engine */
113 141static struct device *gpmc_dev;
142static int gpmc_irq;
143static resource_size_t phys_base, mem_size;
144static unsigned gpmc_capability;
114static void __iomem *gpmc_base; 145static void __iomem *gpmc_base;
115 146
116static struct clk *gpmc_l3_clk; 147static struct clk *gpmc_l3_clk;
@@ -279,7 +310,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
279 310
280 div = gpmc_cs_calc_divider(cs, t->sync_clk); 311 div = gpmc_cs_calc_divider(cs, t->sync_clk);
281 if (div < 0) 312 if (div < 0)
282 return -1; 313 return div;
283 314
284 GPMC_SET_ONE(GPMC_CS_CONFIG2, 0, 3, cs_on); 315 GPMC_SET_ONE(GPMC_CS_CONFIG2, 0, 3, cs_on);
285 GPMC_SET_ONE(GPMC_CS_CONFIG2, 8, 12, cs_rd_off); 316 GPMC_SET_ONE(GPMC_CS_CONFIG2, 8, 12, cs_rd_off);
@@ -300,10 +331,10 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
300 331
301 GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access); 332 GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access);
302 333
303 if (cpu_is_omap34xx()) { 334 if (gpmc_capability & GPMC_HAS_WR_DATA_MUX_BUS)
304 GPMC_SET_ONE(GPMC_CS_CONFIG6, 16, 19, wr_data_mux_bus); 335 GPMC_SET_ONE(GPMC_CS_CONFIG6, 16, 19, wr_data_mux_bus);
336 if (gpmc_capability & GPMC_HAS_WR_ACCESS)
305 GPMC_SET_ONE(GPMC_CS_CONFIG6, 24, 28, wr_access); 337 GPMC_SET_ONE(GPMC_CS_CONFIG6, 24, 28, wr_access);
306 }
307 338
308 /* caller is expected to have initialized CONFIG1 to cover 339 /* caller is expected to have initialized CONFIG1 to cover
309 * at least sync vs async 340 * at least sync vs async
@@ -413,6 +444,20 @@ static int gpmc_cs_insert_mem(int cs, unsigned long base, unsigned long size)
413 return r; 444 return r;
414} 445}
415 446
447static int gpmc_cs_delete_mem(int cs)
448{
449 struct resource *res = &gpmc_cs_mem[cs];
450 int r;
451
452 spin_lock(&gpmc_mem_lock);
453 r = release_resource(&gpmc_cs_mem[cs]);
454 res->start = 0;
455 res->end = 0;
456 spin_unlock(&gpmc_mem_lock);
457
458 return r;
459}
460
416int gpmc_cs_request(int cs, unsigned long size, unsigned long *base) 461int gpmc_cs_request(int cs, unsigned long size, unsigned long *base)
417{ 462{
418 struct resource *res = &gpmc_cs_mem[cs]; 463 struct resource *res = &gpmc_cs_mem[cs];
@@ -682,7 +727,148 @@ int gpmc_prefetch_reset(int cs)
682} 727}
683EXPORT_SYMBOL(gpmc_prefetch_reset); 728EXPORT_SYMBOL(gpmc_prefetch_reset);
684 729
685static void __init gpmc_mem_init(void) 730void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
731{
732 reg->gpmc_status = gpmc_base + GPMC_STATUS;
733 reg->gpmc_nand_command = gpmc_base + GPMC_CS0_OFFSET +
734 GPMC_CS_NAND_COMMAND + GPMC_CS_SIZE * cs;
735 reg->gpmc_nand_address = gpmc_base + GPMC_CS0_OFFSET +
736 GPMC_CS_NAND_ADDRESS + GPMC_CS_SIZE * cs;
737 reg->gpmc_nand_data = gpmc_base + GPMC_CS0_OFFSET +
738 GPMC_CS_NAND_DATA + GPMC_CS_SIZE * cs;
739 reg->gpmc_prefetch_config1 = gpmc_base + GPMC_PREFETCH_CONFIG1;
740 reg->gpmc_prefetch_config2 = gpmc_base + GPMC_PREFETCH_CONFIG2;
741 reg->gpmc_prefetch_control = gpmc_base + GPMC_PREFETCH_CONTROL;
742 reg->gpmc_prefetch_status = gpmc_base + GPMC_PREFETCH_STATUS;
743 reg->gpmc_ecc_config = gpmc_base + GPMC_ECC_CONFIG;
744 reg->gpmc_ecc_control = gpmc_base + GPMC_ECC_CONTROL;
745 reg->gpmc_ecc_size_config = gpmc_base + GPMC_ECC_SIZE_CONFIG;
746 reg->gpmc_ecc1_result = gpmc_base + GPMC_ECC1_RESULT;
747 reg->gpmc_bch_result0 = gpmc_base + GPMC_ECC_BCH_RESULT_0;
748}
749
750int gpmc_get_client_irq(unsigned irq_config)
751{
752 int i;
753
754 if (hweight32(irq_config) > 1)
755 return 0;
756
757 for (i = 0; i < GPMC_NR_IRQ; i++)
758 if (gpmc_client_irq[i].bitmask & irq_config)
759 return gpmc_client_irq[i].irq;
760
761 return 0;
762}
763
764static int gpmc_irq_endis(unsigned irq, bool endis)
765{
766 int i;
767 u32 regval;
768
769 for (i = 0; i < GPMC_NR_IRQ; i++)
770 if (irq == gpmc_client_irq[i].irq) {
771 regval = gpmc_read_reg(GPMC_IRQENABLE);
772 if (endis)
773 regval |= gpmc_client_irq[i].bitmask;
774 else
775 regval &= ~gpmc_client_irq[i].bitmask;
776 gpmc_write_reg(GPMC_IRQENABLE, regval);
777 break;
778 }
779
780 return 0;
781}
782
783static void gpmc_irq_disable(struct irq_data *p)
784{
785 gpmc_irq_endis(p->irq, false);
786}
787
788static void gpmc_irq_enable(struct irq_data *p)
789{
790 gpmc_irq_endis(p->irq, true);
791}
792
793static void gpmc_irq_noop(struct irq_data *data) { }
794
795static unsigned int gpmc_irq_noop_ret(struct irq_data *data) { return 0; }
796
797static int gpmc_setup_irq(void)
798{
799 int i;
800 u32 regval;
801
802 if (!gpmc_irq)
803 return -EINVAL;
804
805 gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0);
806 if (IS_ERR_VALUE(gpmc_irq_start)) {
807 pr_err("irq_alloc_descs failed\n");
808 return gpmc_irq_start;
809 }
810
811 gpmc_irq_chip.name = "gpmc";
812 gpmc_irq_chip.irq_startup = gpmc_irq_noop_ret;
813 gpmc_irq_chip.irq_enable = gpmc_irq_enable;
814 gpmc_irq_chip.irq_disable = gpmc_irq_disable;
815 gpmc_irq_chip.irq_shutdown = gpmc_irq_noop;
816 gpmc_irq_chip.irq_ack = gpmc_irq_noop;
817 gpmc_irq_chip.irq_mask = gpmc_irq_noop;
818 gpmc_irq_chip.irq_unmask = gpmc_irq_noop;
819
820 gpmc_client_irq[0].bitmask = GPMC_IRQ_FIFOEVENTENABLE;
821 gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT;
822
823 for (i = 0; i < GPMC_NR_IRQ; i++) {
824 gpmc_client_irq[i].irq = gpmc_irq_start + i;
825 irq_set_chip_and_handler(gpmc_client_irq[i].irq,
826 &gpmc_irq_chip, handle_simple_irq);
827 set_irq_flags(gpmc_client_irq[i].irq,
828 IRQF_VALID | IRQF_NOAUTOEN);
829 }
830
831 /* Disable interrupts */
832 gpmc_write_reg(GPMC_IRQENABLE, 0);
833
834 /* clear interrupts */
835 regval = gpmc_read_reg(GPMC_IRQSTATUS);
836 gpmc_write_reg(GPMC_IRQSTATUS, regval);
837
838 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL);
839}
840
841static __exit int gpmc_free_irq(void)
842{
843 int i;
844
845 if (gpmc_irq)
846 free_irq(gpmc_irq, NULL);
847
848 for (i = 0; i < GPMC_NR_IRQ; i++) {
849 irq_set_handler(gpmc_client_irq[i].irq, NULL);
850 irq_set_chip(gpmc_client_irq[i].irq, &no_irq_chip);
851 irq_modify_status(gpmc_client_irq[i].irq, 0, 0);
852 }
853
854 irq_free_descs(gpmc_irq_start, GPMC_NR_IRQ);
855
856 return 0;
857}
858
859static void __devexit gpmc_mem_exit(void)
860{
861 int cs;
862
863 for (cs = 0; cs < GPMC_CS_NUM; cs++) {
864 if (!gpmc_cs_mem_enabled(cs))
865 continue;
866 gpmc_cs_delete_mem(cs);
867 }
868
869}
870
871static void __devinit gpmc_mem_init(void)
686{ 872{
687 int cs; 873 int cs;
688 unsigned long boot_rom_space = 0; 874 unsigned long boot_rom_space = 0;
@@ -709,83 +895,120 @@ static void __init gpmc_mem_init(void)
709 } 895 }
710} 896}
711 897
712static int __init gpmc_init(void) 898static __devinit int gpmc_probe(struct platform_device *pdev)
713{ 899{
714 u32 l, irq; 900 u32 l;
715 int cs, ret = -EINVAL; 901 struct resource *res;
716 int gpmc_irq; 902
717 char *ck = NULL; 903 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
718 904 if (res == NULL)
719 if (cpu_is_omap24xx()) { 905 return -ENOENT;
720 ck = "core_l3_ck"; 906
721 if (cpu_is_omap2420()) 907 phys_base = res->start;
722 l = OMAP2420_GPMC_BASE; 908 mem_size = resource_size(res);
723 else 909
724 l = OMAP34XX_GPMC_BASE; 910 gpmc_base = devm_request_and_ioremap(&pdev->dev, res);
725 gpmc_irq = INT_34XX_GPMC_IRQ; 911 if (!gpmc_base) {
726 } else if (cpu_is_omap34xx()) { 912 dev_err(&pdev->dev, "error: request memory / ioremap\n");
727 ck = "gpmc_fck"; 913 return -EADDRNOTAVAIL;
728 l = OMAP34XX_GPMC_BASE;
729 gpmc_irq = INT_34XX_GPMC_IRQ;
730 } else if (cpu_is_omap44xx() || soc_is_omap54xx()) {
731 /* Base address and irq number are same for OMAP4/5 */
732 ck = "gpmc_ck";
733 l = OMAP44XX_GPMC_BASE;
734 gpmc_irq = OMAP44XX_IRQ_GPMC;
735 } 914 }
736 915
737 if (WARN_ON(!ck)) 916 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
738 return ret; 917 if (res == NULL)
918 dev_warn(&pdev->dev, "Failed to get resource: irq\n");
919 else
920 gpmc_irq = res->start;
739 921
740 gpmc_l3_clk = clk_get(NULL, ck); 922 gpmc_l3_clk = clk_get(&pdev->dev, "fck");
741 if (IS_ERR(gpmc_l3_clk)) { 923 if (IS_ERR(gpmc_l3_clk)) {
742 printk(KERN_ERR "Could not get GPMC clock %s\n", ck); 924 dev_err(&pdev->dev, "error: clk_get\n");
743 BUG(); 925 gpmc_irq = 0;
926 return PTR_ERR(gpmc_l3_clk);
744 } 927 }
745 928
746 gpmc_base = ioremap(l, SZ_4K); 929 clk_prepare_enable(gpmc_l3_clk);
747 if (!gpmc_base) {
748 clk_put(gpmc_l3_clk);
749 printk(KERN_ERR "Could not get GPMC register memory\n");
750 BUG();
751 }
752 930
753 clk_enable(gpmc_l3_clk); 931 gpmc_dev = &pdev->dev;
754 932
755 l = gpmc_read_reg(GPMC_REVISION); 933 l = gpmc_read_reg(GPMC_REVISION);
756 printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); 934 if (GPMC_REVISION_MAJOR(l) > 0x4)
757 /* Set smart idle mode and automatic L3 clock gating */ 935 gpmc_capability = GPMC_HAS_WR_ACCESS | GPMC_HAS_WR_DATA_MUX_BUS;
758 l = gpmc_read_reg(GPMC_SYSCONFIG); 936 dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l),
759 l &= 0x03 << 3; 937 GPMC_REVISION_MINOR(l));
760 l |= (0x02 << 3) | (1 << 0); 938
761 gpmc_write_reg(GPMC_SYSCONFIG, l);
762 gpmc_mem_init(); 939 gpmc_mem_init();
763 940
764 /* initalize the irq_chained */ 941 if (IS_ERR_VALUE(gpmc_setup_irq()))
765 irq = OMAP_GPMC_IRQ_BASE; 942 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
766 for (cs = 0; cs < GPMC_CS_NUM; cs++) { 943
767 irq_set_chip_and_handler(irq, &dummy_irq_chip, 944 return 0;
768 handle_simple_irq); 945}
769 set_irq_flags(irq, IRQF_VALID); 946
770 irq++; 947static __exit int gpmc_remove(struct platform_device *pdev)
771 } 948{
949 gpmc_free_irq();
950 gpmc_mem_exit();
951 gpmc_dev = NULL;
952 return 0;
953}
954
955static struct platform_driver gpmc_driver = {
956 .probe = gpmc_probe,
957 .remove = __devexit_p(gpmc_remove),
958 .driver = {
959 .name = DEVICE_NAME,
960 .owner = THIS_MODULE,
961 },
962};
772 963
773 ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL); 964static __init int gpmc_init(void)
774 if (ret) 965{
775 pr_err("gpmc: irq-%d could not claim: err %d\n", 966 return platform_driver_register(&gpmc_driver);
776 gpmc_irq, ret);
777 return ret;
778} 967}
968
969static __exit void gpmc_exit(void)
970{
971 platform_driver_unregister(&gpmc_driver);
972
973}
974
779postcore_initcall(gpmc_init); 975postcore_initcall(gpmc_init);
976module_exit(gpmc_exit);
977
978static int __init omap_gpmc_init(void)
979{
980 struct omap_hwmod *oh;
981 struct platform_device *pdev;
982 char *oh_name = "gpmc";
983
984 oh = omap_hwmod_lookup(oh_name);
985 if (!oh) {
986 pr_err("Could not look up %s\n", oh_name);
987 return -ENODEV;
988 }
989
990 pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0, NULL, 0, 0);
991 WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
992
993 return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
994}
995postcore_initcall(omap_gpmc_init);
780 996
781static irqreturn_t gpmc_handle_irq(int irq, void *dev) 997static irqreturn_t gpmc_handle_irq(int irq, void *dev)
782{ 998{
783 u8 cs; 999 int i;
1000 u32 regval;
1001
1002 regval = gpmc_read_reg(GPMC_IRQSTATUS);
1003
1004 if (!regval)
1005 return IRQ_NONE;
1006
1007 for (i = 0; i < GPMC_NR_IRQ; i++)
1008 if (regval & gpmc_client_irq[i].bitmask)
1009 generic_handle_irq(gpmc_client_irq[i].irq);
784 1010
785 /* check cs to invoke the irq */ 1011 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 1012
790 return IRQ_HANDLED; 1013 return IRQ_HANDLED;
791} 1014}
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index a9675d8d1822..80399d740952 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -15,6 +15,8 @@
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> 22#include <plat/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..6b98a178fbe0 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 <mach/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/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/io.c b/arch/arm/mach-omap2/io.c
index 4d2d981ff5c5..4234d28dc171 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"
@@ -523,6 +524,8 @@ void __init am33xx_init_early(void)
523 am33xx_voltagedomains_init(); 524 am33xx_voltagedomains_init();
524 am33xx_powerdomains_init(); 525 am33xx_powerdomains_init();
525 am33xx_clockdomains_init(); 526 am33xx_clockdomains_init();
527 am33xx_hwmod_init();
528 omap_hwmod_init_postsetup();
526 am33xx_clk_init(); 529 am33xx_clk_init();
527} 530}
528#endif 531#endif
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/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..d493727632e9 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -18,9 +18,7 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20 20
21#include <mach/irqs.h>
22#include <plat/dma.h> 21#include <plat/dma.h>
23#include <plat/cpu.h>
24#include <plat/mcbsp.h> 22#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>
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-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-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9a35adf91232..19cc5f504f7e 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>
28#include <mach/omap-secure.h> 27#include <mach/omap-secure.h>
29#include <mach/omap-wakeupgen.h> 28#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 330d4c6e746b..ecaad7d371ee 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -30,6 +30,7 @@
30#include <mach/omap-wakeupgen.h> 30#include <mach/omap-wakeupgen.h>
31#include <mach/omap-secure.h> 31#include <mach/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/plat-omap/include/plat/omap24xx.h b/arch/arm/mach-omap2/omap24xx.h
index 92df9e27cc5c..641a2c8d2eee 100644
--- a/arch/arm/plat-omap/include/plat/omap24xx.h
+++ b/arch/arm/mach-omap2/omap24xx.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/arm/plat-omap/include/mach/omap24xx.h
3 *
4 * This file contains the processor specific definitions 2 * This file contains the processor specific definitions
5 * of the TI OMAP24XX. 3 * of the TI OMAP24XX.
6 * 4 *
diff --git a/arch/arm/plat-omap/include/plat/omap34xx.h b/arch/arm/mach-omap2/omap34xx.h
index 0d818acf3917..c0d1b4b1653f 100644
--- a/arch/arm/plat-omap/include/plat/omap34xx.h
+++ b/arch/arm/mach-omap2/omap34xx.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/arm/plat-omap/include/mach/omap34xx.h
3 *
4 * This file contains the processor specific definitions of the TI OMAP34XX. 2 * This file contains the processor specific definitions of the TI OMAP34XX.
5 * 3 *
6 * Copyright (C) 2007 Texas Instruments. 4 * Copyright (C) 2007 Texas Instruments.
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index c29dee998a79..73c1440a8253 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>
33#include <mach/omap-wakeupgen.h> 32#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/plat-omap/include/plat/omap44xx.h b/arch/arm/mach-omap2/omap44xx.h
index c0d478e55c84..43b927b2e2e8 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/mach-omap2/omap44xx.h
@@ -39,12 +39,12 @@
39#define IRQ_SIR_IRQ 0x0040 39#define IRQ_SIR_IRQ 0x0040
40#define OMAP44XX_GIC_DIST_BASE 0x48241000 40#define OMAP44XX_GIC_DIST_BASE 0x48241000
41#define OMAP44XX_GIC_CPU_BASE 0x48240100 41#define OMAP44XX_GIC_CPU_BASE 0x48240100
42#define OMAP44XX_IRQ_GIC_START 32
42#define OMAP44XX_SCU_BASE 0x48240000 43#define OMAP44XX_SCU_BASE 0x48240000
43#define OMAP44XX_LOCAL_TWD_BASE 0x48240600 44#define OMAP44XX_LOCAL_TWD_BASE 0x48240600
44#define OMAP44XX_L2CACHE_BASE 0x48242000 45#define OMAP44XX_L2CACHE_BASE 0x48242000
45#define OMAP44XX_WKUPGEN_BASE 0x48281000 46#define OMAP44XX_WKUPGEN_BASE 0x48281000
46#define OMAP44XX_MCPDM_BASE 0x40132000 47#define OMAP44XX_MCPDM_BASE 0x40132000
47#define OMAP44XX_MCPDM_L3_BASE 0x49032000
48#define OMAP44XX_SAR_RAM_BASE 0x4a326000 48#define OMAP44XX_SAR_RAM_BASE 0x4a326000
49 49
50#define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000) 50#define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000)
diff --git a/arch/arm/plat-omap/include/plat/omap54xx.h b/arch/arm/mach-omap2/omap54xx.h
index a2582bb3cab3..a2582bb3cab3 100644
--- a/arch/arm/plat-omap/include/plat/omap54xx.h
+++ b/arch/arm/mach-omap2/omap54xx.h
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 37afbd173c2c..6af64bbd9e1d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -139,18 +139,20 @@
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 "cm33xx.h"
152#include "prm2xxx_3xxx.h" 153#include "prm2xxx_3xxx.h"
153#include "prm44xx.h" 154#include "prm44xx.h"
155#include "prm33xx.h"
154#include "prminst44xx.h" 156#include "prminst44xx.h"
155#include "mux.h" 157#include "mux.h"
156#include "pm.h" 158#include "pm.h"
@@ -677,16 +679,25 @@ static int _init_main_clk(struct omap_hwmod *oh)
677 if (!oh->main_clk) 679 if (!oh->main_clk)
678 return 0; 680 return 0;
679 681
680 oh->_clk = omap_clk_get_by_name(oh->main_clk); 682 oh->_clk = clk_get(NULL, oh->main_clk);
681 if (!oh->_clk) { 683 if (IS_ERR(oh->_clk)) {
682 pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n", 684 pr_warning("omap_hwmod: %s: cannot clk_get main_clk %s\n",
683 oh->name, oh->main_clk); 685 oh->name, oh->main_clk);
684 return -EINVAL; 686 return -EINVAL;
685 } 687 }
688 /*
689 * HACK: This needs a re-visit once clk_prepare() is implemented
690 * to do something meaningful. Today its just a no-op.
691 * If clk_prepare() is used at some point to do things like
692 * voltage scaling etc, then this would have to be moved to
693 * some point where subsystems like i2c and pmic become
694 * available.
695 */
696 clk_prepare(oh->_clk);
686 697
687 if (!oh->_clk->clkdm) 698 if (!oh->_clk->clkdm)
688 pr_warning("omap_hwmod: %s: missing clockdomain for %s.\n", 699 pr_debug("omap_hwmod: %s: missing clockdomain for %s.\n",
689 oh->main_clk, oh->_clk->name); 700 oh->name, oh->main_clk);
690 701
691 return ret; 702 return ret;
692} 703}
@@ -713,13 +724,22 @@ static int _init_interface_clks(struct omap_hwmod *oh)
713 if (!os->clk) 724 if (!os->clk)
714 continue; 725 continue;
715 726
716 c = omap_clk_get_by_name(os->clk); 727 c = clk_get(NULL, os->clk);
717 if (!c) { 728 if (IS_ERR(c)) {
718 pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n", 729 pr_warning("omap_hwmod: %s: cannot clk_get interface_clk %s\n",
719 oh->name, os->clk); 730 oh->name, os->clk);
720 ret = -EINVAL; 731 ret = -EINVAL;
721 } 732 }
722 os->_clk = c; 733 os->_clk = c;
734 /*
735 * HACK: This needs a re-visit once clk_prepare() is implemented
736 * to do something meaningful. Today its just a no-op.
737 * If clk_prepare() is used at some point to do things like
738 * voltage scaling etc, then this would have to be moved to
739 * some point where subsystems like i2c and pmic become
740 * available.
741 */
742 clk_prepare(os->_clk);
723 } 743 }
724 744
725 return ret; 745 return ret;
@@ -740,13 +760,22 @@ static int _init_opt_clks(struct omap_hwmod *oh)
740 int ret = 0; 760 int ret = 0;
741 761
742 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { 762 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) {
743 c = omap_clk_get_by_name(oc->clk); 763 c = clk_get(NULL, oc->clk);
744 if (!c) { 764 if (IS_ERR(c)) {
745 pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n", 765 pr_warning("omap_hwmod: %s: cannot clk_get opt_clk %s\n",
746 oh->name, oc->clk); 766 oh->name, oc->clk);
747 ret = -EINVAL; 767 ret = -EINVAL;
748 } 768 }
749 oc->_clk = c; 769 oc->_clk = c;
770 /*
771 * HACK: This needs a re-visit once clk_prepare() is implemented
772 * to do something meaningful. Today its just a no-op.
773 * If clk_prepare() is used at some point to do things like
774 * voltage scaling etc, then this would have to be moved to
775 * some point where subsystems like i2c and pmic become
776 * available.
777 */
778 clk_prepare(oc->_clk);
750 } 779 }
751 780
752 return ret; 781 return ret;
@@ -825,7 +854,7 @@ static void _enable_optional_clocks(struct omap_hwmod *oh)
825 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) 854 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
826 if (oc->_clk) { 855 if (oc->_clk) {
827 pr_debug("omap_hwmod: enable %s:%s\n", oc->role, 856 pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
828 oc->_clk->name); 857 __clk_get_name(oc->_clk));
829 clk_enable(oc->_clk); 858 clk_enable(oc->_clk);
830 } 859 }
831} 860}
@@ -840,7 +869,7 @@ static void _disable_optional_clocks(struct omap_hwmod *oh)
840 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) 869 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
841 if (oc->_clk) { 870 if (oc->_clk) {
842 pr_debug("omap_hwmod: disable %s:%s\n", oc->role, 871 pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
843 oc->_clk->name); 872 __clk_get_name(oc->_clk));
844 clk_disable(oc->_clk); 873 clk_disable(oc->_clk);
845 } 874 }
846} 875}
@@ -868,6 +897,26 @@ static void _omap4_enable_module(struct omap_hwmod *oh)
868} 897}
869 898
870/** 899/**
900 * _am33xx_enable_module - enable CLKCTRL modulemode on AM33XX
901 * @oh: struct omap_hwmod *
902 *
903 * Enables the PRCM module mode related to the hwmod @oh.
904 * No return value.
905 */
906static void _am33xx_enable_module(struct omap_hwmod *oh)
907{
908 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
909 return;
910
911 pr_debug("omap_hwmod: %s: %s: %d\n",
912 oh->name, __func__, oh->prcm.omap4.modulemode);
913
914 am33xx_cm_module_enable(oh->prcm.omap4.modulemode, oh->clkdm->cm_inst,
915 oh->clkdm->clkdm_offs,
916 oh->prcm.omap4.clkctrl_offs);
917}
918
919/**
871 * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4 920 * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4
872 * @oh: struct omap_hwmod * 921 * @oh: struct omap_hwmod *
873 * 922 *
@@ -878,10 +927,10 @@ static void _omap4_enable_module(struct omap_hwmod *oh)
878 */ 927 */
879static int _omap4_wait_target_disable(struct omap_hwmod *oh) 928static int _omap4_wait_target_disable(struct omap_hwmod *oh)
880{ 929{
881 if (!oh || !oh->clkdm) 930 if (!oh)
882 return -EINVAL; 931 return -EINVAL;
883 932
884 if (oh->_int_flags & _HWMOD_NO_MPU_PORT) 933 if (oh->_int_flags & _HWMOD_NO_MPU_PORT || !oh->clkdm)
885 return 0; 934 return 0;
886 935
887 if (oh->flags & HWMOD_NO_IDLEST) 936 if (oh->flags & HWMOD_NO_IDLEST)
@@ -894,6 +943,31 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh)
894} 943}
895 944
896/** 945/**
946 * _am33xx_wait_target_disable - wait for a module to be disabled on AM33XX
947 * @oh: struct omap_hwmod *
948 *
949 * Wait for a module @oh to enter slave idle. Returns 0 if the module
950 * does not have an IDLEST bit or if the module successfully enters
951 * slave idle; otherwise, pass along the return value of the
952 * appropriate *_cm*_wait_module_idle() function.
953 */
954static int _am33xx_wait_target_disable(struct omap_hwmod *oh)
955{
956 if (!oh)
957 return -EINVAL;
958
959 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
960 return 0;
961
962 if (oh->flags & HWMOD_NO_IDLEST)
963 return 0;
964
965 return am33xx_cm_wait_module_idle(oh->clkdm->cm_inst,
966 oh->clkdm->clkdm_offs,
967 oh->prcm.omap4.clkctrl_offs);
968}
969
970/**
897 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh 971 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
898 * @oh: struct omap_hwmod *oh 972 * @oh: struct omap_hwmod *oh
899 * 973 *
@@ -1380,8 +1454,10 @@ static struct omap_hwmod *_lookup(const char *name)
1380 */ 1454 */
1381static int _init_clkdm(struct omap_hwmod *oh) 1455static int _init_clkdm(struct omap_hwmod *oh)
1382{ 1456{
1383 if (!oh->clkdm_name) 1457 if (!oh->clkdm_name) {
1458 pr_debug("omap_hwmod: %s: missing clockdomain\n", oh->name);
1384 return 0; 1459 return 0;
1460 }
1385 1461
1386 oh->clkdm = clkdm_lookup(oh->clkdm_name); 1462 oh->clkdm = clkdm_lookup(oh->clkdm_name);
1387 if (!oh->clkdm) { 1463 if (!oh->clkdm) {
@@ -1438,8 +1514,8 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
1438 * Return the bit position of the reset line that match the 1514 * Return the bit position of the reset line that match the
1439 * input name. Return -ENOENT if not found. 1515 * input name. Return -ENOENT if not found.
1440 */ 1516 */
1441static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name, 1517static int _lookup_hardreset(struct omap_hwmod *oh, const char *name,
1442 struct omap_hwmod_rst_info *ohri) 1518 struct omap_hwmod_rst_info *ohri)
1443{ 1519{
1444 int i; 1520 int i;
1445 1521
@@ -1475,7 +1551,7 @@ static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name,
1475static int _assert_hardreset(struct omap_hwmod *oh, const char *name) 1551static int _assert_hardreset(struct omap_hwmod *oh, const char *name)
1476{ 1552{
1477 struct omap_hwmod_rst_info ohri; 1553 struct omap_hwmod_rst_info ohri;
1478 u8 ret = -EINVAL; 1554 int ret = -EINVAL;
1479 1555
1480 if (!oh) 1556 if (!oh)
1481 return -EINVAL; 1557 return -EINVAL;
@@ -1484,7 +1560,7 @@ static int _assert_hardreset(struct omap_hwmod *oh, const char *name)
1484 return -ENOSYS; 1560 return -ENOSYS;
1485 1561
1486 ret = _lookup_hardreset(oh, name, &ohri); 1562 ret = _lookup_hardreset(oh, name, &ohri);
1487 if (IS_ERR_VALUE(ret)) 1563 if (ret < 0)
1488 return ret; 1564 return ret;
1489 1565
1490 ret = soc_ops.assert_hardreset(oh, &ohri); 1566 ret = soc_ops.assert_hardreset(oh, &ohri);
@@ -1509,6 +1585,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
1509{ 1585{
1510 struct omap_hwmod_rst_info ohri; 1586 struct omap_hwmod_rst_info ohri;
1511 int ret = -EINVAL; 1587 int ret = -EINVAL;
1588 int hwsup = 0;
1512 1589
1513 if (!oh) 1590 if (!oh)
1514 return -EINVAL; 1591 return -EINVAL;
@@ -1520,10 +1597,46 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
1520 if (IS_ERR_VALUE(ret)) 1597 if (IS_ERR_VALUE(ret))
1521 return ret; 1598 return ret;
1522 1599
1600 if (oh->clkdm) {
1601 /*
1602 * A clockdomain must be in SW_SUP otherwise reset
1603 * might not be completed. The clockdomain can be set
1604 * in HW_AUTO only when the module become ready.
1605 */
1606 hwsup = clkdm_in_hwsup(oh->clkdm);
1607 ret = clkdm_hwmod_enable(oh->clkdm, oh);
1608 if (ret) {
1609 WARN(1, "omap_hwmod: %s: could not enable clockdomain %s: %d\n",
1610 oh->name, oh->clkdm->name, ret);
1611 return ret;
1612 }
1613 }
1614
1615 _enable_clocks(oh);
1616 if (soc_ops.enable_module)
1617 soc_ops.enable_module(oh);
1618
1523 ret = soc_ops.deassert_hardreset(oh, &ohri); 1619 ret = soc_ops.deassert_hardreset(oh, &ohri);
1620
1621 if (soc_ops.disable_module)
1622 soc_ops.disable_module(oh);
1623 _disable_clocks(oh);
1624
1524 if (ret == -EBUSY) 1625 if (ret == -EBUSY)
1525 pr_warning("omap_hwmod: %s: failed to hardreset\n", oh->name); 1626 pr_warning("omap_hwmod: %s: failed to hardreset\n", oh->name);
1526 1627
1628 if (!ret) {
1629 /*
1630 * Set the clockdomain to HW_AUTO, assuming that the
1631 * previous state was HW_AUTO.
1632 */
1633 if (oh->clkdm && hwsup)
1634 clkdm_allow_idle(oh->clkdm);
1635 } else {
1636 if (oh->clkdm)
1637 clkdm_hwmod_disable(oh->clkdm, oh);
1638 }
1639
1527 return ret; 1640 return ret;
1528} 1641}
1529 1642
@@ -1542,7 +1655,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
1542static int _read_hardreset(struct omap_hwmod *oh, const char *name) 1655static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1543{ 1656{
1544 struct omap_hwmod_rst_info ohri; 1657 struct omap_hwmod_rst_info ohri;
1545 u8 ret = -EINVAL; 1658 int ret = -EINVAL;
1546 1659
1547 if (!oh) 1660 if (!oh)
1548 return -EINVAL; 1661 return -EINVAL;
@@ -1551,32 +1664,35 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1551 return -ENOSYS; 1664 return -ENOSYS;
1552 1665
1553 ret = _lookup_hardreset(oh, name, &ohri); 1666 ret = _lookup_hardreset(oh, name, &ohri);
1554 if (IS_ERR_VALUE(ret)) 1667 if (ret < 0)
1555 return ret; 1668 return ret;
1556 1669
1557 return soc_ops.is_hardreset_asserted(oh, &ohri); 1670 return soc_ops.is_hardreset_asserted(oh, &ohri);
1558} 1671}
1559 1672
1560/** 1673/**
1561 * _are_any_hardreset_lines_asserted - return true if part of @oh is hard-reset 1674 * _are_all_hardreset_lines_asserted - return true if the @oh is hard-reset
1562 * @oh: struct omap_hwmod * 1675 * @oh: struct omap_hwmod *
1563 * 1676 *
1564 * If any hardreset line associated with @oh is asserted, then return true. 1677 * If all hardreset lines associated with @oh are asserted, then return true.
1565 * Otherwise, if @oh has no hardreset lines associated with it, or if 1678 * Otherwise, if part of @oh is out hardreset or if no hardreset lines
1566 * no hardreset lines associated with @oh are asserted, then return false. 1679 * associated with @oh are asserted, then return false.
1567 * This function is used to avoid executing some parts of the IP block 1680 * This function is used to avoid executing some parts of the IP block
1568 * enable/disable sequence if a hardreset line is set. 1681 * enable/disable sequence if its hardreset line is set.
1569 */ 1682 */
1570static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh) 1683static bool _are_all_hardreset_lines_asserted(struct omap_hwmod *oh)
1571{ 1684{
1572 int i; 1685 int i, rst_cnt = 0;
1573 1686
1574 if (oh->rst_lines_cnt == 0) 1687 if (oh->rst_lines_cnt == 0)
1575 return false; 1688 return false;
1576 1689
1577 for (i = 0; i < oh->rst_lines_cnt; i++) 1690 for (i = 0; i < oh->rst_lines_cnt; i++)
1578 if (_read_hardreset(oh, oh->rst_lines[i].name) > 0) 1691 if (_read_hardreset(oh, oh->rst_lines[i].name) > 0)
1579 return true; 1692 rst_cnt++;
1693
1694 if (oh->rst_lines_cnt == rst_cnt)
1695 return true;
1580 1696
1581 return false; 1697 return false;
1582} 1698}
@@ -1595,6 +1711,13 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
1595 if (!oh->clkdm || !oh->prcm.omap4.modulemode) 1711 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
1596 return -EINVAL; 1712 return -EINVAL;
1597 1713
1714 /*
1715 * Since integration code might still be doing something, only
1716 * disable if all lines are under hardreset.
1717 */
1718 if (!_are_all_hardreset_lines_asserted(oh))
1719 return 0;
1720
1598 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); 1721 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
1599 1722
1600 omap4_cminst_module_disable(oh->clkdm->prcm_partition, 1723 omap4_cminst_module_disable(oh->clkdm->prcm_partition,
@@ -1602,10 +1725,37 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
1602 oh->clkdm->clkdm_offs, 1725 oh->clkdm->clkdm_offs,
1603 oh->prcm.omap4.clkctrl_offs); 1726 oh->prcm.omap4.clkctrl_offs);
1604 1727
1605 if (_are_any_hardreset_lines_asserted(oh)) 1728 v = _omap4_wait_target_disable(oh);
1729 if (v)
1730 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1731 oh->name);
1732
1733 return 0;
1734}
1735
1736/**
1737 * _am33xx_disable_module - enable CLKCTRL modulemode on AM33XX
1738 * @oh: struct omap_hwmod *
1739 *
1740 * Disable the PRCM module mode related to the hwmod @oh.
1741 * Return EINVAL if the modulemode is not supported and 0 in case of success.
1742 */
1743static int _am33xx_disable_module(struct omap_hwmod *oh)
1744{
1745 int v;
1746
1747 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
1748 return -EINVAL;
1749
1750 pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
1751
1752 am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs,
1753 oh->prcm.omap4.clkctrl_offs);
1754
1755 if (_are_all_hardreset_lines_asserted(oh))
1606 return 0; 1756 return 0;
1607 1757
1608 v = _omap4_wait_target_disable(oh); 1758 v = _am33xx_wait_target_disable(oh);
1609 if (v) 1759 if (v)
1610 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", 1760 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1611 oh->name); 1761 oh->name);
@@ -1641,8 +1791,8 @@ static int _ocp_softreset(struct omap_hwmod *oh)
1641 1791
1642 /* clocks must be on for this operation */ 1792 /* clocks must be on for this operation */
1643 if (oh->_state != _HWMOD_STATE_ENABLED) { 1793 if (oh->_state != _HWMOD_STATE_ENABLED) {
1644 pr_warning("omap_hwmod: %s: reset can only be entered from " 1794 pr_warn("omap_hwmod: %s: reset can only be entered from enabled state\n",
1645 "enabled state\n", oh->name); 1795 oh->name);
1646 return -EINVAL; 1796 return -EINVAL;
1647 } 1797 }
1648 1798
@@ -1830,7 +1980,7 @@ static int _enable(struct omap_hwmod *oh)
1830 } 1980 }
1831 1981
1832 /* 1982 /*
1833 * If an IP block contains HW reset lines and any of them are 1983 * If an IP block contains HW reset lines and all of them are
1834 * asserted, we let integration code associated with that 1984 * asserted, we let integration code associated with that
1835 * block handle the enable. We've received very little 1985 * block handle the enable. We've received very little
1836 * information on what those driver authors need, and until 1986 * information on what those driver authors need, and until
@@ -1838,7 +1988,7 @@ static int _enable(struct omap_hwmod *oh)
1838 * posted to the public lists, this is probably the best we 1988 * posted to the public lists, this is probably the best we
1839 * can do. 1989 * can do.
1840 */ 1990 */
1841 if (_are_any_hardreset_lines_asserted(oh)) 1991 if (_are_all_hardreset_lines_asserted(oh))
1842 return 0; 1992 return 0;
1843 1993
1844 /* Mux pins for device runtime if populated */ 1994 /* Mux pins for device runtime if populated */
@@ -1857,7 +2007,8 @@ static int _enable(struct omap_hwmod *oh)
1857 * completely the module. The clockdomain can be set 2007 * completely the module. The clockdomain can be set
1858 * in HW_AUTO only when the module become ready. 2008 * in HW_AUTO only when the module become ready.
1859 */ 2009 */
1860 hwsup = clkdm_in_hwsup(oh->clkdm); 2010 hwsup = clkdm_in_hwsup(oh->clkdm) &&
2011 !clkdm_missing_idle_reporting(oh->clkdm);
1861 r = clkdm_hwmod_enable(oh->clkdm, oh); 2012 r = clkdm_hwmod_enable(oh->clkdm, oh);
1862 if (r) { 2013 if (r) {
1863 WARN(1, "omap_hwmod: %s: could not enable clockdomain %s: %d\n", 2014 WARN(1, "omap_hwmod: %s: could not enable clockdomain %s: %d\n",
@@ -1919,7 +2070,7 @@ static int _idle(struct omap_hwmod *oh)
1919 return -EINVAL; 2070 return -EINVAL;
1920 } 2071 }
1921 2072
1922 if (_are_any_hardreset_lines_asserted(oh)) 2073 if (_are_all_hardreset_lines_asserted(oh))
1923 return 0; 2074 return 0;
1924 2075
1925 if (oh->class->sysc) 2076 if (oh->class->sysc)
@@ -2007,7 +2158,7 @@ static int _shutdown(struct omap_hwmod *oh)
2007 return -EINVAL; 2158 return -EINVAL;
2008 } 2159 }
2009 2160
2010 if (_are_any_hardreset_lines_asserted(oh)) 2161 if (_are_all_hardreset_lines_asserted(oh))
2011 return 0; 2162 return 0;
2012 2163
2013 pr_debug("omap_hwmod: %s: disabling\n", oh->name); 2164 pr_debug("omap_hwmod: %s: disabling\n", oh->name);
@@ -2531,10 +2682,10 @@ static int _omap2_wait_target_ready(struct omap_hwmod *oh)
2531 */ 2682 */
2532static int _omap4_wait_target_ready(struct omap_hwmod *oh) 2683static int _omap4_wait_target_ready(struct omap_hwmod *oh)
2533{ 2684{
2534 if (!oh || !oh->clkdm) 2685 if (!oh)
2535 return -EINVAL; 2686 return -EINVAL;
2536 2687
2537 if (oh->flags & HWMOD_NO_IDLEST) 2688 if (oh->flags & HWMOD_NO_IDLEST || !oh->clkdm)
2538 return 0; 2689 return 0;
2539 2690
2540 if (!_find_mpu_rt_port(oh)) 2691 if (!_find_mpu_rt_port(oh))
@@ -2549,6 +2700,33 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh)
2549} 2700}
2550 2701
2551/** 2702/**
2703 * _am33xx_wait_target_ready - wait for a module to leave slave idle
2704 * @oh: struct omap_hwmod *
2705 *
2706 * Wait for a module @oh to leave slave idle. Returns 0 if the module
2707 * does not have an IDLEST bit or if the module successfully leaves
2708 * slave idle; otherwise, pass along the return value of the
2709 * appropriate *_cm*_wait_module_ready() function.
2710 */
2711static int _am33xx_wait_target_ready(struct omap_hwmod *oh)
2712{
2713 if (!oh || !oh->clkdm)
2714 return -EINVAL;
2715
2716 if (oh->flags & HWMOD_NO_IDLEST)
2717 return 0;
2718
2719 if (!_find_mpu_rt_port(oh))
2720 return 0;
2721
2722 /* XXX check module SIDLEMODE, hardreset status */
2723
2724 return am33xx_cm_wait_module_ready(oh->clkdm->cm_inst,
2725 oh->clkdm->clkdm_offs,
2726 oh->prcm.omap4.clkctrl_offs);
2727}
2728
2729/**
2552 * _omap2_assert_hardreset - call OMAP2 PRM hardreset fn with hwmod args 2730 * _omap2_assert_hardreset - call OMAP2 PRM hardreset fn with hwmod args
2553 * @oh: struct omap_hwmod * to assert hardreset 2731 * @oh: struct omap_hwmod * to assert hardreset
2554 * @ohri: hardreset line data 2732 * @ohri: hardreset line data
@@ -2679,6 +2857,72 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh,
2679 oh->prcm.omap4.rstctrl_offs); 2857 oh->prcm.omap4.rstctrl_offs);
2680} 2858}
2681 2859
2860/**
2861 * _am33xx_assert_hardreset - call AM33XX PRM hardreset fn with hwmod args
2862 * @oh: struct omap_hwmod * to assert hardreset
2863 * @ohri: hardreset line data
2864 *
2865 * Call am33xx_prminst_assert_hardreset() with parameters extracted
2866 * from the hwmod @oh and the hardreset line data @ohri. Only
2867 * intended for use as an soc_ops function pointer. Passes along the
2868 * return value from am33xx_prminst_assert_hardreset(). XXX This
2869 * function is scheduled for removal when the PRM code is moved into
2870 * drivers/.
2871 */
2872static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
2873 struct omap_hwmod_rst_info *ohri)
2874
2875{
2876 return am33xx_prm_assert_hardreset(ohri->rst_shift,
2877 oh->clkdm->pwrdm.ptr->prcm_offs,
2878 oh->prcm.omap4.rstctrl_offs);
2879}
2880
2881/**
2882 * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args
2883 * @oh: struct omap_hwmod * to deassert hardreset
2884 * @ohri: hardreset line data
2885 *
2886 * Call am33xx_prminst_deassert_hardreset() with parameters extracted
2887 * from the hwmod @oh and the hardreset line data @ohri. Only
2888 * intended for use as an soc_ops function pointer. Passes along the
2889 * return value from am33xx_prminst_deassert_hardreset(). XXX This
2890 * function is scheduled for removal when the PRM code is moved into
2891 * drivers/.
2892 */
2893static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
2894 struct omap_hwmod_rst_info *ohri)
2895{
2896 if (ohri->st_shift)
2897 pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
2898 oh->name, ohri->name);
2899
2900 return am33xx_prm_deassert_hardreset(ohri->rst_shift,
2901 oh->clkdm->pwrdm.ptr->prcm_offs,
2902 oh->prcm.omap4.rstctrl_offs,
2903 oh->prcm.omap4.rstst_offs);
2904}
2905
2906/**
2907 * _am33xx_is_hardreset_asserted - call AM33XX PRM hardreset fn with hwmod args
2908 * @oh: struct omap_hwmod * to test hardreset
2909 * @ohri: hardreset line data
2910 *
2911 * Call am33xx_prminst_is_hardreset_asserted() with parameters
2912 * extracted from the hwmod @oh and the hardreset line data @ohri.
2913 * Only intended for use as an soc_ops function pointer. Passes along
2914 * the return value from am33xx_prminst_is_hardreset_asserted(). XXX
2915 * This function is scheduled for removal when the PRM code is moved
2916 * into drivers/.
2917 */
2918static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh,
2919 struct omap_hwmod_rst_info *ohri)
2920{
2921 return am33xx_prm_is_hardreset_asserted(ohri->rst_shift,
2922 oh->clkdm->pwrdm.ptr->prcm_offs,
2923 oh->prcm.omap4.rstctrl_offs);
2924}
2925
2682/* Public functions */ 2926/* Public functions */
2683 2927
2684u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) 2928u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
@@ -3678,6 +3922,14 @@ void __init omap_hwmod_init(void)
3678 soc_ops.deassert_hardreset = _omap4_deassert_hardreset; 3922 soc_ops.deassert_hardreset = _omap4_deassert_hardreset;
3679 soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; 3923 soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
3680 soc_ops.init_clkdm = _init_clkdm; 3924 soc_ops.init_clkdm = _init_clkdm;
3925 } else if (soc_is_am33xx()) {
3926 soc_ops.enable_module = _am33xx_enable_module;
3927 soc_ops.disable_module = _am33xx_disable_module;
3928 soc_ops.wait_target_ready = _am33xx_wait_target_ready;
3929 soc_ops.assert_hardreset = _am33xx_assert_hardreset;
3930 soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
3931 soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted;
3932 soc_ops.init_clkdm = _init_clkdm;
3681 } else { 3933 } else {
3682 WARN(1, "omap_hwmod: unknown SoC type\n"); 3934 WARN(1, "omap_hwmod: unknown SoC type\n");
3683 } 3935 }
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 50cfab61b0e2..e778ff4e1887 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -13,12 +13,9 @@
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 <plat/omap_hwmod.h> 15#include <plat/omap_hwmod.h>
16#include <mach/irqs.h>
17#include <plat/cpu.h>
18#include <plat/dma.h> 16#include <plat/dma.h>
19#include <plat/serial.h> 17#include <plat/serial.h>
20#include <plat/i2c.h> 18#include <plat/i2c.h>
21#include <plat/gpio.h>
22#include <plat/mcspi.h> 19#include <plat/mcspi.h>
23#include <plat/dmtimer.h> 20#include <plat/dmtimer.h>
24#include <plat/l3_2xxx.h> 21#include <plat/l3_2xxx.h>
@@ -162,9 +159,9 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {
162 159
163/* mailbox */ 160/* mailbox */
164static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { 161static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
165 { .name = "dsp", .irq = 26 }, 162 { .name = "dsp", .irq = 26 + OMAP_INTC_START, },
166 { .name = "iva", .irq = 34 }, 163 { .name = "iva", .irq = 34 + OMAP_INTC_START, },
167 { .irq = -1 } 164 { .irq = -1 },
168}; 165};
169 166
170static struct omap_hwmod omap2420_mailbox_hwmod = { 167static struct omap_hwmod omap2420_mailbox_hwmod = {
@@ -199,9 +196,9 @@ static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
199 196
200/* mcbsp1 */ 197/* mcbsp1 */
201static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { 198static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
202 { .name = "tx", .irq = 59 }, 199 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
203 { .name = "rx", .irq = 60 }, 200 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
204 { .irq = -1 } 201 { .irq = -1 },
205}; 202};
206 203
207static struct omap_hwmod omap2420_mcbsp1_hwmod = { 204static struct omap_hwmod omap2420_mcbsp1_hwmod = {
@@ -225,9 +222,9 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
225 222
226/* mcbsp2 */ 223/* mcbsp2 */
227static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { 224static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
228 { .name = "tx", .irq = 62 }, 225 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
229 { .name = "rx", .irq = 63 }, 226 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
230 { .irq = -1 } 227 { .irq = -1 },
231}; 228};
232 229
233static struct omap_hwmod omap2420_mcbsp2_hwmod = { 230static struct omap_hwmod omap2420_mcbsp2_hwmod = {
@@ -265,8 +262,8 @@ static struct omap_hwmod_class omap2420_msdi_hwmod_class = {
265 262
266/* msdi1 */ 263/* msdi1 */
267static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = { 264static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = {
268 { .irq = 83 }, 265 { .irq = 83 + OMAP_INTC_START, },
269 { .irq = -1 } 266 { .irq = -1 },
270}; 267};
271 268
272static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = { 269static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = {
@@ -538,6 +535,15 @@ static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = {
538 { } 535 { }
539}; 536};
540 537
538static struct omap_hwmod_addr_space omap2420_gpmc_addrs[] = {
539 {
540 .pa_start = 0x6800a000,
541 .pa_end = 0x6800afff,
542 .flags = ADDR_TYPE_RT
543 },
544 { }
545};
546
541static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { 547static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = {
542 .master = &omap2xxx_l4_wkup_hwmod, 548 .master = &omap2xxx_l4_wkup_hwmod,
543 .slave = &omap2xxx_counter_32k_hwmod, 549 .slave = &omap2xxx_counter_32k_hwmod,
@@ -546,6 +552,14 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = {
546 .user = OCP_USER_MPU | OCP_USER_SDMA, 552 .user = OCP_USER_MPU | OCP_USER_SDMA,
547}; 553};
548 554
555static struct omap_hwmod_ocp_if omap2420_l3__gpmc = {
556 .master = &omap2xxx_l3_main_hwmod,
557 .slave = &omap2xxx_gpmc_hwmod,
558 .clk = "core_l3_ck",
559 .addr = omap2420_gpmc_addrs,
560 .user = OCP_USER_MPU | OCP_USER_SDMA,
561};
562
549static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { 563static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
550 &omap2xxx_l3_main__l4_core, 564 &omap2xxx_l3_main__l4_core,
551 &omap2xxx_mpu__l3_main, 565 &omap2xxx_mpu__l3_main,
@@ -587,8 +601,10 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
587 &omap2420_l4_core__mcbsp1, 601 &omap2420_l4_core__mcbsp1,
588 &omap2420_l4_core__mcbsp2, 602 &omap2420_l4_core__mcbsp2,
589 &omap2420_l4_core__msdi1, 603 &omap2420_l4_core__msdi1,
604 &omap2xxx_l4_core__rng,
590 &omap2420_l4_core__hdq1w, 605 &omap2420_l4_core__hdq1w,
591 &omap2420_l4_wkup__counter_32k, 606 &omap2420_l4_wkup__counter_32k,
607 &omap2420_l3__gpmc,
592 NULL, 608 NULL,
593}; 609};
594 610
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 58b5bc196d32..cc4ed9024372 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -13,20 +13,17 @@
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 <plat/omap_hwmod.h> 15#include <plat/omap_hwmod.h>
16#include <mach/irqs.h>
17#include <plat/cpu.h>
18#include <plat/dma.h> 16#include <plat/dma.h>
19#include <plat/serial.h> 17#include <plat/serial.h>
20#include <plat/i2c.h> 18#include <plat/i2c.h>
21#include <plat/gpio.h>
22#include <plat/mcbsp.h> 19#include <plat/mcbsp.h>
23#include <plat/mcspi.h> 20#include <plat/mcspi.h>
24#include <plat/dmtimer.h> 21#include <plat/dmtimer.h>
25#include <plat/mmc.h> 22#include <plat/mmc.h>
26#include <plat/l3_2xxx.h> 23#include <plat/l3_2xxx.h>
27 24
25#include "soc.h"
28#include "omap_hwmod_common_data.h" 26#include "omap_hwmod_common_data.h"
29
30#include "prm-regbits-24xx.h" 27#include "prm-regbits-24xx.h"
31#include "cm-regbits-24xx.h" 28#include "cm-regbits-24xx.h"
32#include "wd_timer.h" 29#include "wd_timer.h"
@@ -133,8 +130,8 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
133 130
134/* gpio5 */ 131/* gpio5 */
135static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { 132static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
136 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ 133 { .irq = 33 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK5 */
137 { .irq = -1 } 134 { .irq = -1 },
138}; 135};
139 136
140static struct omap_hwmod omap2430_gpio5_hwmod = { 137static struct omap_hwmod omap2430_gpio5_hwmod = {
@@ -173,8 +170,8 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
173 170
174/* mailbox */ 171/* mailbox */
175static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { 172static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
176 { .irq = 26 }, 173 { .irq = 26 + OMAP_INTC_START, },
177 { .irq = -1 } 174 { .irq = -1 },
178}; 175};
179 176
180static struct omap_hwmod omap2430_mailbox_hwmod = { 177static struct omap_hwmod omap2430_mailbox_hwmod = {
@@ -195,8 +192,8 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
195 192
196/* mcspi3 */ 193/* mcspi3 */
197static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { 194static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
198 { .irq = 91 }, 195 { .irq = 91 + OMAP_INTC_START, },
199 { .irq = -1 } 196 { .irq = -1 },
200}; 197};
201 198
202static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { 199static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
@@ -250,9 +247,9 @@ static struct omap_hwmod_class usbotg_class = {
250/* usb_otg_hs */ 247/* usb_otg_hs */
251static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = { 248static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
252 249
253 { .name = "mc", .irq = 92 }, 250 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
254 { .name = "dma", .irq = 93 }, 251 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
255 { .irq = -1 } 252 { .irq = -1 },
256}; 253};
257 254
258static struct omap_hwmod omap2430_usbhsotg_hwmod = { 255static struct omap_hwmod omap2430_usbhsotg_hwmod = {
@@ -303,11 +300,11 @@ static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
303 300
304/* mcbsp1 */ 301/* mcbsp1 */
305static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = { 302static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
306 { .name = "tx", .irq = 59 }, 303 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
307 { .name = "rx", .irq = 60 }, 304 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
308 { .name = "ovr", .irq = 61 }, 305 { .name = "ovr", .irq = 61 + OMAP_INTC_START, },
309 { .name = "common", .irq = 64 }, 306 { .name = "common", .irq = 64 + OMAP_INTC_START, },
310 { .irq = -1 } 307 { .irq = -1 },
311}; 308};
312 309
313static struct omap_hwmod omap2430_mcbsp1_hwmod = { 310static struct omap_hwmod omap2430_mcbsp1_hwmod = {
@@ -331,10 +328,10 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
331 328
332/* mcbsp2 */ 329/* mcbsp2 */
333static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = { 330static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
334 { .name = "tx", .irq = 62 }, 331 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
335 { .name = "rx", .irq = 63 }, 332 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
336 { .name = "common", .irq = 16 }, 333 { .name = "common", .irq = 16 + OMAP_INTC_START, },
337 { .irq = -1 } 334 { .irq = -1 },
338}; 335};
339 336
340static struct omap_hwmod omap2430_mcbsp2_hwmod = { 337static struct omap_hwmod omap2430_mcbsp2_hwmod = {
@@ -358,10 +355,10 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
358 355
359/* mcbsp3 */ 356/* mcbsp3 */
360static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = { 357static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
361 { .name = "tx", .irq = 89 }, 358 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
362 { .name = "rx", .irq = 90 }, 359 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
363 { .name = "common", .irq = 17 }, 360 { .name = "common", .irq = 17 + OMAP_INTC_START, },
364 { .irq = -1 } 361 { .irq = -1 },
365}; 362};
366 363
367static struct omap_hwmod omap2430_mcbsp3_hwmod = { 364static struct omap_hwmod omap2430_mcbsp3_hwmod = {
@@ -385,10 +382,10 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
385 382
386/* mcbsp4 */ 383/* mcbsp4 */
387static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = { 384static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
388 { .name = "tx", .irq = 54 }, 385 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
389 { .name = "rx", .irq = 55 }, 386 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
390 { .name = "common", .irq = 18 }, 387 { .name = "common", .irq = 18 + OMAP_INTC_START, },
391 { .irq = -1 } 388 { .irq = -1 },
392}; 389};
393 390
394static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { 391static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
@@ -418,10 +415,10 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
418 415
419/* mcbsp5 */ 416/* mcbsp5 */
420static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = { 417static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
421 { .name = "tx", .irq = 81 }, 418 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
422 { .name = "rx", .irq = 82 }, 419 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
423 { .name = "common", .irq = 19 }, 420 { .name = "common", .irq = 19 + OMAP_INTC_START, },
424 { .irq = -1 } 421 { .irq = -1 },
425}; 422};
426 423
427static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { 424static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
@@ -468,8 +465,8 @@ static struct omap_hwmod_class omap2430_mmc_class = {
468 465
469/* MMC/SD/SDIO1 */ 466/* MMC/SD/SDIO1 */
470static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { 467static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
471 { .irq = 83 }, 468 { .irq = 83 + OMAP_INTC_START, },
472 { .irq = -1 } 469 { .irq = -1 },
473}; 470};
474 471
475static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = { 472static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
@@ -509,8 +506,8 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
509 506
510/* MMC/SD/SDIO2 */ 507/* MMC/SD/SDIO2 */
511static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { 508static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
512 { .irq = 86 }, 509 { .irq = 86 + OMAP_INTC_START, },
513 { .irq = -1 } 510 { .irq = -1 },
514}; 511};
515 512
516static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = { 513static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
@@ -890,6 +887,15 @@ static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = {
890 { } 887 { }
891}; 888};
892 889
890static struct omap_hwmod_addr_space omap2430_gpmc_addrs[] = {
891 {
892 .pa_start = 0x6e000000,
893 .pa_end = 0x6e000fff,
894 .flags = ADDR_TYPE_RT
895 },
896 { }
897};
898
893static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = { 899static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
894 .master = &omap2xxx_l4_wkup_hwmod, 900 .master = &omap2xxx_l4_wkup_hwmod,
895 .slave = &omap2xxx_counter_32k_hwmod, 901 .slave = &omap2xxx_counter_32k_hwmod,
@@ -898,6 +904,14 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
898 .user = OCP_USER_MPU | OCP_USER_SDMA, 904 .user = OCP_USER_MPU | OCP_USER_SDMA,
899}; 905};
900 906
907static struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
908 .master = &omap2xxx_l3_main_hwmod,
909 .slave = &omap2xxx_gpmc_hwmod,
910 .clk = "core_l3_ck",
911 .addr = omap2430_gpmc_addrs,
912 .user = OCP_USER_MPU | OCP_USER_SDMA,
913};
914
901static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { 915static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
902 &omap2xxx_l3_main__l4_core, 916 &omap2xxx_l3_main__l4_core,
903 &omap2xxx_mpu__l3_main, 917 &omap2xxx_mpu__l3_main,
@@ -947,7 +961,9 @@ static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
947 &omap2430_l4_core__mcbsp4, 961 &omap2430_l4_core__mcbsp4,
948 &omap2430_l4_core__mcbsp5, 962 &omap2430_l4_core__mcbsp5,
949 &omap2430_l4_core__hdq1w, 963 &omap2430_l4_core__hdq1w,
964 &omap2xxx_l4_core__rng,
950 &omap2430_l4_wkup__counter_32k, 965 &omap2430_l4_wkup__counter_32k,
966 &omap2430_l3__gpmc,
951 NULL, 967 NULL,
952}; 968};
953 969
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..bea700e928e7 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
@@ -15,8 +15,6 @@
15#include <plat/common.h> 15#include <plat/common.h>
16#include <plat/hdq1w.h> 16#include <plat/hdq1w.h>
17 17
18#include <mach/irqs.h>
19
20#include "omap_hwmod_common_data.h" 18#include "omap_hwmod_common_data.h"
21 19
22/* UART */ 20/* UART */
@@ -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..c83d6c517be4 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
@@ -129,6 +129,15 @@ struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = {
129 { } 129 { }
130}; 130};
131 131
132static struct omap_hwmod_addr_space omap2_rng_addr_space[] = {
133 {
134 .pa_start = 0x480a0000,
135 .pa_end = 0x480a004f,
136 .flags = ADDR_TYPE_RT
137 },
138 { }
139};
140
132/* 141/*
133 * Common interconnect data 142 * Common interconnect data
134 */ 143 */
@@ -372,3 +381,11 @@ struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc = {
372 .user = OCP_USER_MPU | OCP_USER_SDMA, 381 .user = OCP_USER_MPU | OCP_USER_SDMA,
373}; 382};
374 383
384/* l4_core -> rng */
385struct omap_hwmod_ocp_if omap2xxx_l4_core__rng = {
386 .master = &omap2xxx_l4_core_hwmod,
387 .slave = &omap2xxx_rng_hwmod,
388 .clk = "rng_ick",
389 .addr = omap2_rng_addr_space,
390 .user = OCP_USER_MPU | OCP_USER_SDMA,
391};
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..d59a9ce40d2a 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -10,21 +10,19 @@
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 <plat/mcspi.h>
17 17
18#include <mach/irqs.h>
19
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"
22#include "prm-regbits-24xx.h" 20#include "prm-regbits-24xx.h"
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[] = {
@@ -175,6 +173,26 @@ struct omap_hwmod_class omap2xxx_mcspi_class = {
175}; 173};
176 174
177/* 175/*
176 * 'gpmc' class
177 * general purpose memory controller
178 */
179
180static struct omap_hwmod_class_sysconfig omap2xxx_gpmc_sysc = {
181 .rev_offs = 0x0000,
182 .sysc_offs = 0x0010,
183 .syss_offs = 0x0014,
184 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
185 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
186 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
187 .sysc_fields = &omap_hwmod_sysc_type1,
188};
189
190static struct omap_hwmod_class omap2xxx_gpmc_hwmod_class = {
191 .name = "gpmc",
192 .sysc = &omap2xxx_gpmc_sysc,
193};
194
195/*
178 * IP blocks 196 * IP blocks
179 */ 197 */
180 198
@@ -200,8 +218,14 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
200}; 218};
201 219
202/* MPU */ 220/* MPU */
221static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = {
222 { .name = "pmu", .irq = 3 },
223 { .irq = -1 }
224};
225
203struct omap_hwmod omap2xxx_mpu_hwmod = { 226struct omap_hwmod omap2xxx_mpu_hwmod = {
204 .name = "mpu", 227 .name = "mpu",
228 .mpu_irqs = omap2xxx_mpu_irqs,
205 .class = &mpu_hwmod_class, 229 .class = &mpu_hwmod_class,
206 .main_clk = "mpu_ck", 230 .main_clk = "mpu_ck",
207}; 231};
@@ -222,6 +246,11 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
222 .timer_capability = OMAP_TIMER_HAS_PWM, 246 .timer_capability = OMAP_TIMER_HAS_PWM,
223}; 247};
224 248
249/* timers with DSP interrupt dev attribute */
250static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
251 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
252};
253
225/* timer1 */ 254/* timer1 */
226 255
227struct omap_hwmod omap2xxx_timer1_hwmod = { 256struct omap_hwmod omap2xxx_timer1_hwmod = {
@@ -310,6 +339,7 @@ struct omap_hwmod omap2xxx_timer5_hwmod = {
310 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, 339 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
311 }, 340 },
312 }, 341 },
342 .dev_attr = &capability_dsp_dev_attr,
313 .class = &omap2xxx_timer_hwmod_class, 343 .class = &omap2xxx_timer_hwmod_class,
314}; 344};
315 345
@@ -328,6 +358,7 @@ struct omap_hwmod omap2xxx_timer6_hwmod = {
328 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, 358 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
329 }, 359 },
330 }, 360 },
361 .dev_attr = &capability_dsp_dev_attr,
331 .class = &omap2xxx_timer_hwmod_class, 362 .class = &omap2xxx_timer_hwmod_class,
332}; 363};
333 364
@@ -346,6 +377,7 @@ struct omap_hwmod omap2xxx_timer7_hwmod = {
346 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, 377 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
347 }, 378 },
348 }, 379 },
380 .dev_attr = &capability_dsp_dev_attr,
349 .class = &omap2xxx_timer_hwmod_class, 381 .class = &omap2xxx_timer_hwmod_class,
350}; 382};
351 383
@@ -364,6 +396,7 @@ struct omap_hwmod omap2xxx_timer8_hwmod = {
364 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, 396 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
365 }, 397 },
366 }, 398 },
399 .dev_attr = &capability_dsp_dev_attr,
367 .class = &omap2xxx_timer_hwmod_class, 400 .class = &omap2xxx_timer_hwmod_class,
368}; 401};
369 402
@@ -726,7 +759,6 @@ struct omap_hwmod omap2xxx_mcspi2_hwmod = {
726 .dev_attr = &omap_mcspi2_dev_attr, 759 .dev_attr = &omap_mcspi2_dev_attr,
727}; 760};
728 761
729
730static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { 762static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
731 .name = "counter", 763 .name = "counter",
732}; 764};
@@ -745,3 +777,77 @@ struct omap_hwmod omap2xxx_counter_32k_hwmod = {
745 }, 777 },
746 .class = &omap2xxx_counter_hwmod_class, 778 .class = &omap2xxx_counter_hwmod_class,
747}; 779};
780
781/* gpmc */
782static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = {
783 { .irq = 20 },
784 { .irq = -1 }
785};
786
787struct omap_hwmod omap2xxx_gpmc_hwmod = {
788 .name = "gpmc",
789 .class = &omap2xxx_gpmc_hwmod_class,
790 .mpu_irqs = omap2xxx_gpmc_irqs,
791 .main_clk = "gpmc_fck",
792 /*
793 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
794 * block. It is not being added due to any known bugs with
795 * resetting the GPMC IP block, but rather because any timings
796 * set by the bootloader are not being correctly programmed by
797 * the kernel from the board file or DT data.
798 * HWMOD_INIT_NO_RESET should be removed ASAP.
799 */
800 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
801 HWMOD_NO_IDLEST),
802 .prcm = {
803 .omap2 = {
804 .prcm_reg_id = 3,
805 .module_bit = OMAP24XX_EN_GPMC_MASK,
806 .module_offs = CORE_MOD,
807 },
808 },
809};
810
811/* RNG */
812
813static struct omap_hwmod_class_sysconfig omap2_rng_sysc = {
814 .rev_offs = 0x3c,
815 .sysc_offs = 0x40,
816 .syss_offs = 0x44,
817 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
818 SYSS_HAS_RESET_STATUS),
819 .sysc_fields = &omap_hwmod_sysc_type1,
820};
821
822static struct omap_hwmod_class omap2_rng_hwmod_class = {
823 .name = "rng",
824 .sysc = &omap2_rng_sysc,
825};
826
827static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = {
828 { .irq = 52 },
829 { .irq = -1 }
830};
831
832struct omap_hwmod omap2xxx_rng_hwmod = {
833 .name = "rng",
834 .mpu_irqs = omap2_rng_mpu_irqs,
835 .main_clk = "l4_ck",
836 .prcm = {
837 .omap2 = {
838 .module_offs = CORE_MOD,
839 .prcm_reg_id = 4,
840 .module_bit = OMAP24XX_EN_RNG_SHIFT,
841 .idlest_reg_id = 4,
842 .idlest_idle_bit = OMAP24XX_ST_RNG_SHIFT,
843 },
844 },
845 /*
846 * XXX The first read from the SYSSTATUS register of the RNG
847 * after the SYSCONFIG SOFTRESET bit is set triggers an
848 * imprecise external abort. It's unclear why this happens.
849 * Until this is analyzed, skip the IP block reset.
850 */
851 .flags = HWMOD_INIT_NO_RESET,
852 .class = &omap2_rng_hwmod_class,
853};
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
new file mode 100644
index 000000000000..22433cb2bec0
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -0,0 +1,3381 @@
1/*
2 * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
3 *
4 * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This file is automatically generated from the AM33XX hardware databases.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation version 2.
10 *
11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12 * kind, whether express or implied; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <plat/omap_hwmod.h>
18#include <plat/cpu.h>
19#include <linux/platform_data/gpio-omap.h>
20#include <plat/dma.h>
21#include <plat/mmc.h>
22#include <plat/mcspi.h>
23#include <plat/i2c.h>
24
25#include "omap_hwmod_common_data.h"
26
27#include "control.h"
28#include "cm33xx.h"
29#include "prm33xx.h"
30#include "prm-regbits-33xx.h"
31
32/*
33 * IP blocks
34 */
35
36/*
37 * 'emif_fw' class
38 * instance(s): emif_fw
39 */
40static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = {
41 .name = "emif_fw",
42};
43
44/* emif_fw */
45static struct omap_hwmod am33xx_emif_fw_hwmod = {
46 .name = "emif_fw",
47 .class = &am33xx_emif_fw_hwmod_class,
48 .clkdm_name = "l4fw_clkdm",
49 .main_clk = "l4fw_gclk",
50 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
51 .prcm = {
52 .omap4 = {
53 .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET,
54 .modulemode = MODULEMODE_SWCTRL,
55 },
56 },
57};
58
59/*
60 * 'emif' class
61 * instance(s): emif
62 */
63static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = {
64 .rev_offs = 0x0000,
65};
66
67static struct omap_hwmod_class am33xx_emif_hwmod_class = {
68 .name = "emif",
69 .sysc = &am33xx_emif_sysc,
70};
71
72static struct omap_hwmod_irq_info am33xx_emif_irqs[] = {
73 { .name = "ddrerr0", .irq = 101 + OMAP_INTC_START, },
74 { .irq = -1 },
75};
76
77/* emif */
78static struct omap_hwmod am33xx_emif_hwmod = {
79 .name = "emif",
80 .class = &am33xx_emif_hwmod_class,
81 .clkdm_name = "l3_clkdm",
82 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
83 .mpu_irqs = am33xx_emif_irqs,
84 .main_clk = "dpll_ddr_m2_div2_ck",
85 .prcm = {
86 .omap4 = {
87 .clkctrl_offs = AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
88 .modulemode = MODULEMODE_SWCTRL,
89 },
90 },
91};
92
93/*
94 * 'l3' class
95 * instance(s): l3_main, l3_s, l3_instr
96 */
97static struct omap_hwmod_class am33xx_l3_hwmod_class = {
98 .name = "l3",
99};
100
101/* l3_main (l3_fast) */
102static struct omap_hwmod_irq_info am33xx_l3_main_irqs[] = {
103 { .name = "l3debug", .irq = 9 + OMAP_INTC_START, },
104 { .name = "l3appint", .irq = 10 + OMAP_INTC_START, },
105 { .irq = -1 },
106};
107
108static struct omap_hwmod am33xx_l3_main_hwmod = {
109 .name = "l3_main",
110 .class = &am33xx_l3_hwmod_class,
111 .clkdm_name = "l3_clkdm",
112 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
113 .mpu_irqs = am33xx_l3_main_irqs,
114 .main_clk = "l3_gclk",
115 .prcm = {
116 .omap4 = {
117 .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET,
118 .modulemode = MODULEMODE_SWCTRL,
119 },
120 },
121};
122
123/* l3_s */
124static struct omap_hwmod am33xx_l3_s_hwmod = {
125 .name = "l3_s",
126 .class = &am33xx_l3_hwmod_class,
127 .clkdm_name = "l3s_clkdm",
128};
129
130/* l3_instr */
131static struct omap_hwmod am33xx_l3_instr_hwmod = {
132 .name = "l3_instr",
133 .class = &am33xx_l3_hwmod_class,
134 .clkdm_name = "l3_clkdm",
135 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
136 .main_clk = "l3_gclk",
137 .prcm = {
138 .omap4 = {
139 .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET,
140 .modulemode = MODULEMODE_SWCTRL,
141 },
142 },
143};
144
145/*
146 * 'l4' class
147 * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
148 */
149static struct omap_hwmod_class am33xx_l4_hwmod_class = {
150 .name = "l4",
151};
152
153/* l4_ls */
154static struct omap_hwmod am33xx_l4_ls_hwmod = {
155 .name = "l4_ls",
156 .class = &am33xx_l4_hwmod_class,
157 .clkdm_name = "l4ls_clkdm",
158 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
159 .main_clk = "l4ls_gclk",
160 .prcm = {
161 .omap4 = {
162 .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET,
163 .modulemode = MODULEMODE_SWCTRL,
164 },
165 },
166};
167
168/* l4_hs */
169static struct omap_hwmod am33xx_l4_hs_hwmod = {
170 .name = "l4_hs",
171 .class = &am33xx_l4_hwmod_class,
172 .clkdm_name = "l4hs_clkdm",
173 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
174 .main_clk = "l4hs_gclk",
175 .prcm = {
176 .omap4 = {
177 .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET,
178 .modulemode = MODULEMODE_SWCTRL,
179 },
180 },
181};
182
183
184/* l4_wkup */
185static struct omap_hwmod am33xx_l4_wkup_hwmod = {
186 .name = "l4_wkup",
187 .class = &am33xx_l4_hwmod_class,
188 .clkdm_name = "l4_wkup_clkdm",
189 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
190 .prcm = {
191 .omap4 = {
192 .clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
193 .modulemode = MODULEMODE_SWCTRL,
194 },
195 },
196};
197
198/* l4_fw */
199static struct omap_hwmod am33xx_l4_fw_hwmod = {
200 .name = "l4_fw",
201 .class = &am33xx_l4_hwmod_class,
202 .clkdm_name = "l4fw_clkdm",
203 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
204 .prcm = {
205 .omap4 = {
206 .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET,
207 .modulemode = MODULEMODE_SWCTRL,
208 },
209 },
210};
211
212/*
213 * 'mpu' class
214 */
215static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
216 .name = "mpu",
217};
218
219/* mpu */
220static struct omap_hwmod_irq_info am33xx_mpu_irqs[] = {
221 { .name = "emuint", .irq = 0 + OMAP_INTC_START, },
222 { .name = "commtx", .irq = 1 + OMAP_INTC_START, },
223 { .name = "commrx", .irq = 2 + OMAP_INTC_START, },
224 { .name = "bench", .irq = 3 + OMAP_INTC_START, },
225 { .irq = -1 },
226};
227
228static struct omap_hwmod am33xx_mpu_hwmod = {
229 .name = "mpu",
230 .class = &am33xx_mpu_hwmod_class,
231 .clkdm_name = "mpu_clkdm",
232 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
233 .mpu_irqs = am33xx_mpu_irqs,
234 .main_clk = "dpll_mpu_m2_ck",
235 .prcm = {
236 .omap4 = {
237 .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET,
238 .modulemode = MODULEMODE_SWCTRL,
239 },
240 },
241};
242
243/*
244 * 'wakeup m3' class
245 * Wakeup controller sub-system under wakeup domain
246 */
247static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
248 .name = "wkup_m3",
249};
250
251static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
252 { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
253};
254
255static struct omap_hwmod_irq_info am33xx_wkup_m3_irqs[] = {
256 { .name = "txev", .irq = 78 + OMAP_INTC_START, },
257 { .irq = -1 },
258};
259
260/* wkup_m3 */
261static struct omap_hwmod am33xx_wkup_m3_hwmod = {
262 .name = "wkup_m3",
263 .class = &am33xx_wkup_m3_hwmod_class,
264 .clkdm_name = "l4_wkup_aon_clkdm",
265 .flags = HWMOD_INIT_NO_RESET, /* Keep hardreset asserted */
266 .mpu_irqs = am33xx_wkup_m3_irqs,
267 .main_clk = "dpll_core_m4_div2_ck",
268 .prcm = {
269 .omap4 = {
270 .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
271 .rstctrl_offs = AM33XX_RM_WKUP_RSTCTRL_OFFSET,
272 .modulemode = MODULEMODE_SWCTRL,
273 },
274 },
275 .rst_lines = am33xx_wkup_m3_resets,
276 .rst_lines_cnt = ARRAY_SIZE(am33xx_wkup_m3_resets),
277};
278
279/*
280 * 'pru-icss' class
281 * Programmable Real-Time Unit and Industrial Communication Subsystem
282 */
283static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
284 .name = "pruss",
285};
286
287static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
288 { .name = "pruss", .rst_shift = 1 },
289};
290
291static struct omap_hwmod_irq_info am33xx_pruss_irqs[] = {
292 { .name = "evtout0", .irq = 20 + OMAP_INTC_START, },
293 { .name = "evtout1", .irq = 21 + OMAP_INTC_START, },
294 { .name = "evtout2", .irq = 22 + OMAP_INTC_START, },
295 { .name = "evtout3", .irq = 23 + OMAP_INTC_START, },
296 { .name = "evtout4", .irq = 24 + OMAP_INTC_START, },
297 { .name = "evtout5", .irq = 25 + OMAP_INTC_START, },
298 { .name = "evtout6", .irq = 26 + OMAP_INTC_START, },
299 { .name = "evtout7", .irq = 27 + OMAP_INTC_START, },
300 { .irq = -1 },
301};
302
303/* pru-icss */
304/* Pseudo hwmod for reset control purpose only */
305static struct omap_hwmod am33xx_pruss_hwmod = {
306 .name = "pruss",
307 .class = &am33xx_pruss_hwmod_class,
308 .clkdm_name = "pruss_ocp_clkdm",
309 .mpu_irqs = am33xx_pruss_irqs,
310 .main_clk = "pruss_ocp_gclk",
311 .prcm = {
312 .omap4 = {
313 .clkctrl_offs = AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET,
314 .rstctrl_offs = AM33XX_RM_PER_RSTCTRL_OFFSET,
315 .modulemode = MODULEMODE_SWCTRL,
316 },
317 },
318 .rst_lines = am33xx_pruss_resets,
319 .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets),
320};
321
322/* gfx */
323/* Pseudo hwmod for reset control purpose only */
324static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
325 .name = "gfx",
326};
327
328static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
329 { .name = "gfx", .rst_shift = 0 },
330};
331
332static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
333 { .name = "gfxint", .irq = 37 + OMAP_INTC_START, },
334 { .irq = -1 },
335};
336
337static struct omap_hwmod am33xx_gfx_hwmod = {
338 .name = "gfx",
339 .class = &am33xx_gfx_hwmod_class,
340 .clkdm_name = "gfx_l3_clkdm",
341 .mpu_irqs = am33xx_gfx_irqs,
342 .main_clk = "gfx_fck_div_ck",
343 .prcm = {
344 .omap4 = {
345 .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
346 .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
347 .modulemode = MODULEMODE_SWCTRL,
348 },
349 },
350 .rst_lines = am33xx_gfx_resets,
351 .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets),
352};
353
354/*
355 * 'prcm' class
356 * power and reset manager (whole prcm infrastructure)
357 */
358static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
359 .name = "prcm",
360};
361
362/* prcm */
363static struct omap_hwmod am33xx_prcm_hwmod = {
364 .name = "prcm",
365 .class = &am33xx_prcm_hwmod_class,
366 .clkdm_name = "l4_wkup_clkdm",
367};
368
369/*
370 * 'adc/tsc' class
371 * TouchScreen Controller (Anolog-To-Digital Converter)
372 */
373static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
374 .rev_offs = 0x00,
375 .sysc_offs = 0x10,
376 .sysc_flags = SYSC_HAS_SIDLEMODE,
377 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
378 SIDLE_SMART_WKUP),
379 .sysc_fields = &omap_hwmod_sysc_type2,
380};
381
382static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
383 .name = "adc_tsc",
384 .sysc = &am33xx_adc_tsc_sysc,
385};
386
387static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = {
388 { .irq = 16 + OMAP_INTC_START, },
389 { .irq = -1 },
390};
391
392static struct omap_hwmod am33xx_adc_tsc_hwmod = {
393 .name = "adc_tsc",
394 .class = &am33xx_adc_tsc_hwmod_class,
395 .clkdm_name = "l4_wkup_clkdm",
396 .mpu_irqs = am33xx_adc_tsc_irqs,
397 .main_clk = "adc_tsc_fck",
398 .prcm = {
399 .omap4 = {
400 .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
401 .modulemode = MODULEMODE_SWCTRL,
402 },
403 },
404};
405
406/*
407 * Modules omap_hwmod structures
408 *
409 * The following IPs are excluded for the moment because:
410 * - They do not need an explicit SW control using omap_hwmod API.
411 * - They still need to be validated with the driver
412 * properly adapted to omap_hwmod / omap_device
413 *
414 * - cEFUSE (doesn't fall under any ocp_if)
415 * - clkdiv32k
416 * - debugss
417 * - ocmc ram
418 * - ocp watch point
419 * - aes0
420 * - sha0
421 */
422#if 0
423/*
424 * 'cefuse' class
425 */
426static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
427 .name = "cefuse",
428};
429
430static struct omap_hwmod am33xx_cefuse_hwmod = {
431 .name = "cefuse",
432 .class = &am33xx_cefuse_hwmod_class,
433 .clkdm_name = "l4_cefuse_clkdm",
434 .main_clk = "cefuse_fck",
435 .prcm = {
436 .omap4 = {
437 .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
438 .modulemode = MODULEMODE_SWCTRL,
439 },
440 },
441};
442
443/*
444 * 'clkdiv32k' class
445 */
446static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
447 .name = "clkdiv32k",
448};
449
450static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
451 .name = "clkdiv32k",
452 .class = &am33xx_clkdiv32k_hwmod_class,
453 .clkdm_name = "clk_24mhz_clkdm",
454 .main_clk = "clkdiv32k_ick",
455 .prcm = {
456 .omap4 = {
457 .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
458 .modulemode = MODULEMODE_SWCTRL,
459 },
460 },
461};
462
463/*
464 * 'debugss' class
465 * debug sub system
466 */
467static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
468 .name = "debugss",
469};
470
471static struct omap_hwmod am33xx_debugss_hwmod = {
472 .name = "debugss",
473 .class = &am33xx_debugss_hwmod_class,
474 .clkdm_name = "l3_aon_clkdm",
475 .main_clk = "debugss_ick",
476 .prcm = {
477 .omap4 = {
478 .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
479 .modulemode = MODULEMODE_SWCTRL,
480 },
481 },
482};
483
484/* ocmcram */
485static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
486 .name = "ocmcram",
487};
488
489static struct omap_hwmod am33xx_ocmcram_hwmod = {
490 .name = "ocmcram",
491 .class = &am33xx_ocmcram_hwmod_class,
492 .clkdm_name = "l3_clkdm",
493 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
494 .main_clk = "l3_gclk",
495 .prcm = {
496 .omap4 = {
497 .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
498 .modulemode = MODULEMODE_SWCTRL,
499 },
500 },
501};
502
503/* ocpwp */
504static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
505 .name = "ocpwp",
506};
507
508static struct omap_hwmod am33xx_ocpwp_hwmod = {
509 .name = "ocpwp",
510 .class = &am33xx_ocpwp_hwmod_class,
511 .clkdm_name = "l4ls_clkdm",
512 .main_clk = "l4ls_gclk",
513 .prcm = {
514 .omap4 = {
515 .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
516 .modulemode = MODULEMODE_SWCTRL,
517 },
518 },
519};
520
521/*
522 * 'aes' class
523 */
524static struct omap_hwmod_class am33xx_aes_hwmod_class = {
525 .name = "aes",
526};
527
528static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
529 { .irq = 102 + OMAP_INTC_START, },
530 { .irq = -1 },
531};
532
533static struct omap_hwmod am33xx_aes0_hwmod = {
534 .name = "aes0",
535 .class = &am33xx_aes_hwmod_class,
536 .clkdm_name = "l3_clkdm",
537 .mpu_irqs = am33xx_aes0_irqs,
538 .main_clk = "l3_gclk",
539 .prcm = {
540 .omap4 = {
541 .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
542 .modulemode = MODULEMODE_SWCTRL,
543 },
544 },
545};
546
547/* sha0 */
548static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
549 .name = "sha0",
550};
551
552static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
553 { .irq = 108 + OMAP_INTC_START, },
554 { .irq = -1 },
555};
556
557static struct omap_hwmod am33xx_sha0_hwmod = {
558 .name = "sha0",
559 .class = &am33xx_sha0_hwmod_class,
560 .clkdm_name = "l3_clkdm",
561 .mpu_irqs = am33xx_sha0_irqs,
562 .main_clk = "l3_gclk",
563 .prcm = {
564 .omap4 = {
565 .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET,
566 .modulemode = MODULEMODE_SWCTRL,
567 },
568 },
569};
570
571#endif
572
573/* 'smartreflex' class */
574static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
575 .name = "smartreflex",
576};
577
578/* smartreflex0 */
579static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = {
580 { .irq = 120 + OMAP_INTC_START, },
581 { .irq = -1 },
582};
583
584static struct omap_hwmod am33xx_smartreflex0_hwmod = {
585 .name = "smartreflex0",
586 .class = &am33xx_smartreflex_hwmod_class,
587 .clkdm_name = "l4_wkup_clkdm",
588 .mpu_irqs = am33xx_smartreflex0_irqs,
589 .main_clk = "smartreflex0_fck",
590 .prcm = {
591 .omap4 = {
592 .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
593 .modulemode = MODULEMODE_SWCTRL,
594 },
595 },
596};
597
598/* smartreflex1 */
599static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = {
600 { .irq = 121 + OMAP_INTC_START, },
601 { .irq = -1 },
602};
603
604static struct omap_hwmod am33xx_smartreflex1_hwmod = {
605 .name = "smartreflex1",
606 .class = &am33xx_smartreflex_hwmod_class,
607 .clkdm_name = "l4_wkup_clkdm",
608 .mpu_irqs = am33xx_smartreflex1_irqs,
609 .main_clk = "smartreflex1_fck",
610 .prcm = {
611 .omap4 = {
612 .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
613 .modulemode = MODULEMODE_SWCTRL,
614 },
615 },
616};
617
618/*
619 * 'control' module class
620 */
621static struct omap_hwmod_class am33xx_control_hwmod_class = {
622 .name = "control",
623};
624
625static struct omap_hwmod_irq_info am33xx_control_irqs[] = {
626 { .irq = 8 + OMAP_INTC_START, },
627 { .irq = -1 },
628};
629
630static struct omap_hwmod am33xx_control_hwmod = {
631 .name = "control",
632 .class = &am33xx_control_hwmod_class,
633 .clkdm_name = "l4_wkup_clkdm",
634 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
635 .mpu_irqs = am33xx_control_irqs,
636 .main_clk = "dpll_core_m4_div2_ck",
637 .prcm = {
638 .omap4 = {
639 .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
640 .modulemode = MODULEMODE_SWCTRL,
641 },
642 },
643};
644
645/*
646 * 'cpgmac' class
647 * cpsw/cpgmac sub system
648 */
649static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
650 .rev_offs = 0x0,
651 .sysc_offs = 0x8,
652 .syss_offs = 0x4,
653 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
654 SYSS_HAS_RESET_STATUS),
655 .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
656 MSTANDBY_NO),
657 .sysc_fields = &omap_hwmod_sysc_type3,
658};
659
660static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
661 .name = "cpgmac0",
662 .sysc = &am33xx_cpgmac_sysc,
663};
664
665static struct omap_hwmod_irq_info am33xx_cpgmac0_irqs[] = {
666 { .name = "c0_rx_thresh_pend", .irq = 40 + OMAP_INTC_START, },
667 { .name = "c0_rx_pend", .irq = 41 + OMAP_INTC_START, },
668 { .name = "c0_tx_pend", .irq = 42 + OMAP_INTC_START, },
669 { .name = "c0_misc_pend", .irq = 43 + OMAP_INTC_START, },
670 { .irq = -1 },
671};
672
673static struct omap_hwmod am33xx_cpgmac0_hwmod = {
674 .name = "cpgmac0",
675 .class = &am33xx_cpgmac0_hwmod_class,
676 .clkdm_name = "cpsw_125mhz_clkdm",
677 .mpu_irqs = am33xx_cpgmac0_irqs,
678 .main_clk = "cpsw_125mhz_gclk",
679 .prcm = {
680 .omap4 = {
681 .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
682 .modulemode = MODULEMODE_SWCTRL,
683 },
684 },
685};
686
687/*
688 * dcan class
689 */
690static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
691 .name = "d_can",
692};
693
694/* dcan0 */
695static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = {
696 { .name = "d_can_ms", .irq = 52 + OMAP_INTC_START, },
697 { .name = "d_can_mo", .irq = 53 + OMAP_INTC_START, },
698 { .irq = -1 },
699};
700
701static struct omap_hwmod am33xx_dcan0_hwmod = {
702 .name = "d_can0",
703 .class = &am33xx_dcan_hwmod_class,
704 .clkdm_name = "l4ls_clkdm",
705 .mpu_irqs = am33xx_dcan0_irqs,
706 .main_clk = "dcan0_fck",
707 .prcm = {
708 .omap4 = {
709 .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET,
710 .modulemode = MODULEMODE_SWCTRL,
711 },
712 },
713};
714
715/* dcan1 */
716static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = {
717 { .name = "d_can_ms", .irq = 55 + OMAP_INTC_START, },
718 { .name = "d_can_mo", .irq = 56 + OMAP_INTC_START, },
719 { .irq = -1 },
720};
721static struct omap_hwmod am33xx_dcan1_hwmod = {
722 .name = "d_can1",
723 .class = &am33xx_dcan_hwmod_class,
724 .clkdm_name = "l4ls_clkdm",
725 .mpu_irqs = am33xx_dcan1_irqs,
726 .main_clk = "dcan1_fck",
727 .prcm = {
728 .omap4 = {
729 .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET,
730 .modulemode = MODULEMODE_SWCTRL,
731 },
732 },
733};
734
735/* elm */
736static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
737 .rev_offs = 0x0000,
738 .sysc_offs = 0x0010,
739 .syss_offs = 0x0014,
740 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
741 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
742 SYSS_HAS_RESET_STATUS),
743 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
744 .sysc_fields = &omap_hwmod_sysc_type1,
745};
746
747static struct omap_hwmod_class am33xx_elm_hwmod_class = {
748 .name = "elm",
749 .sysc = &am33xx_elm_sysc,
750};
751
752static struct omap_hwmod_irq_info am33xx_elm_irqs[] = {
753 { .irq = 4 + OMAP_INTC_START, },
754 { .irq = -1 },
755};
756
757static struct omap_hwmod am33xx_elm_hwmod = {
758 .name = "elm",
759 .class = &am33xx_elm_hwmod_class,
760 .clkdm_name = "l4ls_clkdm",
761 .mpu_irqs = am33xx_elm_irqs,
762 .main_clk = "l4ls_gclk",
763 .prcm = {
764 .omap4 = {
765 .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET,
766 .modulemode = MODULEMODE_SWCTRL,
767 },
768 },
769};
770
771/*
772 * 'epwmss' class: ecap0,1,2, ehrpwm0,1,2
773 */
774static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
775 .rev_offs = 0x0,
776 .sysc_offs = 0x4,
777 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
778 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
779 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
780 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
781 .sysc_fields = &omap_hwmod_sysc_type2,
782};
783
784static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
785 .name = "epwmss",
786 .sysc = &am33xx_epwmss_sysc,
787};
788
789/* ehrpwm0 */
790static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
791 { .name = "int", .irq = 86 + OMAP_INTC_START, },
792 { .name = "tzint", .irq = 58 + OMAP_INTC_START, },
793 { .irq = -1 },
794};
795
796static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
797 .name = "ehrpwm0",
798 .class = &am33xx_epwmss_hwmod_class,
799 .clkdm_name = "l4ls_clkdm",
800 .mpu_irqs = am33xx_ehrpwm0_irqs,
801 .main_clk = "l4ls_gclk",
802 .prcm = {
803 .omap4 = {
804 .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
805 .modulemode = MODULEMODE_SWCTRL,
806 },
807 },
808};
809
810/* ehrpwm1 */
811static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
812 { .name = "int", .irq = 87 + OMAP_INTC_START, },
813 { .name = "tzint", .irq = 59 + OMAP_INTC_START, },
814 { .irq = -1 },
815};
816
817static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
818 .name = "ehrpwm1",
819 .class = &am33xx_epwmss_hwmod_class,
820 .clkdm_name = "l4ls_clkdm",
821 .mpu_irqs = am33xx_ehrpwm1_irqs,
822 .main_clk = "l4ls_gclk",
823 .prcm = {
824 .omap4 = {
825 .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
826 .modulemode = MODULEMODE_SWCTRL,
827 },
828 },
829};
830
831/* ehrpwm2 */
832static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
833 { .name = "int", .irq = 39 + OMAP_INTC_START, },
834 { .name = "tzint", .irq = 60 + OMAP_INTC_START, },
835 { .irq = -1 },
836};
837
838static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
839 .name = "ehrpwm2",
840 .class = &am33xx_epwmss_hwmod_class,
841 .clkdm_name = "l4ls_clkdm",
842 .mpu_irqs = am33xx_ehrpwm2_irqs,
843 .main_clk = "l4ls_gclk",
844 .prcm = {
845 .omap4 = {
846 .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
847 .modulemode = MODULEMODE_SWCTRL,
848 },
849 },
850};
851
852/* ecap0 */
853static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
854 { .irq = 31 + OMAP_INTC_START, },
855 { .irq = -1 },
856};
857
858static struct omap_hwmod am33xx_ecap0_hwmod = {
859 .name = "ecap0",
860 .class = &am33xx_epwmss_hwmod_class,
861 .clkdm_name = "l4ls_clkdm",
862 .mpu_irqs = am33xx_ecap0_irqs,
863 .main_clk = "l4ls_gclk",
864 .prcm = {
865 .omap4 = {
866 .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
867 .modulemode = MODULEMODE_SWCTRL,
868 },
869 },
870};
871
872/* ecap1 */
873static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
874 { .irq = 47 + OMAP_INTC_START, },
875 { .irq = -1 },
876};
877
878static struct omap_hwmod am33xx_ecap1_hwmod = {
879 .name = "ecap1",
880 .class = &am33xx_epwmss_hwmod_class,
881 .clkdm_name = "l4ls_clkdm",
882 .mpu_irqs = am33xx_ecap1_irqs,
883 .main_clk = "l4ls_gclk",
884 .prcm = {
885 .omap4 = {
886 .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
887 .modulemode = MODULEMODE_SWCTRL,
888 },
889 },
890};
891
892/* ecap2 */
893static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
894 { .irq = 61 + OMAP_INTC_START, },
895 { .irq = -1 },
896};
897
898static struct omap_hwmod am33xx_ecap2_hwmod = {
899 .name = "ecap2",
900 .mpu_irqs = am33xx_ecap2_irqs,
901 .class = &am33xx_epwmss_hwmod_class,
902 .clkdm_name = "l4ls_clkdm",
903 .main_clk = "l4ls_gclk",
904 .prcm = {
905 .omap4 = {
906 .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
907 .modulemode = MODULEMODE_SWCTRL,
908 },
909 },
910};
911
912/*
913 * 'gpio' class: for gpio 0,1,2,3
914 */
915static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
916 .rev_offs = 0x0000,
917 .sysc_offs = 0x0010,
918 .syss_offs = 0x0114,
919 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
920 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
921 SYSS_HAS_RESET_STATUS),
922 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
923 SIDLE_SMART_WKUP),
924 .sysc_fields = &omap_hwmod_sysc_type1,
925};
926
927static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
928 .name = "gpio",
929 .sysc = &am33xx_gpio_sysc,
930 .rev = 2,
931};
932
933static struct omap_gpio_dev_attr gpio_dev_attr = {
934 .bank_width = 32,
935 .dbck_flag = true,
936};
937
938/* gpio0 */
939static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
940 { .role = "dbclk", .clk = "gpio0_dbclk" },
941};
942
943static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = {
944 { .irq = 96 + OMAP_INTC_START, },
945 { .irq = -1 },
946};
947
948static struct omap_hwmod am33xx_gpio0_hwmod = {
949 .name = "gpio1",
950 .class = &am33xx_gpio_hwmod_class,
951 .clkdm_name = "l4_wkup_clkdm",
952 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
953 .mpu_irqs = am33xx_gpio0_irqs,
954 .main_clk = "dpll_core_m4_div2_ck",
955 .prcm = {
956 .omap4 = {
957 .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
958 .modulemode = MODULEMODE_SWCTRL,
959 },
960 },
961 .opt_clks = gpio0_opt_clks,
962 .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks),
963 .dev_attr = &gpio_dev_attr,
964};
965
966/* gpio1 */
967static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = {
968 { .irq = 98 + OMAP_INTC_START, },
969 { .irq = -1 },
970};
971
972static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
973 { .role = "dbclk", .clk = "gpio1_dbclk" },
974};
975
976static struct omap_hwmod am33xx_gpio1_hwmod = {
977 .name = "gpio2",
978 .class = &am33xx_gpio_hwmod_class,
979 .clkdm_name = "l4ls_clkdm",
980 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
981 .mpu_irqs = am33xx_gpio1_irqs,
982 .main_clk = "l4ls_gclk",
983 .prcm = {
984 .omap4 = {
985 .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET,
986 .modulemode = MODULEMODE_SWCTRL,
987 },
988 },
989 .opt_clks = gpio1_opt_clks,
990 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
991 .dev_attr = &gpio_dev_attr,
992};
993
994/* gpio2 */
995static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = {
996 { .irq = 32 + OMAP_INTC_START, },
997 { .irq = -1 },
998};
999
1000static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1001 { .role = "dbclk", .clk = "gpio2_dbclk" },
1002};
1003
1004static struct omap_hwmod am33xx_gpio2_hwmod = {
1005 .name = "gpio3",
1006 .class = &am33xx_gpio_hwmod_class,
1007 .clkdm_name = "l4ls_clkdm",
1008 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1009 .mpu_irqs = am33xx_gpio2_irqs,
1010 .main_clk = "l4ls_gclk",
1011 .prcm = {
1012 .omap4 = {
1013 .clkctrl_offs = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
1014 .modulemode = MODULEMODE_SWCTRL,
1015 },
1016 },
1017 .opt_clks = gpio2_opt_clks,
1018 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1019 .dev_attr = &gpio_dev_attr,
1020};
1021
1022/* gpio3 */
1023static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = {
1024 { .irq = 62 + OMAP_INTC_START, },
1025 { .irq = -1 },
1026};
1027
1028static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1029 { .role = "dbclk", .clk = "gpio3_dbclk" },
1030};
1031
1032static struct omap_hwmod am33xx_gpio3_hwmod = {
1033 .name = "gpio4",
1034 .class = &am33xx_gpio_hwmod_class,
1035 .clkdm_name = "l4ls_clkdm",
1036 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1037 .mpu_irqs = am33xx_gpio3_irqs,
1038 .main_clk = "l4ls_gclk",
1039 .prcm = {
1040 .omap4 = {
1041 .clkctrl_offs = AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET,
1042 .modulemode = MODULEMODE_SWCTRL,
1043 },
1044 },
1045 .opt_clks = gpio3_opt_clks,
1046 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1047 .dev_attr = &gpio_dev_attr,
1048};
1049
1050/* gpmc */
1051static struct omap_hwmod_class_sysconfig gpmc_sysc = {
1052 .rev_offs = 0x0,
1053 .sysc_offs = 0x10,
1054 .syss_offs = 0x14,
1055 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1056 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1057 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1058 .sysc_fields = &omap_hwmod_sysc_type1,
1059};
1060
1061static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
1062 .name = "gpmc",
1063 .sysc = &gpmc_sysc,
1064};
1065
1066static struct omap_hwmod_irq_info am33xx_gpmc_irqs[] = {
1067 { .irq = 100 + OMAP_INTC_START, },
1068 { .irq = -1 },
1069};
1070
1071static struct omap_hwmod am33xx_gpmc_hwmod = {
1072 .name = "gpmc",
1073 .class = &am33xx_gpmc_hwmod_class,
1074 .clkdm_name = "l3s_clkdm",
1075 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
1076 .mpu_irqs = am33xx_gpmc_irqs,
1077 .main_clk = "l3s_gclk",
1078 .prcm = {
1079 .omap4 = {
1080 .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET,
1081 .modulemode = MODULEMODE_SWCTRL,
1082 },
1083 },
1084};
1085
1086/* 'i2c' class */
1087static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
1088 .sysc_offs = 0x0010,
1089 .syss_offs = 0x0090,
1090 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1091 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1092 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1093 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1094 SIDLE_SMART_WKUP),
1095 .sysc_fields = &omap_hwmod_sysc_type1,
1096};
1097
1098static struct omap_hwmod_class i2c_class = {
1099 .name = "i2c",
1100 .sysc = &am33xx_i2c_sysc,
1101 .rev = OMAP_I2C_IP_VERSION_2,
1102 .reset = &omap_i2c_reset,
1103};
1104
1105static struct omap_i2c_dev_attr i2c_dev_attr = {
1106 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
1107 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
1108};
1109
1110/* i2c1 */
1111static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1112 { .irq = 70 + OMAP_INTC_START, },
1113 { .irq = -1 },
1114};
1115
1116static struct omap_hwmod_dma_info i2c1_edma_reqs[] = {
1117 { .name = "tx", .dma_req = 0, },
1118 { .name = "rx", .dma_req = 0, },
1119 { .dma_req = -1 }
1120};
1121
1122static struct omap_hwmod am33xx_i2c1_hwmod = {
1123 .name = "i2c1",
1124 .class = &i2c_class,
1125 .clkdm_name = "l4_wkup_clkdm",
1126 .mpu_irqs = i2c1_mpu_irqs,
1127 .sdma_reqs = i2c1_edma_reqs,
1128 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1129 .main_clk = "dpll_per_m2_div4_wkupdm_ck",
1130 .prcm = {
1131 .omap4 = {
1132 .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET,
1133 .modulemode = MODULEMODE_SWCTRL,
1134 },
1135 },
1136 .dev_attr = &i2c_dev_attr,
1137};
1138
1139/* i2c1 */
1140static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1141 { .irq = 71 + OMAP_INTC_START, },
1142 { .irq = -1 },
1143};
1144
1145static struct omap_hwmod_dma_info i2c2_edma_reqs[] = {
1146 { .name = "tx", .dma_req = 0, },
1147 { .name = "rx", .dma_req = 0, },
1148 { .dma_req = -1 }
1149};
1150
1151static struct omap_hwmod am33xx_i2c2_hwmod = {
1152 .name = "i2c2",
1153 .class = &i2c_class,
1154 .clkdm_name = "l4ls_clkdm",
1155 .mpu_irqs = i2c2_mpu_irqs,
1156 .sdma_reqs = i2c2_edma_reqs,
1157 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1158 .main_clk = "dpll_per_m2_div4_ck",
1159 .prcm = {
1160 .omap4 = {
1161 .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET,
1162 .modulemode = MODULEMODE_SWCTRL,
1163 },
1164 },
1165 .dev_attr = &i2c_dev_attr,
1166};
1167
1168/* i2c3 */
1169static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
1170 { .name = "tx", .dma_req = 0, },
1171 { .name = "rx", .dma_req = 0, },
1172 { .dma_req = -1 }
1173};
1174
1175static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1176 { .irq = 30 + OMAP_INTC_START, },
1177 { .irq = -1 },
1178};
1179
1180static struct omap_hwmod am33xx_i2c3_hwmod = {
1181 .name = "i2c3",
1182 .class = &i2c_class,
1183 .clkdm_name = "l4ls_clkdm",
1184 .mpu_irqs = i2c3_mpu_irqs,
1185 .sdma_reqs = i2c3_edma_reqs,
1186 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1187 .main_clk = "dpll_per_m2_div4_ck",
1188 .prcm = {
1189 .omap4 = {
1190 .clkctrl_offs = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
1191 .modulemode = MODULEMODE_SWCTRL,
1192 },
1193 },
1194 .dev_attr = &i2c_dev_attr,
1195};
1196
1197
1198/* lcdc */
1199static struct omap_hwmod_class_sysconfig lcdc_sysc = {
1200 .rev_offs = 0x0,
1201 .sysc_offs = 0x54,
1202 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
1203 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1204 .sysc_fields = &omap_hwmod_sysc_type2,
1205};
1206
1207static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
1208 .name = "lcdc",
1209 .sysc = &lcdc_sysc,
1210};
1211
1212static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = {
1213 { .irq = 36 + OMAP_INTC_START, },
1214 { .irq = -1 },
1215};
1216
1217static struct omap_hwmod am33xx_lcdc_hwmod = {
1218 .name = "lcdc",
1219 .class = &am33xx_lcdc_hwmod_class,
1220 .clkdm_name = "lcdc_clkdm",
1221 .mpu_irqs = am33xx_lcdc_irqs,
1222 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1223 .main_clk = "lcd_gclk",
1224 .prcm = {
1225 .omap4 = {
1226 .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
1227 .modulemode = MODULEMODE_SWCTRL,
1228 },
1229 },
1230};
1231
1232/*
1233 * 'mailbox' class
1234 * mailbox module allowing communication between the on-chip processors using a
1235 * queued mailbox-interrupt mechanism.
1236 */
1237static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
1238 .rev_offs = 0x0000,
1239 .sysc_offs = 0x0010,
1240 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1241 SYSC_HAS_SOFTRESET),
1242 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1243 .sysc_fields = &omap_hwmod_sysc_type2,
1244};
1245
1246static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
1247 .name = "mailbox",
1248 .sysc = &am33xx_mailbox_sysc,
1249};
1250
1251static struct omap_hwmod_irq_info am33xx_mailbox_irqs[] = {
1252 { .irq = 77 + OMAP_INTC_START, },
1253 { .irq = -1 },
1254};
1255
1256static struct omap_hwmod am33xx_mailbox_hwmod = {
1257 .name = "mailbox",
1258 .class = &am33xx_mailbox_hwmod_class,
1259 .clkdm_name = "l4ls_clkdm",
1260 .mpu_irqs = am33xx_mailbox_irqs,
1261 .main_clk = "l4ls_gclk",
1262 .prcm = {
1263 .omap4 = {
1264 .clkctrl_offs = AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET,
1265 .modulemode = MODULEMODE_SWCTRL,
1266 },
1267 },
1268};
1269
1270/*
1271 * 'mcasp' class
1272 */
1273static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
1274 .rev_offs = 0x0,
1275 .sysc_offs = 0x4,
1276 .sysc_flags = SYSC_HAS_SIDLEMODE,
1277 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1278 .sysc_fields = &omap_hwmod_sysc_type3,
1279};
1280
1281static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
1282 .name = "mcasp",
1283 .sysc = &am33xx_mcasp_sysc,
1284};
1285
1286/* mcasp0 */
1287static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = {
1288 { .name = "ax", .irq = 80 + OMAP_INTC_START, },
1289 { .name = "ar", .irq = 81 + OMAP_INTC_START, },
1290 { .irq = -1 },
1291};
1292
1293static struct omap_hwmod_dma_info am33xx_mcasp0_edma_reqs[] = {
1294 { .name = "tx", .dma_req = 8, },
1295 { .name = "rx", .dma_req = 9, },
1296 { .dma_req = -1 }
1297};
1298
1299static struct omap_hwmod am33xx_mcasp0_hwmod = {
1300 .name = "mcasp0",
1301 .class = &am33xx_mcasp_hwmod_class,
1302 .clkdm_name = "l3s_clkdm",
1303 .mpu_irqs = am33xx_mcasp0_irqs,
1304 .sdma_reqs = am33xx_mcasp0_edma_reqs,
1305 .main_clk = "mcasp0_fck",
1306 .prcm = {
1307 .omap4 = {
1308 .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET,
1309 .modulemode = MODULEMODE_SWCTRL,
1310 },
1311 },
1312};
1313
1314/* mcasp1 */
1315static struct omap_hwmod_irq_info am33xx_mcasp1_irqs[] = {
1316 { .name = "ax", .irq = 82 + OMAP_INTC_START, },
1317 { .name = "ar", .irq = 83 + OMAP_INTC_START, },
1318 { .irq = -1 },
1319};
1320
1321static struct omap_hwmod_dma_info am33xx_mcasp1_edma_reqs[] = {
1322 { .name = "tx", .dma_req = 10, },
1323 { .name = "rx", .dma_req = 11, },
1324 { .dma_req = -1 }
1325};
1326
1327static struct omap_hwmod am33xx_mcasp1_hwmod = {
1328 .name = "mcasp1",
1329 .class = &am33xx_mcasp_hwmod_class,
1330 .clkdm_name = "l3s_clkdm",
1331 .mpu_irqs = am33xx_mcasp1_irqs,
1332 .sdma_reqs = am33xx_mcasp1_edma_reqs,
1333 .main_clk = "mcasp1_fck",
1334 .prcm = {
1335 .omap4 = {
1336 .clkctrl_offs = AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET,
1337 .modulemode = MODULEMODE_SWCTRL,
1338 },
1339 },
1340};
1341
1342/* 'mmc' class */
1343static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
1344 .rev_offs = 0x1fc,
1345 .sysc_offs = 0x10,
1346 .syss_offs = 0x14,
1347 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1348 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1349 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1350 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1351 .sysc_fields = &omap_hwmod_sysc_type1,
1352};
1353
1354static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
1355 .name = "mmc",
1356 .sysc = &am33xx_mmc_sysc,
1357};
1358
1359/* mmc0 */
1360static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = {
1361 { .irq = 64 + OMAP_INTC_START, },
1362 { .irq = -1 },
1363};
1364
1365static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = {
1366 { .name = "tx", .dma_req = 24, },
1367 { .name = "rx", .dma_req = 25, },
1368 { .dma_req = -1 }
1369};
1370
1371static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
1372 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1373};
1374
1375static struct omap_hwmod am33xx_mmc0_hwmod = {
1376 .name = "mmc1",
1377 .class = &am33xx_mmc_hwmod_class,
1378 .clkdm_name = "l4ls_clkdm",
1379 .mpu_irqs = am33xx_mmc0_irqs,
1380 .sdma_reqs = am33xx_mmc0_edma_reqs,
1381 .main_clk = "mmc_clk",
1382 .prcm = {
1383 .omap4 = {
1384 .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET,
1385 .modulemode = MODULEMODE_SWCTRL,
1386 },
1387 },
1388 .dev_attr = &am33xx_mmc0_dev_attr,
1389};
1390
1391/* mmc1 */
1392static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = {
1393 { .irq = 28 + OMAP_INTC_START, },
1394 { .irq = -1 },
1395};
1396
1397static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = {
1398 { .name = "tx", .dma_req = 2, },
1399 { .name = "rx", .dma_req = 3, },
1400 { .dma_req = -1 }
1401};
1402
1403static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
1404 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1405};
1406
1407static struct omap_hwmod am33xx_mmc1_hwmod = {
1408 .name = "mmc2",
1409 .class = &am33xx_mmc_hwmod_class,
1410 .clkdm_name = "l4ls_clkdm",
1411 .mpu_irqs = am33xx_mmc1_irqs,
1412 .sdma_reqs = am33xx_mmc1_edma_reqs,
1413 .main_clk = "mmc_clk",
1414 .prcm = {
1415 .omap4 = {
1416 .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET,
1417 .modulemode = MODULEMODE_SWCTRL,
1418 },
1419 },
1420 .dev_attr = &am33xx_mmc1_dev_attr,
1421};
1422
1423/* mmc2 */
1424static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = {
1425 { .irq = 29 + OMAP_INTC_START, },
1426 { .irq = -1 },
1427};
1428
1429static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = {
1430 { .name = "tx", .dma_req = 64, },
1431 { .name = "rx", .dma_req = 65, },
1432 { .dma_req = -1 }
1433};
1434
1435static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
1436 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1437};
1438static struct omap_hwmod am33xx_mmc2_hwmod = {
1439 .name = "mmc3",
1440 .class = &am33xx_mmc_hwmod_class,
1441 .clkdm_name = "l3s_clkdm",
1442 .mpu_irqs = am33xx_mmc2_irqs,
1443 .sdma_reqs = am33xx_mmc2_edma_reqs,
1444 .main_clk = "mmc_clk",
1445 .prcm = {
1446 .omap4 = {
1447 .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET,
1448 .modulemode = MODULEMODE_SWCTRL,
1449 },
1450 },
1451 .dev_attr = &am33xx_mmc2_dev_attr,
1452};
1453
1454/*
1455 * 'rtc' class
1456 * rtc subsystem
1457 */
1458static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
1459 .rev_offs = 0x0074,
1460 .sysc_offs = 0x0078,
1461 .sysc_flags = SYSC_HAS_SIDLEMODE,
1462 .idlemodes = (SIDLE_FORCE | SIDLE_NO |
1463 SIDLE_SMART | SIDLE_SMART_WKUP),
1464 .sysc_fields = &omap_hwmod_sysc_type3,
1465};
1466
1467static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
1468 .name = "rtc",
1469 .sysc = &am33xx_rtc_sysc,
1470};
1471
1472static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = {
1473 { .name = "rtcint", .irq = 75 + OMAP_INTC_START, },
1474 { .name = "rtcalarmint", .irq = 76 + OMAP_INTC_START, },
1475 { .irq = -1 },
1476};
1477
1478static struct omap_hwmod am33xx_rtc_hwmod = {
1479 .name = "rtc",
1480 .class = &am33xx_rtc_hwmod_class,
1481 .clkdm_name = "l4_rtc_clkdm",
1482 .mpu_irqs = am33xx_rtc_irqs,
1483 .main_clk = "clk_32768_ck",
1484 .prcm = {
1485 .omap4 = {
1486 .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET,
1487 .modulemode = MODULEMODE_SWCTRL,
1488 },
1489 },
1490};
1491
1492/* 'spi' class */
1493static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
1494 .rev_offs = 0x0000,
1495 .sysc_offs = 0x0110,
1496 .syss_offs = 0x0114,
1497 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1498 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1499 SYSS_HAS_RESET_STATUS),
1500 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1501 .sysc_fields = &omap_hwmod_sysc_type1,
1502};
1503
1504static struct omap_hwmod_class am33xx_spi_hwmod_class = {
1505 .name = "mcspi",
1506 .sysc = &am33xx_mcspi_sysc,
1507 .rev = OMAP4_MCSPI_REV,
1508};
1509
1510/* spi0 */
1511static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = {
1512 { .irq = 65 + OMAP_INTC_START, },
1513 { .irq = -1 },
1514};
1515
1516static struct omap_hwmod_dma_info am33xx_mcspi0_edma_reqs[] = {
1517 { .name = "rx0", .dma_req = 17 },
1518 { .name = "tx0", .dma_req = 16 },
1519 { .name = "rx1", .dma_req = 19 },
1520 { .name = "tx1", .dma_req = 18 },
1521 { .dma_req = -1 }
1522};
1523
1524static struct omap2_mcspi_dev_attr mcspi_attrib = {
1525 .num_chipselect = 2,
1526};
1527static struct omap_hwmod am33xx_spi0_hwmod = {
1528 .name = "spi0",
1529 .class = &am33xx_spi_hwmod_class,
1530 .clkdm_name = "l4ls_clkdm",
1531 .mpu_irqs = am33xx_spi0_irqs,
1532 .sdma_reqs = am33xx_mcspi0_edma_reqs,
1533 .main_clk = "dpll_per_m2_div4_ck",
1534 .prcm = {
1535 .omap4 = {
1536 .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET,
1537 .modulemode = MODULEMODE_SWCTRL,
1538 },
1539 },
1540 .dev_attr = &mcspi_attrib,
1541};
1542
1543/* spi1 */
1544static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = {
1545 { .irq = 125 + OMAP_INTC_START, },
1546 { .irq = -1 },
1547};
1548
1549static struct omap_hwmod_dma_info am33xx_mcspi1_edma_reqs[] = {
1550 { .name = "rx0", .dma_req = 43 },
1551 { .name = "tx0", .dma_req = 42 },
1552 { .name = "rx1", .dma_req = 45 },
1553 { .name = "tx1", .dma_req = 44 },
1554 { .dma_req = -1 }
1555};
1556
1557static struct omap_hwmod am33xx_spi1_hwmod = {
1558 .name = "spi1",
1559 .class = &am33xx_spi_hwmod_class,
1560 .clkdm_name = "l4ls_clkdm",
1561 .mpu_irqs = am33xx_spi1_irqs,
1562 .sdma_reqs = am33xx_mcspi1_edma_reqs,
1563 .main_clk = "dpll_per_m2_div4_ck",
1564 .prcm = {
1565 .omap4 = {
1566 .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET,
1567 .modulemode = MODULEMODE_SWCTRL,
1568 },
1569 },
1570 .dev_attr = &mcspi_attrib,
1571};
1572
1573/*
1574 * 'spinlock' class
1575 * spinlock provides hardware assistance for synchronizing the
1576 * processes running on multiple processors
1577 */
1578static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
1579 .name = "spinlock",
1580};
1581
1582static struct omap_hwmod am33xx_spinlock_hwmod = {
1583 .name = "spinlock",
1584 .class = &am33xx_spinlock_hwmod_class,
1585 .clkdm_name = "l4ls_clkdm",
1586 .main_clk = "l4ls_gclk",
1587 .prcm = {
1588 .omap4 = {
1589 .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET,
1590 .modulemode = MODULEMODE_SWCTRL,
1591 },
1592 },
1593};
1594
1595/* 'timer 2-7' class */
1596static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
1597 .rev_offs = 0x0000,
1598 .sysc_offs = 0x0010,
1599 .syss_offs = 0x0014,
1600 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1601 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1602 SIDLE_SMART_WKUP),
1603 .sysc_fields = &omap_hwmod_sysc_type2,
1604};
1605
1606static struct omap_hwmod_class am33xx_timer_hwmod_class = {
1607 .name = "timer",
1608 .sysc = &am33xx_timer_sysc,
1609};
1610
1611/* timer1 1ms */
1612static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
1613 .rev_offs = 0x0000,
1614 .sysc_offs = 0x0010,
1615 .syss_offs = 0x0014,
1616 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1617 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1618 SYSS_HAS_RESET_STATUS),
1619 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1620 .sysc_fields = &omap_hwmod_sysc_type1,
1621};
1622
1623static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
1624 .name = "timer",
1625 .sysc = &am33xx_timer1ms_sysc,
1626};
1627
1628static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = {
1629 { .irq = 67 + OMAP_INTC_START, },
1630 { .irq = -1 },
1631};
1632
1633static struct omap_hwmod am33xx_timer1_hwmod = {
1634 .name = "timer1",
1635 .class = &am33xx_timer1ms_hwmod_class,
1636 .clkdm_name = "l4_wkup_clkdm",
1637 .mpu_irqs = am33xx_timer1_irqs,
1638 .main_clk = "timer1_fck",
1639 .prcm = {
1640 .omap4 = {
1641 .clkctrl_offs = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
1642 .modulemode = MODULEMODE_SWCTRL,
1643 },
1644 },
1645};
1646
1647static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = {
1648 { .irq = 68 + OMAP_INTC_START, },
1649 { .irq = -1 },
1650};
1651
1652static struct omap_hwmod am33xx_timer2_hwmod = {
1653 .name = "timer2",
1654 .class = &am33xx_timer_hwmod_class,
1655 .clkdm_name = "l4ls_clkdm",
1656 .mpu_irqs = am33xx_timer2_irqs,
1657 .main_clk = "timer2_fck",
1658 .prcm = {
1659 .omap4 = {
1660 .clkctrl_offs = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET,
1661 .modulemode = MODULEMODE_SWCTRL,
1662 },
1663 },
1664};
1665
1666static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = {
1667 { .irq = 69 + OMAP_INTC_START, },
1668 { .irq = -1 },
1669};
1670
1671static struct omap_hwmod am33xx_timer3_hwmod = {
1672 .name = "timer3",
1673 .class = &am33xx_timer_hwmod_class,
1674 .clkdm_name = "l4ls_clkdm",
1675 .mpu_irqs = am33xx_timer3_irqs,
1676 .main_clk = "timer3_fck",
1677 .prcm = {
1678 .omap4 = {
1679 .clkctrl_offs = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET,
1680 .modulemode = MODULEMODE_SWCTRL,
1681 },
1682 },
1683};
1684
1685static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = {
1686 { .irq = 92 + OMAP_INTC_START, },
1687 { .irq = -1 },
1688};
1689
1690static struct omap_hwmod am33xx_timer4_hwmod = {
1691 .name = "timer4",
1692 .class = &am33xx_timer_hwmod_class,
1693 .clkdm_name = "l4ls_clkdm",
1694 .mpu_irqs = am33xx_timer4_irqs,
1695 .main_clk = "timer4_fck",
1696 .prcm = {
1697 .omap4 = {
1698 .clkctrl_offs = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET,
1699 .modulemode = MODULEMODE_SWCTRL,
1700 },
1701 },
1702};
1703
1704static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = {
1705 { .irq = 93 + OMAP_INTC_START, },
1706 { .irq = -1 },
1707};
1708
1709static struct omap_hwmod am33xx_timer5_hwmod = {
1710 .name = "timer5",
1711 .class = &am33xx_timer_hwmod_class,
1712 .clkdm_name = "l4ls_clkdm",
1713 .mpu_irqs = am33xx_timer5_irqs,
1714 .main_clk = "timer5_fck",
1715 .prcm = {
1716 .omap4 = {
1717 .clkctrl_offs = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET,
1718 .modulemode = MODULEMODE_SWCTRL,
1719 },
1720 },
1721};
1722
1723static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = {
1724 { .irq = 94 + OMAP_INTC_START, },
1725 { .irq = -1 },
1726};
1727
1728static struct omap_hwmod am33xx_timer6_hwmod = {
1729 .name = "timer6",
1730 .class = &am33xx_timer_hwmod_class,
1731 .clkdm_name = "l4ls_clkdm",
1732 .mpu_irqs = am33xx_timer6_irqs,
1733 .main_clk = "timer6_fck",
1734 .prcm = {
1735 .omap4 = {
1736 .clkctrl_offs = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET,
1737 .modulemode = MODULEMODE_SWCTRL,
1738 },
1739 },
1740};
1741
1742static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = {
1743 { .irq = 95 + OMAP_INTC_START, },
1744 { .irq = -1 },
1745};
1746
1747static struct omap_hwmod am33xx_timer7_hwmod = {
1748 .name = "timer7",
1749 .class = &am33xx_timer_hwmod_class,
1750 .clkdm_name = "l4ls_clkdm",
1751 .mpu_irqs = am33xx_timer7_irqs,
1752 .main_clk = "timer7_fck",
1753 .prcm = {
1754 .omap4 = {
1755 .clkctrl_offs = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET,
1756 .modulemode = MODULEMODE_SWCTRL,
1757 },
1758 },
1759};
1760
1761/* tpcc */
1762static struct omap_hwmod_class am33xx_tpcc_hwmod_class = {
1763 .name = "tpcc",
1764};
1765
1766static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = {
1767 { .name = "edma0", .irq = 12 + OMAP_INTC_START, },
1768 { .name = "edma0_mperr", .irq = 13 + OMAP_INTC_START, },
1769 { .name = "edma0_err", .irq = 14 + OMAP_INTC_START, },
1770 { .irq = -1 },
1771};
1772
1773static struct omap_hwmod am33xx_tpcc_hwmod = {
1774 .name = "tpcc",
1775 .class = &am33xx_tpcc_hwmod_class,
1776 .clkdm_name = "l3_clkdm",
1777 .mpu_irqs = am33xx_tpcc_irqs,
1778 .main_clk = "l3_gclk",
1779 .prcm = {
1780 .omap4 = {
1781 .clkctrl_offs = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET,
1782 .modulemode = MODULEMODE_SWCTRL,
1783 },
1784 },
1785};
1786
1787static struct omap_hwmod_class_sysconfig am33xx_tptc_sysc = {
1788 .rev_offs = 0x0,
1789 .sysc_offs = 0x10,
1790 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1791 SYSC_HAS_MIDLEMODE),
1792 .idlemodes = (SIDLE_FORCE | SIDLE_SMART | MSTANDBY_FORCE),
1793 .sysc_fields = &omap_hwmod_sysc_type2,
1794};
1795
1796/* 'tptc' class */
1797static struct omap_hwmod_class am33xx_tptc_hwmod_class = {
1798 .name = "tptc",
1799 .sysc = &am33xx_tptc_sysc,
1800};
1801
1802/* tptc0 */
1803static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = {
1804 { .irq = 112 + OMAP_INTC_START, },
1805 { .irq = -1 },
1806};
1807
1808static struct omap_hwmod am33xx_tptc0_hwmod = {
1809 .name = "tptc0",
1810 .class = &am33xx_tptc_hwmod_class,
1811 .clkdm_name = "l3_clkdm",
1812 .mpu_irqs = am33xx_tptc0_irqs,
1813 .main_clk = "l3_gclk",
1814 .prcm = {
1815 .omap4 = {
1816 .clkctrl_offs = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET,
1817 .modulemode = MODULEMODE_SWCTRL,
1818 },
1819 },
1820};
1821
1822/* tptc1 */
1823static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = {
1824 { .irq = 113 + OMAP_INTC_START, },
1825 { .irq = -1 },
1826};
1827
1828static struct omap_hwmod am33xx_tptc1_hwmod = {
1829 .name = "tptc1",
1830 .class = &am33xx_tptc_hwmod_class,
1831 .clkdm_name = "l3_clkdm",
1832 .mpu_irqs = am33xx_tptc1_irqs,
1833 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
1834 .main_clk = "l3_gclk",
1835 .prcm = {
1836 .omap4 = {
1837 .clkctrl_offs = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET,
1838 .modulemode = MODULEMODE_SWCTRL,
1839 },
1840 },
1841};
1842
1843/* tptc2 */
1844static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = {
1845 { .irq = 114 + OMAP_INTC_START, },
1846 { .irq = -1 },
1847};
1848
1849static struct omap_hwmod am33xx_tptc2_hwmod = {
1850 .name = "tptc2",
1851 .class = &am33xx_tptc_hwmod_class,
1852 .clkdm_name = "l3_clkdm",
1853 .mpu_irqs = am33xx_tptc2_irqs,
1854 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
1855 .main_clk = "l3_gclk",
1856 .prcm = {
1857 .omap4 = {
1858 .clkctrl_offs = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET,
1859 .modulemode = MODULEMODE_SWCTRL,
1860 },
1861 },
1862};
1863
1864/* 'uart' class */
1865static struct omap_hwmod_class_sysconfig uart_sysc = {
1866 .rev_offs = 0x50,
1867 .sysc_offs = 0x54,
1868 .syss_offs = 0x58,
1869 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1870 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1871 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1872 SIDLE_SMART_WKUP),
1873 .sysc_fields = &omap_hwmod_sysc_type1,
1874};
1875
1876static struct omap_hwmod_class uart_class = {
1877 .name = "uart",
1878 .sysc = &uart_sysc,
1879};
1880
1881/* uart1 */
1882static struct omap_hwmod_dma_info uart1_edma_reqs[] = {
1883 { .name = "tx", .dma_req = 26, },
1884 { .name = "rx", .dma_req = 27, },
1885 { .dma_req = -1 }
1886};
1887
1888static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = {
1889 { .irq = 72 + OMAP_INTC_START, },
1890 { .irq = -1 },
1891};
1892
1893static struct omap_hwmod am33xx_uart1_hwmod = {
1894 .name = "uart1",
1895 .class = &uart_class,
1896 .clkdm_name = "l4_wkup_clkdm",
1897 .mpu_irqs = am33xx_uart1_irqs,
1898 .sdma_reqs = uart1_edma_reqs,
1899 .main_clk = "dpll_per_m2_div4_wkupdm_ck",
1900 .prcm = {
1901 .omap4 = {
1902 .clkctrl_offs = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET,
1903 .modulemode = MODULEMODE_SWCTRL,
1904 },
1905 },
1906};
1907
1908static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
1909 { .irq = 73 + OMAP_INTC_START, },
1910 { .irq = -1 },
1911};
1912
1913static struct omap_hwmod am33xx_uart2_hwmod = {
1914 .name = "uart2",
1915 .class = &uart_class,
1916 .clkdm_name = "l4ls_clkdm",
1917 .mpu_irqs = am33xx_uart2_irqs,
1918 .sdma_reqs = uart1_edma_reqs,
1919 .main_clk = "dpll_per_m2_div4_ck",
1920 .prcm = {
1921 .omap4 = {
1922 .clkctrl_offs = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET,
1923 .modulemode = MODULEMODE_SWCTRL,
1924 },
1925 },
1926};
1927
1928/* uart3 */
1929static struct omap_hwmod_dma_info uart3_edma_reqs[] = {
1930 { .name = "tx", .dma_req = 30, },
1931 { .name = "rx", .dma_req = 31, },
1932 { .dma_req = -1 }
1933};
1934
1935static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = {
1936 { .irq = 74 + OMAP_INTC_START, },
1937 { .irq = -1 },
1938};
1939
1940static struct omap_hwmod am33xx_uart3_hwmod = {
1941 .name = "uart3",
1942 .class = &uart_class,
1943 .clkdm_name = "l4ls_clkdm",
1944 .mpu_irqs = am33xx_uart3_irqs,
1945 .sdma_reqs = uart3_edma_reqs,
1946 .main_clk = "dpll_per_m2_div4_ck",
1947 .prcm = {
1948 .omap4 = {
1949 .clkctrl_offs = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET,
1950 .modulemode = MODULEMODE_SWCTRL,
1951 },
1952 },
1953};
1954
1955static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = {
1956 { .irq = 44 + OMAP_INTC_START, },
1957 { .irq = -1 },
1958};
1959
1960static struct omap_hwmod am33xx_uart4_hwmod = {
1961 .name = "uart4",
1962 .class = &uart_class,
1963 .clkdm_name = "l4ls_clkdm",
1964 .mpu_irqs = am33xx_uart4_irqs,
1965 .sdma_reqs = uart1_edma_reqs,
1966 .main_clk = "dpll_per_m2_div4_ck",
1967 .prcm = {
1968 .omap4 = {
1969 .clkctrl_offs = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET,
1970 .modulemode = MODULEMODE_SWCTRL,
1971 },
1972 },
1973};
1974
1975static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = {
1976 { .irq = 45 + OMAP_INTC_START, },
1977 { .irq = -1 },
1978};
1979
1980static struct omap_hwmod am33xx_uart5_hwmod = {
1981 .name = "uart5",
1982 .class = &uart_class,
1983 .clkdm_name = "l4ls_clkdm",
1984 .mpu_irqs = am33xx_uart5_irqs,
1985 .sdma_reqs = uart1_edma_reqs,
1986 .main_clk = "dpll_per_m2_div4_ck",
1987 .prcm = {
1988 .omap4 = {
1989 .clkctrl_offs = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET,
1990 .modulemode = MODULEMODE_SWCTRL,
1991 },
1992 },
1993};
1994
1995static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = {
1996 { .irq = 46 + OMAP_INTC_START, },
1997 { .irq = -1 },
1998};
1999
2000static struct omap_hwmod am33xx_uart6_hwmod = {
2001 .name = "uart6",
2002 .class = &uart_class,
2003 .clkdm_name = "l4ls_clkdm",
2004 .mpu_irqs = am33xx_uart6_irqs,
2005 .sdma_reqs = uart1_edma_reqs,
2006 .main_clk = "dpll_per_m2_div4_ck",
2007 .prcm = {
2008 .omap4 = {
2009 .clkctrl_offs = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET,
2010 .modulemode = MODULEMODE_SWCTRL,
2011 },
2012 },
2013};
2014
2015/* 'wd_timer' class */
2016static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = {
2017 .name = "wd_timer",
2018};
2019
2020/*
2021 * XXX: device.c file uses hardcoded name for watchdog timer
2022 * driver "wd_timer2, so we are also using same name as of now...
2023 */
2024static struct omap_hwmod am33xx_wd_timer1_hwmod = {
2025 .name = "wd_timer2",
2026 .class = &am33xx_wd_timer_hwmod_class,
2027 .clkdm_name = "l4_wkup_clkdm",
2028 .main_clk = "wdt1_fck",
2029 .prcm = {
2030 .omap4 = {
2031 .clkctrl_offs = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET,
2032 .modulemode = MODULEMODE_SWCTRL,
2033 },
2034 },
2035};
2036
2037/*
2038 * 'usb_otg' class
2039 * high-speed on-the-go universal serial bus (usb_otg) controller
2040 */
2041static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
2042 .rev_offs = 0x0,
2043 .sysc_offs = 0x10,
2044 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
2045 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2046 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2047 .sysc_fields = &omap_hwmod_sysc_type2,
2048};
2049
2050static struct omap_hwmod_class am33xx_usbotg_class = {
2051 .name = "usbotg",
2052 .sysc = &am33xx_usbhsotg_sysc,
2053};
2054
2055static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
2056 { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
2057 { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
2058 { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
2059 { .irq = -1 + OMAP_INTC_START, },
2060};
2061
2062static struct omap_hwmod am33xx_usbss_hwmod = {
2063 .name = "usb_otg_hs",
2064 .class = &am33xx_usbotg_class,
2065 .clkdm_name = "l3s_clkdm",
2066 .mpu_irqs = am33xx_usbss_mpu_irqs,
2067 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
2068 .main_clk = "usbotg_fck",
2069 .prcm = {
2070 .omap4 = {
2071 .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
2072 .modulemode = MODULEMODE_SWCTRL,
2073 },
2074 },
2075};
2076
2077
2078/*
2079 * Interfaces
2080 */
2081
2082/* l4 fw -> emif fw */
2083static struct omap_hwmod_ocp_if am33xx_l4_fw__emif_fw = {
2084 .master = &am33xx_l4_fw_hwmod,
2085 .slave = &am33xx_emif_fw_hwmod,
2086 .clk = "l4fw_gclk",
2087 .user = OCP_USER_MPU,
2088};
2089
2090static struct omap_hwmod_addr_space am33xx_emif_addrs[] = {
2091 {
2092 .pa_start = 0x4c000000,
2093 .pa_end = 0x4c000fff,
2094 .flags = ADDR_TYPE_RT
2095 },
2096 { }
2097};
2098/* l3 main -> emif */
2099static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
2100 .master = &am33xx_l3_main_hwmod,
2101 .slave = &am33xx_emif_hwmod,
2102 .clk = "dpll_core_m4_ck",
2103 .addr = am33xx_emif_addrs,
2104 .user = OCP_USER_MPU | OCP_USER_SDMA,
2105};
2106
2107/* mpu -> l3 main */
2108static struct omap_hwmod_ocp_if am33xx_mpu__l3_main = {
2109 .master = &am33xx_mpu_hwmod,
2110 .slave = &am33xx_l3_main_hwmod,
2111 .clk = "dpll_mpu_m2_ck",
2112 .user = OCP_USER_MPU,
2113};
2114
2115/* l3 main -> l4 hs */
2116static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
2117 .master = &am33xx_l3_main_hwmod,
2118 .slave = &am33xx_l4_hs_hwmod,
2119 .clk = "l3s_gclk",
2120 .user = OCP_USER_MPU | OCP_USER_SDMA,
2121};
2122
2123/* l3 main -> l3 s */
2124static struct omap_hwmod_ocp_if am33xx_l3_main__l3_s = {
2125 .master = &am33xx_l3_main_hwmod,
2126 .slave = &am33xx_l3_s_hwmod,
2127 .clk = "l3s_gclk",
2128 .user = OCP_USER_MPU | OCP_USER_SDMA,
2129};
2130
2131/* l3 s -> l4 per/ls */
2132static struct omap_hwmod_ocp_if am33xx_l3_s__l4_ls = {
2133 .master = &am33xx_l3_s_hwmod,
2134 .slave = &am33xx_l4_ls_hwmod,
2135 .clk = "l3s_gclk",
2136 .user = OCP_USER_MPU | OCP_USER_SDMA,
2137};
2138
2139/* l3 s -> l4 wkup */
2140static struct omap_hwmod_ocp_if am33xx_l3_s__l4_wkup = {
2141 .master = &am33xx_l3_s_hwmod,
2142 .slave = &am33xx_l4_wkup_hwmod,
2143 .clk = "l3s_gclk",
2144 .user = OCP_USER_MPU | OCP_USER_SDMA,
2145};
2146
2147/* l3 s -> l4 fw */
2148static struct omap_hwmod_ocp_if am33xx_l3_s__l4_fw = {
2149 .master = &am33xx_l3_s_hwmod,
2150 .slave = &am33xx_l4_fw_hwmod,
2151 .clk = "l3s_gclk",
2152 .user = OCP_USER_MPU | OCP_USER_SDMA,
2153};
2154
2155/* l3 main -> l3 instr */
2156static struct omap_hwmod_ocp_if am33xx_l3_main__l3_instr = {
2157 .master = &am33xx_l3_main_hwmod,
2158 .slave = &am33xx_l3_instr_hwmod,
2159 .clk = "l3s_gclk",
2160 .user = OCP_USER_MPU | OCP_USER_SDMA,
2161};
2162
2163/* mpu -> prcm */
2164static struct omap_hwmod_ocp_if am33xx_mpu__prcm = {
2165 .master = &am33xx_mpu_hwmod,
2166 .slave = &am33xx_prcm_hwmod,
2167 .clk = "dpll_mpu_m2_ck",
2168 .user = OCP_USER_MPU | OCP_USER_SDMA,
2169};
2170
2171/* l3 s -> l3 main*/
2172static struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = {
2173 .master = &am33xx_l3_s_hwmod,
2174 .slave = &am33xx_l3_main_hwmod,
2175 .clk = "l3s_gclk",
2176 .user = OCP_USER_MPU | OCP_USER_SDMA,
2177};
2178
2179/* pru-icss -> l3 main */
2180static struct omap_hwmod_ocp_if am33xx_pruss__l3_main = {
2181 .master = &am33xx_pruss_hwmod,
2182 .slave = &am33xx_l3_main_hwmod,
2183 .clk = "l3_gclk",
2184 .user = OCP_USER_MPU | OCP_USER_SDMA,
2185};
2186
2187/* wkup m3 -> l4 wkup */
2188static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
2189 .master = &am33xx_wkup_m3_hwmod,
2190 .slave = &am33xx_l4_wkup_hwmod,
2191 .clk = "dpll_core_m4_div2_ck",
2192 .user = OCP_USER_MPU | OCP_USER_SDMA,
2193};
2194
2195/* gfx -> l3 main */
2196static struct omap_hwmod_ocp_if am33xx_gfx__l3_main = {
2197 .master = &am33xx_gfx_hwmod,
2198 .slave = &am33xx_l3_main_hwmod,
2199 .clk = "dpll_core_m4_ck",
2200 .user = OCP_USER_MPU | OCP_USER_SDMA,
2201};
2202
2203/* l4 wkup -> wkup m3 */
2204static struct omap_hwmod_addr_space am33xx_wkup_m3_addrs[] = {
2205 {
2206 .name = "umem",
2207 .pa_start = 0x44d00000,
2208 .pa_end = 0x44d00000 + SZ_16K - 1,
2209 .flags = ADDR_TYPE_RT
2210 },
2211 {
2212 .name = "dmem",
2213 .pa_start = 0x44d80000,
2214 .pa_end = 0x44d80000 + SZ_8K - 1,
2215 .flags = ADDR_TYPE_RT
2216 },
2217 { }
2218};
2219
2220static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
2221 .master = &am33xx_l4_wkup_hwmod,
2222 .slave = &am33xx_wkup_m3_hwmod,
2223 .clk = "dpll_core_m4_div2_ck",
2224 .addr = am33xx_wkup_m3_addrs,
2225 .user = OCP_USER_MPU | OCP_USER_SDMA,
2226};
2227
2228/* l4 hs -> pru-icss */
2229static struct omap_hwmod_addr_space am33xx_pruss_addrs[] = {
2230 {
2231 .pa_start = 0x4a300000,
2232 .pa_end = 0x4a300000 + SZ_512K - 1,
2233 .flags = ADDR_TYPE_RT
2234 },
2235 { }
2236};
2237
2238static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
2239 .master = &am33xx_l4_hs_hwmod,
2240 .slave = &am33xx_pruss_hwmod,
2241 .clk = "dpll_core_m4_ck",
2242 .addr = am33xx_pruss_addrs,
2243 .user = OCP_USER_MPU | OCP_USER_SDMA,
2244};
2245
2246/* l3 main -> gfx */
2247static struct omap_hwmod_addr_space am33xx_gfx_addrs[] = {
2248 {
2249 .pa_start = 0x56000000,
2250 .pa_end = 0x56000000 + SZ_16M - 1,
2251 .flags = ADDR_TYPE_RT
2252 },
2253 { }
2254};
2255
2256static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
2257 .master = &am33xx_l3_main_hwmod,
2258 .slave = &am33xx_gfx_hwmod,
2259 .clk = "dpll_core_m4_ck",
2260 .addr = am33xx_gfx_addrs,
2261 .user = OCP_USER_MPU | OCP_USER_SDMA,
2262};
2263
2264/* l4 wkup -> smartreflex0 */
2265static struct omap_hwmod_addr_space am33xx_smartreflex0_addrs[] = {
2266 {
2267 .pa_start = 0x44e37000,
2268 .pa_end = 0x44e37000 + SZ_4K - 1,
2269 .flags = ADDR_TYPE_RT
2270 },
2271 { }
2272};
2273
2274static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
2275 .master = &am33xx_l4_wkup_hwmod,
2276 .slave = &am33xx_smartreflex0_hwmod,
2277 .clk = "dpll_core_m4_div2_ck",
2278 .addr = am33xx_smartreflex0_addrs,
2279 .user = OCP_USER_MPU,
2280};
2281
2282/* l4 wkup -> smartreflex1 */
2283static struct omap_hwmod_addr_space am33xx_smartreflex1_addrs[] = {
2284 {
2285 .pa_start = 0x44e39000,
2286 .pa_end = 0x44e39000 + SZ_4K - 1,
2287 .flags = ADDR_TYPE_RT
2288 },
2289 { }
2290};
2291
2292static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
2293 .master = &am33xx_l4_wkup_hwmod,
2294 .slave = &am33xx_smartreflex1_hwmod,
2295 .clk = "dpll_core_m4_div2_ck",
2296 .addr = am33xx_smartreflex1_addrs,
2297 .user = OCP_USER_MPU,
2298};
2299
2300/* l4 wkup -> control */
2301static struct omap_hwmod_addr_space am33xx_control_addrs[] = {
2302 {
2303 .pa_start = 0x44e10000,
2304 .pa_end = 0x44e10000 + SZ_8K - 1,
2305 .flags = ADDR_TYPE_RT
2306 },
2307 { }
2308};
2309
2310static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
2311 .master = &am33xx_l4_wkup_hwmod,
2312 .slave = &am33xx_control_hwmod,
2313 .clk = "dpll_core_m4_div2_ck",
2314 .addr = am33xx_control_addrs,
2315 .user = OCP_USER_MPU,
2316};
2317
2318/* l4 wkup -> rtc */
2319static struct omap_hwmod_addr_space am33xx_rtc_addrs[] = {
2320 {
2321 .pa_start = 0x44e3e000,
2322 .pa_end = 0x44e3e000 + SZ_4K - 1,
2323 .flags = ADDR_TYPE_RT
2324 },
2325 { }
2326};
2327
2328static struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
2329 .master = &am33xx_l4_wkup_hwmod,
2330 .slave = &am33xx_rtc_hwmod,
2331 .clk = "clkdiv32k_ick",
2332 .addr = am33xx_rtc_addrs,
2333 .user = OCP_USER_MPU,
2334};
2335
2336/* l4 per/ls -> DCAN0 */
2337static struct omap_hwmod_addr_space am33xx_dcan0_addrs[] = {
2338 {
2339 .pa_start = 0x481CC000,
2340 .pa_end = 0x481CC000 + SZ_4K - 1,
2341 .flags = ADDR_TYPE_RT
2342 },
2343 { }
2344};
2345
2346static struct omap_hwmod_ocp_if am33xx_l4_per__dcan0 = {
2347 .master = &am33xx_l4_ls_hwmod,
2348 .slave = &am33xx_dcan0_hwmod,
2349 .clk = "l4ls_gclk",
2350 .addr = am33xx_dcan0_addrs,
2351 .user = OCP_USER_MPU | OCP_USER_SDMA,
2352};
2353
2354/* l4 per/ls -> DCAN1 */
2355static struct omap_hwmod_addr_space am33xx_dcan1_addrs[] = {
2356 {
2357 .pa_start = 0x481D0000,
2358 .pa_end = 0x481D0000 + SZ_4K - 1,
2359 .flags = ADDR_TYPE_RT
2360 },
2361 { }
2362};
2363
2364static struct omap_hwmod_ocp_if am33xx_l4_per__dcan1 = {
2365 .master = &am33xx_l4_ls_hwmod,
2366 .slave = &am33xx_dcan1_hwmod,
2367 .clk = "l4ls_gclk",
2368 .addr = am33xx_dcan1_addrs,
2369 .user = OCP_USER_MPU | OCP_USER_SDMA,
2370};
2371
2372/* l4 per/ls -> GPIO2 */
2373static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = {
2374 {
2375 .pa_start = 0x4804C000,
2376 .pa_end = 0x4804C000 + SZ_4K - 1,
2377 .flags = ADDR_TYPE_RT,
2378 },
2379 { }
2380};
2381
2382static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = {
2383 .master = &am33xx_l4_ls_hwmod,
2384 .slave = &am33xx_gpio1_hwmod,
2385 .clk = "l4ls_gclk",
2386 .addr = am33xx_gpio1_addrs,
2387 .user = OCP_USER_MPU | OCP_USER_SDMA,
2388};
2389
2390/* l4 per/ls -> gpio3 */
2391static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = {
2392 {
2393 .pa_start = 0x481AC000,
2394 .pa_end = 0x481AC000 + SZ_4K - 1,
2395 .flags = ADDR_TYPE_RT,
2396 },
2397 { }
2398};
2399
2400static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = {
2401 .master = &am33xx_l4_ls_hwmod,
2402 .slave = &am33xx_gpio2_hwmod,
2403 .clk = "l4ls_gclk",
2404 .addr = am33xx_gpio2_addrs,
2405 .user = OCP_USER_MPU | OCP_USER_SDMA,
2406};
2407
2408/* l4 per/ls -> gpio4 */
2409static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = {
2410 {
2411 .pa_start = 0x481AE000,
2412 .pa_end = 0x481AE000 + SZ_4K - 1,
2413 .flags = ADDR_TYPE_RT,
2414 },
2415 { }
2416};
2417
2418static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = {
2419 .master = &am33xx_l4_ls_hwmod,
2420 .slave = &am33xx_gpio3_hwmod,
2421 .clk = "l4ls_gclk",
2422 .addr = am33xx_gpio3_addrs,
2423 .user = OCP_USER_MPU | OCP_USER_SDMA,
2424};
2425
2426/* L4 WKUP -> I2C1 */
2427static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = {
2428 {
2429 .pa_start = 0x44E0B000,
2430 .pa_end = 0x44E0B000 + SZ_4K - 1,
2431 .flags = ADDR_TYPE_RT,
2432 },
2433 { }
2434};
2435
2436static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
2437 .master = &am33xx_l4_wkup_hwmod,
2438 .slave = &am33xx_i2c1_hwmod,
2439 .clk = "dpll_core_m4_div2_ck",
2440 .addr = am33xx_i2c1_addr_space,
2441 .user = OCP_USER_MPU,
2442};
2443
2444/* L4 WKUP -> GPIO1 */
2445static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = {
2446 {
2447 .pa_start = 0x44E07000,
2448 .pa_end = 0x44E07000 + SZ_4K - 1,
2449 .flags = ADDR_TYPE_RT,
2450 },
2451 { }
2452};
2453
2454static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
2455 .master = &am33xx_l4_wkup_hwmod,
2456 .slave = &am33xx_gpio0_hwmod,
2457 .clk = "dpll_core_m4_div2_ck",
2458 .addr = am33xx_gpio0_addrs,
2459 .user = OCP_USER_MPU | OCP_USER_SDMA,
2460};
2461
2462/* L4 WKUP -> ADC_TSC */
2463static struct omap_hwmod_addr_space am33xx_adc_tsc_addrs[] = {
2464 {
2465 .pa_start = 0x44E0D000,
2466 .pa_end = 0x44E0D000 + SZ_8K - 1,
2467 .flags = ADDR_TYPE_RT
2468 },
2469 { }
2470};
2471
2472static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
2473 .master = &am33xx_l4_wkup_hwmod,
2474 .slave = &am33xx_adc_tsc_hwmod,
2475 .clk = "dpll_core_m4_div2_ck",
2476 .addr = am33xx_adc_tsc_addrs,
2477 .user = OCP_USER_MPU,
2478};
2479
2480static struct omap_hwmod_addr_space am33xx_cpgmac0_addr_space[] = {
2481 /* cpsw ss */
2482 {
2483 .pa_start = 0x4a100000,
2484 .pa_end = 0x4a100000 + SZ_2K - 1,
2485 .flags = ADDR_TYPE_RT,
2486 },
2487 /* cpsw wr */
2488 {
2489 .pa_start = 0x4a101200,
2490 .pa_end = 0x4a101200 + SZ_256 - 1,
2491 .flags = ADDR_TYPE_RT,
2492 },
2493 { }
2494};
2495
2496static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
2497 .master = &am33xx_l4_hs_hwmod,
2498 .slave = &am33xx_cpgmac0_hwmod,
2499 .clk = "cpsw_125mhz_gclk",
2500 .addr = am33xx_cpgmac0_addr_space,
2501 .user = OCP_USER_MPU,
2502};
2503
2504static struct omap_hwmod_addr_space am33xx_elm_addr_space[] = {
2505 {
2506 .pa_start = 0x48080000,
2507 .pa_end = 0x48080000 + SZ_8K - 1,
2508 .flags = ADDR_TYPE_RT
2509 },
2510 { }
2511};
2512
2513static struct omap_hwmod_ocp_if am33xx_l4_ls__elm = {
2514 .master = &am33xx_l4_ls_hwmod,
2515 .slave = &am33xx_elm_hwmod,
2516 .clk = "l4ls_gclk",
2517 .addr = am33xx_elm_addr_space,
2518 .user = OCP_USER_MPU,
2519};
2520
2521/*
2522 * Splitting the resources to handle access of PWMSS config space
2523 * and module specific part independently
2524 */
2525static struct omap_hwmod_addr_space am33xx_ehrpwm0_addr_space[] = {
2526 {
2527 .pa_start = 0x48300000,
2528 .pa_end = 0x48300000 + SZ_16 - 1,
2529 .flags = ADDR_TYPE_RT
2530 },
2531 {
2532 .pa_start = 0x48300200,
2533 .pa_end = 0x48300200 + SZ_256 - 1,
2534 .flags = ADDR_TYPE_RT
2535 },
2536 { }
2537};
2538
2539static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm0 = {
2540 .master = &am33xx_l4_ls_hwmod,
2541 .slave = &am33xx_ehrpwm0_hwmod,
2542 .clk = "l4ls_gclk",
2543 .addr = am33xx_ehrpwm0_addr_space,
2544 .user = OCP_USER_MPU,
2545};
2546
2547/*
2548 * Splitting the resources to handle access of PWMSS config space
2549 * and module specific part independently
2550 */
2551static struct omap_hwmod_addr_space am33xx_ehrpwm1_addr_space[] = {
2552 {
2553 .pa_start = 0x48302000,
2554 .pa_end = 0x48302000 + SZ_16 - 1,
2555 .flags = ADDR_TYPE_RT
2556 },
2557 {
2558 .pa_start = 0x48302200,
2559 .pa_end = 0x48302200 + SZ_256 - 1,
2560 .flags = ADDR_TYPE_RT
2561 },
2562 { }
2563};
2564
2565static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm1 = {
2566 .master = &am33xx_l4_ls_hwmod,
2567 .slave = &am33xx_ehrpwm1_hwmod,
2568 .clk = "l4ls_gclk",
2569 .addr = am33xx_ehrpwm1_addr_space,
2570 .user = OCP_USER_MPU,
2571};
2572
2573/*
2574 * Splitting the resources to handle access of PWMSS config space
2575 * and module specific part independently
2576 */
2577static struct omap_hwmod_addr_space am33xx_ehrpwm2_addr_space[] = {
2578 {
2579 .pa_start = 0x48304000,
2580 .pa_end = 0x48304000 + SZ_16 - 1,
2581 .flags = ADDR_TYPE_RT
2582 },
2583 {
2584 .pa_start = 0x48304200,
2585 .pa_end = 0x48304200 + SZ_256 - 1,
2586 .flags = ADDR_TYPE_RT
2587 },
2588 { }
2589};
2590
2591static struct omap_hwmod_ocp_if am33xx_l4_ls__ehrpwm2 = {
2592 .master = &am33xx_l4_ls_hwmod,
2593 .slave = &am33xx_ehrpwm2_hwmod,
2594 .clk = "l4ls_gclk",
2595 .addr = am33xx_ehrpwm2_addr_space,
2596 .user = OCP_USER_MPU,
2597};
2598
2599/*
2600 * Splitting the resources to handle access of PWMSS config space
2601 * and module specific part independently
2602 */
2603static struct omap_hwmod_addr_space am33xx_ecap0_addr_space[] = {
2604 {
2605 .pa_start = 0x48300000,
2606 .pa_end = 0x48300000 + SZ_16 - 1,
2607 .flags = ADDR_TYPE_RT
2608 },
2609 {
2610 .pa_start = 0x48300100,
2611 .pa_end = 0x48300100 + SZ_256 - 1,
2612 .flags = ADDR_TYPE_RT
2613 },
2614 { }
2615};
2616
2617static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap0 = {
2618 .master = &am33xx_l4_ls_hwmod,
2619 .slave = &am33xx_ecap0_hwmod,
2620 .clk = "l4ls_gclk",
2621 .addr = am33xx_ecap0_addr_space,
2622 .user = OCP_USER_MPU,
2623};
2624
2625/*
2626 * Splitting the resources to handle access of PWMSS config space
2627 * and module specific part independently
2628 */
2629static struct omap_hwmod_addr_space am33xx_ecap1_addr_space[] = {
2630 {
2631 .pa_start = 0x48302000,
2632 .pa_end = 0x48302000 + SZ_16 - 1,
2633 .flags = ADDR_TYPE_RT
2634 },
2635 {
2636 .pa_start = 0x48302100,
2637 .pa_end = 0x48302100 + SZ_256 - 1,
2638 .flags = ADDR_TYPE_RT
2639 },
2640 { }
2641};
2642
2643static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap1 = {
2644 .master = &am33xx_l4_ls_hwmod,
2645 .slave = &am33xx_ecap1_hwmod,
2646 .clk = "l4ls_gclk",
2647 .addr = am33xx_ecap1_addr_space,
2648 .user = OCP_USER_MPU,
2649};
2650
2651/*
2652 * Splitting the resources to handle access of PWMSS config space
2653 * and module specific part independently
2654 */
2655static struct omap_hwmod_addr_space am33xx_ecap2_addr_space[] = {
2656 {
2657 .pa_start = 0x48304000,
2658 .pa_end = 0x48304000 + SZ_16 - 1,
2659 .flags = ADDR_TYPE_RT
2660 },
2661 {
2662 .pa_start = 0x48304100,
2663 .pa_end = 0x48304100 + SZ_256 - 1,
2664 .flags = ADDR_TYPE_RT
2665 },
2666 { }
2667};
2668
2669static struct omap_hwmod_ocp_if am33xx_l4_ls__ecap2 = {
2670 .master = &am33xx_l4_ls_hwmod,
2671 .slave = &am33xx_ecap2_hwmod,
2672 .clk = "l4ls_gclk",
2673 .addr = am33xx_ecap2_addr_space,
2674 .user = OCP_USER_MPU,
2675};
2676
2677/* l3s cfg -> gpmc */
2678static struct omap_hwmod_addr_space am33xx_gpmc_addr_space[] = {
2679 {
2680 .pa_start = 0x50000000,
2681 .pa_end = 0x50000000 + SZ_8K - 1,
2682 .flags = ADDR_TYPE_RT,
2683 },
2684 { }
2685};
2686
2687static struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
2688 .master = &am33xx_l3_s_hwmod,
2689 .slave = &am33xx_gpmc_hwmod,
2690 .clk = "l3s_gclk",
2691 .addr = am33xx_gpmc_addr_space,
2692 .user = OCP_USER_MPU,
2693};
2694
2695/* i2c2 */
2696static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = {
2697 {
2698 .pa_start = 0x4802A000,
2699 .pa_end = 0x4802A000 + SZ_4K - 1,
2700 .flags = ADDR_TYPE_RT,
2701 },
2702 { }
2703};
2704
2705static struct omap_hwmod_ocp_if am33xx_l4_per__i2c2 = {
2706 .master = &am33xx_l4_ls_hwmod,
2707 .slave = &am33xx_i2c2_hwmod,
2708 .clk = "l4ls_gclk",
2709 .addr = am33xx_i2c2_addr_space,
2710 .user = OCP_USER_MPU,
2711};
2712
2713static struct omap_hwmod_addr_space am33xx_i2c3_addr_space[] = {
2714 {
2715 .pa_start = 0x4819C000,
2716 .pa_end = 0x4819C000 + SZ_4K - 1,
2717 .flags = ADDR_TYPE_RT
2718 },
2719 { }
2720};
2721
2722static struct omap_hwmod_ocp_if am33xx_l4_per__i2c3 = {
2723 .master = &am33xx_l4_ls_hwmod,
2724 .slave = &am33xx_i2c3_hwmod,
2725 .clk = "l4ls_gclk",
2726 .addr = am33xx_i2c3_addr_space,
2727 .user = OCP_USER_MPU,
2728};
2729
2730static struct omap_hwmod_addr_space am33xx_lcdc_addr_space[] = {
2731 {
2732 .pa_start = 0x4830E000,
2733 .pa_end = 0x4830E000 + SZ_8K - 1,
2734 .flags = ADDR_TYPE_RT,
2735 },
2736 { }
2737};
2738
2739static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
2740 .master = &am33xx_l3_main_hwmod,
2741 .slave = &am33xx_lcdc_hwmod,
2742 .clk = "dpll_core_m4_ck",
2743 .addr = am33xx_lcdc_addr_space,
2744 .user = OCP_USER_MPU,
2745};
2746
2747static struct omap_hwmod_addr_space am33xx_mailbox_addrs[] = {
2748 {
2749 .pa_start = 0x480C8000,
2750 .pa_end = 0x480C8000 + (SZ_4K - 1),
2751 .flags = ADDR_TYPE_RT
2752 },
2753 { }
2754};
2755
2756/* l4 ls -> mailbox */
2757static struct omap_hwmod_ocp_if am33xx_l4_per__mailbox = {
2758 .master = &am33xx_l4_ls_hwmod,
2759 .slave = &am33xx_mailbox_hwmod,
2760 .clk = "l4ls_gclk",
2761 .addr = am33xx_mailbox_addrs,
2762 .user = OCP_USER_MPU,
2763};
2764
2765/* l4 ls -> spinlock */
2766static struct omap_hwmod_addr_space am33xx_spinlock_addrs[] = {
2767 {
2768 .pa_start = 0x480Ca000,
2769 .pa_end = 0x480Ca000 + SZ_4K - 1,
2770 .flags = ADDR_TYPE_RT
2771 },
2772 { }
2773};
2774
2775static struct omap_hwmod_ocp_if am33xx_l4_ls__spinlock = {
2776 .master = &am33xx_l4_ls_hwmod,
2777 .slave = &am33xx_spinlock_hwmod,
2778 .clk = "l4ls_gclk",
2779 .addr = am33xx_spinlock_addrs,
2780 .user = OCP_USER_MPU,
2781};
2782
2783/* l4 ls -> mcasp0 */
2784static struct omap_hwmod_addr_space am33xx_mcasp0_addr_space[] = {
2785 {
2786 .pa_start = 0x48038000,
2787 .pa_end = 0x48038000 + SZ_8K - 1,
2788 .flags = ADDR_TYPE_RT
2789 },
2790 { }
2791};
2792
2793static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp0 = {
2794 .master = &am33xx_l4_ls_hwmod,
2795 .slave = &am33xx_mcasp0_hwmod,
2796 .clk = "l4ls_gclk",
2797 .addr = am33xx_mcasp0_addr_space,
2798 .user = OCP_USER_MPU,
2799};
2800
2801/* l3 s -> mcasp0 data */
2802static struct omap_hwmod_addr_space am33xx_mcasp0_data_addr_space[] = {
2803 {
2804 .pa_start = 0x46000000,
2805 .pa_end = 0x46000000 + SZ_4M - 1,
2806 .flags = ADDR_TYPE_RT
2807 },
2808 { }
2809};
2810
2811static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp0_data = {
2812 .master = &am33xx_l3_s_hwmod,
2813 .slave = &am33xx_mcasp0_hwmod,
2814 .clk = "l3s_gclk",
2815 .addr = am33xx_mcasp0_data_addr_space,
2816 .user = OCP_USER_SDMA,
2817};
2818
2819/* l4 ls -> mcasp1 */
2820static struct omap_hwmod_addr_space am33xx_mcasp1_addr_space[] = {
2821 {
2822 .pa_start = 0x4803C000,
2823 .pa_end = 0x4803C000 + SZ_8K - 1,
2824 .flags = ADDR_TYPE_RT
2825 },
2826 { }
2827};
2828
2829static struct omap_hwmod_ocp_if am33xx_l4_ls__mcasp1 = {
2830 .master = &am33xx_l4_ls_hwmod,
2831 .slave = &am33xx_mcasp1_hwmod,
2832 .clk = "l4ls_gclk",
2833 .addr = am33xx_mcasp1_addr_space,
2834 .user = OCP_USER_MPU,
2835};
2836
2837/* l3 s -> mcasp1 data */
2838static struct omap_hwmod_addr_space am33xx_mcasp1_data_addr_space[] = {
2839 {
2840 .pa_start = 0x46400000,
2841 .pa_end = 0x46400000 + SZ_4M - 1,
2842 .flags = ADDR_TYPE_RT
2843 },
2844 { }
2845};
2846
2847static struct omap_hwmod_ocp_if am33xx_l3_s__mcasp1_data = {
2848 .master = &am33xx_l3_s_hwmod,
2849 .slave = &am33xx_mcasp1_hwmod,
2850 .clk = "l3s_gclk",
2851 .addr = am33xx_mcasp1_data_addr_space,
2852 .user = OCP_USER_SDMA,
2853};
2854
2855/* l4 ls -> mmc0 */
2856static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = {
2857 {
2858 .pa_start = 0x48060100,
2859 .pa_end = 0x48060100 + SZ_4K - 1,
2860 .flags = ADDR_TYPE_RT,
2861 },
2862 { }
2863};
2864
2865static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc0 = {
2866 .master = &am33xx_l4_ls_hwmod,
2867 .slave = &am33xx_mmc0_hwmod,
2868 .clk = "l4ls_gclk",
2869 .addr = am33xx_mmc0_addr_space,
2870 .user = OCP_USER_MPU,
2871};
2872
2873/* l4 ls -> mmc1 */
2874static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = {
2875 {
2876 .pa_start = 0x481d8100,
2877 .pa_end = 0x481d8100 + SZ_4K - 1,
2878 .flags = ADDR_TYPE_RT,
2879 },
2880 { }
2881};
2882
2883static struct omap_hwmod_ocp_if am33xx_l4_ls__mmc1 = {
2884 .master = &am33xx_l4_ls_hwmod,
2885 .slave = &am33xx_mmc1_hwmod,
2886 .clk = "l4ls_gclk",
2887 .addr = am33xx_mmc1_addr_space,
2888 .user = OCP_USER_MPU,
2889};
2890
2891/* l3 s -> mmc2 */
2892static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = {
2893 {
2894 .pa_start = 0x47810100,
2895 .pa_end = 0x47810100 + SZ_64K - 1,
2896 .flags = ADDR_TYPE_RT,
2897 },
2898 { }
2899};
2900
2901static struct omap_hwmod_ocp_if am33xx_l3_s__mmc2 = {
2902 .master = &am33xx_l3_s_hwmod,
2903 .slave = &am33xx_mmc2_hwmod,
2904 .clk = "l3s_gclk",
2905 .addr = am33xx_mmc2_addr_space,
2906 .user = OCP_USER_MPU,
2907};
2908
2909/* l4 ls -> mcspi0 */
2910static struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = {
2911 {
2912 .pa_start = 0x48030000,
2913 .pa_end = 0x48030000 + SZ_1K - 1,
2914 .flags = ADDR_TYPE_RT,
2915 },
2916 { }
2917};
2918
2919static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi0 = {
2920 .master = &am33xx_l4_ls_hwmod,
2921 .slave = &am33xx_spi0_hwmod,
2922 .clk = "l4ls_gclk",
2923 .addr = am33xx_mcspi0_addr_space,
2924 .user = OCP_USER_MPU,
2925};
2926
2927/* l4 ls -> mcspi1 */
2928static struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = {
2929 {
2930 .pa_start = 0x481A0000,
2931 .pa_end = 0x481A0000 + SZ_1K - 1,
2932 .flags = ADDR_TYPE_RT,
2933 },
2934 { }
2935};
2936
2937static struct omap_hwmod_ocp_if am33xx_l4_ls__mcspi1 = {
2938 .master = &am33xx_l4_ls_hwmod,
2939 .slave = &am33xx_spi1_hwmod,
2940 .clk = "l4ls_gclk",
2941 .addr = am33xx_mcspi1_addr_space,
2942 .user = OCP_USER_MPU,
2943};
2944
2945/* l4 wkup -> timer1 */
2946static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = {
2947 {
2948 .pa_start = 0x44E31000,
2949 .pa_end = 0x44E31000 + SZ_1K - 1,
2950 .flags = ADDR_TYPE_RT
2951 },
2952 { }
2953};
2954
2955static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
2956 .master = &am33xx_l4_wkup_hwmod,
2957 .slave = &am33xx_timer1_hwmod,
2958 .clk = "dpll_core_m4_div2_ck",
2959 .addr = am33xx_timer1_addr_space,
2960 .user = OCP_USER_MPU,
2961};
2962
2963/* l4 per -> timer2 */
2964static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = {
2965 {
2966 .pa_start = 0x48040000,
2967 .pa_end = 0x48040000 + SZ_1K - 1,
2968 .flags = ADDR_TYPE_RT
2969 },
2970 { }
2971};
2972
2973static struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
2974 .master = &am33xx_l4_ls_hwmod,
2975 .slave = &am33xx_timer2_hwmod,
2976 .clk = "l4ls_gclk",
2977 .addr = am33xx_timer2_addr_space,
2978 .user = OCP_USER_MPU,
2979};
2980
2981/* l4 per -> timer3 */
2982static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = {
2983 {
2984 .pa_start = 0x48042000,
2985 .pa_end = 0x48042000 + SZ_1K - 1,
2986 .flags = ADDR_TYPE_RT
2987 },
2988 { }
2989};
2990
2991static struct omap_hwmod_ocp_if am33xx_l4_ls__timer3 = {
2992 .master = &am33xx_l4_ls_hwmod,
2993 .slave = &am33xx_timer3_hwmod,
2994 .clk = "l4ls_gclk",
2995 .addr = am33xx_timer3_addr_space,
2996 .user = OCP_USER_MPU,
2997};
2998
2999/* l4 per -> timer4 */
3000static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = {
3001 {
3002 .pa_start = 0x48044000,
3003 .pa_end = 0x48044000 + SZ_1K - 1,
3004 .flags = ADDR_TYPE_RT
3005 },
3006 { }
3007};
3008
3009static struct omap_hwmod_ocp_if am33xx_l4_ls__timer4 = {
3010 .master = &am33xx_l4_ls_hwmod,
3011 .slave = &am33xx_timer4_hwmod,
3012 .clk = "l4ls_gclk",
3013 .addr = am33xx_timer4_addr_space,
3014 .user = OCP_USER_MPU,
3015};
3016
3017/* l4 per -> timer5 */
3018static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = {
3019 {
3020 .pa_start = 0x48046000,
3021 .pa_end = 0x48046000 + SZ_1K - 1,
3022 .flags = ADDR_TYPE_RT
3023 },
3024 { }
3025};
3026
3027static struct omap_hwmod_ocp_if am33xx_l4_ls__timer5 = {
3028 .master = &am33xx_l4_ls_hwmod,
3029 .slave = &am33xx_timer5_hwmod,
3030 .clk = "l4ls_gclk",
3031 .addr = am33xx_timer5_addr_space,
3032 .user = OCP_USER_MPU,
3033};
3034
3035/* l4 per -> timer6 */
3036static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = {
3037 {
3038 .pa_start = 0x48048000,
3039 .pa_end = 0x48048000 + SZ_1K - 1,
3040 .flags = ADDR_TYPE_RT
3041 },
3042 { }
3043};
3044
3045static struct omap_hwmod_ocp_if am33xx_l4_ls__timer6 = {
3046 .master = &am33xx_l4_ls_hwmod,
3047 .slave = &am33xx_timer6_hwmod,
3048 .clk = "l4ls_gclk",
3049 .addr = am33xx_timer6_addr_space,
3050 .user = OCP_USER_MPU,
3051};
3052
3053/* l4 per -> timer7 */
3054static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = {
3055 {
3056 .pa_start = 0x4804A000,
3057 .pa_end = 0x4804A000 + SZ_1K - 1,
3058 .flags = ADDR_TYPE_RT
3059 },
3060 { }
3061};
3062
3063static struct omap_hwmod_ocp_if am33xx_l4_ls__timer7 = {
3064 .master = &am33xx_l4_ls_hwmod,
3065 .slave = &am33xx_timer7_hwmod,
3066 .clk = "l4ls_gclk",
3067 .addr = am33xx_timer7_addr_space,
3068 .user = OCP_USER_MPU,
3069};
3070
3071/* l3 main -> tpcc */
3072static struct omap_hwmod_addr_space am33xx_tpcc_addr_space[] = {
3073 {
3074 .pa_start = 0x49000000,
3075 .pa_end = 0x49000000 + SZ_32K - 1,
3076 .flags = ADDR_TYPE_RT
3077 },
3078 { }
3079};
3080
3081static struct omap_hwmod_ocp_if am33xx_l3_main__tpcc = {
3082 .master = &am33xx_l3_main_hwmod,
3083 .slave = &am33xx_tpcc_hwmod,
3084 .clk = "l3_gclk",
3085 .addr = am33xx_tpcc_addr_space,
3086 .user = OCP_USER_MPU,
3087};
3088
3089/* l3 main -> tpcc0 */
3090static struct omap_hwmod_addr_space am33xx_tptc0_addr_space[] = {
3091 {
3092 .pa_start = 0x49800000,
3093 .pa_end = 0x49800000 + SZ_8K - 1,
3094 .flags = ADDR_TYPE_RT,
3095 },
3096 { }
3097};
3098
3099static struct omap_hwmod_ocp_if am33xx_l3_main__tptc0 = {
3100 .master = &am33xx_l3_main_hwmod,
3101 .slave = &am33xx_tptc0_hwmod,
3102 .clk = "l3_gclk",
3103 .addr = am33xx_tptc0_addr_space,
3104 .user = OCP_USER_MPU,
3105};
3106
3107/* l3 main -> tpcc1 */
3108static struct omap_hwmod_addr_space am33xx_tptc1_addr_space[] = {
3109 {
3110 .pa_start = 0x49900000,
3111 .pa_end = 0x49900000 + SZ_8K - 1,
3112 .flags = ADDR_TYPE_RT,
3113 },
3114 { }
3115};
3116
3117static struct omap_hwmod_ocp_if am33xx_l3_main__tptc1 = {
3118 .master = &am33xx_l3_main_hwmod,
3119 .slave = &am33xx_tptc1_hwmod,
3120 .clk = "l3_gclk",
3121 .addr = am33xx_tptc1_addr_space,
3122 .user = OCP_USER_MPU,
3123};
3124
3125/* l3 main -> tpcc2 */
3126static struct omap_hwmod_addr_space am33xx_tptc2_addr_space[] = {
3127 {
3128 .pa_start = 0x49a00000,
3129 .pa_end = 0x49a00000 + SZ_8K - 1,
3130 .flags = ADDR_TYPE_RT,
3131 },
3132 { }
3133};
3134
3135static struct omap_hwmod_ocp_if am33xx_l3_main__tptc2 = {
3136 .master = &am33xx_l3_main_hwmod,
3137 .slave = &am33xx_tptc2_hwmod,
3138 .clk = "l3_gclk",
3139 .addr = am33xx_tptc2_addr_space,
3140 .user = OCP_USER_MPU,
3141};
3142
3143/* l4 wkup -> uart1 */
3144static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = {
3145 {
3146 .pa_start = 0x44E09000,
3147 .pa_end = 0x44E09000 + SZ_8K - 1,
3148 .flags = ADDR_TYPE_RT,
3149 },
3150 { }
3151};
3152
3153static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
3154 .master = &am33xx_l4_wkup_hwmod,
3155 .slave = &am33xx_uart1_hwmod,
3156 .clk = "dpll_core_m4_div2_ck",
3157 .addr = am33xx_uart1_addr_space,
3158 .user = OCP_USER_MPU,
3159};
3160
3161/* l4 ls -> uart2 */
3162static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = {
3163 {
3164 .pa_start = 0x48022000,
3165 .pa_end = 0x48022000 + SZ_8K - 1,
3166 .flags = ADDR_TYPE_RT,
3167 },
3168 { }
3169};
3170
3171static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = {
3172 .master = &am33xx_l4_ls_hwmod,
3173 .slave = &am33xx_uart2_hwmod,
3174 .clk = "l4ls_gclk",
3175 .addr = am33xx_uart2_addr_space,
3176 .user = OCP_USER_MPU,
3177};
3178
3179/* l4 ls -> uart3 */
3180static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = {
3181 {
3182 .pa_start = 0x48024000,
3183 .pa_end = 0x48024000 + SZ_8K - 1,
3184 .flags = ADDR_TYPE_RT,
3185 },
3186 { }
3187};
3188
3189static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = {
3190 .master = &am33xx_l4_ls_hwmod,
3191 .slave = &am33xx_uart3_hwmod,
3192 .clk = "l4ls_gclk",
3193 .addr = am33xx_uart3_addr_space,
3194 .user = OCP_USER_MPU,
3195};
3196
3197/* l4 ls -> uart4 */
3198static struct omap_hwmod_addr_space am33xx_uart4_addr_space[] = {
3199 {
3200 .pa_start = 0x481A6000,
3201 .pa_end = 0x481A6000 + SZ_8K - 1,
3202 .flags = ADDR_TYPE_RT,
3203 },
3204 { }
3205};
3206
3207static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = {
3208 .master = &am33xx_l4_ls_hwmod,
3209 .slave = &am33xx_uart4_hwmod,
3210 .clk = "l4ls_gclk",
3211 .addr = am33xx_uart4_addr_space,
3212 .user = OCP_USER_MPU,
3213};
3214
3215/* l4 ls -> uart5 */
3216static struct omap_hwmod_addr_space am33xx_uart5_addr_space[] = {
3217 {
3218 .pa_start = 0x481A8000,
3219 .pa_end = 0x481A8000 + SZ_8K - 1,
3220 .flags = ADDR_TYPE_RT,
3221 },
3222 { }
3223};
3224
3225static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = {
3226 .master = &am33xx_l4_ls_hwmod,
3227 .slave = &am33xx_uart5_hwmod,
3228 .clk = "l4ls_gclk",
3229 .addr = am33xx_uart5_addr_space,
3230 .user = OCP_USER_MPU,
3231};
3232
3233/* l4 ls -> uart6 */
3234static struct omap_hwmod_addr_space am33xx_uart6_addr_space[] = {
3235 {
3236 .pa_start = 0x481aa000,
3237 .pa_end = 0x481aa000 + SZ_8K - 1,
3238 .flags = ADDR_TYPE_RT,
3239 },
3240 { }
3241};
3242
3243static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = {
3244 .master = &am33xx_l4_ls_hwmod,
3245 .slave = &am33xx_uart6_hwmod,
3246 .clk = "l4ls_gclk",
3247 .addr = am33xx_uart6_addr_space,
3248 .user = OCP_USER_MPU,
3249};
3250
3251/* l4 wkup -> wd_timer1 */
3252static struct omap_hwmod_addr_space am33xx_wd_timer1_addrs[] = {
3253 {
3254 .pa_start = 0x44e35000,
3255 .pa_end = 0x44e35000 + SZ_4K - 1,
3256 .flags = ADDR_TYPE_RT
3257 },
3258 { }
3259};
3260
3261static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
3262 .master = &am33xx_l4_wkup_hwmod,
3263 .slave = &am33xx_wd_timer1_hwmod,
3264 .clk = "dpll_core_m4_div2_ck",
3265 .addr = am33xx_wd_timer1_addrs,
3266 .user = OCP_USER_MPU,
3267};
3268
3269/* usbss */
3270/* l3 s -> USBSS interface */
3271static struct omap_hwmod_addr_space am33xx_usbss_addr_space[] = {
3272 {
3273 .name = "usbss",
3274 .pa_start = 0x47400000,
3275 .pa_end = 0x47400000 + SZ_4K - 1,
3276 .flags = ADDR_TYPE_RT
3277 },
3278 {
3279 .name = "musb0",
3280 .pa_start = 0x47401000,
3281 .pa_end = 0x47401000 + SZ_2K - 1,
3282 .flags = ADDR_TYPE_RT
3283 },
3284 {
3285 .name = "musb1",
3286 .pa_start = 0x47401800,
3287 .pa_end = 0x47401800 + SZ_2K - 1,
3288 .flags = ADDR_TYPE_RT
3289 },
3290 { }
3291};
3292
3293static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
3294 .master = &am33xx_l3_s_hwmod,
3295 .slave = &am33xx_usbss_hwmod,
3296 .clk = "l3s_gclk",
3297 .addr = am33xx_usbss_addr_space,
3298 .user = OCP_USER_MPU,
3299 .flags = OCPIF_SWSUP_IDLE,
3300};
3301
3302static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
3303 &am33xx_l4_fw__emif_fw,
3304 &am33xx_l3_main__emif,
3305 &am33xx_mpu__l3_main,
3306 &am33xx_mpu__prcm,
3307 &am33xx_l3_s__l4_ls,
3308 &am33xx_l3_s__l4_wkup,
3309 &am33xx_l3_s__l4_fw,
3310 &am33xx_l3_main__l4_hs,
3311 &am33xx_l3_main__l3_s,
3312 &am33xx_l3_main__l3_instr,
3313 &am33xx_l3_main__gfx,
3314 &am33xx_l3_s__l3_main,
3315 &am33xx_pruss__l3_main,
3316 &am33xx_wkup_m3__l4_wkup,
3317 &am33xx_gfx__l3_main,
3318 &am33xx_l4_wkup__wkup_m3,
3319 &am33xx_l4_wkup__control,
3320 &am33xx_l4_wkup__smartreflex0,
3321 &am33xx_l4_wkup__smartreflex1,
3322 &am33xx_l4_wkup__uart1,
3323 &am33xx_l4_wkup__timer1,
3324 &am33xx_l4_wkup__rtc,
3325 &am33xx_l4_wkup__i2c1,
3326 &am33xx_l4_wkup__gpio0,
3327 &am33xx_l4_wkup__adc_tsc,
3328 &am33xx_l4_wkup__wd_timer1,
3329 &am33xx_l4_hs__pruss,
3330 &am33xx_l4_per__dcan0,
3331 &am33xx_l4_per__dcan1,
3332 &am33xx_l4_per__gpio1,
3333 &am33xx_l4_per__gpio2,
3334 &am33xx_l4_per__gpio3,
3335 &am33xx_l4_per__i2c2,
3336 &am33xx_l4_per__i2c3,
3337 &am33xx_l4_per__mailbox,
3338 &am33xx_l4_ls__mcasp0,
3339 &am33xx_l3_s__mcasp0_data,
3340 &am33xx_l4_ls__mcasp1,
3341 &am33xx_l3_s__mcasp1_data,
3342 &am33xx_l4_ls__mmc0,
3343 &am33xx_l4_ls__mmc1,
3344 &am33xx_l3_s__mmc2,
3345 &am33xx_l4_ls__timer2,
3346 &am33xx_l4_ls__timer3,
3347 &am33xx_l4_ls__timer4,
3348 &am33xx_l4_ls__timer5,
3349 &am33xx_l4_ls__timer6,
3350 &am33xx_l4_ls__timer7,
3351 &am33xx_l3_main__tpcc,
3352 &am33xx_l4_ls__uart2,
3353 &am33xx_l4_ls__uart3,
3354 &am33xx_l4_ls__uart4,
3355 &am33xx_l4_ls__uart5,
3356 &am33xx_l4_ls__uart6,
3357 &am33xx_l4_ls__spinlock,
3358 &am33xx_l4_ls__elm,
3359 &am33xx_l4_ls__ehrpwm0,
3360 &am33xx_l4_ls__ehrpwm1,
3361 &am33xx_l4_ls__ehrpwm2,
3362 &am33xx_l4_ls__ecap0,
3363 &am33xx_l4_ls__ecap1,
3364 &am33xx_l4_ls__ecap2,
3365 &am33xx_l3_s__gpmc,
3366 &am33xx_l3_main__lcdc,
3367 &am33xx_l4_ls__mcspi0,
3368 &am33xx_l4_ls__mcspi1,
3369 &am33xx_l3_main__tptc0,
3370 &am33xx_l3_main__tptc1,
3371 &am33xx_l3_main__tptc2,
3372 &am33xx_l3_s__usbss,
3373 &am33xx_l4_hs__cpgmac0,
3374 NULL,
3375};
3376
3377int __init am33xx_hwmod_init(void)
3378{
3379 omap_hwmod_init();
3380 return omap_hwmod_register_links(am33xx_hwmod_ocp_ifs);
3381}
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index ce7e6068768f..016429d89bb0 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -15,26 +15,27 @@
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 <plat/l3_3xxx.h>
25#include <plat/l4_3xxx.h> 24#include <plat/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 <plat/mcbsp.h>
30#include <plat/mcspi.h> 28#include <plat/mcspi.h>
31#include <plat/dmtimer.h> 29#include <plat/dmtimer.h>
30#include <plat/iommu.h>
32 31
32#include <mach/am35xx.h>
33
34#include "soc.h"
33#include "omap_hwmod_common_data.h" 35#include "omap_hwmod_common_data.h"
34#include "prm-regbits-34xx.h" 36#include "prm-regbits-34xx.h"
35#include "cm-regbits-34xx.h" 37#include "cm-regbits-34xx.h"
36#include "wd_timer.h" 38#include "wd_timer.h"
37#include <mach/am35xx.h>
38 39
39/* 40/*
40 * OMAP3xxx hardware module integration data 41 * OMAP3xxx hardware module integration data
@@ -51,9 +52,9 @@
51 52
52/* L3 */ 53/* L3 */
53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { 54static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
54 { .irq = INT_34XX_L3_DBG_IRQ }, 55 { .irq = 9 + OMAP_INTC_START, },
55 { .irq = INT_34XX_L3_APP_IRQ }, 56 { .irq = 10 + OMAP_INTC_START, },
56 { .irq = -1 } 57 { .irq = -1 },
57}; 58};
58 59
59static struct omap_hwmod omap3xxx_l3_main_hwmod = { 60static struct omap_hwmod omap3xxx_l3_main_hwmod = {
@@ -92,8 +93,14 @@ static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
92}; 93};
93 94
94/* MPU */ 95/* MPU */
96static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
97 { .name = "pmu", .irq = 3 },
98 { .irq = -1 }
99};
100
95static struct omap_hwmod omap3xxx_mpu_hwmod = { 101static struct omap_hwmod omap3xxx_mpu_hwmod = {
96 .name = "mpu", 102 .name = "mpu",
103 .mpu_irqs = omap3xxx_mpu_irqs,
97 .class = &mpu_hwmod_class, 104 .class = &mpu_hwmod_class,
98 .main_clk = "arm_fck", 105 .main_clk = "arm_fck",
99}; 106};
@@ -123,6 +130,24 @@ static struct omap_hwmod omap3xxx_iva_hwmod = {
123 }, 130 },
124}; 131};
125 132
133/*
134 * 'debugss' class
135 * debug and emulation sub system
136 */
137
138static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
139 .name = "debugss",
140};
141
142/* debugss */
143static struct omap_hwmod omap3xxx_debugss_hwmod = {
144 .name = "debugss",
145 .class = &omap3xxx_debugss_hwmod_class,
146 .clkdm_name = "emu_clkdm",
147 .main_clk = "emu_src_ck",
148 .flags = HWMOD_NO_IDLEST,
149};
150
126/* timer class */ 151/* timer class */
127static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { 152static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
128 .rev_offs = 0x0000, 153 .rev_offs = 0x0000,
@@ -170,6 +195,16 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
170 .timer_capability = OMAP_TIMER_HAS_PWM, 195 .timer_capability = OMAP_TIMER_HAS_PWM,
171}; 196};
172 197
198/* timers with DSP interrupt dev attribute */
199static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
200 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
201};
202
203/* pwm timers with DSP interrupt dev attribute */
204static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
205 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
206};
207
173/* timer1 */ 208/* timer1 */
174static struct omap_hwmod omap3xxx_timer1_hwmod = { 209static struct omap_hwmod omap3xxx_timer1_hwmod = {
175 .name = "timer1", 210 .name = "timer1",
@@ -253,6 +288,7 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = {
253 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT, 288 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
254 }, 289 },
255 }, 290 },
291 .dev_attr = &capability_dsp_dev_attr,
256 .class = &omap3xxx_timer_hwmod_class, 292 .class = &omap3xxx_timer_hwmod_class,
257}; 293};
258 294
@@ -270,6 +306,7 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = {
270 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT, 306 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
271 }, 307 },
272 }, 308 },
309 .dev_attr = &capability_dsp_dev_attr,
273 .class = &omap3xxx_timer_hwmod_class, 310 .class = &omap3xxx_timer_hwmod_class,
274}; 311};
275 312
@@ -287,6 +324,7 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = {
287 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT, 324 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
288 }, 325 },
289 }, 326 },
327 .dev_attr = &capability_dsp_dev_attr,
290 .class = &omap3xxx_timer_hwmod_class, 328 .class = &omap3xxx_timer_hwmod_class,
291}; 329};
292 330
@@ -304,7 +342,7 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = {
304 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT, 342 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
305 }, 343 },
306 }, 344 },
307 .dev_attr = &capability_pwm_dev_attr, 345 .dev_attr = &capability_dsp_pwm_dev_attr,
308 .class = &omap3xxx_timer_hwmod_class, 346 .class = &omap3xxx_timer_hwmod_class,
309}; 347};
310 348
@@ -364,8 +402,8 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
364 402
365/* timer12 */ 403/* timer12 */
366static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { 404static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
367 { .irq = 95, }, 405 { .irq = 95 + OMAP_INTC_START, },
368 { .irq = -1 } 406 { .irq = -1 },
369}; 407};
370 408
371static struct omap_hwmod omap3xxx_timer12_hwmod = { 409static struct omap_hwmod omap3xxx_timer12_hwmod = {
@@ -499,8 +537,8 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
499 537
500/* UART4 */ 538/* UART4 */
501static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { 539static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
502 { .irq = INT_36XX_UART4_IRQ, }, 540 { .irq = 80 + OMAP_INTC_START, },
503 { .irq = -1 } 541 { .irq = -1 },
504}; 542};
505 543
506static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { 544static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
@@ -527,8 +565,8 @@ static struct omap_hwmod omap36xx_uart4_hwmod = {
527}; 565};
528 566
529static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = { 567static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
530 { .irq = INT_35XX_UART4_IRQ, }, 568 { .irq = 84 + OMAP_INTC_START, },
531 { .irq = -1 } 569 { .irq = -1 },
532}; 570};
533 571
534static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { 572static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
@@ -683,8 +721,8 @@ static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
683}; 721};
684 722
685static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { 723static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
686 { .irq = 25 }, 724 { .irq = 25 + OMAP_INTC_START, },
687 { .irq = -1 } 725 { .irq = -1 },
688}; 726};
689 727
690/* dss_dsi1 */ 728/* dss_dsi1 */
@@ -813,8 +851,8 @@ static struct omap_i2c_dev_attr i2c3_dev_attr = {
813}; 851};
814 852
815static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { 853static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
816 { .irq = INT_34XX_I2C3_IRQ, }, 854 { .irq = 61 + OMAP_INTC_START, },
817 { .irq = -1 } 855 { .irq = -1 },
818}; 856};
819 857
820static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { 858static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
@@ -972,8 +1010,8 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = {
972 1010
973/* gpio5 */ 1011/* gpio5 */
974static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = { 1012static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
975 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */ 1013 { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
976 { .irq = -1 } 1014 { .irq = -1 },
977}; 1015};
978 1016
979static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { 1017static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
@@ -1002,8 +1040,8 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
1002 1040
1003/* gpio6 */ 1041/* gpio6 */
1004static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = { 1042static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
1005 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */ 1043 { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
1006 { .irq = -1 } 1044 { .irq = -1 },
1007}; 1045};
1008 1046
1009static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { 1047static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
@@ -1107,10 +1145,10 @@ static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1107 1145
1108/* mcbsp1 */ 1146/* mcbsp1 */
1109static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { 1147static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
1110 { .name = "common", .irq = 16 }, 1148 { .name = "common", .irq = 16 + OMAP_INTC_START, },
1111 { .name = "tx", .irq = 59 }, 1149 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
1112 { .name = "rx", .irq = 60 }, 1150 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
1113 { .irq = -1 } 1151 { .irq = -1 },
1114}; 1152};
1115 1153
1116static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { 1154static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
@@ -1134,10 +1172,10 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1134 1172
1135/* mcbsp2 */ 1173/* mcbsp2 */
1136static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { 1174static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
1137 { .name = "common", .irq = 17 }, 1175 { .name = "common", .irq = 17 + OMAP_INTC_START, },
1138 { .name = "tx", .irq = 62 }, 1176 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
1139 { .name = "rx", .irq = 63 }, 1177 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
1140 { .irq = -1 } 1178 { .irq = -1 },
1141}; 1179};
1142 1180
1143static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { 1181static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
@@ -1166,10 +1204,10 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1166 1204
1167/* mcbsp3 */ 1205/* mcbsp3 */
1168static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { 1206static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
1169 { .name = "common", .irq = 22 }, 1207 { .name = "common", .irq = 22 + OMAP_INTC_START, },
1170 { .name = "tx", .irq = 89 }, 1208 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
1171 { .name = "rx", .irq = 90 }, 1209 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
1172 { .irq = -1 } 1210 { .irq = -1 },
1173}; 1211};
1174 1212
1175static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { 1213static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
@@ -1198,10 +1236,10 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1198 1236
1199/* mcbsp4 */ 1237/* mcbsp4 */
1200static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { 1238static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
1201 { .name = "common", .irq = 23 }, 1239 { .name = "common", .irq = 23 + OMAP_INTC_START, },
1202 { .name = "tx", .irq = 54 }, 1240 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
1203 { .name = "rx", .irq = 55 }, 1241 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
1204 { .irq = -1 } 1242 { .irq = -1 },
1205}; 1243};
1206 1244
1207static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { 1245static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
@@ -1231,10 +1269,10 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1231 1269
1232/* mcbsp5 */ 1270/* mcbsp5 */
1233static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { 1271static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
1234 { .name = "common", .irq = 27 }, 1272 { .name = "common", .irq = 27 + OMAP_INTC_START, },
1235 { .name = "tx", .irq = 81 }, 1273 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
1236 { .name = "rx", .irq = 82 }, 1274 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
1237 { .irq = -1 } 1275 { .irq = -1 },
1238}; 1276};
1239 1277
1240static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { 1278static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
@@ -1276,8 +1314,8 @@ static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1276 1314
1277/* mcbsp2_sidetone */ 1315/* mcbsp2_sidetone */
1278static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { 1316static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
1279 { .name = "irq", .irq = 4 }, 1317 { .name = "irq", .irq = 4 + OMAP_INTC_START, },
1280 { .irq = -1 } 1318 { .irq = -1 },
1281}; 1319};
1282 1320
1283static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { 1321static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
@@ -1298,8 +1336,8 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1298 1336
1299/* mcbsp3_sidetone */ 1337/* mcbsp3_sidetone */
1300static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { 1338static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
1301 { .name = "irq", .irq = 5 }, 1339 { .name = "irq", .irq = 5 + OMAP_INTC_START, },
1302 { .irq = -1 } 1340 { .irq = -1 },
1303}; 1341};
1304 1342
1305static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { 1343static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
@@ -1361,8 +1399,8 @@ static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1361}; 1399};
1362 1400
1363static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = { 1401static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
1364 { .irq = 18 }, 1402 { .irq = 18 + OMAP_INTC_START, },
1365 { .irq = -1 } 1403 { .irq = -1 },
1366}; 1404};
1367 1405
1368static struct omap_hwmod omap34xx_sr1_hwmod = { 1406static struct omap_hwmod omap34xx_sr1_hwmod = {
@@ -1406,8 +1444,8 @@ static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1406}; 1444};
1407 1445
1408static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = { 1446static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
1409 { .irq = 19 }, 1447 { .irq = 19 + OMAP_INTC_START, },
1410 { .irq = -1 } 1448 { .irq = -1 },
1411}; 1449};
1412 1450
1413static struct omap_hwmod omap34xx_sr2_hwmod = { 1451static struct omap_hwmod omap34xx_sr2_hwmod = {
@@ -1467,8 +1505,8 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1467}; 1505};
1468 1506
1469static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { 1507static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
1470 { .irq = 26 }, 1508 { .irq = 26 + OMAP_INTC_START, },
1471 { .irq = -1 } 1509 { .irq = -1 },
1472}; 1510};
1473 1511
1474static struct omap_hwmod omap3xxx_mailbox_hwmod = { 1512static struct omap_hwmod omap3xxx_mailbox_hwmod = {
@@ -1558,8 +1596,8 @@ static struct omap_hwmod omap34xx_mcspi2 = {
1558 1596
1559/* mcspi3 */ 1597/* mcspi3 */
1560static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { 1598static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
1561 { .name = "irq", .irq = 91 }, /* 91 */ 1599 { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
1562 { .irq = -1 } 1600 { .irq = -1 },
1563}; 1601};
1564 1602
1565static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { 1603static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
@@ -1594,8 +1632,8 @@ static struct omap_hwmod omap34xx_mcspi3 = {
1594 1632
1595/* mcspi4 */ 1633/* mcspi4 */
1596static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { 1634static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
1597 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ 1635 { .name = "irq", .irq = 48 + OMAP_INTC_START, },
1598 { .irq = -1 } 1636 { .irq = -1 },
1599}; 1637};
1600 1638
1601static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { 1639static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
@@ -1647,9 +1685,9 @@ static struct omap_hwmod_class usbotg_class = {
1647/* usb_otg_hs */ 1685/* usb_otg_hs */
1648static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { 1686static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1649 1687
1650 { .name = "mc", .irq = 92 }, 1688 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
1651 { .name = "dma", .irq = 93 }, 1689 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
1652 { .irq = -1 } 1690 { .irq = -1 },
1653}; 1691};
1654 1692
1655static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { 1693static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
@@ -1679,8 +1717,8 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1679 1717
1680/* usb_otg_hs */ 1718/* usb_otg_hs */
1681static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { 1719static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
1682 { .name = "mc", .irq = 71 }, 1720 { .name = "mc", .irq = 71 + OMAP_INTC_START, },
1683 { .irq = -1 } 1721 { .irq = -1 },
1684}; 1722};
1685 1723
1686static struct omap_hwmod_class am35xx_usbotg_class = { 1724static struct omap_hwmod_class am35xx_usbotg_class = {
@@ -1715,8 +1753,8 @@ static struct omap_hwmod_class omap34xx_mmc_class = {
1715/* MMC/SD/SDIO1 */ 1753/* MMC/SD/SDIO1 */
1716 1754
1717static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { 1755static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
1718 { .irq = 83, }, 1756 { .irq = 83 + OMAP_INTC_START, },
1719 { .irq = -1 } 1757 { .irq = -1 },
1720}; 1758};
1721 1759
1722static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { 1760static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
@@ -1782,8 +1820,8 @@ static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1782/* MMC/SD/SDIO2 */ 1820/* MMC/SD/SDIO2 */
1783 1821
1784static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { 1822static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
1785 { .irq = INT_24XX_MMC2_IRQ, }, 1823 { .irq = 86 + OMAP_INTC_START, },
1786 { .irq = -1 } 1824 { .irq = -1 },
1787}; 1825};
1788 1826
1789static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { 1827static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
@@ -1843,8 +1881,8 @@ static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1843/* MMC/SD/SDIO3 */ 1881/* MMC/SD/SDIO3 */
1844 1882
1845static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { 1883static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
1846 { .irq = 94, }, 1884 { .irq = 94 + OMAP_INTC_START, },
1847 { .irq = -1 } 1885 { .irq = -1 },
1848}; 1886};
1849 1887
1850static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { 1888static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
@@ -1902,9 +1940,9 @@ static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1902}; 1940};
1903 1941
1904static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = { 1942static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
1905 { .name = "ohci-irq", .irq = 76 }, 1943 { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
1906 { .name = "ehci-irq", .irq = 77 }, 1944 { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
1907 { .irq = -1 } 1945 { .irq = -1 },
1908}; 1946};
1909 1947
1910static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { 1948static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
@@ -1996,8 +2034,8 @@ static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1996}; 2034};
1997 2035
1998static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = { 2036static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
1999 { .name = "tll-irq", .irq = 78 }, 2037 { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
2000 { .irq = -1 } 2038 { .irq = -1 },
2001}; 2039};
2002 2040
2003static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { 2041static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
@@ -2033,6 +2071,33 @@ static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
2033 .class = &omap2_hdq1w_class, 2071 .class = &omap2_hdq1w_class,
2034}; 2072};
2035 2073
2074/* SAD2D */
2075static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
2076 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
2077 { .name = "rst_modem_sw", .rst_shift = 1 },
2078};
2079
2080static struct omap_hwmod_class omap3xxx_sad2d_class = {
2081 .name = "sad2d",
2082};
2083
2084static struct omap_hwmod omap3xxx_sad2d_hwmod = {
2085 .name = "sad2d",
2086 .rst_lines = omap3xxx_sad2d_resets,
2087 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
2088 .main_clk = "sad2d_ick",
2089 .prcm = {
2090 .omap2 = {
2091 .module_offs = CORE_MOD,
2092 .prcm_reg_id = 1,
2093 .module_bit = OMAP3430_EN_SAD2D_SHIFT,
2094 .idlest_reg_id = 1,
2095 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
2096 },
2097 },
2098 .class = &omap3xxx_sad2d_class,
2099};
2100
2036/* 2101/*
2037 * '32K sync counter' class 2102 * '32K sync counter' class
2038 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock 2103 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
@@ -2068,6 +2133,49 @@ static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2068}; 2133};
2069 2134
2070/* 2135/*
2136 * 'gpmc' class
2137 * general purpose memory controller
2138 */
2139
2140static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
2141 .rev_offs = 0x0000,
2142 .sysc_offs = 0x0010,
2143 .syss_offs = 0x0014,
2144 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
2145 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2146 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2147 .sysc_fields = &omap_hwmod_sysc_type1,
2148};
2149
2150static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
2151 .name = "gpmc",
2152 .sysc = &omap3xxx_gpmc_sysc,
2153};
2154
2155static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = {
2156 { .irq = 20 },
2157 { .irq = -1 }
2158};
2159
2160static struct omap_hwmod omap3xxx_gpmc_hwmod = {
2161 .name = "gpmc",
2162 .class = &omap3xxx_gpmc_hwmod_class,
2163 .clkdm_name = "core_l3_clkdm",
2164 .mpu_irqs = omap3xxx_gpmc_irqs,
2165 .main_clk = "gpmc_fck",
2166 /*
2167 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
2168 * block. It is not being added due to any known bugs with
2169 * resetting the GPMC IP block, but rather because any timings
2170 * set by the bootloader are not being correctly programmed by
2171 * the kernel from the board file or DT data.
2172 * HWMOD_INIT_NO_RESET should be removed ASAP.
2173 */
2174 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
2175 HWMOD_NO_IDLEST),
2176};
2177
2178/*
2071 * interfaces 2179 * interfaces
2072 */ 2180 */
2073 2181
@@ -2102,6 +2210,23 @@ static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
2102 .user = OCP_USER_MPU, 2210 .user = OCP_USER_MPU,
2103}; 2211};
2104 2212
2213static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = {
2214 {
2215 .pa_start = 0x54000000,
2216 .pa_end = 0x547fffff,
2217 .flags = ADDR_TYPE_RT,
2218 },
2219 { }
2220};
2221
2222/* l3 -> debugss */
2223static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
2224 .master = &omap3xxx_l3_main_hwmod,
2225 .slave = &omap3xxx_debugss_hwmod,
2226 .addr = omap3xxx_l4_emu_addrs,
2227 .user = OCP_USER_MPU,
2228};
2229
2105/* DSS -> l3 */ 2230/* DSS -> l3 */
2106static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = { 2231static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2107 .master = &omap3430es1_dss_core_hwmod, 2232 .master = &omap3430es1_dss_core_hwmod,
@@ -2137,6 +2262,14 @@ static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2137 .user = OCP_USER_MPU, 2262 .user = OCP_USER_MPU,
2138}; 2263};
2139 2264
2265/* l3_core -> sad2d interface */
2266static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
2267 .master = &omap3xxx_sad2d_hwmod,
2268 .slave = &omap3xxx_l3_main_hwmod,
2269 .clk = "core_l3_ick",
2270 .user = OCP_USER_MPU,
2271};
2272
2140/* L4_CORE -> L4_WKUP interface */ 2273/* L4_CORE -> L4_WKUP interface */
2141static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { 2274static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2142 .master = &omap3xxx_l4_core_hwmod, 2275 .master = &omap3xxx_l4_core_hwmod,
@@ -2823,6 +2956,122 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2823 .user = OCP_USER_MPU | OCP_USER_SDMA, 2956 .user = OCP_USER_MPU | OCP_USER_SDMA,
2824}; 2957};
2825 2958
2959/*
2960 * 'mmu' class
2961 * The memory management unit performs virtual to physical address translation
2962 * for its requestors.
2963 */
2964
2965static struct omap_hwmod_class_sysconfig mmu_sysc = {
2966 .rev_offs = 0x000,
2967 .sysc_offs = 0x010,
2968 .syss_offs = 0x014,
2969 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2970 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2971 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2972 .sysc_fields = &omap_hwmod_sysc_type1,
2973};
2974
2975static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2976 .name = "mmu",
2977 .sysc = &mmu_sysc,
2978};
2979
2980/* mmu isp */
2981
2982static struct omap_mmu_dev_attr mmu_isp_dev_attr = {
2983 .da_start = 0x0,
2984 .da_end = 0xfffff000,
2985 .nr_tlb_entries = 8,
2986};
2987
2988static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
2989static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = {
2990 { .irq = 24 },
2991 { .irq = -1 }
2992};
2993
2994static struct omap_hwmod_addr_space omap3xxx_mmu_isp_addrs[] = {
2995 {
2996 .pa_start = 0x480bd400,
2997 .pa_end = 0x480bd47f,
2998 .flags = ADDR_TYPE_RT,
2999 },
3000 { }
3001};
3002
3003/* l4_core -> mmu isp */
3004static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
3005 .master = &omap3xxx_l4_core_hwmod,
3006 .slave = &omap3xxx_mmu_isp_hwmod,
3007 .addr = omap3xxx_mmu_isp_addrs,
3008 .user = OCP_USER_MPU | OCP_USER_SDMA,
3009};
3010
3011static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
3012 .name = "mmu_isp",
3013 .class = &omap3xxx_mmu_hwmod_class,
3014 .mpu_irqs = omap3xxx_mmu_isp_irqs,
3015 .main_clk = "cam_ick",
3016 .dev_attr = &mmu_isp_dev_attr,
3017 .flags = HWMOD_NO_IDLEST,
3018};
3019
3020#ifdef CONFIG_OMAP_IOMMU_IVA2
3021
3022/* mmu iva */
3023
3024static struct omap_mmu_dev_attr mmu_iva_dev_attr = {
3025 .da_start = 0x11000000,
3026 .da_end = 0xfffff000,
3027 .nr_tlb_entries = 32,
3028};
3029
3030static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
3031static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = {
3032 { .irq = 28 },
3033 { .irq = -1 }
3034};
3035
3036static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
3037 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
3038};
3039
3040static struct omap_hwmod_addr_space omap3xxx_mmu_iva_addrs[] = {
3041 {
3042 .pa_start = 0x5d000000,
3043 .pa_end = 0x5d00007f,
3044 .flags = ADDR_TYPE_RT,
3045 },
3046 { }
3047};
3048
3049/* l3_main -> iva mmu */
3050static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
3051 .master = &omap3xxx_l3_main_hwmod,
3052 .slave = &omap3xxx_mmu_iva_hwmod,
3053 .addr = omap3xxx_mmu_iva_addrs,
3054 .user = OCP_USER_MPU | OCP_USER_SDMA,
3055};
3056
3057static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
3058 .name = "mmu_iva",
3059 .class = &omap3xxx_mmu_hwmod_class,
3060 .mpu_irqs = omap3xxx_mmu_iva_irqs,
3061 .rst_lines = omap3xxx_mmu_iva_resets,
3062 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
3063 .main_clk = "iva2_ck",
3064 .prcm = {
3065 .omap2 = {
3066 .module_offs = OMAP3430_IVA2_MOD,
3067 },
3068 },
3069 .dev_attr = &mmu_iva_dev_attr,
3070 .flags = HWMOD_NO_IDLEST,
3071};
3072
3073#endif
3074
2826/* l4_per -> gpio4 */ 3075/* l4_per -> gpio4 */
2827static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { 3076static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2828 { 3077 {
@@ -3168,6 +3417,15 @@ static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3168 { } 3417 { }
3169}; 3418};
3170 3419
3420static struct omap_hwmod_addr_space omap3xxx_gpmc_addrs[] = {
3421 {
3422 .pa_start = 0x6e000000,
3423 .pa_end = 0x6e000fff,
3424 .flags = ADDR_TYPE_RT
3425 },
3426 { }
3427};
3428
3171static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = { 3429static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3172 .master = &omap3xxx_l4_wkup_hwmod, 3430 .master = &omap3xxx_l4_wkup_hwmod,
3173 .slave = &omap3xxx_counter_32k_hwmod, 3431 .slave = &omap3xxx_counter_32k_hwmod,
@@ -3223,11 +3481,11 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
3223}; 3481};
3224 3482
3225static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = { 3483static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
3226 { .name = "rxthresh", .irq = INT_35XX_EMAC_C0_RXTHRESH_IRQ }, 3484 { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
3227 { .name = "rx_pulse", .irq = INT_35XX_EMAC_C0_RX_PULSE_IRQ }, 3485 { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
3228 { .name = "tx_pulse", .irq = INT_35XX_EMAC_C0_TX_PULSE_IRQ }, 3486 { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
3229 { .name = "misc_pulse", .irq = INT_35XX_EMAC_C0_MISC_PULSE_IRQ }, 3487 { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
3230 { .irq = -1 } 3488 { .irq = -1 },
3231}; 3489};
3232 3490
3233static struct omap_hwmod_class am35xx_emac_class = { 3491static struct omap_hwmod_class am35xx_emac_class = {
@@ -3277,10 +3535,19 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
3277 .user = OCP_USER_MPU, 3535 .user = OCP_USER_MPU,
3278}; 3536};
3279 3537
3538static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
3539 .master = &omap3xxx_l3_main_hwmod,
3540 .slave = &omap3xxx_gpmc_hwmod,
3541 .clk = "core_l3_ick",
3542 .addr = omap3xxx_gpmc_addrs,
3543 .user = OCP_USER_MPU | OCP_USER_SDMA,
3544};
3545
3280static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { 3546static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3281 &omap3xxx_l3_main__l4_core, 3547 &omap3xxx_l3_main__l4_core,
3282 &omap3xxx_l3_main__l4_per, 3548 &omap3xxx_l3_main__l4_per,
3283 &omap3xxx_mpu__l3_main, 3549 &omap3xxx_mpu__l3_main,
3550 &omap3xxx_l3_main__l4_debugss,
3284 &omap3xxx_l4_core__l4_wkup, 3551 &omap3xxx_l4_core__l4_wkup,
3285 &omap3xxx_l4_core__mmc3, 3552 &omap3xxx_l4_core__mmc3,
3286 &omap3_l4_core__uart1, 3553 &omap3_l4_core__uart1,
@@ -3322,6 +3589,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3322 &omap34xx_l4_core__mcspi3, 3589 &omap34xx_l4_core__mcspi3,
3323 &omap34xx_l4_core__mcspi4, 3590 &omap34xx_l4_core__mcspi4,
3324 &omap3xxx_l4_wkup__counter_32k, 3591 &omap3xxx_l4_wkup__counter_32k,
3592 &omap3xxx_l3_main__gpmc,
3325 NULL, 3593 NULL,
3326}; 3594};
3327 3595
@@ -3371,6 +3639,11 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3371 &omap34xx_l4_core__sr2, 3639 &omap34xx_l4_core__sr2,
3372 &omap3xxx_l4_core__mailbox, 3640 &omap3xxx_l4_core__mailbox,
3373 &omap3xxx_l4_core__hdq1w, 3641 &omap3xxx_l4_core__hdq1w,
3642 &omap3xxx_sad2d__l3,
3643 &omap3xxx_l4_core__mmu_isp,
3644#ifdef CONFIG_OMAP_IOMMU_IVA2
3645 &omap3xxx_l3_main__mmu_iva,
3646#endif
3374 NULL 3647 NULL
3375}; 3648};
3376 3649
@@ -3391,6 +3664,11 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3391 &omap3xxx_l4_core__es3plus_mmc1, 3664 &omap3xxx_l4_core__es3plus_mmc1,
3392 &omap3xxx_l4_core__es3plus_mmc2, 3665 &omap3xxx_l4_core__es3plus_mmc2,
3393 &omap3xxx_l4_core__hdq1w, 3666 &omap3xxx_l4_core__hdq1w,
3667 &omap3xxx_sad2d__l3,
3668 &omap3xxx_l4_core__mmu_isp,
3669#ifdef CONFIG_OMAP_IOMMU_IVA2
3670 &omap3xxx_l3_main__mmu_iva,
3671#endif
3394 NULL 3672 NULL
3395}; 3673};
3396 3674
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index afb60917a948..e6b8d02d0b0e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -19,18 +19,18 @@
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 <plat/mcspi.h>
30#include <plat/mcbsp.h> 29#include <plat/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>
33#include <plat/iommu.h>
34 34
35#include "omap_hwmod_common_data.h" 35#include "omap_hwmod_common_data.h"
36#include "cm1_44xx.h" 36#include "cm1_44xx.h"
@@ -203,6 +203,9 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = {
203 .prcm = { 203 .prcm = {
204 .omap4 = { 204 .omap4 = {
205 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, 205 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
206 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
207 .lostcontext_mask = OMAP4430_LOSTMEM_AESSMEM_MASK,
208 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
206 }, 209 },
207 }, 210 },
208}; 211};
@@ -259,6 +262,11 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
259 .name = "mpu_private", 262 .name = "mpu_private",
260 .class = &omap44xx_mpu_bus_hwmod_class, 263 .class = &omap44xx_mpu_bus_hwmod_class,
261 .clkdm_name = "mpuss_clkdm", 264 .clkdm_name = "mpuss_clkdm",
265 .prcm = {
266 .omap4 = {
267 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
268 },
269 },
262}; 270};
263 271
264/* 272/*
@@ -343,6 +351,7 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
343 .omap4 = { 351 .omap4 = {
344 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET, 352 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
345 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET, 353 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
354 .lostcontext_mask = OMAP4430_LOSTCONTEXT_DFF_MASK,
346 .modulemode = MODULEMODE_SWCTRL, 355 .modulemode = MODULEMODE_SWCTRL,
347 }, 356 },
348 }, 357 },
@@ -447,6 +456,11 @@ static struct omap_hwmod omap44xx_ctrl_module_core_hwmod = {
447 .class = &omap44xx_ctrl_module_hwmod_class, 456 .class = &omap44xx_ctrl_module_hwmod_class,
448 .clkdm_name = "l4_cfg_clkdm", 457 .clkdm_name = "l4_cfg_clkdm",
449 .mpu_irqs = omap44xx_ctrl_module_core_irqs, 458 .mpu_irqs = omap44xx_ctrl_module_core_irqs,
459 .prcm = {
460 .omap4 = {
461 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
462 },
463 },
450}; 464};
451 465
452/* ctrl_module_pad_core */ 466/* ctrl_module_pad_core */
@@ -454,6 +468,11 @@ static struct omap_hwmod omap44xx_ctrl_module_pad_core_hwmod = {
454 .name = "ctrl_module_pad_core", 468 .name = "ctrl_module_pad_core",
455 .class = &omap44xx_ctrl_module_hwmod_class, 469 .class = &omap44xx_ctrl_module_hwmod_class,
456 .clkdm_name = "l4_cfg_clkdm", 470 .clkdm_name = "l4_cfg_clkdm",
471 .prcm = {
472 .omap4 = {
473 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
474 },
475 },
457}; 476};
458 477
459/* ctrl_module_wkup */ 478/* ctrl_module_wkup */
@@ -461,6 +480,11 @@ static struct omap_hwmod omap44xx_ctrl_module_wkup_hwmod = {
461 .name = "ctrl_module_wkup", 480 .name = "ctrl_module_wkup",
462 .class = &omap44xx_ctrl_module_hwmod_class, 481 .class = &omap44xx_ctrl_module_hwmod_class,
463 .clkdm_name = "l4_wkup_clkdm", 482 .clkdm_name = "l4_wkup_clkdm",
483 .prcm = {
484 .omap4 = {
485 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
486 },
487 },
464}; 488};
465 489
466/* ctrl_module_pad_wkup */ 490/* ctrl_module_pad_wkup */
@@ -468,6 +492,11 @@ static struct omap_hwmod omap44xx_ctrl_module_pad_wkup_hwmod = {
468 .name = "ctrl_module_pad_wkup", 492 .name = "ctrl_module_pad_wkup",
469 .class = &omap44xx_ctrl_module_hwmod_class, 493 .class = &omap44xx_ctrl_module_hwmod_class,
470 .clkdm_name = "l4_wkup_clkdm", 494 .clkdm_name = "l4_wkup_clkdm",
495 .prcm = {
496 .omap4 = {
497 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
498 },
499 },
471}; 500};
472 501
473/* 502/*
@@ -612,7 +641,6 @@ static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
612 641
613static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { 642static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
614 { .name = "dsp", .rst_shift = 0 }, 643 { .name = "dsp", .rst_shift = 0 },
615 { .name = "mmu_cache", .rst_shift = 1 },
616}; 644};
617 645
618static struct omap_hwmod omap44xx_dsp_hwmod = { 646static struct omap_hwmod omap44xx_dsp_hwmod = {
@@ -1324,6 +1352,14 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
1324 .name = "gpmc", 1352 .name = "gpmc",
1325 .class = &omap44xx_gpmc_hwmod_class, 1353 .class = &omap44xx_gpmc_hwmod_class,
1326 .clkdm_name = "l3_2_clkdm", 1354 .clkdm_name = "l3_2_clkdm",
1355 /*
1356 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
1357 * block. It is not being added due to any known bugs with
1358 * resetting the GPMC IP block, but rather because any timings
1359 * set by the bootloader are not being correctly programmed by
1360 * the kernel from the board file or DT data.
1361 * HWMOD_INIT_NO_RESET should be removed ASAP.
1362 */
1327 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 1363 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1328 .mpu_irqs = omap44xx_gpmc_irqs, 1364 .mpu_irqs = omap44xx_gpmc_irqs,
1329 .sdma_reqs = omap44xx_gpmc_sdma_reqs, 1365 .sdma_reqs = omap44xx_gpmc_sdma_reqs,
@@ -1632,7 +1668,6 @@ static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
1632static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { 1668static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
1633 { .name = "cpu0", .rst_shift = 0 }, 1669 { .name = "cpu0", .rst_shift = 0 },
1634 { .name = "cpu1", .rst_shift = 1 }, 1670 { .name = "cpu1", .rst_shift = 1 },
1635 { .name = "mmu_cache", .rst_shift = 2 },
1636}; 1671};
1637 1672
1638static struct omap_hwmod omap44xx_ipu_hwmod = { 1673static struct omap_hwmod omap44xx_ipu_hwmod = {
@@ -2439,6 +2474,137 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = {
2439}; 2474};
2440 2475
2441/* 2476/*
2477 * 'mmu' class
2478 * The memory management unit performs virtual to physical address translation
2479 * for its requestors.
2480 */
2481
2482static struct omap_hwmod_class_sysconfig mmu_sysc = {
2483 .rev_offs = 0x000,
2484 .sysc_offs = 0x010,
2485 .syss_offs = 0x014,
2486 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2487 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2488 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2489 .sysc_fields = &omap_hwmod_sysc_type1,
2490};
2491
2492static struct omap_hwmod_class omap44xx_mmu_hwmod_class = {
2493 .name = "mmu",
2494 .sysc = &mmu_sysc,
2495};
2496
2497/* mmu ipu */
2498
2499static struct omap_mmu_dev_attr mmu_ipu_dev_attr = {
2500 .da_start = 0x0,
2501 .da_end = 0xfffff000,
2502 .nr_tlb_entries = 32,
2503};
2504
2505static struct omap_hwmod omap44xx_mmu_ipu_hwmod;
2506static struct omap_hwmod_irq_info omap44xx_mmu_ipu_irqs[] = {
2507 { .irq = 100 + OMAP44XX_IRQ_GIC_START, },
2508 { .irq = -1 }
2509};
2510
2511static struct omap_hwmod_rst_info omap44xx_mmu_ipu_resets[] = {
2512 { .name = "mmu_cache", .rst_shift = 2 },
2513};
2514
2515static struct omap_hwmod_addr_space omap44xx_mmu_ipu_addrs[] = {
2516 {
2517 .pa_start = 0x55082000,
2518 .pa_end = 0x550820ff,
2519 .flags = ADDR_TYPE_RT,
2520 },
2521 { }
2522};
2523
2524/* l3_main_2 -> mmu_ipu */
2525static struct omap_hwmod_ocp_if omap44xx_l3_main_2__mmu_ipu = {
2526 .master = &omap44xx_l3_main_2_hwmod,
2527 .slave = &omap44xx_mmu_ipu_hwmod,
2528 .clk = "l3_div_ck",
2529 .addr = omap44xx_mmu_ipu_addrs,
2530 .user = OCP_USER_MPU | OCP_USER_SDMA,
2531};
2532
2533static struct omap_hwmod omap44xx_mmu_ipu_hwmod = {
2534 .name = "mmu_ipu",
2535 .class = &omap44xx_mmu_hwmod_class,
2536 .clkdm_name = "ducati_clkdm",
2537 .mpu_irqs = omap44xx_mmu_ipu_irqs,
2538 .rst_lines = omap44xx_mmu_ipu_resets,
2539 .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_ipu_resets),
2540 .main_clk = "ducati_clk_mux_ck",
2541 .prcm = {
2542 .omap4 = {
2543 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
2544 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2545 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
2546 .modulemode = MODULEMODE_HWCTRL,
2547 },
2548 },
2549 .dev_attr = &mmu_ipu_dev_attr,
2550};
2551
2552/* mmu dsp */
2553
2554static struct omap_mmu_dev_attr mmu_dsp_dev_attr = {
2555 .da_start = 0x0,
2556 .da_end = 0xfffff000,
2557 .nr_tlb_entries = 32,
2558};
2559
2560static struct omap_hwmod omap44xx_mmu_dsp_hwmod;
2561static struct omap_hwmod_irq_info omap44xx_mmu_dsp_irqs[] = {
2562 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
2563 { .irq = -1 }
2564};
2565
2566static struct omap_hwmod_rst_info omap44xx_mmu_dsp_resets[] = {
2567 { .name = "mmu_cache", .rst_shift = 1 },
2568};
2569
2570static struct omap_hwmod_addr_space omap44xx_mmu_dsp_addrs[] = {
2571 {
2572 .pa_start = 0x4a066000,
2573 .pa_end = 0x4a0660ff,
2574 .flags = ADDR_TYPE_RT,
2575 },
2576 { }
2577};
2578
2579/* l4_cfg -> dsp */
2580static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mmu_dsp = {
2581 .master = &omap44xx_l4_cfg_hwmod,
2582 .slave = &omap44xx_mmu_dsp_hwmod,
2583 .clk = "l4_div_ck",
2584 .addr = omap44xx_mmu_dsp_addrs,
2585 .user = OCP_USER_MPU | OCP_USER_SDMA,
2586};
2587
2588static struct omap_hwmod omap44xx_mmu_dsp_hwmod = {
2589 .name = "mmu_dsp",
2590 .class = &omap44xx_mmu_hwmod_class,
2591 .clkdm_name = "tesla_clkdm",
2592 .mpu_irqs = omap44xx_mmu_dsp_irqs,
2593 .rst_lines = omap44xx_mmu_dsp_resets,
2594 .rst_lines_cnt = ARRAY_SIZE(omap44xx_mmu_dsp_resets),
2595 .main_clk = "dpll_iva_m4x2_ck",
2596 .prcm = {
2597 .omap4 = {
2598 .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
2599 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
2600 .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
2601 .modulemode = MODULEMODE_HWCTRL,
2602 },
2603 },
2604 .dev_attr = &mmu_dsp_dev_attr,
2605};
2606
2607/*
2442 * 'mpu' class 2608 * 'mpu' class
2443 * mpu sub-system 2609 * mpu sub-system
2444 */ 2610 */
@@ -2449,6 +2615,8 @@ static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
2449 2615
2450/* mpu */ 2616/* mpu */
2451static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { 2617static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
2618 { .name = "pmu0", .irq = 54 + OMAP44XX_IRQ_GIC_START },
2619 { .name = "pmu1", .irq = 55 + OMAP44XX_IRQ_GIC_START },
2452 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, 2620 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
2453 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, 2621 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
2454 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, 2622 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
@@ -2498,19 +2666,27 @@ static struct omap_hwmod omap44xx_ocmc_ram_hwmod = {
2498 * protocol 2666 * protocol
2499 */ 2667 */
2500 2668
2669static struct omap_hwmod_class_sysconfig omap44xx_ocp2scp_sysc = {
2670 .rev_offs = 0x0000,
2671 .sysc_offs = 0x0010,
2672 .syss_offs = 0x0014,
2673 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
2674 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2675 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2676 .sysc_fields = &omap_hwmod_sysc_type1,
2677};
2678
2501static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { 2679static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = {
2502 .name = "ocp2scp", 2680 .name = "ocp2scp",
2681 .sysc = &omap44xx_ocp2scp_sysc,
2503}; 2682};
2504 2683
2505/* ocp2scp_usb_phy */ 2684/* ocp2scp_usb_phy */
2506static struct omap_hwmod_opt_clk ocp2scp_usb_phy_opt_clks[] = {
2507 { .role = "phy_48m", .clk = "ocp2scp_usb_phy_phy_48m" },
2508};
2509
2510static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { 2685static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2511 .name = "ocp2scp_usb_phy", 2686 .name = "ocp2scp_usb_phy",
2512 .class = &omap44xx_ocp2scp_hwmod_class, 2687 .class = &omap44xx_ocp2scp_hwmod_class,
2513 .clkdm_name = "l3_init_clkdm", 2688 .clkdm_name = "l3_init_clkdm",
2689 .main_clk = "ocp2scp_usb_phy_phy_48m",
2514 .prcm = { 2690 .prcm = {
2515 .omap4 = { 2691 .omap4 = {
2516 .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET, 2692 .clkctrl_offs = OMAP4_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL_OFFSET,
@@ -2518,8 +2694,6 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2518 .modulemode = MODULEMODE_HWCTRL, 2694 .modulemode = MODULEMODE_HWCTRL,
2519 }, 2695 },
2520 }, 2696 },
2521 .opt_clks = ocp2scp_usb_phy_opt_clks,
2522 .opt_clks_cnt = ARRAY_SIZE(ocp2scp_usb_phy_opt_clks),
2523}; 2697};
2524 2698
2525/* 2699/*
@@ -2537,18 +2711,36 @@ static struct omap_hwmod omap44xx_prcm_mpu_hwmod = {
2537 .name = "prcm_mpu", 2711 .name = "prcm_mpu",
2538 .class = &omap44xx_prcm_hwmod_class, 2712 .class = &omap44xx_prcm_hwmod_class,
2539 .clkdm_name = "l4_wkup_clkdm", 2713 .clkdm_name = "l4_wkup_clkdm",
2714 .flags = HWMOD_NO_IDLEST,
2715 .prcm = {
2716 .omap4 = {
2717 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
2718 },
2719 },
2540}; 2720};
2541 2721
2542/* cm_core_aon */ 2722/* cm_core_aon */
2543static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { 2723static struct omap_hwmod omap44xx_cm_core_aon_hwmod = {
2544 .name = "cm_core_aon", 2724 .name = "cm_core_aon",
2545 .class = &omap44xx_prcm_hwmod_class, 2725 .class = &omap44xx_prcm_hwmod_class,
2726 .flags = HWMOD_NO_IDLEST,
2727 .prcm = {
2728 .omap4 = {
2729 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
2730 },
2731 },
2546}; 2732};
2547 2733
2548/* cm_core */ 2734/* cm_core */
2549static struct omap_hwmod omap44xx_cm_core_hwmod = { 2735static struct omap_hwmod omap44xx_cm_core_hwmod = {
2550 .name = "cm_core", 2736 .name = "cm_core",
2551 .class = &omap44xx_prcm_hwmod_class, 2737 .class = &omap44xx_prcm_hwmod_class,
2738 .flags = HWMOD_NO_IDLEST,
2739 .prcm = {
2740 .omap4 = {
2741 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
2742 },
2743 },
2552}; 2744};
2553 2745
2554/* prm */ 2746/* prm */
@@ -2584,6 +2776,11 @@ static struct omap_hwmod omap44xx_scrm_hwmod = {
2584 .name = "scrm", 2776 .name = "scrm",
2585 .class = &omap44xx_scrm_hwmod_class, 2777 .class = &omap44xx_scrm_hwmod_class,
2586 .clkdm_name = "l4_wkup_clkdm", 2778 .clkdm_name = "l4_wkup_clkdm",
2779 .prcm = {
2780 .omap4 = {
2781 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
2782 },
2783 },
2587}; 2784};
2588 2785
2589/* 2786/*
@@ -2902,6 +3099,16 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
2902 .timer_capability = OMAP_TIMER_HAS_PWM, 3099 .timer_capability = OMAP_TIMER_HAS_PWM,
2903}; 3100};
2904 3101
3102/* timers with DSP interrupt dev attribute */
3103static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
3104 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
3105};
3106
3107/* pwm timers with DSP interrupt dev attribute */
3108static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
3109 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
3110};
3111
2905/* timer1 */ 3112/* timer1 */
2906static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { 3113static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
2907 { .irq = 37 + OMAP44XX_IRQ_GIC_START }, 3114 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
@@ -3006,6 +3213,7 @@ static struct omap_hwmod omap44xx_timer5_hwmod = {
3006 .modulemode = MODULEMODE_SWCTRL, 3213 .modulemode = MODULEMODE_SWCTRL,
3007 }, 3214 },
3008 }, 3215 },
3216 .dev_attr = &capability_dsp_dev_attr,
3009}; 3217};
3010 3218
3011/* timer6 */ 3219/* timer6 */
@@ -3028,6 +3236,7 @@ static struct omap_hwmod omap44xx_timer6_hwmod = {
3028 .modulemode = MODULEMODE_SWCTRL, 3236 .modulemode = MODULEMODE_SWCTRL,
3029 }, 3237 },
3030 }, 3238 },
3239 .dev_attr = &capability_dsp_dev_attr,
3031}; 3240};
3032 3241
3033/* timer7 */ 3242/* timer7 */
@@ -3049,6 +3258,7 @@ static struct omap_hwmod omap44xx_timer7_hwmod = {
3049 .modulemode = MODULEMODE_SWCTRL, 3258 .modulemode = MODULEMODE_SWCTRL,
3050 }, 3259 },
3051 }, 3260 },
3261 .dev_attr = &capability_dsp_dev_attr,
3052}; 3262};
3053 3263
3054/* timer8 */ 3264/* timer8 */
@@ -3070,7 +3280,7 @@ static struct omap_hwmod omap44xx_timer8_hwmod = {
3070 .modulemode = MODULEMODE_SWCTRL, 3280 .modulemode = MODULEMODE_SWCTRL,
3071 }, 3281 },
3072 }, 3282 },
3073 .dev_attr = &capability_pwm_dev_attr, 3283 .dev_attr = &capability_dsp_pwm_dev_attr,
3074}; 3284};
3075 3285
3076/* timer9 */ 3286/* timer9 */
@@ -5263,11 +5473,21 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = {
5263 .user = OCP_USER_MPU | OCP_USER_SDMA, 5473 .user = OCP_USER_MPU | OCP_USER_SDMA,
5264}; 5474};
5265 5475
5476static struct omap_hwmod_addr_space omap44xx_ocp2scp_usb_phy_addrs[] = {
5477 {
5478 .pa_start = 0x4a0ad000,
5479 .pa_end = 0x4a0ad01f,
5480 .flags = ADDR_TYPE_RT
5481 },
5482 { }
5483};
5484
5266/* l4_cfg -> ocp2scp_usb_phy */ 5485/* l4_cfg -> ocp2scp_usb_phy */
5267static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = { 5486static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp2scp_usb_phy = {
5268 .master = &omap44xx_l4_cfg_hwmod, 5487 .master = &omap44xx_l4_cfg_hwmod,
5269 .slave = &omap44xx_ocp2scp_usb_phy_hwmod, 5488 .slave = &omap44xx_ocp2scp_usb_phy_hwmod,
5270 .clk = "l4_div_ck", 5489 .clk = "l4_div_ck",
5490 .addr = omap44xx_ocp2scp_usb_phy_addrs,
5271 .user = OCP_USER_MPU | OCP_USER_SDMA, 5491 .user = OCP_USER_MPU | OCP_USER_SDMA,
5272}; 5492};
5273 5493
@@ -5887,7 +6107,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
5887static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { 6107static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5888 { 6108 {
5889 .pa_start = 0x4a0ab000, 6109 .pa_start = 0x4a0ab000,
5890 .pa_end = 0x4a0ab003, 6110 .pa_end = 0x4a0ab7ff,
5891 .flags = ADDR_TYPE_RT 6111 .flags = ADDR_TYPE_RT
5892 }, 6112 },
5893 { } 6113 { }
@@ -6092,6 +6312,8 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
6092 &omap44xx_l4_per__mmc3, 6312 &omap44xx_l4_per__mmc3,
6093 &omap44xx_l4_per__mmc4, 6313 &omap44xx_l4_per__mmc4,
6094 &omap44xx_l4_per__mmc5, 6314 &omap44xx_l4_per__mmc5,
6315 &omap44xx_l3_main_2__mmu_ipu,
6316 &omap44xx_l4_cfg__mmu_dsp,
6095 &omap44xx_l3_main_2__ocmc_ram, 6317 &omap44xx_l3_main_2__ocmc_ram,
6096 &omap44xx_l4_cfg__ocp2scp_usb_phy, 6318 &omap44xx_l4_cfg__ocp2scp_usb_phy,
6097 &omap44xx_mpu_private__prcm_mpu, 6319 &omap44xx_mpu_private__prcm_mpu,
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index e7e8eeae95e5..2bc8f1705d4a 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -2,9 +2,8 @@
2 * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations 2 * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations
3 * 3 *
4 * Copyright (C) 2010-2011 Nokia Corporation 4 * Copyright (C) 2010-2011 Nokia Corporation
5 * Copyright (C) 2010-2012 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 *
7 * Copyright (C) 2010-2011 Texas Instruments, Inc.
8 * Benoît Cousson 7 * Benoît Cousson
9 * 8 *
10 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
@@ -16,6 +15,7 @@
16 15
17#include <plat/omap_hwmod.h> 16#include <plat/omap_hwmod.h>
18 17
18#include "common.h"
19#include "display.h" 19#include "display.h"
20 20
21/* Common address space across OMAP2xxx */ 21/* Common address space across OMAP2xxx */
@@ -76,6 +76,8 @@ extern struct omap_hwmod omap2xxx_gpio4_hwmod;
76extern struct omap_hwmod omap2xxx_mcspi1_hwmod; 76extern struct omap_hwmod omap2xxx_mcspi1_hwmod;
77extern struct omap_hwmod omap2xxx_mcspi2_hwmod; 77extern struct omap_hwmod omap2xxx_mcspi2_hwmod;
78extern struct omap_hwmod omap2xxx_counter_32k_hwmod; 78extern struct omap_hwmod omap2xxx_counter_32k_hwmod;
79extern struct omap_hwmod omap2xxx_gpmc_hwmod;
80extern struct omap_hwmod omap2xxx_rng_hwmod;
79 81
80/* Common interface data across OMAP2xxx */ 82/* Common interface data across OMAP2xxx */
81extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; 83extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core;
@@ -102,6 +104,7 @@ extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss;
102extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc; 104extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc;
103extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi; 105extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi;
104extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc; 106extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc;
107extern struct omap_hwmod_ocp_if omap2xxx_l4_core__rng;
105 108
106/* Common IP block data */ 109/* Common IP block data */
107extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; 110extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
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 d52651a05daa..593eaea35cec 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
34/* OMAP control module register for UTMI PHY */ 36/* OMAP control module register for UTMI PHY */
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..abefbc4d8e0b 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -80,7 +80,8 @@ static void __init omap2_init_processor_devices(void)
80 80
81int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused) 81int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused)
82{ 82{
83 if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) 83 if ((clkdm->flags & CLKDM_CAN_ENABLE_AUTO) &&
84 !(clkdm->flags & CLKDM_MISSING_IDLE_REPORTING))
84 clkdm_allow_idle(clkdm); 85 clkdm_allow_idle(clkdm);
85 else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && 86 else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP &&
86 atomic_read(&clkdm->usecount) == 0) 87 atomic_read(&clkdm->usecount) == 0)
@@ -188,7 +189,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
188 goto exit; 189 goto exit;
189 } 190 }
190 191
191 freq = clk->rate; 192 freq = clk_get_rate(clk);
192 clk_put(clk); 193 clk_put(clk);
193 194
194 rcu_read_lock(); 195 rcu_read_lock();
@@ -203,8 +204,8 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
203 bootup_volt = opp_get_voltage(opp); 204 bootup_volt = opp_get_voltage(opp);
204 rcu_read_unlock(); 205 rcu_read_unlock();
205 if (!bootup_volt) { 206 if (!bootup_volt) {
206 pr_err("%s: unable to find voltage corresponding " 207 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); 208 __func__, vdd_name);
208 goto exit; 209 goto exit;
209 } 210 }
210 211
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/pmu.c b/arch/arm/mach-omap2/pmu.c
new file mode 100644
index 000000000000..2a791766283d
--- /dev/null
+++ b/arch/arm/mach-omap2/pmu.c
@@ -0,0 +1,95 @@
1/*
2 * OMAP2 ARM Performance Monitoring Unit (PMU) Support
3 *
4 * Copyright (C) 2012 Texas Instruments, Inc.
5 *
6 * Contacts:
7 * Jon Hunter <jon-hunter@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 as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14#include <linux/pm_runtime.h>
15
16#include <asm/pmu.h>
17
18#include <plat/omap_hwmod.h>
19#include <plat/omap_device.h>
20
21static char *omap2_pmu_oh_names[] = {"mpu"};
22static char *omap3_pmu_oh_names[] = {"mpu", "debugss"};
23static char *omap4430_pmu_oh_names[] = {"l3_main_3", "l3_instr", "debugss"};
24static struct platform_device *omap_pmu_dev;
25
26/**
27 * omap2_init_pmu - creates and registers PMU platform device
28 * @oh_num: Number of OMAP HWMODs required to create PMU device
29 * @oh_names: Array of OMAP HWMODS names required to create PMU device
30 *
31 * Uses OMAP HWMOD framework to create and register an ARM PMU device
32 * from a list of HWMOD names passed. Currently supports OMAP2, OMAP3
33 * and OMAP4 devices.
34 */
35static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[])
36{
37 int i;
38 struct omap_hwmod *oh[3];
39 char *dev_name = "arm-pmu";
40
41 if ((!oh_num) || (oh_num > 3))
42 return -EINVAL;
43
44 for (i = 0; i < oh_num; i++) {
45 oh[i] = omap_hwmod_lookup(oh_names[i]);
46 if (!oh[i]) {
47 pr_err("Could not look up %s hwmod\n", oh_names[i]);
48 return -ENODEV;
49 }
50 }
51
52 omap_pmu_dev = omap_device_build_ss(dev_name, -1, oh, oh_num, NULL, 0,
53 NULL, 0, 0);
54 WARN(IS_ERR(omap_pmu_dev), "Can't build omap_device for %s.\n",
55 dev_name);
56
57 if (IS_ERR(omap_pmu_dev))
58 return PTR_ERR(omap_pmu_dev);
59
60 pm_runtime_enable(&omap_pmu_dev->dev);
61
62 return 0;
63}
64
65static int __init omap_init_pmu(void)
66{
67 unsigned oh_num;
68 char **oh_names;
69
70 /*
71 * To create an ARM-PMU device the following HWMODs
72 * are required for the various OMAP2+ devices.
73 *
74 * OMAP24xx: mpu
75 * OMAP3xxx: mpu, debugss
76 * OMAP4430: l3_main_3, l3_instr, debugss
77 * OMAP4460/70: mpu, debugss
78 */
79 if (cpu_is_omap443x()) {
80 oh_num = ARRAY_SIZE(omap4430_pmu_oh_names);
81 oh_names = omap4430_pmu_oh_names;
82 /* XXX Remove the next two lines when CTI driver available */
83 pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n");
84 return 0;
85 } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
86 oh_num = ARRAY_SIZE(omap3_pmu_oh_names);
87 oh_names = omap3_pmu_oh_names;
88 } else {
89 oh_num = ARRAY_SIZE(omap2_pmu_oh_names);
90 oh_names = omap2_pmu_oh_names;
91 }
92
93 return omap2_init_pmu(oh_num, oh_names);
94}
95subsys_initcall(omap_init_pmu);
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..aceb4f464c9b 100644
--- a/arch/arm/mach-omap2/powerdomain44xx.c
+++ b/arch/arm/mach-omap2/powerdomain44xx.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP4 powerdomain control 2 * OMAP4 powerdomain control
3 * 3 *
4 * Copyright (C) 2009-2010 Texas Instruments, Inc. 4 * Copyright (C) 2009-2010, 2012 Texas Instruments, Inc.
5 * Copyright (C) 2007-2009 Nokia Corporation 5 * Copyright (C) 2007-2009 Nokia Corporation
6 * 6 *
7 * Derived from mach-omap2/powerdomain.c written by Paul Walmsley 7 * Derived from mach-omap2/powerdomain.c written by Paul Walmsley
@@ -151,6 +151,34 @@ static int omap4_pwrdm_read_logic_retst(struct powerdomain *pwrdm)
151 return v; 151 return v;
152} 152}
153 153
154/**
155 * omap4_pwrdm_read_prev_logic_pwrst - read the previous logic powerstate
156 * @pwrdm: struct powerdomain * to read the state for
157 *
158 * Reads the previous logic powerstate for a powerdomain. This
159 * function must determine the previous logic powerstate by first
160 * checking the previous powerstate for the domain. If that was OFF,
161 * then logic has been lost. If previous state was RETENTION, the
162 * function reads the setting for the next retention logic state to
163 * see the actual value. In every other case, the logic is
164 * retained. Returns either PWRDM_POWER_OFF or PWRDM_POWER_RET
165 * depending whether the logic was retained or not.
166 */
167static int omap4_pwrdm_read_prev_logic_pwrst(struct powerdomain *pwrdm)
168{
169 int state;
170
171 state = omap4_pwrdm_read_prev_pwrst(pwrdm);
172
173 if (state == PWRDM_POWER_OFF)
174 return PWRDM_POWER_OFF;
175
176 if (state != PWRDM_POWER_RET)
177 return PWRDM_POWER_RET;
178
179 return omap4_pwrdm_read_logic_retst(pwrdm);
180}
181
154static int omap4_pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank) 182static int omap4_pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank)
155{ 183{
156 u32 m, v; 184 u32 m, v;
@@ -179,6 +207,35 @@ static int omap4_pwrdm_read_mem_retst(struct powerdomain *pwrdm, u8 bank)
179 return v; 207 return v;
180} 208}
181 209
210/**
211 * omap4_pwrdm_read_prev_mem_pwrst - reads the previous memory powerstate
212 * @pwrdm: struct powerdomain * to read mem powerstate for
213 * @bank: memory bank index
214 *
215 * Reads the previous memory powerstate for a powerdomain. This
216 * function must determine the previous memory powerstate by first
217 * checking the previous powerstate for the domain. If that was OFF,
218 * then logic has been lost. If previous state was RETENTION, the
219 * function reads the setting for the next memory retention state to
220 * see the actual value. In every other case, the logic is
221 * retained. Returns either PWRDM_POWER_OFF or PWRDM_POWER_RET
222 * depending whether logic was retained or not.
223 */
224static int omap4_pwrdm_read_prev_mem_pwrst(struct powerdomain *pwrdm, u8 bank)
225{
226 int state;
227
228 state = omap4_pwrdm_read_prev_pwrst(pwrdm);
229
230 if (state == PWRDM_POWER_OFF)
231 return PWRDM_POWER_OFF;
232
233 if (state != PWRDM_POWER_RET)
234 return PWRDM_POWER_RET;
235
236 return omap4_pwrdm_read_mem_retst(pwrdm, bank);
237}
238
182static int omap4_pwrdm_wait_transition(struct powerdomain *pwrdm) 239static int omap4_pwrdm_wait_transition(struct powerdomain *pwrdm)
183{ 240{
184 u32 c = 0; 241 u32 c = 0;
@@ -198,8 +255,8 @@ static int omap4_pwrdm_wait_transition(struct powerdomain *pwrdm)
198 udelay(1); 255 udelay(1);
199 256
200 if (c > PWRDM_TRANSITION_BAILOUT) { 257 if (c > PWRDM_TRANSITION_BAILOUT) {
201 printk(KERN_ERR "powerdomain: waited too long for " 258 pr_err("powerdomain: %s: waited too long to complete transition\n",
202 "powerdomain %s to complete transition\n", pwrdm->name); 259 pwrdm->name);
203 return -EAGAIN; 260 return -EAGAIN;
204 } 261 }
205 262
@@ -217,9 +274,11 @@ struct pwrdm_ops omap4_pwrdm_operations = {
217 .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst, 274 .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst,
218 .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst, 275 .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst,
219 .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst, 276 .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst,
277 .pwrdm_read_prev_logic_pwrst = omap4_pwrdm_read_prev_logic_pwrst,
220 .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst, 278 .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst,
221 .pwrdm_read_mem_pwrst = omap4_pwrdm_read_mem_pwrst, 279 .pwrdm_read_mem_pwrst = omap4_pwrdm_read_mem_pwrst,
222 .pwrdm_read_mem_retst = omap4_pwrdm_read_mem_retst, 280 .pwrdm_read_mem_retst = omap4_pwrdm_read_mem_retst,
281 .pwrdm_read_prev_mem_pwrst = omap4_pwrdm_read_prev_mem_pwrst,
223 .pwrdm_set_mem_onst = omap4_pwrdm_set_mem_onst, 282 .pwrdm_set_mem_onst = omap4_pwrdm_set_mem_onst,
224 .pwrdm_set_mem_retst = omap4_pwrdm_set_mem_retst, 283 .pwrdm_set_mem_retst = omap4_pwrdm_set_mem_retst,
225 .pwrdm_wait_transition = omap4_pwrdm_wait_transition, 284 .pwrdm_wait_transition = omap4_pwrdm_wait_transition,
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-common.h b/arch/arm/mach-omap2/prcm-common.h
index e5f0503a68b0..72df97482cc0 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -109,6 +109,8 @@
109#define OMAP2430_EN_MDM_INTC_MASK (1 << 11) 109#define OMAP2430_EN_MDM_INTC_MASK (1 << 11)
110#define OMAP2430_EN_USBHS_SHIFT 6 110#define OMAP2430_EN_USBHS_SHIFT 6
111#define OMAP2430_EN_USBHS_MASK (1 << 6) 111#define OMAP2430_EN_USBHS_MASK (1 << 6)
112#define OMAP24XX_EN_GPMC_SHIFT 1
113#define OMAP24XX_EN_GPMC_MASK (1 << 1)
112 114
113/* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */ 115/* CM_IDLEST1_CORE, PM_WKST1_CORE shared bits */
114#define OMAP2420_ST_MMC_SHIFT 26 116#define OMAP2420_ST_MMC_SHIFT 26
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 c1b93c752d70..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"
@@ -81,8 +81,9 @@ static struct omap_uart_port_info omap_serial_default_info[] __initdata = {
81}; 81};
82 82
83#ifdef CONFIG_PM 83#ifdef CONFIG_PM
84static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) 84static void omap_uart_enable_wakeup(struct device *dev, bool enable)
85{ 85{
86 struct platform_device *pdev = to_platform_device(dev);
86 struct omap_device *od = to_omap_device(pdev); 87 struct omap_device *od = to_omap_device(pdev);
87 88
88 if (!od) 89 if (!od)
@@ -99,15 +100,17 @@ static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable)
99 * in Smartidle Mode When Configured for DMA Operations. 100 * in Smartidle Mode When Configured for DMA Operations.
100 * WA: configure uart in force idle mode. 101 * WA: configure uart in force idle mode.
101 */ 102 */
102static void omap_uart_set_noidle(struct platform_device *pdev) 103static void omap_uart_set_noidle(struct device *dev)
103{ 104{
105 struct platform_device *pdev = to_platform_device(dev);
104 struct omap_device *od = to_omap_device(pdev); 106 struct omap_device *od = to_omap_device(pdev);
105 107
106 omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO); 108 omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO);
107} 109}
108 110
109static void omap_uart_set_smartidle(struct platform_device *pdev) 111static void omap_uart_set_smartidle(struct device *dev)
110{ 112{
113 struct platform_device *pdev = to_platform_device(dev);
111 struct omap_device *od = to_omap_device(pdev); 114 struct omap_device *od = to_omap_device(pdev);
112 u8 idlemode; 115 u8 idlemode;
113 116
@@ -120,10 +123,10 @@ static void omap_uart_set_smartidle(struct platform_device *pdev)
120} 123}
121 124
122#else 125#else
123static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) 126static void omap_uart_enable_wakeup(struct device *dev, bool enable)
124{} 127{}
125static void omap_uart_set_noidle(struct platform_device *pdev) {} 128static void omap_uart_set_noidle(struct device *dev) {}
126static void omap_uart_set_smartidle(struct platform_device *pdev) {} 129static void omap_uart_set_smartidle(struct device *dev) {}
127#endif /* CONFIG_PM */ 130#endif /* CONFIG_PM */
128 131
129#ifdef CONFIG_OMAP_MUX 132#ifdef CONFIG_OMAP_MUX
@@ -229,9 +232,8 @@ static int __init omap_serial_early_init(void)
229 232
230 if (console_loglevel >= 10) { 233 if (console_loglevel >= 10) {
231 uart_debug = true; 234 uart_debug = true;
232 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",
233 " uart%d clocks will not be" 236 uart_name, uart->num);
234 " gated", uart_name, uart->num);
235 } 237 }
236 238
237 if (cmdline_find_option("no_console_suspend")) 239 if (cmdline_find_option("no_console_suspend"))
@@ -304,6 +306,9 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
304 omap_up.dma_rx_timeout = info->dma_rx_timeout; 306 omap_up.dma_rx_timeout = info->dma_rx_timeout;
305 omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate; 307 omap_up.dma_rx_poll_rate = info->dma_rx_poll_rate;
306 omap_up.autosuspend_timeout = info->autosuspend_timeout; 308 omap_up.autosuspend_timeout = info->autosuspend_timeout;
309 omap_up.DTR_gpio = info->DTR_gpio;
310 omap_up.DTR_inverted = info->DTR_inverted;
311 omap_up.DTR_present = info->DTR_present;
307 312
308 pdata = &omap_up; 313 pdata = &omap_up;
309 pdata_size = sizeof(struct omap_uart_port_info); 314 pdata_size = sizeof(struct omap_uart_port_info);
@@ -313,8 +318,11 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
313 318
314 pdev = omap_device_build(name, uart->num, oh, pdata, pdata_size, 319 pdev = omap_device_build(name, uart->num, oh, pdata, pdata_size,
315 NULL, 0, false); 320 NULL, 0, false);
316 WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n", 321 if (IS_ERR(pdev)) {
317 name, oh->name); 322 WARN(1, "Could not build omap_device for %s: %s.\n", name,
323 oh->name);
324 return;
325 }
318 326
319 if ((console_uart_id == bdata->id) && no_console_suspend) 327 if ((console_uart_id == bdata->id) && no_console_suspend)
320 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..b7d8ead4b86a 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>
18#include <mach/omap-secure.h> 17#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/plat-omap/include/plat/ti81xx.h b/arch/arm/mach-omap2/ti81xx.h
index 8f9843f78422..8f9843f78422 100644
--- a/arch/arm/plat-omap/include/plat/ti81xx.h
+++ b/arch/arm/mach-omap2/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 db5ff6642375..99be94e94547 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"
@@ -84,7 +85,7 @@ void __init omap4_pmic_init(const char *pmic_type,
84 omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); 85 omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
85 strncpy(omap4_i2c1_board_info[0].type, pmic_type, 86 strncpy(omap4_i2c1_board_info[0].type, pmic_type,
86 sizeof(omap4_i2c1_board_info[0].type)); 87 sizeof(omap4_i2c1_board_info[0].type));
87 omap4_i2c1_board_info[0].irq = OMAP44XX_IRQ_SYS_1N; 88 omap4_i2c1_board_info[0].irq = 7 + OMAP44XX_IRQ_GIC_START;
88 omap4_i2c1_board_info[0].platform_data = pmic_data; 89 omap4_i2c1_board_info[0].platform_data = pmic_data;
89 90
90 /* TWL6040 audio IC part */ 91 /* TWL6040 audio IC part */
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index 8fe71cfd002c..d109c09ef34b 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)
@@ -40,13 +40,13 @@ void omap_pmic_late_init(void);
40static inline void omap2_pmic_init(const char *pmic_type, 40static inline void omap2_pmic_init(const char *pmic_type,
41 struct twl4030_platform_data *pmic_data) 41 struct twl4030_platform_data *pmic_data)
42{ 42{
43 omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); 43 omap_pmic_init(2, 2600, pmic_type, 7 + OMAP_INTC_START, pmic_data);
44} 44}
45 45
46static inline void omap3_pmic_init(const char *pmic_type, 46static inline void omap3_pmic_init(const char *pmic_type,
47 struct twl4030_platform_data *pmic_data) 47 struct twl4030_platform_data *pmic_data)
48{ 48{
49 omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); 49 omap_pmic_init(1, 2600, pmic_type, 7 + OMAP_INTC_START, pmic_data);
50} 50}
51 51
52void omap4_pmic_init(const char *pmic_type, 52void omap4_pmic_init(const char *pmic_type,
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 c4a576856661..89150b2435e5 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 <mach/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/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
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a534d8880de1..1d2e3c6f8b59 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -524,33 +524,12 @@ static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
524}; 524};
525#endif 525#endif
526 526
527#define PRCC_K_SOFTRST_SET 0x18
528#define PRCC_K_SOFTRST_CLEAR 0x1C
529static void ux500_uart0_reset(void)
530{
531 void __iomem *prcc_rst_set, *prcc_rst_clr;
532
533 prcc_rst_set = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE +
534 PRCC_K_SOFTRST_SET);
535 prcc_rst_clr = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE +
536 PRCC_K_SOFTRST_CLEAR);
537
538 /* Activate soft reset PRCC_K_SOFTRST_CLEAR */
539 writel((readl(prcc_rst_clr) | 0x1), prcc_rst_clr);
540 udelay(1);
541
542 /* Release soft reset PRCC_K_SOFTRST_SET */
543 writel((readl(prcc_rst_set) | 0x1), prcc_rst_set);
544 udelay(1);
545}
546
547static struct amba_pl011_data uart0_plat = { 527static struct amba_pl011_data uart0_plat = {
548#ifdef CONFIG_STE_DMA40 528#ifdef CONFIG_STE_DMA40
549 .dma_filter = stedma40_filter, 529 .dma_filter = stedma40_filter,
550 .dma_rx_param = &uart0_dma_cfg_rx, 530 .dma_rx_param = &uart0_dma_cfg_rx,
551 .dma_tx_param = &uart0_dma_cfg_tx, 531 .dma_tx_param = &uart0_dma_cfg_tx,
552#endif 532#endif
553 .reset = ux500_uart0_reset,
554}; 533};
555 534
556static struct amba_pl011_data uart1_plat = { 535static struct amba_pl011_data uart1_plat = {
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index dd36eba9506c..d15a4a6d6146 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -25,6 +25,7 @@ config ARCH_OMAP2PLUS
25 bool "TI OMAP2/3/4" 25 bool "TI OMAP2/3/4"
26 select CLKDEV_LOOKUP 26 select CLKDEV_LOOKUP
27 select GENERIC_IRQ_CHIP 27 select GENERIC_IRQ_CHIP
28 select SPARSE_IRQ
28 select OMAP_DM_TIMER 29 select OMAP_DM_TIMER
29 select USE_OF 30 select USE_OF
30 select PROC_DEVICETREE if PROC_FS 31 select PROC_DEVICETREE if PROC_FS
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 961bf859bc0c..a017e994e006 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -3,8 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ 6obj-y := common.o sram.o clock.o dma.o mux.o fb.o counter_32k.o
7 fb.o counter_32k.o
8obj-m := 7obj-m :=
9obj-n := 8obj-n :=
10obj- := 9obj- :=
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 706b7e29397f..9d7ac20ef8f9 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -312,33 +312,6 @@ void clk_enable_init_clocks(void)
312 } 312 }
313} 313}
314 314
315/**
316 * omap_clk_get_by_name - locate OMAP struct clk by its name
317 * @name: name of the struct clk to locate
318 *
319 * Locate an OMAP struct clk by its name. Assumes that struct clk
320 * names are unique. Returns NULL if not found or a pointer to the
321 * struct clk if found.
322 */
323struct clk *omap_clk_get_by_name(const char *name)
324{
325 struct clk *c;
326 struct clk *ret = NULL;
327
328 mutex_lock(&clocks_mutex);
329
330 list_for_each_entry(c, &clocks, node) {
331 if (!strcmp(c->name, name)) {
332 ret = c;
333 break;
334 }
335 }
336
337 mutex_unlock(&clocks_mutex);
338
339 return ret;
340}
341
342int omap_clk_enable_autoidle_all(void) 315int omap_clk_enable_autoidle_all(void)
343{ 316{
344 struct clk *c; 317 struct clk *c;
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 89a3723b3538..e5778ed689d8 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -17,52 +17,12 @@
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18 18
19#include <plat/common.h> 19#include <plat/common.h>
20#include <plat/board.h>
21#include <plat/vram.h> 20#include <plat/vram.h>
22#include <plat/dsp.h> 21#include <plat/dsp.h>
23#include <plat/dma.h> 22#include <plat/dma.h>
24 23
25#include <plat/omap-secure.h> 24#include <plat/omap-secure.h>
26 25
27
28#define NO_LENGTH_CHECK 0xffffffff
29
30struct omap_board_config_kernel *omap_board_config __initdata;
31int omap_board_config_size;
32
33static const void *__init get_config(u16 tag, size_t len,
34 int skip, size_t *len_out)
35{
36 struct omap_board_config_kernel *kinfo = NULL;
37 int i;
38
39 /* Try to find the config from the board-specific structures
40 * in the kernel. */
41 for (i = 0; i < omap_board_config_size; i++) {
42 if (omap_board_config[i].tag == tag) {
43 if (skip == 0) {
44 kinfo = &omap_board_config[i];
45 break;
46 } else {
47 skip--;
48 }
49 }
50 }
51 if (kinfo == NULL)
52 return NULL;
53 return kinfo->data;
54}
55
56const void *__init __omap_get_config(u16 tag, size_t len, int nr)
57{
58 return get_config(tag, len, nr, NULL);
59}
60
61const void *__init omap_get_var_config(u16 tag, size_t *len)
62{
63 return get_config(tag, NO_LENGTH_CHECK, 0, len);
64}
65
66void __init omap_reserve(void) 26void __init omap_reserve(void)
67{ 27{
68 omap_vram_reserve_sdram_memblock(); 28 omap_vram_reserve_sdram_memblock();
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index dbf1e03029a5..2e826f1faf7b 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -22,10 +22,7 @@
22#include <asm/mach/time.h> 22#include <asm/mach/time.h>
23#include <asm/sched_clock.h> 23#include <asm/sched_clock.h>
24 24
25#include <plat/hardware.h>
26#include <plat/common.h> 25#include <plat/common.h>
27#include <plat/board.h>
28
29#include <plat/clock.h> 26#include <plat/clock.h>
30 27
31/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ 28/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c
index caa1f7b6cc21..c7a4c0902b38 100644
--- a/arch/arm/plat-omap/debug-devices.c
+++ b/arch/arm/plat-omap/debug-devices.c
@@ -17,9 +17,6 @@
17 17
18#include <mach/hardware.h> 18#include <mach/hardware.h>
19 19
20#include <plat/board.h>
21
22
23/* Many OMAP development platforms reuse the same "debug board"; these 20/* Many OMAP development platforms reuse the same "debug board"; these
24 * platforms include H2, H3, H4, and Perseus2. 21 * platforms include H2, H3, H4, and Perseus2.
25 */ 22 */
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 39407cbe34c6..195aaae65872 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -12,6 +12,7 @@
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/leds.h> 13#include <linux/leds.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/platform_data/gpio-omap.h>
15 16
16#include <mach/hardware.h> 17#include <mach/hardware.h>
17#include <asm/leds.h> 18#include <asm/leds.h>
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
deleted file mode 100644
index 1cba9273d2cb..000000000000
--- a/arch/arm/plat-omap/devices.c
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * linux/arch/arm/plat-omap/devices.c
3 *
4 * Common platform device setup/initialization for OMAP1 and OMAP2
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 as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11#include <linux/gpio.h>
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/platform_device.h>
16#include <linux/io.h>
17#include <linux/slab.h>
18#include <linux/memblock.h>
19
20#include <mach/hardware.h>
21#include <asm/mach-types.h>
22#include <asm/mach/map.h>
23#include <asm/memblock.h>
24
25#include <plat/tc.h>
26#include <plat/board.h>
27#include <plat/mmc.h>
28#include <plat/menelaus.h>
29#include <plat/omap44xx.h>
30
31/*-------------------------------------------------------------------------*/
32
33#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)
34
35#ifdef CONFIG_ARCH_OMAP2
36#define OMAP_RNG_BASE 0x480A0000
37#else
38#define OMAP_RNG_BASE 0xfffe5000
39#endif
40
41static struct resource rng_resources[] = {
42 {
43 .start = OMAP_RNG_BASE,
44 .end = OMAP_RNG_BASE + 0x4f,
45 .flags = IORESOURCE_MEM,
46 },
47};
48
49static struct platform_device omap_rng_device = {
50 .name = "omap_rng",
51 .id = -1,
52 .num_resources = ARRAY_SIZE(rng_resources),
53 .resource = rng_resources,
54};
55
56static void omap_init_rng(void)
57{
58 (void) platform_device_register(&omap_rng_device);
59}
60#else
61static inline void omap_init_rng(void) {}
62#endif
63
64/*
65 * This gets called after board-specific INIT_MACHINE, and initializes most
66 * on-chip peripherals accessible on this board (except for few like USB):
67 *
68 * (a) Does any "standard config" pin muxing needed. Board-specific
69 * code will have muxed GPIO pins and done "nonstandard" setup;
70 * that code could live in the boot loader.
71 * (b) Populating board-specific platform_data with the data drivers
72 * rely on to handle wiring variations.
73 * (c) Creating platform devices as meaningful on this board and
74 * with this kernel configuration.
75 *
76 * Claiming GPIOs, and setting their direction and initial values, is the
77 * responsibility of the device drivers. So is responding to probe().
78 *
79 * Board-specific knowledge like creating devices or pin setup is to be
80 * kept out of drivers as much as possible. In particular, pin setup
81 * may be handled by the boot loader, and drivers should expect it will
82 * normally have been done by the time they're probed.
83 */
84static int __init omap_init_devices(void)
85{
86 /* please keep these calls, and their implementations above,
87 * in alphabetical order so they're easier to sort through.
88 */
89 omap_init_rng();
90 return 0;
91}
92arch_initcall(omap_init_devices);
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 7fe626761e53..c76ed8bff838 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -36,9 +36,8 @@
36#include <linux/slab.h> 36#include <linux/slab.h>
37#include <linux/delay.h> 37#include <linux/delay.h>
38 38
39#include <mach/hardware.h> 39#include <plat/cpu.h>
40#include <plat/dma.h> 40#include <plat/dma.h>
41
42#include <plat/tc.h> 41#include <plat/tc.h>
43 42
44/* 43/*
@@ -969,8 +968,7 @@ void omap_stop_dma(int lch)
969 l = p->dma_read(CCR, lch); 968 l = p->dma_read(CCR, lch);
970 } 969 }
971 if (i >= 100) 970 if (i >= 100)
972 printk(KERN_ERR "DMA drain did not complete on " 971 pr_err("DMA drain did not complete on lch %d\n", lch);
973 "lch %d\n", lch);
974 /* Restore OCP_SYSCONFIG */ 972 /* Restore OCP_SYSCONFIG */
975 p->dma_write(sys_cf, OCP_SYSCONFIG, lch); 973 p->dma_write(sys_cf, OCP_SYSCONFIG, lch);
976 } else { 974 } else {
@@ -1154,8 +1152,7 @@ void omap_dma_link_lch(int lch_head, int lch_queue)
1154 1152
1155 if ((dma_chan[lch_head].dev_id == -1) || 1153 if ((dma_chan[lch_head].dev_id == -1) ||
1156 (dma_chan[lch_queue].dev_id == -1)) { 1154 (dma_chan[lch_queue].dev_id == -1)) {
1157 printk(KERN_ERR "omap_dma: trying to link " 1155 pr_err("omap_dma: trying to link non requested channels\n");
1158 "non requested channels\n");
1159 dump_stack(); 1156 dump_stack();
1160 } 1157 }
1161 1158
@@ -1181,15 +1178,13 @@ void omap_dma_unlink_lch(int lch_head, int lch_queue)
1181 1178
1182 if (dma_chan[lch_head].next_lch != lch_queue || 1179 if (dma_chan[lch_head].next_lch != lch_queue ||
1183 dma_chan[lch_head].next_lch == -1) { 1180 dma_chan[lch_head].next_lch == -1) {
1184 printk(KERN_ERR "omap_dma: trying to unlink " 1181 pr_err("omap_dma: trying to unlink non linked channels\n");
1185 "non linked channels\n");
1186 dump_stack(); 1182 dump_stack();
1187 } 1183 }
1188 1184
1189 if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) || 1185 if ((dma_chan[lch_head].flags & OMAP_DMA_ACTIVE) ||
1190 (dma_chan[lch_queue].flags & OMAP_DMA_ACTIVE)) { 1186 (dma_chan[lch_queue].flags & OMAP_DMA_ACTIVE)) {
1191 printk(KERN_ERR "omap_dma: You need to stop the DMA channels " 1187 pr_err("omap_dma: You need to stop the DMA channels before unlinking\n");
1192 "before unlinking\n");
1193 dump_stack(); 1188 dump_stack();
1194 } 1189 }
1195 1190
@@ -1831,16 +1826,15 @@ static int omap1_dma_handle_ch(int ch)
1831 if ((csr & 0x3f) == 0) 1826 if ((csr & 0x3f) == 0)
1832 return 0; 1827 return 0;
1833 if (unlikely(dma_chan[ch].dev_id == -1)) { 1828 if (unlikely(dma_chan[ch].dev_id == -1)) {
1834 printk(KERN_WARNING "Spurious interrupt from DMA channel " 1829 pr_warn("Spurious interrupt from DMA channel %d (CSR %04x)\n",
1835 "%d (CSR %04x)\n", ch, csr); 1830 ch, csr);
1836 return 0; 1831 return 0;
1837 } 1832 }
1838 if (unlikely(csr & OMAP1_DMA_TOUT_IRQ)) 1833 if (unlikely(csr & OMAP1_DMA_TOUT_IRQ))
1839 printk(KERN_WARNING "DMA timeout with device %d\n", 1834 pr_warn("DMA timeout with device %d\n", dma_chan[ch].dev_id);
1840 dma_chan[ch].dev_id);
1841 if (unlikely(csr & OMAP_DMA_DROP_IRQ)) 1835 if (unlikely(csr & OMAP_DMA_DROP_IRQ))
1842 printk(KERN_WARNING "DMA synchronization event drop occurred " 1836 pr_warn("DMA synchronization event drop occurred with device %d\n",
1843 "with device %d\n", dma_chan[ch].dev_id); 1837 dma_chan[ch].dev_id);
1844 if (likely(csr & OMAP_DMA_BLOCK_IRQ)) 1838 if (likely(csr & OMAP_DMA_BLOCK_IRQ))
1845 dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE; 1839 dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE;
1846 if (likely(dma_chan[ch].callback != NULL)) 1840 if (likely(dma_chan[ch].callback != NULL))
@@ -1880,21 +1874,19 @@ static int omap2_dma_handle_ch(int ch)
1880 1874
1881 if (!status) { 1875 if (!status) {
1882 if (printk_ratelimit()) 1876 if (printk_ratelimit())
1883 printk(KERN_WARNING "Spurious DMA IRQ for lch %d\n", 1877 pr_warn("Spurious DMA IRQ for lch %d\n", ch);
1884 ch);
1885 p->dma_write(1 << ch, IRQSTATUS_L0, ch); 1878 p->dma_write(1 << ch, IRQSTATUS_L0, ch);
1886 return 0; 1879 return 0;
1887 } 1880 }
1888 if (unlikely(dma_chan[ch].dev_id == -1)) { 1881 if (unlikely(dma_chan[ch].dev_id == -1)) {
1889 if (printk_ratelimit()) 1882 if (printk_ratelimit())
1890 printk(KERN_WARNING "IRQ %04x for non-allocated DMA" 1883 pr_warn("IRQ %04x for non-allocated DMA channel %d\n",
1891 "channel %d\n", status, ch); 1884 status, ch);
1892 return 0; 1885 return 0;
1893 } 1886 }
1894 if (unlikely(status & OMAP_DMA_DROP_IRQ)) 1887 if (unlikely(status & OMAP_DMA_DROP_IRQ))
1895 printk(KERN_INFO 1888 pr_info("DMA synchronization event drop occurred with device %d\n",
1896 "DMA synchronization event drop occurred with device " 1889 dma_chan[ch].dev_id);
1897 "%d\n", dma_chan[ch].dev_id);
1898 if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) { 1890 if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) {
1899 printk(KERN_INFO "DMA transaction error with device %d\n", 1891 printk(KERN_INFO "DMA transaction error with device %d\n",
1900 dma_chan[ch].dev_id); 1892 dma_chan[ch].dev_id);
@@ -2014,8 +2006,9 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
2014 2006
2015 p = pdev->dev.platform_data; 2007 p = pdev->dev.platform_data;
2016 if (!p) { 2008 if (!p) {
2017 dev_err(&pdev->dev, "%s: System DMA initialized without" 2009 dev_err(&pdev->dev,
2018 "platform data\n", __func__); 2010 "%s: System DMA initialized without platform data\n",
2011 __func__);
2019 return -EINVAL; 2012 return -EINVAL;
2020 } 2013 }
2021 2014
@@ -2090,8 +2083,8 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
2090 } 2083 }
2091 ret = setup_irq(dma_irq, &omap24xx_dma_irq); 2084 ret = setup_irq(dma_irq, &omap24xx_dma_irq);
2092 if (ret) { 2085 if (ret) {
2093 dev_err(&pdev->dev, "set_up failed for IRQ %d" 2086 dev_err(&pdev->dev, "set_up failed for IRQ %d for DMA (error %d)\n",
2094 "for DMA (error %d)\n", dma_irq, ret); 2087 dma_irq, ret);
2095 goto exit_dma_lch_fail; 2088 goto exit_dma_lch_fail;
2096 } 2089 }
2097 } 2090 }
@@ -2099,8 +2092,7 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
2099 /* reserve dma channels 0 and 1 in high security devices */ 2092 /* reserve dma channels 0 and 1 in high security devices */
2100 if (cpu_is_omap34xx() && 2093 if (cpu_is_omap34xx() &&
2101 (omap_type() != OMAP2_DEVICE_TYPE_GP)) { 2094 (omap_type() != OMAP2_DEVICE_TYPE_GP)) {
2102 printk(KERN_INFO "Reserving DMA channels 0 and 1 for " 2095 pr_info("Reserving DMA channels 0 and 1 for HS ROM code\n");
2103 "HS ROM code\n");
2104 dma_chan[0].dev_id = 0; 2096 dma_chan[0].dev_id = 0;
2105 dma_chan[1].dev_id = 1; 2097 dma_chan[1].dev_id = 1;
2106 } 2098 }
@@ -2108,8 +2100,8 @@ static int __devinit omap_system_dma_probe(struct platform_device *pdev)
2108 return 0; 2100 return 0;
2109 2101
2110exit_dma_irq_fail: 2102exit_dma_irq_fail:
2111 dev_err(&pdev->dev, "unable to request IRQ %d" 2103 dev_err(&pdev->dev, "unable to request IRQ %d for DMA (error %d)\n",
2112 "for DMA (error %d)\n", dma_irq, ret); 2104 dma_irq, ret);
2113 for (irq_rel = 0; irq_rel < ch; irq_rel++) { 2105 for (irq_rel = 0; irq_rel < ch; irq_rel++) {
2114 dma_irq = platform_get_irq(pdev, irq_rel); 2106 dma_irq = platform_get_irq(pdev, irq_rel);
2115 free_irq(dma_irq, (void *)(irq_rel + 1)); 2107 free_irq(dma_irq, (void *)(irq_rel + 1));
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index dd6f92c99e56..bcbb9d5dc293 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -33,8 +33,6 @@
33#include <mach/hardware.h> 33#include <mach/hardware.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35 35
36#include <plat/board.h>
37
38#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) 36#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
39 37
40static bool omapfb_lcd_configured; 38static bool omapfb_lcd_configured;
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index db071bc71c4d..40bc06a7ac43 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -39,6 +39,7 @@
39 39
40#define OMAP_I2C_SIZE 0x3f 40#define OMAP_I2C_SIZE 0x3f
41#define OMAP1_I2C_BASE 0xfffb3800 41#define OMAP1_I2C_BASE 0xfffb3800
42#define OMAP1_INT_I2C (32 + 4)
42 43
43static const char name[] = "omap_i2c"; 44static const char name[] = "omap_i2c";
44 45
@@ -105,7 +106,7 @@ static inline int omap1_i2c_add_bus(int bus_id)
105 res = pdev->resource; 106 res = pdev->resource;
106 res[0].start = OMAP1_I2C_BASE; 107 res[0].start = OMAP1_I2C_BASE;
107 res[0].end = res[0].start + OMAP_I2C_SIZE; 108 res[0].end = res[0].start + OMAP_I2C_SIZE;
108 res[1].start = INT_I2C; 109 res[1].start = OMAP1_INT_I2C;
109 pdata = &i2c_pdata[bus_id - 1]; 110 pdata = &i2c_pdata[bus_id - 1];
110 111
111 /* all OMAP1 have IP version 1 register set */ 112 /* all OMAP1 have IP version 1 register set */
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h
deleted file mode 100644
index e62f20a5c0af..000000000000
--- a/arch/arm/plat-omap/include/plat/board.h
+++ /dev/null
@@ -1,138 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/board.h
3 *
4 * Information structures for board-specific data
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
8 */
9
10#ifndef _OMAP_BOARD_H
11#define _OMAP_BOARD_H
12
13#include <linux/types.h>
14
15#include <plat/gpio-switch.h>
16
17/*
18 * OMAP35x EVM revision
19 * Run time detection of EVM revision is done by reading Ethernet
20 * PHY ID -
21 * GEN_1 = 0x01150000
22 * GEN_2 = 0x92200000
23 */
24enum {
25 OMAP3EVM_BOARD_GEN_1 = 0, /* EVM Rev between A - D */
26 OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */
27};
28
29/* Different peripheral ids */
30#define OMAP_TAG_CLOCK 0x4f01
31#define OMAP_TAG_GPIO_SWITCH 0x4f06
32#define OMAP_TAG_STI_CONSOLE 0x4f09
33#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
34
35#define OMAP_TAG_BOOT_REASON 0x4f80
36#define OMAP_TAG_FLASH_PART 0x4f81
37#define OMAP_TAG_VERSION_STR 0x4f82
38
39struct omap_clock_config {
40 /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
41 u8 system_clock_type;
42};
43
44struct omap_serial_console_config {
45 u8 console_uart;
46 u32 console_speed;
47};
48
49struct omap_sti_console_config {
50 unsigned enable:1;
51 u8 channel;
52};
53
54struct omap_camera_sensor_config {
55 u16 reset_gpio;
56 int (*power_on)(void * data);
57 int (*power_off)(void * data);
58};
59
60struct omap_lcd_config {
61 char panel_name[16];
62 char ctrl_name[16];
63 s16 nreset_gpio;
64 u8 data_lines;
65};
66
67struct device;
68struct fb_info;
69struct omap_backlight_config {
70 int default_intensity;
71 int (*set_power)(struct device *dev, int state);
72};
73
74struct omap_fbmem_config {
75 u32 start;
76 u32 size;
77};
78
79struct omap_pwm_led_platform_data {
80 const char *name;
81 int intensity_timer;
82 int blink_timer;
83 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
84};
85
86struct omap_uart_config {
87 /* Bit field of UARTs present; bit 0 --> UART1 */
88 unsigned int enabled_uarts;
89};
90
91
92struct omap_flash_part_config {
93 char part_table[0];
94};
95
96struct omap_boot_reason_config {
97 char reason_str[12];
98};
99
100struct omap_version_config {
101 char component[12];
102 char version[12];
103};
104
105struct omap_board_config_entry {
106 u16 tag;
107 u16 len;
108 u8 data[0];
109};
110
111struct omap_board_config_kernel {
112 u16 tag;
113 const void *data;
114};
115
116extern const void *__init __omap_get_config(u16 tag, size_t len, int nr);
117
118#define omap_get_config(tag, type) \
119 ((const type *) __omap_get_config((tag), sizeof(type), 0))
120#define omap_get_nr_config(tag, type, nr) \
121 ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
122
123extern const void *__init omap_get_var_config(u16 tag, size_t *len);
124
125extern struct omap_board_config_kernel *omap_board_config;
126extern int omap_board_config_size;
127
128
129/* for TI reference platforms sharing the same debug card */
130extern int debug_card_init(u32 addr, unsigned gpio);
131
132/* OMAP3EVM revision */
133#if defined(CONFIG_MACH_OMAP3EVM)
134u8 get_omap3_evm_rev(void);
135#else
136#define get_omap3_evm_rev() (-EINVAL)
137#endif
138#endif
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h
index 656b9862279e..e2e2d045e428 100644
--- a/arch/arm/plat-omap/include/plat/clock.h
+++ b/arch/arm/plat-omap/include/plat/clock.h
@@ -19,6 +19,11 @@ struct module;
19struct clk; 19struct clk;
20struct clockdomain; 20struct clockdomain;
21 21
22/* Temporary, needed during the common clock framework conversion */
23#define __clk_get_name(clk) (clk->name)
24#define __clk_get_parent(clk) (clk->parent)
25#define __clk_get_rate(clk) (clk->rate)
26
22/** 27/**
23 * struct clkops - some clock function pointers 28 * struct clkops - some clock function pointers
24 * @enable: fn ptr that enables the current clock in hardware 29 * @enable: fn ptr that enables the current clock in hardware
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index bb5d08a70dbc..67da857783ce 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -30,6 +30,8 @@
30#ifndef __ASM_ARCH_OMAP_CPU_H 30#ifndef __ASM_ARCH_OMAP_CPU_H
31#define __ASM_ARCH_OMAP_CPU_H 31#define __ASM_ARCH_OMAP_CPU_H
32 32
33#ifndef __ASSEMBLY__
34
33#include <linux/bitops.h> 35#include <linux/bitops.h>
34#include <plat/multi.h> 36#include <plat/multi.h>
35 37
@@ -493,4 +495,5 @@ OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ)
493OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ) 495OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ)
494OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ) 496OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ)
495 497
498#endif /* __ASSEMBLY__ */
496#endif 499#endif
diff --git a/arch/arm/plat-omap/include/plat/debug-devices.h b/arch/arm/plat-omap/include/plat/debug-devices.h
new file mode 100644
index 000000000000..a4edbd2f7484
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/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/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
index c5811d4409b0..0a87b052f8f7 100644
--- a/arch/arm/plat-omap/include/plat/dma.h
+++ b/arch/arm/plat-omap/include/plat/dma.h
@@ -31,6 +31,8 @@
31/* Move omap4 specific defines to dma-44xx.h */ 31/* Move omap4 specific defines to dma-44xx.h */
32#include "dma-44xx.h" 32#include "dma-44xx.h"
33 33
34#define INT_DMA_LCD 25
35
34/* DMA channels for omap1 */ 36/* DMA channels for omap1 */
35#define OMAP_DMA_NO_DEVICE 0 37#define OMAP_DMA_NO_DEVICE 0
36#define OMAP_DMA_MCSI1_TX 1 38#define OMAP_DMA_MCSI1_TX 1
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 19e7fa577bd0..85868e98c11c 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -60,6 +60,7 @@
60#define OMAP_TIMER_ALWON 0x40000000 60#define OMAP_TIMER_ALWON 0x40000000
61#define OMAP_TIMER_HAS_PWM 0x20000000 61#define OMAP_TIMER_HAS_PWM 0x20000000
62#define OMAP_TIMER_NEEDS_RESET 0x10000000 62#define OMAP_TIMER_NEEDS_RESET 0x10000000
63#define OMAP_TIMER_HAS_DSP_IRQ 0x08000000
63 64
64struct omap_timer_capability_dev_attr { 65struct omap_timer_capability_dev_attr {
65 u32 timer_capability; 66 u32 timer_capability;
diff --git a/arch/arm/plat-omap/include/plat/gpio-switch.h b/arch/arm/plat-omap/include/plat/gpio-switch.h
deleted file mode 100644
index 10da0e07c0cf..000000000000
--- a/arch/arm/plat-omap/include/plat/gpio-switch.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * GPIO switch definitions
3 *
4 * Copyright (C) 2006 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_GPIO_SWITCH_H
12#define __ASM_ARCH_OMAP_GPIO_SWITCH_H
13
14#include <linux/types.h>
15
16/* Cover:
17 * high -> closed
18 * low -> open
19 * Connection:
20 * high -> connected
21 * low -> disconnected
22 * Activity:
23 * high -> active
24 * low -> inactive
25 *
26 */
27#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
28#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
29#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002
30#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
31#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
32
33struct omap_gpio_switch {
34 const char *name;
35 s16 gpio;
36 unsigned flags:4;
37 unsigned type:4;
38
39 /* Time in ms to debounce when transitioning from
40 * inactive state to active state. */
41 u16 debounce_rising;
42 /* Same for transition from active to inactive state. */
43 u16 debounce_falling;
44
45 /* notify board-specific code about state changes */
46 void (* notify)(void *data, int state);
47 void *notify_data;
48};
49
50/* Call at init time only */
51extern void omap_register_gpio_switches(const struct omap_gpio_switch *tbl,
52 int count);
53
54#endif
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h
deleted file mode 100644
index 50fb7cc000ea..000000000000
--- a/arch/arm/plat-omap/include/plat/gpio.h
+++ /dev/null
@@ -1,228 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/gpio.h
3 *
4 * OMAP GPIO handling defines and functions
5 *
6 * Copyright (C) 2003-2005 Nokia Corporation
7 *
8 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef __ASM_ARCH_OMAP_GPIO_H
27#define __ASM_ARCH_OMAP_GPIO_H
28
29#include <linux/io.h>
30#include <linux/platform_device.h>
31#include <mach/irqs.h>
32
33#define OMAP1_MPUIO_BASE 0xfffb5000
34
35/*
36 * These are the omap15xx/16xx offsets. The omap7xx offset are
37 * OMAP_MPUIO_ / 2 offsets below.
38 */
39#define OMAP_MPUIO_INPUT_LATCH 0x00
40#define OMAP_MPUIO_OUTPUT 0x04
41#define OMAP_MPUIO_IO_CNTL 0x08
42#define OMAP_MPUIO_KBR_LATCH 0x10
43#define OMAP_MPUIO_KBC 0x14
44#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
45#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
46#define OMAP_MPUIO_KBD_INT 0x20
47#define OMAP_MPUIO_GPIO_INT 0x24
48#define OMAP_MPUIO_KBD_MASKIT 0x28
49#define OMAP_MPUIO_GPIO_MASKIT 0x2c
50#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
51#define OMAP_MPUIO_LATCH 0x34
52
53#define OMAP34XX_NR_GPIOS 6
54
55/*
56 * OMAP1510 GPIO registers
57 */
58#define OMAP1510_GPIO_DATA_INPUT 0x00
59#define OMAP1510_GPIO_DATA_OUTPUT 0x04
60#define OMAP1510_GPIO_DIR_CONTROL 0x08
61#define OMAP1510_GPIO_INT_CONTROL 0x0c
62#define OMAP1510_GPIO_INT_MASK 0x10
63#define OMAP1510_GPIO_INT_STATUS 0x14
64#define OMAP1510_GPIO_PIN_CONTROL 0x18
65
66#define OMAP1510_IH_GPIO_BASE 64
67
68/*
69 * OMAP1610 specific GPIO registers
70 */
71#define OMAP1610_GPIO_REVISION 0x0000
72#define OMAP1610_GPIO_SYSCONFIG 0x0010
73#define OMAP1610_GPIO_SYSSTATUS 0x0014
74#define OMAP1610_GPIO_IRQSTATUS1 0x0018
75#define OMAP1610_GPIO_IRQENABLE1 0x001c
76#define OMAP1610_GPIO_WAKEUPENABLE 0x0028
77#define OMAP1610_GPIO_DATAIN 0x002c
78#define OMAP1610_GPIO_DATAOUT 0x0030
79#define OMAP1610_GPIO_DIRECTION 0x0034
80#define OMAP1610_GPIO_EDGE_CTRL1 0x0038
81#define OMAP1610_GPIO_EDGE_CTRL2 0x003c
82#define OMAP1610_GPIO_CLEAR_IRQENABLE1 0x009c
83#define OMAP1610_GPIO_CLEAR_WAKEUPENA 0x00a8
84#define OMAP1610_GPIO_CLEAR_DATAOUT 0x00b0
85#define OMAP1610_GPIO_SET_IRQENABLE1 0x00dc
86#define OMAP1610_GPIO_SET_WAKEUPENA 0x00e8
87#define OMAP1610_GPIO_SET_DATAOUT 0x00f0
88
89/*
90 * OMAP7XX specific GPIO registers
91 */
92#define OMAP7XX_GPIO_DATA_INPUT 0x00
93#define OMAP7XX_GPIO_DATA_OUTPUT 0x04
94#define OMAP7XX_GPIO_DIR_CONTROL 0x08
95#define OMAP7XX_GPIO_INT_CONTROL 0x0c
96#define OMAP7XX_GPIO_INT_MASK 0x10
97#define OMAP7XX_GPIO_INT_STATUS 0x14
98
99/*
100 * omap2+ specific GPIO registers
101 */
102#define OMAP24XX_GPIO_REVISION 0x0000
103#define OMAP24XX_GPIO_IRQSTATUS1 0x0018
104#define OMAP24XX_GPIO_IRQSTATUS2 0x0028
105#define OMAP24XX_GPIO_IRQENABLE2 0x002c
106#define OMAP24XX_GPIO_IRQENABLE1 0x001c
107#define OMAP24XX_GPIO_WAKE_EN 0x0020
108#define OMAP24XX_GPIO_CTRL 0x0030
109#define OMAP24XX_GPIO_OE 0x0034
110#define OMAP24XX_GPIO_DATAIN 0x0038
111#define OMAP24XX_GPIO_DATAOUT 0x003c
112#define OMAP24XX_GPIO_LEVELDETECT0 0x0040
113#define OMAP24XX_GPIO_LEVELDETECT1 0x0044
114#define OMAP24XX_GPIO_RISINGDETECT 0x0048
115#define OMAP24XX_GPIO_FALLINGDETECT 0x004c
116#define OMAP24XX_GPIO_DEBOUNCE_EN 0x0050
117#define OMAP24XX_GPIO_DEBOUNCE_VAL 0x0054
118#define OMAP24XX_GPIO_CLEARIRQENABLE1 0x0060
119#define OMAP24XX_GPIO_SETIRQENABLE1 0x0064
120#define OMAP24XX_GPIO_CLEARWKUENA 0x0080
121#define OMAP24XX_GPIO_SETWKUENA 0x0084
122#define OMAP24XX_GPIO_CLEARDATAOUT 0x0090
123#define OMAP24XX_GPIO_SETDATAOUT 0x0094
124
125#define OMAP4_GPIO_REVISION 0x0000
126#define OMAP4_GPIO_EOI 0x0020
127#define OMAP4_GPIO_IRQSTATUSRAW0 0x0024
128#define OMAP4_GPIO_IRQSTATUSRAW1 0x0028
129#define OMAP4_GPIO_IRQSTATUS0 0x002c
130#define OMAP4_GPIO_IRQSTATUS1 0x0030
131#define OMAP4_GPIO_IRQSTATUSSET0 0x0034
132#define OMAP4_GPIO_IRQSTATUSSET1 0x0038
133#define OMAP4_GPIO_IRQSTATUSCLR0 0x003c
134#define OMAP4_GPIO_IRQSTATUSCLR1 0x0040
135#define OMAP4_GPIO_IRQWAKEN0 0x0044
136#define OMAP4_GPIO_IRQWAKEN1 0x0048
137#define OMAP4_GPIO_IRQENABLE1 0x011c
138#define OMAP4_GPIO_WAKE_EN 0x0120
139#define OMAP4_GPIO_IRQSTATUS2 0x0128
140#define OMAP4_GPIO_IRQENABLE2 0x012c
141#define OMAP4_GPIO_CTRL 0x0130
142#define OMAP4_GPIO_OE 0x0134
143#define OMAP4_GPIO_DATAIN 0x0138
144#define OMAP4_GPIO_DATAOUT 0x013c
145#define OMAP4_GPIO_LEVELDETECT0 0x0140
146#define OMAP4_GPIO_LEVELDETECT1 0x0144
147#define OMAP4_GPIO_RISINGDETECT 0x0148
148#define OMAP4_GPIO_FALLINGDETECT 0x014c
149#define OMAP4_GPIO_DEBOUNCENABLE 0x0150
150#define OMAP4_GPIO_DEBOUNCINGTIME 0x0154
151#define OMAP4_GPIO_CLEARIRQENABLE1 0x0160
152#define OMAP4_GPIO_SETIRQENABLE1 0x0164
153#define OMAP4_GPIO_CLEARWKUENA 0x0180
154#define OMAP4_GPIO_SETWKUENA 0x0184
155#define OMAP4_GPIO_CLEARDATAOUT 0x0190
156#define OMAP4_GPIO_SETDATAOUT 0x0194
157
158#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
159#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
160
161struct omap_gpio_dev_attr {
162 int bank_width; /* GPIO bank width */
163 bool dbck_flag; /* dbck required or not - True for OMAP3&4 */
164};
165
166struct omap_gpio_reg_offs {
167 u16 revision;
168 u16 direction;
169 u16 datain;
170 u16 dataout;
171 u16 set_dataout;
172 u16 clr_dataout;
173 u16 irqstatus;
174 u16 irqstatus2;
175 u16 irqstatus_raw0;
176 u16 irqstatus_raw1;
177 u16 irqenable;
178 u16 irqenable2;
179 u16 set_irqenable;
180 u16 clr_irqenable;
181 u16 debounce;
182 u16 debounce_en;
183 u16 ctrl;
184 u16 wkup_en;
185 u16 leveldetect0;
186 u16 leveldetect1;
187 u16 risingdetect;
188 u16 fallingdetect;
189 u16 irqctrl;
190 u16 edgectrl1;
191 u16 edgectrl2;
192 u16 pinctrl;
193
194 bool irqenable_inv;
195};
196
197struct omap_gpio_platform_data {
198 int bank_type;
199 int bank_width; /* GPIO bank width */
200 int bank_stride; /* Only needed for omap1 MPUIO */
201 bool dbck_flag; /* dbck required or not - True for OMAP3&4 */
202 bool loses_context; /* whether the bank would ever lose context */
203 bool is_mpuio; /* whether the bank is of type MPUIO */
204 u32 non_wakeup_gpios;
205
206 struct omap_gpio_reg_offs *regs;
207
208 /* Return context loss count due to PM states changing */
209 int (*get_context_loss_count)(struct device *dev);
210};
211
212extern void omap2_gpio_prepare_for_idle(int off_mode);
213extern void omap2_gpio_resume_after_idle(void);
214extern void omap_set_gpio_debounce(int gpio, int enable);
215extern void omap_set_gpio_debounce_time(int gpio, int enable);
216/*-------------------------------------------------------------------------*/
217
218/*
219 * Wrappers for "new style" GPIO calls, using the new infrastructure
220 * which lets us plug in FPGA, I2C, and other implementations.
221 *
222 * The original OMAP-specific calls should eventually be removed.
223 */
224
225#include <linux/errno.h>
226#include <asm-generic/gpio.h>
227
228#endif
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
index f37764a36072..2e6e2597178c 100644
--- a/arch/arm/plat-omap/include/plat/gpmc.h
+++ b/arch/arm/plat-omap/include/plat/gpmc.h
@@ -133,6 +133,25 @@ struct gpmc_timings {
133 u16 wr_data_mux_bus; /* WRDATAONADMUXBUS */ 133 u16 wr_data_mux_bus; /* WRDATAONADMUXBUS */
134}; 134};
135 135
136struct gpmc_nand_regs {
137 void __iomem *gpmc_status;
138 void __iomem *gpmc_nand_command;
139 void __iomem *gpmc_nand_address;
140 void __iomem *gpmc_nand_data;
141 void __iomem *gpmc_prefetch_config1;
142 void __iomem *gpmc_prefetch_config2;
143 void __iomem *gpmc_prefetch_control;
144 void __iomem *gpmc_prefetch_status;
145 void __iomem *gpmc_ecc_config;
146 void __iomem *gpmc_ecc_control;
147 void __iomem *gpmc_ecc_size_config;
148 void __iomem *gpmc_ecc1_result;
149 void __iomem *gpmc_bch_result0;
150};
151
152extern void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs);
153extern int gpmc_get_client_irq(unsigned irq_config);
154
136extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns); 155extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
137extern unsigned int gpmc_ps_to_ticks(unsigned int time_ps); 156extern unsigned int gpmc_ps_to_ticks(unsigned int time_ps);
138extern unsigned int gpmc_ticks_to_ns(unsigned int ticks); 157extern unsigned int gpmc_ticks_to_ns(unsigned int ticks);
diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h
deleted file mode 100644
index ddbde38e1e33..000000000000
--- a/arch/arm/plat-omap/include/plat/hardware.h
+++ /dev/null
@@ -1,293 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/hardware.h
3 *
4 * Hardware definitions for TI OMAP processors and boards
5 *
6 * NOTE: Please put device driver specific defines into a separate header
7 * file for each driver.
8 *
9 * Copyright (C) 2001 RidgeRun, Inc.
10 * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com>
11 *
12 * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com>
13 * and Dirk Behme <dirk.behme@de.bosch.com>
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 *
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
23 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * You should have received a copy of the GNU General Public License along
32 * with this program; if not, write to the Free Software Foundation, Inc.,
33 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */
35
36#ifndef __ASM_ARCH_OMAP_HARDWARE_H
37#define __ASM_ARCH_OMAP_HARDWARE_H
38
39#include <asm/sizes.h>
40#ifndef __ASSEMBLER__
41#include <asm/types.h>
42#include <plat/cpu.h>
43#endif
44#include <plat/serial.h>
45
46/*
47 * ---------------------------------------------------------------------------
48 * Common definitions for all OMAP processors
49 * NOTE: Put all processor or board specific parts to the special header
50 * files.
51 * ---------------------------------------------------------------------------
52 */
53
54/*
55 * ----------------------------------------------------------------------------
56 * Timers
57 * ----------------------------------------------------------------------------
58 */
59#define OMAP_MPU_TIMER1_BASE (0xfffec500)
60#define OMAP_MPU_TIMER2_BASE (0xfffec600)
61#define OMAP_MPU_TIMER3_BASE (0xfffec700)
62#define MPU_TIMER_FREE (1 << 6)
63#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
64#define MPU_TIMER_AR (1 << 1)
65#define MPU_TIMER_ST (1 << 0)
66
67/*
68 * ----------------------------------------------------------------------------
69 * Clocks
70 * ----------------------------------------------------------------------------
71 */
72#define CLKGEN_REG_BASE (0xfffece00)
73#define ARM_CKCTL (CLKGEN_REG_BASE + 0x0)
74#define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4)
75#define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8)
76#define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC)
77#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
78#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
79#define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
80#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
81
82#define CK_RATEF 1
83#define CK_IDLEF 2
84#define CK_ENABLEF 4
85#define CK_SELECTF 8
86#define SETARM_IDLE_SHIFT
87
88/* DPLL control registers */
89#define DPLL_CTL (0xfffecf00)
90
91/* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
92#define DSP_CONFIG_REG_BASE IOMEM(0xe1008000)
93#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
94#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
95#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
96#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
97
98/*
99 * ---------------------------------------------------------------------------
100 * UPLD
101 * ---------------------------------------------------------------------------
102 */
103#define ULPD_REG_BASE (0xfffe0800)
104#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
105#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
106#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
107# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
108# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
109#define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34)
110# define SOFT_UDC_REQ (1 << 4)
111# define SOFT_USB_CLK_REQ (1 << 3)
112# define SOFT_DPLL_REQ (1 << 0)
113#define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c)
114#define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40)
115#define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c)
116#define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50)
117#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68)
118# define DIS_MMC2_DPLL_REQ (1 << 11)
119# define DIS_MMC1_DPLL_REQ (1 << 10)
120# define DIS_UART3_DPLL_REQ (1 << 9)
121# define DIS_UART2_DPLL_REQ (1 << 8)
122# define DIS_UART1_DPLL_REQ (1 << 7)
123# define DIS_USB_HOST_DPLL_REQ (1 << 6)
124#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74)
125#define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c)
126
127/*
128 * ---------------------------------------------------------------------------
129 * Watchdog timer
130 * ---------------------------------------------------------------------------
131 */
132
133/* Watchdog timer within the OMAP3.2 gigacell */
134#define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
135#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
136#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
137#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
138#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
139
140/*
141 * ---------------------------------------------------------------------------
142 * Interrupts
143 * ---------------------------------------------------------------------------
144 */
145#ifdef CONFIG_ARCH_OMAP1
146
147/*
148 * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
149 * or something similar.. -- PFM.
150 */
151
152#define OMAP_IH1_BASE 0xfffecb00
153#define OMAP_IH2_BASE 0xfffe0000
154
155#define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00)
156#define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04)
157#define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10)
158#define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14)
159#define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18)
160#define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c)
161#define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c)
162
163#define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00)
164#define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04)
165#define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10)
166#define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14)
167#define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18)
168#define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c)
169#define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c)
170
171#define IRQ_ITR_REG_OFFSET 0x00
172#define IRQ_MIR_REG_OFFSET 0x04
173#define IRQ_SIR_IRQ_REG_OFFSET 0x10
174#define IRQ_SIR_FIQ_REG_OFFSET 0x14
175#define IRQ_CONTROL_REG_OFFSET 0x18
176#define IRQ_ISR_REG_OFFSET 0x9c
177#define IRQ_ILR0_REG_OFFSET 0x1c
178#define IRQ_GMR_REG_OFFSET 0xa0
179
180#endif
181
182/*
183 * ----------------------------------------------------------------------------
184 * System control registers
185 * ----------------------------------------------------------------------------
186 */
187#define MOD_CONF_CTRL_0 0xfffe1080
188#define MOD_CONF_CTRL_1 0xfffe1110
189
190/*
191 * ----------------------------------------------------------------------------
192 * Pin multiplexing registers
193 * ----------------------------------------------------------------------------
194 */
195#define FUNC_MUX_CTRL_0 0xfffe1000
196#define FUNC_MUX_CTRL_1 0xfffe1004
197#define FUNC_MUX_CTRL_2 0xfffe1008
198#define COMP_MODE_CTRL_0 0xfffe100c
199#define FUNC_MUX_CTRL_3 0xfffe1010
200#define FUNC_MUX_CTRL_4 0xfffe1014
201#define FUNC_MUX_CTRL_5 0xfffe1018
202#define FUNC_MUX_CTRL_6 0xfffe101C
203#define FUNC_MUX_CTRL_7 0xfffe1020
204#define FUNC_MUX_CTRL_8 0xfffe1024
205#define FUNC_MUX_CTRL_9 0xfffe1028
206#define FUNC_MUX_CTRL_A 0xfffe102C
207#define FUNC_MUX_CTRL_B 0xfffe1030
208#define FUNC_MUX_CTRL_C 0xfffe1034
209#define FUNC_MUX_CTRL_D 0xfffe1038
210#define PULL_DWN_CTRL_0 0xfffe1040
211#define PULL_DWN_CTRL_1 0xfffe1044
212#define PULL_DWN_CTRL_2 0xfffe1048
213#define PULL_DWN_CTRL_3 0xfffe104c
214#define PULL_DWN_CTRL_4 0xfffe10ac
215
216/* OMAP-1610 specific multiplexing registers */
217#define FUNC_MUX_CTRL_E 0xfffe1090
218#define FUNC_MUX_CTRL_F 0xfffe1094
219#define FUNC_MUX_CTRL_10 0xfffe1098
220#define FUNC_MUX_CTRL_11 0xfffe109c
221#define FUNC_MUX_CTRL_12 0xfffe10a0
222#define PU_PD_SEL_0 0xfffe10b4
223#define PU_PD_SEL_1 0xfffe10b8
224#define PU_PD_SEL_2 0xfffe10bc
225#define PU_PD_SEL_3 0xfffe10c0
226#define PU_PD_SEL_4 0xfffe10c4
227
228/* Timer32K for 1610 and 1710*/
229#define OMAP_TIMER32K_BASE 0xFFFBC400
230
231/*
232 * ---------------------------------------------------------------------------
233 * TIPB bus interface
234 * ---------------------------------------------------------------------------
235 */
236#define TIPB_PUBLIC_CNTL_BASE 0xfffed300
237#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
238#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
239#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
240
241/*
242 * ----------------------------------------------------------------------------
243 * MPUI interface
244 * ----------------------------------------------------------------------------
245 */
246#define MPUI_BASE (0xfffec900)
247#define MPUI_CTRL (MPUI_BASE + 0x0)
248#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
249#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
250#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
251#define MPUI_STATUS_REG (MPUI_BASE + 0x10)
252#define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
253#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
254#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
255
256/*
257 * ----------------------------------------------------------------------------
258 * LED Pulse Generator
259 * ----------------------------------------------------------------------------
260 */
261#define OMAP_LPG1_BASE 0xfffbd000
262#define OMAP_LPG2_BASE 0xfffbd800
263#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
264#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
265#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
266#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
267
268/*
269 * ----------------------------------------------------------------------------
270 * Pulse-Width Light
271 * ----------------------------------------------------------------------------
272 */
273#define OMAP_PWL_BASE 0xfffb5800
274#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
275#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
276
277/*
278 * ---------------------------------------------------------------------------
279 * Processor specific defines
280 * ---------------------------------------------------------------------------
281 */
282
283#include <plat/omap7xx.h>
284#include <plat/omap1510.h>
285#include <plat/omap16xx.h>
286#include <plat/omap24xx.h>
287#include <plat/omap34xx.h>
288#include <plat/omap44xx.h>
289#include <plat/ti81xx.h>
290#include <plat/am33xx.h>
291#include <plat/omap54xx.h>
292
293#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h
index 88be3e628b33..68b5f0362f35 100644
--- a/arch/arm/plat-omap/include/plat/iommu.h
+++ b/arch/arm/plat-omap/include/plat/iommu.h
@@ -103,6 +103,19 @@ struct iommu_functions {
103 ssize_t (*dump_ctx)(struct omap_iommu *obj, char *buf, ssize_t len); 103 ssize_t (*dump_ctx)(struct omap_iommu *obj, char *buf, ssize_t len);
104}; 104};
105 105
106/**
107 * struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod
108 * @da_start: device address where the va space starts.
109 * @da_end: device address where the va space ends.
110 * @nr_tlb_entries: number of entries supported by the translation
111 * look-aside buffer (TLB).
112 */
113struct omap_mmu_dev_attr {
114 u32 da_start;
115 u32 da_end;
116 int nr_tlb_entries;
117};
118
106struct iommu_platform_data { 119struct iommu_platform_data {
107 const char *name; 120 const char *name;
108 const char *clk_name; 121 const char *clk_name;
@@ -126,6 +139,7 @@ struct omap_iommu_arch_data {
126 struct omap_iommu *iommu_dev; 139 struct omap_iommu *iommu_dev;
127}; 140};
128 141
142#ifdef CONFIG_IOMMU_API
129/** 143/**
130 * dev_to_omap_iommu() - retrieves an omap iommu object from a user device 144 * dev_to_omap_iommu() - retrieves an omap iommu object from a user device
131 * @dev: iommu client device 145 * @dev: iommu client device
@@ -136,6 +150,7 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)
136 150
137 return arch_data->iommu_dev; 151 return arch_data->iommu_dev;
138} 152}
153#endif
139 154
140/* IOMMU errors */ 155/* IOMMU errors */
141#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0) 156#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0)
diff --git a/arch/arm/plat-omap/include/plat/irqs-44xx.h b/arch/arm/plat-omap/include/plat/irqs-44xx.h
deleted file mode 100644
index 518322c80116..000000000000
--- a/arch/arm/plat-omap/include/plat/irqs-44xx.h
+++ /dev/null
@@ -1,144 +0,0 @@
1/*
2 * OMAP4 Interrupt lines definitions
3 *
4 * Copyright (C) 2009-2010 Texas Instruments, Inc.
5 *
6 * Santosh Shilimkar (santosh.shilimkar@ti.com)
7 * Benoit Cousson (b-cousson@ti.com)
8 *
9 * This file is automatically generated from the OMAP hardware databases.
10 * We respectfully ask that any modifications to this file be coordinated
11 * with the public linux-omap@vger.kernel.org mailing list and the
12 * authors above to ensure that the autogeneration scripts are kept
13 * up-to-date with the file contents.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License version 2 as
17 * published by the Free Software Foundation.
18 */
19
20#ifndef __ARCH_ARM_MACH_OMAP2_OMAP44XX_IRQS_H
21#define __ARCH_ARM_MACH_OMAP2_OMAP44XX_IRQS_H
22
23/* OMAP44XX IRQs numbers definitions */
24#define OMAP44XX_IRQ_LOCALTIMER 29
25#define OMAP44XX_IRQ_LOCALWDT 30
26
27#define OMAP44XX_IRQ_GIC_START 32
28
29#define OMAP44XX_IRQ_PL310 (0 + OMAP44XX_IRQ_GIC_START)
30#define OMAP44XX_IRQ_CTI0 (1 + OMAP44XX_IRQ_GIC_START)
31#define OMAP44XX_IRQ_CTI1 (2 + OMAP44XX_IRQ_GIC_START)
32#define OMAP44XX_IRQ_ELM (4 + OMAP44XX_IRQ_GIC_START)
33#define OMAP44XX_IRQ_SYS_1N (7 + OMAP44XX_IRQ_GIC_START)
34#define OMAP44XX_IRQ_SECURITY_EVENTS (8 + OMAP44XX_IRQ_GIC_START)
35#define OMAP44XX_IRQ_L3_DBG (9 + OMAP44XX_IRQ_GIC_START)
36#define OMAP44XX_IRQ_L3_APP (10 + OMAP44XX_IRQ_GIC_START)
37#define OMAP44XX_IRQ_PRCM (11 + OMAP44XX_IRQ_GIC_START)
38#define OMAP44XX_IRQ_SDMA_0 (12 + OMAP44XX_IRQ_GIC_START)
39#define OMAP44XX_IRQ_SDMA_1 (13 + OMAP44XX_IRQ_GIC_START)
40#define OMAP44XX_IRQ_SDMA_2 (14 + OMAP44XX_IRQ_GIC_START)
41#define OMAP44XX_IRQ_SDMA_3 (15 + OMAP44XX_IRQ_GIC_START)
42#define OMAP44XX_IRQ_MCBSP4 (16 + OMAP44XX_IRQ_GIC_START)
43#define OMAP44XX_IRQ_MCBSP1 (17 + OMAP44XX_IRQ_GIC_START)
44#define OMAP44XX_IRQ_SR_MCU (18 + OMAP44XX_IRQ_GIC_START)
45#define OMAP44XX_IRQ_SR_CORE (19 + OMAP44XX_IRQ_GIC_START)
46#define OMAP44XX_IRQ_GPMC (20 + OMAP44XX_IRQ_GIC_START)
47#define OMAP44XX_IRQ_GFX (21 + OMAP44XX_IRQ_GIC_START)
48#define OMAP44XX_IRQ_MCBSP2 (22 + OMAP44XX_IRQ_GIC_START)
49#define OMAP44XX_IRQ_MCBSP3 (23 + OMAP44XX_IRQ_GIC_START)
50#define OMAP44XX_IRQ_ISS_5 (24 + OMAP44XX_IRQ_GIC_START)
51#define OMAP44XX_IRQ_DSS_DISPC (25 + OMAP44XX_IRQ_GIC_START)
52#define OMAP44XX_IRQ_MAIL_U0 (26 + OMAP44XX_IRQ_GIC_START)
53#define OMAP44XX_IRQ_C2C_SSCM_0 (27 + OMAP44XX_IRQ_GIC_START)
54#define OMAP44XX_IRQ_TESLA_MMU (28 + OMAP44XX_IRQ_GIC_START)
55#define OMAP44XX_IRQ_GPIO1 (29 + OMAP44XX_IRQ_GIC_START)
56#define OMAP44XX_IRQ_GPIO2 (30 + OMAP44XX_IRQ_GIC_START)
57#define OMAP44XX_IRQ_GPIO3 (31 + OMAP44XX_IRQ_GIC_START)
58#define OMAP44XX_IRQ_GPIO4 (32 + OMAP44XX_IRQ_GIC_START)
59#define OMAP44XX_IRQ_GPIO5 (33 + OMAP44XX_IRQ_GIC_START)
60#define OMAP44XX_IRQ_GPIO6 (34 + OMAP44XX_IRQ_GIC_START)
61#define OMAP44XX_IRQ_USIM (35 + OMAP44XX_IRQ_GIC_START)
62#define OMAP44XX_IRQ_WDT3 (36 + OMAP44XX_IRQ_GIC_START)
63#define OMAP44XX_IRQ_GPT1 (37 + OMAP44XX_IRQ_GIC_START)
64#define OMAP44XX_IRQ_GPT2 (38 + OMAP44XX_IRQ_GIC_START)
65#define OMAP44XX_IRQ_GPT3 (39 + OMAP44XX_IRQ_GIC_START)
66#define OMAP44XX_IRQ_GPT4 (40 + OMAP44XX_IRQ_GIC_START)
67#define OMAP44XX_IRQ_GPT5 (41 + OMAP44XX_IRQ_GIC_START)
68#define OMAP44XX_IRQ_GPT6 (42 + OMAP44XX_IRQ_GIC_START)
69#define OMAP44XX_IRQ_GPT7 (43 + OMAP44XX_IRQ_GIC_START)
70#define OMAP44XX_IRQ_GPT8 (44 + OMAP44XX_IRQ_GIC_START)
71#define OMAP44XX_IRQ_GPT9 (45 + OMAP44XX_IRQ_GIC_START)
72#define OMAP44XX_IRQ_GPT10 (46 + OMAP44XX_IRQ_GIC_START)
73#define OMAP44XX_IRQ_GPT11 (47 + OMAP44XX_IRQ_GIC_START)
74#define OMAP44XX_IRQ_SPI4 (48 + OMAP44XX_IRQ_GIC_START)
75#define OMAP44XX_IRQ_SHA1_S (49 + OMAP44XX_IRQ_GIC_START)
76#define OMAP44XX_IRQ_FPKA_SINTREQUEST_S (50 + OMAP44XX_IRQ_GIC_START)
77#define OMAP44XX_IRQ_SHA1_P (51 + OMAP44XX_IRQ_GIC_START)
78#define OMAP44XX_IRQ_RNG (52 + OMAP44XX_IRQ_GIC_START)
79#define OMAP44XX_IRQ_DSS_DSI1 (53 + OMAP44XX_IRQ_GIC_START)
80#define OMAP44XX_IRQ_I2C1 (56 + OMAP44XX_IRQ_GIC_START)
81#define OMAP44XX_IRQ_I2C2 (57 + OMAP44XX_IRQ_GIC_START)
82#define OMAP44XX_IRQ_HDQ (58 + OMAP44XX_IRQ_GIC_START)
83#define OMAP44XX_IRQ_MMC5 (59 + OMAP44XX_IRQ_GIC_START)
84#define OMAP44XX_IRQ_I2C3 (61 + OMAP44XX_IRQ_GIC_START)
85#define OMAP44XX_IRQ_I2C4 (62 + OMAP44XX_IRQ_GIC_START)
86#define OMAP44XX_IRQ_AES2_S (63 + OMAP44XX_IRQ_GIC_START)
87#define OMAP44XX_IRQ_AES2_P (64 + OMAP44XX_IRQ_GIC_START)
88#define OMAP44XX_IRQ_SPI1 (65 + OMAP44XX_IRQ_GIC_START)
89#define OMAP44XX_IRQ_SPI2 (66 + OMAP44XX_IRQ_GIC_START)
90#define OMAP44XX_IRQ_HSI_P1 (67 + OMAP44XX_IRQ_GIC_START)
91#define OMAP44XX_IRQ_HSI_P2 (68 + OMAP44XX_IRQ_GIC_START)
92#define OMAP44XX_IRQ_FDIF_3 (69 + OMAP44XX_IRQ_GIC_START)
93#define OMAP44XX_IRQ_UART4 (70 + OMAP44XX_IRQ_GIC_START)
94#define OMAP44XX_IRQ_HSI_DMA (71 + OMAP44XX_IRQ_GIC_START)
95#define OMAP44XX_IRQ_UART1 (72 + OMAP44XX_IRQ_GIC_START)
96#define OMAP44XX_IRQ_UART2 (73 + OMAP44XX_IRQ_GIC_START)
97#define OMAP44XX_IRQ_UART3 (74 + OMAP44XX_IRQ_GIC_START)
98#define OMAP44XX_IRQ_PBIAS (75 + OMAP44XX_IRQ_GIC_START)
99#define OMAP44XX_IRQ_OHCI (76 + OMAP44XX_IRQ_GIC_START)
100#define OMAP44XX_IRQ_EHCI (77 + OMAP44XX_IRQ_GIC_START)
101#define OMAP44XX_IRQ_TLL (78 + OMAP44XX_IRQ_GIC_START)
102#define OMAP44XX_IRQ_AES1_S (79 + OMAP44XX_IRQ_GIC_START)
103#define OMAP44XX_IRQ_WDT2 (80 + OMAP44XX_IRQ_GIC_START)
104#define OMAP44XX_IRQ_DES_S (81 + OMAP44XX_IRQ_GIC_START)
105#define OMAP44XX_IRQ_DES_P (82 + OMAP44XX_IRQ_GIC_START)
106#define OMAP44XX_IRQ_MMC1 (83 + OMAP44XX_IRQ_GIC_START)
107#define OMAP44XX_IRQ_DSS_DSI2 (84 + OMAP44XX_IRQ_GIC_START)
108#define OMAP44XX_IRQ_AES1_P (85 + OMAP44XX_IRQ_GIC_START)
109#define OMAP44XX_IRQ_MMC2 (86 + OMAP44XX_IRQ_GIC_START)
110#define OMAP44XX_IRQ_MPU_ICR (87 + OMAP44XX_IRQ_GIC_START)
111#define OMAP44XX_IRQ_C2C_SSCM_1 (88 + OMAP44XX_IRQ_GIC_START)
112#define OMAP44XX_IRQ_FSUSB (89 + OMAP44XX_IRQ_GIC_START)
113#define OMAP44XX_IRQ_FSUSB_SMI (90 + OMAP44XX_IRQ_GIC_START)
114#define OMAP44XX_IRQ_SPI3 (91 + OMAP44XX_IRQ_GIC_START)
115#define OMAP44XX_IRQ_HS_USB_MC_N (92 + OMAP44XX_IRQ_GIC_START)
116#define OMAP44XX_IRQ_HS_USB_DMA_N (93 + OMAP44XX_IRQ_GIC_START)
117#define OMAP44XX_IRQ_MMC3 (94 + OMAP44XX_IRQ_GIC_START)
118#define OMAP44XX_IRQ_GPT12 (95 + OMAP44XX_IRQ_GIC_START)
119#define OMAP44XX_IRQ_MMC4 (96 + OMAP44XX_IRQ_GIC_START)
120#define OMAP44XX_IRQ_SLIMBUS1 (97 + OMAP44XX_IRQ_GIC_START)
121#define OMAP44XX_IRQ_SLIMBUS2 (98 + OMAP44XX_IRQ_GIC_START)
122#define OMAP44XX_IRQ_ABE (99 + OMAP44XX_IRQ_GIC_START)
123#define OMAP44XX_IRQ_DUCATI_MMU (100 + OMAP44XX_IRQ_GIC_START)
124#define OMAP44XX_IRQ_DSS_HDMI (101 + OMAP44XX_IRQ_GIC_START)
125#define OMAP44XX_IRQ_SR_IVA (102 + OMAP44XX_IRQ_GIC_START)
126#define OMAP44XX_IRQ_IVA_HD_POSYNCITRPEND_1 (103 + OMAP44XX_IRQ_GIC_START)
127#define OMAP44XX_IRQ_IVA_HD_POSYNCITRPEND_0 (104 + OMAP44XX_IRQ_GIC_START)
128#define OMAP44XX_IRQ_IVA_HD_POMBINTRPEND_0 (107 + OMAP44XX_IRQ_GIC_START)
129#define OMAP44XX_IRQ_MCASP1_AR (108 + OMAP44XX_IRQ_GIC_START)
130#define OMAP44XX_IRQ_MCASP1_AX (109 + OMAP44XX_IRQ_GIC_START)
131#define OMAP44XX_IRQ_EMIF4_1 (110 + OMAP44XX_IRQ_GIC_START)
132#define OMAP44XX_IRQ_EMIF4_2 (111 + OMAP44XX_IRQ_GIC_START)
133#define OMAP44XX_IRQ_MCPDM (112 + OMAP44XX_IRQ_GIC_START)
134#define OMAP44XX_IRQ_DMM (113 + OMAP44XX_IRQ_GIC_START)
135#define OMAP44XX_IRQ_DMIC (114 + OMAP44XX_IRQ_GIC_START)
136#define OMAP44XX_IRQ_CDMA_0 (115 + OMAP44XX_IRQ_GIC_START)
137#define OMAP44XX_IRQ_CDMA_1 (116 + OMAP44XX_IRQ_GIC_START)
138#define OMAP44XX_IRQ_CDMA_2 (117 + OMAP44XX_IRQ_GIC_START)
139#define OMAP44XX_IRQ_CDMA_3 (118 + OMAP44XX_IRQ_GIC_START)
140#define OMAP44XX_IRQ_SYS_2N (119 + OMAP44XX_IRQ_GIC_START)
141#define OMAP44XX_IRQ_KBD_CTL (120 + OMAP44XX_IRQ_GIC_START)
142#define OMAP44XX_IRQ_UNIPRO1 (124 + OMAP44XX_IRQ_GIC_START)
143
144#endif
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
deleted file mode 100644
index 37bbbbb981b2..000000000000
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ /dev/null
@@ -1,453 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/irqs.h
3 *
4 * Copyright (C) Greg Lonnon 2001
5 * Updated for OMAP-1610 by Tony Lindgren <tony@atomide.com>
6 *
7 * Copyright (C) 2009 Texas Instruments
8 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * NOTE: The interrupt vectors for the OMAP-1509, OMAP-1510, and OMAP-1610
25 * are different.
26 */
27
28#ifndef __ASM_ARCH_OMAP15XX_IRQS_H
29#define __ASM_ARCH_OMAP15XX_IRQS_H
30
31/* All OMAP4 specific defines are moved to irqs-44xx.h */
32#include "irqs-44xx.h"
33
34/*
35 * IRQ numbers for interrupt handler 1
36 *
37 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
38 *
39 */
40#define INT_CAMERA 1
41#define INT_FIQ 3
42#define INT_RTDX 6
43#define INT_DSP_MMU_ABORT 7
44#define INT_HOST 8
45#define INT_ABORT 9
46#define INT_BRIDGE_PRIV 13
47#define INT_GPIO_BANK1 14
48#define INT_UART3 15
49#define INT_TIMER3 16
50#define INT_DMA_CH0_6 19
51#define INT_DMA_CH1_7 20
52#define INT_DMA_CH2_8 21
53#define INT_DMA_CH3 22
54#define INT_DMA_CH4 23
55#define INT_DMA_CH5 24
56#define INT_DMA_LCD 25
57#define INT_TIMER1 26
58#define INT_WD_TIMER 27
59#define INT_BRIDGE_PUB 28
60#define INT_TIMER2 30
61#define INT_LCD_CTRL 31
62
63/*
64 * OMAP-1510 specific IRQ numbers for interrupt handler 1
65 */
66#define INT_1510_IH2_IRQ 0
67#define INT_1510_RES2 2
68#define INT_1510_SPI_TX 4
69#define INT_1510_SPI_RX 5
70#define INT_1510_DSP_MAILBOX1 10
71#define INT_1510_DSP_MAILBOX2 11
72#define INT_1510_RES12 12
73#define INT_1510_LB_MMU 17
74#define INT_1510_RES18 18
75#define INT_1510_LOCAL_BUS 29
76
77/*
78 * OMAP-1610 specific IRQ numbers for interrupt handler 1
79 */
80#define INT_1610_IH2_IRQ INT_1510_IH2_IRQ
81#define INT_1610_IH2_FIQ 2
82#define INT_1610_McBSP2_TX 4
83#define INT_1610_McBSP2_RX 5
84#define INT_1610_DSP_MAILBOX1 10
85#define INT_1610_DSP_MAILBOX2 11
86#define INT_1610_LCD_LINE 12
87#define INT_1610_GPTIMER1 17
88#define INT_1610_GPTIMER2 18
89#define INT_1610_SSR_FIFO_0 29
90
91/*
92 * OMAP-7xx specific IRQ numbers for interrupt handler 1
93 */
94#define INT_7XX_IH2_FIQ 0
95#define INT_7XX_IH2_IRQ 1
96#define INT_7XX_USB_NON_ISO 2
97#define INT_7XX_USB_ISO 3
98#define INT_7XX_ICR 4
99#define INT_7XX_EAC 5
100#define INT_7XX_GPIO_BANK1 6
101#define INT_7XX_GPIO_BANK2 7
102#define INT_7XX_GPIO_BANK3 8
103#define INT_7XX_McBSP2TX 10
104#define INT_7XX_McBSP2RX 11
105#define INT_7XX_McBSP2RX_OVF 12
106#define INT_7XX_LCD_LINE 14
107#define INT_7XX_GSM_PROTECT 15
108#define INT_7XX_TIMER3 16
109#define INT_7XX_GPIO_BANK5 17
110#define INT_7XX_GPIO_BANK6 18
111#define INT_7XX_SPGIO_WR 29
112
113/*
114 * IRQ numbers for interrupt handler 2
115 *
116 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
117 */
118#define IH2_BASE 32
119
120#define INT_KEYBOARD (1 + IH2_BASE)
121#define INT_uWireTX (2 + IH2_BASE)
122#define INT_uWireRX (3 + IH2_BASE)
123#define INT_I2C (4 + IH2_BASE)
124#define INT_MPUIO (5 + IH2_BASE)
125#define INT_USB_HHC_1 (6 + IH2_BASE)
126#define INT_McBSP3TX (10 + IH2_BASE)
127#define INT_McBSP3RX (11 + IH2_BASE)
128#define INT_McBSP1TX (12 + IH2_BASE)
129#define INT_McBSP1RX (13 + IH2_BASE)
130#define INT_UART1 (14 + IH2_BASE)
131#define INT_UART2 (15 + IH2_BASE)
132#define INT_BT_MCSI1TX (16 + IH2_BASE)
133#define INT_BT_MCSI1RX (17 + IH2_BASE)
134#define INT_SOSSI_MATCH (19 + IH2_BASE)
135#define INT_USB_W2FC (20 + IH2_BASE)
136#define INT_1WIRE (21 + IH2_BASE)
137#define INT_OS_TIMER (22 + IH2_BASE)
138#define INT_MMC (23 + IH2_BASE)
139#define INT_GAUGE_32K (24 + IH2_BASE)
140#define INT_RTC_TIMER (25 + IH2_BASE)
141#define INT_RTC_ALARM (26 + IH2_BASE)
142#define INT_MEM_STICK (27 + IH2_BASE)
143
144/*
145 * OMAP-1510 specific IRQ numbers for interrupt handler 2
146 */
147#define INT_1510_DSP_MMU (28 + IH2_BASE)
148#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
149
150/*
151 * OMAP-1610 specific IRQ numbers for interrupt handler 2
152 */
153#define INT_1610_FAC (0 + IH2_BASE)
154#define INT_1610_USB_HHC_2 (7 + IH2_BASE)
155#define INT_1610_USB_OTG (8 + IH2_BASE)
156#define INT_1610_SoSSI (9 + IH2_BASE)
157#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
158#define INT_1610_DSP_MMU (28 + IH2_BASE)
159#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
160#define INT_1610_STI (32 + IH2_BASE)
161#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
162#define INT_1610_GPTIMER3 (34 + IH2_BASE)
163#define INT_1610_GPTIMER4 (35 + IH2_BASE)
164#define INT_1610_GPTIMER5 (36 + IH2_BASE)
165#define INT_1610_GPTIMER6 (37 + IH2_BASE)
166#define INT_1610_GPTIMER7 (38 + IH2_BASE)
167#define INT_1610_GPTIMER8 (39 + IH2_BASE)
168#define INT_1610_GPIO_BANK2 (40 + IH2_BASE)
169#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
170#define INT_1610_MMC2 (42 + IH2_BASE)
171#define INT_1610_CF (43 + IH2_BASE)
172#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
173#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
174#define INT_1610_SPI (49 + IH2_BASE)
175#define INT_1610_DMA_CH6 (53 + IH2_BASE)
176#define INT_1610_DMA_CH7 (54 + IH2_BASE)
177#define INT_1610_DMA_CH8 (55 + IH2_BASE)
178#define INT_1610_DMA_CH9 (56 + IH2_BASE)
179#define INT_1610_DMA_CH10 (57 + IH2_BASE)
180#define INT_1610_DMA_CH11 (58 + IH2_BASE)
181#define INT_1610_DMA_CH12 (59 + IH2_BASE)
182#define INT_1610_DMA_CH13 (60 + IH2_BASE)
183#define INT_1610_DMA_CH14 (61 + IH2_BASE)
184#define INT_1610_DMA_CH15 (62 + IH2_BASE)
185#define INT_1610_NAND (63 + IH2_BASE)
186#define INT_1610_SHA1MD5 (91 + IH2_BASE)
187
188/*
189 * OMAP-7xx specific IRQ numbers for interrupt handler 2
190 */
191#define INT_7XX_HW_ERRORS (0 + IH2_BASE)
192#define INT_7XX_NFIQ_PWR_FAIL (1 + IH2_BASE)
193#define INT_7XX_CFCD (2 + IH2_BASE)
194#define INT_7XX_CFIREQ (3 + IH2_BASE)
195#define INT_7XX_I2C (4 + IH2_BASE)
196#define INT_7XX_PCC (5 + IH2_BASE)
197#define INT_7XX_MPU_EXT_NIRQ (6 + IH2_BASE)
198#define INT_7XX_SPI_100K_1 (7 + IH2_BASE)
199#define INT_7XX_SYREN_SPI (8 + IH2_BASE)
200#define INT_7XX_VLYNQ (9 + IH2_BASE)
201#define INT_7XX_GPIO_BANK4 (10 + IH2_BASE)
202#define INT_7XX_McBSP1TX (11 + IH2_BASE)
203#define INT_7XX_McBSP1RX (12 + IH2_BASE)
204#define INT_7XX_McBSP1RX_OF (13 + IH2_BASE)
205#define INT_7XX_UART_MODEM_IRDA_2 (14 + IH2_BASE)
206#define INT_7XX_UART_MODEM_1 (15 + IH2_BASE)
207#define INT_7XX_MCSI (16 + IH2_BASE)
208#define INT_7XX_uWireTX (17 + IH2_BASE)
209#define INT_7XX_uWireRX (18 + IH2_BASE)
210#define INT_7XX_SMC_CD (19 + IH2_BASE)
211#define INT_7XX_SMC_IREQ (20 + IH2_BASE)
212#define INT_7XX_HDQ_1WIRE (21 + IH2_BASE)
213#define INT_7XX_TIMER32K (22 + IH2_BASE)
214#define INT_7XX_MMC_SDIO (23 + IH2_BASE)
215#define INT_7XX_UPLD (24 + IH2_BASE)
216#define INT_7XX_USB_HHC_1 (27 + IH2_BASE)
217#define INT_7XX_USB_HHC_2 (28 + IH2_BASE)
218#define INT_7XX_USB_GENI (29 + IH2_BASE)
219#define INT_7XX_USB_OTG (30 + IH2_BASE)
220#define INT_7XX_CAMERA_IF (31 + IH2_BASE)
221#define INT_7XX_RNG (32 + IH2_BASE)
222#define INT_7XX_DUAL_MODE_TIMER (33 + IH2_BASE)
223#define INT_7XX_DBB_RF_EN (34 + IH2_BASE)
224#define INT_7XX_MPUIO_KEYPAD (35 + IH2_BASE)
225#define INT_7XX_SHA1_MD5 (36 + IH2_BASE)
226#define INT_7XX_SPI_100K_2 (37 + IH2_BASE)
227#define INT_7XX_RNG_IDLE (38 + IH2_BASE)
228#define INT_7XX_MPUIO (39 + IH2_BASE)
229#define INT_7XX_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE)
230#define INT_7XX_LLPC_OE_FALLING (41 + IH2_BASE)
231#define INT_7XX_LLPC_OE_RISING (42 + IH2_BASE)
232#define INT_7XX_LLPC_VSYNC (43 + IH2_BASE)
233#define INT_7XX_WAKE_UP_REQ (46 + IH2_BASE)
234#define INT_7XX_DMA_CH6 (53 + IH2_BASE)
235#define INT_7XX_DMA_CH7 (54 + IH2_BASE)
236#define INT_7XX_DMA_CH8 (55 + IH2_BASE)
237#define INT_7XX_DMA_CH9 (56 + IH2_BASE)
238#define INT_7XX_DMA_CH10 (57 + IH2_BASE)
239#define INT_7XX_DMA_CH11 (58 + IH2_BASE)
240#define INT_7XX_DMA_CH12 (59 + IH2_BASE)
241#define INT_7XX_DMA_CH13 (60 + IH2_BASE)
242#define INT_7XX_DMA_CH14 (61 + IH2_BASE)
243#define INT_7XX_DMA_CH15 (62 + IH2_BASE)
244#define INT_7XX_NAND (63 + IH2_BASE)
245
246#define INT_24XX_SYS_NIRQ 7
247#define INT_24XX_SDMA_IRQ0 12
248#define INT_24XX_SDMA_IRQ1 13
249#define INT_24XX_SDMA_IRQ2 14
250#define INT_24XX_SDMA_IRQ3 15
251#define INT_24XX_CAM_IRQ 24
252#define INT_24XX_DSS_IRQ 25
253#define INT_24XX_MAIL_U0_MPU 26
254#define INT_24XX_DSP_UMA 27
255#define INT_24XX_DSP_MMU 28
256#define INT_24XX_GPIO_BANK1 29
257#define INT_24XX_GPIO_BANK2 30
258#define INT_24XX_GPIO_BANK3 31
259#define INT_24XX_GPIO_BANK4 32
260#define INT_24XX_GPIO_BANK5 33
261#define INT_24XX_MAIL_U3_MPU 34
262#define INT_24XX_GPTIMER1 37
263#define INT_24XX_GPTIMER2 38
264#define INT_24XX_GPTIMER3 39
265#define INT_24XX_GPTIMER4 40
266#define INT_24XX_GPTIMER5 41
267#define INT_24XX_GPTIMER6 42
268#define INT_24XX_GPTIMER7 43
269#define INT_24XX_GPTIMER8 44
270#define INT_24XX_GPTIMER9 45
271#define INT_24XX_GPTIMER10 46
272#define INT_24XX_GPTIMER11 47
273#define INT_24XX_GPTIMER12 48
274#define INT_24XX_SHA1MD5 51
275#define INT_24XX_MCBSP4_IRQ_TX 54
276#define INT_24XX_MCBSP4_IRQ_RX 55
277#define INT_24XX_I2C1_IRQ 56
278#define INT_24XX_I2C2_IRQ 57
279#define INT_24XX_HDQ_IRQ 58
280#define INT_24XX_MCBSP1_IRQ_TX 59
281#define INT_24XX_MCBSP1_IRQ_RX 60
282#define INT_24XX_MCBSP2_IRQ_TX 62
283#define INT_24XX_MCBSP2_IRQ_RX 63
284#define INT_24XX_SPI1_IRQ 65
285#define INT_24XX_SPI2_IRQ 66
286#define INT_24XX_UART1_IRQ 72
287#define INT_24XX_UART2_IRQ 73
288#define INT_24XX_UART3_IRQ 74
289#define INT_24XX_USB_IRQ_GEN 75
290#define INT_24XX_USB_IRQ_NISO 76
291#define INT_24XX_USB_IRQ_ISO 77
292#define INT_24XX_USB_IRQ_HGEN 78
293#define INT_24XX_USB_IRQ_HSOF 79
294#define INT_24XX_USB_IRQ_OTG 80
295#define INT_24XX_MCBSP5_IRQ_TX 81
296#define INT_24XX_MCBSP5_IRQ_RX 82
297#define INT_24XX_MMC_IRQ 83
298#define INT_24XX_MMC2_IRQ 86
299#define INT_24XX_MCBSP3_IRQ_TX 89
300#define INT_24XX_MCBSP3_IRQ_RX 90
301#define INT_24XX_SPI3_IRQ 91
302
303#define INT_243X_MCBSP2_IRQ 16
304#define INT_243X_MCBSP3_IRQ 17
305#define INT_243X_MCBSP4_IRQ 18
306#define INT_243X_MCBSP5_IRQ 19
307#define INT_243X_MCBSP1_IRQ 64
308#define INT_243X_HS_USB_MC 92
309#define INT_243X_HS_USB_DMA 93
310#define INT_243X_CARKIT_IRQ 94
311
312#define INT_34XX_BENCH_MPU_EMUL 3
313#define INT_34XX_ST_MCBSP2_IRQ 4
314#define INT_34XX_ST_MCBSP3_IRQ 5
315#define INT_34XX_SSM_ABORT_IRQ 6
316#define INT_34XX_SYS_NIRQ 7
317#define INT_34XX_D2D_FW_IRQ 8
318#define INT_34XX_L3_DBG_IRQ 9
319#define INT_34XX_L3_APP_IRQ 10
320#define INT_34XX_PRCM_MPU_IRQ 11
321#define INT_34XX_MCBSP1_IRQ 16
322#define INT_34XX_MCBSP2_IRQ 17
323#define INT_34XX_GPMC_IRQ 20
324#define INT_34XX_MCBSP3_IRQ 22
325#define INT_34XX_MCBSP4_IRQ 23
326#define INT_34XX_CAM_IRQ 24
327#define INT_34XX_MCBSP5_IRQ 27
328#define INT_34XX_GPIO_BANK1 29
329#define INT_34XX_GPIO_BANK2 30
330#define INT_34XX_GPIO_BANK3 31
331#define INT_34XX_GPIO_BANK4 32
332#define INT_34XX_GPIO_BANK5 33
333#define INT_34XX_GPIO_BANK6 34
334#define INT_34XX_USIM_IRQ 35
335#define INT_34XX_WDT3_IRQ 36
336#define INT_34XX_SPI4_IRQ 48
337#define INT_34XX_SHA1MD52_IRQ 49
338#define INT_34XX_FPKA_READY_IRQ 50
339#define INT_34XX_SHA1MD51_IRQ 51
340#define INT_34XX_RNG_IRQ 52
341#define INT_34XX_I2C3_IRQ 61
342#define INT_34XX_FPKA_ERROR_IRQ 64
343#define INT_34XX_PBIAS_IRQ 75
344#define INT_34XX_OHCI_IRQ 76
345#define INT_34XX_EHCI_IRQ 77
346#define INT_34XX_TLL_IRQ 78
347#define INT_34XX_PARTHASH_IRQ 79
348#define INT_34XX_MMC3_IRQ 94
349#define INT_34XX_GPT12_IRQ 95
350
351#define INT_36XX_UART4_IRQ 80
352
353#define INT_35XX_HECC0_IRQ 24
354#define INT_35XX_HECC1_IRQ 28
355#define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67
356#define INT_35XX_EMAC_C0_RX_PULSE_IRQ 68
357#define INT_35XX_EMAC_C0_TX_PULSE_IRQ 69
358#define INT_35XX_EMAC_C0_MISC_PULSE_IRQ 70
359#define INT_35XX_USBOTG_IRQ 71
360#define INT_35XX_UART4_IRQ 84
361#define INT_35XX_CCDC_VD0_IRQ 88
362#define INT_35XX_CCDC_VD1_IRQ 92
363#define INT_35XX_CCDC_VD2_IRQ 93
364
365/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730/850) and
366 * 16 MPUIO lines */
367#define OMAP_MAX_GPIO_LINES 192
368#define IH_GPIO_BASE (128 + IH2_BASE)
369#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
370#define OMAP_IRQ_END (IH_MPUIO_BASE + 16)
371
372/* External FPGA handles interrupts on Innovator boards */
373#define OMAP_FPGA_IRQ_BASE (OMAP_IRQ_END)
374#ifdef CONFIG_MACH_OMAP_INNOVATOR
375#define OMAP_FPGA_NR_IRQS 24
376#else
377#define OMAP_FPGA_NR_IRQS 0
378#endif
379#define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS)
380
381/* External TWL4030 can handle interrupts on 2430 and 34xx boards */
382#define TWL4030_IRQ_BASE (OMAP_FPGA_IRQ_END)
383#ifdef CONFIG_TWL4030_CORE
384#define TWL4030_BASE_NR_IRQS 8
385#define TWL4030_PWR_NR_IRQS 8
386#else
387#define TWL4030_BASE_NR_IRQS 0
388#define TWL4030_PWR_NR_IRQS 0
389#endif
390#define TWL4030_IRQ_END (TWL4030_IRQ_BASE + TWL4030_BASE_NR_IRQS)
391#define TWL4030_PWR_IRQ_BASE TWL4030_IRQ_END
392#define TWL4030_PWR_IRQ_END (TWL4030_PWR_IRQ_BASE + TWL4030_PWR_NR_IRQS)
393
394/* External TWL4030 gpio interrupts are optional */
395#define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END
396#ifdef CONFIG_GPIO_TWL4030
397#define TWL4030_GPIO_NR_IRQS 18
398#else
399#define TWL4030_GPIO_NR_IRQS 0
400#endif
401#define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS)
402
403#define TWL6030_IRQ_BASE (OMAP_FPGA_IRQ_END)
404#ifdef CONFIG_TWL4030_CORE
405#define TWL6030_BASE_NR_IRQS 20
406#else
407#define TWL6030_BASE_NR_IRQS 0
408#endif
409#define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS)
410
411#define TWL6040_CODEC_IRQ_BASE TWL6030_IRQ_END
412#ifdef CONFIG_TWL6040_CODEC
413#define TWL6040_CODEC_NR_IRQS 6
414#else
415#define TWL6040_CODEC_NR_IRQS 0
416#endif
417#define TWL6040_CODEC_IRQ_END (TWL6040_CODEC_IRQ_BASE + TWL6040_CODEC_NR_IRQS)
418
419/* Total number of interrupts depends on the enabled blocks above */
420#if (TWL4030_GPIO_IRQ_END > TWL6040_CODEC_IRQ_END)
421#define TWL_IRQ_END TWL4030_GPIO_IRQ_END
422#else
423#define TWL_IRQ_END TWL6040_CODEC_IRQ_END
424#endif
425
426/* GPMC related */
427#define OMAP_GPMC_IRQ_BASE (TWL_IRQ_END)
428#define OMAP_GPMC_NR_IRQS 8
429#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
430
431/* PRCM IRQ handler */
432#ifdef CONFIG_ARCH_OMAP2PLUS
433#define OMAP_PRCM_IRQ_BASE (OMAP_GPMC_IRQ_END)
434#define OMAP_PRCM_NR_IRQS 64
435#define OMAP_PRCM_IRQ_END (OMAP_PRCM_IRQ_BASE + OMAP_PRCM_NR_IRQS)
436#else
437#define OMAP_PRCM_IRQ_END OMAP_GPMC_IRQ_END
438#endif
439
440#define NR_IRQS OMAP_PRCM_IRQ_END
441
442#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
443
444#define INTCPS_NR_MIR_REGS 3
445#define INTCPS_NR_IRQS 96
446
447#include <mach/hardware.h>
448
449#ifdef CONFIG_FIQ
450#define FIQ_START 1024
451#endif
452
453#endif
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h
index eb3e4d555343..8b4e4f2da2f5 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -15,7 +15,6 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/mmc/host.h> 16#include <linux/mmc/host.h>
17 17
18#include <plat/board.h>
19#include <plat/omap_hwmod.h> 18#include <plat/omap_hwmod.h>
20 19
21#define OMAP15XX_NR_MMC 1 20#define OMAP15XX_NR_MMC 1
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index 67fc5060183e..1a68c1e5fe53 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -24,11 +24,10 @@ struct omap_nand_platform_data {
24 struct gpmc_timings *gpmc_t; 24 struct gpmc_timings *gpmc_t;
25 int nr_parts; 25 int nr_parts;
26 bool dev_ready; 26 bool dev_ready;
27 int gpmc_irq;
28 enum nand_io xfer_type; 27 enum nand_io xfer_type;
29 unsigned long phys_base;
30 int devsize; 28 int devsize;
31 enum omap_ecc ecc_opt; 29 enum omap_ecc ecc_opt;
30 struct gpmc_nand_regs reg;
32}; 31};
33 32
34/* minimum size for IO mapping */ 33/* minimum size for IO mapping */
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h
index 1a52725ffcf2..a531149823bb 100644
--- a/arch/arm/plat-omap/include/plat/omap-serial.h
+++ b/arch/arm/plat-omap/include/plat/omap-serial.h
@@ -18,7 +18,7 @@
18#define __OMAP_SERIAL_H__ 18#define __OMAP_SERIAL_H__
19 19
20#include <linux/serial_core.h> 20#include <linux/serial_core.h>
21#include <linux/platform_device.h> 21#include <linux/device.h>
22#include <linux/pm_qos.h> 22#include <linux/pm_qos.h>
23 23
24#include <plat/mux.h> 24#include <plat/mux.h>
@@ -42,10 +42,10 @@
42#define OMAP_UART_WER_MOD_WKUP 0X7F 42#define OMAP_UART_WER_MOD_WKUP 0X7F
43 43
44/* Enable XON/XOFF flow control on output */ 44/* Enable XON/XOFF flow control on output */
45#define OMAP_UART_SW_TX 0x04 45#define OMAP_UART_SW_TX 0x8
46 46
47/* Enable XON/XOFF flow control on input */ 47/* Enable XON/XOFF flow control on input */
48#define OMAP_UART_SW_RX 0x04 48#define OMAP_UART_SW_RX 0x2
49 49
50#define OMAP_UART_SYSC_RESET 0X07 50#define OMAP_UART_SYSC_RESET 0X07
51#define OMAP_UART_TCR_TRIG 0X0F 51#define OMAP_UART_TCR_TRIG 0X0F
@@ -69,11 +69,14 @@ struct omap_uart_port_info {
69 unsigned int dma_rx_timeout; 69 unsigned int dma_rx_timeout;
70 unsigned int autosuspend_timeout; 70 unsigned int autosuspend_timeout;
71 unsigned int dma_rx_poll_rate; 71 unsigned int dma_rx_poll_rate;
72 int DTR_gpio;
73 int DTR_inverted;
74 int DTR_present;
72 75
73 int (*get_context_loss_count)(struct device *); 76 int (*get_context_loss_count)(struct device *);
74 void (*set_forceidle)(struct platform_device *); 77 void (*set_forceidle)(struct device *);
75 void (*set_noidle)(struct platform_device *); 78 void (*set_noidle)(struct device *);
76 void (*enable_wakeup)(struct platform_device *, bool); 79 void (*enable_wakeup)(struct device *, bool);
77}; 80};
78 81
79struct uart_omap_dma { 82struct uart_omap_dma {
@@ -102,39 +105,4 @@ struct uart_omap_dma {
102 unsigned int rx_timeout; 105 unsigned int rx_timeout;
103}; 106};
104 107
105struct uart_omap_port {
106 struct uart_port port;
107 struct uart_omap_dma uart_dma;
108 struct platform_device *pdev;
109
110 unsigned char ier;
111 unsigned char lcr;
112 unsigned char mcr;
113 unsigned char fcr;
114 unsigned char efr;
115 unsigned char dll;
116 unsigned char dlh;
117 unsigned char mdr1;
118 unsigned char scr;
119
120 int use_dma;
121 /*
122 * Some bits in registers are cleared on a read, so they must
123 * be saved whenever the register is read but the bits will not
124 * be immediately processed.
125 */
126 unsigned int lsr_break_flag;
127 unsigned char msr_saved_flags;
128 char name[20];
129 unsigned long port_activity;
130 u32 context_loss_cnt;
131 u32 errata;
132 u8 wakeups_enabled;
133
134 struct pm_qos_request pm_qos_request;
135 u32 latency;
136 u32 calc_latency;
137 struct work_struct qos_work;
138};
139
140#endif /* __OMAP_SERIAL_H__ */ 108#endif /* __OMAP_SERIAL_H__ */
diff --git a/arch/arm/plat-omap/include/plat/omap4-keypad.h b/arch/arm/plat-omap/include/plat/omap4-keypad.h
index 8ad0a377a54b..20de0d5a7e77 100644
--- a/arch/arm/plat-omap/include/plat/omap4-keypad.h
+++ b/arch/arm/plat-omap/include/plat/omap4-keypad.h
@@ -1,6 +1,8 @@
1#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H 1#ifndef ARCH_ARM_PLAT_OMAP4_KEYPAD_H
2#define ARCH_ARM_PLAT_OMAP4_KEYPAD_H 2#define ARCH_ARM_PLAT_OMAP4_KEYPAD_H
3 3
4struct omap_board_data;
5
4extern int omap4_keyboard_init(struct omap4_keypad_platform_data *, 6extern int omap4_keyboard_init(struct omap4_keypad_platform_data *,
5 struct omap_board_data *); 7 struct omap_board_data *);
6#endif 8#endif
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 4327b2c90c3d..27bcc2441195 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -118,6 +118,10 @@ int omap_device_get_context_loss_count(struct platform_device *pdev);
118 118
119/* Other */ 119/* Other */
120 120
121int omap_device_assert_hardreset(struct platform_device *pdev,
122 const char *name);
123int omap_device_deassert_hardreset(struct platform_device *pdev,
124 const char *name);
121int omap_device_idle_hwmods(struct omap_device *od); 125int omap_device_idle_hwmods(struct omap_device *od);
122int omap_device_enable_hwmods(struct omap_device *od); 126int omap_device_enable_hwmods(struct omap_device *od);
123 127
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 6132972aff37..09e14ce3ec57 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -2,7 +2,7 @@
2 * omap_hwmod macros, structures 2 * omap_hwmod macros, structures
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc. 5 * Copyright (C) 2012 Texas Instruments, Inc.
6 * Paul Walmsley 6 * Paul Walmsley
7 * 7 *
8 * Created in collaboration with (alphabetical order): Benoît Cousson, 8 * Created in collaboration with (alphabetical order): Benoît Cousson,
@@ -384,21 +384,38 @@ struct omap_hwmod_omap2_prcm {
384 u8 idlest_stdby_bit; 384 u8 idlest_stdby_bit;
385}; 385};
386 386
387/*
388 * Possible values for struct omap_hwmod_omap4_prcm.flags
389 *
390 * HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM
391 * module-level context loss register associated with them; this
392 * flag bit should be set in those cases
393 */
394#define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0)
387 395
388/** 396/**
389 * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data 397 * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data
390 * @clkctrl_reg: PRCM address of the clock control register 398 * @clkctrl_reg: PRCM address of the clock control register
391 * @rstctrl_reg: address of the XXX_RSTCTRL register located in the PRM 399 * @rstctrl_reg: address of the XXX_RSTCTRL register located in the PRM
400 * @lostcontext_mask: bitmask for selecting bits from RM_*_CONTEXT register
392 * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM 401 * @rstst_reg: (AM33XX only) address of the XXX_RSTST register in the PRM
393 * @submodule_wkdep_bit: bit shift of the WKDEP range 402 * @submodule_wkdep_bit: bit shift of the WKDEP range
403 * @flags: PRCM register capabilities for this IP block
404 *
405 * If @lostcontext_mask is not defined, context loss check code uses
406 * whole register without masking. @lostcontext_mask should only be
407 * defined in cases where @context_offs register is shared by two or
408 * more hwmods.
394 */ 409 */
395struct omap_hwmod_omap4_prcm { 410struct omap_hwmod_omap4_prcm {
396 u16 clkctrl_offs; 411 u16 clkctrl_offs;
397 u16 rstctrl_offs; 412 u16 rstctrl_offs;
398 u16 rstst_offs; 413 u16 rstst_offs;
399 u16 context_offs; 414 u16 context_offs;
415 u32 lostcontext_mask;
400 u8 submodule_wkdep_bit; 416 u8 submodule_wkdep_bit;
401 u8 modulemode; 417 u8 modulemode;
418 u8 flags;
402}; 419};
403 420
404 421
@@ -591,9 +608,7 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
591int __init omap_hwmod_setup_one(const char *name); 608int __init omap_hwmod_setup_one(const char *name);
592 609
593int omap_hwmod_enable(struct omap_hwmod *oh); 610int omap_hwmod_enable(struct omap_hwmod *oh);
594int _omap_hwmod_enable(struct omap_hwmod *oh);
595int omap_hwmod_idle(struct omap_hwmod *oh); 611int omap_hwmod_idle(struct omap_hwmod *oh);
596int _omap_hwmod_idle(struct omap_hwmod *oh);
597int omap_hwmod_shutdown(struct omap_hwmod *oh); 612int omap_hwmod_shutdown(struct omap_hwmod *oh);
598 613
599int omap_hwmod_assert_hardreset(struct omap_hwmod *oh, const char *name); 614int omap_hwmod_assert_hardreset(struct omap_hwmod *oh, const char *name);
@@ -626,11 +641,6 @@ int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh,
626int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh, 641int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
627 struct omap_hwmod *init_oh); 642 struct omap_hwmod *init_oh);
628 643
629int omap_hwmod_set_clockact_both(struct omap_hwmod *oh);
630int omap_hwmod_set_clockact_main(struct omap_hwmod *oh);
631int omap_hwmod_set_clockact_iclk(struct omap_hwmod *oh);
632int omap_hwmod_set_clockact_none(struct omap_hwmod *oh);
633
634int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); 644int omap_hwmod_enable_wakeup(struct omap_hwmod *oh);
635int omap_hwmod_disable_wakeup(struct omap_hwmod *oh); 645int omap_hwmod_disable_wakeup(struct omap_hwmod *oh);
636 646
@@ -658,6 +668,7 @@ extern int omap2420_hwmod_init(void);
658extern int omap2430_hwmod_init(void); 668extern int omap2430_hwmod_init(void);
659extern int omap3xxx_hwmod_init(void); 669extern int omap3xxx_hwmod_init(void);
660extern int omap44xx_hwmod_init(void); 670extern int omap44xx_hwmod_init(void);
671extern int am33xx_hwmod_init(void);
661 672
662extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois); 673extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
663 674
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 548a4c8d63df..bd20588c356b 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -5,7 +5,6 @@
5 5
6#include <linux/io.h> 6#include <linux/io.h>
7#include <linux/usb/musb.h> 7#include <linux/usb/musb.h>
8#include <plat/board.h>
9 8
10#define OMAP3_HS_USB_PORTS 3 9#define OMAP3_HS_USB_PORTS 3
11 10
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
index cff8712122bb..fd0d3aad00ef 100644
--- a/arch/arm/plat-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -76,7 +76,7 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
76 return -ENODEV; 76 return -ENODEV;
77 } 77 }
78 78
79 reg = (struct pin_config *)&mux_cfg->pins[index]; 79 reg = &mux_cfg->pins[index];
80 80
81 if (!mux_cfg->cfg_reg) 81 if (!mux_cfg->cfg_reg)
82 return -ENODEV; 82 return -ENODEV;
diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c
index 5a97b4d98d41..9f6413324df9 100644
--- a/arch/arm/plat-omap/omap-pm-noop.c
+++ b/arch/arm/plat-omap/omap-pm-noop.c
@@ -41,11 +41,11 @@ int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
41 }; 41 };
42 42
43 if (t == -1) 43 if (t == -1)
44 pr_debug("OMAP PM: remove max MPU wakeup latency constraint: " 44 pr_debug("OMAP PM: remove max MPU wakeup latency constraint: dev %s\n",
45 "dev %s\n", dev_name(dev)); 45 dev_name(dev));
46 else 46 else
47 pr_debug("OMAP PM: add max MPU wakeup latency constraint: " 47 pr_debug("OMAP PM: add max MPU wakeup latency constraint: dev %s, t = %ld usec\n",
48 "dev %s, t = %ld usec\n", dev_name(dev), t); 48 dev_name(dev), t);
49 49
50 /* 50 /*
51 * For current Linux, this needs to map the MPU to a 51 * For current Linux, this needs to map the MPU to a
@@ -70,11 +70,10 @@ int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
70 }; 70 };
71 71
72 if (r == 0) 72 if (r == 0)
73 pr_debug("OMAP PM: remove min bus tput constraint: " 73 pr_debug("OMAP PM: remove min bus tput constraint: dev %s for agent_id %d\n",
74 "dev %s for agent_id %d\n", dev_name(dev), agent_id); 74 dev_name(dev), agent_id);
75 else 75 else
76 pr_debug("OMAP PM: add min bus tput constraint: " 76 pr_debug("OMAP PM: add min bus tput constraint: dev %s for agent_id %d: rate %ld KiB\n",
77 "dev %s for agent_id %d: rate %ld KiB\n",
78 dev_name(dev), agent_id, r); 77 dev_name(dev), agent_id, r);
79 78
80 /* 79 /*
@@ -97,11 +96,11 @@ int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
97 }; 96 };
98 97
99 if (t == -1) 98 if (t == -1)
100 pr_debug("OMAP PM: remove max device latency constraint: " 99 pr_debug("OMAP PM: remove max device latency constraint: dev %s\n",
101 "dev %s\n", dev_name(dev)); 100 dev_name(dev));
102 else 101 else
103 pr_debug("OMAP PM: add max device latency constraint: " 102 pr_debug("OMAP PM: add max device latency constraint: dev %s, t = %ld usec\n",
104 "dev %s, t = %ld usec\n", dev_name(dev), t); 103 dev_name(dev), t);
105 104
106 /* 105 /*
107 * For current Linux, this needs to map the device to a 106 * For current Linux, this needs to map the device to a
@@ -127,11 +126,11 @@ int omap_pm_set_max_sdma_lat(struct device *dev, long t)
127 }; 126 };
128 127
129 if (t == -1) 128 if (t == -1)
130 pr_debug("OMAP PM: remove max DMA latency constraint: " 129 pr_debug("OMAP PM: remove max DMA latency constraint: dev %s\n",
131 "dev %s\n", dev_name(dev)); 130 dev_name(dev));
132 else 131 else
133 pr_debug("OMAP PM: add max DMA latency constraint: " 132 pr_debug("OMAP PM: add max DMA latency constraint: dev %s, t = %ld usec\n",
134 "dev %s, t = %ld usec\n", dev_name(dev), t); 133 dev_name(dev), t);
135 134
136 /* 135 /*
137 * For current Linux PM QOS params, this code should scan the 136 * For current Linux PM QOS params, this code should scan the
@@ -156,11 +155,11 @@ int omap_pm_set_min_clk_rate(struct device *dev, struct clk *c, long r)
156 } 155 }
157 156
158 if (r == 0) 157 if (r == 0)
159 pr_debug("OMAP PM: remove min clk rate constraint: " 158 pr_debug("OMAP PM: remove min clk rate constraint: dev %s\n",
160 "dev %s\n", dev_name(dev)); 159 dev_name(dev));
161 else 160 else
162 pr_debug("OMAP PM: add min clk rate constraint: " 161 pr_debug("OMAP PM: add min clk rate constraint: dev %s, rate = %ld Hz\n",
163 "dev %s, rate = %ld Hz\n", dev_name(dev), r); 162 dev_name(dev), r);
164 163
165 /* 164 /*
166 * Code in a real implementation should keep track of these 165 * Code in a real implementation should keep track of these
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index c490240bb82c..5b6974269107 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -1,4 +1,3 @@
1
2/* 1/*
3 * omap_device implementation 2 * omap_device implementation
4 * 3 *
@@ -153,21 +152,19 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
153 act_lat = timespec_to_ns(&c); 152 act_lat = timespec_to_ns(&c);
154 153
155 dev_dbg(&od->pdev->dev, 154 dev_dbg(&od->pdev->dev,
156 "omap_device: pm_lat %d: activate: elapsed time " 155 "omap_device: pm_lat %d: activate: elapsed time %llu nsec\n",
157 "%llu nsec\n", od->pm_lat_level, act_lat); 156 od->pm_lat_level, act_lat);
158 157
159 if (act_lat > odpl->activate_lat) { 158 if (act_lat > odpl->activate_lat) {
160 odpl->activate_lat_worst = act_lat; 159 odpl->activate_lat_worst = act_lat;
161 if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) { 160 if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
162 odpl->activate_lat = act_lat; 161 odpl->activate_lat = act_lat;
163 dev_dbg(&od->pdev->dev, 162 dev_dbg(&od->pdev->dev,
164 "new worst case activate latency " 163 "new worst case activate latency %d: %llu\n",
165 "%d: %llu\n",
166 od->pm_lat_level, act_lat); 164 od->pm_lat_level, act_lat);
167 } else 165 } else
168 dev_warn(&od->pdev->dev, 166 dev_warn(&od->pdev->dev,
169 "activate latency %d " 167 "activate latency %d higher than expected. (%llu > %d)\n",
170 "higher than exptected. (%llu > %d)\n",
171 od->pm_lat_level, act_lat, 168 od->pm_lat_level, act_lat,
172 odpl->activate_lat); 169 odpl->activate_lat);
173 } 170 }
@@ -220,21 +217,19 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
220 deact_lat = timespec_to_ns(&c); 217 deact_lat = timespec_to_ns(&c);
221 218
222 dev_dbg(&od->pdev->dev, 219 dev_dbg(&od->pdev->dev,
223 "omap_device: pm_lat %d: deactivate: elapsed time " 220 "omap_device: pm_lat %d: deactivate: elapsed time %llu nsec\n",
224 "%llu nsec\n", od->pm_lat_level, deact_lat); 221 od->pm_lat_level, deact_lat);
225 222
226 if (deact_lat > odpl->deactivate_lat) { 223 if (deact_lat > odpl->deactivate_lat) {
227 odpl->deactivate_lat_worst = deact_lat; 224 odpl->deactivate_lat_worst = deact_lat;
228 if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) { 225 if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
229 odpl->deactivate_lat = deact_lat; 226 odpl->deactivate_lat = deact_lat;
230 dev_dbg(&od->pdev->dev, 227 dev_dbg(&od->pdev->dev,
231 "new worst case deactivate latency " 228 "new worst case deactivate latency %d: %llu\n",
232 "%d: %llu\n",
233 od->pm_lat_level, deact_lat); 229 od->pm_lat_level, deact_lat);
234 } else 230 } else
235 dev_warn(&od->pdev->dev, 231 dev_warn(&od->pdev->dev,
236 "deactivate latency %d " 232 "deactivate latency %d higher than expected. (%llu > %d)\n",
237 "higher than exptected. (%llu > %d)\n",
238 od->pm_lat_level, deact_lat, 233 od->pm_lat_level, deact_lat,
239 odpl->deactivate_lat); 234 odpl->deactivate_lat);
240 } 235 }
@@ -266,10 +261,10 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias,
266 return; 261 return;
267 } 262 }
268 263
269 r = omap_clk_get_by_name(clk_name); 264 r = clk_get(NULL, clk_name);
270 if (IS_ERR(r)) { 265 if (IS_ERR(r)) {
271 dev_err(&od->pdev->dev, 266 dev_err(&od->pdev->dev,
272 "omap_clk_get_by_name for %s failed\n", clk_name); 267 "clk_get for %s failed\n", clk_name);
273 return; 268 return;
274 } 269 }
275 270
@@ -449,8 +444,8 @@ static int omap_device_count_resources(struct omap_device *od)
449 for (i = 0; i < od->hwmods_cnt; i++) 444 for (i = 0; i < od->hwmods_cnt; i++)
450 c += omap_hwmod_count_resources(od->hwmods[i]); 445 c += omap_hwmod_count_resources(od->hwmods[i]);
451 446
452 pr_debug("omap_device: %s: counted %d total resources across %d " 447 pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
453 "hwmods\n", od->pdev->name, c, od->hwmods_cnt); 448 od->pdev->name, c, od->hwmods_cnt);
454 449
455 return c; 450 return c;
456} 451}
@@ -925,6 +920,61 @@ int omap_device_shutdown(struct platform_device *pdev)
925} 920}
926 921
927/** 922/**
923 * omap_device_assert_hardreset - set a device's hardreset line
924 * @pdev: struct platform_device * to reset
925 * @name: const char * name of the reset line
926 *
927 * Set the hardreset line identified by @name on the IP blocks
928 * associated with the hwmods backing the platform_device @pdev. All
929 * of the hwmods associated with @pdev must have the same hardreset
930 * line linked to them for this to work. Passes along the return value
931 * of omap_hwmod_assert_hardreset() in the event of any failure, or
932 * returns 0 upon success.
933 */
934int omap_device_assert_hardreset(struct platform_device *pdev, const char *name)
935{
936 struct omap_device *od = to_omap_device(pdev);
937 int ret = 0;
938 int i;
939
940 for (i = 0; i < od->hwmods_cnt; i++) {
941 ret = omap_hwmod_assert_hardreset(od->hwmods[i], name);
942 if (ret)
943 break;
944 }
945
946 return ret;
947}
948
949/**
950 * omap_device_deassert_hardreset - release a device's hardreset line
951 * @pdev: struct platform_device * to reset
952 * @name: const char * name of the reset line
953 *
954 * Release the hardreset line identified by @name on the IP blocks
955 * associated with the hwmods backing the platform_device @pdev. All
956 * of the hwmods associated with @pdev must have the same hardreset
957 * line linked to them for this to work. Passes along the return
958 * value of omap_hwmod_deassert_hardreset() in the event of any
959 * failure, or returns 0 upon success.
960 */
961int omap_device_deassert_hardreset(struct platform_device *pdev,
962 const char *name)
963{
964 struct omap_device *od = to_omap_device(pdev);
965 int ret = 0;
966 int i;
967
968 for (i = 0; i < od->hwmods_cnt; i++) {
969 ret = omap_hwmod_deassert_hardreset(od->hwmods[i], name);
970 if (ret)
971 break;
972 }
973
974 return ret;
975}
976
977/**
928 * omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim 978 * omap_device_align_pm_lat - activate/deactivate device to match wakeup lat lim
929 * @od: struct omap_device * 979 * @od: struct omap_device *
930 * 980 *
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 024f3b08db29..28acb383e7df 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -26,7 +26,6 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <plat/sram.h> 28#include <plat/sram.h>
29#include <plat/board.h>
30#include <plat/cpu.h> 29#include <plat/cpu.h>
31 30
32#include "sram.h" 31#include "sram.h"
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index c34785dca92b..ec536e4e36c9 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -338,7 +338,7 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
338{ 338{
339 /* Handle turning off CRTSCTS */ 339 /* Handle turning off CRTSCTS */
340 if ((old_termios->c_cflag & CRTSCTS) && 340 if ((old_termios->c_cflag & CRTSCTS) &&
341 !(tty->termios->c_cflag & CRTSCTS)) { 341 !(tty->termios.c_cflag & CRTSCTS)) {
342 tty->hw_stopped = 0; 342 tty->hw_stopped = 0;
343 } 343 }
344} 344}
@@ -545,6 +545,7 @@ static int __init simrs_init(void)
545 /* the port is imaginary */ 545 /* the port is imaginary */
546 printk(KERN_INFO "ttyS0 at 0x03f8 (irq = %d) is a 16550\n", state->irq); 546 printk(KERN_INFO "ttyS0 at 0x03f8 (irq = %d) is a 16550\n", state->irq);
547 547
548 tty_port_link_device(&state->port, hp_simserial_driver, 0);
548 retval = tty_register_driver(hp_simserial_driver); 549 retval = tty_register_driver(hp_simserial_driver);
549 if (retval) { 550 if (retval) {
550 printk(KERN_ERR "Couldn't register simserial driver\n"); 551 printk(KERN_ERR "Couldn't register simserial driver\n");
diff --git a/arch/m68k/emu/nfcon.c b/arch/m68k/emu/nfcon.c
index 8db25e806947..16d170f53bfd 100644
--- a/arch/m68k/emu/nfcon.c
+++ b/arch/m68k/emu/nfcon.c
@@ -19,6 +19,7 @@
19#include <asm/natfeat.h> 19#include <asm/natfeat.h>
20 20
21static int stderr_id; 21static int stderr_id;
22static struct tty_port nfcon_tty_port;
22static struct tty_driver *nfcon_tty_driver; 23static struct tty_driver *nfcon_tty_driver;
23 24
24static void nfputs(const char *str, unsigned int count) 25static void nfputs(const char *str, unsigned int count)
@@ -119,6 +120,8 @@ static int __init nfcon_init(void)
119{ 120{
120 int res; 121 int res;
121 122
123 tty_port_init(&nfcon_tty_port);
124
122 stderr_id = nf_get_id("NF_STDERR"); 125 stderr_id = nf_get_id("NF_STDERR");
123 if (!stderr_id) 126 if (!stderr_id)
124 return -ENODEV; 127 return -ENODEV;
@@ -135,6 +138,7 @@ static int __init nfcon_init(void)
135 nfcon_tty_driver->flags = TTY_DRIVER_REAL_RAW; 138 nfcon_tty_driver->flags = TTY_DRIVER_REAL_RAW;
136 139
137 tty_set_operations(nfcon_tty_driver, &nfcon_tty_ops); 140 tty_set_operations(nfcon_tty_driver, &nfcon_tty_ops);
141 tty_port_link_device(&nfcon_tty_port, nfcon_tty_driver, 0);
138 res = tty_register_driver(nfcon_tty_driver); 142 res = tty_register_driver(nfcon_tty_driver);
139 if (res) { 143 if (res) {
140 pr_err("failed to register nfcon tty driver\n"); 144 pr_err("failed to register nfcon tty driver\n");
diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c
index 138b2216b4f8..569f41bdcc46 100644
--- a/arch/mips/cavium-octeon/serial.c
+++ b/arch/mips/cavium-octeon/serial.c
@@ -47,40 +47,40 @@ static int __devinit octeon_serial_probe(struct platform_device *pdev)
47{ 47{
48 int irq, res; 48 int irq, res;
49 struct resource *res_mem; 49 struct resource *res_mem;
50 struct uart_port port; 50 struct uart_8250_port up;
51 51
52 /* All adaptors have an irq. */ 52 /* All adaptors have an irq. */
53 irq = platform_get_irq(pdev, 0); 53 irq = platform_get_irq(pdev, 0);
54 if (irq < 0) 54 if (irq < 0)
55 return irq; 55 return irq;
56 56
57 memset(&port, 0, sizeof(port)); 57 memset(&up, 0, sizeof(up));
58 58
59 port.flags = ASYNC_SKIP_TEST | UPF_SHARE_IRQ | UPF_FIXED_TYPE; 59 up.port.flags = ASYNC_SKIP_TEST | UPF_SHARE_IRQ | UPF_FIXED_TYPE;
60 port.type = PORT_OCTEON; 60 up.port.type = PORT_OCTEON;
61 port.iotype = UPIO_MEM; 61 up.port.iotype = UPIO_MEM;
62 port.regshift = 3; 62 up.port.regshift = 3;
63 port.dev = &pdev->dev; 63 up.port.dev = &pdev->dev;
64 64
65 if (octeon_is_simulation()) 65 if (octeon_is_simulation())
66 /* Make simulator output fast*/ 66 /* Make simulator output fast*/
67 port.uartclk = 115200 * 16; 67 up.port.uartclk = 115200 * 16;
68 else 68 else
69 port.uartclk = octeon_get_io_clock_rate(); 69 up.port.uartclk = octeon_get_io_clock_rate();
70 70
71 port.serial_in = octeon_serial_in; 71 up.port.serial_in = octeon_serial_in;
72 port.serial_out = octeon_serial_out; 72 up.port.serial_out = octeon_serial_out;
73 port.irq = irq; 73 up.port.irq = irq;
74 74
75 res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 75 res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
76 if (res_mem == NULL) { 76 if (res_mem == NULL) {
77 dev_err(&pdev->dev, "found no memory resource\n"); 77 dev_err(&pdev->dev, "found no memory resource\n");
78 return -ENXIO; 78 return -ENXIO;
79 } 79 }
80 port.mapbase = res_mem->start; 80 up.port.mapbase = res_mem->start;
81 port.membase = ioremap(res_mem->start, resource_size(res_mem)); 81 up.port.membase = ioremap(res_mem->start, resource_size(res_mem));
82 82
83 res = serial8250_register_port(&port); 83 res = serial8250_register_8250_port(&up);
84 84
85 return res >= 0 ? 0 : res; 85 return res >= 0 ? 0 : res;
86} 86}
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
index c48194c3073b..b2d4f492d782 100644
--- a/arch/mips/sni/a20r.c
+++ b/arch/mips/sni/a20r.c
@@ -133,6 +133,38 @@ static struct platform_device sc26xx_pdev = {
133 } 133 }
134}; 134};
135 135
136#warning "Please try migrate to use new driver SCCNXP and report the status" \
137 "in the linux-serial mailing list."
138
139/* The code bellow is a replacement of SC26XX to SCCNXP */
140#if 0
141#include <linux/platform_data/sccnxp.h>
142
143static struct sccnxp_pdata sccnxp_data = {
144 .reg_shift = 2,
145 .frequency = 3686400,
146 .mctrl_cfg[0] = MCTRL_SIG(DTR_OP, LINE_OP7) |
147 MCTRL_SIG(RTS_OP, LINE_OP3) |
148 MCTRL_SIG(DSR_IP, LINE_IP5) |
149 MCTRL_SIG(DCD_IP, LINE_IP6),
150 .mctrl_cfg[1] = MCTRL_SIG(DTR_OP, LINE_OP2) |
151 MCTRL_SIG(RTS_OP, LINE_OP1) |
152 MCTRL_SIG(DSR_IP, LINE_IP0) |
153 MCTRL_SIG(CTS_IP, LINE_IP1) |
154 MCTRL_SIG(DCD_IP, LINE_IP2) |
155 MCTRL_SIG(RNG_IP, LINE_IP3),
156};
157
158static struct platform_device sc2681_pdev = {
159 .name = "sc2681",
160 .resource = sc2xxx_rsrc,
161 .num_resources = ARRAY_SIZE(sc2xxx_rsrc),
162 .dev = {
163 .platform_data = &sccnxp_data,
164 },
165};
166#endif
167
136static u32 a20r_ack_hwint(void) 168static u32 a20r_ack_hwint(void)
137{ 169{
138 u32 status = read_c0_status(); 170 u32 status = read_c0_status();
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 47341aa208f2..88238638aee6 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -202,6 +202,7 @@ static int __init pdc_console_tty_driver_init(void)
202 pdc_console_tty_driver->flags = TTY_DRIVER_REAL_RAW | 202 pdc_console_tty_driver->flags = TTY_DRIVER_REAL_RAW |
203 TTY_DRIVER_RESET_TERMIOS; 203 TTY_DRIVER_RESET_TERMIOS;
204 tty_set_operations(pdc_console_tty_driver, &pdc_console_tty_ops); 204 tty_set_operations(pdc_console_tty_driver, &pdc_console_tty_ops);
205 tty_port_link_device(&tty_port, pdc_console_tty_driver, 0);
205 206
206 err = tty_register_driver(pdc_console_tty_driver); 207 err = tty_register_driver(pdc_console_tty_driver);
207 if (err) { 208 if (err) {
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index bbaf2c59830a..457475f98414 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -409,7 +409,8 @@ int setup_one_line(struct line *lines, int n, char *init,
409 line->valid = 1; 409 line->valid = 1;
410 err = parse_chan_pair(new, line, n, opts, error_out); 410 err = parse_chan_pair(new, line, n, opts, error_out);
411 if (!err) { 411 if (!err) {
412 struct device *d = tty_register_device(driver, n, NULL); 412 struct device *d = tty_port_register_device(&line->port,
413 driver, n, NULL);
413 if (IS_ERR(d)) { 414 if (IS_ERR(d)) {
414 *error_out = "Failed to register device"; 415 *error_out = "Failed to register device";
415 err = PTR_ERR(d); 416 err = PTR_ERR(d);
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index f9726f6afdf1..2cd3d3a3400b 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -223,6 +223,7 @@ int __init rs_init(void)
223 serial_driver->flags = TTY_DRIVER_REAL_RAW; 223 serial_driver->flags = TTY_DRIVER_REAL_RAW;
224 224
225 tty_set_operations(serial_driver, &serial_ops); 225 tty_set_operations(serial_driver, &serial_ops);
226 tty_port_link_device(&serial_port, serial_driver, 0);
226 227
227 if (tty_register_driver(serial_driver)) 228 if (tty_register_driver(serial_driver))
228 panic("Couldn't register serial driver\n"); 229 panic("Couldn't register serial driver\n");